@redocly/replay 0.27.0-next.1 → 0.27.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -171,7 +171,7 @@ Repeats of \`in:${n.in}\` + \`name:${n.name}\`.`,location:o.PathItem.child(["par
171
171
  ${y}`,location:g,reference:"https://redocly.com/docs/cli/rules/oas/component-name-unique"};m&&(b.forceSeverity=m),l.report(b)}}})}}};return t.schemas!="off"&&(r.NamedSchemas={Schema(a,{location:l}){s(pM,l)}}),t.responses!="off"&&(r.NamedResponses={Response(a,{location:l}){s(hM,l)}}),t.parameters!="off"&&(r.NamedParameters={Parameter(a,{location:l}){s(fM,l)}}),t.requestBodies!="off"&&(r.NamedRequestBodies={RequestBody(a,{location:l}){s(mM,l)}}),r;function i(a){const l=a.split("/").slice(-1)[0];return Ele(l)?l.slice(0,l.lastIndexOf(".")):l}function o(a,l,c){const u=u4e(a,l),d=e.get(u)??{absolutePointers:new Set,locations:[]},p=c.absolutePointer.toString();d.absolutePointers.has(p)||(d.absolutePointers.add(p),d.locations.push(c)),e.set(u,d)}function s(a,l){const c=i(l.absolutePointer.toString());o(a,c,l)}};function c4e(t){return a4e[t]??null}function u4e(t,e){return`${t}/${e}`}function d4e(t){const[e,n]=t.split("/");return{typeName:e,componentName:n}}const p4e=()=>({Root(t,{report:e,location:n}){if(!t.hasOwnProperty("servers")){e({message:"Servers must be present.",location:n.child(["openapi"]).key(),reference:"https://redocly.com/docs/cli/rules/oas/no-empty-servers"});return}(!Array.isArray(t.servers)||t.servers.length===0)&&e({message:"Servers must be a non-empty array.",location:n.child(["servers"]).key(),reference:"https://redocly.com/docs/cli/rules/oas/no-empty-servers"})}}),f4e=()=>({Example(t,{report:e,location:n}){t.value&&t.externalValue&&e({message:"Example object can have either `value` or `externalValue` fields.",location:n.child(["value"]).key(),reference:"https://redocly.com/docs/cli/rules/oas/no-example-value-and-externalValue"})}}),h4e=t=>{const e=new O5,n=i=>i.schema===void 0,r=i=>(o,s)=>{const{location:a,resolve:l}=s;if(tm(o.example))c(o.example,a.child("example"));else if(gt(o.examples))for(const u of Object.keys(o.examples))c(o.examples[u],a.child(["examples",u,"value"]),!0);function c(u,d,p){if(ki(u)){const f=l(u);if(!f.location)return;d=p?f.location.child("value"):f.location,u=f.node}p&&typeof u?.value>"u"||b0({example:p?u.value:u,schema:o.schema,options:{location:d,ctx:s,validator:e,allowAdditionalProperties:!!t.allowAdditionalProperties,ajvContext:i},reference:"https://redocly.com/docs/cli/rules/oas/no-invalid-media-type-examples"})}};return{Parameter:{MediaType:{skip:n,leave:r({apiContext:"request"})}},RequestBody:{MediaType:{skip:n,leave:r({apiContext:"request"})}},Response:{MediaType:{skip:n,leave:r({apiContext:"response"})}}}},m4e=()=>({Server(t,{report:e,location:n}){const r=/^(.*[\/.])?(example\.com|localhost)([\/:?].*|$)/;t.url&&r.test(t.url)&&e({message:"Server `url` should not point to example.com or localhost.",location:n.child(["url"]),reference:"https://redocly.com/docs/cli/rules/oas/no-server-example-com"})}}),g4e=()=>({Server(t,{report:e,location:n}){t.url&&t.url.endsWith("/")&&t.url!=="/"&&e({message:"Server `url` should not have a trailing slash.",location:n.child(["url"]),reference:"https://redocly.com/docs/cli/rules/oas/no-server-trailing-slash"})}}),y4e=()=>({Root(t,{report:e,location:n}){if(!t.servers||t.servers.length===0)return;const r=[];if(Array.isArray(t.servers))for(const i of t.servers){const o=uW(i);o&&r.push(...o)}else{const i=uW(t.servers);if(!i)return;r.push(...i)}for(const i of r)i==="empty"&&e({message:"Server variable with `enum` must be a non-empty array.",location:n.child(["servers"]).key(),reference:"https://redocly.com/docs/cli/rules/oas/no-server-variables-empty-enum"}),i==="invalidDefaultValue"&&e({message:"Server variable define `enum` and `default`. `enum` must include default value",location:n.child(["servers"]).key(),reference:"https://redocly.com/docs/cli/rules/oas/no-server-variables-empty-enum"})}});function uW(t){if(t.variables&&Object.keys(t.variables).length===0)return;const e=[];for(const n in t.variables){const r=t.variables[n];if(!r.enum||(Array.isArray(r.enum)&&r.enum?.length===0&&e.push("empty"),!r.default))continue;const i=t.variables[n].default;r.enum&&!r.enum.includes(i)&&e.push("invalidDefaultValue")}if(e.length)return e}const v4e=()=>({Server(t,{report:e,location:n}){if(!t?.url)return;const r=t.url.match(/{[^}]+}/g)?.map(o=>o.slice(1,o.length-1))||[],i=t?.variables&&Object.keys(t.variables)||[];for(const o of r)i.includes(o)||e({message:`The \`${o}\` variable is not defined in the \`variables\` objects.`,location:n.child(["url"]),reference:"https://redocly.com/docs/cli/rules/oas/no-undefined-server-variable"});for(const o of i)r.includes(o)||e({message:`The \`${o}\` variable is not used in the server's \`url\` field.`,location:n.child(["variables",o]).key(),from:n.child("url"),reference:"https://redocly.com/docs/cli/rules/oas/no-undefined-server-variable"})}}),b4e=()=>{const t=new Map,e=new Map,n=new Set;function r(i,o,s=!1){t.set(i.absolutePointer,{used:t.get(i.absolutePointer)?.used||!1,referencesDiscriminator:s,location:i,name:o})}return{ref(i,{type:o,resolve:s,key:a,location:l}){if(["Schema","Header","Parameter","Response","Example","RequestBody","MediaTypesMap"].includes(o.name)){const c=s(i);if(!c.location)return;t.set(c.location.absolutePointer,{used:!0,name:a.toString(),location:l})}},Root:{leave(i,{report:o}){t.forEach(s=>{!s.used&&!s.referencesDiscriminator&&o({message:`Component: "${s.name}" is never used.`,location:s.location.key(),reference:"https://redocly.com/docs/cli/rules/oas/no-unused-components"})}),e.forEach((s,a)=>{n.has(a)||o({message:`Security scheme: "${a}" is never used.`,location:s.key(),reference:"https://redocly.com/docs/cli/rules/oas/no-unused-components"})})}},NamedSchemas:{Schema(i,{location:o,key:s,resolve:a}){const l=i.allOf?.some(c=>ki(c)&&a(c)?.node?.discriminator);r(o,s.toString(),l)}},NamedParameters:{Parameter(i,{location:o,key:s}){r(o,s.toString())}},NamedResponses:{Response(i,{location:o,key:s}){r(o,s.toString())}},NamedExamples:{Example(i,{location:o,key:s}){r(o,s.toString())}},NamedRequestBodies:{RequestBody(i,{location:o,key:s}){r(o,s.toString())}},NamedHeaders:{Header(i,{location:o,key:s}){r(o,s.toString())}},NamedMediaTypes:{MediaTypesMap(i,{location:o,key:s}){r(o,s.toString())}},NamedSecuritySchemes:{SecurityScheme(i,{rawLocation:o,key:s}){e.set(s.toString(),o)}},SecurityRequirement(i){for(const o of Object.keys(i))n.add(o)}}},O4e=()=>({Schema:{leave(t,e){"nullable"in t&&!("type"in t)&&e.report({message:"The `type` field must be defined when the `nullable` field is used.",location:e.location.child(["nullable"]),reference:"https://redocly.com/docs/cli/rules/oas/nullable-type-sibling"})}}}),x4e=()=>({Response:{skip(t,e){return!/4[Xx0-9]{2}/.test(`${e}`)},enter(t,{report:e,location:n}){(!t.content||!t.content["application/problem+json"])&&e({message:"Response `4xx` must have content-type `application/problem+json`.",location:n.key(),reference:"https://redocly.com/docs/cli/rules/oas/operation-4xx-problem-details-rfc7807"})},MediaType:{skip(t,e){return e!=="application/problem+json"},enter(t,e){lf({fieldName:"schema",value:t,ctx:e,reference:"https://redocly.com/docs/cli/rules/oas/operation-4xx-problem-details-rfc7807"})},SchemaProperties(t,e){lf({fieldName:"type",value:t,ctx:e,reference:"https://redocly.com/docs/cli/rules/oas/operation-4xx-problem-details-rfc7807"}),lf({fieldName:"title",value:t,ctx:e,reference:"https://redocly.com/docs/cli/rules/oas/operation-4xx-problem-details-rfc7807"})}}}}),w4e=({allowedValues:t})=>({Paths:{RequestBody:{leave(e,n){by({type:"consumes",value:e,ctx:n,allowedValues:t,reference:"https://redocly.com/docs/cli/rules/oas/request-mime-type"})}},Callback:{RequestBody(){},Response:{leave(e,n){by({type:"consumes",value:e,ctx:n,allowedValues:t,reference:"https://redocly.com/docs/cli/rules/oas/request-mime-type"})}}}},WebhooksMap:{Response:{leave(e,n){by({type:"consumes",value:e,ctx:n,allowedValues:t,reference:"https://redocly.com/docs/cli/rules/oas/request-mime-type"})}}}}),S4e=t=>{const e=t.names||{};let n;return{Operation:{Response:{skip:(r,i)=>`${i}`=="204",enter:(r,i)=>{n=i.key},MediaType:{Schema(r,{report:i,location:o}){if(r.type!=="object")return;const s=e[n]||e[Vy(n)]||e[Vy(n).toLowerCase()]||[];for(const a of s)r.properties?.[a]||i({message:`Response object must contain a top-level "${a}" property.`,location:o.child("properties").key(),reference:"https://redocly.com/docs/cli/rules/oas/response-contains-property"})}}}}}},_4e=({allowedValues:t})=>({Paths:{Response:{leave(e,n){by({type:"produces",value:e,ctx:n,allowedValues:t,reference:"https://redocly.com/docs/cli/rules/oas/response-mime-type"})}},Callback:{Response(){},RequestBody:{leave(e,n){by({type:"produces",value:e,ctx:n,allowedValues:t,reference:"https://redocly.com/docs/cli/rules/oas/response-mime-type"})}}}},WebhooksMap:{RequestBody:{leave(e,n){by({type:"produces",value:e,ctx:n,allowedValues:t,reference:"https://redocly.com/docs/cli/rules/oas/response-mime-type"})}}}}),C4e=()=>{const t=`^[${Foe}]+$`;function e(n,r,i,o){new RegExp(t).test(n)||r({message:`The map key in ${o} "${n}" does not match the regular expression "${t}"`,location:i.key(),reference:"https://redocly.com/docs/cli/rules/oas/spec-components-invalid-map-name"})}return{NamedSchemas:{Schema(n,{key:r,report:i,location:o}){e(r,i,o,"schemas")}},NamedParameters:{Parameter(n,{key:r,report:i,location:o}){e(r,i,o,"parameters")}},NamedResponses:{Response(n,{key:r,report:i,location:o}){e(r,i,o,"responses")}},NamedExamples:{Example(n,{key:r,report:i,location:o}){e(r,i,o,"examples")}},NamedRequestBodies:{RequestBody(n,{key:r,report:i,location:o}){e(r,i,o,"requestBodies")}},NamedHeaders:{Header(n,{key:r,report:i,location:o}){e(r,i,o,"headers")}},NamedSecuritySchemes:{SecurityScheme(n,{key:r,report:i,location:o}){e(r,i,o,"securitySchemes")}},NamedLinks:{Link(n,{key:r,report:i,location:o}){e(r,i,o,"links")}},NamedCallbacks:{Callback(n,{key:r,report:i,location:o}){e(r,i,o,"callbacks")}}}},T4e=()=>{let t=[];return{Root:{enter(e){t=Object.keys(e.components?.schemas||{})}},Schema:{leave(e,n){const r=e.discriminator?.propertyName;if(!r)return;const i=e.discriminator?.defaultMapping;if(i===void 0){const o=new Set,s=(a,l)=>{const c=eM(a,n,l);return!!(!c.schema||o.has(c.schema)||(o.add(c.schema),c.schema.required?.includes(r)||c.schema.allOf?.some(u=>s(u,c.location))||c.schema.oneOf?.every(u=>s(u,c.location))||c.schema.anyOf?.every(u=>s(u,c.location))))};s(e)||n.report({message:`Discriminator with optional property '${r}' must include a defaultMapping field.`,location:n.location.child("discriminator"),reference:"https://redocly.com/docs/cli/rules/oas/spec-discriminator-defaultMapping"})}else n.resolve({$ref:i}).node===void 0&&!t.includes(i)&&n.report({message:`defaultMapping value '${i}' does not point to an existing schema component.`,location:n.location.child(["discriminator","defaultMapping"]),reference:"https://redocly.com/docs/cli/rules/oas/spec-discriminator-defaultMapping"})}}}},I4e=()=>({Example({value:t,externalValue:e,dataValue:n,serializedValue:r},{report:i,location:o}){t!==void 0&&e!==void 0&&i({message:"The 'value' and 'externalValue' fields of an example object are mutually exclusive.",location:o,reference:"https://redocly.com/docs/cli/rules/oas/spec-example-values"}),r!==void 0&&e!==void 0&&i({message:"The 'serializedValue' and 'externalValue' fields of an example object are mutually exclusive.",location:o,reference:"https://redocly.com/docs/cli/rules/oas/spec-example-values"}),t!==void 0&&n!==void 0&&i({message:"The 'value' filed must be absent if 'dataValue' is present in an example object.",location:o.child("value").key(),reference:"https://redocly.com/docs/cli/rules/oas/spec-example-values"}),t!==void 0&&r!==void 0&&i({message:"The 'value' filed must be absent if 'serializedValue' is present in an example object.",location:o.child("value").key(),reference:"https://redocly.com/docs/cli/rules/oas/spec-example-values"})}}),k4e=()=>({MediaType:{leave(t,e){("prefixEncoding"in t&&"encoding"in t||"itemEncoding"in t&&"encoding"in t)&&e.report({message:"The 'encoding' field cannot be used together with 'prefixEncoding' or 'itemEncoding'.",location:e.location.child("encoding").key(),reference:"https://redocly.com/docs/cli/rules/oas/spec-no-invalid-encoding-combinations"})}}}),P4e=()=>{let t;return{Root:{enter(e){t=e.tags??[]}},Tag:{leave(e,{report:n,location:r}){if(e?.parent===void 0)return;if(!t.find(s=>s.name===e.parent)){n({message:`Tag parent '${e.parent}' is not defined in the API description.`,location:r.child("parent"),reference:"https://redocly.com/docs/cli/rules/oas/spec-no-invalid-tag-parents"});return}const i=new Set(e.name);let o=e.parent;for(;o!==void 0;){if(i.has(o)){n({message:`Circular reference detected in tag parent hierarchy for tag '${e.name}'.`,location:r.child("parent"),reference:"https://redocly.com/docs/cli/rules/oas/spec-no-invalid-tag-parents"});return}i.add(o),o=t.find(s=>s.name===o)?.parent}}}}};function dW(t){return t.filter(e=>!("$ref"in e)&&e.in==="querystring").length}function pW(t,e){const n=e.location.child("parameters");t>1&&e.report({message:"Parameters with `in: querystring` should be defined only once per path/operation parameter set.",location:n,reference:"https://redocly.com/docs/cli/rules/oas/spec-querystring-parameters"})}function fW(t,e,n,r){if(t.in==="query"){n.querystringLocation&&r.report({message:"Parameters with `in: query` cannot be used together with `in: querystring` in the same operation/path parameter set.",location:e,reference:"https://redocly.com/docs/cli/rules/oas/spec-querystring-parameters"}),n.queryLocation??=e;return}t.in==="querystring"&&(n.queryLocation&&r.report({message:"Parameters with `in: querystring` cannot be used together with `in: query` in the same operation/path parameter set.",location:e,reference:"https://redocly.com/docs/cli/rules/oas/spec-querystring-parameters"}),n.querystringLocation??=e)}const $4e=()=>{let t={},e={},n=0;return{PathItem:{enter(r,i){t={},e={},n=0,pW(dW(r.parameters||[]),i)},Parameter(r,i){fW(r,i.location,t,i),r.in==="querystring"&&(n+=1)},Operation:{enter(r,i){e={...t};const o=n+dW(r.parameters||[]);pW(o,i)},Parameter(r,i){fW(r,i.location,e,i)}}}}},E4e={struct:Mm,"info-contact":Rv,"info-license":g5,"info-license-strict":FP,"operation-2xx-response":ale,"operation-4xx-response":lle,"operation-4xx-problem-details-rfc7807":x4e,assertions:jm,"operation-operationId-unique":ule,"operation-parameters-unique":ple,"operation-tag-defined":mle,"no-example-value-and-externalValue":f4e,"no-mixed-number-range-constraints":UP,"no-enum-type-mismatch":Bx,"no-path-trailing-slash":sle,"no-empty-servers":p4e,"path-declaration-must-exist":yle,"operation-operationId-url-safe":dle,"operation-operationId":WP,"operation-summary":hle,"tags-alphabetical":ZP,"no-server-example.com":m4e,"no-server-trailing-slash":g4e,"tag-description":XP,"operation-description":cle,"no-unused-components":b4e,"path-not-include-query":ble,"path-parameters-defined":pI,"path-params-defined":pI,"parameter-description":gle,"operation-singular-tag":fle,"security-defined":Ple,"no-unresolved-refs":Nm,"paths-kebab-case":Cle,"boolean-parameter-prefixes":s4e,"path-http-verbs-order":vle,"no-invalid-media-type-examples":h4e,"no-identical-paths":Hae,"no-ambiguous-paths":Zae,"no-undefined-server-variable":v4e,"no-server-variables-empty-enum":y4e,"no-http-verbs-in-paths":Yae,"request-mime-type":w4e,"response-mime-type":_4e,"path-segment-plural":_le,"no-invalid-schema-examples":ole,"no-invalid-parameter-examples":ile,"response-contains-header":Ile,"response-contains-property":S4e,"scalar-property-missing-example":kle,"spec-components-invalid-map-name":C4e,"required-string-property-missing-min-length":Tle,"spec-strict-refs":$le,"component-name-unique":l4e,"array-parameter-serialization":i4e,"no-required-schema-properties-undefined":Wx,"no-schema-type-mismatch":Xx,"no-duplicated-tag-names":BP,"nullable-type-sibling":O4e,"spec-no-invalid-tag-parents":P4e,"spec-no-invalid-encoding-combinations":k4e,"spec-discriminator-defaultMapping":T4e,"spec-example-values":I4e,"spec-querystring-parameters":$4e},A4e={},R4e=()=>{const t=new Map;function e(n,r){t.set(n.absolutePointer,{used:t.get(n.absolutePointer)?.used||!1,location:n,name:r})}return{ref(n,{type:r,resolve:i,key:o,location:s}){if(["Schema","ContentDescriptor","Example","Link","ErrorObject","ExamplePairing","Tag"].includes(r.name)){const a=i(n);if(!a.location)return;t.set(a.location.absolutePointer,{used:!0,name:o.toString(),location:s})}},Root:{leave(n,{report:r}){t.forEach(i=>{i.used||r({message:`Component: "${i.name}" is never used.`,location:i.location.key(),reference:"https://redocly.com/docs/cli/rules/oas/no-unused-components"})})}},NamedSchemas:{Schema(n,{location:r,key:i}){e(r,i.toString())}},NamedContentDescriptors:{ContentDescriptor(n,{location:r,key:i}){e(r,i.toString())}},NamedExamples:{Example(n,{location:r,key:i}){e(r,i.toString())}},NamedLinks:{Link(n,{location:r,key:i}){e(r,i.toString())}},NamedErrors:{ErrorObject(n,{location:r,key:i}){e(r,i.toString())}},NamedExamplePairingObjects:{ExamplePairing(n,{location:r,key:i}){e(r,i.toString())}},NamedTags:{Tag(n,{location:r,key:i}){e(r,i.toString())}}}},j4e=()=>({Method:{leave(t,{report:e,resolve:n,location:r}){if(!t.params||!Array.isArray(t.params))return;const i=new Set;t.params.forEach((o,s)=>{const a=n(o);if(!a.node)return;const l=a.node,c=l.name;c&&(i.has(c)&&e({message:`Parameter names must be unique. Duplicate parameter name '${l.name}' found.`,location:r.child([s,"name"]),reference:"https://redocly.com/docs/cli/rules/openrpc/spec-no-duplicated-method-params"}),i.add(c))})}}}),N4e=()=>({Method:{leave(t,{report:e,resolve:n,location:r}){if(!t.params||!Array.isArray(t.params))return;let i=!1;t.params.forEach((o,s)=>{const a=n(o);if(!a.node)return;const l=a.node;if(!l.name)return;l.required===!0?i&&e({message:`Required parameter '${l.name}' must be positioned before optional parameters.`,location:r.child([s,"name"]),reference:"https://redocly.com/docs/cli/rules/openrpc/spec-no-required-params-after-optional"}):i=!0})}}}),M4e={struct:Mm,"no-unresolved-refs":Nm,assertions:jm,"info-license":g5,"no-unused-components":R4e,"info-contact":Rv,"spec-no-duplicated-method-params":j4e,"spec-no-required-params-after-optional":N4e},D4e={},Q4e={"info-contact":Rv,struct:Mm,"no-unresolved-refs":Nm,assertions:jm},L4e={},q4e={rules:{struct:"error","no-unresolved-refs":"error"},oas2Rules:{"boolean-parameter-prefixes":"error","info-contact":"error","info-license":"error","info-license-strict":"error","no-path-trailing-slash":"error","no-identical-paths":"error","no-ambiguous-paths":"error","no-invalid-schema-examples":"error","no-invalid-parameter-examples":"error","no-http-verbs-in-paths":"error","no-enum-type-mismatch":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","operation-summary":"error","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-description":"error","operation-2xx-response":"error","operation-4xx-response":"error","operation-parameters-unique":"error","operation-tag-defined":"error","operation-singular-tag":"error","parameter-description":"error","path-declaration-must-exist":"error","path-not-include-query":"error","path-parameters-defined":"error","paths-kebab-case":"error","path-http-verbs-order":"error","path-params-defined":"error","path-segment-plural":"error","required-string-property-missing-min-length":"error","response-contains-header":"error","request-mime-type":{severity:"error",allowedValues:["application/json"]},"response-mime-type":{severity:"error",allowedValues:["application/json"]},"response-contains-property":"error","security-defined":"error","spec-strict-refs":"error","scalar-property-missing-example":"error","tag-description":"error","tags-alphabetical":"error","no-duplicated-tag-names":"error"},oas3_0Rules:{"array-parameter-serialization":"error","boolean-parameter-prefixes":"error","component-name-unique":"error","info-contact":"error","info-license":"error","info-license-strict":"error","no-path-trailing-slash":"error","no-identical-paths":"error","no-ambiguous-paths":"error","no-invalid-schema-examples":"error","no-invalid-parameter-examples":"error","no-http-verbs-in-paths":"error","no-enum-type-mismatch":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-invalid-media-type-examples":"error","no-server-example.com":"error","no-server-trailing-slash":"error","no-empty-servers":"error","no-example-value-and-externalValue":"error","no-unused-components":"error","no-undefined-server-variable":"error","no-server-variables-empty-enum":"error","nullable-type-sibling":"error","operation-summary":"error","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-description":"error","operation-2xx-response":"error","operation-4xx-response":"error","operation-4xx-problem-details-rfc7807":"error","operation-parameters-unique":"error","operation-tag-defined":"error","operation-singular-tag":"error","parameter-description":"error","path-declaration-must-exist":"error","path-not-include-query":"error","path-parameters-defined":"error","paths-kebab-case":"error","path-http-verbs-order":"error","path-params-defined":"error","path-segment-plural":"error","required-string-property-missing-min-length":"error","response-contains-header":"error","request-mime-type":{severity:"error",allowedValues:["application/json"]},"response-mime-type":{severity:"error",allowedValues:["application/json"]},"response-contains-property":"error","security-defined":"error","spec-strict-refs":"error","scalar-property-missing-example":"error","spec-components-invalid-map-name":"error","tag-description":"error","tags-alphabetical":"error","no-duplicated-tag-names":"error","spec-example-values":"error"},oas3_1Rules:{"array-parameter-serialization":"error","boolean-parameter-prefixes":"error","component-name-unique":"error","info-contact":"error","info-license":"error","info-license-strict":"error","no-path-trailing-slash":"error","no-identical-paths":"error","no-ambiguous-paths":"error","no-invalid-schema-examples":"error","no-invalid-parameter-examples":"error","no-http-verbs-in-paths":"error","no-enum-type-mismatch":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-invalid-media-type-examples":"error","no-mixed-number-range-constraints":"error","no-server-example.com":"error","no-server-trailing-slash":"error","no-empty-servers":"error","no-example-value-and-externalValue":"error","no-unused-components":"error","no-undefined-server-variable":"error","no-server-variables-empty-enum":"error","parameter-description":"error","path-declaration-must-exist":"error","path-not-include-query":"error","path-parameters-defined":"error","paths-kebab-case":"error","path-http-verbs-order":"error","path-params-defined":"error","path-segment-plural":"error","operation-summary":"error","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-description":"error","operation-2xx-response":"error","operation-4xx-response":"error","operation-4xx-problem-details-rfc7807":"error","operation-parameters-unique":"error","operation-tag-defined":"error","operation-singular-tag":"error","required-string-property-missing-min-length":"error","response-contains-header":"error","request-mime-type":{severity:"error",allowedValues:["application/json"]},"response-mime-type":{severity:"error",allowedValues:["application/json"]},"response-contains-property":"error","security-defined":"error","spec-strict-refs":"error","scalar-property-missing-example":"error","spec-components-invalid-map-name":"error","tag-description":"error","tags-alphabetical":"error","no-duplicated-tag-names":"error","spec-example-values":"error"},oas3_2Rules:{"array-parameter-serialization":"error","boolean-parameter-prefixes":"error","component-name-unique":"error","info-contact":"error","info-license":"error","info-license-strict":"error","no-path-trailing-slash":"error","no-identical-paths":"error","no-ambiguous-paths":"error","no-invalid-schema-examples":"error","no-invalid-parameter-examples":"error","no-http-verbs-in-paths":"error","no-enum-type-mismatch":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-invalid-media-type-examples":"error","no-mixed-number-range-constraints":"error","no-server-example.com":"error","no-server-trailing-slash":"error","no-empty-servers":"error","no-unused-components":"error","no-undefined-server-variable":"error","no-server-variables-empty-enum":"error","parameter-description":"error","path-declaration-must-exist":"error","path-not-include-query":"error","path-parameters-defined":"error","paths-kebab-case":"error","path-http-verbs-order":"error","path-params-defined":"error","path-segment-plural":"error","operation-summary":"error","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-description":"error","operation-2xx-response":"error","operation-4xx-response":"error","operation-4xx-problem-details-rfc7807":"error","operation-parameters-unique":"error","operation-tag-defined":"error","operation-singular-tag":"error","required-string-property-missing-min-length":"error","response-contains-header":"error","request-mime-type":{severity:"error",allowedValues:["application/json"]},"response-mime-type":{severity:"error",allowedValues:["application/json"]},"response-contains-property":"error","security-defined":"error","spec-strict-refs":"error","scalar-property-missing-example":"error","spec-components-invalid-map-name":"error","tag-description":"error","tags-alphabetical":"error","no-duplicated-tag-names":"error","spec-no-invalid-tag-parents":"error","spec-no-invalid-encoding-combinations":"error","spec-discriminator-defaultMapping":"error","spec-example-values":"error","spec-querystring-parameters":"error"},async2Rules:{"channels-kebab-case":"error","info-contact":"error","info-license-strict":"error","no-channel-trailing-slash":"error","operation-operationId":"error","tag-description":"error","tags-alphabetical":"error","no-duplicated-tag-names":"error","no-required-schema-properties-undefined":"error","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-schema-type-mismatch":"error"},async3Rules:{"channels-kebab-case":"error","info-contact":"error","info-license-strict":"error","no-channel-trailing-slash":"error","operation-operationId":"error","tag-description":"error","tags-alphabetical":"error","no-duplicated-tag-names":"error","no-required-schema-properties-undefined":"error","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-schema-type-mismatch":"error"},arazzo1Rules:{"criteria-unique":"error","no-criteria-xpath":"off","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"error","parameters-unique":"error","requestBody-replacements-unique":"error","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"error","step-onSuccess-unique":"error","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},arazzo1_1Rules:{"criteria-unique":"error","no-criteria-xpath":"off","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"error","parameters-unique":"error","requestBody-replacements-unique":"error","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"error","step-onSuccess-unique":"error","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},overlay1Rules:{"info-contact":"error"},openrpc1Rules:{"info-contact":"error","info-license":"error","no-unused-components":"error","spec-no-duplicated-method-params":"error","spec-no-required-params-after-optional":"error"},graphqlRules:{"no-unused-types":"error","type-description":"error"}},z4e={rules:{struct:"error","no-unresolved-refs":"error"},oas2Rules:{"boolean-parameter-prefixes":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"warn","no-duplicated-tag-names":"off","no-enum-type-mismatch":"warn","no-http-verbs-in-paths":"off","no-identical-paths":"warn","no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-path-trailing-slash":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","operation-2xx-response":"warn","operation-4xx-response":"off","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"warn","operation-operationId-url-safe":"warn","operation-parameters-unique":"warn","operation-singular-tag":"off","operation-summary":"warn","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"warn","path-http-verbs-order":"off","path-not-include-query":"warn","path-params-defined":"off","path-parameters-defined":"warn","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"warn","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},oas3_0Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"warn","no-duplicated-tag-names":"off","no-empty-servers":"warn","no-enum-type-mismatch":"warn","no-example-value-and-externalValue":"warn","no-http-verbs-in-paths":"off","no-identical-paths":"warn","no-invalid-media-type-examples":{severity:"warn",allowAdditionalProperties:!1},"no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-path-trailing-slash":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","no-server-example.com":"warn","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"warn","no-unused-components":"warn","nullable-type-sibling":"warn","operation-2xx-response":"warn","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"off","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"warn","operation-operationId-url-safe":"warn","operation-parameters-unique":"warn","operation-singular-tag":"off","operation-summary":"warn","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"warn","path-http-verbs-order":"off","path-not-include-query":"warn","path-params-defined":"off","path-parameters-defined":"warn","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"warn","spec-components-invalid-map-name":"warn","spec-example-values":"off","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},oas3_1Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"warn","no-duplicated-tag-names":"off","no-empty-servers":"warn","no-enum-type-mismatch":"warn","no-example-value-and-externalValue":"warn","no-http-verbs-in-paths":"off","no-identical-paths":"warn","no-invalid-media-type-examples":"warn","no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-mixed-number-range-constraints":"off","no-path-trailing-slash":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","no-server-example.com":"warn","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"warn","no-unused-components":"warn","operation-2xx-response":"warn","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"off","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"warn","operation-operationId-url-safe":"warn","operation-parameters-unique":"warn","operation-singular-tag":"off","operation-summary":"warn","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"warn","path-http-verbs-order":"off","path-not-include-query":"warn","path-params-defined":"off","path-parameters-defined":"warn","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"warn","spec-components-invalid-map-name":"warn","spec-example-values":"off","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},oas3_2Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"warn","no-duplicated-tag-names":"off","no-empty-servers":"warn","no-enum-type-mismatch":"warn","no-http-verbs-in-paths":"off","no-identical-paths":"warn","no-invalid-media-type-examples":"warn","no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-mixed-number-range-constraints":"off","no-path-trailing-slash":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","no-server-example.com":"warn","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"warn","no-unused-components":"warn","operation-2xx-response":"warn","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"off","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"warn","operation-operationId-url-safe":"warn","operation-parameters-unique":"warn","operation-singular-tag":"off","operation-summary":"warn","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"warn","path-http-verbs-order":"off","path-not-include-query":"warn","path-params-defined":"off","path-parameters-defined":"warn","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"warn","spec-components-invalid-map-name":"warn","spec-discriminator-defaultMapping":"off","spec-example-values":"off","spec-no-invalid-encoding-combinations":"warn","spec-no-invalid-tag-parents":"warn","spec-querystring-parameters":"error","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},async2Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"off","no-channel-trailing-slash":"off","no-duplicated-tag-names":"off","no-enum-type-mismatch":"warn","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","operation-operationId":"warn","tag-description":"warn","tags-alphabetical":"off"},async3Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"off","no-channel-trailing-slash":"off","no-duplicated-tag-names":"off","no-enum-type-mismatch":"warn","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","operation-operationId":"warn","tag-description":"warn","tags-alphabetical":"off"},arazzo1Rules:{"criteria-unique":"off","no-criteria-xpath":"off","no-enum-type-mismatch":"warn","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"off","parameters-unique":"off","requestBody-replacements-unique":"off","sourceDescription-name-unique":"off","sourceDescription-type":"off","sourceDescriptions-not-empty":"off","spec-step-mutually-exclusive-fields":"warn","step-onFailure-unique":"off","step-onSuccess-unique":"off","stepId-unique":"error","workflow-dependsOn":"off","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},arazzo1_1Rules:{"criteria-unique":"off","no-criteria-xpath":"off","no-enum-type-mismatch":"warn","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"warn","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"off","parameters-unique":"off","requestBody-replacements-unique":"off","sourceDescription-name-unique":"off","sourceDescription-type":"off","sourceDescriptions-not-empty":"off","spec-step-mutually-exclusive-fields":"warn","step-onFailure-unique":"off","step-onSuccess-unique":"off","stepId-unique":"error","workflow-dependsOn":"off","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},overlay1Rules:{"info-contact":"off"},graphqlRules:{"no-unused-types":"off","type-description":"off"},openrpc1Rules:{"info-contact":"off","info-license":"off","no-unused-components":"off","spec-no-duplicated-method-params":"error","spec-no-required-params-after-optional":"error"}},U4e={rules:{struct:"error","no-unresolved-refs":"error"},oas2Rules:{"boolean-parameter-prefixes":"off","info-contact":"off","info-license":"error","info-license-strict":"error","no-ambiguous-paths":"error","no-duplicated-tag-names":"error","no-enum-type-mismatch":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-parameter-examples":"error","no-invalid-schema-examples":"error","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","operation-2xx-response":"error","operation-4xx-response":"error","operation-description":"off","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","spec-strict-refs":"off","tag-description":"error","tags-alphabetical":"off"},oas3_0Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"error","info-license-strict":"error","no-ambiguous-paths":"error","no-duplicated-tag-names":"error","no-empty-servers":"error","no-enum-type-mismatch":"error","no-example-value-and-externalValue":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":{severity:"error",allowAdditionalProperties:!1},"no-invalid-parameter-examples":"error","no-invalid-schema-examples":"error","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-server-example.com":"error","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"error","no-unused-components":"error","nullable-type-sibling":"error","operation-2xx-response":"error","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"error","operation-description":"off","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","spec-components-invalid-map-name":"error","spec-example-values":"off","spec-strict-refs":"off","tag-description":"error","tags-alphabetical":"off"},oas3_1Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"error","info-license-strict":"error","no-ambiguous-paths":"error","no-duplicated-tag-names":"error","no-empty-servers":"error","no-enum-type-mismatch":"error","no-example-value-and-externalValue":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":"error","no-invalid-parameter-examples":"error","no-invalid-schema-examples":"error","no-mixed-number-range-constraints":"error","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-server-example.com":"error","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"error","no-unused-components":"error","operation-2xx-response":"error","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"error","operation-description":"off","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","spec-components-invalid-map-name":"error","spec-example-values":"off","spec-strict-refs":"off","tag-description":"error","tags-alphabetical":"off"},oas3_2Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"error","info-license-strict":"error","no-ambiguous-paths":"error","no-duplicated-tag-names":"error","no-empty-servers":"error","no-enum-type-mismatch":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":"error","no-invalid-parameter-examples":"error","no-invalid-schema-examples":"error","no-mixed-number-range-constraints":"error","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-server-example.com":"error","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"error","no-unused-components":"error","operation-2xx-response":"error","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"error","operation-description":"off","operation-operationId":"error","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","spec-components-invalid-map-name":"error","spec-discriminator-defaultMapping":"error","spec-example-values":"error","spec-no-invalid-encoding-combinations":"error","spec-no-invalid-tag-parents":"error","spec-querystring-parameters":"error","spec-strict-refs":"off","tag-description":"error","tags-alphabetical":"off"},async2Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"error","no-channel-trailing-slash":"off","no-duplicated-tag-names":"error","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","operation-operationId":"error","tag-description":"error","tags-alphabetical":"off"},async3Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"error","no-channel-trailing-slash":"off","no-duplicated-tag-names":"error","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","operation-operationId":"error","tag-description":"error","tags-alphabetical":"off"},arazzo1Rules:{"criteria-unique":"error","no-criteria-xpath":"off","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"error","parameters-unique":"error","requestBody-replacements-unique":"error","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"error","step-onSuccess-unique":"error","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},arazzo1_1Rules:{"criteria-unique":"error","no-criteria-xpath":"off","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"error","no-required-schema-properties-undefined":"error","no-schema-type-mismatch":"error","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"error","parameters-unique":"error","requestBody-replacements-unique":"error","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"error","step-onSuccess-unique":"error","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},overlay1Rules:{"info-contact":"off"},openrpc1Rules:{"info-contact":"off","info-license":"error","no-unused-components":"error","spec-no-duplicated-method-params":"error","spec-no-required-params-after-optional":"error"},graphqlRules:{"no-unused-types":"error","type-description":"off"}},V4e={rules:{struct:"error","no-unresolved-refs":"error"},oas2Rules:{"boolean-parameter-prefixes":"off","info-contact":"off","info-license":"warn","info-license-strict":"warn","no-ambiguous-paths":"warn","no-duplicated-tag-names":"warn","no-enum-type-mismatch":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-parameter-examples":"warn","no-invalid-schema-examples":"warn","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","operation-2xx-response":"warn","operation-4xx-response":"warn","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},oas3_0Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"warn","info-license-strict":"warn","no-ambiguous-paths":"warn","no-duplicated-tag-names":"warn","no-empty-servers":"error","no-enum-type-mismatch":"error","no-example-value-and-externalValue":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":{severity:"warn",allowAdditionalProperties:!1},"no-invalid-parameter-examples":"warn","no-invalid-schema-examples":"warn","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","no-server-example.com":"warn","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"error","no-unused-components":"warn","nullable-type-sibling":"error","operation-2xx-response":"warn","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"warn","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","spec-components-invalid-map-name":"error","spec-example-values":"off","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},oas3_1Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"warn","info-license-strict":"warn","no-ambiguous-paths":"warn","no-duplicated-tag-names":"warn","no-empty-servers":"error","no-enum-type-mismatch":"error","no-example-value-and-externalValue":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":"warn","no-invalid-parameter-examples":"warn","no-invalid-schema-examples":"warn","no-mixed-number-range-constraints":"warn","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","no-server-example.com":"warn","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"error","no-unused-components":"warn","operation-2xx-response":"warn","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"warn","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","spec-components-invalid-map-name":"error","spec-example-values":"off","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},oas3_2Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"warn","info-license-strict":"warn","no-ambiguous-paths":"warn","no-duplicated-tag-names":"warn","no-empty-servers":"error","no-enum-type-mismatch":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":"warn","no-invalid-parameter-examples":"warn","no-invalid-schema-examples":"warn","no-mixed-number-range-constraints":"warn","no-path-trailing-slash":"error","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","no-server-example.com":"warn","no-server-trailing-slash":"error","no-server-variables-empty-enum":"error","no-undefined-server-variable":"error","no-unused-components":"warn","operation-2xx-response":"warn","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"warn","operation-description":"off","operation-operationId":"warn","operation-operationId-unique":"error","operation-operationId-url-safe":"error","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"error","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"error","spec-components-invalid-map-name":"error","spec-discriminator-defaultMapping":"warn","spec-example-values":"error","spec-no-invalid-encoding-combinations":"error","spec-no-invalid-tag-parents":"error","spec-querystring-parameters":"error","spec-strict-refs":"off","tag-description":"warn","tags-alphabetical":"off"},async2Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"warn","no-channel-trailing-slash":"off","no-duplicated-tag-names":"warn","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","operation-operationId":"warn","tag-description":"warn","tags-alphabetical":"off"},async3Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"warn","no-channel-trailing-slash":"off","no-duplicated-tag-names":"warn","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","operation-operationId":"warn","tag-description":"warn","tags-alphabetical":"off"},arazzo1Rules:{"criteria-unique":"warn","no-criteria-xpath":"off","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"warn","parameters-unique":"error","requestBody-replacements-unique":"warn","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"warn","step-onSuccess-unique":"warn","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},arazzo1_1Rules:{"criteria-unique":"warn","no-criteria-xpath":"off","no-enum-type-mismatch":"error","no-mixed-number-range-constraints":"warn","no-required-schema-properties-undefined":"warn","no-schema-type-mismatch":"error","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"warn","parameters-unique":"error","requestBody-replacements-unique":"warn","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"warn","step-onSuccess-unique":"warn","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},overlay1Rules:{"info-contact":"off"},openrpc1Rules:{"info-license":"warn","no-unused-components":"warn","info-contact":"off","spec-no-duplicated-method-params":"error","spec-no-required-params-after-optional":"error"},graphqlRules:{"no-unused-types":"warn","type-description":"off"}},F4e={rules:{struct:"error","no-unresolved-refs":"error"},oas2Rules:{"boolean-parameter-prefixes":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"off","no-duplicated-tag-names":"error","no-enum-type-mismatch":"off","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-path-trailing-slash":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","operation-2xx-response":"off","operation-4xx-response":"off","operation-description":"off","operation-operationId":"off","operation-operationId-unique":"error","operation-operationId-url-safe":"off","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"off","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"off","spec-strict-refs":"error","tag-description":"off","tags-alphabetical":"off"},oas3_0Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"off","no-duplicated-tag-names":"error","no-empty-servers":"off","no-enum-type-mismatch":"off","no-example-value-and-externalValue":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":{severity:"off",allowAdditionalProperties:!1},"no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-path-trailing-slash":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","no-server-example.com":"off","no-server-trailing-slash":"off","no-server-variables-empty-enum":"off","no-undefined-server-variable":"error","no-unused-components":"off","nullable-type-sibling":"error","operation-2xx-response":"off","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"off","operation-description":"off","operation-operationId":"off","operation-operationId-unique":"error","operation-operationId-url-safe":"off","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"off","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"off","spec-components-invalid-map-name":"error","spec-example-values":"off","spec-strict-refs":"error","tag-description":"off","tags-alphabetical":"off"},oas3_1Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"off","no-duplicated-tag-names":"error","no-empty-servers":"off","no-enum-type-mismatch":"off","no-example-value-and-externalValue":"error","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":"off","no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-mixed-number-range-constraints":"off","no-path-trailing-slash":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","no-server-example.com":"off","no-server-trailing-slash":"off","no-server-variables-empty-enum":"off","no-undefined-server-variable":"error","no-unused-components":"off","operation-2xx-response":"off","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"off","operation-description":"off","operation-operationId":"off","operation-operationId-unique":"error","operation-operationId-url-safe":"off","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"off","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"off","spec-components-invalid-map-name":"error","spec-example-values":"off","spec-strict-refs":"error","tag-description":"off","tags-alphabetical":"off"},oas3_2Rules:{"array-parameter-serialization":"off","boolean-parameter-prefixes":"off","component-name-unique":"off","info-contact":"off","info-license":"off","info-license-strict":"off","no-ambiguous-paths":"off","no-duplicated-tag-names":"error","no-empty-servers":"off","no-enum-type-mismatch":"off","no-http-verbs-in-paths":"off","no-identical-paths":"error","no-invalid-media-type-examples":"off","no-invalid-parameter-examples":"off","no-invalid-schema-examples":"off","no-mixed-number-range-constraints":"off","no-path-trailing-slash":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","no-server-example.com":"off","no-server-trailing-slash":"off","no-server-variables-empty-enum":"off","no-undefined-server-variable":"error","no-unused-components":"off","operation-2xx-response":"off","operation-4xx-problem-details-rfc7807":"off","operation-4xx-response":"off","operation-description":"off","operation-operationId":"off","operation-operationId-unique":"error","operation-operationId-url-safe":"off","operation-parameters-unique":"error","operation-singular-tag":"off","operation-summary":"off","operation-tag-defined":"off","parameter-description":"off","path-declaration-must-exist":"error","path-http-verbs-order":"off","path-not-include-query":"error","path-params-defined":"off","path-parameters-defined":"error","path-segment-plural":"off","paths-kebab-case":"off","request-mime-type":"off","required-string-property-missing-min-length":"off","response-contains-header":"off","response-contains-property":"off","response-mime-type":"off","scalar-property-missing-example":"off","security-defined":"off","spec-components-invalid-map-name":"error","spec-discriminator-defaultMapping":"error","spec-example-values":"error","spec-no-invalid-encoding-combinations":"error","spec-no-invalid-tag-parents":"error","spec-querystring-parameters":"error","spec-strict-refs":"error","tag-description":"off","tags-alphabetical":"off"},async2Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"off","no-channel-trailing-slash":"off","no-duplicated-tag-names":"off","no-enum-type-mismatch":"off","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","operation-operationId":"off","tag-description":"off","tags-alphabetical":"off"},async3Rules:{"channels-kebab-case":"off","info-contact":"off","info-license-strict":"off","no-channel-trailing-slash":"off","no-duplicated-tag-names":"off","no-enum-type-mismatch":"off","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","operation-operationId":"off","tag-description":"off","tags-alphabetical":"off"},arazzo1Rules:{"criteria-unique":"error","no-criteria-xpath":"off","no-enum-type-mismatch":"off","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"error","parameters-unique":"error","requestBody-replacements-unique":"error","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"error","step-onSuccess-unique":"error","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},arazzo1_1Rules:{"criteria-unique":"error","no-criteria-xpath":"off","no-enum-type-mismatch":"off","no-mixed-number-range-constraints":"off","no-required-schema-properties-undefined":"off","no-schema-type-mismatch":"off","no-x-security-both-scheme-and-scheme-name":"off","no-x-security-scheme-name-without-openapi":"off","outputs-defined":"error","parameters-unique":"error","requestBody-replacements-unique":"error","sourceDescription-name-unique":"error","sourceDescription-type":"error","sourceDescriptions-not-empty":"error","spec-step-mutually-exclusive-fields":"error","step-onFailure-unique":"error","step-onSuccess-unique":"error","stepId-unique":"error","workflow-dependsOn":"error","workflowId-unique":"error","x-security-scheme-name-reference":"off","x-security-scheme-required-values":"off"},overlay1Rules:{"info-contact":"off"},openrpc1Rules:{"info-contact":"off","info-license":"off","no-unused-components":"off","spec-no-duplicated-method-params":"error","spec-no-required-params-after-optional":"error"},graphqlRules:{"no-unused-types":"off","type-description":"off"}},B4e={recommended:V4e,"recommended-strict":U4e,minimal:z4e,all:q4e,spec:F4e},hW={id:"",rules:{oas3:E4e,oas2:n4e,async2:FLe,async3:ZLe,arazzo1:LLe,overlay1:Q4e,openrpc1:M4e,graphql:mze},preprocessors:{oas3:A4e,oas2:r4e,async2:BLe,async3:GLe,arazzo1:qLe,overlay1:L4e,openrpc1:D4e},decorators:{oas3:rLe,oas2:eLe,async2:ZQe,async3:GQe,arazzo1:XQe,overlay1:oLe,openrpc1:iLe},configs:B4e},W4e=[".graphql",".gql"];function x5(t){const e=t.toLowerCase();return W4e.some(n=>e.endsWith(n))}function jO(t,e){return t+"::"+e}function X4e(){return new Promise(t=>{setTimeout(t)})}class Fy{absoluteRef;body;mimeType;constructor(e,n,r){this.absoluteRef=e,this.body=n,this.mimeType=r}#e;#t;getAst(e){return this.#e===void 0&&(this.#e=e(this.body,{filename:this.absoluteRef})??void 0,this.#e&&this.#e.kind===0&&this.#e.value===""&&this.#e.startPosition!==1&&(this.#e.startPosition=1,this.#e.endPosition=1)),this.#e}getLines(){return this.#t===void 0&&(this.#t=this.body.split(/\r\n|[\n\r]/g)),this.#t}}class w5 extends Error{originalError;constructor(e){super(e.message),this.originalError=e,Object.setPrototypeOf(this,w5.prototype)}}function Z4e(t,e){const n=new Fy(e,t);if(x5(e))return{source:n,parsed:t};try{return{source:n,parsed:Kq(t,{filename:e})}}catch(r){throw new Av(r,n)}}class t${config;cache=new Map;constructor(e={http:{headers:[]}}){this.config=e}getFiles(){return new Set(Array.from(this.cache.keys()))}resolveExternalRef(e,n){return Ni(n)?n:e&&Ni(e)?new URL(n,e).href:yr.resolve(e?yr.dirname(e):process.cwd(),n)}async loadExternalRef(e){try{if(Ni(e)){const{body:n,mimeType:r}=await eoe(e,this.config.http);return new Fy(e,n,r)}else{if((void 0)(e).isDirectory())throw new Error(`Expected a file but received a folder at ${e}.`);const n=await(void 0).readFile(e,"utf-8");return new Fy(e,n.replace(/\r\n/g,`
172
172
  `))}}catch(n){throw n.message=n.message.replace(", lstat",""),new w5(n)}}parseDocument(e,n=!1){if(x5(e.absoluteRef))return{source:e,parsed:e.body};if(!Ele(e.absoluteRef)&&!e.mimeType?.match(/(json|yaml|openapi)/)&&!n)return{source:e,parsed:e.body};try{return{source:e,parsed:Kq(e.body,{filename:e.absoluteRef})}}catch(r){throw new Av(r,e)}}async resolveDocument(e,n,r=!1){const i=this.resolveExternalRef(e,n),o=this.cache.get(i);if(o)return o;const s=this.loadExternalRef(i).then(a=>this.parseDocument(a,r));return this.cache.set(i,s),s}}function mW(t,e){return{prev:t,node:e}}function G4e(t,e){for(;t;){if(t.node===e)return!0;t=t.prev}return!1}const Sb={name:"unknown",properties:{}},Y4e={name:"scalar",properties:{}};async function Oy(t){const{rootDocument:e,externalRefResolver:n,rootType:r}=t,i=new Map,o=new Set,s=[];l(e.parsed,e,"#/",r);let a;do a=await Promise.all(s);while(s.length!==a.length);return i;function l(c,u,d,p){const f=u.source.absoluteRef,m=new Map;g(c,p,f+d);function g(b,v,x){if(!gt(b)&&!Array.isArray(b))return;const O=`${v.name}::${x}`;if(o.has(O))return;if(o.add(O),Array.isArray(b)){const _=v.items;if(_===void 0&&v!==Sb&&v!==qh)return;const C=typeof _=="function";for(let I=0;I<b.length;I++){let A=C?_(b[I],Rp(x,I)):_;if(A===void 0&&v!==Sb&&v!==qh)continue;const R=A?.directResolveAs?{$ref:b[I]}:b[I];A=A?.directResolveAs||A,g(R,af(A)?A:Sb,Rp(x,I))}return}const[w,S]=Object.entries(b).find(([_])=>_==="$anchor")||[];S&&m.set(`#${S}`,b);for(const _ of Object.keys(b)){let C=b[_],I=nm(v.properties,_);I===void 0&&(I=v.additionalProperties),typeof I=="function"&&(I=I(C,_)),I===void 0&&(I=Sb),v.extensionsPrefix&&_.startsWith(v.extensionsPrefix)&&I===Sb&&(I=qh),!af(I)&&I?.directResolveAs&&(I=I.directResolveAs,C={$ref:C}),I&&I.name===void 0&&I.resolvable!==!1&&(I=Y4e),!(!af(I)||!(gt(C)||Array.isArray(C)))&&g(C,I,Rp(x,gh(_)))}if(ki(b)){const _=y(u,b,{prev:null,node:b}).then(C=>{C.resolved&&l(C.node,C.document,C.nodePointer,v)});s.push(_)}if(toe(b)){const _=y(u,{$ref:b.externalValue},{prev:null,node:b}).then(C=>{C.resolved&&l(C.node,C.document,C.nodePointer,v)});s.push(_)}}async function y(b,v,x){if(G4e(x.prev,v))throw new Error("Self-referencing circular pointer");if(Wke(v.$ref)){await X4e();const q={resolved:!0,isRemote:!1,node:m.get(v.$ref),document:b,nodePointer:v.$ref},z=jO(b.source.absoluteRef,v.$ref);return i.set(z,q),q}const{uri:O,pointer:w}=Nq(v.$ref),S=O!==null&&n.resolveExternalRef(b.source.absoluteRef,O)!==b.source.absoluteRef;let _;try{_=S?await n.resolveDocument(b.source.absoluteRef,O):b}catch(q){const z={resolved:!1,isRemote:S,document:void 0,error:q},F=jO(b.source.absoluteRef,v.$ref);return i.set(F,z),z}let C={resolved:!0,document:_,isRemote:S,node:b.parsed,nodePointer:"#/"},I=_.parsed;const A=w;for(const q of A)if(gt(I)&&I[q]!==void 0)I=I[q],C.nodePointer=Rp(C.nodePointer,gh(q));else if(Array.isArray(I)&&I[+q]!==void 0)I=I[+q],C.nodePointer=Rp(C.nodePointer,gh(q));else if(ki(I))if(C=await y(_,I,mW(x,I)),_=C.document||_,gt(C.node))I=C.node[q],C.nodePointer=Rp(C.nodePointer,gh(q));else if(Array.isArray(C.node))I=C.node[+q],C.nodePointer=Rp(C.nodePointer,gh(q));else{I=void 0;break}else{I=void 0;break}C.node=I,C.document=_;const R=jO(b.source.absoluteRef,v.$ref);return C.document&&ki(I)&&(C=await y(C.document,I,mW(x,I))),i.set(R,C),{...C}}}}const H4e={Root:"DefinitionRoot",ServerVariablesMap:"ServerVariableMap",Paths:["PathMap","PathsMap"],CallbacksMap:"CallbackMap",MediaTypesMap:"MediaTypeMap",ExamplesMap:"ExampleMap",EncodingMap:"EncodingsMap",HeadersMap:"HeaderMap",LinksMap:"LinkMap",OAuth2Flows:"SecuritySchemeFlows",Responses:"ResponsesMap"};function Uh(t,e){const n={};n.any={enter:[],leave:[]};for(const s of Object.keys(e))n[s]={enter:[],leave:[]};n.ref={enter:[],leave:[]};for(const{ruleId:s,severity:a,message:l,visitor:c}of t)o({ruleId:s,severity:a,message:l},c,null);for(const s of Object.keys(n))n[s].enter.sort((a,l)=>l.depth-a.depth),n[s].leave.sort((a,l)=>a.depth-l.depth);return n;function r(s,a,l,c,u=[]){if(u.includes(a))return;u=[...u,a];const d=new Set;for(const f of Object.values(a.properties)){if(f===l){p(s,u);continue}gt(f)&&f.name!==void 0&&d.add(f)}a.additionalProperties&&typeof a.additionalProperties!="function"&&(a.additionalProperties===l?p(s,u):a.additionalProperties.name!==void 0&&d.add(a.additionalProperties)),a.items&&typeof a.items!="function"&&(a.items===l?p(s,u):a.items.name!==void 0&&d.add(a.items)),a.extensionsPrefix&&d.add(qh);for(const f of Array.from(d.values()))r(s,f,l,c,u);function p(f,m){for(const g of m.slice(1))n[g.name]=n[g.name]||{enter:[],leave:[]},n[g.name].enter.push({...f,visit:()=>{},depth:0,context:{isSkippedLevel:!0,seen:new Set,parent:c}})}}function i(s,a){if(Array.isArray(a)){const l=a.find(c=>s[c])||void 0;return l&&s[l]}return s[a]}function o(s,a,l,c=0){const u=Object.keys(e);if(c===0)u.push("any"),u.push("ref");else{if(a.any)throw new Error("any() is allowed only on top level");if(a.ref)throw new Error("ref() is allowed only on top level")}for(const d of u){const p=a[d]||i(a,H4e[d]),f=n[d];if(!p)continue;let m,g,y;const b=gt(p);if(d==="ref"&&b&&p.skip)throw new Error("ref() visitor does not support skip");typeof p=="function"?m=p:b&&(m=p.enter,g=p.leave,y=p.skip);const v=(m?1:0)+(g?1:0)+(y?1:0),x=b&&Object.keys(p).length>v,O={activatedOn:null,type:e[d],parent:l,isSkippedLevel:!1};if(x&&o(s,p,O,c+1),l&&r(s,l.type,e[d],l),m||b){if(m&&typeof m!="function")throw new Error("DEV: should be function");f.enter.push({...s,visit:m||(()=>{}),skip:y,depth:c,context:O})}if(g){if(typeof g!="function")throw new Error("DEV: should be function");f.leave.push({...s,visit:g,depth:c,context:O})}}}}const Gn=(t,e)=>{if(e)for(const n of Object.keys(e))gt(t[n])&&typeof e[n]=="string"?t[n]={...t[n],severity:e[n]}:t[n]=e[n]};function lr(t,e){if(e)for(const n of Object.keys(e))t.hasOwnProperty(n)&&(gt(t[n])&&typeof e[n]=="string"?t[n]={...t[n],severity:e[n]}:t[n]=e[n])}function K4e(t){if(t.indexOf("/")>-1){const[e,n]=t.split("/");return{pluginId:e,configName:n}}else return{pluginId:"",configName:t}}function Ri(t,e){if(!e)return t;const n={};for(const r of Object.keys(t))n[`${e}/${r}`]=t[r];return n}function Ale(t){const e={rules:{},oas2Rules:{},oas3_0Rules:{},oas3_1Rules:{},oas3_2Rules:{},async2Rules:{},async3Rules:{},arazzo1Rules:{},arazzo1_1Rules:{},overlay1Rules:{},openrpc1Rules:{},graphqlRules:{},preprocessors:{},oas2Preprocessors:{},oas3_0Preprocessors:{},oas3_1Preprocessors:{},oas3_2Preprocessors:{},async2Preprocessors:{},async3Preprocessors:{},arazzo1Preprocessors:{},arazzo1_1Preprocessors:{},overlay1Preprocessors:{},openrpc1Preprocessors:{},decorators:{},oas2Decorators:{},oas3_0Decorators:{},oas3_1Decorators:{},oas3_2Decorators:{},async2Decorators:{},async3Decorators:{},arazzo1Decorators:{},arazzo1_1Decorators:{},overlay1Decorators:{},openrpc1Decorators:{}};for(const n of t){if(gt(n)&&"extends"in n&&n.extends!==void 0)throw new Error(`'extends' is not supported in shared configs yet:
173
173
  ${JSON.stringify(n,null,2)}`);Gn(e.rules,n.rules),Gn(e.oas2Rules,n.oas2Rules),lr(e.oas2Rules,n.rules),Gn(e.oas3_0Rules,n.oas3_0Rules),lr(e.oas3_0Rules,n.rules),Gn(e.oas3_1Rules,n.oas3_1Rules),lr(e.oas3_1Rules,n.rules),Gn(e.oas3_2Rules,n.oas3_2Rules),lr(e.oas3_2Rules,n.rules),Gn(e.async2Rules,n.async2Rules),lr(e.async2Rules,n.rules),Gn(e.async3Rules,n.async3Rules),lr(e.async3Rules,n.rules),Gn(e.arazzo1Rules,n.arazzo1Rules),lr(e.arazzo1Rules,n.rules),Gn(e.arazzo1_1Rules,n.arazzo1_1Rules),lr(e.arazzo1_1Rules,n.rules),Gn(e.overlay1Rules,n.overlay1Rules),lr(e.overlay1Rules,n.rules),Gn(e.openrpc1Rules,n.openrpc1Rules),lr(e.openrpc1Rules,n.rules),Gn(e.graphqlRules,n.graphqlRules),lr(e.graphqlRules,n.rules),Gn(e.preprocessors,n.preprocessors),Gn(e.oas2Preprocessors,n.oas2Preprocessors),lr(e.oas2Preprocessors,n.preprocessors),Gn(e.oas3_0Preprocessors,n.oas3_0Preprocessors),lr(e.oas3_0Preprocessors,n.preprocessors),Gn(e.oas3_1Preprocessors,n.oas3_1Preprocessors),lr(e.oas3_1Preprocessors,n.preprocessors),Gn(e.oas3_2Preprocessors,n.oas3_2Preprocessors),lr(e.oas3_2Preprocessors,n.preprocessors),Gn(e.async2Preprocessors,n.async2Preprocessors),lr(e.async2Preprocessors,n.preprocessors),Gn(e.async3Preprocessors,n.async3Preprocessors),lr(e.async3Preprocessors,n.preprocessors),Gn(e.arazzo1Preprocessors,n.arazzo1Preprocessors),lr(e.arazzo1Preprocessors,n.preprocessors),Gn(e.arazzo1_1Preprocessors,n.arazzo1_1Preprocessors),lr(e.arazzo1_1Preprocessors,n.preprocessors),Gn(e.overlay1Preprocessors,n.overlay1Preprocessors),lr(e.overlay1Preprocessors,n.preprocessors),Gn(e.openrpc1Preprocessors,n.openrpc1Preprocessors),lr(e.openrpc1Preprocessors,n.preprocessors),Gn(e.decorators,n.decorators),Gn(e.oas2Decorators,n.oas2Decorators),lr(e.oas2Decorators,n.decorators),Gn(e.oas3_0Decorators,n.oas3_0Decorators),lr(e.oas3_0Decorators,n.decorators),Gn(e.oas3_1Decorators,n.oas3_1Decorators),lr(e.oas3_1Decorators,n.decorators),Gn(e.oas3_2Decorators,n.oas3_2Decorators),lr(e.oas3_2Decorators,n.decorators),Gn(e.async2Decorators,n.async2Decorators),lr(e.async2Decorators,n.decorators),Gn(e.async3Decorators,n.async3Decorators),lr(e.async3Decorators,n.decorators),Gn(e.arazzo1Decorators,n.arazzo1Decorators),lr(e.arazzo1Decorators,n.decorators),Gn(e.arazzo1_1Decorators,n.arazzo1_1Decorators),lr(e.arazzo1_1Decorators,n.decorators),Gn(e.overlay1Decorators,n.overlay1Decorators),lr(e.overlay1Decorators,n.decorators),Gn(e.openrpc1Decorators,n.openrpc1Decorators),lr(e.openrpc1Decorators,n.decorators)}return e}function J4e(t){return new Map(JSON.parse(JSON.stringify([...t])))}function gW(t){return gt(t)&&"id"in t}function e3e(t){return typeof t=="function"}function Rle({node:t,ctx:e,plugins:n}){if(!t.extends)return t;const r=(t.extends||[]).filter(el).map(i=>{if(!Ni(i)&&!Kh.extname(i))return b3e(i,n);const o=e.resolve({$ref:i});return o.location&&o.node!==void 0?o.node:null}).filter(el);return Ale([...r.map(i=>Rle({node:i,ctx:e,plugins:n})),{...t,extends:void 0}])}function G_(t,e){if(gt(t)&&Array.isArray(t.plugins)){const{plugins:n,rootConfigDir:r}=e.getVisitorData();n.push(...t.plugins.map(i=>Nle(i,e.location.source.absoluteRef.replace(/^file:\/\//,""),r)))}}const t3e=Uh([{severity:"error",ruleId:Ese,visitor:{ref:{},ConfigGovernance:{leave(t,e){G_(t,e)}},ConfigApisProperties:{leave(t,e){G_(t,e)}},[Zs.ScorecardClassicLevel]:{leave(t,e){G_(t,e)}},ConfigRoot:{leave(t,e){G_(t,e)}}}}],Ux);function Y_(t,e){if(gt(t)&&t.extends){const{plugins:n}=e.getVisitorData(),r=Rle({node:t,ctx:e,plugins:n});Object.assign(t,r),delete t.extends}}const n3e=Uh([{severity:"error",ruleId:$se,visitor:{ref:{leave(t,e,n){ZN(t,n,e)}},ConfigGovernance:{leave(t,e){Y_(t,e)}},ConfigApisProperties:{leave(t,e){Y_(t,e)}},[Zs.ScorecardClassicLevel]:{leave(t,e){Y_(t,e)}},ConfigRoot:{leave(t,e){Y_(t,e)}}}}],Ux);function yW(t,e){return{prev:t,value:e}}function vW(t){return t?.prev??null}function r3e(t){const e={};for(;t.parent;)e[t.parent.type.name]=t.parent.activatedOn?.value.node,t=t.parent;return e}function i3e(t){const e={};for(;t.parent;)t.parent.activatedOn?.value.location&&(e[t.parent.type.name]=t.parent.activatedOn?.value.location),t=t.parent;return e}function Vh(t){const{document:e,rootType:n,normalizedVisitors:r,resolvedRefMap:i,ctx:o}=t,s={},a=new Set,l=r.any.enter,c=r.any.leave,u={},d={};for(const f of Object.keys(r))f==="any"||f==="ref"||(u[f]=l.concat(r[f]?.enter||[]),d[f]=(r[f]?.leave||[]).concat(c));p(e.parsed,n,new hy(e.source,"#/"),void 0,"");function p(f,m,g,y,b){const v=(z,F=O.source.absoluteRef)=>{if(!ki(z))return{location:g,node:z};const te=jO(F,z.$ref),B=i.get(te);if(!B)return{location:void 0,node:void 0};const{resolved:se,node:H,document:ie,nodePointer:V,error:M}=B;return{location:se?new hy(ie.source,V):M instanceof Av?new hy(M.source,""):void 0,node:H,error:M}},x=g;let O=g;const w=ki(f),{node:S,location:_,error:C}=v(f),I=new Set;if(w){const z=r.ref.enter;for(const{visit:F,ruleId:te,severity:B,message:se,context:H}of z)I.add(H),F(f,{report:V=>R(te,B,se,V),resolve:v,rawNode:f,rawLocation:x,location:g,type:m,parent:y,key:b,parentLocations:{},specVersion:o.specVersion,config:o.config,getVisitorData:()=>q(te)},{node:S,location:_,error:C}),_?.source.absoluteRef&&o.refTypes&&o.refTypes.set(_?.source.absoluteRef,m)}if(S!==void 0&&_&&m.name!=="scalar"){O=_;const z=s[m.name]?.has?.(S);let F=!1;const te=u[m.name]||l.concat(r[m.name]?.enter||[]),B=[],se=`${O.absolutePointer}${O.pointer}`;for(const{context:ie,visit:V,skip:M,ruleId:ee,severity:X,message:j}of te){if(a.has(se))break;if(ie.isSkippedLevel)ie.parent.activatedOn&&!ie.parent.activatedOn.value.nextLevelTypeActivated&&!ie.seen.has(f)&&(ie.seen.add(f),F=!0,B.push(ie));else if(ie.parent&&ie.parent.activatedOn&&ie.activatedOn?.value.withParentNode!==ie.parent.activatedOn.value.node&&ie.parent.activatedOn.value.nextLevelTypeActivated?.value!==m||!ie.parent&&!z){B.push(ie);const W={node:S,location:_,nextLevelTypeActivated:null,withParentNode:ie.parent?.activatedOn?.value.node,skipped:(ie.parent?.activatedOn?.value.skipped||M?.(S,b,{location:g,rawLocation:x,resolve:v,rawNode:f}))??!1};ie.activatedOn=yW(ie.activatedOn,W);let Z=ie.parent;for(;Z;)Z.activatedOn.value.nextLevelTypeActivated=yW(Z.activatedOn.value.nextLevelTypeActivated,m),Z=Z.parent;W.skipped||(F=!0,I.add(ie),A(V,S,f,ie,ee,X,j))}}if(F||!z){if(s[m.name]=s[m.name]||new Set,s[m.name].add(S),Array.isArray(S)){const ie=m.items;if(ie!==void 0){const V=typeof ie=="function";for(let M=0;M<S.length;M++){const ee=_.child([M]);let X=V?ie(S[M],ee.absolutePointer):ie,j=S[M];X?.directResolveAs&&(X=X.directResolveAs,j={$ref:j}),af(X)&&p(j,X,ee,S,M)}}}else if(gt(S)){const ie=Object.keys(m.properties);m.additionalProperties?ie.push(...Object.keys(S).filter(V=>!ie.includes(V))):m.extensionsPrefix&&ie.push(...Object.keys(S).filter(V=>V.startsWith(m.extensionsPrefix))),w&&ie.push(...Object.keys(f).filter(V=>V!=="$ref"&&!ie.includes(V)));for(const V of ie){let M=S[V],ee=_;M===void 0&&(M=f[V],ee=g);let X=nm(m.properties,V);if(X===void 0&&(X=m.additionalProperties),typeof X=="function"&&(X=X(M,V)),X===void 0&&m.extensionsPrefix&&V.startsWith(m.extensionsPrefix)&&(X=qh),!af(X)&&X?.directResolveAs&&(X=X.directResolveAs,M={$ref:M}),X&&X.name===void 0&&X.resolvable!==!1&&(X={name:"scalar",properties:{}}),ki(f[V])&&X?.name==="scalar"){p(f[V],X,g.child([V]),f,V);continue}!af(X)||X.name==="scalar"&&!ki(M)||p(M,X,ee.child([V]),S,V)}}}const H=d[m.name]||(r[m.name]?.leave||[]).concat(c);for(const ie of B.reverse())if(ie.isSkippedLevel)ie.seen.delete(S);else if(ie.activatedOn=vW(ie.activatedOn),ie.parent){let V=ie.parent;for(;V;)V.activatedOn.value.nextLevelTypeActivated=vW(V.activatedOn.value.nextLevelTypeActivated),V=V.parent}for(const{context:ie,visit:V,ruleId:M,severity:ee,message:X}of H)!ie.isSkippedLevel&&I.has(ie)&&A(V,S,f,ie,M,ee,X)}if(O=g,w){const z=r.ref.leave;for(const{visit:F,ruleId:te,severity:B,context:se,message:H}of z)I.has(se)&&F(f,{report:V=>R(te,B,H,V),resolve:v,rawNode:f,rawLocation:x,location:g,type:m,parent:y,key:b,parentLocations:{},specVersion:o.specVersion,config:o.config,getVisitorData:()=>q(te)},{node:S,location:_,error:C})}function A(z,F,te,B,se,H,ie){z(F,{report:M=>R(se,H,ie,M),resolve:v,rawNode:te,location:O,rawLocation:x,type:m,parent:y,key:b,parentLocations:i3e(B),specVersion:o.specVersion,config:o.config,ignoreNextVisitorsOnNode:()=>{a.add(`${O.absolutePointer}${O.pointer}`)},getVisitorData:()=>q(se)},r3e(B),B)}function R(z,F,te,B){const H=(B.location?Array.isArray(B.location)?B.location:[B.location]:[{...O,reportOnKey:!1}]).map(V=>({...O,reportOnKey:!1,...V})),ie=B.forceSeverity||F;ie!=="off"&&o.problems.push({ruleId:B.ruleId||z,severity:ie,...B,message:te?te.replace("{{message}}",B.message):B.message,suggest:B.suggest||[],location:H})}function q(z){return o.visitorsData[z]=o.visitorsData[z]||{},o.visitorsData[z]}}}function o3e(t){return t.trim().split(/\s+/).map(e=>e.replace(/^[a-z]/,n=>n.toUpperCase())).join("")}function bW(t,e){switch(e){case"oas3":switch(t){case"Schema":return"schemas";case"Parameter":return"parameters";case"Response":return"responses";case"Example":return"examples";case"RequestBody":return"requestBodies";case"Header":return"headers";case"SecuritySchema":return"securitySchemes";case"Link":return"links";case"Callback":return"callbacks";case"MediaTypesMap":return"mediaTypes";default:return null}case"oas2":switch(t){case"Schema":return"definitions";case"Parameter":return"parameters";case"Response":return"responses";default:return null}case"async2":switch(t){case"Schema":return"schemas";case"Parameter":return"parameters";default:return null}case"async3":switch(t){case"Schema":return"schemas";case"Parameter":return"parameters";default:return null}case"arazzo1":switch(t){case"Root.workflows_items.parameters_items":case"Root.workflows_items.steps_items.parameters_items":return"parameters";default:return null}case"overlay1":return null;case"openrpc1":switch(t){case"ContentDescriptor":return"contentDescriptors";case"Schema":return"schemas";case"Example":return"examples";case"Link":return"links";case"ErrorObject":return"errors";case"ExamplePairing":return"examplePairingObjects";case"Tag":return"tags";default:return null}default:return null}}function s3e({version:t,dereference:e,rootDocument:n,resolvedRefMap:r,keepUrlRefs:i,componentRenamingConflicts:o="warn",componentNamesStrategy:s="basename"}){let a,l;const c=new Map,u=bW("Schema",t),d={ref:{leave(v,x,O){if(!O.location||O.node===void 0){Yg(O,x.report,x.location);return}if(O.location.source===n.source&&O.location.source===x.location.source&&x.type.name!=="scalar"&&!e){v.$ref!==O.location.pointer&&(v.$ref=O.location.pointer);return}if(i&&Ni(v.$ref))return;const w=bW(x.type.name,t);w?e?(f(w,O,x),ZN(v,O,x)):(v.$ref=f(w,O,x),p(v,O,x)):ZN(v,O,x)}},Example:{leave(v,x){if(toe(v)&&v.value===void 0){const O=x.resolve({$ref:v.externalValue});if(!O.location||O.node===void 0){Yg(O,x.report,x.location);return}if(i&&Ni(v.externalValue))return;v.value=x.resolve({$ref:v.externalValue}).node,delete v.externalValue}}},Root:{enter(v,x){l=x.location,t==="oas3"?a=v.components=v.components||{}:t==="oas2"?a=v:t==="async2"?a=v.components=v.components||{}:t==="async3"?a=v.components=v.components||{}:t==="arazzo1"?a=v.components=v.components||{}:t==="openrpc1"&&(a=v.components=v.components||{})}}};t==="oas3"&&(d.Discriminator={leave(v,x){if(typeof v.defaultMapping!="string"||!m0(v.defaultMapping))return;const O=x.resolve({$ref:v.defaultMapping});if(!O.location||O.node===void 0){Yg(O,x.report,x.location.child("defaultMapping"));return}v.defaultMapping=f(u,O,x)},DiscriminatorMapping:{leave(v,x){for(const O of Object.keys(v)){const w=v[O];if(!m0(w))continue;const S=x.resolve({$ref:w});if(!S.location||S.node===void 0){Yg(S,x.report,x.location.child(O));return}v[O]=f(u,S,x)}}}});function p(v,x,O){const w=jO(O.location.source.absoluteRef,v.$ref);r.set(w,{document:n,isRemote:!1,node:x.node,nodePointer:v.$ref,resolved:!0})}function f(v,x,O){a[v]=a[v]||{};const w=b(x,v,O);return a[v][w]=x.node,t==="oas3"||t==="async2"||t==="async3"||t==="openrpc1"?`#/components/${v}/${w}`:`#/${v}/${w}`}function m(v,x,O){return ki(v)&&O.resolve(v,l.absolutePointer).location?.absolutePointer===x.location.absolutePointer?!0:XN(v,x.node)}function g(v,x,O){const{node:w}=v,S=gt(w)&&Hs(w.title)?w.title.trim():"",_=o3e(S).replace(new RegExp(`[^${Foe}]`,"g"),"-"),C=v.location.child("title");return S===""?{key:_,problem:{message:"Schema must define a `title` when using `--component-names-strategy title`.",location:v.location,forceSeverity:"error"}}:x[_]&&!m(x[_],v,O)?{key:_,problem:{message:`Title "${S}" maps to component name \`${_}\`, already used by another schema. Rename one of the titles.`,location:C,from:c.get(_),forceSeverity:o}}:{key:_}}function y(v,x,O){const w=Fke(v.location.pointer)||Bke(v.location.source.absoluteRef);let S=w;for(let _=2;x[S]&&!m(x[S],v,O);_++)S=`${w}-${_}`;return{name:S,prevName:w}}function b(v,x,O){const w=a[x];if(s==="title"&&x===u){const{key:C,problem:I}=g(v,w,O);if(!I)return c.set(C,v.location.child("title")),C;const{name:A}=y(v,w,O);return w[A]||(O.report(I),c.set(A,v.location)),A}const{name:S,prevName:_}=y(v,w,O);return!w[S]&&_!==S&&O.report({message:`Two schemas are referenced with the same name but different content. Renamed ${_} to ${S}.`,location:O.location,forceSeverity:o}),S}return d}async function a3e(t){const{document:e,config:n,types:r,externalRefResolver:i,dereference:o=!1,removeUnusedComponents:s=!1,keepUrlRefs:a=!1,componentRenamingConflicts:l,componentNamesStrategy:c="basename"}=t,u=VP(e.parsed),d=eae(u),p=n.getRulesForSpecVersion(d),f=jq(n.extendTypes(r,u),n),m=y0(p,n,"preprocessors",u),g=y0(p,n,"decorators",u),y={problems:[],specVersion:u,config:n,refTypes:new Map,visitorsData:{}};let b=await Oy({rootDocument:e,rootType:f.Root,externalRefResolver:i});m.length>0&&(Vh({document:e,rootType:f.Root,normalizedVisitors:Uh(m,f),resolvedRefMap:b,ctx:y}),b=await Oy({rootDocument:e,rootType:f.Root,externalRefResolver:i}));const v=Uh([{severity:"error",ruleId:"bundler",visitor:s3e({version:d,dereference:o,rootDocument:e,resolvedRefMap:b,keepUrlRefs:a,componentRenamingConflicts:l,componentNamesStrategy:c})},...g.filter(x=>x.ruleId!=="remove-unused-components")],f);if(Vh({document:e,rootType:f.Root,normalizedVisitors:v,resolvedRefMap:b,ctx:y}),s||n.getDecoratorSettings("remove-unused-components",u).severity!=="off"){const x=await Oy({rootDocument:e,rootType:f.Root,externalRefResolver:i}),O=Uh([{severity:"error",ruleId:"remove-unused-components",visitor:d==="oas2"?Fse():Bse()}],f);Vh({document:e,rootType:f.Root,normalizedVisitors:O,resolvedRefMap:x,ctx:y})}return{bundle:e,problems:y.problems.map(x=>n.addProblemToIgnore(x)),fileDependencies:i.getFiles(),rootType:f.Root,refTypes:y.refTypes,visitorsData:y.visitorsData}}function l3e(t,e,n){const r={plugins:[],rootConfigDir:n},i={problems:[],specVersion:"config",refTypes:new Map,visitorsData:{[Ese]:r}};return Vh({document:t,rootType:Ux.ConfigRoot,normalizedVisitors:t3e,resolvedRefMap:e,ctx:i}),r.plugins}function c3e(t,e,n){const r={plugins:n},i={problems:[],specVersion:"config",refTypes:new Map,visitorsData:{[$se]:r}};return Vh({document:t,rootType:Ux.ConfigRoot,normalizedVisitors:n3e,resolvedRefMap:e,ctx:i}),t.parsed??{}}async function jle(t){const{ref:e,doc:n,externalRefResolver:r=new t$(t.config.resolve),base:i=null}=t;if(!(e||n))throw new Error(`Document or reference is required.
174
- `);const o=n===void 0?await r.resolveDocument(i,e,!0):n;if(o instanceof Error)throw o;return t.collectSpecData?.(o.parsed),a3e({document:o,...t,externalRefResolver:r,types:Wq(VP(o.parsed))})}function eR(t){return!Hs(t)}const S5=new Map,u3e="v";let d3e=0;function p3e(t){return S5.has(t)}function f3e(t){return S5.get(t)}function h3e(t,e){S5.set(t,e)}async function m3e(t){const e=(void 0)(t);return e.searchParams.set(u3e,String(d3e)),import(e.href)}async function g3e({rawConfigDocument:t,configPath:e,externalRefResolver:n,customExtends:r}){const i=t===void 0?qQe:t.parsed;if(r!==void 0&&gt(i)&&(i.extends=r),gt(i)&&(i?.extends?.some(eR)||i?.scorecardClassic?.levels?.some(p=>p?.extends?.some(eR))||i?.scorecard?.levels?.some(p=>p?.extends?.some(eR))))throw new Error("Configuration format not detected in extends: values must be strings.");const o=t??{source:new Fy(e??"",JSON.stringify(i)),parsed:i},s=await Oy({rootDocument:o,rootType:Ux.ConfigRoot,externalRefResolver:n??new t$(Ase(i?.resolve))});let a=[],l,c="";tl?l=[...(i?.plugins||[]).filter(f=>!Hs(f)),hW]:(c=yr.dirname(e??""),a=l3e(o,s,c),l=[...await v3e(a.map(f=>OW(f)?f.absolutePath:f),c),hW]);const u=c3e(o,J4e(s),l);u.apis&&(u.apis=Object.fromEntries(Object.entries(u.apis).map(([p,f])=>{const m=Ale([u,f]);return[p,{...f,...m}]})));const d=a.length?a.map(p=>OW(p)&&p.isModule?p.rawPath:p.absolutePath&&yr.relative(c,p.absolutePath)).filter(tm):void 0;return{resolvedConfig:{...u,plugins:d},resolvedRefMap:s,plugins:l}}function y3e(t){for(const e of VQe)(void 0)(yr.resolve(t,e))}function OW(t){return"isModule"in t}const Nle=(t,e,n)=>{if(!Hs(t))return t;(void 0)(yr.resolve(yr.dirname(e),t));try{return{absolutePath:Hie.createRequire((typeof document>"u"?require("url").pathToFileURL(__filename).href:fd&&fd.tagName.toUpperCase()==="SCRIPT"&&fd.src||new URL("replay-index-bPRpajHW.js",document.baseURI).href)??__dirname).resolve(t,{paths:[n,(typeof document>"u"?require("url").pathToFileURL(__filename).href:fd&&fd.tagName.toUpperCase()==="SCRIPT"&&fd.src||new URL("replay-index-bPRpajHW.js",document.baseURI).href)?yr.dirname((void 0)(typeof document>"u"?require("url").pathToFileURL(__filename).href:fd&&fd.tagName.toUpperCase()==="SCRIPT"&&fd.src||new URL("replay-index-bPRpajHW.js",document.baseURI).href)):__dirname]}),isModule:!0,rawPath:t}}catch{throw new Error(`Plugin "${t}" not found.`)}};async function v3e(t,e){if(!t)return[];const n=async a=>{if(!Hs(a))return a;try{const l=yr.isAbsolute(a)?a:Nle(a,yr.join(e,LQe),e).absolutePath;if(!p3e(l)){const c=await m3e(l),u=c.default||c,d={contentDir:e},p=Array.isArray(u)?u:[u];for(const g of p)g?.id&&gW(g)&&Vn.info(`Deprecated plugin format detected: ${g.id}
174
+ `);const o=n===void 0?await r.resolveDocument(i,e,!0):n;if(o instanceof Error)throw o;return t.collectSpecData?.(o.parsed),a3e({document:o,...t,externalRefResolver:r,types:Wq(VP(o.parsed))})}function eR(t){return!Hs(t)}const S5=new Map,u3e="v";let d3e=0;function p3e(t){return S5.has(t)}function f3e(t){return S5.get(t)}function h3e(t,e){S5.set(t,e)}async function m3e(t){const e=(void 0)(t);return e.searchParams.set(u3e,String(d3e)),import(e.href)}async function g3e({rawConfigDocument:t,configPath:e,externalRefResolver:n,customExtends:r}){const i=t===void 0?qQe:t.parsed;if(r!==void 0&&gt(i)&&(i.extends=r),gt(i)&&(i?.extends?.some(eR)||i?.scorecardClassic?.levels?.some(p=>p?.extends?.some(eR))||i?.scorecard?.levels?.some(p=>p?.extends?.some(eR))))throw new Error("Configuration format not detected in extends: values must be strings.");const o=t??{source:new Fy(e??"",JSON.stringify(i)),parsed:i},s=await Oy({rootDocument:o,rootType:Ux.ConfigRoot,externalRefResolver:n??new t$(Ase(i?.resolve))});let a=[],l,c="";tl?l=[...(i?.plugins||[]).filter(f=>!Hs(f)),hW]:(c=yr.dirname(e??""),a=l3e(o,s,c),l=[...await v3e(a.map(f=>OW(f)?f.absolutePath:f),c),hW]);const u=c3e(o,J4e(s),l);u.apis&&(u.apis=Object.fromEntries(Object.entries(u.apis).map(([p,f])=>{const m=Ale([u,f]);return[p,{...f,...m}]})));const d=a.length?a.map(p=>OW(p)&&p.isModule?p.rawPath:p.absolutePath&&yr.relative(c,p.absolutePath)).filter(tm):void 0;return{resolvedConfig:{...u,plugins:d},resolvedRefMap:s,plugins:l}}function y3e(t){for(const e of VQe)(void 0)(yr.resolve(t,e))}function OW(t){return"isModule"in t}const Nle=(t,e,n)=>{if(!Hs(t))return t;(void 0)(yr.resolve(yr.dirname(e),t));try{return{absolutePath:Hie.createRequire((typeof document>"u"?require("url").pathToFileURL(__filename).href:fd&&fd.tagName.toUpperCase()==="SCRIPT"&&fd.src||new URL("replay-index-B77jPAnD.js",document.baseURI).href)??__dirname).resolve(t,{paths:[n,(typeof document>"u"?require("url").pathToFileURL(__filename).href:fd&&fd.tagName.toUpperCase()==="SCRIPT"&&fd.src||new URL("replay-index-B77jPAnD.js",document.baseURI).href)?yr.dirname((void 0)(typeof document>"u"?require("url").pathToFileURL(__filename).href:fd&&fd.tagName.toUpperCase()==="SCRIPT"&&fd.src||new URL("replay-index-B77jPAnD.js",document.baseURI).href)):__dirname]}),isModule:!0,rawPath:t}}catch{throw new Error(`Plugin "${t}" not found.`)}};async function v3e(t,e){if(!t)return[];const n=async a=>{if(!Hs(a))return a;try{const l=yr.isAbsolute(a)?a:Nle(a,yr.join(e,LQe),e).absolutePath;if(!p3e(l)){const c=await m3e(l),u=c.default||c,d={contentDir:e},p=Array.isArray(u)?u:[u];for(const g of p)g?.id&&gW(g)&&Vn.info(`Deprecated plugin format detected: ${g.id}
175
175
  `);const f=gW(u)?u:e3e(u)?await u(d):await u?.default?.(d),m=Array.isArray(f)?f:[f];f&&h3e(l,m.map(g=>({...g,path:a,absolutePath:l})))}return f3e(l)}catch(l){throw new Error(`Failed to load plugin "${a}": ${l.message}
176
176
 
177
177
  ${l.stack}`)}},r=new Map,i=y3e(e);i&&t.push(i);const o=new Set;return(await Promise.all(t.map(async a=>{if(Hs(a)){if(Ni(a))throw new Error(Nn.red("We don't support remote plugins yet."));if(o.has(a))return;o.add(a)}const l=await n(a);if(!l)return;const c=Array.isArray(l)?l:[l];return(await Promise.all(c.map(async u=>{if(!u)return;const d=u.id;if(typeof d!="string")throw new Error(Nn.red(`Plugin must define \`id\` property in ${Nn.blue(a.toString())}.`));const p=u.absolutePath??a.toString(),f=r.get(d);if(f){if(p!==f)throw new Error(Nn.red(`Plugin "id" must be unique. Plugin ${Nn.blue(p)} uses id "${Nn.blue(d)}" already seen in ${Nn.blue(p)}`));return}r.set(d,p);const m={id:d,...u.configs?{configs:u.configs}:{},...u.typeExtension?{typeExtension:u.typeExtension}:{}};if(u.rules){if(!u.rules.oas3&&!u.rules.oas2&&!u.rules.async2&&!u.rules.async3&&!u.rules.arazzo1&&!u.rules.overlay1&&!u.rules.openrpc1&&!u.rules.graphql)throw new Error(`Plugin rules must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo\`, \`overlay1\`, \`openrpc1\`, or \`graphql\` rules "${a}.`);m.rules={},u.rules.oas3&&(m.rules.oas3=Ri(u.rules.oas3,d)),u.rules.oas2&&(m.rules.oas2=Ri(u.rules.oas2,d)),u.rules.async2&&(m.rules.async2=Ri(u.rules.async2,d)),u.rules.async3&&(m.rules.async3=Ri(u.rules.async3,d)),u.rules.arazzo1&&(m.rules.arazzo1=Ri(u.rules.arazzo1,d)),u.rules.overlay1&&(m.rules.overlay1=Ri(u.rules.overlay1,d)),u.rules.openrpc1&&(m.rules.openrpc1=Ri(u.rules.openrpc1,d)),u.rules.graphql&&(m.rules.graphql=Ri(u.rules.graphql,d))}if(u.preprocessors){if(!u.preprocessors.oas3&&!u.preprocessors.oas2&&!u.preprocessors.async2&&!u.preprocessors.async3&&!u.preprocessors.arazzo1&&!u.preprocessors.overlay1&&!u.preprocessors.openrpc1)throw new Error(`Plugin \`preprocessors\` must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo1\`, \`overlay1\`, or \`openrpc1\` preprocessors "${a}.`);m.preprocessors={},u.preprocessors.oas3&&(m.preprocessors.oas3=Ri(u.preprocessors.oas3,d)),u.preprocessors.oas2&&(m.preprocessors.oas2=Ri(u.preprocessors.oas2,d)),u.preprocessors.async2&&(m.preprocessors.async2=Ri(u.preprocessors.async2,d)),u.preprocessors.async3&&(m.preprocessors.async3=Ri(u.preprocessors.async3,d)),u.preprocessors.arazzo1&&(m.preprocessors.arazzo1=Ri(u.preprocessors.arazzo1,d)),u.preprocessors.overlay1&&(m.preprocessors.overlay1=Ri(u.preprocessors.overlay1,d)),u.preprocessors.openrpc1&&(m.preprocessors.openrpc1=Ri(u.preprocessors.openrpc1,d))}if(u.decorators){if(!u.decorators.oas3&&!u.decorators.oas2&&!u.decorators.async2&&!u.decorators.async3&&!u.decorators.arazzo1&&!u.decorators.overlay1&&!u.decorators.openrpc1)throw new Error(`Plugin \`decorators\` must have \`oas3\`, \`oas2\`, \`async2\`, \`async3\`, \`arazzo1\`, \`overlay1\`, or \`openrpc1\` decorators "${a}.`);m.decorators={},u.decorators.oas3&&(m.decorators.oas3=Ri(u.decorators.oas3,d)),u.decorators.oas2&&(m.decorators.oas2=Ri(u.decorators.oas2,d)),u.decorators.async2&&(m.decorators.async2=Ri(u.decorators.async2,d)),u.decorators.async3&&(m.decorators.async3=Ri(u.decorators.async3,d)),u.decorators.arazzo1&&(m.decorators.arazzo1=Ri(u.decorators.arazzo1,d)),u.decorators.overlay1&&(m.decorators.overlay1=Ri(u.decorators.overlay1,d)),u.decorators.openrpc1&&(m.decorators.openrpc1=Ri(u.decorators.openrpc1,d))}return u.assertions&&(m.assertions=u.assertions),{...u,...m}}))).filter(tm)}))).filter(tm).flat()}function b3e(t,e){const{pluginId:n,configName:r}=K4e(t),i=e.find(s=>s.id===n);if(!i)throw new Error(`Invalid config ${Nn.red(t)}: plugin ${n} is not included.`);const o=i.configs?.[r];if(!o)throw new Error(n?`Invalid config ${Nn.red(t)}: plugin ${n} doesn't export config with name ${r}.`:`Invalid config ${Nn.red(t)}: there is no such built-in config.`);return o}async function Mle(t,{configPath:e,externalRefResolver:n,ignore:r}={}){const o=Z4e(typeof t=="string"?t:"",e??"");typeof t!="string"&&t&&(o.parsed=t);const{resolvedConfig:s,resolvedRefMap:a,plugins:l}=await g3e({rawConfigDocument:O3e(o),configPath:e,externalRefResolver:n});return new zP(s,{configPath:e,document:o,resolvedRefMap:a,plugins:l,ignore:r})}function O3e(t){if(!t.parsed)return t;const{plugins:e,resolve:n,...r}=t.parsed,i={...structuredClone(r),plugins:e?.slice(),...n&&{resolve:{...n}}};return{...t,parsed:i}}var tR={},yc={},nR={},xW;function n$(){return xW||(xW=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e;(function(l){l[l.SCALAR=0]="SCALAR",l[l.MAPPING=1]="MAPPING",l[l.MAP=2]="MAP",l[l.SEQ=3]="SEQ",l[l.ANCHOR_REF=4]="ANCHOR_REF",l[l.INCLUDE_REF=5]="INCLUDE_REF"})(e=t.Kind||(t.Kind={}));function n(l,c){var u=c?c.endPosition:l.endPosition+1,d={key:l,value:c,startPosition:l.startPosition,endPosition:u,kind:e.MAPPING,parent:null,errors:[]};return d}t.newMapping=n;function r(l,c,u,d){return{errors:[],referencesAnchor:l,value:d,startPosition:c,endPosition:u,kind:e.ANCHOR_REF,parent:null}}t.newAnchorRef=r;function i(l){l===void 0&&(l="");var c={errors:[],startPosition:-1,endPosition:-1,value:""+l,kind:e.SCALAR,parent:null,doubleQuoted:!1,rawValue:""+l};return typeof l!="string"&&(c.valueObject=l),c}t.newScalar=i;function o(){return{errors:[],startPosition:-1,endPosition:-1,items:[],kind:e.SEQ,parent:null}}t.newItems=o;function s(){return o()}t.newSeq=s;function a(l){return{errors:[],startPosition:-1,endPosition:-1,mappings:l||[],kind:e.MAP,parent:null}}t.newMap=a})(nR)),nR}var xd={},wW;function Nv(){if(wW)return xd;wW=1,Object.defineProperty(xd,"__esModule",{value:!0});function t(s){return typeof s>"u"||s===null}xd.isNothing=t;function e(s){return typeof s=="object"&&s!==null}xd.isObject=e;function n(s){return Array.isArray(s)?s:t(s)?[]:[s]}xd.toArray=n;function r(s,a){var l,c,u,d;if(a)for(d=Object.keys(a),l=0,c=d.length;l<c;l+=1)u=d[l],s[u]=a[u];return s}xd.extend=r;function i(s,a){var l="",c;for(c=0;c<a;c+=1)l+=s;return l}xd.repeat=i;function o(s){return s===0&&Number.NEGATIVE_INFINITY===1/s}return xd.isNegativeZero=o,xd}var rR,SW;function Kx(){if(SW)return rR;SW=1;var t=(function(){function e(n,r,i){r===void 0&&(r=null),i===void 0&&(i=!1),this.name="YAMLException",this.reason=n,this.mark=r,this.message=this.toString(!1),this.isWarning=i}return e.isInstance=function(n){if(n!=null&&n.getClassIdentifier&&typeof n.getClassIdentifier=="function")for(var r=0,i=n.getClassIdentifier();r<i.length;r++){var o=i[r];if(o==e.CLASS_IDENTIFIER)return!0}return!1},e.prototype.getClassIdentifier=function(){var n=[];return n.concat(e.CLASS_IDENTIFIER)},e.prototype.toString=function(n){n===void 0&&(n=!1);var r;return r="JS-YAML: "+(this.reason||"(unknown reason)"),!n&&this.mark&&(r+=" "+this.mark.toString()),r},e.CLASS_IDENTIFIER="yaml-ast-parser.YAMLException",e})();return rR=t,rR}var iR,_W;function x3e(){if(_W)return iR;_W=1;var t=Nv(),e=(function(){function n(r,i,o,s,a){this.name=r,this.buffer=i,this.position=o,this.line=s,this.column=a}return n.prototype.getSnippet=function(r,i){r===void 0&&(r=0),i===void 0&&(i=75);var o,s,a,l,c;if(!this.buffer)return null;for(r=r||4,i=i||75,o="",s=this.position;s>0&&`\0\r
@@ -267,7 +267,7 @@ ${v.message}
267
267
  `:"",d=s.message+(c!==""||u!==""?`
268
268
 
269
269
  `:"")+c+u,p={title:s.ruleId,file:Ni(a.source.absoluteRef)?a.source.absoluteRef:yr.relative(e,a.source.absoluteRef),line:a.start.line,col:a.start.col,endLine:a.end?.line,endColumn:a.end?.col};Vn.output(`::${l} ${n(p)}::${i(d)}
270
- `)}function n(s){return Object.entries(s).filter(([,a])=>a!=null).map(([a,l])=>`${a}=${o(l)}`).join(",")}function r(s){return s==null?"":typeof s=="string"||s instanceof String?s:JSON.stringify(s)}function i(s){return r(s).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function o(s){return r(s).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}}const{theme:Zun,...Gun}=Bq.properties;async function aVe(t){const{ref:e,externalRefResolver:n=new t$(t.config.resolve)}=t,r=await n.resolveDocument(null,e,!0);return t.collectSpecData?.(r.parsed),lVe({document:r,...t,externalRefResolver:n})}async function lVe(t){const{document:e,customTypes:n,externalRefResolver:r,config:i}=t;if(x5(e.source.absoluteRef)){const{lintGraphqlDocument:f}=await Promise.resolve().then(()=>require("./replay-lint-graphql-Y42bxbeN.js"));return f({document:e,config:i})}const o=VP(e.parsed),s=i.getRulesForSpecVersion(eae(o)),a=jq(i.extendTypes(n??Wq(o),o),i),l={problems:[],specVersion:o,config:i,visitorsData:{}},c=y0(s,i,"preprocessors",o),u=y0(s,i,"rules",o);let d=await Oy({rootDocument:e,rootType:a.Root,externalRefResolver:r});c.length>0&&(Vh({document:e,rootType:a.Root,normalizedVisitors:Uh(c,a),resolvedRefMap:d,ctx:l}),d=await Oy({rootDocument:e,rootType:a.Root,externalRefResolver:r}));const p=Uh(u,a);return Vh({document:e,rootType:a.Root,normalizedVisitors:p,resolvedRefMap:d,ctx:l}),l.problems.map(f=>i.addProblemToIgnore(f))}const{env:kh={},argv:zle=[],platform:cVe=""}=typeof process>"u"?{}:process,uVe="NO_COLOR"in kh||zle.includes("--no-color"),dVe="FORCE_COLOR"in kh||zle.includes("--color"),pVe=cVe==="win32",fVe=kh.TERM==="dumb",hVe=Aq&&void 0,mVe="CI"in kh&&("GITHUB_ACTIONS"in kh||"GITLAB_CI"in kh||"CIRCLECI"in kh),gVe=!uVe&&(dVe||pVe&&!fVe||hVe||mVe),Ule=(t,e,n,r,i=e.substring(0,t)+r,o=e.substring(t+n.length),s=o.indexOf(n))=>i+(s<0?o:Ule(s,o,n,r)),yVe=(t,e,n,r,i)=>t<0?n+e+r:n+Ule(t,e,r,i)+r,vVe=(t,e,n=t,r=t.length+1)=>i=>i||!(i===""||i===void 0)?yVe((""+i).indexOf(e,r),i,t,e,n):"",On=(t,e,n)=>vVe(`\x1B[${t}m`,`\x1B[${e}m`,n),r7={reset:On(0,0),bold:On(1,22,"\x1B[22m\x1B[1m"),dim:On(2,22,"\x1B[22m\x1B[2m"),italic:On(3,23),underline:On(4,24),inverse:On(7,27),hidden:On(8,28),strikethrough:On(9,29),black:On(30,39),red:On(31,39),green:On(32,39),yellow:On(33,39),blue:On(34,39),magenta:On(35,39),cyan:On(36,39),white:On(37,39),gray:On(90,39),bgBlack:On(40,49),bgRed:On(41,49),bgGreen:On(42,49),bgYellow:On(43,49),bgBlue:On(44,49),bgMagenta:On(45,49),bgCyan:On(46,49),bgWhite:On(47,49),blackBright:On(90,39),redBright:On(91,39),greenBright:On(92,39),yellowBright:On(93,39),blueBright:On(94,39),magentaBright:On(95,39),cyanBright:On(96,39),whiteBright:On(97,39),bgBlackBright:On(100,49),bgRedBright:On(101,49),bgGreenBright:On(102,49),bgYellowBright:On(103,49),bgBlueBright:On(104,49),bgMagentaBright:On(105,49),bgCyanBright:On(106,49),bgWhiteBright:On(107,49)},bVe=({useColor:t=gVe}={})=>t?r7:Object.keys(r7).reduce((e,n)=>({...e,[n]:String}),{}),{reset:Yun,bold:OVe,dim:xVe,italic:Hun,underline:wVe,inverse:SVe,hidden:Kun,strikethrough:Jun,black:edn,red:Hg,green:_Ve,yellow:CVe,blue:TVe,magenta:tdn,cyan:ndn,white:IVe,gray:kVe,bgBlack:rdn,bgRed:PVe,bgGreen:idn,bgYellow:odn,bgBlue:sdn,bgMagenta:adn,bgCyan:ldn,bgWhite:cdn,blackBright:udn,redBright:ddn,greenBright:pdn,yellowBright:fdn,blueBright:hdn,magentaBright:mdn,cyanBright:gdn,whiteBright:ydn,bgBlackBright:vdn,bgRedBright:bdn,bgGreenBright:Odn,bgYellowBright:xdn,bgBlueBright:wdn,bgMagentaBright:Sdn,bgCyanBright:_dn,bgWhiteBright:Cdn}=bVe(),$Ve=t=>/\{.*?\}/.test(t);function S0({value:t,ctx:e,logger:n}){if(!t)return t;if(gt(t)){const r={};for(const i in t)r[i]=S0({value:t[i],ctx:e,logger:n});return r}else if(Array.isArray(t))return t.map(r=>S0({value:r,ctx:e,logger:n}));return typeof t!="string"?t:t.startsWith("$faker.")?_0({pointer:t.slice(1),ctx:e,logger:n}):$Ve(t)?MVe(t,e,n):QVe(t,e,n)}function EVe(t,e,n){const r=t.indexOf("{");if(r!==-1){const o=t.substring(r+1).slice(0,-1),s=_0({pointer:o.slice(1),ctx:e,logger:n});return s&&t.replace(/{(.*)}/,s)}else return t}const Vle=new Set(["__proto__","constructor","prototype"]),AVe=/^[a-zA-Z_][a-zA-Z0-9_-]*$/;class RVe{src;pos=0;constructor(e){this.src=e}parseArguments(){if(this.skipWhitespace(),this.pos>=this.src.length)return[];const e=this.parseValue();if(this.skipWhitespace(),this.pos<this.src.length)throw new Error(`Unexpected token "${this.src[this.pos]}" in faker arguments`);return[e]}parseValue(){this.skipWhitespace();const e=this.src[this.pos];if(e==="{")return this.parseObject();if(e==='"'||e==="'")return this.parseString(e);if(e==="-"||e>="0"&&e<="9")return this.parseNumber();throw new Error(`Unexpected token "${e}" in faker arguments`)}parseObject(){this.pos++;const e={};if(this.skipWhitespace(),this.src[this.pos]==="}")return this.pos++,e;for(;;){this.skipWhitespace();const n=this.parseKey();if(this.skipWhitespace(),this.src[this.pos]!==":")throw new Error('Expected ":" in faker arguments object');this.pos++;const r=this.parseValue();Vle.has(n)||(e[n]=r),this.skipWhitespace();const i=this.src[this.pos];if(i===",")this.pos++,this.skipWhitespace();else{if(i==="}")return this.pos++,e;throw new Error('Expected "," or "}" in faker arguments object')}if(this.src[this.pos]==="}")return this.pos++,e}}parseKey(){const e=this.src[this.pos];if(e==='"'||e==="'")return this.parseString(e);const n=this.pos;for(;this.pos<this.src.length&&/[a-zA-Z0-9_$]/.test(this.src[this.pos]);)this.pos++;if(this.pos===n)throw new Error("Expected property name in faker arguments object");return this.src.slice(n,this.pos)}parseString(e){this.pos++;let n="";for(;this.pos<this.src.length;){const r=this.src[this.pos++];if(r==="\\")n+=this.src[this.pos++]??"";else{if(r===e)return n;n+=r}}throw new Error("Unterminated string in faker arguments")}parseNumber(){const e=this.pos;for(this.src[this.pos]==="-"&&this.pos++;this.pos<this.src.length&&/[0-9.]/.test(this.src[this.pos]);)this.pos++;const n=this.src.slice(e,this.pos),r=Number(n);if(Number.isNaN(r))throw new Error(`Invalid number "${n}" in faker arguments`);return r}skipWhitespace(){for(;this.pos<this.src.length&&/\s/.test(this.src[this.pos]);)this.pos++}}function jVe(t){const e=[];let n="",r=null,i=0;for(let o=0;o<t.length;o++){const s=t[o];if(r){n+=s,s==="\\"?n+=t[++o]??"":s===r&&(r=null);continue}if(s==='"'||s==="'")r=s;else if(s==="(")i++;else if(s===")")i--;else if(s==="."&&i===0){e.push(n.trim()),n="";continue}n+=s}return e.push(n.trim()),e}function NVe(t,e){const n=e.match(/^([^()]+)\((.*)\)$/s),r=(n?n[1]:e).trim();if(!AVe.test(r)||Vle.has(r))throw new Error(`Unsupported faker reference: "${r}"`);if(t==null||!Object.prototype.hasOwnProperty.call(t,r))throw new Error(`Unknown faker reference: "${r}"`);const i=t[r];if(n){if(typeof i!="function")throw new Error(`Faker reference "${r}" is not callable`);const o=new RVe(n[2]).parseArguments();return i.apply(t,o)}return i}function MVe(t,e,n){const r=/\{\$(\{[^{}]*\}|[^{}])*\}/g;let i=t;return i=i.replace(r,(o,s)=>DVe(o,e,n)),i}function DVe(t,e,n){if(!t.includes("$"))return t;if(t.includes("$faker."))return EVe(t,e,n);const r=NO(e)(LVe(t));return r!==void 0?r:""}const QVe=(t,e,n)=>{if(!t)return t;const r=t.toString();if(!r.includes("$"))return t;if(r.startsWith("$file(")&&r.endsWith(")"))return r.slice(7,-2);if(r.startsWith("$sourceDescriptions.")&&r.includes(".workflows.")){const i=r.split("."),o=i[1],s=i[3];if(!o||!s)return;const a=NO(e)("$sourceDescriptions");return a[o]?a[o].workflows.find(l=>l.workflowId===s):void 0}return r&&r.trim().startsWith("faker.")?_0({pointer:r,ctx:e,logger:n}):r?NO(e)(i7(r)):r.replace(/\$\{([^}]+)}/g,(i,o)=>NO(e)(i7(o)))};function LVe(t){return t.replace(/\{(.*)\}/,"$1")}function i7(t){return t.replace(/\['(.*?)'\]/g,".$1")}const NO=(t,e="")=>n=>{if(e||(e=n),!n)return t;const[r,...i]=n.split(".");if(!t)throw Error(`Cannot get ${Hg(r)} from ${Hg(e)}`);if(t?.[r]===void 0){const o=` Undefined ${Hg(r)} at ${Hg(e)}.`,s=Object.keys(t).length?`Did you mean to use another key? Available keys:
270
+ `)}function n(s){return Object.entries(s).filter(([,a])=>a!=null).map(([a,l])=>`${a}=${o(l)}`).join(",")}function r(s){return s==null?"":typeof s=="string"||s instanceof String?s:JSON.stringify(s)}function i(s){return r(s).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function o(s){return r(s).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}}const{theme:Zun,...Gun}=Bq.properties;async function aVe(t){const{ref:e,externalRefResolver:n=new t$(t.config.resolve)}=t,r=await n.resolveDocument(null,e,!0);return t.collectSpecData?.(r.parsed),lVe({document:r,...t,externalRefResolver:n})}async function lVe(t){const{document:e,customTypes:n,externalRefResolver:r,config:i}=t;if(x5(e.source.absoluteRef)){const{lintGraphqlDocument:f}=await Promise.resolve().then(()=>require("./replay-lint-graphql-Ddq5ITmY.js"));return f({document:e,config:i})}const o=VP(e.parsed),s=i.getRulesForSpecVersion(eae(o)),a=jq(i.extendTypes(n??Wq(o),o),i),l={problems:[],specVersion:o,config:i,visitorsData:{}},c=y0(s,i,"preprocessors",o),u=y0(s,i,"rules",o);let d=await Oy({rootDocument:e,rootType:a.Root,externalRefResolver:r});c.length>0&&(Vh({document:e,rootType:a.Root,normalizedVisitors:Uh(c,a),resolvedRefMap:d,ctx:l}),d=await Oy({rootDocument:e,rootType:a.Root,externalRefResolver:r}));const p=Uh(u,a);return Vh({document:e,rootType:a.Root,normalizedVisitors:p,resolvedRefMap:d,ctx:l}),l.problems.map(f=>i.addProblemToIgnore(f))}const{env:kh={},argv:zle=[],platform:cVe=""}=typeof process>"u"?{}:process,uVe="NO_COLOR"in kh||zle.includes("--no-color"),dVe="FORCE_COLOR"in kh||zle.includes("--color"),pVe=cVe==="win32",fVe=kh.TERM==="dumb",hVe=Aq&&void 0,mVe="CI"in kh&&("GITHUB_ACTIONS"in kh||"GITLAB_CI"in kh||"CIRCLECI"in kh),gVe=!uVe&&(dVe||pVe&&!fVe||hVe||mVe),Ule=(t,e,n,r,i=e.substring(0,t)+r,o=e.substring(t+n.length),s=o.indexOf(n))=>i+(s<0?o:Ule(s,o,n,r)),yVe=(t,e,n,r,i)=>t<0?n+e+r:n+Ule(t,e,r,i)+r,vVe=(t,e,n=t,r=t.length+1)=>i=>i||!(i===""||i===void 0)?yVe((""+i).indexOf(e,r),i,t,e,n):"",On=(t,e,n)=>vVe(`\x1B[${t}m`,`\x1B[${e}m`,n),r7={reset:On(0,0),bold:On(1,22,"\x1B[22m\x1B[1m"),dim:On(2,22,"\x1B[22m\x1B[2m"),italic:On(3,23),underline:On(4,24),inverse:On(7,27),hidden:On(8,28),strikethrough:On(9,29),black:On(30,39),red:On(31,39),green:On(32,39),yellow:On(33,39),blue:On(34,39),magenta:On(35,39),cyan:On(36,39),white:On(37,39),gray:On(90,39),bgBlack:On(40,49),bgRed:On(41,49),bgGreen:On(42,49),bgYellow:On(43,49),bgBlue:On(44,49),bgMagenta:On(45,49),bgCyan:On(46,49),bgWhite:On(47,49),blackBright:On(90,39),redBright:On(91,39),greenBright:On(92,39),yellowBright:On(93,39),blueBright:On(94,39),magentaBright:On(95,39),cyanBright:On(96,39),whiteBright:On(97,39),bgBlackBright:On(100,49),bgRedBright:On(101,49),bgGreenBright:On(102,49),bgYellowBright:On(103,49),bgBlueBright:On(104,49),bgMagentaBright:On(105,49),bgCyanBright:On(106,49),bgWhiteBright:On(107,49)},bVe=({useColor:t=gVe}={})=>t?r7:Object.keys(r7).reduce((e,n)=>({...e,[n]:String}),{}),{reset:Yun,bold:OVe,dim:xVe,italic:Hun,underline:wVe,inverse:SVe,hidden:Kun,strikethrough:Jun,black:edn,red:Hg,green:_Ve,yellow:CVe,blue:TVe,magenta:tdn,cyan:ndn,white:IVe,gray:kVe,bgBlack:rdn,bgRed:PVe,bgGreen:idn,bgYellow:odn,bgBlue:sdn,bgMagenta:adn,bgCyan:ldn,bgWhite:cdn,blackBright:udn,redBright:ddn,greenBright:pdn,yellowBright:fdn,blueBright:hdn,magentaBright:mdn,cyanBright:gdn,whiteBright:ydn,bgBlackBright:vdn,bgRedBright:bdn,bgGreenBright:Odn,bgYellowBright:xdn,bgBlueBright:wdn,bgMagentaBright:Sdn,bgCyanBright:_dn,bgWhiteBright:Cdn}=bVe(),$Ve=t=>/\{.*?\}/.test(t);function S0({value:t,ctx:e,logger:n}){if(!t)return t;if(gt(t)){const r={};for(const i in t)r[i]=S0({value:t[i],ctx:e,logger:n});return r}else if(Array.isArray(t))return t.map(r=>S0({value:r,ctx:e,logger:n}));return typeof t!="string"?t:t.startsWith("$faker.")?_0({pointer:t.slice(1),ctx:e,logger:n}):$Ve(t)?MVe(t,e,n):QVe(t,e,n)}function EVe(t,e,n){const r=t.indexOf("{");if(r!==-1){const o=t.substring(r+1).slice(0,-1),s=_0({pointer:o.slice(1),ctx:e,logger:n});return s&&t.replace(/{(.*)}/,s)}else return t}const Vle=new Set(["__proto__","constructor","prototype"]),AVe=/^[a-zA-Z_][a-zA-Z0-9_-]*$/;class RVe{src;pos=0;constructor(e){this.src=e}parseArguments(){if(this.skipWhitespace(),this.pos>=this.src.length)return[];const e=this.parseValue();if(this.skipWhitespace(),this.pos<this.src.length)throw new Error(`Unexpected token "${this.src[this.pos]}" in faker arguments`);return[e]}parseValue(){this.skipWhitespace();const e=this.src[this.pos];if(e==="{")return this.parseObject();if(e==='"'||e==="'")return this.parseString(e);if(e==="-"||e>="0"&&e<="9")return this.parseNumber();throw new Error(`Unexpected token "${e}" in faker arguments`)}parseObject(){this.pos++;const e={};if(this.skipWhitespace(),this.src[this.pos]==="}")return this.pos++,e;for(;;){this.skipWhitespace();const n=this.parseKey();if(this.skipWhitespace(),this.src[this.pos]!==":")throw new Error('Expected ":" in faker arguments object');this.pos++;const r=this.parseValue();Vle.has(n)||(e[n]=r),this.skipWhitespace();const i=this.src[this.pos];if(i===",")this.pos++,this.skipWhitespace();else{if(i==="}")return this.pos++,e;throw new Error('Expected "," or "}" in faker arguments object')}if(this.src[this.pos]==="}")return this.pos++,e}}parseKey(){const e=this.src[this.pos];if(e==='"'||e==="'")return this.parseString(e);const n=this.pos;for(;this.pos<this.src.length&&/[a-zA-Z0-9_$]/.test(this.src[this.pos]);)this.pos++;if(this.pos===n)throw new Error("Expected property name in faker arguments object");return this.src.slice(n,this.pos)}parseString(e){this.pos++;let n="";for(;this.pos<this.src.length;){const r=this.src[this.pos++];if(r==="\\")n+=this.src[this.pos++]??"";else{if(r===e)return n;n+=r}}throw new Error("Unterminated string in faker arguments")}parseNumber(){const e=this.pos;for(this.src[this.pos]==="-"&&this.pos++;this.pos<this.src.length&&/[0-9.]/.test(this.src[this.pos]);)this.pos++;const n=this.src.slice(e,this.pos),r=Number(n);if(Number.isNaN(r))throw new Error(`Invalid number "${n}" in faker arguments`);return r}skipWhitespace(){for(;this.pos<this.src.length&&/\s/.test(this.src[this.pos]);)this.pos++}}function jVe(t){const e=[];let n="",r=null,i=0;for(let o=0;o<t.length;o++){const s=t[o];if(r){n+=s,s==="\\"?n+=t[++o]??"":s===r&&(r=null);continue}if(s==='"'||s==="'")r=s;else if(s==="(")i++;else if(s===")")i--;else if(s==="."&&i===0){e.push(n.trim()),n="";continue}n+=s}return e.push(n.trim()),e}function NVe(t,e){const n=e.match(/^([^()]+)\((.*)\)$/s),r=(n?n[1]:e).trim();if(!AVe.test(r)||Vle.has(r))throw new Error(`Unsupported faker reference: "${r}"`);if(t==null||!Object.prototype.hasOwnProperty.call(t,r))throw new Error(`Unknown faker reference: "${r}"`);const i=t[r];if(n){if(typeof i!="function")throw new Error(`Faker reference "${r}" is not callable`);const o=new RVe(n[2]).parseArguments();return i.apply(t,o)}return i}function MVe(t,e,n){const r=/\{\$(\{[^{}]*\}|[^{}])*\}/g;let i=t;return i=i.replace(r,(o,s)=>DVe(o,e,n)),i}function DVe(t,e,n){if(!t.includes("$"))return t;if(t.includes("$faker."))return EVe(t,e,n);const r=NO(e)(LVe(t));return r!==void 0?r:""}const QVe=(t,e,n)=>{if(!t)return t;const r=t.toString();if(!r.includes("$"))return t;if(r.startsWith("$file(")&&r.endsWith(")"))return r.slice(7,-2);if(r.startsWith("$sourceDescriptions.")&&r.includes(".workflows.")){const i=r.split("."),o=i[1],s=i[3];if(!o||!s)return;const a=NO(e)("$sourceDescriptions");return a[o]?a[o].workflows.find(l=>l.workflowId===s):void 0}return r&&r.trim().startsWith("faker.")?_0({pointer:r,ctx:e,logger:n}):r?NO(e)(i7(r)):r.replace(/\$\{([^}]+)}/g,(i,o)=>NO(e)(i7(o)))};function LVe(t){return t.replace(/\{(.*)\}/,"$1")}function i7(t){return t.replace(/\['(.*?)'\]/g,".$1")}const NO=(t,e="")=>n=>{if(e||(e=n),!n)return t;const[r,...i]=n.split(".");if(!t)throw Error(`Cannot get ${Hg(r)} from ${Hg(e)}`);if(t?.[r]===void 0){const o=` Undefined ${Hg(r)} at ${Hg(e)}.`,s=Object.keys(t).length?`Did you mean to use another key? Available keys:
271
271
  ${Object.keys(t).join(", ")}.
272
272
  `:"",a=`${o} ${s}`;throw Error(a)}return NO(t[r],e)(i.join("."))};function _0({pointer:t,ctx:e,logger:n}){const r=jVe(t);try{if(r[0]!=="faker")throw new Error(`Unsupported faker reference: "${r[0]}"`);return r.slice(1).reduce((i,o)=>NVe(i,o),e.$faker)}catch(i){n.error(Hg(i.toString()));return}}function Fle(t,e,n){if(typeof t=="string"&&t)return S0({value:t,ctx:e,logger:n});if(!(typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t>"u"||t instanceof Blob||t===null))for(const r in t)typeof t[r]=="string"?t[r]&&(t[r]=S0({value:t[r],ctx:e,logger:n})):Fle(t[r],e,n)}function o7(t,e,n){return Fle(t,e,n)||t}function qVe(t,e){if(!t)return;const n={};for(const r in e)n[`{${r}}`]=String(e[r]);return t.split(/(\{[a-zA-Z0-9_.-]+\}+)/g).map(r=>n[r]?n[r]:r).join("")}var kR,s7;function zVe(){if(s7)return kR;s7=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString;return kR=function(r,i,o){if(e.call(i)!=="[object Function]")throw new TypeError("iterator must be a function");var s=r.length;if(s===+s)for(var a=0;a<s;a++)i.call(o,r[a],a,r);else for(var l in r)t.call(r,l)&&i.call(o,r[l],l,r)},kR}var PR,a7;function UVe(){if(a7)return PR;a7=1;var t=zVe();PR=e;function e(n,r,i){if(arguments.length===3)return e.set(n,r,i);if(arguments.length===2)return e.get(n,r);var o=e.bind(e,n);for(var s in e)e.hasOwnProperty(s)&&(o[s]=e[s].bind(o,n));return o}return e.get=function(r,i){for(var o=Array.isArray(i)?i:e.parse(i),s=0;s<o.length;++s){var a=o[s];if(!(typeof r=="object"&&a in r))throw new Error("Invalid reference token: "+a);r=r[a]}return r},e.set=function(r,i,o){var s=Array.isArray(i)?i:e.parse(i),a=s[0];if(s.length===0)throw Error("Can not set the root object");for(var l=0;l<s.length-1;++l){var c=s[l];typeof c!="string"&&typeof c!="number"&&(c=String(c)),!(c==="__proto__"||c==="constructor"||c==="prototype")&&(c==="-"&&Array.isArray(r)&&(c=r.length),a=s[l+1],c in r||(a.match(/^(\d+|-)$/)?r[c]=[]:r[c]={}),r=r[c])}return a==="-"&&Array.isArray(r)&&(a=r.length),r[a]=o,this},e.remove=function(n,r){var i=Array.isArray(r)?r:e.parse(r),o=i[i.length-1];if(o===void 0)throw new Error('Invalid JSON pointer for remove: "'+r+'"');var s=e.get(n,i.slice(0,-1));if(Array.isArray(s)){var a=+o;if(o===""&&isNaN(a))throw new Error('Invalid array index: "'+o+'"');Array.prototype.splice.call(s,a,1)}else delete s[o]},e.dict=function(r,i){var o={};return e.walk(r,function(s,a){o[a]=s},i),o},e.walk=function(r,i,o){var s=[];o=o||function(a){var l=Object.prototype.toString.call(a);return l==="[object Object]"||l==="[object Array]"},(function a(l){t(l,function(c,u){s.push(String(u)),o(c)?a(c):i(c,e.compile(s)),s.pop()})})(r)},e.has=function(r,i){try{e.get(r,i)}catch{return!1}return!0},e.escape=function(r){return r.toString().replace(/~/g,"~0").replace(/\//g,"~1")},e.unescape=function(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")},e.parse=function(r){if(r==="")return[];if(r.charAt(0)!=="/")throw new Error("Invalid JSON pointer: "+r);return r.substring(1).split(/\//).map(e.unescape)},e.compile=function(r){return r.length===0?"":"/"+r.map(e.escape).join("/")},PR}var VVe=UVe();const C0=Fo(VVe);function Ble(t){try{return Zle(t)}catch{throw new Error(`Runtime expression is not valid: ${t}`)}}function FVe(t,e){const n=[{pattern:/\$response\.body#\/([\w/-]+)/g,ctxFunction:(i,o)=>Tb(e.$response?.body,o,i)},{pattern:/\$request\.body#\/([\w/-]+)/g,ctxFunction:(i,o)=>Tb(e.$request?.body,o,i)},{pattern:/\$outputs\.([\w-]+)#\/([\w/-]+)/g,ctxFunction:(i,o,s)=>Tb(e.$outputs?.[o],s,i)},{pattern:/\$workflows\.([\w-]+)\.outputs\.([\w-]+)#\/([\w/-]+)/g,ctxFunction:(i,o,s,a)=>Tb(e.$workflows?.[o]?.outputs?.[s],a,i)},{pattern:/\$steps\.([\w-]+)\.outputs\.([\w-]+)#\/([\w/-]+)/g,ctxFunction:(i,o,s,a)=>Tb(e.$steps?.[o]?.outputs?.[s],a,i)}];let r=t;for(const{pattern:i,ctxFunction:o}of n)r=r.replaceAll(i,o);return r}function Tb(t,e,n){if(t)try{const r=C0.get(t,`/${e}`);return typeof r=="string"||Array.isArray(r)||gt(r)?JSON.stringify(r):r!==void 0?r:n}catch{return n}return n}function MC({payload:t,context:e,contentType:n,logger:r}){if(n?.includes("application/octet-stream"))return o7(t,e,r);if(n?.includes("multipart/form-data")){if(t instanceof FormData){const i=new FormData;for(const[o,s]of t.entries())if(s instanceof File)i.append(o,s);else{const a=MC({payload:s,context:e,logger:r});i.append(o,a)}return i}return o7(t,e,r)}return typeof t=="string"?KVe(t)?By(t,e,r):HVe(t,e,r):gt(t)?Object.entries(t).reduce((i,[o,s])=>(i[o]=MC({payload:s,context:e,logger:r}),i),{}):Array.isArray(t)?t.map(i=>MC({payload:i,context:e,logger:r})):t}function By(t,e,n){return typeof t=="string"?BVe(t,e,n):gt(t)?Object.entries(t).reduce((r,[i,o])=>(r[i]=o&&By(o,e,n),r),{}):Array.isArray(t)?t.map(r=>By(r,e,n)):t}function BVe(t,e,n){if(/^\$faker\.[a-zA-Z0-9._-]+(\([^\\)]*\))?$/.test(t))return _0({pointer:t.slice(1),ctx:e,logger:n});if(t.includes("$faker.")){const o=/\$faker\.[a-zA-Z0-9._-]+(\([^\\)]*\))?/g;t=t.replace(o,s=>_0({pointer:s.slice(1),ctx:e,logger:n})).replace(/{(.*?)}/g,"$1")}if(!t.includes("$")&&!/[=<>]/.test(t))return t;Ble(t);const r=XVe(t,e),i=ZVe(e);try{return new Function(...Object.keys(i),`return ${r};`)(...Object.values(i))}catch{throw new Error(`Error in resolving runtime expression '${t}'.
273
273
  This could be because the expression references a value from a previous failed step, or is trying to reference a variable that hasn't been set.`)}}function WVe(t){return t.replace(/\$([a-zA-Z0-9._-]+)/g,(e,n)=>`$${n.replace(/-/g,"_")}`)}function XVe(t,e){const n=FVe(t,e);let i=WVe(n);if(i.startsWith("{")&&i.endsWith("}")){const l=i.slice(1,-1);!l.trim().startsWith("{")&&!l.trim().startsWith("[")&&(i=l)}const o=YVe(i),s=/\.header\.([a-zA-Z0-9._-]+)/g;return o.replace(s,(l,c)=>`.header.${c.toLowerCase()}`)}function ZVe(t){const e={};for(const[n,r]of Object.entries(t)){const i=n.replace(/-/g,"_");e[i]=Wle(r)}return e}function Wle(t){return Array.isArray(t)?t:gt(t)?GVe(t):t}function GVe(t){return Object.keys(t).reduce((e,n)=>{const r=n.replace(/-/g,"_");return e[r]=Wle(t[n]),e},{})}function YVe(t){return t.replace(/\.(\d+)/g,(e,n,r,i)=>{const o=i[r-1];return/\d/.test(o)?e:`[${n}]`})}function HVe(t,e,n){const r=/\{(?:[^{}]|\{[^{}]*\})*\}|\$[^\s{}]+(?:\([^()]*\))*/g;return t.replace(r,i=>{const o=i.trim();if(!Xle(o)&&!o.includes("$faker."))return i;const s=By(o,e,n);return s!==void 0?s:i})}function KVe(t){const e=t.trim();return e.startsWith("$faker.")?!0:e.startsWith("$")&&!/\s/.test(e)||e.startsWith("{")&&e.endsWith("}")?Xle(e):!1}function Xle(t){try{return Ble(t),!0}catch{return!1}}const Zle=eke;function gI(t){try{return Zle(t),!0}catch{return!1}}function JVe(t){if(!t||typeof t!="string")return null;const e=t.trim();return e.startsWith("{")&&e.endsWith("}")&&e.length>2?e.slice(1,-1):e}function gM(t){return t.startsWith("{")&&t.endsWith("}")?t.slice(1,-1).split(".")[0].substring(1):t.startsWith("$")?t.split(".")[0].substring(1):""}function l7(t,e){return e?e.include&&e.include.length>0?e.include.includes(t):e.exclude&&e.exclude.length>0?!e.exclude.includes(t):!0:!0}function ew(t,e){const n=[];if(t.startsWith("$")&&gI(t)){const i=gM(t);return l7(i,e)&&n.push({match:t,prefix:i,start:0,end:t.length}),n}let r=0;for(;r<t.length;)if(t[r]==="{"){const i=r;let o=1,s=r+1;for(;s<t.length&&o>0;)t[s]==="{"?o++:t[s]==="}"&&o--,s++;if(o===0){const a=t.slice(i,s),l=JVe(a);if(l&&gI(l)){const c=gM(l);l7(c,e)&&n.push({match:a,prefix:c,start:i,end:s})}r=s}else r++}else r++;return n}function eFe(t){const e=[];let n=0;for(;n<t.length;)if(t[n]==="$"){const r=n;let i=n+1;for(;i<t.length&&!yM(t[i]);)i++;const o=t.slice(r,i);if(o&&gI(o)){const s=gM(o);e.push({match:o,prefix:s,start:r,end:i})}n=i}else n++;return e}function tFe(t){const e=["<=",">=","==","!=","&&","||","<",">","!"],n=[],r=new Set(["[","]","(",")"]);for(let i=0;i<t.length;i++){const o=t[i];if(r.has(o)){n.push({match:o,prefix:"",start:i,end:i+1});continue}let s=null;for(const a of e)if(t.startsWith(a,i)){s=a;break}if(s&&yM(t[i-1])&&yM(t[i+s.length])){n.push({match:s,prefix:"operator",start:i,end:i+s.length}),i+=s.length-1;continue}}return n.length?n:null}const yM=t=>t===void 0?!0:/\s/.test(t)||"()".includes(t);var $R={exports:{}};var c7;function nFe(){return c7||(c7=1,(function(t){(function(){var e={}.hasOwnProperty;function n(){for(var o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=i(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)e.call(o,a)&&o[a]&&(s=i(s,a));return s}function i(o,s){return s?o?o+" "+s:o+s:o}t.exports?(n.default=n,t.exports=n):window.classNames=n})()})($R)),$R.exports}var rFe=nFe();const Du=Fo(rFe);function iFe(t){var e=t.children,n=t.prefixCls,r=t.id,i=t.overlayInnerStyle,o=t.bodyClassName,s=t.className,a=t.style;return _e.createElement("div",{className:Du("".concat(n,"-content"),s),style:a},_e.createElement("div",{className:Du("".concat(n,"-inner"),o),id:r,role:"tooltip",style:i},typeof e=="function"?e():e))}function T0(){return T0=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)({}).hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},T0.apply(null,arguments)}function I0(t){"@babel/helpers - typeof";return I0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I0(t)}function oFe(t,e){if(I0(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(I0(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function sFe(t){var e=oFe(t,"string");return I0(e)=="symbol"?e:e+""}function aFe(t,e,n){return(e=sFe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function u7(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function eh(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?u7(Object(n),!0).forEach(function(r){aFe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u7(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function lFe(t,e){if(t==null)return{};var n={};for(var r in t)if({}.hasOwnProperty.call(t,r)){if(e.indexOf(r)!==-1)continue;n[r]=t[r]}return n}function cFe(t,e){if(t==null)return{};var n,r,i=lFe(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)===-1&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function ka(t){"@babel/helpers - typeof";return ka=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ka(t)}function uFe(t,e){if(ka(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(ka(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Gle(t){var e=uFe(t,"string");return ka(e)=="symbol"?e:e+""}function wo(t,e,n){return(e=Gle(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d7(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function at(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?d7(Object(n),!0).forEach(function(r){wo(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):d7(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function dFe(t){if(Array.isArray(t))return t}function pFe(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,o,s,a=[],l=!0,c=!1;try{if(o=(n=n.call(t)).next,e===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(a.push(r.value),a.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}function vM(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function Yle(t,e){if(t){if(typeof t=="string")return vM(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vM(t,e):void 0}}function fFe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
@@ -290,7 +290,7 @@ html body {
290
290
  font-size: var(--font-size-base);
291
291
  font-weight: var(--font-weight-regular);
292
292
  line-height: var(--line-height-base);
293
- `;function _l(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Q7=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),L7=function(){return Math.random().toString(36).substring(7).split("").join(".")},q7={INIT:"@@redux/INIT"+L7(),REPLACE:"@@redux/REPLACE"+L7()};function eBe(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function tBe(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(iBe(t))return"date";if(rBe(t))return"error";var n=nBe(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function nBe(t){return typeof t.constructor=="function"?t.constructor.name:null}function rBe(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function iBe(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function fg(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=tBe(t)),e}function jce(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?_l(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?_l(1):"Expected the enhancer to be a function. Instead, received: '"+fg(n)+"'");return n(jce)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?_l(2):"Expected the root reducer to be a function. Instead, received: '"+fg(t)+"'");var i=t,o=e,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function u(){if(l)throw new Error(process.env.NODE_ENV==="production"?_l(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function d(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?_l(4):"Expected the listener to be a function. Instead, received: '"+fg(g)+"'");if(l)throw new Error(process.env.NODE_ENV==="production"?_l(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var y=!0;return c(),a.push(g),function(){if(y){if(l)throw new Error(process.env.NODE_ENV==="production"?_l(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");y=!1,c();var v=a.indexOf(g);a.splice(v,1),s=null}}}function p(g){if(!eBe(g))throw new Error(process.env.NODE_ENV==="production"?_l(7):"Actions must be plain objects. Instead, the actual type was: '"+fg(g)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof g.type>"u")throw new Error(process.env.NODE_ENV==="production"?_l(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(l)throw new Error(process.env.NODE_ENV==="production"?_l(9):"Reducers may not dispatch actions.");try{l=!0,o=i(o,g)}finally{l=!1}for(var y=s=a,b=0;b<y.length;b++){var v=y[b];v()}return g}function f(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?_l(10):"Expected the nextReducer to be a function. Instead, received: '"+fg(g));i=g,p({type:q7.REPLACE})}function m(){var g,y=d;return g={subscribe:function(v){if(typeof v!="object"||v===null)throw new Error(process.env.NODE_ENV==="production"?_l(11):"Expected the observer to be an object. Instead, received: '"+fg(v)+"'");function x(){v.next&&v.next(u())}x();var O=y(x);return{unsubscribe:O}}},g[Q7]=function(){return this},g}return p({type:q7.INIT}),r={dispatch:p,subscribe:d,getState:u,replaceReducer:f},r[Q7]=m,r}function oBe(t){typeof console<"u"&&typeof console.error=="function"&&console.error(t);try{throw new Error(t)}catch{}}function xf(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length===0?function(r){return r}:e.length===1?e[0]:e.reduce(function(r,i){return function(){return r(i.apply(void 0,arguments))}})}function z7(){}process.env.NODE_ENV!=="production"&&typeof z7.name=="string"&&z7.name!=="isCrushed"&&oBe('You are currently using minified code outside of NODE_ENV === "production". This means that you are running a slower development build of Redux. You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) to ensure you have the correct code for your production build.');function sBe(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(e.length!==0)return typeof e[0]=="object"?xf:xf(...e)}process.env.NODE_ENV!=="production"&&typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;process.env.NODE_ENV!=="production"&&typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;const aBe=Object.keys||function(t){const e=[];for(const n in t)({}).hasOwnProperty.call(t,n)&&e.push(n);return e};function lBe(t,e,n){const r=aBe(t),i={};for(let o=0,s=r.length;o<s;o++){const a=r[o];i[a]=t[a]}return i[e]=n,i}function j5(t){const e=t||{};return e.features={pause:!0,export:!0,test:!0},e.type="redux",e.autoPause===void 0&&(e.autoPause=!0),e.latency===void 0&&(e.latency=500),function(n){return function(r,i){const o=n(r,i),s=o.dispatch,a=window.__REDUX_DEVTOOLS_EXTENSION__.connect(e);a.init(o.getState());const l=function(c){const u=s(c);return a.send(c,o.getState()),u};return Object.assign?Object.assign(o,{dispatch:l}):lBe(o,"dispatch",l)}}}function U7(t){return function(){return xf(xf(...arguments),j5(t))}}function cBe(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__)return e.length===0?j5():typeof e[0]=="object"?U7(e[0]):U7()(...e);if(e.length!==0)return typeof e[0]=="object"?xf:xf(...e)}const uBe=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?j5:function(){return function(t){return t}};function dBe(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(e.length!==0)return typeof e[0]=="object"?xf:xf(...e)}process.env.NODE_ENV==="production"||typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;process.env.NODE_ENV==="production"||typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;const pBe=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function fBe(t,e,n){var r=!1,i=!1,o=jce(function(a,l){if(!i){var c=function(y){return Array.isArray(y)&&y.findIndex(function(b){return typeof b!="string"&&typeof b!="number"})===-1};if(l.type.startsWith("SET")){var u=function(y){try{r=!0,"value"in l?y.set(l.value):y.set(dn)}finally{r=!1}};if(l.path){if(c(l.path)){l.path.length===0&&u(t);for(var d=t,p=!0,f=0,m=l.path;f<m.length;f++){var g=m[f];d[g]?d=d[g]:p=!1}p&&u(d)}}else u(t)}else l.type==="BREAKPOINT"&&n()}return t.promised||t.error?dn:t.get({noproxy:!0})},pBe({name:"".concat(window.location.hostname,": ").concat(e),trace:!0,traceLimit:16,autoPause:!0,shouldHotReload:!1,features:{persist:!0,pause:!0,lock:!1,export:"custom",import:"custom",jump:!1,skip:!1,reorder:!1,dispatch:!0,test:!1}})),s=function(a,l){if(r)l&&l();else try{i=!0,o.dispatch(a)}finally{i=!1}};return s}function hBe(t){return function(){var e,n,r=!1;return{onInit:function(i,o){if(!(typeof window>"u"||!("__REDUX_DEVTOOLS_EXTENSION__"in window))){if(t?.key===void 0){if(o.identifier===void 0)throw Error("State is missing Identifiable extension or Devtools key option");e=o.identifier(i)}else e=t.key;n=fBe(i,e,function(){r=!r}),i.promise||n?.({type:"CREATE",state:i.get({noproxy:!0,stealth:!0})})}},onSet:function(i,o){if(n?.({type:"SET [".concat(i.path.join("/"),"]"),state:i.get({noproxy:!0,stealth:!0}),descriptor:o}),r)debugger},onDestroy:function(){n?.({type:"DESTROY"})}}}}var Bn=(t=>(t.Normal="Normal",t.Edit="Edit",t.Draft="Draft",t))(Bn||{});const nw="default",Nce=[{name:nw,inputs:[],servers:[],state:Bn.Normal}],AM={activeTabIdx:0,tabs:[]};var fu=(t=>(t.Idle="idle",t.Loading="loading",t.Success="success",t.Error="error",t))(fu||{});function jc(t){const e=new WeakMap;function n(r){if(typeof r!="object"||r===null)return r;if(e.has(r))return e.get(r);const i=Array.isArray(r)?[]:{};e.set(r,i);for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&(i[o]=n(r[o]));return i}return n(t)}function RM(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let i=0;i<t.length;i++)if(!RM(t[i],e[i]))return!1;return!0}const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){const o=n[i];if(!Object.prototype.hasOwnProperty.call(e,o)||!RM(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function V7(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0))}function mBe(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}async function Gt(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}function Kn(){return!!window?.__TAURI__}const Ph="1.9.1",F7=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function gBe(t){const e=new Set([t]),n=new Set,r=t.match(F7);if(!r)return()=>!1;const i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(l){return l===t};function o(a){return n.add(a),!1}function s(a){return e.add(a),!0}return function(l){if(e.has(l))return!0;if(n.has(l))return!1;const c=l.match(F7);if(!c)return o(l);const u={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return u.prerelease!=null||i.major!==u.major?o(l):i.major===0?i.minor===u.minor&&i.patch<=u.patch?s(l):o(l):i.minor<=u.minor?s(l):o(l)}}const yBe=gBe(Ph),vBe=Ph.split(".")[0],E0=Symbol.for(`opentelemetry.js.api.${vBe}`),A0=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function rw(t,e,n,r=!1){var i;const o=A0[E0]=(i=A0[E0])!==null&&i!==void 0?i:{version:Ph};if(!r&&o[t]){const s=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${t}`);return n.error(s.stack||s.message),!1}if(o.version!==Ph){const s=new Error(`@opentelemetry/api: Registration of version v${o.version} for ${t} does not match previously registered API v${Ph}`);return n.error(s.stack||s.message),!1}return o[t]=e,n.debug(`@opentelemetry/api: Registered a global for ${t} v${Ph}.`),!0}function am(t){var e,n;const r=(e=A0[E0])===null||e===void 0?void 0:e.version;if(!(!r||!yBe(r)))return(n=A0[E0])===null||n===void 0?void 0:n[t]}function iw(t,e){e.debug(`@opentelemetry/api: Unregistering a global for ${t} v${Ph}.`);const n=A0[E0];n&&delete n[t]}class bBe{constructor(e){this._namespace=e.namespace||"DiagComponentLogger"}debug(...e){return kb("debug",this._namespace,e)}error(...e){return kb("error",this._namespace,e)}info(...e){return kb("info",this._namespace,e)}warn(...e){return kb("warn",this._namespace,e)}verbose(...e){return kb("verbose",this._namespace,e)}}function kb(t,e,n){const r=am("diag");if(r)return r[t](e,...n)}var Ja;(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})(Ja||(Ja={}));function OBe(t,e){t<Ja.NONE?t=Ja.NONE:t>Ja.ALL&&(t=Ja.ALL),e=e||{};function n(r,i){const o=e[r];return typeof o=="function"&&t>=i?o.bind(e):function(){}}return{error:n("error",Ja.ERROR),warn:n("warn",Ja.WARN),info:n("info",Ja.INFO),debug:n("debug",Ja.DEBUG),verbose:n("verbose",Ja.VERBOSE)}}const xBe="diag";class Gl{static instance(){return this._instance||(this._instance=new Gl),this._instance}constructor(){function e(i){return function(...o){const s=am("diag");if(s)return s[i](...o)}}const n=this,r=(i,o={logLevel:Ja.INFO})=>{var s,a,l;if(i===n){const d=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((s=d.stack)!==null&&s!==void 0?s:d.message),!1}typeof o=="number"&&(o={logLevel:o});const c=am("diag"),u=OBe((a=o.logLevel)!==null&&a!==void 0?a:Ja.INFO,i);if(c&&!o.suppressOverrideMessage){const d=(l=new Error().stack)!==null&&l!==void 0?l:"<failed to generate stacktrace>";c.warn(`Current logger will be overwritten from ${d}`),u.warn(`Current logger will overwrite one already registered from ${d}`)}return rw("diag",u,n,!0)};n.setLogger=r,n.disable=()=>{iw(xBe,n)},n.createComponentLogger=i=>new bBe(i),n.verbose=e("verbose"),n.debug=e("debug"),n.info=e("info"),n.warn=e("warn"),n.error=e("error")}}class ey{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){const n=this._entries.get(e);if(n)return Object.assign({},n)}getAllEntries(){return Array.from(this._entries.entries())}setEntry(e,n){const r=new ey(this._entries);return r._entries.set(e,n),r}removeEntry(e){const n=new ey(this._entries);return n._entries.delete(e),n}removeEntries(...e){const n=new ey(this._entries);for(const r of e)n._entries.delete(r);return n}clear(){return new ey}}const wBe=Symbol("BaggageEntryMetadata"),SBe=Gl.instance();function _Be(t={}){return new ey(new Map(Object.entries(t)))}function CBe(t){return typeof t!="string"&&(SBe.error(`Cannot create baggage metadata from unknown type: ${typeof t}`),t=""),{__TYPE__:wBe,toString(){return t}}}function N5(t){return Symbol.for(t)}class SI{constructor(e){const n=this;n._currentContext=e?new Map(e):new Map,n.getValue=r=>n._currentContext.get(r),n.setValue=(r,i)=>{const o=new SI(n._currentContext);return o._currentContext.set(r,i),o},n.deleteValue=r=>{const i=new SI(n._currentContext);return i._currentContext.delete(r),i}}}const Lg=new SI;class TBe{constructor(){}createGauge(e,n){return NBe}createHistogram(e,n){return MBe}createCounter(e,n){return jBe}createUpDownCounter(e,n){return DBe}createObservableGauge(e,n){return LBe}createObservableCounter(e,n){return QBe}createObservableUpDownCounter(e,n){return qBe}addBatchObservableCallback(e,n){}removeBatchObservableCallback(e){}}class f${}class IBe extends f${add(e,n){}}class kBe extends f${add(e,n){}}class PBe extends f${record(e,n){}}class $Be extends f${record(e,n){}}class M5{addCallback(e){}removeCallback(e){}}class EBe extends M5{}class ABe extends M5{}class RBe extends M5{}const Mce=new TBe,jBe=new IBe,NBe=new PBe,MBe=new $Be,DBe=new kBe,QBe=new EBe,LBe=new ABe,qBe=new RBe;function zBe(){return Mce}const UBe={get(t,e){if(t!=null)return t[e]},keys(t){return t==null?[]:Object.keys(t)}},VBe={set(t,e,n){t!=null&&(t[e]=n)}};class FBe{active(){return Lg}with(e,n,r,...i){return n.call(r,...i)}bind(e,n){return n}enable(){return this}disable(){return this}}const RR="context",BBe=new FBe;class Mv{constructor(){}static getInstance(){return this._instance||(this._instance=new Mv),this._instance}setGlobalContextManager(e){return rw(RR,e,Gl.instance())}active(){return this._getContextManager().active()}with(e,n,r,...i){return this._getContextManager().with(e,n,r,...i)}bind(e,n){return this._getContextManager().bind(e,n)}_getContextManager(){return am(RR)||BBe}disable(){this._getContextManager().disable(),iw(RR,Gl.instance())}}var tp;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(tp||(tp={}));const Dce="0000000000000000",Qce="00000000000000000000000000000000",Lce={traceId:Qce,spanId:Dce,traceFlags:tp.NONE};class MO{constructor(e=Lce){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,n){return this}setAttributes(e){return this}addEvent(e,n){return this}addLink(e){return this}addLinks(e){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return!1}recordException(e,n){}}const D5=N5("OpenTelemetry Context Key SPAN");function Q5(t){return t.getValue(D5)||void 0}function WBe(){return Q5(Mv.getInstance().active())}function L5(t,e){return t.setValue(D5,e)}function XBe(t){return t.deleteValue(D5)}function ZBe(t,e){return L5(t,new MO(e))}function qce(t){var e;return(e=Q5(t))===null||e===void 0?void 0:e.spanContext()}const o1=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1]);function zce(t,e){if(typeof t!="string"||t.length!==e)return!1;let n=0;for(let r=0;r<t.length;r+=4)n+=(o1[t.charCodeAt(r)]|0)+(o1[t.charCodeAt(r+1)]|0)+(o1[t.charCodeAt(r+2)]|0)+(o1[t.charCodeAt(r+3)]|0);return n===e}function Uce(t){return zce(t,32)&&t!==Qce}function GBe(t){return zce(t,16)&&t!==Dce}function h$(t){return Uce(t.traceId)&&GBe(t.spanId)}function YBe(t){return new MO(t)}const jR=Mv.getInstance();class Vce{startSpan(e,n,r=jR.active()){if(!!n?.root)return new MO;const o=r&&qce(r);return HBe(o)&&h$(o)?new MO(o):new MO}startActiveSpan(e,n,r,i){let o,s,a;if(arguments.length<2)return;arguments.length===2?a=n:arguments.length===3?(o=n,a=r):(o=n,s=r,a=i);const l=s??jR.active(),c=this.startSpan(e,o,l),u=L5(l,c);return jR.with(u,a,void 0,c)}}function HBe(t){return t!==null&&typeof t=="object"&&"spanId"in t&&typeof t.spanId=="string"&&"traceId"in t&&typeof t.traceId=="string"&&"traceFlags"in t&&typeof t.traceFlags=="number"}const KBe=new Vce;class JBe{constructor(e,n,r,i){this._provider=e,this.name=n,this.version=r,this.options=i}startSpan(e,n,r){return this._getTracer().startSpan(e,n,r)}startActiveSpan(e,n,r,i){const o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)}_getTracer(){if(this._delegate)return this._delegate;const e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):KBe}}class eWe{getTracer(e,n,r){return new Vce}}const tWe=new eWe;class B7{getTracer(e,n,r){var i;return(i=this.getDelegateTracer(e,n,r))!==null&&i!==void 0?i:new JBe(this,e,n,r)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:tWe}setDelegate(e){this._delegate=e}getDelegateTracer(e,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(e,n,r)}}var _I;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(_I||(_I={}));var Ha;(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(Ha||(Ha={}));exports.SpanStatusCode=void 0;(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(exports.SpanStatusCode||(exports.SpanStatusCode={}));const Lo=Mv.getInstance(),ln=Gl.instance();class nWe{getMeter(e,n,r){return Mce}}const rWe=new nWe,NR="metrics";class q5{constructor(){}static getInstance(){return this._instance||(this._instance=new q5),this._instance}setGlobalMeterProvider(e){return rw(NR,e,Gl.instance())}getMeterProvider(){return am(NR)||rWe}getMeter(e,n,r){return this.getMeterProvider().getMeter(e,n,r)}disable(){iw(NR,Gl.instance())}}const Fce=q5.getInstance();class iWe{inject(e,n){}extract(e,n){return e}fields(){return[]}}const z5=N5("OpenTelemetry Baggage Key");function Bce(t){return t.getValue(z5)||void 0}function oWe(){return Bce(Mv.getInstance().active())}function sWe(t,e){return t.setValue(z5,e)}function aWe(t){return t.deleteValue(z5)}const MR="propagation",lWe=new iWe;class U5{constructor(){this.createBaggage=_Be,this.getBaggage=Bce,this.getActiveBaggage=oWe,this.setBaggage=sWe,this.deleteBaggage=aWe}static getInstance(){return this._instance||(this._instance=new U5),this._instance}setGlobalPropagator(e){return rw(MR,e,Gl.instance())}inject(e,n,r=VBe){return this._getGlobalPropagator().inject(e,n,r)}extract(e,n,r=UBe){return this._getGlobalPropagator().extract(e,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){iw(MR,Gl.instance())}_getGlobalPropagator(){return am(MR)||lWe}}const DO=U5.getInstance(),DR="trace";class V5{constructor(){this._proxyTracerProvider=new B7,this.wrapSpanContext=YBe,this.isSpanContextValid=h$,this.deleteSpan=XBe,this.getSpan=Q5,this.getActiveSpan=WBe,this.getSpanContext=qce,this.setSpan=L5,this.setSpanContext=ZBe}static getInstance(){return this._instance||(this._instance=new V5),this._instance}setGlobalTracerProvider(e){const n=rw(DR,this._proxyTracerProvider,Gl.instance());return n&&this._proxyTracerProvider.setDelegate(e),n}getTracerProvider(){return am(DR)||this._proxyTracerProvider}getTracer(e,n){return this.getTracerProvider().getTracer(e,n)}disable(){iw(DR,Gl.instance()),this._proxyTracerProvider=new B7}}const Pr=V5.getInstance();async function jM(t,e,n){const r=[],i=[];for(const o of t){const s=Promise.resolve().then(()=>n(o,t));if(r.push(s),e<=t.length){const a=s.then(()=>i.splice(i.indexOf(a),1));i.push(a),i.length>=e&&await Promise.race(i)}}return Promise.all(r)}const ps={FS:"fs",WEB:"web"};function Ko(t,e,n,r){if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)}function qg(t,e,n,r,i){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}var th,Cl,hg,s1,QC;const W7="__TAURI_TO_IPC_KEY__";function cWe(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}class Wce{constructor(e){th.set(this,void 0),Cl.set(this,0),hg.set(this,[]),s1.set(this,void 0),qg(this,th,e||(()=>{})),this.id=cWe(n=>{const r=n.index;if("end"in n){r==Ko(this,Cl,"f")?this.cleanupCallback():qg(this,s1,r);return}const i=n.message;if(r==Ko(this,Cl,"f")){for(Ko(this,th,"f").call(this,i),qg(this,Cl,Ko(this,Cl,"f")+1);Ko(this,Cl,"f")in Ko(this,hg,"f");){const o=Ko(this,hg,"f")[Ko(this,Cl,"f")];Ko(this,th,"f").call(this,o),delete Ko(this,hg,"f")[Ko(this,Cl,"f")],qg(this,Cl,Ko(this,Cl,"f")+1)}Ko(this,Cl,"f")===Ko(this,s1,"f")&&this.cleanupCallback()}else Ko(this,hg,"f")[r]=i})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){qg(this,th,e)}get onmessage(){return Ko(this,th,"f")}[(th=new WeakMap,Cl=new WeakMap,hg=new WeakMap,s1=new WeakMap,W7)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[W7]()}}async function Yr(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}class uWe{get rid(){return Ko(this,QC,"f")}constructor(e){QC.set(this,void 0),qg(this,QC,e)}async close(){return Yr("plugin:resources|close",{rid:this.rid})}}QC=new WeakMap;var NM;(function(t){t[t.Audio=1]="Audio",t[t.Cache=2]="Cache",t[t.Config=3]="Config",t[t.Data=4]="Data",t[t.LocalData=5]="LocalData",t[t.Document=6]="Document",t[t.Download=7]="Download",t[t.Picture=8]="Picture",t[t.Public=9]="Public",t[t.Video=10]="Video",t[t.Resource=11]="Resource",t[t.Temp=12]="Temp",t[t.AppConfig=13]="AppConfig",t[t.AppData=14]="AppData",t[t.AppLocalData=15]="AppLocalData",t[t.AppCache=16]="AppCache",t[t.AppLog=17]="AppLog",t[t.Desktop=18]="Desktop",t[t.Executable=19]="Executable",t[t.Font=20]="Font",t[t.Home=21]="Home",t[t.Runtime=22]="Runtime",t[t.Template=23]="Template"})(NM||(NM={}));var MM;(function(t){t[t.Start=0]="Start",t[t.Current=1]="Current",t[t.End=2]="End"})(MM||(MM={}));function F5(t){return{isFile:t.isFile,isDirectory:t.isDirectory,isSymlink:t.isSymlink,size:t.size,mtime:t.mtime!==null?new Date(t.mtime):null,atime:t.atime!==null?new Date(t.atime):null,birthtime:t.birthtime!==null?new Date(t.birthtime):null,readonly:t.readonly,fileAttributes:t.fileAttributes,dev:t.dev,ino:t.ino,mode:t.mode,nlink:t.nlink,uid:t.uid,gid:t.gid,rdev:t.rdev,blksize:t.blksize,blocks:t.blocks}}class B5 extends uWe{async read(e){if(e.byteLength===0)return 0;const[n,r]=await Yr("plugin:fs|read",{rid:this.rid,len:e.byteLength});return e.set(n),r===0?null:r}async seek(e,n){return await Yr("plugin:fs|seek",{rid:this.rid,offset:e,whence:n})}async stat(){const e=await Yr("plugin:fs|fstat",{rid:this.rid});return F5(e)}async truncate(e){await Yr("plugin:fs|ftruncate",{rid:this.rid,len:e})}async write(e){return await Yr("plugin:fs|write",{rid:this.rid,data:e})}}async function dWe(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");const n=await Yr("plugin:fs|create",{path:t instanceof URL?t.toString():t,options:e});return new B5(n)}async function pWe(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");const n=await Yr("plugin:fs|open",{path:t instanceof URL?t.toString():t,options:e});return new B5(n)}async function fWe(t,e,n){if(t instanceof URL&&t.protocol!=="file:"||e instanceof URL&&e.protocol!=="file:")throw new TypeError("Must be a file URL.");await Yr("plugin:fs|copy_file",{fromPath:t instanceof URL?t.toString():t,toPath:e instanceof URL?e.toString():e,options:n})}async function DM(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await Yr("plugin:fs|mkdir",{path:t instanceof URL?t.toString():t,options:e})}async function W5(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");return await Yr("plugin:fs|read_dir",{path:t instanceof URL?t.toString():t,options:e})}async function Xce(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");const n=await Yr("plugin:fs|read_file",{path:t instanceof URL?t.toString():t,options:e});return n instanceof ArrayBuffer?new Uint8Array(n):Uint8Array.from(n)}async function m$(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");return await Yr("plugin:fs|read_text_file",{path:t instanceof URL?t.toString():t,options:e})}async function hWe(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");const n=t instanceof URL?t.toString():t;return await Promise.resolve({path:n,rid:null,async next(){this.rid===null&&(this.rid=await Yr("plugin:fs|read_text_file_lines",{path:n,options:e}));const[r,i]=await Yr("plugin:fs|read_text_file_lines_next",{rid:this.rid});return i&&(this.rid=null),{value:i?"":r,done:i}},[Symbol.asyncIterator](){return this}})}async function Zce(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await Yr("plugin:fs|remove",{path:t instanceof URL?t.toString():t,options:e})}async function Gce(t,e,n){if(t instanceof URL&&t.protocol!=="file:"||e instanceof URL&&e.protocol!=="file:")throw new TypeError("Must be a file URL.");await Yr("plugin:fs|rename",{oldPath:t instanceof URL?t.toString():t,newPath:e instanceof URL?e.toString():e,options:n})}async function mWe(t,e){const n=await Yr("plugin:fs|stat",{path:t instanceof URL?t.toString():t,options:e});return F5(n)}async function gWe(t,e){const n=await Yr("plugin:fs|lstat",{path:t instanceof URL?t.toString():t,options:e});return F5(n)}async function yWe(t,e,n){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await Yr("plugin:fs|truncate",{path:t instanceof URL?t.toString():t,len:e,options:n})}async function vWe(t,e,n){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await Yr("plugin:fs|write_file",e,{headers:{path:t instanceof URL?t.toString():t,options:JSON.stringify(n)}})}async function Yce(t,e,n){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await Yr("plugin:fs|write_text_file",{path:t instanceof URL?t.toString():t,data:e,options:n})}async function g$(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");return await Yr("plugin:fs|exists",{path:t instanceof URL?t.toString():t,options:e})}async function Hce(t){await Yr("plugin:fs|unwatch",{rid:t})}async function bWe(t,e,n){const r={recursive:!1,delayMs:2e3,...n},i=Array.isArray(t)?t:[t];for(const a of i)if(a instanceof URL&&a.protocol!=="file:")throw new TypeError("Must be a file URL.");const o=new Wce;o.onmessage=e;const s=await Yr("plugin:fs|watch",{paths:i.map(a=>a instanceof URL?a.toString():a),options:r,onEvent:o});return()=>{Hce(s)}}async function OWe(t,e,n){const r={recursive:!1,...n,delayMs:null},i=Array.isArray(t)?t:[t];for(const a of i)if(a instanceof URL&&a.protocol!=="file:")throw new TypeError("Must be a file URL.");const o=new Wce;o.onmessage=e;const s=await Yr("plugin:fs|watch",{paths:i.map(a=>a instanceof URL?a.toString():a),options:r,onEvent:o});return()=>{Hce(s)}}const y$=Object.freeze(Object.defineProperty({__proto__:null,get BaseDirectory(){return NM},FileHandle:B5,get SeekMode(){return MM},copyFile:fWe,create:dWe,exists:g$,lstat:gWe,mkdir:DM,open:pWe,readDir:W5,readFile:Xce,readTextFile:m$,readTextFileLines:hWe,remove:Zce,rename:Gce,stat:mWe,truncate:yWe,watch:bWe,watchImmediate:OWe,writeFile:vWe,writeTextFile:Yce},Symbol.toStringTag,{value:"Module"}));var Jr;(function(t){t[t.Audio=1]="Audio",t[t.Cache=2]="Cache",t[t.Config=3]="Config",t[t.Data=4]="Data",t[t.LocalData=5]="LocalData",t[t.Document=6]="Document",t[t.Download=7]="Download",t[t.Picture=8]="Picture",t[t.Public=9]="Public",t[t.Video=10]="Video",t[t.Resource=11]="Resource",t[t.Temp=12]="Temp",t[t.AppConfig=13]="AppConfig",t[t.AppData=14]="AppData",t[t.AppLocalData=15]="AppLocalData",t[t.AppCache=16]="AppCache",t[t.AppLog=17]="AppLog",t[t.Desktop=18]="Desktop",t[t.Executable=19]="Executable",t[t.Font=20]="Font",t[t.Home=21]="Home",t[t.Runtime=22]="Runtime",t[t.Template=23]="Template"})(Jr||(Jr={}));async function xWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.AppConfig})}async function QM(){return Gt("plugin:path|resolve_directory",{directory:Jr.AppData})}async function wWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.AppLocalData})}async function SWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.AppCache})}async function _We(){return Gt("plugin:path|resolve_directory",{directory:Jr.Audio})}async function CWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Cache})}async function TWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Config})}async function IWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Data})}async function Kce(){return Gt("plugin:path|resolve_directory",{directory:Jr.Desktop})}async function kWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Document})}async function PWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Download})}async function $We(){return Gt("plugin:path|resolve_directory",{directory:Jr.Executable})}async function EWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Font})}async function AWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Home})}async function RWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.LocalData})}async function jWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Picture})}async function NWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Public})}async function MWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Resource})}async function DWe(t){return Gt("plugin:path|resolve_directory",{directory:Jr.Resource,path:t})}async function QWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Runtime})}async function LWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Template})}async function qWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Video})}async function zWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.AppLog})}async function UWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Temp})}function X5(){return window.__TAURI_INTERNALS__.plugins.path.sep}function VWe(){return window.__TAURI_INTERNALS__.plugins.path.delimiter}async function Jce(...t){return Gt("plugin:path|resolve",{paths:t})}async function FWe(t){return Gt("plugin:path|normalize",{path:t})}async function xy(...t){return Gt("plugin:path|join",{paths:t})}async function eue(t){return Gt("plugin:path|dirname",{path:t})}async function tue(t){return Gt("plugin:path|extname",{path:t})}async function Z5(t,e){return Gt("plugin:path|basename",{path:t,ext:e})}async function nue(t){return Gt("plugin:path|is_absolute",{path:t})}const rue=Object.freeze(Object.defineProperty({__proto__:null,get BaseDirectory(){return Jr},appCacheDir:SWe,appConfigDir:xWe,appDataDir:QM,appLocalDataDir:wWe,appLogDir:zWe,audioDir:_We,basename:Z5,cacheDir:CWe,configDir:TWe,dataDir:IWe,delimiter:VWe,desktopDir:Kce,dirname:eue,documentDir:kWe,downloadDir:PWe,executableDir:$We,extname:tue,fontDir:EWe,homeDir:AWe,isAbsolute:nue,join:xy,localDataDir:RWe,normalize:FWe,pictureDir:jWe,publicDir:NWe,resolve:Jce,resolveResource:DWe,resourceDir:MWe,runtimeDir:QWe,sep:X5,tempDir:UWe,templateDir:LWe,videoDir:qWe},Symbol.toStringTag,{value:"Module"}));class Jn{static utils=null;static async getUtils(){return Jn.utils||(Jn.utils=Kn()?await Promise.resolve().then(()=>require("./replay-tauri-path-JT7o3Q5h.js")):await Promise.resolve().then(()=>nke)),Jn.utils}static async dirname(e){return(await Jn.getUtils()).dirname(e)}static async join(...e){return(await Jn.getUtils()).join(...e)}static async resolve(e){return(await Jn.getUtils()).resolve(e)}static async isAbsolute(e){return(await Jn.getUtils()).isAbsolute(e)}static async relative(e,n){return(await Jn.getUtils()).relative(e,n)}static async extname(e){return(await Jn.getUtils()).extname(e)}}class G5{listeners=new Map;on(e,n){let r=this.listeners.get(e);r||(r=new Set,this.listeners.set(e,r)),r.add(n)}off(e,n){this.listeners.get(e)?.delete(n)}emit(e,n){const r=this.listeners.get(e);if(r)for(const i of r)i(n)}subscribe(e,n){return this.on(e,n),()=>{this.off(e,n)}}removeAllListeners(e){if(e!==void 0){this.listeners.delete(e);return}this.listeners.clear()}}const BWe=new Set(["node_modules"]);class LM extends G5{constructor(e){super(),this.baseDir=e,this.initializeDirectory(e)}baseDir;writeExcludedKeys=new Set;writeEndTimers=new Map;async initializeDirectory(e){await DM(e,{recursive:!0})}setWriteExcludedKeys(e){this.writeExcludedKeys=e}async ls(e){const n=await this.getFullPath(e);return this.getDirEntryFilesRecursively(n)}async getDirEntryFilesRecursively(e){try{const n=[],r=await W5(e);for(const i of r)if(i.isDirectory){if(BWe.has(i.name))continue;const o=await xy(e,i.name),s=await this.getDirEntryFilesRecursively(o);n.push(...s)}else{const o=await xy(e,i.name),s=await Jn.relative(this.baseDir,o);n.push(s)}return n}catch(n){return n.includes("forbidden path")||console.error(n),[]}}async get(e){const n=await this.getFullPath(e);try{return await m$(n)}catch(r){return!r.includes("No such file or directory")&&!r.includes("forbidden path")&&console.error(r),null}}async has(e){const n=await this.getFullPath(e);return await g$(n)}async set(e,n){if(!this.writeExcludedKeys.has(e)){this.emit("write-start",e);try{const r=await this.getFullPath(e),i=X5(),o=r.split(i).slice(0,-1).join(i);await DM(o,{recursive:!0}),await Yce(r,n)}finally{const r=this.writeEndTimers.get(e);r&&clearTimeout(r);const i=setTimeout(()=>{this.emit("write-end",e),this.writeEndTimers.delete(e)},1e3);this.writeEndTimers.set(e,i)}}}async remove(e){if(!this.writeExcludedKeys.has(e)){this.emit("write-start",e);try{const n=await this.getFullPath(e);await Zce(n)}catch(n){!n.includes("No such file or directory")&&!n.includes("forbidden path")&&console.error(n)}finally{const n=this.writeEndTimers.get(e);n&&clearTimeout(n);const r=setTimeout(()=>{this.emit("write-end",e),this.writeEndTimers.delete(e)},1e3);this.writeEndTimers.set(e,r)}}}async rename(e,n){const r=await this.getFullPath(e),i=await this.getFullPath(n);await Gce(r,i)}async getFullPath(e){return await xy(this.baseDir,e??"")}}class WWe{baseDir="";async ls(e=""){return[]}async get(e){return null}async has(e){return!1}async set(e,n){}async remove(e){}async rename(e,n){}setWriteExcludedKeys(e){}on(e,n){}off(e,n){}}class XWe{constructor(e){this.projectId=e}projectId;async get(){const e=this.getKey();return localStorage.getItem(e)??null}async set(e){const n=this.getKey();localStorage.setItem(n,e)}async remove(){const e=this.getKey();localStorage.removeItem(e)}getKey(){return`replay:secrets:${this.projectId}`}}class iue{constructor(e){this.storage=e}storage;itemIds=[];async getAbsolutePath(e){return await Jn.resolve(await Jn.join(this.storage.baseDir,"/",e))}async parseMany(e,n){return(await Promise.all(e.map(async i=>{try{return await this.parse(i,n)}catch(o){return console.error(`Error parsing from ${i.type} ${i.uri}:`,o),null}}))).filter(i=>i!==null)}setItemIds(e){this.itemIds=e}async write(e){e.state===Bn.Draft||e.srcType!==ps.FS||await this.storage.set(e.id,await this.stringify(e))}async remove(e){await this.storage.remove(e)}async updateRoot(e,n){const r=e.actions;if(r){for(const o in r){const s=parseInt(o);switch(r[o]){case"D":await this.remove(this.itemIds[s]);break;case"I":case"U":await this.write(n[s]);break}}return}const i=this.itemIds.filter(o=>!n.some(s=>s.id===o));await Promise.all([...n.map(o=>this.write(o)),...i.map(o=>this.remove(o))])}async update(e,n){const i={path:e.path.slice(1),actions:e.actions};if(i.path.length===0&&await this.updateRoot(i,n),i.path.length>0){const o=i.path[0];i.path.length===1&&i.actions&&i.actions.id==="U"&&await this.remove(this.itemIds[o]),i.path[1]&&i.path[1]==="id"&&await this.remove(this.itemIds[o]),await this.write(n[o])}this.itemIds=n.map(o=>o.id)}}class ZWe extends iue{parse(e){return{...e.content,id:e.uri,srcType:e.type,fileDependencies:e.fileDependencies}}async stringify(e){const{id:n,srcType:r,fileDependencies:i,...o}=e;return await Jn.extname(n)===".json"?JSON.stringify(o,null,2):Jh.dump(o)}async write(e){await this.storage.has(e.id)||await super.write(e)}}var So=(t=>(t.SIMPLE="simple",t.REGEX="regex",t.JSONPATH="jsonpath",t.XPATH="xpath",t))(So||{});class CI{constructor(e,n={},r){this.pattern=e,this.separator=n.separator||".",this.segments=this._parse(e),this.data=r,this._hasDeepWildcard=this.segments.some(i=>i.type==="deep-wildcard"),this._hasAttributeCondition=this.segments.some(i=>i.attrName!==void 0),this._hasPositionSelector=this.segments.some(i=>i.position!==void 0)}_parse(e){const n=[];let r=0,i="";for(;r<e.length;)e[r]===this.separator?r+1<e.length&&e[r+1]===this.separator?(i.trim()&&(n.push(this._parseSegment(i.trim())),i=""),n.push({type:"deep-wildcard"}),r+=2):(i.trim()&&n.push(this._parseSegment(i.trim())),i="",r++):(i+=e[r],r++);return i.trim()&&n.push(this._parseSegment(i.trim())),n}_parseSegment(e){const n={type:"tag"};let r=null,i=e;const o=e.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(o&&(i=o[1]+o[3],o[2])){const u=o[2].slice(1,-1);u&&(r=u)}let s,a=i;if(i.includes("::")){const u=i.indexOf("::");if(s=i.substring(0,u).trim(),a=i.substring(u+2).trim(),!s)throw new Error(`Invalid namespace in pattern: ${e}`)}let l,c=null;if(a.includes(":")){const u=a.lastIndexOf(":"),d=a.substring(0,u).trim(),p=a.substring(u+1).trim();["first","last","odd","even"].includes(p)||/^nth\(\d+\)$/.test(p)?(l=d,c=p):l=a}else l=a;if(!l)throw new Error(`Invalid segment pattern: ${e}`);if(n.tag=l,s&&(n.namespace=s),r)if(r.includes("=")){const u=r.indexOf("=");n.attrName=r.substring(0,u).trim(),n.attrValue=r.substring(u+1).trim()}else n.attrName=r.trim();if(c){const u=c.match(/^nth\((\d+)\)$/);u?(n.position="nth",n.positionValue=parseInt(u[1],10)):n.position=c}return n}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class GWe{constructor(e){this._matcher=e}get separator(){return this._matcher.separator}getCurrentTag(){const e=this._matcher.path;return e.length>0?e[e.length-1].tag:void 0}getCurrentNamespace(){const e=this._matcher.path;return e.length>0?e[e.length-1].namespace:void 0}getAttrValue(e){const n=this._matcher.path;if(n.length!==0)return n[n.length-1].values?.[e]}hasAttr(e){const n=this._matcher.path;if(n.length===0)return!1;const r=n[n.length-1];return r.values!==void 0&&e in r.values}getPosition(){const e=this._matcher.path;return e.length===0?-1:e[e.length-1].position??0}getCounter(){const e=this._matcher.path;return e.length===0?-1:e[e.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(e,n=!0){return this._matcher.toString(e,n)}toArray(){return this._matcher.path.map(e=>e.tag)}matches(e){return this._matcher.matches(e)}matchesAny(e){return e.matchesAny(this._matcher)}}class oue{constructor(e={}){this.separator=e.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new GWe(this)}push(e,n=null,r=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);const i=this.path.length;this.siblingStacks[i]||(this.siblingStacks[i]=new Map);const o=this.siblingStacks[i],s=r?`${r}:${e}`:e,a=o.get(s)||0;let l=0;for(const u of o.values())l+=u;o.set(s,a+1);const c={tag:e,position:l,counter:a};r!=null&&(c.namespace=r),n!=null&&(c.values=n),this.path.push(c)}pop(){if(this.path.length===0)return;this._pathStringCache=null;const e=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),e}updateCurrent(e){if(this.path.length>0){const n=this.path[this.path.length-1];e!=null&&(n.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){if(this.path.length!==0)return this.path[this.path.length-1].values?.[e]}hasAttr(e){if(this.path.length===0)return!1;const n=this.path[this.path.length-1];return n.values!==void 0&&e in n.values}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,n=!0){const r=e||this.separator;if(r===this.separator&&n===!0){if(this._pathStringCache!==null)return this._pathStringCache;const o=this.path.map(s=>s.namespace?`${s.namespace}:${s.tag}`:s.tag).join(r);return this._pathStringCache=o,o}return this.path.map(o=>n&&o.namespace?`${o.namespace}:${o.tag}`:o.tag).join(r)}toArray(){return this.path.map(e=>e.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(e){const n=e.segments;return n.length===0?!1:e.hasDeepWildcard()?this._matchWithDeepWildcard(n):this._matchSimple(n)}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let n=0;n<e.length;n++)if(!this._matchSegment(e[n],this.path[n],n===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(e){let n=this.path.length-1,r=e.length-1;for(;r>=0&&n>=0;){const i=e[r];if(i.type==="deep-wildcard"){if(r--,r<0)return!0;const o=e[r];let s=!1;for(let a=n;a>=0;a--)if(this._matchSegment(o,this.path[a],a===this.path.length-1)){n=a-1,r--,s=!0;break}if(!s)return!1}else{if(!this._matchSegment(i,this.path[n],n===this.path.length-1))return!1;n--,r--}}return r<0}_matchSegment(e,n,r){if(e.tag!=="*"&&e.tag!==n.tag||e.namespace!==void 0&&e.namespace!=="*"&&e.namespace!==n.namespace||e.attrName!==void 0&&(!r||!n.values||!(e.attrName in n.values)||e.attrValue!==void 0&&String(n.values[e.attrName])!==String(e.attrValue)))return!1;if(e.position!==void 0){if(!r)return!1;const i=n.counter??0;if(e.position==="first"&&i!==0)return!1;if(e.position==="odd"&&i%2!==1)return!1;if(e.position==="even"&&i%2!==0)return!1;if(e.position==="nth"&&i!==e.positionValue)return!1}return!0}matchesAny(e){return e.matchesAny(this)}snapshot(){return{path:this.path.map(e=>({...e})),siblingStacks:this.siblingStacks.map(e=>new Map(e))}}restore(e){this._pathStringCache=null,this.path=e.path.map(n=>({...n})),this.siblingStacks=e.siblingStacks.map(n=>new Map(n))}readOnly(){return this._view}}function sue(t){return String(t).replace(/--/g,"- -").replace(/--/g,"- -").replace(/-$/,"- ")}function aue(t){return String(t).replace(/\]\]>/g,"]]]]><![CDATA[>")}function Zy(t){return String(t).replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const lue=":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�",YWe=lue+"\\-\\.\\d·̀-ͯ‿-⁀",cue=":A-Za-z_À-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",HWe=cue+"\\-\\.\\d·̀-ͯ҇‿-⁀",uue=(t,e,n="")=>{const r=t.replace(":",""),i=e.replace(":",""),o=`[${r}][${i}]*`;return{name:new RegExp(`^[${t}][${e}]*$`,n),ncName:new RegExp(`^${o}$`,n),qName:new RegExp(`^${o}(?::${o})?$`,n),nmToken:new RegExp(`^[${e}]+$`,n),nmTokens:new RegExp(`^[${e}]+(?:\\s+[${e}]+)*$`,n)}},KWe=uue(lue,YWe),JWe=uue(cue,HWe,"u"),e7e=(t="1.0")=>t==="1.1"?JWe:KWe,due=(t,{xmlVersion:e="1.0"}={})=>e7e(e).qName.test(t),t7e=`
293
+ `;function _l(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Q7=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),L7=function(){return Math.random().toString(36).substring(7).split("").join(".")},q7={INIT:"@@redux/INIT"+L7(),REPLACE:"@@redux/REPLACE"+L7()};function eBe(t){if(typeof t!="object"||t===null)return!1;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function tBe(t){if(t===void 0)return"undefined";if(t===null)return"null";var e=typeof t;switch(e){case"boolean":case"string":case"number":case"symbol":case"function":return e}if(Array.isArray(t))return"array";if(iBe(t))return"date";if(rBe(t))return"error";var n=nBe(t);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return e.slice(8,-1).toLowerCase().replace(/\s/g,"")}function nBe(t){return typeof t.constructor=="function"?t.constructor.name:null}function rBe(t){return t instanceof Error||typeof t.message=="string"&&t.constructor&&typeof t.constructor.stackTraceLimit=="number"}function iBe(t){return t instanceof Date?!0:typeof t.toDateString=="function"&&typeof t.getDate=="function"&&typeof t.setDate=="function"}function fg(t){var e=typeof t;return process.env.NODE_ENV!=="production"&&(e=tBe(t)),e}function jce(t,e,n){var r;if(typeof e=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?_l(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof e=="function"&&typeof n>"u"&&(n=e,e=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?_l(1):"Expected the enhancer to be a function. Instead, received: '"+fg(n)+"'");return n(jce)(t,e)}if(typeof t!="function")throw new Error(process.env.NODE_ENV==="production"?_l(2):"Expected the root reducer to be a function. Instead, received: '"+fg(t)+"'");var i=t,o=e,s=[],a=s,l=!1;function c(){a===s&&(a=s.slice())}function u(){if(l)throw new Error(process.env.NODE_ENV==="production"?_l(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return o}function d(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?_l(4):"Expected the listener to be a function. Instead, received: '"+fg(g)+"'");if(l)throw new Error(process.env.NODE_ENV==="production"?_l(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var y=!0;return c(),a.push(g),function(){if(y){if(l)throw new Error(process.env.NODE_ENV==="production"?_l(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");y=!1,c();var v=a.indexOf(g);a.splice(v,1),s=null}}}function p(g){if(!eBe(g))throw new Error(process.env.NODE_ENV==="production"?_l(7):"Actions must be plain objects. Instead, the actual type was: '"+fg(g)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof g.type>"u")throw new Error(process.env.NODE_ENV==="production"?_l(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(l)throw new Error(process.env.NODE_ENV==="production"?_l(9):"Reducers may not dispatch actions.");try{l=!0,o=i(o,g)}finally{l=!1}for(var y=s=a,b=0;b<y.length;b++){var v=y[b];v()}return g}function f(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?_l(10):"Expected the nextReducer to be a function. Instead, received: '"+fg(g));i=g,p({type:q7.REPLACE})}function m(){var g,y=d;return g={subscribe:function(v){if(typeof v!="object"||v===null)throw new Error(process.env.NODE_ENV==="production"?_l(11):"Expected the observer to be an object. Instead, received: '"+fg(v)+"'");function x(){v.next&&v.next(u())}x();var O=y(x);return{unsubscribe:O}}},g[Q7]=function(){return this},g}return p({type:q7.INIT}),r={dispatch:p,subscribe:d,getState:u,replaceReducer:f},r[Q7]=m,r}function oBe(t){typeof console<"u"&&typeof console.error=="function"&&console.error(t);try{throw new Error(t)}catch{}}function xf(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.length===0?function(r){return r}:e.length===1?e[0]:e.reduce(function(r,i){return function(){return r(i.apply(void 0,arguments))}})}function z7(){}process.env.NODE_ENV!=="production"&&typeof z7.name=="string"&&z7.name!=="isCrushed"&&oBe('You are currently using minified code outside of NODE_ENV === "production". This means that you are running a slower development build of Redux. You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) to ensure you have the correct code for your production build.');function sBe(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(e.length!==0)return typeof e[0]=="object"?xf:xf(...e)}process.env.NODE_ENV!=="production"&&typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;process.env.NODE_ENV!=="production"&&typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;const aBe=Object.keys||function(t){const e=[];for(const n in t)({}).hasOwnProperty.call(t,n)&&e.push(n);return e};function lBe(t,e,n){const r=aBe(t),i={};for(let o=0,s=r.length;o<s;o++){const a=r[o];i[a]=t[a]}return i[e]=n,i}function j5(t){const e=t||{};return e.features={pause:!0,export:!0,test:!0},e.type="redux",e.autoPause===void 0&&(e.autoPause=!0),e.latency===void 0&&(e.latency=500),function(n){return function(r,i){const o=n(r,i),s=o.dispatch,a=window.__REDUX_DEVTOOLS_EXTENSION__.connect(e);a.init(o.getState());const l=function(c){const u=s(c);return a.send(c,o.getState()),u};return Object.assign?Object.assign(o,{dispatch:l}):lBe(o,"dispatch",l)}}}function U7(t){return function(){return xf(xf(...arguments),j5(t))}}function cBe(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__)return e.length===0?j5():typeof e[0]=="object"?U7(e[0]):U7()(...e);if(e.length!==0)return typeof e[0]=="object"?xf:xf(...e)}const uBe=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?j5:function(){return function(t){return t}};function dBe(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];if(e.length!==0)return typeof e[0]=="object"?xf:xf(...e)}process.env.NODE_ENV==="production"||typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;process.env.NODE_ENV==="production"||typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;const pBe=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(t){return t}};function fBe(t,e,n){var r=!1,i=!1,o=jce(function(a,l){if(!i){var c=function(y){return Array.isArray(y)&&y.findIndex(function(b){return typeof b!="string"&&typeof b!="number"})===-1};if(l.type.startsWith("SET")){var u=function(y){try{r=!0,"value"in l?y.set(l.value):y.set(dn)}finally{r=!1}};if(l.path){if(c(l.path)){l.path.length===0&&u(t);for(var d=t,p=!0,f=0,m=l.path;f<m.length;f++){var g=m[f];d[g]?d=d[g]:p=!1}p&&u(d)}}else u(t)}else l.type==="BREAKPOINT"&&n()}return t.promised||t.error?dn:t.get({noproxy:!0})},pBe({name:"".concat(window.location.hostname,": ").concat(e),trace:!0,traceLimit:16,autoPause:!0,shouldHotReload:!1,features:{persist:!0,pause:!0,lock:!1,export:"custom",import:"custom",jump:!1,skip:!1,reorder:!1,dispatch:!0,test:!1}})),s=function(a,l){if(r)l&&l();else try{i=!0,o.dispatch(a)}finally{i=!1}};return s}function hBe(t){return function(){var e,n,r=!1;return{onInit:function(i,o){if(!(typeof window>"u"||!("__REDUX_DEVTOOLS_EXTENSION__"in window))){if(t?.key===void 0){if(o.identifier===void 0)throw Error("State is missing Identifiable extension or Devtools key option");e=o.identifier(i)}else e=t.key;n=fBe(i,e,function(){r=!r}),i.promise||n?.({type:"CREATE",state:i.get({noproxy:!0,stealth:!0})})}},onSet:function(i,o){if(n?.({type:"SET [".concat(i.path.join("/"),"]"),state:i.get({noproxy:!0,stealth:!0}),descriptor:o}),r)debugger},onDestroy:function(){n?.({type:"DESTROY"})}}}}var Bn=(t=>(t.Normal="Normal",t.Edit="Edit",t.Draft="Draft",t))(Bn||{});const nw="default",Nce=[{name:nw,inputs:[],servers:[],state:Bn.Normal}],AM={activeTabIdx:0,tabs:[]};var fu=(t=>(t.Idle="idle",t.Loading="loading",t.Success="success",t.Error="error",t))(fu||{});function jc(t){const e=new WeakMap;function n(r){if(typeof r!="object"||r===null)return r;if(e.has(r))return e.get(r);const i=Array.isArray(r)?[]:{};e.set(r,i);for(const o in r)Object.prototype.hasOwnProperty.call(r,o)&&(i[o]=n(r[o]));return i}return n(t)}function RM(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let i=0;i<t.length;i++)if(!RM(t[i],e[i]))return!1;return!0}const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++){const o=n[i];if(!Object.prototype.hasOwnProperty.call(e,o)||!RM(t[o],e[o]))return!1}return!0}return t!==t&&e!==e}function V7(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!==void 0))}function mBe(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}async function Gt(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}function Kn(){return!!window?.__TAURI__}const Ph="1.9.1",F7=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function gBe(t){const e=new Set([t]),n=new Set,r=t.match(F7);if(!r)return()=>!1;const i={major:+r[1],minor:+r[2],patch:+r[3],prerelease:r[4]};if(i.prerelease!=null)return function(l){return l===t};function o(a){return n.add(a),!1}function s(a){return e.add(a),!0}return function(l){if(e.has(l))return!0;if(n.has(l))return!1;const c=l.match(F7);if(!c)return o(l);const u={major:+c[1],minor:+c[2],patch:+c[3],prerelease:c[4]};return u.prerelease!=null||i.major!==u.major?o(l):i.major===0?i.minor===u.minor&&i.patch<=u.patch?s(l):o(l):i.minor<=u.minor?s(l):o(l)}}const yBe=gBe(Ph),vBe=Ph.split(".")[0],E0=Symbol.for(`opentelemetry.js.api.${vBe}`),A0=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{};function rw(t,e,n,r=!1){var i;const o=A0[E0]=(i=A0[E0])!==null&&i!==void 0?i:{version:Ph};if(!r&&o[t]){const s=new Error(`@opentelemetry/api: Attempted duplicate registration of API: ${t}`);return n.error(s.stack||s.message),!1}if(o.version!==Ph){const s=new Error(`@opentelemetry/api: Registration of version v${o.version} for ${t} does not match previously registered API v${Ph}`);return n.error(s.stack||s.message),!1}return o[t]=e,n.debug(`@opentelemetry/api: Registered a global for ${t} v${Ph}.`),!0}function am(t){var e,n;const r=(e=A0[E0])===null||e===void 0?void 0:e.version;if(!(!r||!yBe(r)))return(n=A0[E0])===null||n===void 0?void 0:n[t]}function iw(t,e){e.debug(`@opentelemetry/api: Unregistering a global for ${t} v${Ph}.`);const n=A0[E0];n&&delete n[t]}class bBe{constructor(e){this._namespace=e.namespace||"DiagComponentLogger"}debug(...e){return kb("debug",this._namespace,e)}error(...e){return kb("error",this._namespace,e)}info(...e){return kb("info",this._namespace,e)}warn(...e){return kb("warn",this._namespace,e)}verbose(...e){return kb("verbose",this._namespace,e)}}function kb(t,e,n){const r=am("diag");if(r)return r[t](e,...n)}var Ja;(function(t){t[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})(Ja||(Ja={}));function OBe(t,e){t<Ja.NONE?t=Ja.NONE:t>Ja.ALL&&(t=Ja.ALL),e=e||{};function n(r,i){const o=e[r];return typeof o=="function"&&t>=i?o.bind(e):function(){}}return{error:n("error",Ja.ERROR),warn:n("warn",Ja.WARN),info:n("info",Ja.INFO),debug:n("debug",Ja.DEBUG),verbose:n("verbose",Ja.VERBOSE)}}const xBe="diag";class Gl{static instance(){return this._instance||(this._instance=new Gl),this._instance}constructor(){function e(i){return function(...o){const s=am("diag");if(s)return s[i](...o)}}const n=this,r=(i,o={logLevel:Ja.INFO})=>{var s,a,l;if(i===n){const d=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return n.error((s=d.stack)!==null&&s!==void 0?s:d.message),!1}typeof o=="number"&&(o={logLevel:o});const c=am("diag"),u=OBe((a=o.logLevel)!==null&&a!==void 0?a:Ja.INFO,i);if(c&&!o.suppressOverrideMessage){const d=(l=new Error().stack)!==null&&l!==void 0?l:"<failed to generate stacktrace>";c.warn(`Current logger will be overwritten from ${d}`),u.warn(`Current logger will overwrite one already registered from ${d}`)}return rw("diag",u,n,!0)};n.setLogger=r,n.disable=()=>{iw(xBe,n)},n.createComponentLogger=i=>new bBe(i),n.verbose=e("verbose"),n.debug=e("debug"),n.info=e("info"),n.warn=e("warn"),n.error=e("error")}}class ey{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){const n=this._entries.get(e);if(n)return Object.assign({},n)}getAllEntries(){return Array.from(this._entries.entries())}setEntry(e,n){const r=new ey(this._entries);return r._entries.set(e,n),r}removeEntry(e){const n=new ey(this._entries);return n._entries.delete(e),n}removeEntries(...e){const n=new ey(this._entries);for(const r of e)n._entries.delete(r);return n}clear(){return new ey}}const wBe=Symbol("BaggageEntryMetadata"),SBe=Gl.instance();function _Be(t={}){return new ey(new Map(Object.entries(t)))}function CBe(t){return typeof t!="string"&&(SBe.error(`Cannot create baggage metadata from unknown type: ${typeof t}`),t=""),{__TYPE__:wBe,toString(){return t}}}function N5(t){return Symbol.for(t)}class SI{constructor(e){const n=this;n._currentContext=e?new Map(e):new Map,n.getValue=r=>n._currentContext.get(r),n.setValue=(r,i)=>{const o=new SI(n._currentContext);return o._currentContext.set(r,i),o},n.deleteValue=r=>{const i=new SI(n._currentContext);return i._currentContext.delete(r),i}}}const Lg=new SI;class TBe{constructor(){}createGauge(e,n){return NBe}createHistogram(e,n){return MBe}createCounter(e,n){return jBe}createUpDownCounter(e,n){return DBe}createObservableGauge(e,n){return LBe}createObservableCounter(e,n){return QBe}createObservableUpDownCounter(e,n){return qBe}addBatchObservableCallback(e,n){}removeBatchObservableCallback(e){}}class f${}class IBe extends f${add(e,n){}}class kBe extends f${add(e,n){}}class PBe extends f${record(e,n){}}class $Be extends f${record(e,n){}}class M5{addCallback(e){}removeCallback(e){}}class EBe extends M5{}class ABe extends M5{}class RBe extends M5{}const Mce=new TBe,jBe=new IBe,NBe=new PBe,MBe=new $Be,DBe=new kBe,QBe=new EBe,LBe=new ABe,qBe=new RBe;function zBe(){return Mce}const UBe={get(t,e){if(t!=null)return t[e]},keys(t){return t==null?[]:Object.keys(t)}},VBe={set(t,e,n){t!=null&&(t[e]=n)}};class FBe{active(){return Lg}with(e,n,r,...i){return n.call(r,...i)}bind(e,n){return n}enable(){return this}disable(){return this}}const RR="context",BBe=new FBe;class Mv{constructor(){}static getInstance(){return this._instance||(this._instance=new Mv),this._instance}setGlobalContextManager(e){return rw(RR,e,Gl.instance())}active(){return this._getContextManager().active()}with(e,n,r,...i){return this._getContextManager().with(e,n,r,...i)}bind(e,n){return this._getContextManager().bind(e,n)}_getContextManager(){return am(RR)||BBe}disable(){this._getContextManager().disable(),iw(RR,Gl.instance())}}var tp;(function(t){t[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})(tp||(tp={}));const Dce="0000000000000000",Qce="00000000000000000000000000000000",Lce={traceId:Qce,spanId:Dce,traceFlags:tp.NONE};class MO{constructor(e=Lce){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,n){return this}setAttributes(e){return this}addEvent(e,n){return this}addLink(e){return this}addLinks(e){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return!1}recordException(e,n){}}const D5=N5("OpenTelemetry Context Key SPAN");function Q5(t){return t.getValue(D5)||void 0}function WBe(){return Q5(Mv.getInstance().active())}function L5(t,e){return t.setValue(D5,e)}function XBe(t){return t.deleteValue(D5)}function ZBe(t,e){return L5(t,new MO(e))}function qce(t){var e;return(e=Q5(t))===null||e===void 0?void 0:e.spanContext()}const o1=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1]);function zce(t,e){if(typeof t!="string"||t.length!==e)return!1;let n=0;for(let r=0;r<t.length;r+=4)n+=(o1[t.charCodeAt(r)]|0)+(o1[t.charCodeAt(r+1)]|0)+(o1[t.charCodeAt(r+2)]|0)+(o1[t.charCodeAt(r+3)]|0);return n===e}function Uce(t){return zce(t,32)&&t!==Qce}function GBe(t){return zce(t,16)&&t!==Dce}function h$(t){return Uce(t.traceId)&&GBe(t.spanId)}function YBe(t){return new MO(t)}const jR=Mv.getInstance();class Vce{startSpan(e,n,r=jR.active()){if(!!n?.root)return new MO;const o=r&&qce(r);return HBe(o)&&h$(o)?new MO(o):new MO}startActiveSpan(e,n,r,i){let o,s,a;if(arguments.length<2)return;arguments.length===2?a=n:arguments.length===3?(o=n,a=r):(o=n,s=r,a=i);const l=s??jR.active(),c=this.startSpan(e,o,l),u=L5(l,c);return jR.with(u,a,void 0,c)}}function HBe(t){return t!==null&&typeof t=="object"&&"spanId"in t&&typeof t.spanId=="string"&&"traceId"in t&&typeof t.traceId=="string"&&"traceFlags"in t&&typeof t.traceFlags=="number"}const KBe=new Vce;class JBe{constructor(e,n,r,i){this._provider=e,this.name=n,this.version=r,this.options=i}startSpan(e,n,r){return this._getTracer().startSpan(e,n,r)}startActiveSpan(e,n,r,i){const o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)}_getTracer(){if(this._delegate)return this._delegate;const e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):KBe}}class eWe{getTracer(e,n,r){return new Vce}}const tWe=new eWe;class B7{getTracer(e,n,r){var i;return(i=this.getDelegateTracer(e,n,r))!==null&&i!==void 0?i:new JBe(this,e,n,r)}getDelegate(){var e;return(e=this._delegate)!==null&&e!==void 0?e:tWe}setDelegate(e){this._delegate=e}getDelegateTracer(e,n,r){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(e,n,r)}}var _I;(function(t){t[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(_I||(_I={}));var Ha;(function(t){t[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})(Ha||(Ha={}));exports.SpanStatusCode=void 0;(function(t){t[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})(exports.SpanStatusCode||(exports.SpanStatusCode={}));const Lo=Mv.getInstance(),ln=Gl.instance();class nWe{getMeter(e,n,r){return Mce}}const rWe=new nWe,NR="metrics";class q5{constructor(){}static getInstance(){return this._instance||(this._instance=new q5),this._instance}setGlobalMeterProvider(e){return rw(NR,e,Gl.instance())}getMeterProvider(){return am(NR)||rWe}getMeter(e,n,r){return this.getMeterProvider().getMeter(e,n,r)}disable(){iw(NR,Gl.instance())}}const Fce=q5.getInstance();class iWe{inject(e,n){}extract(e,n){return e}fields(){return[]}}const z5=N5("OpenTelemetry Baggage Key");function Bce(t){return t.getValue(z5)||void 0}function oWe(){return Bce(Mv.getInstance().active())}function sWe(t,e){return t.setValue(z5,e)}function aWe(t){return t.deleteValue(z5)}const MR="propagation",lWe=new iWe;class U5{constructor(){this.createBaggage=_Be,this.getBaggage=Bce,this.getActiveBaggage=oWe,this.setBaggage=sWe,this.deleteBaggage=aWe}static getInstance(){return this._instance||(this._instance=new U5),this._instance}setGlobalPropagator(e){return rw(MR,e,Gl.instance())}inject(e,n,r=VBe){return this._getGlobalPropagator().inject(e,n,r)}extract(e,n,r=UBe){return this._getGlobalPropagator().extract(e,n,r)}fields(){return this._getGlobalPropagator().fields()}disable(){iw(MR,Gl.instance())}_getGlobalPropagator(){return am(MR)||lWe}}const DO=U5.getInstance(),DR="trace";class V5{constructor(){this._proxyTracerProvider=new B7,this.wrapSpanContext=YBe,this.isSpanContextValid=h$,this.deleteSpan=XBe,this.getSpan=Q5,this.getActiveSpan=WBe,this.getSpanContext=qce,this.setSpan=L5,this.setSpanContext=ZBe}static getInstance(){return this._instance||(this._instance=new V5),this._instance}setGlobalTracerProvider(e){const n=rw(DR,this._proxyTracerProvider,Gl.instance());return n&&this._proxyTracerProvider.setDelegate(e),n}getTracerProvider(){return am(DR)||this._proxyTracerProvider}getTracer(e,n){return this.getTracerProvider().getTracer(e,n)}disable(){iw(DR,Gl.instance()),this._proxyTracerProvider=new B7}}const Pr=V5.getInstance();async function jM(t,e,n){const r=[],i=[];for(const o of t){const s=Promise.resolve().then(()=>n(o,t));if(r.push(s),e<=t.length){const a=s.then(()=>i.splice(i.indexOf(a),1));i.push(a),i.length>=e&&await Promise.race(i)}}return Promise.all(r)}const ps={FS:"fs",WEB:"web"};function Ko(t,e,n,r){if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(t):r?r.value:e.get(t)}function qg(t,e,n,r,i){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}var th,Cl,hg,s1,QC;const W7="__TAURI_TO_IPC_KEY__";function cWe(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}class Wce{constructor(e){th.set(this,void 0),Cl.set(this,0),hg.set(this,[]),s1.set(this,void 0),qg(this,th,e||(()=>{})),this.id=cWe(n=>{const r=n.index;if("end"in n){r==Ko(this,Cl,"f")?this.cleanupCallback():qg(this,s1,r);return}const i=n.message;if(r==Ko(this,Cl,"f")){for(Ko(this,th,"f").call(this,i),qg(this,Cl,Ko(this,Cl,"f")+1);Ko(this,Cl,"f")in Ko(this,hg,"f");){const o=Ko(this,hg,"f")[Ko(this,Cl,"f")];Ko(this,th,"f").call(this,o),delete Ko(this,hg,"f")[Ko(this,Cl,"f")],qg(this,Cl,Ko(this,Cl,"f")+1)}Ko(this,Cl,"f")===Ko(this,s1,"f")&&this.cleanupCallback()}else Ko(this,hg,"f")[r]=i})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){qg(this,th,e)}get onmessage(){return Ko(this,th,"f")}[(th=new WeakMap,Cl=new WeakMap,hg=new WeakMap,s1=new WeakMap,W7)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[W7]()}}async function Yr(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}class uWe{get rid(){return Ko(this,QC,"f")}constructor(e){QC.set(this,void 0),qg(this,QC,e)}async close(){return Yr("plugin:resources|close",{rid:this.rid})}}QC=new WeakMap;var NM;(function(t){t[t.Audio=1]="Audio",t[t.Cache=2]="Cache",t[t.Config=3]="Config",t[t.Data=4]="Data",t[t.LocalData=5]="LocalData",t[t.Document=6]="Document",t[t.Download=7]="Download",t[t.Picture=8]="Picture",t[t.Public=9]="Public",t[t.Video=10]="Video",t[t.Resource=11]="Resource",t[t.Temp=12]="Temp",t[t.AppConfig=13]="AppConfig",t[t.AppData=14]="AppData",t[t.AppLocalData=15]="AppLocalData",t[t.AppCache=16]="AppCache",t[t.AppLog=17]="AppLog",t[t.Desktop=18]="Desktop",t[t.Executable=19]="Executable",t[t.Font=20]="Font",t[t.Home=21]="Home",t[t.Runtime=22]="Runtime",t[t.Template=23]="Template"})(NM||(NM={}));var MM;(function(t){t[t.Start=0]="Start",t[t.Current=1]="Current",t[t.End=2]="End"})(MM||(MM={}));function F5(t){return{isFile:t.isFile,isDirectory:t.isDirectory,isSymlink:t.isSymlink,size:t.size,mtime:t.mtime!==null?new Date(t.mtime):null,atime:t.atime!==null?new Date(t.atime):null,birthtime:t.birthtime!==null?new Date(t.birthtime):null,readonly:t.readonly,fileAttributes:t.fileAttributes,dev:t.dev,ino:t.ino,mode:t.mode,nlink:t.nlink,uid:t.uid,gid:t.gid,rdev:t.rdev,blksize:t.blksize,blocks:t.blocks}}class B5 extends uWe{async read(e){if(e.byteLength===0)return 0;const[n,r]=await Yr("plugin:fs|read",{rid:this.rid,len:e.byteLength});return e.set(n),r===0?null:r}async seek(e,n){return await Yr("plugin:fs|seek",{rid:this.rid,offset:e,whence:n})}async stat(){const e=await Yr("plugin:fs|fstat",{rid:this.rid});return F5(e)}async truncate(e){await Yr("plugin:fs|ftruncate",{rid:this.rid,len:e})}async write(e){return await Yr("plugin:fs|write",{rid:this.rid,data:e})}}async function dWe(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");const n=await Yr("plugin:fs|create",{path:t instanceof URL?t.toString():t,options:e});return new B5(n)}async function pWe(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");const n=await Yr("plugin:fs|open",{path:t instanceof URL?t.toString():t,options:e});return new B5(n)}async function fWe(t,e,n){if(t instanceof URL&&t.protocol!=="file:"||e instanceof URL&&e.protocol!=="file:")throw new TypeError("Must be a file URL.");await Yr("plugin:fs|copy_file",{fromPath:t instanceof URL?t.toString():t,toPath:e instanceof URL?e.toString():e,options:n})}async function DM(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await Yr("plugin:fs|mkdir",{path:t instanceof URL?t.toString():t,options:e})}async function W5(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");return await Yr("plugin:fs|read_dir",{path:t instanceof URL?t.toString():t,options:e})}async function Xce(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");const n=await Yr("plugin:fs|read_file",{path:t instanceof URL?t.toString():t,options:e});return n instanceof ArrayBuffer?new Uint8Array(n):Uint8Array.from(n)}async function m$(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");return await Yr("plugin:fs|read_text_file",{path:t instanceof URL?t.toString():t,options:e})}async function hWe(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");const n=t instanceof URL?t.toString():t;return await Promise.resolve({path:n,rid:null,async next(){this.rid===null&&(this.rid=await Yr("plugin:fs|read_text_file_lines",{path:n,options:e}));const[r,i]=await Yr("plugin:fs|read_text_file_lines_next",{rid:this.rid});return i&&(this.rid=null),{value:i?"":r,done:i}},[Symbol.asyncIterator](){return this}})}async function Zce(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await Yr("plugin:fs|remove",{path:t instanceof URL?t.toString():t,options:e})}async function Gce(t,e,n){if(t instanceof URL&&t.protocol!=="file:"||e instanceof URL&&e.protocol!=="file:")throw new TypeError("Must be a file URL.");await Yr("plugin:fs|rename",{oldPath:t instanceof URL?t.toString():t,newPath:e instanceof URL?e.toString():e,options:n})}async function mWe(t,e){const n=await Yr("plugin:fs|stat",{path:t instanceof URL?t.toString():t,options:e});return F5(n)}async function gWe(t,e){const n=await Yr("plugin:fs|lstat",{path:t instanceof URL?t.toString():t,options:e});return F5(n)}async function yWe(t,e,n){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await Yr("plugin:fs|truncate",{path:t instanceof URL?t.toString():t,len:e,options:n})}async function vWe(t,e,n){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await Yr("plugin:fs|write_file",e,{headers:{path:t instanceof URL?t.toString():t,options:JSON.stringify(n)}})}async function Yce(t,e,n){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");await Yr("plugin:fs|write_text_file",{path:t instanceof URL?t.toString():t,data:e,options:n})}async function g$(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");return await Yr("plugin:fs|exists",{path:t instanceof URL?t.toString():t,options:e})}async function Hce(t){await Yr("plugin:fs|unwatch",{rid:t})}async function bWe(t,e,n){const r={recursive:!1,delayMs:2e3,...n},i=Array.isArray(t)?t:[t];for(const a of i)if(a instanceof URL&&a.protocol!=="file:")throw new TypeError("Must be a file URL.");const o=new Wce;o.onmessage=e;const s=await Yr("plugin:fs|watch",{paths:i.map(a=>a instanceof URL?a.toString():a),options:r,onEvent:o});return()=>{Hce(s)}}async function OWe(t,e,n){const r={recursive:!1,...n,delayMs:null},i=Array.isArray(t)?t:[t];for(const a of i)if(a instanceof URL&&a.protocol!=="file:")throw new TypeError("Must be a file URL.");const o=new Wce;o.onmessage=e;const s=await Yr("plugin:fs|watch",{paths:i.map(a=>a instanceof URL?a.toString():a),options:r,onEvent:o});return()=>{Hce(s)}}const y$=Object.freeze(Object.defineProperty({__proto__:null,get BaseDirectory(){return NM},FileHandle:B5,get SeekMode(){return MM},copyFile:fWe,create:dWe,exists:g$,lstat:gWe,mkdir:DM,open:pWe,readDir:W5,readFile:Xce,readTextFile:m$,readTextFileLines:hWe,remove:Zce,rename:Gce,stat:mWe,truncate:yWe,watch:bWe,watchImmediate:OWe,writeFile:vWe,writeTextFile:Yce},Symbol.toStringTag,{value:"Module"}));var Jr;(function(t){t[t.Audio=1]="Audio",t[t.Cache=2]="Cache",t[t.Config=3]="Config",t[t.Data=4]="Data",t[t.LocalData=5]="LocalData",t[t.Document=6]="Document",t[t.Download=7]="Download",t[t.Picture=8]="Picture",t[t.Public=9]="Public",t[t.Video=10]="Video",t[t.Resource=11]="Resource",t[t.Temp=12]="Temp",t[t.AppConfig=13]="AppConfig",t[t.AppData=14]="AppData",t[t.AppLocalData=15]="AppLocalData",t[t.AppCache=16]="AppCache",t[t.AppLog=17]="AppLog",t[t.Desktop=18]="Desktop",t[t.Executable=19]="Executable",t[t.Font=20]="Font",t[t.Home=21]="Home",t[t.Runtime=22]="Runtime",t[t.Template=23]="Template"})(Jr||(Jr={}));async function xWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.AppConfig})}async function QM(){return Gt("plugin:path|resolve_directory",{directory:Jr.AppData})}async function wWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.AppLocalData})}async function SWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.AppCache})}async function _We(){return Gt("plugin:path|resolve_directory",{directory:Jr.Audio})}async function CWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Cache})}async function TWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Config})}async function IWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Data})}async function Kce(){return Gt("plugin:path|resolve_directory",{directory:Jr.Desktop})}async function kWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Document})}async function PWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Download})}async function $We(){return Gt("plugin:path|resolve_directory",{directory:Jr.Executable})}async function EWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Font})}async function AWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Home})}async function RWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.LocalData})}async function jWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Picture})}async function NWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Public})}async function MWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Resource})}async function DWe(t){return Gt("plugin:path|resolve_directory",{directory:Jr.Resource,path:t})}async function QWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Runtime})}async function LWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Template})}async function qWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Video})}async function zWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.AppLog})}async function UWe(){return Gt("plugin:path|resolve_directory",{directory:Jr.Temp})}function X5(){return window.__TAURI_INTERNALS__.plugins.path.sep}function VWe(){return window.__TAURI_INTERNALS__.plugins.path.delimiter}async function Jce(...t){return Gt("plugin:path|resolve",{paths:t})}async function FWe(t){return Gt("plugin:path|normalize",{path:t})}async function xy(...t){return Gt("plugin:path|join",{paths:t})}async function eue(t){return Gt("plugin:path|dirname",{path:t})}async function tue(t){return Gt("plugin:path|extname",{path:t})}async function Z5(t,e){return Gt("plugin:path|basename",{path:t,ext:e})}async function nue(t){return Gt("plugin:path|is_absolute",{path:t})}const rue=Object.freeze(Object.defineProperty({__proto__:null,get BaseDirectory(){return Jr},appCacheDir:SWe,appConfigDir:xWe,appDataDir:QM,appLocalDataDir:wWe,appLogDir:zWe,audioDir:_We,basename:Z5,cacheDir:CWe,configDir:TWe,dataDir:IWe,delimiter:VWe,desktopDir:Kce,dirname:eue,documentDir:kWe,downloadDir:PWe,executableDir:$We,extname:tue,fontDir:EWe,homeDir:AWe,isAbsolute:nue,join:xy,localDataDir:RWe,normalize:FWe,pictureDir:jWe,publicDir:NWe,resolve:Jce,resolveResource:DWe,resourceDir:MWe,runtimeDir:QWe,sep:X5,tempDir:UWe,templateDir:LWe,videoDir:qWe},Symbol.toStringTag,{value:"Module"}));class Jn{static utils=null;static async getUtils(){return Jn.utils||(Jn.utils=Kn()?await Promise.resolve().then(()=>require("./replay-tauri-path-B0zja3Cg.js")):await Promise.resolve().then(()=>nke)),Jn.utils}static async dirname(e){return(await Jn.getUtils()).dirname(e)}static async join(...e){return(await Jn.getUtils()).join(...e)}static async resolve(e){return(await Jn.getUtils()).resolve(e)}static async isAbsolute(e){return(await Jn.getUtils()).isAbsolute(e)}static async relative(e,n){return(await Jn.getUtils()).relative(e,n)}static async extname(e){return(await Jn.getUtils()).extname(e)}}class G5{listeners=new Map;on(e,n){let r=this.listeners.get(e);r||(r=new Set,this.listeners.set(e,r)),r.add(n)}off(e,n){this.listeners.get(e)?.delete(n)}emit(e,n){const r=this.listeners.get(e);if(r)for(const i of r)i(n)}subscribe(e,n){return this.on(e,n),()=>{this.off(e,n)}}removeAllListeners(e){if(e!==void 0){this.listeners.delete(e);return}this.listeners.clear()}}const BWe=new Set(["node_modules"]);class LM extends G5{constructor(e){super(),this.baseDir=e,this.initializeDirectory(e)}baseDir;writeExcludedKeys=new Set;writeEndTimers=new Map;async initializeDirectory(e){await DM(e,{recursive:!0})}setWriteExcludedKeys(e){this.writeExcludedKeys=e}async ls(e){const n=await this.getFullPath(e);return this.getDirEntryFilesRecursively(n)}async getDirEntryFilesRecursively(e){try{const n=[],r=await W5(e);for(const i of r)if(i.isDirectory){if(BWe.has(i.name))continue;const o=await xy(e,i.name),s=await this.getDirEntryFilesRecursively(o);n.push(...s)}else{const o=await xy(e,i.name),s=await Jn.relative(this.baseDir,o);n.push(s)}return n}catch(n){return n.includes("forbidden path")||console.error(n),[]}}async get(e){const n=await this.getFullPath(e);try{return await m$(n)}catch(r){return!r.includes("No such file or directory")&&!r.includes("forbidden path")&&console.error(r),null}}async has(e){const n=await this.getFullPath(e);return await g$(n)}async set(e,n){if(!this.writeExcludedKeys.has(e)){this.emit("write-start",e);try{const r=await this.getFullPath(e),i=X5(),o=r.split(i).slice(0,-1).join(i);await DM(o,{recursive:!0}),await Yce(r,n)}finally{const r=this.writeEndTimers.get(e);r&&clearTimeout(r);const i=setTimeout(()=>{this.emit("write-end",e),this.writeEndTimers.delete(e)},1e3);this.writeEndTimers.set(e,i)}}}async remove(e){if(!this.writeExcludedKeys.has(e)){this.emit("write-start",e);try{const n=await this.getFullPath(e);await Zce(n)}catch(n){!n.includes("No such file or directory")&&!n.includes("forbidden path")&&console.error(n)}finally{const n=this.writeEndTimers.get(e);n&&clearTimeout(n);const r=setTimeout(()=>{this.emit("write-end",e),this.writeEndTimers.delete(e)},1e3);this.writeEndTimers.set(e,r)}}}async rename(e,n){const r=await this.getFullPath(e),i=await this.getFullPath(n);await Gce(r,i)}async getFullPath(e){return await xy(this.baseDir,e??"")}}class WWe{baseDir="";async ls(e=""){return[]}async get(e){return null}async has(e){return!1}async set(e,n){}async remove(e){}async rename(e,n){}setWriteExcludedKeys(e){}on(e,n){}off(e,n){}}class XWe{constructor(e){this.projectId=e}projectId;async get(){const e=this.getKey();return localStorage.getItem(e)??null}async set(e){const n=this.getKey();localStorage.setItem(n,e)}async remove(){const e=this.getKey();localStorage.removeItem(e)}getKey(){return`replay:secrets:${this.projectId}`}}class iue{constructor(e){this.storage=e}storage;itemIds=[];async getAbsolutePath(e){return await Jn.resolve(await Jn.join(this.storage.baseDir,"/",e))}async parseMany(e,n){return(await Promise.all(e.map(async i=>{try{return await this.parse(i,n)}catch(o){return console.error(`Error parsing from ${i.type} ${i.uri}:`,o),null}}))).filter(i=>i!==null)}setItemIds(e){this.itemIds=e}async write(e){e.state===Bn.Draft||e.srcType!==ps.FS||await this.storage.set(e.id,await this.stringify(e))}async remove(e){await this.storage.remove(e)}async updateRoot(e,n){const r=e.actions;if(r){for(const o in r){const s=parseInt(o);switch(r[o]){case"D":await this.remove(this.itemIds[s]);break;case"I":case"U":await this.write(n[s]);break}}return}const i=this.itemIds.filter(o=>!n.some(s=>s.id===o));await Promise.all([...n.map(o=>this.write(o)),...i.map(o=>this.remove(o))])}async update(e,n){const i={path:e.path.slice(1),actions:e.actions};if(i.path.length===0&&await this.updateRoot(i,n),i.path.length>0){const o=i.path[0];i.path.length===1&&i.actions&&i.actions.id==="U"&&await this.remove(this.itemIds[o]),i.path[1]&&i.path[1]==="id"&&await this.remove(this.itemIds[o]),await this.write(n[o])}this.itemIds=n.map(o=>o.id)}}class ZWe extends iue{parse(e){return{...e.content,id:e.uri,srcType:e.type,fileDependencies:e.fileDependencies}}async stringify(e){const{id:n,srcType:r,fileDependencies:i,...o}=e;return await Jn.extname(n)===".json"?JSON.stringify(o,null,2):Jh.dump(o)}async write(e){await this.storage.has(e.id)||await super.write(e)}}var So=(t=>(t.SIMPLE="simple",t.REGEX="regex",t.JSONPATH="jsonpath",t.XPATH="xpath",t))(So||{});class CI{constructor(e,n={},r){this.pattern=e,this.separator=n.separator||".",this.segments=this._parse(e),this.data=r,this._hasDeepWildcard=this.segments.some(i=>i.type==="deep-wildcard"),this._hasAttributeCondition=this.segments.some(i=>i.attrName!==void 0),this._hasPositionSelector=this.segments.some(i=>i.position!==void 0)}_parse(e){const n=[];let r=0,i="";for(;r<e.length;)e[r]===this.separator?r+1<e.length&&e[r+1]===this.separator?(i.trim()&&(n.push(this._parseSegment(i.trim())),i=""),n.push({type:"deep-wildcard"}),r+=2):(i.trim()&&n.push(this._parseSegment(i.trim())),i="",r++):(i+=e[r],r++);return i.trim()&&n.push(this._parseSegment(i.trim())),n}_parseSegment(e){const n={type:"tag"};let r=null,i=e;const o=e.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(o&&(i=o[1]+o[3],o[2])){const u=o[2].slice(1,-1);u&&(r=u)}let s,a=i;if(i.includes("::")){const u=i.indexOf("::");if(s=i.substring(0,u).trim(),a=i.substring(u+2).trim(),!s)throw new Error(`Invalid namespace in pattern: ${e}`)}let l,c=null;if(a.includes(":")){const u=a.lastIndexOf(":"),d=a.substring(0,u).trim(),p=a.substring(u+1).trim();["first","last","odd","even"].includes(p)||/^nth\(\d+\)$/.test(p)?(l=d,c=p):l=a}else l=a;if(!l)throw new Error(`Invalid segment pattern: ${e}`);if(n.tag=l,s&&(n.namespace=s),r)if(r.includes("=")){const u=r.indexOf("=");n.attrName=r.substring(0,u).trim(),n.attrValue=r.substring(u+1).trim()}else n.attrName=r.trim();if(c){const u=c.match(/^nth\((\d+)\)$/);u?(n.position="nth",n.positionValue=parseInt(u[1],10)):n.position=c}return n}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class GWe{constructor(e){this._matcher=e}get separator(){return this._matcher.separator}getCurrentTag(){const e=this._matcher.path;return e.length>0?e[e.length-1].tag:void 0}getCurrentNamespace(){const e=this._matcher.path;return e.length>0?e[e.length-1].namespace:void 0}getAttrValue(e){const n=this._matcher.path;if(n.length!==0)return n[n.length-1].values?.[e]}hasAttr(e){const n=this._matcher.path;if(n.length===0)return!1;const r=n[n.length-1];return r.values!==void 0&&e in r.values}getPosition(){const e=this._matcher.path;return e.length===0?-1:e[e.length-1].position??0}getCounter(){const e=this._matcher.path;return e.length===0?-1:e[e.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(e,n=!0){return this._matcher.toString(e,n)}toArray(){return this._matcher.path.map(e=>e.tag)}matches(e){return this._matcher.matches(e)}matchesAny(e){return e.matchesAny(this._matcher)}}class oue{constructor(e={}){this.separator=e.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new GWe(this)}push(e,n=null,r=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);const i=this.path.length;this.siblingStacks[i]||(this.siblingStacks[i]=new Map);const o=this.siblingStacks[i],s=r?`${r}:${e}`:e,a=o.get(s)||0;let l=0;for(const u of o.values())l+=u;o.set(s,a+1);const c={tag:e,position:l,counter:a};r!=null&&(c.namespace=r),n!=null&&(c.values=n),this.path.push(c)}pop(){if(this.path.length===0)return;this._pathStringCache=null;const e=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),e}updateCurrent(e){if(this.path.length>0){const n=this.path[this.path.length-1];e!=null&&(n.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){if(this.path.length!==0)return this.path[this.path.length-1].values?.[e]}hasAttr(e){if(this.path.length===0)return!1;const n=this.path[this.path.length-1];return n.values!==void 0&&e in n.values}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,n=!0){const r=e||this.separator;if(r===this.separator&&n===!0){if(this._pathStringCache!==null)return this._pathStringCache;const o=this.path.map(s=>s.namespace?`${s.namespace}:${s.tag}`:s.tag).join(r);return this._pathStringCache=o,o}return this.path.map(o=>n&&o.namespace?`${o.namespace}:${o.tag}`:o.tag).join(r)}toArray(){return this.path.map(e=>e.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(e){const n=e.segments;return n.length===0?!1:e.hasDeepWildcard()?this._matchWithDeepWildcard(n):this._matchSimple(n)}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let n=0;n<e.length;n++)if(!this._matchSegment(e[n],this.path[n],n===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(e){let n=this.path.length-1,r=e.length-1;for(;r>=0&&n>=0;){const i=e[r];if(i.type==="deep-wildcard"){if(r--,r<0)return!0;const o=e[r];let s=!1;for(let a=n;a>=0;a--)if(this._matchSegment(o,this.path[a],a===this.path.length-1)){n=a-1,r--,s=!0;break}if(!s)return!1}else{if(!this._matchSegment(i,this.path[n],n===this.path.length-1))return!1;n--,r--}}return r<0}_matchSegment(e,n,r){if(e.tag!=="*"&&e.tag!==n.tag||e.namespace!==void 0&&e.namespace!=="*"&&e.namespace!==n.namespace||e.attrName!==void 0&&(!r||!n.values||!(e.attrName in n.values)||e.attrValue!==void 0&&String(n.values[e.attrName])!==String(e.attrValue)))return!1;if(e.position!==void 0){if(!r)return!1;const i=n.counter??0;if(e.position==="first"&&i!==0)return!1;if(e.position==="odd"&&i%2!==1)return!1;if(e.position==="even"&&i%2!==0)return!1;if(e.position==="nth"&&i!==e.positionValue)return!1}return!0}matchesAny(e){return e.matchesAny(this)}snapshot(){return{path:this.path.map(e=>({...e})),siblingStacks:this.siblingStacks.map(e=>new Map(e))}}restore(e){this._pathStringCache=null,this.path=e.path.map(n=>({...n})),this.siblingStacks=e.siblingStacks.map(n=>new Map(n))}readOnly(){return this._view}}function sue(t){return String(t).replace(/--/g,"- -").replace(/--/g,"- -").replace(/-$/,"- ")}function aue(t){return String(t).replace(/\]\]>/g,"]]]]><![CDATA[>")}function Zy(t){return String(t).replace(/"/g,"&quot;").replace(/'/g,"&apos;")}const lue=":A-Za-z_À-ÖØ-öø-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�",YWe=lue+"\\-\\.\\d·̀-ͯ‿-⁀",cue=":A-Za-z_À-˿Ͱ-ͽͿ-҆҈-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",HWe=cue+"\\-\\.\\d·̀-ͯ҇‿-⁀",uue=(t,e,n="")=>{const r=t.replace(":",""),i=e.replace(":",""),o=`[${r}][${i}]*`;return{name:new RegExp(`^[${t}][${e}]*$`,n),ncName:new RegExp(`^${o}$`,n),qName:new RegExp(`^${o}(?::${o})?$`,n),nmToken:new RegExp(`^[${e}]+$`,n),nmTokens:new RegExp(`^[${e}]+(?:\\s+[${e}]+)*$`,n)}},KWe=uue(lue,YWe),JWe=uue(cue,HWe,"u"),e7e=(t="1.0")=>t==="1.1"?JWe:KWe,due=(t,{xmlVersion:e="1.0"}={})=>e7e(e).qName.test(t),t7e=`
294
294
  `;function n7e(t,e){if(!Array.isArray(t)||t.length===0)return"1.0";const n=t[0];if(Y5(n)==="?xml"){const i=n[":@"];if(i){const o=e.attributeNamePrefix+"version";if(i[o])return i[o]}}return"1.0"}function pue(t,e,n,r,i){return!n.sanitizeName||due(t,{xmlVersion:i})?t:n.sanitizeName(t,{isAttribute:e,matcher:r.readOnly()})}function r7e(t,e){let n="";e.format&&(n=t7e);const r=[];if(e.stopNodes&&Array.isArray(e.stopNodes))for(let s=0;s<e.stopNodes.length;s++){const a=e.stopNodes[s];typeof a=="string"?r.push(new CI(a)):a instanceof CI&&r.push(a)}const i=n7e(t,e),o=new oue;return fue(t,e,n,o,r,i)}function fue(t,e,n,r,i,o){let s="",a=!1;if(e.maxNestedTags&&r.getDepth()>e.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(t)){if(t!=null){let l=t.toString();return l=qM(l,e),l}return""}for(let l=0;l<t.length;l++){const c=t[l],u=Y5(c);if(u===void 0)continue;const p=u===e.textNodeName||u===e.cdataPropName||u===e.commentPropName||u[0]==="?"?u:pue(u,!1,e,r,o),f=i7e(c[":@"],e);r.push(p,f);const m=s7e(r,i);if(p===e.textNodeName){let x=c[u];m||(x=e.tagValueProcessor(p,x),x=qM(x,e)),a&&(s+=n),s+=x,a=!1,r.pop();continue}else if(p===e.cdataPropName){a&&(s+=n);const x=c[u][0][e.textNodeName],O=aue(x);s+=`<![CDATA[${O}]]>`,a=!1,r.pop();continue}else if(p===e.commentPropName){const x=c[u][0][e.textNodeName],O=sue(x);s+=n+`<!--${O}-->`,a=!0,r.pop();continue}else if(p[0]==="?"){const x=X7(c[":@"],e,m,r,o);s+=(p==="?xml"?"":n)+`<${p}${x}?>`,a=!0,r.pop();continue}let g=n;g!==""&&(g+=e.indentBy);const y=X7(c[":@"],e,m,r,o),b=n+`<${p}${y}`;let v;m?v=hue(c[u],e):v=fue(c[u],e,g,r,i,o),e.unpairedTags.indexOf(p)!==-1?e.suppressUnpairedNode?s+=b+">":s+=b+"/>":(!v||v.length===0)&&e.suppressEmptyNode?s+=b+"/>":v&&v.endsWith(">")?s+=b+`>${v}${n}</${p}>`:(s+=b+">",v&&n!==""&&(v.includes("/>")||v.includes("</"))?s+=n+e.indentBy+v+n:s+=v,s+=`</${p}>`),a=!0,r.pop()}return s}function i7e(t,e){if(!t||e.ignoreAttributes)return null;const n={};let r=!1;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;const o=i.startsWith(e.attributeNamePrefix)?i.substr(e.attributeNamePrefix.length):i;n[o]=Zy(t[i]),r=!0}return r?n:null}function hue(t,e){if(!Array.isArray(t))return t!=null?t.toString():"";let n="";for(let r=0;r<t.length;r++){const i=t[r],o=Y5(i);if(o===e.textNodeName)n+=i[o];else if(o===e.cdataPropName)n+=i[o][0][e.textNodeName];else if(o===e.commentPropName)n+=i[o][0][e.textNodeName];else{if(o&&o[0]==="?")continue;if(o){const s=o7e(i[":@"],e),a=hue(i[o],e);!a||a.length===0?n+=`<${o}${s}/>`:n+=`<${o}${s}>${a}</${o}>`}}}return n}function o7e(t,e){let n="";if(t&&!e.ignoreAttributes)for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let i=t[r];i===!0&&e.suppressBooleanAttributes?n+=` ${r.substr(e.attributeNamePrefix.length)}`:n+=` ${r.substr(e.attributeNamePrefix.length)}="${Zy(i)}"`}return n}function Y5(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const r=e[n];if(Object.prototype.hasOwnProperty.call(t,r)&&r!==":@")return r}}function X7(t,e,n,r,i){let o="";if(t&&!e.ignoreAttributes)for(let s in t){if(!Object.prototype.hasOwnProperty.call(t,s))continue;const a=s.substr(e.attributeNamePrefix.length),l=n?a:pue(a,!0,e,r,i);let c;n?c=t[s]:(c=e.attributeValueProcessor(s,t[s]),c=qM(c,e)),c===!0&&e.suppressBooleanAttributes?o+=` ${l}`:o+=` ${l}="${Zy(c)}"`}return o}function s7e(t,e){if(!e||e.length===0)return!1;for(let n=0;n<e.length;n++)if(t.matches(e[n]))return!0;return!1}function qM(t,e){if(t&&t.length>0&&e.processEntities)for(let n=0;n<e.entities.length;n++){const r=e.entities[n];t=t.replace(r.regex,r.val)}return t}function a7e(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(const n of t)if(typeof n=="string"&&e===n||n instanceof RegExp&&n.test(e))return!0}:()=>!1}const l7e={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0,sanitizeName:!1};function ml(t){if(this.options=Object.assign({},l7e,t),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>typeof e=="string"&&e.startsWith("*.")?".."+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let e=0;e<this.options.stopNodes.length;e++){const n=this.options.stopNodes[e];typeof n=="string"?this.stopNodeExpressions.push(new CI(n)):n instanceof CI&&this.stopNodeExpressions.push(n)}this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=a7e(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=p7e),this.processTextOrObjNode=u7e,this.options.format?(this.indentate=d7e,this.tagEndChar=`>
295
295
  `,this.newLine=`
296
296
  `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function c7e(t,e){const n=t["?xml"];if(n&&typeof n=="object"){if(e.attributesGroupName&&n[e.attributesGroupName]){const i=n[e.attributesGroupName][e.attributeNamePrefix+"version"];if(i)return i}const r=n[e.attributeNamePrefix+"version"];if(r)return r}return"1.0"}function QR(t,e,n,r,i){return!n.sanitizeName||due(t,{xmlVersion:i})?t:n.sanitizeName(t,{isAttribute:e,matcher:r.readOnly()})}ml.prototype.build=function(t){if(this.options.preserveOrder)return r7e(t,this.options);{Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t});const e=new oue,n=c7e(t,this.options);return this.j2x(t,0,e,n).val}};ml.prototype.j2x=function(t,e,n,r){let i="",o="";if(this.options.maxNestedTags&&n.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");const s=this.options.jPath?n.toString():n,a=this.checkStopNode(n);for(let l in t){if(!Object.prototype.hasOwnProperty.call(t,l))continue;const u=l===this.options.textNodeName||l===this.options.cdataPropName||l===this.options.commentPropName||this.options.attributesGroupName&&l===this.options.attributesGroupName||this.isAttribute(l)||l[0]==="?"?l:QR(l,!1,this.options,n,r);if(typeof t[l]>"u")this.isAttribute(l)&&(o+="");else if(t[l]===null)this.isAttribute(l)||u===this.options.cdataPropName||u===this.options.commentPropName?o+="":u[0]==="?"?o+=this.indentate(e)+"<"+u+"?"+this.tagEndChar:o+=this.indentate(e)+"<"+u+"/"+this.tagEndChar;else if(t[l]instanceof Date)o+=this.buildTextValNode(t[l],u,"",e,n);else if(typeof t[l]!="object"){const d=this.isAttribute(l);if(d&&!this.ignoreAttributesFn(d,s)){const p=QR(d,!0,this.options,n,r);i+=this.buildAttrPairStr(p,""+t[l],a)}else if(!d)if(l===this.options.textNodeName){let p=this.options.tagValueProcessor(l,""+t[l]);o+=this.replaceEntitiesValue(p)}else{n.push(u);const p=this.checkStopNode(n);if(n.pop(),p){const f=""+t[l];f===""?o+=this.indentate(e)+"<"+u+this.closeTag(u)+this.tagEndChar:o+=this.indentate(e)+"<"+u+">"+f+"</"+u+this.tagEndChar}else o+=this.buildTextValNode(t[l],u,"",e,n)}}else if(Array.isArray(t[l])){const d=t[l].length;let p="",f="";for(let m=0;m<d;m++){const g=t[l][m];if(!(typeof g>"u"))if(g===null)u[0]==="?"?o+=this.indentate(e)+"<"+u+"?"+this.tagEndChar:o+=this.indentate(e)+"<"+u+"/"+this.tagEndChar;else if(typeof g=="object")if(this.options.oneListGroup){n.push(u);const y=this.j2x(g,e+1,n,r);n.pop(),p+=y.val,this.options.attributesGroupName&&g.hasOwnProperty(this.options.attributesGroupName)&&(f+=y.attrStr)}else p+=this.processTextOrObjNode(g,u,e,n,r);else if(this.options.oneListGroup){let y=this.options.tagValueProcessor(u,g);y=this.replaceEntitiesValue(y),p+=y}else{n.push(u);const y=this.checkStopNode(n);if(n.pop(),y){const b=""+g;b===""?p+=this.indentate(e)+"<"+u+this.closeTag(u)+this.tagEndChar:p+=this.indentate(e)+"<"+u+">"+b+"</"+u+this.tagEndChar}else p+=this.buildTextValNode(g,u,"",e,n)}}this.options.oneListGroup&&(p=this.buildObjectNode(p,u,f,e)),o+=p}else if(this.options.attributesGroupName&&l===this.options.attributesGroupName){const d=Object.keys(t[l]),p=d.length;for(let f=0;f<p;f++){const m=QR(d[f],!0,this.options,n,r);i+=this.buildAttrPairStr(m,""+t[l][d[f]],a)}}else o+=this.processTextOrObjNode(t[l],u,e,n,r)}return{attrStr:i,val:o}};ml.prototype.buildAttrPairStr=function(t,e,n){return n||(e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e)),this.options.suppressBooleanAttributes&&e==="true"?" "+t:" "+t+'="'+Zy(e)+'"'};function u7e(t,e,n,r,i){const o=this.extractAttributes(t);if(r.push(e,o),this.checkStopNode(r)){const l=this.buildRawContent(t),c=this.buildAttributesForStopNode(t);return r.pop(),this.buildObjectNode(l,e,c,n)}const a=this.j2x(t,n+1,r,i);return r.pop(),e[0]==="?"?this.buildTextValNode("",e,a.attrStr,n,r):t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,a.attrStr,n,r):this.buildObjectNode(a.val,e,a.attrStr,n)}ml.prototype.extractAttributes=function(t){if(!t||typeof t!="object")return null;const e={};let n=!1;if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){const r=t[this.options.attributesGroupName];for(let i in r){if(!Object.prototype.hasOwnProperty.call(r,i))continue;const o=i.startsWith(this.options.attributeNamePrefix)?i.substring(this.options.attributeNamePrefix.length):i;e[o]=Zy(r[i]),n=!0}}else for(let r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;const i=this.isAttribute(r);i&&(e[i]=Zy(t[r]),n=!0)}return n?e:null};ml.prototype.buildRawContent=function(t){if(typeof t=="string")return t;if(typeof t!="object"||t===null)return String(t);if(t[this.options.textNodeName]!==void 0)return t[this.options.textNodeName];let e="";for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n)||this.isAttribute(n)||this.options.attributesGroupName&&n===this.options.attributesGroupName)continue;const r=t[n];if(n===this.options.textNodeName)e+=r;else if(Array.isArray(r)){for(let i of r)if(typeof i=="string"||typeof i=="number")e+=`<${n}>${i}</${n}>`;else if(typeof i=="object"&&i!==null){const o=this.buildRawContent(i),s=this.buildAttributesForStopNode(i);o===""?e+=`<${n}${s}/>`:e+=`<${n}${s}>${o}</${n}>`}}else if(typeof r=="object"&&r!==null){const i=this.buildRawContent(r),o=this.buildAttributesForStopNode(r);i===""?e+=`<${n}${o}/>`:e+=`<${n}${o}>${i}</${n}>`}else e+=`<${n}>${r}</${n}>`}return e};ml.prototype.buildAttributesForStopNode=function(t){if(!t||typeof t!="object")return"";let e="";if(this.options.attributesGroupName&&t[this.options.attributesGroupName]){const n=t[this.options.attributesGroupName];for(let r in n){if(!Object.prototype.hasOwnProperty.call(n,r))continue;const i=r.startsWith(this.options.attributeNamePrefix)?r.substring(this.options.attributeNamePrefix.length):r,o=n[r];o===!0&&this.options.suppressBooleanAttributes?e+=" "+i:e+=" "+i+'="'+o+'"'}}else for(let n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;const r=this.isAttribute(n);if(r){const i=t[n];i===!0&&this.options.suppressBooleanAttributes?e+=" "+r:e+=" "+r+'="'+i+'"'}}return e};ml.prototype.buildObjectNode=function(t,e,n,r){if(t==="")return e[0]==="?"?this.indentate(r)+"<"+e+n+"?"+this.tagEndChar:this.indentate(r)+"<"+e+n+this.closeTag(e)+this.tagEndChar;if(e[0]==="?")return this.indentate(r)+"<"+e+n+"?"+this.tagEndChar;{let i="</"+e+this.tagEndChar,o="";return e[0]==="?"&&(o="?",i=""),(n||n==="")&&t.indexOf("<")===-1?this.indentate(r)+"<"+e+n+o+">"+t+i:this.options.commentPropName!==!1&&e===this.options.commentPropName&&o.length===0?this.indentate(r)+`<!--${t}-->`+this.newLine:this.indentate(r)+"<"+e+n+o+this.tagEndChar+t+this.indentate(r)+i}};ml.prototype.closeTag=function(t){let e="";return this.options.unpairedTags.indexOf(t)!==-1?this.options.suppressUnpairedNode||(e="/"):this.options.suppressEmptyNode?e="/":e=`></${t}`,e};ml.prototype.checkStopNode=function(t){if(!this.stopNodeExpressions||this.stopNodeExpressions.length===0)return!1;for(let e=0;e<this.stopNodeExpressions.length;e++)if(t.matches(this.stopNodeExpressions[e]))return!0;return!1};ml.prototype.buildTextValNode=function(t,e,n,r,i){if(this.options.cdataPropName!==!1&&e===this.options.cdataPropName){const o=aue(t);return this.indentate(r)+`<![CDATA[${o}]]>`+this.newLine}else if(this.options.commentPropName!==!1&&e===this.options.commentPropName){const o=sue(t);return this.indentate(r)+`<!--${o}-->`+this.newLine}else{if(e[0]==="?")return this.indentate(r)+"<"+e+n+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(e,t);return o=this.replaceEntitiesValue(o),o===""?this.indentate(r)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(r)+"<"+e+n+">"+o+"</"+e+this.tagEndChar}}};ml.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const n=this.options.entities[e];t=t.replace(n.regex,n.val)}return t};function d7e(t){return this.options.indentBy.repeat(t)}function p7e(t){return t.startsWith(this.options.attributeNamePrefix)&&t!==this.options.textNodeName?t.substr(this.attrPrefixLen):!1}const mue=["headers","body","query","path","cookie","security","envVariables","serverVariables","inputHints"],f7e=new Set(mue);function Z7(t){return mue.some(e=>e in t)}function v$(t){return Object.entries(t).some(([n,r])=>!f7e.has(n)&&r!=null&&typeof r=="object"&&Z7(r))?!1:Z7(t)}const ow={active:!0,key:"",value:""},h7e=/[\n\r\t]/g;function gue(t){return t.replace(h7e,"").trim()}function Su(t,e){return t.map(n=>{const r=e.boundNames==="all"||!!e.boundNames?.has(n.name);return{id:crypto.randomUUID(),key:n.name,value:r?`$inputs.${n.name}`:n.example?gue(String(n.example)):"",active:r?!0:!!n.example,in:n.in,...n.allowReserved&&{allowReserved:n.allowReserved}}})}function sw(t,e){const[n]=t.split("?"),r=e.filter(i=>i.active).map(i=>`${i.key}=${i.value}`).join("&");return`${n}${r?`?${r}`:""}`}function b$(t){const e=t.indexOf("?");if(e===-1)return[];const n=new URLSearchParams(t.slice(e+1)),r=[];for(const[i,o]of n.entries())r.push({id:crypto.randomUUID(),active:!0,key:i,value:o,in:"query"});return r}function yue(){return{id:crypto.randomUUID(),...ow}}function m7e(){return{id:crypto.randomUUID(),...ow,description:""}}function O$(t){return{...ow,id:crypto.randomUUID(),in:t}}function g7e(){return{id:crypto.randomUUID(),...ow,type:"text",files:null}}function y7e(){return{id:crypto.randomUUID(),...ow,sendIn:Ts.URL}}function LR(t){return t.map(e=>({id:crypto.randomUUID(),key:"",value:e,active:!0}))}function x$(t,e){return t.filter(n=>n.active&&n.value).map(({value:n})=>(e?vr(n,e):n).trim())}function cf(t,e){const r=e.filter(i=>!!i).flatMap(i=>i).filter(i=>i.key&&i.active);return["path","header"].includes(t)?Array.from(new Map(r.map(i=>[i.key,i])).values()):r}function v7e(t,e){return t.map(({value:n,...r})=>({...r,value:vr(n,e)}))}function b7e(t,e){if(!t.startsWith("$components.parameters."))return null;const n=t.replace("$components.parameters.","");return n&&e[n]||null}function Ti(t=[],e={}){const n=[];for(const r of t)if(Lh(r)){const i=b7e(r.reference,e);i&&n.push({...i,active:r.active,value:r.value||i.value})}else n.push(r);return n}function Lp(t){return Object.entries(t).map(([e,n])=>({id:crypto.randomUUID(),key:"",value:e,active:!0,description:n}))}function vue(t){return t.schema}function bue(t){return vue(t)?.fields??[]}function Oue(t,e){return t.flatMap(n=>{const r=vue(n),i=r?.fields||[];return i.length>0?i.flatMap(o=>G7(o.name,o.example,n.allowReserved)):G7(n.name,r?.example??n.example,n.allowReserved)})}function G7(t,e,n){if(e===void 0)return[qR(t,"",!1,n)];const r=zM(e,t);return r.length===0?[qR(t,"",!1,n)]:r.map(i=>qR(i.key,i.value,!0,n))}function zM(t,e){return t===void 0?[]:t===null?[{key:e,value:""}]:Array.isArray(t)?t.flatMap((n,r)=>n!==null&&typeof n=="object"?zM(n,`${e}[${r}]`):[{key:e,value:String(n)}]):O7e(t)?Object.entries(t).flatMap(([n,r])=>zM(r,`${e}[${n}]`)):[{key:e,value:String(t)}]}function O7e(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function qR(t,e,n,r){return{id:crypto.randomUUID(),key:t,value:gue(e),active:n,in:"query",...r&&{allowReserved:r}}}const xue={path:"path",query:"query",header:"headers",cookie:"cookie"};function H5(t){return t!==void 0}function x7e(t,e){if(t)return v$(t)?t:t[e]}function Y7(t,e,n){const r=n[xue[e]],i=n.envVariables,o=new Set;for(const s of t??[])(r?.[s.name]||i?.[s.name])&&o.add(s.name);return o}function wy(t,e,n){if(v$(n))return Y7(t,e,n);const r=new Set;for(const i of Object.values(n))if(i)for(const o of Y7(t,e,i))r.add(o);return r}function H7(t,e,n){const r=n.query,i=n.envVariables;for(const o of e??[]){const s=bue(o);for(const a of s)(r?.[a.name]||i?.[a.name])&&t.add(a.name);for(const a of[...Object.keys(r??{}),...Object.keys(i??{})])!r?.[a]&&!i?.[a]||s.some(l=>a===l.name||a.startsWith(`${l.name}[`))&&t.add(a)}}function wue(t,e,n){const r=[...t??[],...e??[]],i=new Set(wy(r,"query",n));if(v$(n))return H7(i,e,n),i;for(const o of Object.values(n))o&&H7(i,e,o);return i}const Sue=1024;let w7e=0,Ll=class{constructor(e,n){this.from=e,this.to=n}};class Sn{constructor(e={}){this.id=w7e++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=$s.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}Sn.closedBy=new Sn({deserialize:t=>t.split(" ")});Sn.openedBy=new Sn({deserialize:t=>t.split(" ")});Sn.group=new Sn({deserialize:t=>t.split(" ")});Sn.isolate=new Sn({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Sn.contextHash=new Sn({perNode:!0});Sn.lookAhead=new Sn({perNode:!0});Sn.mounted=new Sn({perNode:!0});class R0{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[Sn.mounted.id]}}const S7e=Object.create(null);class $s{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):S7e,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new $s(e.name||"",n,e.id,r);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Sn.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(Sn.group),o=-1;o<(i?i.length:0);o++){let s=n[o<0?r.name:i[o]];if(s)return s}}}}$s.none=new $s("",Object.create(null),0,8);class w${constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let o of e){let s=o(r);s&&(i||(i=Object.assign({},r.props)),i[s[0].id]=s[1])}n.push(i?new $s(r.name,i,r.id,r.flags):r)}return new w$(n)}}const a1=new WeakMap,K7=new WeakMap;var Gr;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(Gr||(Gr={}));let Kr=class UM{constructor(e,n,r,i,o){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,o&&o.length){this.props=Object.create(null);for(let[s,a]of o)this.props[typeof s=="number"?s:s.id]=a}}toString(){let e=R0.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new TI(this.topNode,e)}cursorAt(e,n=0,r=0){let i=a1.get(this)||this.topNode,o=new TI(i);return o.moveTo(e,n),a1.set(this,o._tree),o}get topNode(){return new Yl(this,0,0,null)}resolve(e,n=0){let r=j0(a1.get(this)||this.topNode,e,n,!1);return a1.set(this,r),r}resolveInner(e,n=0){let r=j0(K7.get(this)||this.topNode,e,n,!0);return K7.set(this,r),r}resolveStack(e,n=0){return T7e(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:o=this.length}=e,s=e.mode||0,a=(s&Gr.IncludeAnonymous)>0;for(let l=this.cursor(s|Gr.IncludeAnonymous);;){let c=!1;if(l.from<=o&&l.to>=i&&(!a&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;c=!0}for(;c&&r&&(a||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;c=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:ez($s.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new UM(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new UM($s.none,n,r,i)))}static build(e){return I7e(e)}};Kr.empty=new Kr($s.none,[],[],0);class K5{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new K5(this.buffer,this.index)}}class wf{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return $s.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],o=i.name;if(/\W/.test(o)&&!i.isError&&(o=JSON.stringify(o)),e+=4,r==e)return o;let s=[];for(;e<r;)s.push(this.childString(e)),e=this.buffer[e+3];return o+"("+s.join(",")+")"}findChild(e,n,r,i,o){let{buffer:s}=this,a=-1;for(let l=e;l!=n&&!(_ue(o,i,s[l+1],s[l+2])&&(a=l,r>0));l=s[l+3]);return a}slice(e,n,r){let i=this.buffer,o=new Uint16Array(n-e),s=0;for(let a=e,l=0;a<n;){o[l++]=i[a++],o[l++]=i[a++]-r;let c=o[l++]=i[a++]-r;o[l++]=i[a++]-e,s=Math.max(s,c)}return new wf(o,s,this.set)}}function _ue(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function j0(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let s=!r&&t instanceof Yl&&t.index<0?null:t.parent;if(!s)return t;t=s}let o=r?0:Gr.IgnoreOverlays;if(r)for(let s=t,a=s.parent;a;s=a,a=s.parent)s instanceof Yl&&s.index<0&&((i=a.enter(e,n,o))===null||i===void 0?void 0:i.from)!=s.from&&(t=a);for(;;){let s=t.enter(e,n,o);if(!s)return t;t=s}}class Cue{cursor(e=0){return new TI(this,e)}getChild(e,n=null,r=null){let i=J7(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return J7(this,e,n,r)}resolve(e,n=0){return j0(this,e,n,!1)}resolveInner(e,n=0){return j0(this,e,n,!0)}matchContext(e){return VM(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}let Yl=class LC extends Cue{constructor(e,n,r,i){super(),this._tree=e,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,r,i,o=0){for(let s=this;;){for(let{children:a,positions:l}=s._tree,c=n>0?a.length:-1;e!=c;e+=n){let u=a[e],d=l[e]+s.from;if(_ue(i,r,d,d+u.length)){if(u instanceof wf){if(o&Gr.ExcludeBuffers)continue;let p=u.findChild(0,u.buffer.length,n,r-d,i);if(p>-1)return new $u(new _7e(s,u,e,d),null,p)}else if(o&Gr.IncludeAnonymous||!u.type.isAnonymous||J5(u)){let p;if(!(o&Gr.IgnoreMounts)&&(p=R0.get(u))&&!p.overlay)return new LC(p.tree,d,e,s);let f=new LC(u,d,e,s);return o&Gr.IncludeAnonymous||!f.type.isAnonymous?f:f.nextChild(n<0?u.children.length-1:0,n,r,i)}}}if(o&Gr.IncludeAnonymous||!s.type.isAnonymous||(s.index>=0?e=s.index+n:e=n<0?-1:s._parent._tree.children.length,s=s._parent,!s))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,r=0){let i;if(!(r&Gr.IgnoreOverlays)&&(i=R0.get(this._tree))&&i.overlay){let o=e-this.from;for(let{from:s,to:a}of i.overlay)if((n>0?s<=o:s<o)&&(n<0?a>=o:a>o))return new LC(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function J7(t,e,n,r){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(n!=null){for(let s=!1;!s;)if(s=i.type.is(n),!i.nextSibling())return o}for(;;){if(r!=null&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return r==null?o:[]}}function VM(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class _7e{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class $u extends Cue{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new $u(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,r=0){if(r&Gr.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new $u(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new $u(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new $u(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,o=r.buffer[this.index+3];if(o>i){let s=r.buffer[this.index+1];e.push(r.slice(i,o,s)),n.push(0)}return new Kr(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function Tue(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;o<t.length;o++){let s=t[o];(s.from>n.from||s.to<n.to)&&(n=s,e=o)}let r=n instanceof Yl&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new C7e(i,n)}class C7e{constructor(e,n){this.heads=e,this.node=n}get next(){return Tue(this.heads)}}function T7e(t,e,n){let r=t.resolveInner(e,n),i=null;for(let o=r instanceof Yl?r:r.context.parent;o;o=o.parent)if(o.index<0){let s=o.parent;(i||(i=[r])).push(s.resolve(e,n)),o=s}else{let s=R0.get(o.tree);if(s&&s.overlay&&s.overlay[0].from<=e&&s.overlay[s.overlay.length-1].to>=e){let a=new Yl(s.tree,s.overlay[0].from+o.from,-1,o);(i||(i=[r])).push(j0(a,e,n,!1))}}return i?Tue(i):r}class TI{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Yl)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Yl?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&Gr.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Gr.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Gr.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let o=0;o<this.index;o++)if(i.buffer.buffer[o+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let o=n+e,s=e<0?-1:r._tree.children.length;o!=s;o+=e){let a=r._tree.children[o];if(this.mode&Gr.IncludeAnonymous||a instanceof wf||!a.type.isAnonymous||J5(a))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,o=this.stack.length;o>=0;){for(let s=e;s;s=s._parent)if(s.index==i){if(i==this.index)return s;n=s,r=o+1;break e}i=this.stack[--o]}for(let i=r;i<this.stack.length;i++)n=new $u(this.buffer,n,this.stack[i]);return this.bufferNode=new $u(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&n&&n(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return VM(this.node.parent,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,o=this.stack.length-1;i>=0;o--){if(o<0)return VM(this._tree,e,i);let s=r[n.buffer[this.stack[o]]];if(!s.isAnonymous){if(e[i]&&e[i]!=s.name)return!1;i--}}return!0}}function J5(t){return t.children.some(e=>e instanceof wf||!e.type.isAnonymous||J5(e))}function I7e(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=Sue,reused:o=[],minRepeatType:s=r.types.length}=t,a=Array.isArray(n)?new K5(n,n.length):n,l=r.types,c=0,u=0;function d(w,S,_,C,I,A){let{id:R,start:q,end:z,size:F}=a,te=u,B=c;for(;F<0;)if(a.next(),F==-1){let M=o[R];_.push(M),C.push(q-w);return}else if(F==-3){c=R;return}else if(F==-4){u=R;return}else throw new RangeError(`Unrecognized record size: ${F}`);let se=l[R],H,ie,V=q-w;if(z-q<=i&&(ie=y(a.pos-S,I))){let M=new Uint16Array(ie.size-ie.skip),ee=a.pos-ie.size,X=M.length;for(;a.pos>ee;)X=b(ie.start,M,X);H=new wf(M,z-ie.start,r),V=ie.start-w}else{let M=a.pos-F;a.next();let ee=[],X=[],j=R>=s?R:-1,W=0,Z=z;for(;a.pos>M;)j>=0&&a.id==j&&a.size>=0?(a.end<=Z-i&&(m(ee,X,q,W,a.end,Z,j,te,B),W=ee.length,Z=a.end),a.next()):A>2500?p(q,M,ee,X):d(q,M,ee,X,j,A+1);if(j>=0&&W>0&&W<ee.length&&m(ee,X,q,W,q,Z,j,te,B),ee.reverse(),X.reverse(),j>-1&&W>0){let K=f(se,B);H=ez(se,ee,X,0,ee.length,0,z-q,K,K)}else H=g(se,ee,X,z-q,te-z,B)}_.push(H),C.push(V)}function p(w,S,_,C){let I=[],A=0,R=-1;for(;a.pos>S;){let{id:q,start:z,end:F,size:te}=a;if(te>4)a.next();else{if(R>-1&&z<R)break;R<0&&(R=F-i),I.push(q,z,F),A++,a.next()}}if(A){let q=new Uint16Array(A*4),z=I[I.length-2];for(let F=I.length-3,te=0;F>=0;F-=3)q[te++]=I[F],q[te++]=I[F+1]-z,q[te++]=I[F+2]-z,q[te++]=te;_.push(new wf(q,I[2]-z,r)),C.push(z-w)}}function f(w,S){return(_,C,I)=>{let A=0,R=_.length-1,q,z;if(R>=0&&(q=_[R])instanceof Kr){if(!R&&q.type==w&&q.length==I)return q;(z=q.prop(Sn.lookAhead))&&(A=C[R]+q.length+z)}return g(w,_,C,I,A,S)}}function m(w,S,_,C,I,A,R,q,z){let F=[],te=[];for(;w.length>C;)F.push(w.pop()),te.push(S.pop()+_-I);w.push(g(r.types[R],F,te,A-I,q-A,z)),S.push(I-_)}function g(w,S,_,C,I,A,R){if(A){let q=[Sn.contextHash,A];R=R?[q].concat(R):[q]}if(I>25){let q=[Sn.lookAhead,I];R=R?[q].concat(R):[q]}return new Kr(w,S,_,C,R)}function y(w,S){let _=a.fork(),C=0,I=0,A=0,R=_.end-i,q={size:0,start:0,skip:0};e:for(let z=_.pos-w;_.pos>z;){let F=_.size;if(_.id==S&&F>=0){q.size=C,q.start=I,q.skip=A,A+=4,C+=4,_.next();continue}let te=_.pos-F;if(F<0||te<z||_.start<R)break;let B=_.id>=s?4:0,se=_.start;for(_.next();_.pos>te;){if(_.size<0)if(_.size==-3)B+=4;else break e;else _.id>=s&&(B+=4);_.next()}I=se,C+=F,A+=B}return(S<0||C==w)&&(q.size=C,q.start=I,q.skip=A),q.size>4?q:void 0}function b(w,S,_){let{id:C,start:I,end:A,size:R}=a;if(a.next(),R>=0&&C<s){let q=_;if(R>4){let z=a.pos-(R-4);for(;a.pos>z;)_=b(w,S,_)}S[--_]=q,S[--_]=A-w,S[--_]=I-w,S[--_]=C}else R==-3?c=C:R==-4&&(u=C);return _}let v=[],x=[];for(;a.pos>0;)d(t.start||0,t.bufferStart||0,v,x,-1,0);let O=(e=t.length)!==null&&e!==void 0?e:v.length?x[0]+v[0].length:0;return new Kr(l[t.topID],v.reverse(),x.reverse(),O)}const e6=new WeakMap;function qC(t,e){if(!t.isAnonymous||e instanceof wf||e.type!=t)return 1;let n=e6.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof Kr)){n=1;break}n+=qC(t,r)}e6.set(e,n)}return n}function ez(t,e,n,r,i,o,s,a,l){let c=0;for(let m=r;m<i;m++)c+=qC(t,e[m]);let u=Math.ceil(c*1.5/8),d=[],p=[];function f(m,g,y,b,v){for(let x=y;x<b;){let O=x,w=g[x],S=qC(t,m[x]);for(x++;x<b;x++){let _=qC(t,m[x]);if(S+_>=u)break;S+=_}if(x==O+1){if(S>u){let _=m[O];f(_.children,_.positions,0,_.children.length,g[O]+v);continue}d.push(m[O])}else{let _=g[x-1]+m[x-1].length-w;d.push(ez(t,m,g,O,x,w,_,null,l))}p.push(w+v-o)}}return f(e,n,r,i,0),(a||l)(d,p,s)}class tz{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof $u?this.setBuffer(e.context.buffer,e.index,n):e instanceof Yl&&this.map.set(e.tree,n)}get(e){return e instanceof $u?this.getBuffer(e.context.buffer,e.index):e instanceof Yl?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Wd{constructor(e,n,r,i,o=!1,s=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(s?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new Wd(0,e.length,e,0,!1,r)];for(let o of n)o.to>e.length&&i.push(o);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],o=1,s=e.length?e[0]:null;for(let a=0,l=0,c=0;;a++){let u=a<n.length?n[a]:null,d=u?u.fromA:1e9;if(d-l>=r)for(;s&&s.from<d;){let p=s;if(l>=p.from||d<=p.to||c){let f=Math.max(p.from,l)-c,m=Math.min(p.to,d)-c;p=f>=m?null:new Wd(f,m,p.tree,p.offset+c,a>0,!!u)}if(p&&i.push(p),s.to>d)break;s=o<e.length?e[o++]:null}if(!u)break;l=u.toA,c=u.toA-u.toB}return i}}let nz=class{startParse(e,n,r){return typeof e=="string"&&(e=new k7e(e)),r=r?r.length?r.map(i=>new Ll(i.from,i.to)):[new Ll(0,0)]:[new Ll(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let o=i.advance();if(o)return o}}};class k7e{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function P7e(t){return(e,n,r,i)=>new E7e(e,t,n,r,i)}class t6{constructor(e,n,r,i,o){this.parser=e,this.parse=n,this.overlay=r,this.target=i,this.from=o}}function n6(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class $7e{constructor(e,n,r,i,o,s,a){this.parser=e,this.predicate=n,this.mounts=r,this.index=i,this.start=o,this.target=s,this.prev=a,this.depth=0,this.ranges=[]}}const FM=new Sn({perNode:!0});class E7e{constructor(e,n,r,i,o){this.nest=n,this.input=r,this.fragments=i,this.ranges=o,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new Kr(r.type,r.children,r.positions,r.length,r.propValues.concat([[FM,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[Sn.mounted.id]=new R0(n,e.overlay,e.parser),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].from<e&&(e=Math.min(e,this.inner[n].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].parse.stopAt(e)}startInner(){let e=new j7e(this.fragments),n=null,r=null,i=new TI(new Yl(this.baseTree,this.ranges[0].from,0,null),Gr.IncludeAnonymous|Gr.IgnoreMounts);e:for(let o,s;;){let a=!0,l;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)a=!1;else if(e.hasNode(i)){if(n){let c=n.mounts.find(u=>u.frag.from<=i.from&&u.frag.to>=i.to&&u.mount.overlay);if(c)for(let u of c.mount.overlay){let d=u.from+c.pos,p=u.to+c.pos;d>=i.from&&p<=i.to&&!n.ranges.some(f=>f.from<p&&f.to>d)&&n.ranges.push({from:d,to:p})}}a=!1}else if(r&&(s=A7e(r.ranges,i.from,i.to)))a=s!=2;else if(!i.type.isAnonymous&&(o=this.nest(i,this.input))&&(i.from<i.to||!o.overlay)){i.tree||R7e(i);let c=e.findMounts(i.from,o.parser);if(typeof o.overlay=="function")n=new $7e(o.parser,o.overlay,c,this.inner.length,i.from,i.tree,n);else{let u=o6(this.ranges,o.overlay||(i.from<i.to?[new Ll(i.from,i.to)]:[]));u.length&&n6(u),(u.length||!o.overlay)&&this.inner.push(new t6(o.parser,u.length?o.parser.startParse(this.input,s6(c,u),u):o.parser.startParse(""),o.overlay?o.overlay.map(d=>new Ll(d.from-i.from,d.to-i.from)):null,i.tree,u.length?u[0].from:i.from)),o.overlay?u.length&&(r={ranges:u,depth:0,prev:r}):a=!1}}else if(n&&(l=n.predicate(i))&&(l===!0&&(l=new Ll(i.from,i.to)),l.from<l.to)){let c=n.ranges.length-1;c>=0&&n.ranges[c].to==l.from?n.ranges[c]={from:n.ranges[c].from,to:l.to}:n.ranges.push(l)}if(a&&i.firstChild())n&&n.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(n&&!--n.depth){let c=o6(this.ranges,n.ranges);c.length&&(n6(c),this.inner.splice(n.index,0,new t6(n.parser,n.parser.startParse(this.input,s6(n.mounts,c),c),n.ranges.map(u=>new Ll(u.from-n.start,u.to-n.start)),n.target,c[0].from))),n=n.prev}r&&!--r.depth&&(r=r.prev)}}}}function A7e(t,e,n){for(let r of t){if(r.from>=n)break;if(r.to>e)return r.from<=e&&r.to>=n?2:1}return 0}function r6(t,e,n,r,i,o){if(e<n){let s=t.buffer[e+1];r.push(t.slice(e,n,s)),i.push(s-o)}}function R7e(t){let{node:e}=t,n=[],r=e.context.buffer;do n.push(t.index),t.parent();while(!t.tree);let i=t.tree,o=i.children.indexOf(r),s=i.children[o],a=s.buffer,l=[o];function c(u,d,p,f,m,g){let y=n[g],b=[],v=[];r6(s,u,y,b,v,f);let x=a[y+1],O=a[y+2];l.push(b.length);let w=g?c(y+4,a[y+3],s.set.types[a[y]],x,O-x,g-1):e.toTree();return b.push(w),v.push(x-f),r6(s,a[y+3],d,b,v,f),new Kr(p,b,v,m)}i.children[o]=c(0,a.length,$s.none,0,s.length,n.length-1);for(let u of l){let d=t.tree.children[u],p=t.tree.positions[u];t.yield(new Yl(d,p+t.from,u,t._tree))}}class i6{constructor(e,n){this.offset=n,this.done=!1,this.cursor=e.cursor(Gr.IncludeAnonymous|Gr.IgnoreMounts)}moveTo(e){let{cursor:n}=this,r=e-this.offset;for(;!this.done&&n.from<r;)n.to>=e&&n.enter(r,1,Gr.IgnoreOverlays|Gr.ExcludeBuffers)||n.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof Kr)n=n.children[0];else break}return!1}}let j7e=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(n=r.tree.prop(FM))!==null&&n!==void 0?n:r.to,this.inner=new i6(r.tree,-r.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(FM))!==null&&e!==void 0?e:n.to,this.inner=new i6(n.tree,-n.offset)}}findMounts(e,n){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let o=this.inner.cursor.node;o;o=o.parent){let s=(r=o.tree)===null||r===void 0?void 0:r.prop(Sn.mounted);if(s&&s.parser==n)for(let a=this.fragI;a<this.fragments.length;a++){let l=this.fragments[a];if(l.from>=o.to)break;l.tree==this.curFrag.tree&&i.push({frag:l,pos:o.from-l.offset,mount:s})}}}return i}};function o6(t,e){let n=null,r=e;for(let i=1,o=0;i<t.length;i++){let s=t[i-1].to,a=t[i].from;for(;o<r.length;o++){let l=r[o];if(l.from>=a)break;l.to<=s||(n||(r=n=e.slice()),l.from<s?(n[o]=new Ll(l.from,s),l.to>a&&n.splice(o+1,0,new Ll(a,l.to))):l.to>a?n[o--]=new Ll(a,l.to):n.splice(o--,1))}}return r}function N7e(t,e,n,r){let i=0,o=0,s=!1,a=!1,l=-1e9,c=[];for(;;){let u=i==t.length?1e9:s?t[i].to:t[i].from,d=o==e.length?1e9:a?e[o].to:e[o].from;if(s!=a){let p=Math.max(l,n),f=Math.min(u,d,r);p<f&&c.push(new Ll(p,f))}if(l=Math.min(u,d),l==1e9)break;u==l&&(s?(s=!1,i++):s=!0),d==l&&(a?(a=!1,o++):a=!0)}return c}function s6(t,e){let n=[];for(let{pos:r,mount:i,frag:o}of t){let s=r+(i.overlay?i.overlay[0].from:0),a=s+i.tree.length,l=Math.max(o.from,s),c=Math.min(o.to,a);if(i.overlay){let u=i.overlay.map(p=>new Ll(p.from+r,p.to+r)),d=N7e(e,u,l,c);for(let p=0,f=l;;p++){let m=p==d.length,g=m?c:d[p].from;if(g>f&&n.push(new Wd(f,g,i.tree,-s,o.from>=f||o.openStart,o.to<=g||o.openEnd)),m)break;f=d[p].to}}else n.push(new Wd(l,c,i.tree,-s,o.from>=s||o.openStart,o.to<=a||o.openEnd))}return n}class II{constructor(e,n,r,i,o,s,a,l,c,u=0,d){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=o,this.score=s,this.buffer=a,this.bufferBase=l,this.curContext=c,this.lookAhead=u,this.parent=d}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new II(e,[],n,r,r,0,[],0,i?new a6(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:o}=this.p,s=this.reducePos<this.pos-25;s&&this.setLookAhead(this.pos);let a=o.dynamicPrecedence(i);if(a&&(this.score+=a),r==0){this.pushState(o.getGoto(this.state,i,!0),this.reducePos),i<o.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,s?8:4,!0),this.reduceContext(i,this.reducePos);return}let l=this.stack.length-(r-1)*3-(e&262144?6:0),c=l?this.stack[l-2]:this.p.ranges[0].from,u=this.reducePos-c;u>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(c==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=u):this.p.lastBigReductionSize<u&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=c,this.p.lastBigReductionSize=u));let d=l?this.stack[l-1]:0,p=this.bufferBase+this.buffer.length-d;if(i<o.minRepeatTerm||e&131072){let f=o.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,c,f,p+4,!0)}if(e&262144)this.state=this.stack[l];else{let f=this.stack[l-3];this.state=o.getGoto(f,i,!0)}for(;this.stack.length>l;)this.stack.pop();this.reduceContext(i,c)}storeNode(e,n,r,i=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let s=this,a=this.buffer.length;if(a==0&&s.parent&&(a=s.bufferBase-s.parent.bufferBase,s=s.parent),a>0&&s.buffer[a-4]==0&&s.buffer[a-1]>-1){if(n==r)return;if(s.buffer[a-2]>=n){s.buffer[a-2]=r;return}}}if(!o||this.pos==r)this.buffer.push(e,n,r,i);else{let s=this.buffer.length;if(s>0&&this.buffer[s-4]!=0){let a=!1;for(let l=s;l>0&&this.buffer[l-2]>r;l-=4)if(this.buffer[l-1]>=0){a=!0;break}if(a)for(;s>0&&this.buffer[s-2]>r;)this.buffer[s]=this.buffer[s-4],this.buffer[s+1]=this.buffer[s-3],this.buffer[s+2]=this.buffer[s-2],this.buffer[s+3]=this.buffer[s-1],s-=4,i>4&&(i-=4)}this.buffer[s]=e,this.buffer[s+1]=n,this.buffer[s+2]=r,this.buffer[s+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let o=e,{parser:s}=this.p;(i>this.pos||n<=s.maxNode)&&(this.pos=i,s.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(n,r),n<=s.maxNode&&this.buffer.push(n,r,i,4)}else this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4)}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new II(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new M7e(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if((r&65536)==0)return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let o=0,s;o<n.length;o+=2)(s=n[o+1])!=this.state&&this.p.parser.hasAction(s,e)&&i.push(n[o],s);if(this.stack.length<120)for(let o=0;i.length<8&&o<n.length;o+=2){let s=n[o+1];i.some((a,l)=>l&1&&a==s)||i.push(n[o],s)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let o=n[i+1];if(o==this.state)continue;let s=this.split();s.pushState(o,this.pos),s.storeNode(0,s.pos,s.pos,4,!0),s.shiftContext(n[i],this.pos),s.reducePos=this.pos,s.score-=200,r.push(s)}return r}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!e.validAction(this.state,n)){let r=n>>19,i=n&65535,o=this.stack.length-r*3;if(o<0||e.getGoto(this.stack[o],i,!1)<0){let s=this.findForcedReduction();if(s==null)return!1;n=s}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,o)=>{if(!n.includes(i))return n.push(i),e.allActions(i,s=>{if(!(s&393216))if(s&65536){let a=(s>>19)-o;if(a>1){let l=s&65535,c=this.stack.length-a*3;if(c>=0&&e.getGoto(this.stack[c],l,!1)>=0)return a<<19|65536|l}}else{let a=r(s,o+1);if(a!=null)return a}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new a6(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){e>this.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class a6{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class M7e{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class kI{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new kI(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new kI(this.stack,this.pos,this.index)}}function cO(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let o=0;for(;;){let s=t.charCodeAt(r++),a=!1;if(s==126){o=65535;break}s>=92&&s--,s>=34&&s--;let l=s-32;if(l>=46&&(l-=46,a=!0),o+=l,a)break;o*=46}n?n[i++]=o:n=new e(o)}return n}class zC{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const l6=new zC;class D7e{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=l6,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,o=this.pos+e;for(;o<r.from;){if(!i)return null;let s=this.ranges[--i];o-=r.from-s.to,r=s}for(;n<0?o>r.to:o>=r.to;){if(i==this.ranges.length-1)return null;let s=this.ranges[++i];o+=s.from-r.to,r=s}return o}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);else{let o=this.resolveOffset(e,1);if(o==null)return-1;if(r=o,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let s=this.rangeIndex,a=this.range;for(;a.to<=r;)a=this.ranges[++s];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>a.to&&(this.chunk2=this.chunk2.slice(0,a.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=l6,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class Sy{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;Iue(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}Sy.prototype.contextual=Sy.prototype.fallback=Sy.prototype.extend=!1;class PI{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?cO(e):e}token(e,n){let r=e.pos,i=0;for(;;){let o=e.next<0,s=e.resolveOffset(1,1);if(Iue(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(o||i++,s==null)break;e.reset(s,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}PI.prototype.contextual=Sy.prototype.fallback=Sy.prototype.extend=!1;class no{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function Iue(t,e,n,r,i,o){let s=0,a=1<<r,{dialect:l}=n.p.parser;e:for(;(a&t[s])!=0;){let c=t[s+1];for(let f=s+3;f<c;f+=2)if((t[f+1]&a)>0){let m=t[f];if(l.allows(m)&&(e.token.value==-1||e.token.value==m||Q7e(m,e.token.value,i,o))){e.acceptToken(m);break}}let u=e.next,d=0,p=t[s+2];if(e.next<0&&p>d&&t[c+p*3-3]==65535){s=t[c+p*3-1];continue e}for(;d<p;){let f=d+p>>1,m=c+f+(f<<1),g=t[m],y=t[m+1]||65536;if(u<g)p=f;else if(u>=y)d=f+1;else{s=t[m+2],e.advance();continue e}}break}}function c6(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function Q7e(t,e,n,r){let i=c6(n,r,e);return i<0||c6(n,r,t)<i}const Wa=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG);let zR=null;function u6(t,e,n){let r=t.cursor(Gr.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class L7e{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?u6(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?u6(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=r.children[i],s=this.start[n]+r.positions[i];if(s>e)return this.nextStart=s,null;if(o instanceof Kr){if(s==e){if(s<this.safeFrom)return null;let a=s+o.length;if(a<=this.safeTo){let l=o.prop(Sn.lookAhead);if(!l||a+l<this.fragment.to)return o}}this.index[n]++,s+o.length>=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[n]++,this.nextStart=s+o.length}}}class q7e{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new zC)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:o}=i,s=i.stateSlot(e.state,3),a=e.curContext?e.curContext.hash:0,l=0;for(let c=0;c<o.length;c++){if((1<<c&s)==0)continue;let u=o[c],d=this.tokens[c];if(!(r&&!u.fallback)&&((u.contextual||d.start!=e.pos||d.mask!=s||d.context!=a)&&(this.updateCachedToken(d,u,e),d.mask=s,d.context=a),d.lookAhead>d.end+25&&(l=Math.max(d.lookAhead,l)),d.value!=0)){let p=n;if(d.extended>-1&&(n=this.addActions(e,d.extended,d.end,n)),n=this.addActions(e,d.value,d.end,n),!u.extend&&(r=d,n>p))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new zC,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new zC,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:o}=r.p;for(let s=0;s<o.specialized.length;s++)if(o.specialized[s]==e.value){let a=o.specializers[s](this.stream.read(e.start,e.end),r);if(a>=0&&r.p.parser.dialect.allows(a>>1)){(a&1)==0?e.value=a>>1:e.extended=a>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let o=0;o<i;o+=3)if(this.actions[o]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:o}=e,{parser:s}=e.p,{data:a}=s;for(let l=0;l<2;l++)for(let c=s.stateSlot(o,l?2:1);;c+=3){if(a[c]==65535)if(a[c+1]==1)c=Md(a,c+2);else{i==0&&a[c+1]==2&&(i=this.putAction(Md(a,c+2),n,r,i));break}a[c]==n&&(i=this.putAction(Md(a,c+1),n,r,i))}return i}}let z7e=class{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new D7e(n,i),this.tokens=new q7e(e,this.stream),this.topTerm=e.top[1];let{from:o}=i[0];this.stacks=[II.start(this,e.top[0],o)],this.fragments=r.length&&this.stream.end-o>e.bufferLength*4?new L7e(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,o;if(this.bigReductionCount>300&&e.length==1){let[s]=e;for(;s.forceReduce()&&s.stack.length&&s.stack[s.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let s=0;s<e.length;s++){let a=e[s];for(;;){if(this.tokens.mainToken=null,a.pos>n)r.push(a);else{if(this.advanceStack(a,r,e))continue;{i||(i=[],o=[]),i.push(a);let l=this.tokens.getMainToken(a);o.push(l.value,l.end)}}break}}if(!r.length){let s=i&&V7e(i);if(s)return Wa&&console.log("Finish with "+this.stackID(s)),this.stackToTree(s);if(this.parser.strict)throw Wa&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let s=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,o,r);if(s)return Wa&&console.log("Force-finish "+this.stackID(s)),this.stackToTree(s.forceAll())}if(this.recovering){let s=this.recovering==1?1:this.recovering*3;if(r.length>s)for(r.sort((a,l)=>l.score-a.score);r.length>s;)r.pop();r.some(a=>a.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let s=0;s<r.length-1;s++){let a=r[s];for(let l=s+1;l<r.length;l++){let c=r[l];if(a.sameState(c)||a.buffer.length>500&&c.buffer.length>500)if((a.score-c.score||a.buffer.length-c.buffer.length)>0)r.splice(l--,1);else{r.splice(s--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let s=1;s<r.length;s++)r[s].pos<this.minStackPos&&(this.minStackPos=r[s].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:o}=this,s=Wa?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let c=e.curContext&&e.curContext.tracker.strict,u=c?e.curContext.hash:0;for(let d=this.fragments.nodeAt(i);d;){let p=this.parser.nodeSet.types[d.type.id]==d.type?o.getGoto(e.state,d.type.id):-1;if(p>-1&&d.length&&(!c||(d.prop(Sn.contextHash)||0)==u))return e.useNode(d,p),Wa&&console.log(s+this.stackID(e)+` (via reuse of ${o.getName(d.type.id)})`),!0;if(!(d instanceof Kr)||d.children.length==0||d.positions[0]>0)break;let f=d.children[0];if(f instanceof Kr&&d.positions[0]==0)d=f;else break}}let a=o.stateSlot(e.state,4);if(a>0)return e.reduce(a),Wa&&console.log(s+this.stackID(e)+` (via always-reduce ${o.getName(a&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let c=0;c<l.length;){let u=l[c++],d=l[c++],p=l[c++],f=c==l.length||!r,m=f?e:e.split(),g=this.tokens.mainToken;if(m.apply(u,d,g?g.start:m.pos,p),Wa&&console.log(s+this.stackID(m)+` (via ${(u&65536)==0?"shift":`reduce of ${o.getName(u&65535)}`} for ${o.getName(d)} @ ${i}${m==e?"":", split"})`),f)return!0;m.pos>i?n.push(m):r.push(m)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return d6(e,n),!0}}runRecovery(e,n,r){let i=null,o=!1;for(let s=0;s<e.length;s++){let a=e[s],l=n[s<<1],c=n[(s<<1)+1],u=Wa?this.stackID(a)+" -> ":"";if(a.deadEnd&&(o||(o=!0,a.restart(),Wa&&console.log(u+this.stackID(a)+" (restarted)"),this.advanceFully(a,r))))continue;let d=a.split(),p=u;for(let f=0;d.forceReduce()&&f<10&&(Wa&&console.log(p+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,r));f++)Wa&&(p=this.stackID(d)+" -> ");for(let f of a.recoverByInsert(l))Wa&&console.log(u+this.stackID(f)+" (via recover-insert)"),this.advanceFully(f,r);this.stream.end>a.pos?(c==a.pos&&(c++,l=0),a.recoverByDelete(l,c),Wa&&console.log(u+this.stackID(a)+` (via recover-delete ${this.parser.getName(l)})`),d6(a,r)):(!i||i.score<a.score)&&(i=a)}return i}stackToTree(e){return e.close(),Kr.build({buffer:kI.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(zR||(zR=new WeakMap)).get(e);return n||zR.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}};function d6(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class U7e{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const UR=t=>t;class aw{constructor(e){this.start=e.start,this.shift=e.shift||UR,this.reduce=e.reduce||UR,this.reuse=e.reuse||UR,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Qc extends nz{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let a=0;a<e.repeatNodeCount;a++)n.push("");let r=Object.keys(e.topRules).map(a=>e.topRules[a][1]),i=[];for(let a=0;a<n.length;a++)i.push([]);function o(a,l,c){i[a].push([l,l.deserialize(String(c))])}if(e.nodeProps)for(let a of e.nodeProps){let l=a[0];typeof l=="string"&&(l=Sn[l]);for(let c=1;c<a.length;){let u=a[c++];if(u>=0)o(u,l,a[c++]);else{let d=a[c+-u];for(let p=-u;p>0;p--)o(a[c++],l,d);c++}}}this.nodeSet=new w$(n.map((a,l)=>$s.define({name:l>=this.minRepeatTerm?void 0:a,id:l,props:i[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Sue;let s=cO(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let a=0;a<this.specializerSpecs.length;a++)this.specialized[a]=this.specializerSpecs[a].term;this.specializers=this.specializerSpecs.map(p6),this.states=cO(e.states,Uint32Array),this.data=cO(e.stateData),this.goto=cO(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(a=>typeof a=="number"?new Sy(s,a):a),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new z7e(this,e,n,r);for(let o of this.wrappers)i=o(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let o=i[n+1];;){let s=i[o++],a=s&1,l=i[o++];if(a&&r)return l;for(let c=o+(s>>1);o<c;o++)if(i[o]==e)return l;if(a)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let o=this.stateSlot(e,i?2:1),s;;o+=3){if((s=r[o])==65535)if(r[o+1]==1)s=r[o=Md(r,o+2)];else{if(r[o+1]==2)return Md(r,o+2);break}if(s==n||s==0)return Md(r,o+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let o=this.stateSlot(e,1);i==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=Md(this.data,o+2);else break;i=n(Md(this.data,o+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Md(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];n.some((o,s)=>s&1&&o==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(Qc.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(o=>o.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let o=e.specializers.find(a=>a.from==r.external);if(!o)return r;let s=Object.assign(Object.assign({},r),{external:o.to});return n.specializers[i]=p6(s),s})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let o of e.split(" ")){let s=n.indexOf(o);s>=0&&(r[s]=!0)}let i=null;for(let o=0;o<n.length;o++)if(!r[o])for(let s=this.dialects[n[o]],a;(a=this.data[s++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[a]=1;return new U7e(e,r,i)}static deserialize(e){return new Qc(e)}}function Md(t,e){return t[e]|t[e+1]<<16}function V7e(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function p6(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}let F7e=0,Dd=class BM{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=F7e++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof BM&&(n=e),n?.base)throw new Error("Can not derive from a modified tag");let i=new BM(r,[],null,[]);if(i.set.push(i),n)for(let o of n.set)i.set.push(o);return i}static defineModifier(e){let n=new $I(e);return r=>r.modified.indexOf(n)>-1?r:$I.get(r.base||r,r.modified.concat(n).sort((i,o)=>i.id-o.id))}},B7e=0;class $I{constructor(e){this.name=e,this.instances=[],this.id=B7e++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(a=>a.base==e&&W7e(n,a.modified));if(r)return r;let i=[],o=new Dd(e.name,i,e,n);for(let a of n)a.instances.push(o);let s=X7e(n);for(let a of e.set)if(!a.modified.length)for(let l of s)i.push($I.get(a,l));return o}}function W7e(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function X7e(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function mp(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let o=[],s=2,a=i;for(let d=0;;){if(a=="..."&&d>0&&d+3==i.length){s=1;break}let p=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!p)throw new RangeError("Invalid path: "+i);if(o.push(p[0]=="*"?"":p[0][0]=='"'?JSON.parse(p[0]):p[0]),d+=p[0].length,d==i.length)break;let f=i[d++];if(d==i.length&&f=="!"){s=0;break}if(f!="/")throw new RangeError("Invalid path: "+i);a=i.slice(d)}let l=o.length-1,c=o[l];if(!c)throw new RangeError("Invalid path: "+i);let u=new EI(r,s,l>0?o.slice(0,l):null);e[c]=u.sort(e[c])}}return kue.add(e)}const kue=new Sn;class EI{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}EI.empty=new EI([],2,null);function Pue(t,e){let n=Object.create(null);for(let o of t)if(!Array.isArray(o.tag))n[o.tag.id]=o.class;else for(let s of o.tag)n[s.id]=o.class;let{scope:r,all:i=null}=e||{};return{style:o=>{let s=i;for(let a of o)for(let l of a.set){let c=n[l.id];if(c){s=s?s+" "+c:c;break}}return s},scope:r}}function Z7e(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function G7e(t,e,n,r=0,i=t.length){let o=new Y7e(r,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),r,i,"",o.highlighters),o.flush(i)}class Y7e{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,o){let{type:s,from:a,to:l}=e;if(a>=r||l<=n)return;s.isTop&&(o=this.highlighters.filter(f=>!f.scope||f.scope(s)));let c=i,u=H7e(e)||EI.empty,d=Z7e(o,u.tags);if(d&&(c&&(c+=" "),c+=d,u.mode==1&&(i+=(i?" ":"")+d)),this.startSpan(Math.max(n,a),c),u.opaque)return;let p=e.tree&&e.tree.prop(Sn.mounted);if(p&&p.overlay){let f=e.node.enter(p.overlay[0].from+a,1),m=this.highlighters.filter(y=>!y.scope||y.scope(p.tree.type)),g=e.firstChild();for(let y=0,b=a;;y++){let v=y<p.overlay.length?p.overlay[y]:null,x=v?v.from+a:l,O=Math.max(n,b),w=Math.min(r,x);if(O<w&&g)for(;e.from<w&&(this.highlightRange(e,O,w,i,o),this.startSpan(Math.min(w,e.to),c),!(e.to>=x||!e.nextSibling())););if(!v||x>r)break;b=v.to+a,b>n&&(this.highlightRange(f.cursor(),Math.max(n,v.from+a),Math.min(r,b),"",m),this.startSpan(Math.min(r,b),c))}g&&e.parent()}else if(e.firstChild()){p&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,o),this.startSpan(Math.min(r,e.to),c)}while(e.nextSibling());e.parent()}}}function H7e(t){let e=t.type.prop(kue);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const mt=Dd.define,l1=mt(),qp=mt(),f6=mt(qp),h6=mt(qp),zp=mt(),c1=mt(zp),VR=mt(zp),uu=mt(),nh=mt(uu),ou=mt(),su=mt(),WM=mt(),Pb=mt(WM),u1=mt(),ce={comment:l1,lineComment:mt(l1),blockComment:mt(l1),docComment:mt(l1),name:qp,variableName:mt(qp),typeName:f6,tagName:mt(f6),propertyName:h6,attributeName:mt(h6),className:mt(qp),labelName:mt(qp),namespace:mt(qp),macroName:mt(qp),literal:zp,string:c1,docString:mt(c1),character:mt(c1),attributeValue:mt(c1),number:VR,integer:mt(VR),float:mt(VR),bool:mt(zp),regexp:mt(zp),escape:mt(zp),color:mt(zp),url:mt(zp),keyword:ou,self:mt(ou),null:mt(ou),atom:mt(ou),unit:mt(ou),modifier:mt(ou),operatorKeyword:mt(ou),controlKeyword:mt(ou),definitionKeyword:mt(ou),moduleKeyword:mt(ou),operator:su,derefOperator:mt(su),arithmeticOperator:mt(su),logicOperator:mt(su),bitwiseOperator:mt(su),compareOperator:mt(su),updateOperator:mt(su),definitionOperator:mt(su),typeOperator:mt(su),controlOperator:mt(su),punctuation:WM,separator:mt(WM),bracket:Pb,angleBracket:mt(Pb),squareBracket:mt(Pb),paren:mt(Pb),brace:mt(Pb),content:uu,heading:nh,heading1:mt(nh),heading2:mt(nh),heading3:mt(nh),heading4:mt(nh),heading5:mt(nh),heading6:mt(nh),contentSeparator:mt(uu),list:mt(uu),quote:mt(uu),emphasis:mt(uu),strong:mt(uu),link:mt(uu),monospace:mt(uu),strikethrough:mt(uu),inserted:mt(),deleted:mt(),changed:mt(),invalid:mt(),meta:u1,documentMeta:mt(u1),annotation:mt(u1),processingInstruction:mt(u1),definition:Dd.defineModifier("definition"),constant:Dd.defineModifier("constant"),function:Dd.defineModifier("function"),standard:Dd.defineModifier("standard"),local:Dd.defineModifier("local"),special:Dd.defineModifier("special")};for(let t in ce){let e=ce[t];e instanceof Dd&&(e.name=t)}Pue([{tag:ce.link,class:"tok-link"},{tag:ce.heading,class:"tok-heading"},{tag:ce.emphasis,class:"tok-emphasis"},{tag:ce.strong,class:"tok-strong"},{tag:ce.keyword,class:"tok-keyword"},{tag:ce.atom,class:"tok-atom"},{tag:ce.bool,class:"tok-bool"},{tag:ce.url,class:"tok-url"},{tag:ce.labelName,class:"tok-labelName"},{tag:ce.inserted,class:"tok-inserted"},{tag:ce.deleted,class:"tok-deleted"},{tag:ce.literal,class:"tok-literal"},{tag:ce.string,class:"tok-string"},{tag:ce.number,class:"tok-number"},{tag:[ce.regexp,ce.escape,ce.special(ce.string)],class:"tok-string2"},{tag:ce.variableName,class:"tok-variableName"},{tag:ce.local(ce.variableName),class:"tok-variableName tok-local"},{tag:ce.definition(ce.variableName),class:"tok-variableName tok-definition"},{tag:ce.special(ce.variableName),class:"tok-variableName2"},{tag:ce.definition(ce.propertyName),class:"tok-propertyName tok-definition"},{tag:ce.typeName,class:"tok-typeName"},{tag:ce.namespace,class:"tok-namespace"},{tag:ce.className,class:"tok-className"},{tag:ce.macroName,class:"tok-macroName"},{tag:ce.propertyName,class:"tok-propertyName"},{tag:ce.operator,class:"tok-operator"},{tag:ce.comment,class:"tok-comment"},{tag:ce.meta,class:"tok-meta"},{tag:ce.invalid,class:"tok-invalid"},{tag:ce.punctuation,class:"tok-punctuation"}]);const K7e=mp({String:ce.string,Number:ce.number,"True False":ce.bool,PropertyName:ce.propertyName,Null:ce.null,",":ce.separator,"[ ]":ce.squareBracket,"{ }":ce.brace}),J7e=Qc.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[K7e],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0});let XM=[],$ue=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?$ue:XM).push(n=n+t[e])})();function e6e(t){if(t<768)return!1;for(let e=0,n=XM.length;;){let r=e+n>>1;if(t<XM[r])n=r;else if(t>=$ue[r])e=r+1;else return!0;if(e==n)return!1}}function m6(t){return t>=127462&&t<=127487}const g6=8205;function t6e(t,e,n=!0,r=!0){return(n?Eue:n6e)(t,e,r)}function Eue(t,e,n){if(e==t.length)return e;e&&Aue(t.charCodeAt(e))&&Rue(t.charCodeAt(e-1))&&e--;let r=FR(t,e);for(e+=y6(r);e<t.length;){let i=FR(t,e);if(r==g6||i==g6||n&&e6e(i))e+=y6(i),r=i;else if(m6(i)){let o=0,s=e-2;for(;s>=0&&m6(FR(t,s));)o++,s-=2;if(o%2==0)break;e+=2}else break}return e}function n6e(t,e,n){for(;e>0;){let r=Eue(t,e-2,n);if(r<e)return r;e--}return 0}function FR(t,e){let n=t.charCodeAt(e);if(!Rue(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return Aue(r)?(n-55296<<10)+(r-56320)+65536:n}function Aue(t){return t>=56320&&t<57344}function Rue(t){return t>=55296&&t<56320}function y6(t){return t<65536?1:2}let sr=class jue{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=Gy(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),_u.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Gy(this,e,n);let r=[];return this.decompose(e,n,r,0),_u.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new QO(this),o=new QO(e);for(let s=n,a=n;;){if(i.next(s),o.next(s),s=0,i.lineBreak!=o.lineBreak||i.done!=o.done||i.value!=o.value)return!1;if(a+=i.value.length,i.done||a>=r)return!0}}iter(e=1){return new QO(this,e)}iterRange(e,n=this.length){return new Nue(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new Mue(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?jue.empty:e.length<=32?new Hi(e):_u.from(Hi.split(e,[]))}};class Hi extends sr{constructor(e,n=r6e(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let o=0;;o++){let s=this.text[o],a=i+s.length;if((n?r:a)>=e)return new i6e(i,a,r,s);i=a+1,r++}}decompose(e,n,r,i){let o=e<=0&&n>=this.length?this:new Hi(v6(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let s=r.pop(),a=UC(o.text,s.text.slice(),0,o.length);if(a.length<=32)r.push(new Hi(a,s.length+o.length));else{let l=a.length>>1;r.push(new Hi(a.slice(0,l)),new Hi(a.slice(l)))}}else r.push(o)}replace(e,n,r){if(!(r instanceof Hi))return super.replace(e,n,r);[e,n]=Gy(this,e,n);let i=UC(this.text,UC(r.text,v6(this.text,0,e)),n),o=this.length+r.length-(n-e);return i.length<=32?new Hi(i,o):_u.from(Hi.split(i,[]),o)}sliceString(e,n=this.length,r=`
@@ -690,7 +690,7 @@ ${ie}`,fe=Math.min(B.length,I);let de=0;for(;de<fe-1;de++){const Q=q(String(de),
690
690
  ${V}`,se.pop(),`[${K}]`}let M=Object.keys(B);const ee=M.length;if(ee===0)return"{}";if(C<se.length+1)return'"[Object]"';ie+=H;const X=`,
691
691
  ${ie}`;let j="",W="",Z=Math.min(ee,I);l(B)&&(j+=c(B,X,I),M=M.slice(B.length),Z-=B.length,W=X),S&&(M=s(M,_)),se.push(B);for(let K=0;K<Z;K++){const G=M[K],fe=q(G,B[G],se,H,ie);fe!==void 0&&(j+=`${W}${o(G)}: ${fe}`,W=X)}if(ee>I){const K=ee-I;j+=`${W}"...": "${m(K)} not stringified"`,W=X}return W!==""&&(j=`
692
692
  ${ie}${j}
693
- ${V}`),se.pop(),`{${j}}`}case"number":return isFinite(B)?String(B):x?x(B):"null";case"boolean":return B===!0?"true":"false";case"undefined":return;case"bigint":if(w)return String(B);default:return x?x(B):void 0}}function z(te,B,se){switch(typeof B){case"string":return o(B);case"object":{if(B===null)return"null";if(typeof B.toJSON=="function"){if(B=B.toJSON(te),typeof B!="object")return z(te,B,se);if(B===null)return"null"}if(se.indexOf(B)!==-1)return O;let H="";const ie=B.length!==void 0;if(ie&&Array.isArray(B)){if(B.length===0)return"[]";if(C<se.length+1)return'"[Array]"';se.push(B);const j=Math.min(B.length,I);let W=0;for(;W<j-1;W++){const K=z(String(W),B[W],se);H+=K!==void 0?K:"null",H+=","}const Z=z(String(W),B[W],se);if(H+=Z!==void 0?Z:"null",B.length-1>I){const K=B.length-I-1;H+=`,"... ${m(K)} not stringified"`}return se.pop(),`[${H}]`}let V=Object.keys(B);const M=V.length;if(M===0)return"{}";if(C<se.length+1)return'"[Object]"';let ee="",X=Math.min(M,I);ie&&l(B)&&(H+=c(B,",",I),V=V.slice(B.length),X-=B.length,ee=","),S&&(V=s(V,_)),se.push(B);for(let j=0;j<X;j++){const W=V[j],Z=z(W,B[W],se);Z!==void 0&&(H+=`${ee}${o(W)}:${Z}`,ee=",")}if(M>I){const j=M-I;H+=`${ee}"...":"${m(j)} not stringified"`}return se.pop(),`{${H}}`}case"number":return isFinite(B)?String(B):x?x(B):"null";case"boolean":return B===!0?"true":"false";case"undefined":return;case"bigint":if(w)return String(B);default:return x?x(B):void 0}}function F(te,B,se){if(arguments.length>1){let H="";if(typeof se=="number"?H=" ".repeat(Math.min(se,10)):typeof se=="string"&&(H=se.slice(0,10)),B!=null){if(typeof B=="function")return A("",{"":te},[],B,H,"");if(Array.isArray(B))return R("",te,[],g(B),H,"")}if(H.length!==0)return q("",te,[],H,"")}return z("",te,[])}return F}})(G1,G1.exports)),G1.exports}var fpt=ppt();const hpt=Fo(fpt),mpt=hpt.configure;class dx extends Hdt{static maxErrorTextChars=4096;static stringify=mpt({maximumDepth:2,maximumBreadth:10});sendErrorEvent;constructor(e,n){super("errors","1.0",e||{}),this.sendErrorEvent=n}static toErrorEvent(e,n){return{type:"error",payload:[{handler:n,errorType:this.getErrorType(e),message:this.getErrorMessage(e),stack:this.getErrorStack(e)}]}}enable(){window.addEventListener("error",this.onError),window.addEventListener("unhandledrejection",this.onUnhandledRejection),this._wrap(console,"error",this.patchConsoleError())}disable(){window.removeEventListener("error",this.onError),window.removeEventListener("unhandledrejection",this.onUnhandledRejection),this._unwrap(console,"error")}init(){}static getErrorMessage(e){return e?(typeof e=="object"&&"message"in e?String(e.message):String(e)).trim():void 0}static getErrorStack(e){if(!e||typeof e!="object"||!("stack"in e)||!e.stack)return;const n=String(e.stack);return n.length>this.maxErrorTextChars?n.substring(0,this.maxErrorTextChars):n}static getErrorType(e){return!e||typeof e!="object"?typeof e:"name"in e?String(e.name):"constructor"in e&&"name"in e.constructor?String(e.constructor.name):"Error"}static combineConsoleErrorArgs(e){const n=e.findIndex(i=>i instanceof Error),r=e.filter((i,o)=>o!==n).map(i=>typeof i=="string"?i:i instanceof Error?String(i):this.stringify(i)??String(i)).join(" ").substring(0,this.maxErrorTextChars);if(n===-1)return r;{const i=e[n];return r&&(i.message=`${i.message} ${r}`),i}}onError=e=>{this.sendError(e.error,"window.onerror")};onUnhandledRejection=e=>{this.sendError(e.reason,"window.onunhandledrejection")};patchConsoleError(){return e=>{const n=this;return function(...i){try{const o=dx.combineConsoleErrorArgs(i);n.sendError(o,"console.error")}catch(o){process.env.NODE_ENV!=="production"&&e?.call(this,"Error reporting failed:",o)}e?.apply(this,i)}}}sendError(e,n){this.sendErrorEvent(dx.toErrorEvent(e,n))}}class gpt{config=null;initialized=!1;useCloudEventData;otelClient;tracer;constructor(){this.useCloudEventData=()=>({origin:"replayUi",signal:"log"}),this.otelClient=new dpt,this.tracer={traceStep:(e,n)=>{const r=this.constructCloudEvent(e,n,{signal:"trace"});return this.otelClient.traceStep(r)}}}updateCloudEventData=e=>{this.config?.disabled||(this.useCloudEventData=e)};send(e,n,r){try{if(!this.config?.otel.isProd)return;const o=e&&typeof e=="object"&&"type"in e&&"data"in e?e:this.constructCloudEvent(e,n,{...r,signal:"log"});this.sendToOtelService(o)}catch(i){this.config?.otel.isProd||console.error("Event reporting failed:",i)}}init(e){e.disabled||this.initialized||(this.config=e,this.initialized=!0,this.otelClient.init({serviceVersion:e.otel.serviceVersion,version:e.otel.version,isProd:e.otel.isProd,collectorUrl:e.otel.collectorUrl,collectorTraceUrl:e.otel.collectorTraceUrl,serviceName:e.otel.serviceName,tracerName:e.otel.tracerName,spanProcessors:e.otel.spanProcessors,instrumentations:[...e.otel.enableErrorInstrumentation===!0?[new dx(void 0,n=>{this.sendToOtelService({type:n.type,data:n.payload})})]:[],...e.otel.instrumentations||[]]}))}startSpan(e,n,r){if(this.config?.disabled)return;const i=this.constructCloudEvent(e,n,{signal:"trace"});return this.otelClient.startSpan(i,r)}constructCloudEvent(e,n,r){const i={...this.useCloudEventData(),...r};return hct({type:e,data:n,...i,...this.otelClient.sessionId&&{sessionId:this.otelClient.sessionId}})}sendToOtelService(e){this.config?.otel.isProd||console.log("CloudEvent to be sent to OTEL service:",e),this.otelClient.send({...e,signal:"log"})}forceFlush(){return this.config?.disabled?Promise.resolve():this.otelClient.forceFlush()}shutdown(){return this.config?.disabled?Promise.resolve():this.otelClient.shutdown()}sendError(e,n){if(this.config?.disabled)return;const r=dx.toErrorEvent(e,n);this.sendToOtelService({type:r.type,data:r.payload})}sendTabChangeMessage(e,n){this.send("com.redocly.tab.change",e,n)}sendButtonClickMessage(e,n){this.send("com.redocly.button.click",e,n)}sendTabOpenFailedMessage(e,n){this.send("com.redocly.tab.openFailed",e,n)}sendChangeMessage(e,n){this.send("com.redocly.change.occurred",e,n)}sendContentCopyMessage(e,n){this.send("com.redocly.content.copy",e,n)}sendRequestSendMessage(e,n){this.send("com.redocly.request.send",e,n)}sendResponseReceivedMessage(e,n){this.send("com.redocly.response.received",e,n)}sendTokenGenerateMessage(e,n){this.send("com.redocly.token.generate",e,n)}sendAppLifecycleMessage(e,n){this.send("com.redocly.app.lifecycle",e,n)}sendEnvironmentManagementMessage(e,n){this.send("com.redocly.environment.management",e,n)}sendServerManagementMessage(e,n){this.send("com.redocly.server.management",e,n)}sendSourceManagementMessage(e,n){this.send("com.redocly.source.management",e,n)}sendInputManagementMessage(e,n){this.send("com.redocly.input.management",e,n)}sendNodeManagementMessage(e,n){this.send("com.redocly.node.management",e,n)}sendHistoryManagementMessage(e,n){this.send("com.redocly.history.management",e,n)}sendHistoryMigrationMessage(e,n){this.send("com.redocly.history.migration",e,n)}sendCredentialManagementMessage(e,n){this.send("com.redocly.credential.management",e,n)}sendPanelToggleMessage(e,n){this.send("com.redocly.panel.toggle",e,n)}sendWorkflowRunClickMessage(e,n){this.send("com.redocly.workflowRun.click",e,n)}sendWorkflowRunResultMessage(e,n){this.send("com.redocly.workflowRun.result",e,n)}sendStorageReadMessage(e,n){this.send("com.redocly.storage.read",e,n)}sendStorageLoadUserStateMessage(e,n){this.send("com.redocly.storage.loadUserState",e,n)}sendStorageDetectFilesMessage(e,n){this.send("com.redocly.storage.detectFiles",e,n)}sendStorageLoadApisMessage(e,n){this.send("com.redocly.storage.loadApis",e,n)}sendStorageParseApisMessage(e,n){this.send("com.redocly.storage.parseApis",e,n)}sendStorageParseCollectionsMessage(e,n){this.send("com.redocly.storage.parseCollections",e,n)}sendUpdaterCheckMessage(e,n){this.send("com.redocly.updater.check",e,n)}sendUpdaterDownloadMessage(e,n){this.send("com.redocly.updater.download",e,n)}sendUpdaterInstallMessage(e,n){this.send("com.redocly.updater.install",e,n)}sendUpdaterProcessMessage(e,n){this.send("com.redocly.updater.process",e,n)}sendErrorMessage(e,n){this.send("com.redocly.error.occurred",e,n)}sendBackendEventMessage(e,n){this.send("com.redocly.backend.event",e,n)}sendCodeEditorSearchMessage(e,n){this.send("com.redocly.codeEditor.search",e,n)}sendAiChatToolCallStartedMessage(e,n){this.send("com.redocly.aiChat.toolCallStarted",e,n)}sendAiChatToolCallFinishedMessage(e,n){this.send("com.redocly.aiChat.toolCallFinished",e,n)}sendAiChatConversationStartedMessage(e,n){this.send("com.redocly.aiChat.conversationStarted",e,n)}sendAiChatConversationFinishedMessage(e,n){this.send("com.redocly.aiChat.conversationFinished",e,n)}}const Yv=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],ypt="https://cors.redocly.com/";function vpt(){return{theme:"light",disableCollectionsTab:!1,oAuth2RedirectURI:void 0,corsProxyUrl:void 0,credentialOrigin:void 0,certificates:[],isApiBased:!1,generatedEnvironments:[],generatedInputs:[],hideOtherSecuritySchemes:!1,aiEnabled:!1,isPreviewLayout:!1}}const bpt=vpt(),Opt=$.createContext(bpt);function hs(){const t=$.useContext(Opt);return Pq(t)}function xpt(t,e){const{apps:{apiId:n}}=nn(),{corsProxyUrl:r,credentialOrigin:i,disableCollectionsTab:o,oAuth2RedirectURI:s,certificates:a,storageKey:l,isApiBased:c,aiEnabled:u,isPreviewLayout:d}=hs();r.set(t?.corsProxyUrl??ypt),i.set(t?.credentialOrigin),n.set(t?.apiId),s.set(t?.oAuth2RedirectURI),o.set(!!t?.disableCollectionsTab),l.set(t?.storageKey),c.set(!!e),u.set(!!t?.aiEnabled),d.set(t?.layout==="preview"),$.useEffect(()=>{a.set(t?.certificates||[])},[t?.certificates])}const nE=$.createContext({});function ho(){return $.useContext(nE)||{}}const FQ=process.env.NODE_ENV==="development",NY=process.env.NODE_ENV==="production",wpt="0.27.0-next.1",Spt={version:wpt},_pt={organizationId:"",organizationSlug:"",projectId:"",projectSlug:"",actor:{id:"",object:"user",uri:""},source:"urn:redocly:replay:app",origin:"replayUi"};class Sye{_client;_isInitialized=!1;_initResolve=null;_initPromise=new Promise(e=>{this._initResolve=e});_globalAttributes={platform:"",deviceId:""};constructor(){this._client=new gpt}get isInitialized(){return this._isInitialized}get client(){return this._client}awaitInit(){return this._initPromise}updateCloudEventData(e){this._client.updateCloudEventData(e)}setCloudEventData(e){this._client.updateCloudEventData(()=>({..._pt,...e,env:NY?"production":"development"}))}enrichGlobalAttributes(e){this._globalAttributes={...this._globalAttributes,...e}}getGlobalAttributes(){return{...this._globalAttributes}}clearGlobalAttributes(){this._globalAttributes={platform:"",deviceId:""}}init(e){if(this.isInitialized)return;const{cloudEventData:n,...r}=e??{},i=r.tracerName||"desktop",o=r.enableErrorInstrumentation??i==="desktop",s={serviceName:"replay",serviceVersion:Spt.version,version:"1.0.0",tracerName:i,collectorUrl:"",isProd:NY,enableErrorInstrumentation:o};this._client.init({otel:{...s,...r}}),this.setCloudEventData(n),this._initResolve?.(this),this._isInitialized=!0}sendEvent(e,n){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}const r=n.map(i=>({...this._globalAttributes,...i}));FQ&&console.log(`[Telemetry] ${e}:`,JSON.stringify(r,null,2));try{this.client.send(e,r)}catch(i){console.error("Failed to send telemetry event:",i)}}startSpan(e,n,r){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}try{const i=(n??[{}]).map(o=>({...this._globalAttributes,...o}));return FQ&&console.log(`[Telemetry] span ${e}:`,JSON.stringify(i,null,2)),this._client.startSpan(e,i,r)}catch(i){console.error("Failed to start telemetry span:",i);return}}}const wh=new Sye;function Xt(){const{telemetry:t}=ho();wh.isInitialized||wh.init(t);const e=t?.cloudEventData;$.useEffect(()=>{e&&wh.setCloudEventData(e)},[e]);const n=$.useCallback((i,o)=>{wh.sendEvent(i,o)},[]),r=$.useCallback((i,o,s)=>wh.startSpan(i,o,s),[]);return{sendEvent:n,startSpan:r}}const Cpt=({awaitInit:t=!0}={})=>{const[e,n]=$.useState(void 0);return $.useEffect(()=>{(async()=>{const i=t?await wh.awaitInit():wh;n(i)})()},[t]),e},ks=800,pl=E.default(Y.Button).attrs({variant:"text",size:"small",tone:"danger"})`
693
+ ${V}`),se.pop(),`{${j}}`}case"number":return isFinite(B)?String(B):x?x(B):"null";case"boolean":return B===!0?"true":"false";case"undefined":return;case"bigint":if(w)return String(B);default:return x?x(B):void 0}}function z(te,B,se){switch(typeof B){case"string":return o(B);case"object":{if(B===null)return"null";if(typeof B.toJSON=="function"){if(B=B.toJSON(te),typeof B!="object")return z(te,B,se);if(B===null)return"null"}if(se.indexOf(B)!==-1)return O;let H="";const ie=B.length!==void 0;if(ie&&Array.isArray(B)){if(B.length===0)return"[]";if(C<se.length+1)return'"[Array]"';se.push(B);const j=Math.min(B.length,I);let W=0;for(;W<j-1;W++){const K=z(String(W),B[W],se);H+=K!==void 0?K:"null",H+=","}const Z=z(String(W),B[W],se);if(H+=Z!==void 0?Z:"null",B.length-1>I){const K=B.length-I-1;H+=`,"... ${m(K)} not stringified"`}return se.pop(),`[${H}]`}let V=Object.keys(B);const M=V.length;if(M===0)return"{}";if(C<se.length+1)return'"[Object]"';let ee="",X=Math.min(M,I);ie&&l(B)&&(H+=c(B,",",I),V=V.slice(B.length),X-=B.length,ee=","),S&&(V=s(V,_)),se.push(B);for(let j=0;j<X;j++){const W=V[j],Z=z(W,B[W],se);Z!==void 0&&(H+=`${ee}${o(W)}:${Z}`,ee=",")}if(M>I){const j=M-I;H+=`${ee}"...":"${m(j)} not stringified"`}return se.pop(),`{${H}}`}case"number":return isFinite(B)?String(B):x?x(B):"null";case"boolean":return B===!0?"true":"false";case"undefined":return;case"bigint":if(w)return String(B);default:return x?x(B):void 0}}function F(te,B,se){if(arguments.length>1){let H="";if(typeof se=="number"?H=" ".repeat(Math.min(se,10)):typeof se=="string"&&(H=se.slice(0,10)),B!=null){if(typeof B=="function")return A("",{"":te},[],B,H,"");if(Array.isArray(B))return R("",te,[],g(B),H,"")}if(H.length!==0)return q("",te,[],H,"")}return z("",te,[])}return F}})(G1,G1.exports)),G1.exports}var fpt=ppt();const hpt=Fo(fpt),mpt=hpt.configure;class dx extends Hdt{static maxErrorTextChars=4096;static stringify=mpt({maximumDepth:2,maximumBreadth:10});sendErrorEvent;constructor(e,n){super("errors","1.0",e||{}),this.sendErrorEvent=n}static toErrorEvent(e,n){return{type:"error",payload:[{handler:n,errorType:this.getErrorType(e),message:this.getErrorMessage(e),stack:this.getErrorStack(e)}]}}enable(){window.addEventListener("error",this.onError),window.addEventListener("unhandledrejection",this.onUnhandledRejection),this._wrap(console,"error",this.patchConsoleError())}disable(){window.removeEventListener("error",this.onError),window.removeEventListener("unhandledrejection",this.onUnhandledRejection),this._unwrap(console,"error")}init(){}static getErrorMessage(e){return e?(typeof e=="object"&&"message"in e?String(e.message):String(e)).trim():void 0}static getErrorStack(e){if(!e||typeof e!="object"||!("stack"in e)||!e.stack)return;const n=String(e.stack);return n.length>this.maxErrorTextChars?n.substring(0,this.maxErrorTextChars):n}static getErrorType(e){return!e||typeof e!="object"?typeof e:"name"in e?String(e.name):"constructor"in e&&"name"in e.constructor?String(e.constructor.name):"Error"}static combineConsoleErrorArgs(e){const n=e.findIndex(i=>i instanceof Error),r=e.filter((i,o)=>o!==n).map(i=>typeof i=="string"?i:i instanceof Error?String(i):this.stringify(i)??String(i)).join(" ").substring(0,this.maxErrorTextChars);if(n===-1)return r;{const i=e[n];return r&&(i.message=`${i.message} ${r}`),i}}onError=e=>{this.sendError(e.error,"window.onerror")};onUnhandledRejection=e=>{this.sendError(e.reason,"window.onunhandledrejection")};patchConsoleError(){return e=>{const n=this;return function(...i){try{const o=dx.combineConsoleErrorArgs(i);n.sendError(o,"console.error")}catch(o){process.env.NODE_ENV!=="production"&&e?.call(this,"Error reporting failed:",o)}e?.apply(this,i)}}}sendError(e,n){this.sendErrorEvent(dx.toErrorEvent(e,n))}}class gpt{config=null;initialized=!1;useCloudEventData;otelClient;tracer;constructor(){this.useCloudEventData=()=>({origin:"replayUi",signal:"log"}),this.otelClient=new dpt,this.tracer={traceStep:(e,n)=>{const r=this.constructCloudEvent(e,n,{signal:"trace"});return this.otelClient.traceStep(r)}}}updateCloudEventData=e=>{this.config?.disabled||(this.useCloudEventData=e)};send(e,n,r){try{if(!this.config?.otel.isProd)return;const o=e&&typeof e=="object"&&"type"in e&&"data"in e?e:this.constructCloudEvent(e,n,{...r,signal:"log"});this.sendToOtelService(o)}catch(i){this.config?.otel.isProd||console.error("Event reporting failed:",i)}}init(e){e.disabled||this.initialized||(this.config=e,this.initialized=!0,this.otelClient.init({serviceVersion:e.otel.serviceVersion,version:e.otel.version,isProd:e.otel.isProd,collectorUrl:e.otel.collectorUrl,collectorTraceUrl:e.otel.collectorTraceUrl,serviceName:e.otel.serviceName,tracerName:e.otel.tracerName,spanProcessors:e.otel.spanProcessors,instrumentations:[...e.otel.enableErrorInstrumentation===!0?[new dx(void 0,n=>{this.sendToOtelService({type:n.type,data:n.payload})})]:[],...e.otel.instrumentations||[]]}))}startSpan(e,n,r){if(this.config?.disabled)return;const i=this.constructCloudEvent(e,n,{signal:"trace"});return this.otelClient.startSpan(i,r)}constructCloudEvent(e,n,r){const i={...this.useCloudEventData(),...r};return hct({type:e,data:n,...i,...this.otelClient.sessionId&&{sessionId:this.otelClient.sessionId}})}sendToOtelService(e){this.config?.otel.isProd||console.log("CloudEvent to be sent to OTEL service:",e),this.otelClient.send({...e,signal:"log"})}forceFlush(){return this.config?.disabled?Promise.resolve():this.otelClient.forceFlush()}shutdown(){return this.config?.disabled?Promise.resolve():this.otelClient.shutdown()}sendError(e,n){if(this.config?.disabled)return;const r=dx.toErrorEvent(e,n);this.sendToOtelService({type:r.type,data:r.payload})}sendTabChangeMessage(e,n){this.send("com.redocly.tab.change",e,n)}sendButtonClickMessage(e,n){this.send("com.redocly.button.click",e,n)}sendTabOpenFailedMessage(e,n){this.send("com.redocly.tab.openFailed",e,n)}sendChangeMessage(e,n){this.send("com.redocly.change.occurred",e,n)}sendContentCopyMessage(e,n){this.send("com.redocly.content.copy",e,n)}sendRequestSendMessage(e,n){this.send("com.redocly.request.send",e,n)}sendResponseReceivedMessage(e,n){this.send("com.redocly.response.received",e,n)}sendTokenGenerateMessage(e,n){this.send("com.redocly.token.generate",e,n)}sendAppLifecycleMessage(e,n){this.send("com.redocly.app.lifecycle",e,n)}sendEnvironmentManagementMessage(e,n){this.send("com.redocly.environment.management",e,n)}sendServerManagementMessage(e,n){this.send("com.redocly.server.management",e,n)}sendSourceManagementMessage(e,n){this.send("com.redocly.source.management",e,n)}sendInputManagementMessage(e,n){this.send("com.redocly.input.management",e,n)}sendNodeManagementMessage(e,n){this.send("com.redocly.node.management",e,n)}sendHistoryManagementMessage(e,n){this.send("com.redocly.history.management",e,n)}sendHistoryMigrationMessage(e,n){this.send("com.redocly.history.migration",e,n)}sendCredentialManagementMessage(e,n){this.send("com.redocly.credential.management",e,n)}sendPanelToggleMessage(e,n){this.send("com.redocly.panel.toggle",e,n)}sendWorkflowRunClickMessage(e,n){this.send("com.redocly.workflowRun.click",e,n)}sendWorkflowRunResultMessage(e,n){this.send("com.redocly.workflowRun.result",e,n)}sendStorageReadMessage(e,n){this.send("com.redocly.storage.read",e,n)}sendStorageLoadUserStateMessage(e,n){this.send("com.redocly.storage.loadUserState",e,n)}sendStorageDetectFilesMessage(e,n){this.send("com.redocly.storage.detectFiles",e,n)}sendStorageLoadApisMessage(e,n){this.send("com.redocly.storage.loadApis",e,n)}sendStorageParseApisMessage(e,n){this.send("com.redocly.storage.parseApis",e,n)}sendStorageParseCollectionsMessage(e,n){this.send("com.redocly.storage.parseCollections",e,n)}sendUpdaterCheckMessage(e,n){this.send("com.redocly.updater.check",e,n)}sendUpdaterDownloadMessage(e,n){this.send("com.redocly.updater.download",e,n)}sendUpdaterInstallMessage(e,n){this.send("com.redocly.updater.install",e,n)}sendUpdaterProcessMessage(e,n){this.send("com.redocly.updater.process",e,n)}sendErrorMessage(e,n){this.send("com.redocly.error.occurred",e,n)}sendBackendEventMessage(e,n){this.send("com.redocly.backend.event",e,n)}sendCodeEditorSearchMessage(e,n){this.send("com.redocly.codeEditor.search",e,n)}sendAiChatToolCallStartedMessage(e,n){this.send("com.redocly.aiChat.toolCallStarted",e,n)}sendAiChatToolCallFinishedMessage(e,n){this.send("com.redocly.aiChat.toolCallFinished",e,n)}sendAiChatConversationStartedMessage(e,n){this.send("com.redocly.aiChat.conversationStarted",e,n)}sendAiChatConversationFinishedMessage(e,n){this.send("com.redocly.aiChat.conversationFinished",e,n)}}const Yv=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],ypt="https://cors.redocly.com/";function vpt(){return{theme:"light",disableCollectionsTab:!1,oAuth2RedirectURI:void 0,corsProxyUrl:void 0,credentialOrigin:void 0,certificates:[],isApiBased:!1,generatedEnvironments:[],generatedInputs:[],hideOtherSecuritySchemes:!1,aiEnabled:!1,isPreviewLayout:!1}}const bpt=vpt(),Opt=$.createContext(bpt);function hs(){const t=$.useContext(Opt);return Pq(t)}function xpt(t,e){const{apps:{apiId:n}}=nn(),{corsProxyUrl:r,credentialOrigin:i,disableCollectionsTab:o,oAuth2RedirectURI:s,certificates:a,storageKey:l,isApiBased:c,aiEnabled:u,isPreviewLayout:d}=hs();r.set(t?.corsProxyUrl??ypt),i.set(t?.credentialOrigin),n.set(t?.apiId),s.set(t?.oAuth2RedirectURI),o.set(!!t?.disableCollectionsTab),l.set(t?.storageKey),c.set(!!e),u.set(!!t?.aiEnabled),d.set(t?.layout==="preview"),$.useEffect(()=>{a.set(t?.certificates||[])},[t?.certificates])}const nE=$.createContext({});function ho(){return $.useContext(nE)||{}}const FQ=process.env.NODE_ENV==="development",NY=process.env.NODE_ENV==="production",wpt="0.27.0-next.2",Spt={version:wpt},_pt={organizationId:"",organizationSlug:"",projectId:"",projectSlug:"",actor:{id:"",object:"user",uri:""},source:"urn:redocly:replay:app",origin:"replayUi"};class Sye{_client;_isInitialized=!1;_initResolve=null;_initPromise=new Promise(e=>{this._initResolve=e});_globalAttributes={platform:"",deviceId:""};constructor(){this._client=new gpt}get isInitialized(){return this._isInitialized}get client(){return this._client}awaitInit(){return this._initPromise}updateCloudEventData(e){this._client.updateCloudEventData(e)}setCloudEventData(e){this._client.updateCloudEventData(()=>({..._pt,...e,env:NY?"production":"development"}))}enrichGlobalAttributes(e){this._globalAttributes={...this._globalAttributes,...e}}getGlobalAttributes(){return{...this._globalAttributes}}clearGlobalAttributes(){this._globalAttributes={platform:"",deviceId:""}}init(e){if(this.isInitialized)return;const{cloudEventData:n,...r}=e??{},i=r.tracerName||"desktop",o=r.enableErrorInstrumentation??i==="desktop",s={serviceName:"replay",serviceVersion:Spt.version,version:"1.0.0",tracerName:i,collectorUrl:"",isProd:NY,enableErrorInstrumentation:o};this._client.init({otel:{...s,...r}}),this.setCloudEventData(n),this._initResolve?.(this),this._isInitialized=!0}sendEvent(e,n){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}const r=n.map(i=>({...this._globalAttributes,...i}));FQ&&console.log(`[Telemetry] ${e}:`,JSON.stringify(r,null,2));try{this.client.send(e,r)}catch(i){console.error("Failed to send telemetry event:",i)}}startSpan(e,n,r){if(!this.isInitialized){console.warn("Telemetry client not initialized. Call init() first.");return}try{const i=(n??[{}]).map(o=>({...this._globalAttributes,...o}));return FQ&&console.log(`[Telemetry] span ${e}:`,JSON.stringify(i,null,2)),this._client.startSpan(e,i,r)}catch(i){console.error("Failed to start telemetry span:",i);return}}}const wh=new Sye;function Xt(){const{telemetry:t}=ho();wh.isInitialized||wh.init(t);const e=t?.cloudEventData;$.useEffect(()=>{e&&wh.setCloudEventData(e)},[e]);const n=$.useCallback((i,o)=>{wh.sendEvent(i,o)},[]),r=$.useCallback((i,o,s)=>wh.startSpan(i,o,s),[]);return{sendEvent:n,startSpan:r}}const Cpt=({awaitInit:t=!0}={})=>{const[e,n]=$.useState(void 0);return $.useEffect(()=>{(async()=>{const i=t?await wh.awaitInit():wh;n(i)})()},[t]),e},ks=800,pl=E.default(Y.Button).attrs({variant:"text",size:"small",tone:"danger"})`
694
694
  border: none;
695
695
  margin: 0;
696
696
 
@@ -956,7 +956,7 @@ ${V}`),se.pop(),`{${j}}`}case"number":return isFinite(B)?String(B):x?x(B):"null"
956
956
  border-radius: var(--border-radius);
957
957
  border: 1px solid var(--border-color-primary);
958
958
  padding: 0 calc(var(--spacing-xxs) / 2);
959
- `,vr=(t,e,n=new Set)=>{const r=lve(t);if(!r.length)return t;let i=0;const o=r.flatMap(({start:s,end:a,name:l})=>{if(n.has(l))return null;const c=e.findLast(d=>d.name===l),u=t.slice(i,c?s:a);if(i=a,c){n.add(l);const d=vr(c.value,e,n);return n.delete(l),[u.length?u:null,d||t.slice(s,a)]}return[u.length?u:null]});return t.slice(i).length&&o.push(t.slice(i)),o.join("")};function Imt(t,e){return e.find(n=>n.name===t.slice(1,-1))?.value||t}function kmt(t,e){const n=cve(t);if(!n.length)return h.jsx(KY,{children:t});let r=0;const i=n.flatMap(({start:o,end:s})=>{const a=t.slice(r,o),l=Imt(t.slice(o,s),e);return r=s,[a.length?a:null,l]});return t.slice(r).length&&i.push(t.slice(r)),h.jsx(KY,{children:i.join("")})}function uve(t){return CIe(t)}const dve="New Step";function YQ({name:t=dve,workflow:e}={}){let n=t.replaceAll(" ","-").toLowerCase();if(!e)return n;const r=Pmt(e);if(r.includes(n)){let i=1;for(;r.includes(`${n}-${i}`);)i++;n=`${n}-${i}`}return n}function Pmt(t){return t.steps.filter(e=>e.state.get()!==Bn.Draft).map(e=>e.stepId.get())}function ed({name:t=dve,isDraft:e=!1,fromStep:n,workflow:r,operation:i,apiOperation:o,dynamicReplayValues:s,xOperation:a}={}){if(!n){const c=o?rU(o,s):null,u=[dl()];return{stepId:YQ({name:t,workflow:r}),description:t,outputs:[],successCriteria:[],state:e?Bn.Draft:Bn.Normal,parameters:{pathParameters:[],queryParameters:a?b$(a.url):[],headers:[],cookies:[]},requestBody:ak(),xOperation:a??(i?null:{method:"GET",url:""}),security:u,operation:i??null,...c}}const l=n.get({noproxy:!0});return{stepId:YQ({name:t,workflow:r}),description:l.description,outputs:l.outputs,successCriteria:l.successCriteria,state:e?Bn.Draft:Bn.Normal,parameters:l.parameters,requestBody:l.requestBody,xOperation:l.xOperation,security:l.security,operation:l.operation}}function If(t){return uve(t)?t.xOperation?.ornull?.method.get()??t.operation.ornull?.method.get()??"":t.xOperation?.method??t.operation?.method??""}function px(t){return uve(t)?t.xOperation?.ornull?.url.get()??t.operation.ornull?.nested("path").get()??"":t.xOperation?.url??t.operation?.path??""}function oE(t,e,n,r){const{inputs:i,servers:o}=r,s=v7e(cf("path",[Ti(e?.parameters.pathParameters,n?.components.parameters),Ti(t.parameters.pathParameters,n?.components.parameters)]),r.inputs),a=t.xOperation??null,l=t.operation??null;let c="",u="";if(a)u=a.method,c=qZ(a.url,s);else if(l){const f=o.find(g=>g.apiId===l.apiId);u=l.method==="x-query"?"query":l.method,c=(f?.value?Yhe(f.value,f.variables):"")+qZ(l.path,s)}const d=c.split("?")[0];return{url:vr(d,i),method:u.toUpperCase()}}function sE(t,{collectionId:e,workflowId:n,stepId:r}){return t.collections.find(a=>a.id.get()===e)?.workflows.find(a=>a.workflowId.get()===n)?.steps.find(a=>a.stepId.get()===r)??null}function $mt(t){const e=t.substring(7).split(", "),n={};for(const r of e){const[i,o]=r.split("=");n[i]=o.replace(/"/g,"")}return n}function Emt(t,e,n,r){const{inputs:i}=r,{requestBody:{content:o}}=t,{url:s,method:a}=oE(t,e,n,r),l=[...e?.security||[],...t.security].findLast(_=>_.securityType===ke.DigestAuth);if(!l)return"";const{username:c,password:u,realm:d,nonce:p,cnonce:f,algorithm:m,qop:g,nc:y,opaque:b}=l[ke.DigestAuth],v=vr(c,i),{pathname:x,search:O}=new URL(s),w=O?`${x}${O}`:x,S=Amt({username:v,password:vr(u,i),uri:w,realm:d,nonce:p,cnonce:f,algorithm:m,qop:g,nc:y,method:a,bodyContent:o});return`Digest username="${v}", realm="${d}", nonce="${p}", uri="${w}", qop=${g}, nc=${y}, cnonce="${f}", response="${S}", algorithm=${m}${b?`, opaque="${b}"`:""}`}function Amt(t){const{username:e,password:n,realm:r,nonce:i,cnonce:o,algorithm:s,qop:a,nc:l,uri:c,method:u,bodyContent:d}=t,p=Rmt(s),f=s?.endsWith("-sess")?p(`${p(`${e}:${r}:${n}`)}:${i}:${o}`):p(`${e}:${r}:${n}`),m=a?.includes("auth-int")?p(`${u}:${c}:${p(d)}`):p(`${u}:${c}`);return p(`${f}:${i}:${l}:${o}:${a}:${m}`).toString()}function Rmt(t){return t?.replace("-sess","")==="SHA-256"?e=>zy(Gie(e)):e=>zy(Dx(e))}function jmt(t){try{const n=new URL(t).hostname;return n==="localhost"||n==="127.0.0.1"}catch{return!1}}function Ek(t,e=window.location.origin){try{const n=new URL(t);return e===n.origin}catch{return!1}}function Nmt(t){return t?t.split(";").map(r=>r.trim()).map(r=>{const i=r.indexOf("="),o=r.slice(0,i).trim(),s=r.slice(i+1).trim();return[o,s]}):[]}const Mmt=["json","xml","html","text"],Dmt=["application/octet-stream","application/x-msdownload","application/pdf","application/zip","application/gzip","application/x-7z-compressed","application/x-tar","application/x-bzip2"];function sj(t,e){return t.get(e)??t.get(e.toLowerCase())}function Qmt(t){if(!t)return;const e=Number.parseInt(t,10);return Number.isFinite(e)?e:void 0}function Lmt(t){if(!t)return;const e=t.match(/filename\*=(?:UTF-8'')?([^;\n]+)/i);if(e?.[1])try{return decodeURIComponent(e[1].replace(/(^")|("$)/g,"").trim())}catch{return e[1].replace(/(^")|("$)/g,"").trim()}const n=t.match(/filename=([^;\n]+)/i);if(n?.[1])return n[1].replace(/(^")|("$)/g,"").trim()}function qmt(t){try{return new URL(t).pathname.split("/").filter(Boolean).pop()||void 0}catch{return}}function zmt(t,e){if(e&&/attachment|filename=/i.test(e))return!0;if(!t)return!1;const n=t.toLowerCase();return Dmt.some(r=>n.includes(r))?!0:n.startsWith("application/")?!Mmt.some(r=>n.includes(r)):!1}async function Umt(t,e){const n=sj(t.headers,"content-type")?.split(";")[0].trim(),r=sj(t.headers,"content-disposition"),i=Qmt(sj(t.headers,"content-length")),o=zmt(n,r),s=Nmt(document.cookie);if(o){const p={fileName:Lmt(r)||qmt(t.url)||"response",contentType:n,contentLength:i,status:"pending"};return{bodyUsed:t.bodyUsed,status:t.status,headers:Array.from(t.headers.entries()),arrayBuffer:new ArrayBuffer(0),body:"",duration:e,cookies:s,size:i??0,download:p,bodyNotStored:!0,url:t.url}}const l=await t.clone().arrayBuffer(),c=new TextDecoder().decode(l),u=new Uint8Array(l).length;return{bodyUsed:t.bodyUsed,status:t.status,headers:Array.from(t.headers.entries()),arrayBuffer:l,body:c,duration:e,cookies:s,size:u,url:t.url}}const Vmt=":/?#[]@!$&'()*+,;=",Fmt=new Set(["!","'","(",")","*"]);function Bmt(t){return Fmt.has(t)?`%${t.charCodeAt(0).toString(16).toUpperCase()}`:encodeURIComponent(t)}function JY(t,e=!1){let n=encodeURIComponent(t).replace(/[!'()*]/g,i=>`%${i.charCodeAt(0).toString(16).toUpperCase()}`);if(!e)return n;const r=[...Vmt].map(i=>({char:i,encoded:Bmt(i)}));for(const{char:i,encoded:o}of r)n=n.split(o).join(i);return n}function eH(t){try{const e=new URL(t);return(e.protocol==="http:"&&e.port==="80"||e.protocol==="https:"&&e.port==="443")&&(e.port=""),e.hostname=e.hostname.toLowerCase(),e.protocol+"//"+e.hostname+(e.port?":"+e.port:"")}catch(e){return console.error("Invalid URL",e),null}}function pve(t,e){let n=eH(t);const r=e.find(({host:i,port:o})=>eH(`https://${i}:${o}`)===n);return{clientCert:r?.crtFilePath,clientKey:r?.keyFilePath}}function Wmt(t){const e=t.lastIndexOf(".");return e<=0?{baseName:t,extension:""}:{baseName:t.slice(0,e),extension:t.slice(e)}}async function Xmt(t,e){const{exists:n}=await Promise.resolve().then(()=>y$),{join:r}=await Promise.resolve().then(()=>rue),{baseName:i,extension:o}=Wmt(e);let s=0;for(;;){const a=s===0?"":` (${s})`,l=`${i}${a}${o}`,c=await r(t,l);if(!await n(c))return c;s+=1}}function Zmt(t){return t.split(/(\{[^}]+\}|\/)/g).filter(e=>e!=="")}function fve(t){return t?t instanceof FormData||t instanceof URLSearchParams?t.entries().next().done===!0:!1:!0}function Gmt(t){if(!fve(t))return t}function aE(t){return/^https?:\/\//.test(t)?t:`https://${t}`}function hve(t,e){if(!e)return"same-origin";try{const n=new URL(e).origin;return new URL(aE(t)).origin===n?"include":"same-origin"}catch{return"same-origin"}}async function mve({store:t,step:e,settings:n,workflow:r,collection:i,signal:o}){const{corsProxyUrl:s,credentialOrigin:a,certificates:l}=n.get(),c=Uv(t),{url:u,method:d}=oE(e.get(),r?.get(),i?.get(),c),p=s||"",f=bve(e,r,i,t),m=lgt(u,a),g=cgt({proxyUrl:p,resolvedUrl:u,ignoreProxy:m,queryParameters:f});await Hmt(e,r??void 0,g,a,o);const y=lE(e,r??void 0,i??void 0,t),b=Gmt(YU(e,t)),{clientCert:v,clientKey:x}=pve(u,l||[]),O=aE(g),w=d.toUpperCase(),S=!Yv.includes(w),_=S?"POST":w,C=S?{...y,"X-HTTP-Method-Override":w}:y;return{urlWithProxyAndProtocol:O,fetchMethod:_,fetchHeaders:C,body:b,credentials:hve(O,a),mode:Ek(O)?"same-origin":"cors",clientCert:v,clientKey:x,resolvedUrl:u}}async function gve(t,e,n,r,i){const{requestController:o}=t,a=Jv(t).data;if(a.type.get()!==ft.Step){console.warn("not an operation tab");return}const{collectionId:l,workflowId:c,response:u,requestError:d,isProcessingRequest:p}=a,f=t.collections.find(b=>b.id.get()===l.get()),m=f?.workflows.find(b=>b.workflowId.get()===c.get()),g=jc(e.get({noproxy:!0}));p.set(!0),o.get()?.abort?.(),o.set(new AbortController);const y=o.get()?.signal;try{const b=await mve({store:t,step:e,settings:n,workflow:m,collection:f,signal:y}),v=Date.now(),x={signal:y,method:b.fetchMethod,headers:b.fetchHeaders,body:b.body,mode:b.mode,credentials:b.credentials,clientCert:b.clientCert,clientKey:b.clientKey},O=await Nc(b.urlWithProxyAndProtocol,x),w=Date.now()-v;d.set(null);const S=await Umt(O,w);u.set(S);const _=jc(u.value);r?.(g,_),i?.({outcome:"success",status:S.status,duration:S.duration,size:S.size})}catch(b){if(u.set(null),b.name==="AbortError")return;d.set(b.message||String(b));const v=jc(u.value);r?.(g,v),i?.({outcome:"error",error:b.message||String(b)})}finally{p.set(!1)}}async function Ymt({store:t,step:e,settings:n,workflow:r,collection:i,fileName:o,onProgress:s}){const a=await mve({store:t,step:e,settings:n,workflow:r,collection:i}),l={method:a.fetchMethod,headers:a.fetchHeaders,body:a.body,mode:a.mode,credentials:a.credentials,clientCert:a.clientCert,clientKey:a.clientKey},{clientCert:c,clientKey:u}=l,d=Kn(),p=o||"response";let f=null;if(d){const{open:S}=await Promise.resolve().then(()=>require("./replay-index-pa2eIJu5.js")),_=await S({directory:!0,multiple:!1});if(!_)return;const C=Array.isArray(_)?_[0]:_;f=await Xmt(C,p)}const m=await Nc(a.urlWithProxyAndProtocol,l),g=m.headers.get("content-length"),y=g?Number.parseInt(g,10):void 0,b=Number.isFinite(y)?y:void 0,v=m.headers.get("content-type")??void 0;let x;if(m.body?.getReader){const S=m.body.getReader(),_=[];let C=0;for(;;){const{done:I,value:A}=await S.read();if(I)break;if(A){const R=new Uint8Array(A.byteLength);R.set(A),_.push(R.buffer),C+=A.byteLength,s?.({receivedBytes:C,totalBytes:b,done:!1})}}x=new Blob(_,{type:v}),s?.({receivedBytes:C,totalBytes:b,done:!0})}else x=await m.blob(),s?.({receivedBytes:x.size,totalBytes:b,done:!0});if(d){const{writeFile:S}=await Promise.resolve().then(()=>y$),_=new Uint8Array(await x.arrayBuffer());if(!f)return;await S(f,_);return}const O=window.URL.createObjectURL(x),w=document.createElement("a");w.href=O,w.download=p,w.rel="noopener",w.click(),window.URL.revokeObjectURL(O)}async function Hmt(t,e,n,r,i){const o=If(t),a=[...Array.from(e?.security||[]),...Array.from(t.security)].findLast(l=>l.securityType.get()===ke.DigestAuth);if(a){const l=aE(n),c=await Nc(l,{signal:i,method:o.toUpperCase(),credentials:hve(l,r),mode:Ek(l)?"same-origin":"cors"}),u=$mt(c.headers.get("WWW-Authenticate")||"");a[ke.DigestAuth].merge({nonce:u.nonce,realm:u.realm,qop:u.qop,algorithm:u.algorithm,opaque:u.opaque,cnonce:crypto.randomUUID(),nc:"00000001"})}}function Kmt(t,e,n,r){return[...e?.security.get()||[],...t.security.get()].map(i=>{switch(i.securityType){case ke.BasicAuth:{const o=i[ke.BasicAuth];return{id:"",key:"Authorization",value:"Basic "+btoa(`${fs(o.username,r)}:${fs(o.password,r)}`),active:!0,in:"header"}}case ke.DigestAuth:{const o=Uv(r);return{id:"",key:"Authorization",value:Emt(t.get(),e?.get(),n?.get(),o),active:!0,in:"header"}}case ke.JWT:return{id:"",key:"Authorization",value:"Bearer "+i[ke.JWT].token,active:!0,in:"header"};case ke.OAuth2:{const{grantType:o}=i[ke.OAuth2],{accessToken:s}=i[ke.OAuth2][o];return{id:"",key:"Authorization",value:"Bearer "+s,active:!0,in:"header"}}case ke.OpenIDConnect:{const{grantType:o}=i[ke.OpenIDConnect],{accessToken:s}=i[ke.OpenIDConnect][o];return{id:"",key:"Authorization",value:"Bearer "+s,active:!0,in:"header"}}case ke.APIKey:{const o=i[ke.APIKey];return o.location===al.Header?{id:"",key:o.name,value:o.key,active:!0,in:"header"}:null}default:return null}}).filter(i=>!!i)}function Jmt(t,e,n){const{operation:r,requestBody:i,parameters:o}=e,{headers:s,cookies:a,queryParameters:l}=o;if(!n)return!0;const c=n.parameters??[],u=c.filter(O=>O.in==="query"),d=c.filter(O=>O.in==="header"),p=c.filter(O=>O.in==="cookie"),f=r?.path!==n.path,m=n.method.toLowerCase()!==r?.method.toLowerCase(),g=n.body?.mediaTypes&&n.body?.mediaTypes?.[i.type]===void 0,y=!d.every(O=>s.some(w=>!Lh(w)&&w.key===O.name)),b=!p.every(O=>a.some(w=>!Lh(w)&&w.key===O.name)),v=!u.every(O=>l.some(w=>!Lh(w)&&w.key===O.name)),x=Htt(t,e,n);return!f&&!m&&!g&&!y&&!b&&!v&&!x}function GU(t,e){const{requestBody:n}=t,i=If(t).toUpperCase();if(i==="GET"||i==="HEAD"||i==="OPTIONS")return null;try{switch(n.type.get()){case"JSON":return structuredClone(fs(n.content.get(),e));case"multipart/form-data":return ngt(t,e);case"application/x-www-form-urlencoded":return tgt(t,e);case"application/octet-stream":return n.binary.get();default:return fs(n.content.get(),e)}}catch(o){console.error(o)}}function YU(t,e){const{requestBody:n}=t,r=GU(t,e);if(r===null)return null;switch(n.type.get()){default:return r;case"multipart/form-data":return rgt(r);case"application/x-www-form-urlencoded":return egt(r);case"application/octet-stream":return n.binary.ornull?.file.get()??null}}function egt(t){const e=new URLSearchParams;return t.forEach(({key:n,value:r})=>{e.append(n,r)}),e}function tgt(t,e){const{requestBody:n}=t,r=[],i=n.formData["application/x-www-form-urlencoded"];return wve(i.get()).forEach(o=>{const s=fs(o.value,e);r.push({key:fs(o.key,e),value:s,type:"text"})}),r}function ngt(t,e){const{requestBody:n}=t,r=[],i=n.formData["multipart/form-data"];return wve(i.get()).forEach(({type:o,files:s,value:a,key:l})=>{const c=fs(l,e);if(o==="file"&&s)for(const u of s)r.push({key:c,value:u,type:o});else if(a){const u=fs(a,e);r.push({key:c,value:u,type:o})}}),r}function rgt(t){const e=new FormData;return t.forEach(({key:n,value:r,type:i})=>{i==="file"?e.append(n,r.file):r&&e.append(n,r)}),e}function yve(t,e,n){return t.filter(r=>{const{securityType:i,[ke.APIKey]:o}=r;return i===ke.APIKey&&o.location===e&&!!o.name}).map(r=>{const{[ke.APIKey]:i}=r;return{id:"",key:i.name,value:i.key,active:!0,in:n}})}function tH(t=[]){return yve(t,al.Query,"query")}function vve(t,e,n){const r=n?.components.parameters.get();return cf("query",[tH(e?.security.get()),tH(t.security.get()),Ti(e?.parameters.queryParameters.get(),r),Ti(t.parameters.queryParameters.get(),r)])}function bve(t,e,n,r){return vve(t,e,n).map(o=>{const s=fs(o.value,r),a=JY(s,o.allowReserved);return`${JY(o.key)}=${a}`}).join("&")}function Ove(t,e,n,r){return vve(t,e,n).reduce((o,s)=>{const a=fs(s.value,r),l=fs(s.key,r);return o[l]=a,o},{})}function igt(t){const e=t.split("?")[0],n=Zmt(e),r=/^\{[^\s]+\}$/,i=n.filter(o=>r.test(o)).map(o=>o.slice(1,-1));return new Set(i)}function lE(t,e,n,r){const i=agt(t,r),o=Kmt(t,e,n,r),s=ogt(t,e,n,r),a=n?.components.parameters.get();return cf("header",[i,o,s,Ti(e?.parameters.headers.get(),a),Ti(t.parameters.headers.get(),a)]).reduce((u,{key:d,value:p})=>(u[d]=fs(p,r),u),{})}function ogt(t,e,n,r){const o=xve(t,e,n).map(s=>`${s.key}=${fs(s.value,r)}`).join("; ");return o?[{id:"",key:"Cookie",value:o,active:!0,in:"header"},{id:"",key:"X-Redocly-Cookie",value:o,active:!0,in:"header"}]:[]}function sgt(t,e,n,r){return xve(t,e,n).reduce((o,s)=>{const a=fs(s.value,r);return{...o,[fs(s.key,r)]:a}},{})}function nH(t=[]){return yve(t,al.Cookie,"cookie")}function xve(t,e,n){const r=n?.components.parameters.get();return cf("cookie",[nH(e?.security.get()),nH(t.security.get()),Ti(e?.parameters.cookies.get(),r),Ti(t.parameters.cookies.get(),r)])}function wve(t){return t.filter(e=>e.active&&e.key&&(e.value||e?.files))}function agt(t,e){const{requestBody:n}=t,r=YU(t,e);return["binary","multipart/form-data"].includes(n.type.get())?[]:fve(r)?[]:[{id:"",key:"Content-Type",value:n.type.get(),active:!0,in:"header"}]}function fs(t,e){return e?vr(t,Uv(e)?.inputs):t}function lgt(t,e){return jmt(t)||Ek(t)||!!(e&&Ek(aE(t),e))}function cgt({proxyUrl:t,resolvedUrl:e,ignoreProxy:n,queryParameters:r=""}){const i=t!=="/"?xQ(t):t;let o;return n||!i?o=e:o=`${i}/${e}`,r&&(o+=`?${r}`),o}function HU(t){return t.flatMap(e=>{const n=e.id.get();return(e.paths?.keys??[]).flatMap(i=>{const o=e.paths.nested(i),a=(o.keys??[]).filter(u=>["get","put","post","delete","options","head","patch","trace","x-query","query"].includes(u.toLowerCase())).map(u=>{const d=o.nested(u),p=d.operationId.get()||"",f=d.summary.get();return{apiId:n,path:i,method:u,operationId:p,summary:f,isAdditionalOperation:!1}}),l=o.additionalOperations?.get(),c=l?Object.entries(l).map(([u,d])=>({apiId:n,path:i,method:u,operationId:d.operationId||"",summary:d.summary,isAdditionalOperation:!0})):[];return[...a,...c]})})}const Sve=(t,e,n)=>{if(!e)return null;const{apiId:r,method:i,path:o}=e,s=t.find(l=>l.id.get()===r);if(!s)return null;if(n)try{return n(o,i,s.get({noproxy:!0}))??null}catch(l){console.error("Failed to convert operation to replay value",l)}const a=s.paths?.nested(o)?.nested(i)?.ornull;return a?{id:a.operationId.get()??"",name:a.summary.get()??"",method:i,path:o,href:"",operationId:a.operationId.get(),parameters:[],servers:[],security:[]}:null};function Jv({tabsState:{activeTabIdx:t,tabs:e}}){return e[t?.get()??0]}function ugt(t){const{environments:e,apis:n,tabsState:{tabs:r}}=t,i=r.filter(l=>l.data.type.get()===ft.Step),o=HU(n),s=i.map(l=>{const{collectionId:c,workflowId:u,satisfiesScheme:d}=l.data.get(),p=l.data.draftStep.ornull;if(p===null)return null;const{operationId:f,apiId:m}=p.get().operation??{};if(!d||!f)return null;const g=t.collections.find(_=>_.id.get()===c),y=g?.workflows.find(_=>_.workflowId.get()===u),b=o.find(_=>_.operationId===f&&_.apiId===m);if(!b)return null;const v=lE(p,y,g,t),x=YU(p,t),O=sgt(p,y,g,t),w=Ove(p,y,g,t),S=p.requestBody.activeExampleName;return{apiPath:{path:b.path,method:b.method},requestValues:{cookie:O,header:v,query:w,body:x},activeExampleName:S.get()}}).filter(l=>l!==null),a=Uv(t);return{operations:s,environment:a?.name,environments:Object.fromEntries(e.get().map(l=>[l.name,{...Object.fromEntries(l.inputs.filter(({isSecret:c})=>!c).map(({name:c,value:u})=>[c,u])),...Object.fromEntries(l.servers.map(({apiId:c,value:u})=>[c,u]))}]))}}function dgt(t){return t.filter(e=>["get","put","post","delete","options","head","patch","trace","x-query","query"].includes(e.toLowerCase()))}function pgt(t){const e=new Map;return(t.paths?.keys??[]).forEach(r=>{const i=t.paths.nested(r);dgt(i.keys).forEach(a=>{const l=i.nested(a),c=l.tags?.get()||[],u=l.summary?.get(),d=l.operationId?.get();(c.length?c:["Untagged"]).forEach(f=>{const m=e.get(f)??[];m.push({path:r,method:a,summary:u,operationId:d,isAdditionalOperation:!1}),e.set(f,m)})});const s=i.additionalOperations?.get();s&&Object.entries(s).forEach(([a,l])=>{const c=l.tags||[],u=l.summary,d=l.operationId;(c.length?c:["Untagged"]).forEach(f=>{const m=e.get(f)??[];m.push({path:r,method:a,summary:u,operationId:d,isAdditionalOperation:!0}),e.set(f,m)})})}),e}function fgt({apiId:t,apiTitle:e,tagToOperations:n}){return Array.from(n.entries()).map(([i,o])=>{const s=o.map(a=>({id:KU({apiId:t,method:a.method,path:a.path}),name:a.summary||a.path,apiTitle:e,type:"operation",apiId:t,path:a.path,tagName:i,method:a.method,summary:a.summary,isAdditionalOperation:a.isAdditionalOperation}));return s.length===0?null:{id:`${t}-${i}`,name:i,apiTitle:e,type:"tag",apiId:t,tagName:i,children:s}}).filter(Boolean)}function _ve(t){const e=t.id.get(),n=t.info?.title?.get()||e,r=pgt(t),i=fgt({apiId:e,apiTitle:n,tagToOperations:r});return i.length===0?null:{id:e,name:n,apiTitle:n,type:"api",apiId:e,api:t,children:i}}const KU=({apiId:t,method:e,path:n})=>`${t}-${e.toUpperCase()}-${n}`;function hgt(t){const e=t.data.get();switch(e.type){case ft.Workflow:return`${e.collectionId}/${e.workflowId}`;case ft.Collection:return e.collectionId;case ft.Step:return`${e.collectionId}/${e.workflowId}/${e.stepId}`;case ft.WorkflowRun:return`${e.collectionId}/${e.workflowId}`}}function mgt(t){const e=t.data.get();if(e.type!==ft.Step)return;const{apiId:n,path:r,method:i}=e.draftStep?.operation??{};if(!(!n||!r||!i))return KU({apiId:n,path:r,method:i})}function Lf(t){const e=nn(),n=Jv(e);return!n.get()||t&&!ii(n.data.get(),t)?{tab:null,tabDataId:void 0,apiNodeId:void 0}:{tab:n,tabDataId:hgt(n),apiNodeId:mgt(n)}}function ggt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return $.useMemo(()=>r=>{e.forEach(i=>i(r))},e)}const cE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function eb(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function JU(t){return"nodeType"in t}function ua(t){var e,n;return t?eb(t)?t:JU(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function e4(t){const{Document:e}=ua(t);return t instanceof e}function $w(t){return eb(t)?!1:t instanceof ua(t).HTMLElement}function Cve(t){return t instanceof ua(t).SVGElement}function tb(t){return t?eb(t)?t.document:JU(t)?e4(t)?t:$w(t)||Cve(t)?t.ownerDocument:document:document:document}const ec=cE?$.useLayoutEffect:$.useEffect;function uE(t){const e=$.useRef(t);return ec(()=>{e.current=t}),$.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.current==null?void 0:e.current(...r)},[])}function ygt(){const t=$.useRef(null),e=$.useCallback((r,i)=>{t.current=setInterval(r,i)},[]),n=$.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function fx(t,e){e===void 0&&(e=[t]);const n=$.useRef(t);return ec(()=>{n.current!==t&&(n.current=t)},e),n}function Ew(t,e){const n=$.useRef();return $.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function Ak(t){const e=uE(t),n=$.useRef(null),r=$.useCallback(i=>{i!==n.current&&e?.(i,n.current),n.current=i},[]);return[n,r]}function Rk(t){const e=$.useRef();return $.useEffect(()=>{e.current=t},[t]),e.current}let aj={};function Aw(t,e){return $.useMemo(()=>{if(e)return e;const n=aj[t]==null?0:aj[t]+1;return aj[t]=n,t+"-"+n},[t,e])}function Tve(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((o,s)=>{const a=Object.entries(s);for(const[l,c]of a){const u=o[l];u!=null&&(o[l]=u+t*c)}return o},{...e})}}const Ny=Tve(1),jk=Tve(-1);function vgt(t){return"clientX"in t&&"clientY"in t}function dE(t){if(!t)return!1;const{KeyboardEvent:e}=ua(t.target);return e&&t instanceof e}function bgt(t){if(!t)return!1;const{TouchEvent:e}=ua(t.target);return e&&t instanceof e}function Nk(t){if(bgt(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return vgt(t)?{x:t.clientX,y:t.clientY}:null}const kf=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[kf.Translate.toString(t),kf.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),rH="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ogt(t){return t.matches(rH)?t:t.querySelector(rH)}const xgt={display:"none"};function wgt(t){let{id:e,value:n}=t;return _e.default.createElement("div",{id:e,style:xgt},n)}function Sgt(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const i={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return _e.default.createElement("div",{id:e,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function _gt(){const[t,e]=$.useState("");return{announce:$.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const Ive=$.createContext(null);function Cgt(t){const e=$.useContext(Ive);$.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function Tgt(){const[t]=$.useState(()=>new Set),e=$.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[$.useCallback(r=>{let{type:i,event:o}=r;t.forEach(s=>{var a;return(a=s[i])==null?void 0:a.call(s,o)})},[t]),e]}const Igt={draggable:`
959
+ `,vr=(t,e,n=new Set)=>{const r=lve(t);if(!r.length)return t;let i=0;const o=r.flatMap(({start:s,end:a,name:l})=>{if(n.has(l))return null;const c=e.findLast(d=>d.name===l),u=t.slice(i,c?s:a);if(i=a,c){n.add(l);const d=vr(c.value,e,n);return n.delete(l),[u.length?u:null,d||t.slice(s,a)]}return[u.length?u:null]});return t.slice(i).length&&o.push(t.slice(i)),o.join("")};function Imt(t,e){return e.find(n=>n.name===t.slice(1,-1))?.value||t}function kmt(t,e){const n=cve(t);if(!n.length)return h.jsx(KY,{children:t});let r=0;const i=n.flatMap(({start:o,end:s})=>{const a=t.slice(r,o),l=Imt(t.slice(o,s),e);return r=s,[a.length?a:null,l]});return t.slice(r).length&&i.push(t.slice(r)),h.jsx(KY,{children:i.join("")})}function uve(t){return CIe(t)}const dve="New Step";function YQ({name:t=dve,workflow:e}={}){let n=t.replaceAll(" ","-").toLowerCase();if(!e)return n;const r=Pmt(e);if(r.includes(n)){let i=1;for(;r.includes(`${n}-${i}`);)i++;n=`${n}-${i}`}return n}function Pmt(t){return t.steps.filter(e=>e.state.get()!==Bn.Draft).map(e=>e.stepId.get())}function ed({name:t=dve,isDraft:e=!1,fromStep:n,workflow:r,operation:i,apiOperation:o,dynamicReplayValues:s,xOperation:a}={}){if(!n){const c=o?rU(o,s):null,u=[dl()];return{stepId:YQ({name:t,workflow:r}),description:t,outputs:[],successCriteria:[],state:e?Bn.Draft:Bn.Normal,parameters:{pathParameters:[],queryParameters:a?b$(a.url):[],headers:[],cookies:[]},requestBody:ak(),xOperation:a??(i?null:{method:"GET",url:""}),security:u,operation:i??null,...c}}const l=n.get({noproxy:!0});return{stepId:YQ({name:t,workflow:r}),description:l.description,outputs:l.outputs,successCriteria:l.successCriteria,state:e?Bn.Draft:Bn.Normal,parameters:l.parameters,requestBody:l.requestBody,xOperation:l.xOperation,security:l.security,operation:l.operation}}function If(t){return uve(t)?t.xOperation?.ornull?.method.get()??t.operation.ornull?.method.get()??"":t.xOperation?.method??t.operation?.method??""}function px(t){return uve(t)?t.xOperation?.ornull?.url.get()??t.operation.ornull?.nested("path").get()??"":t.xOperation?.url??t.operation?.path??""}function oE(t,e,n,r){const{inputs:i,servers:o}=r,s=v7e(cf("path",[Ti(e?.parameters.pathParameters,n?.components.parameters),Ti(t.parameters.pathParameters,n?.components.parameters)]),r.inputs),a=t.xOperation??null,l=t.operation??null;let c="",u="";if(a)u=a.method,c=qZ(a.url,s);else if(l){const f=o.find(g=>g.apiId===l.apiId);u=l.method==="x-query"?"query":l.method,c=(f?.value?Yhe(f.value,f.variables):"")+qZ(l.path,s)}const d=c.split("?")[0];return{url:vr(d,i),method:u.toUpperCase()}}function sE(t,{collectionId:e,workflowId:n,stepId:r}){return t.collections.find(a=>a.id.get()===e)?.workflows.find(a=>a.workflowId.get()===n)?.steps.find(a=>a.stepId.get()===r)??null}function $mt(t){const e=t.substring(7).split(", "),n={};for(const r of e){const[i,o]=r.split("=");n[i]=o.replace(/"/g,"")}return n}function Emt(t,e,n,r){const{inputs:i}=r,{requestBody:{content:o}}=t,{url:s,method:a}=oE(t,e,n,r),l=[...e?.security||[],...t.security].findLast(_=>_.securityType===ke.DigestAuth);if(!l)return"";const{username:c,password:u,realm:d,nonce:p,cnonce:f,algorithm:m,qop:g,nc:y,opaque:b}=l[ke.DigestAuth],v=vr(c,i),{pathname:x,search:O}=new URL(s),w=O?`${x}${O}`:x,S=Amt({username:v,password:vr(u,i),uri:w,realm:d,nonce:p,cnonce:f,algorithm:m,qop:g,nc:y,method:a,bodyContent:o});return`Digest username="${v}", realm="${d}", nonce="${p}", uri="${w}", qop=${g}, nc=${y}, cnonce="${f}", response="${S}", algorithm=${m}${b?`, opaque="${b}"`:""}`}function Amt(t){const{username:e,password:n,realm:r,nonce:i,cnonce:o,algorithm:s,qop:a,nc:l,uri:c,method:u,bodyContent:d}=t,p=Rmt(s),f=s?.endsWith("-sess")?p(`${p(`${e}:${r}:${n}`)}:${i}:${o}`):p(`${e}:${r}:${n}`),m=a?.includes("auth-int")?p(`${u}:${c}:${p(d)}`):p(`${u}:${c}`);return p(`${f}:${i}:${l}:${o}:${a}:${m}`).toString()}function Rmt(t){return t?.replace("-sess","")==="SHA-256"?e=>zy(Gie(e)):e=>zy(Dx(e))}function jmt(t){try{const n=new URL(t).hostname;return n==="localhost"||n==="127.0.0.1"}catch{return!1}}function Ek(t,e=window.location.origin){try{const n=new URL(t);return e===n.origin}catch{return!1}}function Nmt(t){return t?t.split(";").map(r=>r.trim()).map(r=>{const i=r.indexOf("="),o=r.slice(0,i).trim(),s=r.slice(i+1).trim();return[o,s]}):[]}const Mmt=["json","xml","html","text"],Dmt=["application/octet-stream","application/x-msdownload","application/pdf","application/zip","application/gzip","application/x-7z-compressed","application/x-tar","application/x-bzip2"];function sj(t,e){return t.get(e)??t.get(e.toLowerCase())}function Qmt(t){if(!t)return;const e=Number.parseInt(t,10);return Number.isFinite(e)?e:void 0}function Lmt(t){if(!t)return;const e=t.match(/filename\*=(?:UTF-8'')?([^;\n]+)/i);if(e?.[1])try{return decodeURIComponent(e[1].replace(/(^")|("$)/g,"").trim())}catch{return e[1].replace(/(^")|("$)/g,"").trim()}const n=t.match(/filename=([^;\n]+)/i);if(n?.[1])return n[1].replace(/(^")|("$)/g,"").trim()}function qmt(t){try{return new URL(t).pathname.split("/").filter(Boolean).pop()||void 0}catch{return}}function zmt(t,e){if(e&&/attachment|filename=/i.test(e))return!0;if(!t)return!1;const n=t.toLowerCase();return Dmt.some(r=>n.includes(r))?!0:n.startsWith("application/")?!Mmt.some(r=>n.includes(r)):!1}async function Umt(t,e){const n=sj(t.headers,"content-type")?.split(";")[0].trim(),r=sj(t.headers,"content-disposition"),i=Qmt(sj(t.headers,"content-length")),o=zmt(n,r),s=Nmt(document.cookie);if(o){const p={fileName:Lmt(r)||qmt(t.url)||"response",contentType:n,contentLength:i,status:"pending"};return{bodyUsed:t.bodyUsed,status:t.status,headers:Array.from(t.headers.entries()),arrayBuffer:new ArrayBuffer(0),body:"",duration:e,cookies:s,size:i??0,download:p,bodyNotStored:!0,url:t.url}}const l=await t.clone().arrayBuffer(),c=new TextDecoder().decode(l),u=new Uint8Array(l).length;return{bodyUsed:t.bodyUsed,status:t.status,headers:Array.from(t.headers.entries()),arrayBuffer:l,body:c,duration:e,cookies:s,size:u,url:t.url}}const Vmt=":/?#[]@!$&'()*+,;=",Fmt=new Set(["!","'","(",")","*"]);function Bmt(t){return Fmt.has(t)?`%${t.charCodeAt(0).toString(16).toUpperCase()}`:encodeURIComponent(t)}function JY(t,e=!1){let n=encodeURIComponent(t).replace(/[!'()*]/g,i=>`%${i.charCodeAt(0).toString(16).toUpperCase()}`);if(!e)return n;const r=[...Vmt].map(i=>({char:i,encoded:Bmt(i)}));for(const{char:i,encoded:o}of r)n=n.split(o).join(i);return n}function eH(t){try{const e=new URL(t);return(e.protocol==="http:"&&e.port==="80"||e.protocol==="https:"&&e.port==="443")&&(e.port=""),e.hostname=e.hostname.toLowerCase(),e.protocol+"//"+e.hostname+(e.port?":"+e.port:"")}catch(e){return console.error("Invalid URL",e),null}}function pve(t,e){let n=eH(t);const r=e.find(({host:i,port:o})=>eH(`https://${i}:${o}`)===n);return{clientCert:r?.crtFilePath,clientKey:r?.keyFilePath}}function Wmt(t){const e=t.lastIndexOf(".");return e<=0?{baseName:t,extension:""}:{baseName:t.slice(0,e),extension:t.slice(e)}}async function Xmt(t,e){const{exists:n}=await Promise.resolve().then(()=>y$),{join:r}=await Promise.resolve().then(()=>rue),{baseName:i,extension:o}=Wmt(e);let s=0;for(;;){const a=s===0?"":` (${s})`,l=`${i}${a}${o}`,c=await r(t,l);if(!await n(c))return c;s+=1}}function Zmt(t){return t.split(/(\{[^}]+\}|\/)/g).filter(e=>e!=="")}function fve(t){return t?t instanceof FormData||t instanceof URLSearchParams?t.entries().next().done===!0:!1:!0}function Gmt(t){if(!fve(t))return t}function aE(t){return/^https?:\/\//.test(t)?t:`https://${t}`}function hve(t,e){if(!e)return"same-origin";try{const n=new URL(e).origin;return new URL(aE(t)).origin===n?"include":"same-origin"}catch{return"same-origin"}}async function mve({store:t,step:e,settings:n,workflow:r,collection:i,signal:o}){const{corsProxyUrl:s,credentialOrigin:a,certificates:l}=n.get(),c=Uv(t),{url:u,method:d}=oE(e.get(),r?.get(),i?.get(),c),p=s||"",f=bve(e,r,i,t),m=lgt(u,a),g=cgt({proxyUrl:p,resolvedUrl:u,ignoreProxy:m,queryParameters:f});await Hmt(e,r??void 0,g,a,o);const y=lE(e,r??void 0,i??void 0,t),b=Gmt(YU(e,t)),{clientCert:v,clientKey:x}=pve(u,l||[]),O=aE(g),w=d.toUpperCase(),S=!Yv.includes(w),_=S?"POST":w,C=S?{...y,"X-HTTP-Method-Override":w}:y;return{urlWithProxyAndProtocol:O,fetchMethod:_,fetchHeaders:C,body:b,credentials:hve(O,a),mode:Ek(O)?"same-origin":"cors",clientCert:v,clientKey:x,resolvedUrl:u}}async function gve(t,e,n,r,i){const{requestController:o}=t,a=Jv(t).data;if(a.type.get()!==ft.Step){console.warn("not an operation tab");return}const{collectionId:l,workflowId:c,response:u,requestError:d,isProcessingRequest:p}=a,f=t.collections.find(b=>b.id.get()===l.get()),m=f?.workflows.find(b=>b.workflowId.get()===c.get()),g=jc(e.get({noproxy:!0}));p.set(!0),o.get()?.abort?.(),o.set(new AbortController);const y=o.get()?.signal;try{const b=await mve({store:t,step:e,settings:n,workflow:m,collection:f,signal:y}),v=Date.now(),x={signal:y,method:b.fetchMethod,headers:b.fetchHeaders,body:b.body,mode:b.mode,credentials:b.credentials,clientCert:b.clientCert,clientKey:b.clientKey},O=await Nc(b.urlWithProxyAndProtocol,x),w=Date.now()-v;d.set(null);const S=await Umt(O,w);u.set(S);const _=jc(u.value);r?.(g,_),i?.({outcome:"success",status:S.status,duration:S.duration,size:S.size})}catch(b){if(u.set(null),b.name==="AbortError")return;d.set(b.message||String(b));const v=jc(u.value);r?.(g,v),i?.({outcome:"error",error:b.message||String(b)})}finally{p.set(!1)}}async function Ymt({store:t,step:e,settings:n,workflow:r,collection:i,fileName:o,onProgress:s}){const a=await mve({store:t,step:e,settings:n,workflow:r,collection:i}),l={method:a.fetchMethod,headers:a.fetchHeaders,body:a.body,mode:a.mode,credentials:a.credentials,clientCert:a.clientCert,clientKey:a.clientKey},{clientCert:c,clientKey:u}=l,d=Kn(),p=o||"response";let f=null;if(d){const{open:S}=await Promise.resolve().then(()=>require("./replay-index-DdzJ9I8C.js")),_=await S({directory:!0,multiple:!1});if(!_)return;const C=Array.isArray(_)?_[0]:_;f=await Xmt(C,p)}const m=await Nc(a.urlWithProxyAndProtocol,l),g=m.headers.get("content-length"),y=g?Number.parseInt(g,10):void 0,b=Number.isFinite(y)?y:void 0,v=m.headers.get("content-type")??void 0;let x;if(m.body?.getReader){const S=m.body.getReader(),_=[];let C=0;for(;;){const{done:I,value:A}=await S.read();if(I)break;if(A){const R=new Uint8Array(A.byteLength);R.set(A),_.push(R.buffer),C+=A.byteLength,s?.({receivedBytes:C,totalBytes:b,done:!1})}}x=new Blob(_,{type:v}),s?.({receivedBytes:C,totalBytes:b,done:!0})}else x=await m.blob(),s?.({receivedBytes:x.size,totalBytes:b,done:!0});if(d){const{writeFile:S}=await Promise.resolve().then(()=>y$),_=new Uint8Array(await x.arrayBuffer());if(!f)return;await S(f,_);return}const O=window.URL.createObjectURL(x),w=document.createElement("a");w.href=O,w.download=p,w.rel="noopener",w.click(),window.URL.revokeObjectURL(O)}async function Hmt(t,e,n,r,i){const o=If(t),a=[...Array.from(e?.security||[]),...Array.from(t.security)].findLast(l=>l.securityType.get()===ke.DigestAuth);if(a){const l=aE(n),c=await Nc(l,{signal:i,method:o.toUpperCase(),credentials:hve(l,r),mode:Ek(l)?"same-origin":"cors"}),u=$mt(c.headers.get("WWW-Authenticate")||"");a[ke.DigestAuth].merge({nonce:u.nonce,realm:u.realm,qop:u.qop,algorithm:u.algorithm,opaque:u.opaque,cnonce:crypto.randomUUID(),nc:"00000001"})}}function Kmt(t,e,n,r){return[...e?.security.get()||[],...t.security.get()].map(i=>{switch(i.securityType){case ke.BasicAuth:{const o=i[ke.BasicAuth];return{id:"",key:"Authorization",value:"Basic "+btoa(`${fs(o.username,r)}:${fs(o.password,r)}`),active:!0,in:"header"}}case ke.DigestAuth:{const o=Uv(r);return{id:"",key:"Authorization",value:Emt(t.get(),e?.get(),n?.get(),o),active:!0,in:"header"}}case ke.JWT:return{id:"",key:"Authorization",value:"Bearer "+i[ke.JWT].token,active:!0,in:"header"};case ke.OAuth2:{const{grantType:o}=i[ke.OAuth2],{accessToken:s}=i[ke.OAuth2][o];return{id:"",key:"Authorization",value:"Bearer "+s,active:!0,in:"header"}}case ke.OpenIDConnect:{const{grantType:o}=i[ke.OpenIDConnect],{accessToken:s}=i[ke.OpenIDConnect][o];return{id:"",key:"Authorization",value:"Bearer "+s,active:!0,in:"header"}}case ke.APIKey:{const o=i[ke.APIKey];return o.location===al.Header?{id:"",key:o.name,value:o.key,active:!0,in:"header"}:null}default:return null}}).filter(i=>!!i)}function Jmt(t,e,n){const{operation:r,requestBody:i,parameters:o}=e,{headers:s,cookies:a,queryParameters:l}=o;if(!n)return!0;const c=n.parameters??[],u=c.filter(O=>O.in==="query"),d=c.filter(O=>O.in==="header"),p=c.filter(O=>O.in==="cookie"),f=r?.path!==n.path,m=n.method.toLowerCase()!==r?.method.toLowerCase(),g=n.body?.mediaTypes&&n.body?.mediaTypes?.[i.type]===void 0,y=!d.every(O=>s.some(w=>!Lh(w)&&w.key===O.name)),b=!p.every(O=>a.some(w=>!Lh(w)&&w.key===O.name)),v=!u.every(O=>l.some(w=>!Lh(w)&&w.key===O.name)),x=Htt(t,e,n);return!f&&!m&&!g&&!y&&!b&&!v&&!x}function GU(t,e){const{requestBody:n}=t,i=If(t).toUpperCase();if(i==="GET"||i==="HEAD"||i==="OPTIONS")return null;try{switch(n.type.get()){case"JSON":return structuredClone(fs(n.content.get(),e));case"multipart/form-data":return ngt(t,e);case"application/x-www-form-urlencoded":return tgt(t,e);case"application/octet-stream":return n.binary.get();default:return fs(n.content.get(),e)}}catch(o){console.error(o)}}function YU(t,e){const{requestBody:n}=t,r=GU(t,e);if(r===null)return null;switch(n.type.get()){default:return r;case"multipart/form-data":return rgt(r);case"application/x-www-form-urlencoded":return egt(r);case"application/octet-stream":return n.binary.ornull?.file.get()??null}}function egt(t){const e=new URLSearchParams;return t.forEach(({key:n,value:r})=>{e.append(n,r)}),e}function tgt(t,e){const{requestBody:n}=t,r=[],i=n.formData["application/x-www-form-urlencoded"];return wve(i.get()).forEach(o=>{const s=fs(o.value,e);r.push({key:fs(o.key,e),value:s,type:"text"})}),r}function ngt(t,e){const{requestBody:n}=t,r=[],i=n.formData["multipart/form-data"];return wve(i.get()).forEach(({type:o,files:s,value:a,key:l})=>{const c=fs(l,e);if(o==="file"&&s)for(const u of s)r.push({key:c,value:u,type:o});else if(a){const u=fs(a,e);r.push({key:c,value:u,type:o})}}),r}function rgt(t){const e=new FormData;return t.forEach(({key:n,value:r,type:i})=>{i==="file"?e.append(n,r.file):r&&e.append(n,r)}),e}function yve(t,e,n){return t.filter(r=>{const{securityType:i,[ke.APIKey]:o}=r;return i===ke.APIKey&&o.location===e&&!!o.name}).map(r=>{const{[ke.APIKey]:i}=r;return{id:"",key:i.name,value:i.key,active:!0,in:n}})}function tH(t=[]){return yve(t,al.Query,"query")}function vve(t,e,n){const r=n?.components.parameters.get();return cf("query",[tH(e?.security.get()),tH(t.security.get()),Ti(e?.parameters.queryParameters.get(),r),Ti(t.parameters.queryParameters.get(),r)])}function bve(t,e,n,r){return vve(t,e,n).map(o=>{const s=fs(o.value,r),a=JY(s,o.allowReserved);return`${JY(o.key)}=${a}`}).join("&")}function Ove(t,e,n,r){return vve(t,e,n).reduce((o,s)=>{const a=fs(s.value,r),l=fs(s.key,r);return o[l]=a,o},{})}function igt(t){const e=t.split("?")[0],n=Zmt(e),r=/^\{[^\s]+\}$/,i=n.filter(o=>r.test(o)).map(o=>o.slice(1,-1));return new Set(i)}function lE(t,e,n,r){const i=agt(t,r),o=Kmt(t,e,n,r),s=ogt(t,e,n,r),a=n?.components.parameters.get();return cf("header",[i,o,s,Ti(e?.parameters.headers.get(),a),Ti(t.parameters.headers.get(),a)]).reduce((u,{key:d,value:p})=>(u[d]=fs(p,r),u),{})}function ogt(t,e,n,r){const o=xve(t,e,n).map(s=>`${s.key}=${fs(s.value,r)}`).join("; ");return o?[{id:"",key:"Cookie",value:o,active:!0,in:"header"},{id:"",key:"X-Redocly-Cookie",value:o,active:!0,in:"header"}]:[]}function sgt(t,e,n,r){return xve(t,e,n).reduce((o,s)=>{const a=fs(s.value,r);return{...o,[fs(s.key,r)]:a}},{})}function nH(t=[]){return yve(t,al.Cookie,"cookie")}function xve(t,e,n){const r=n?.components.parameters.get();return cf("cookie",[nH(e?.security.get()),nH(t.security.get()),Ti(e?.parameters.cookies.get(),r),Ti(t.parameters.cookies.get(),r)])}function wve(t){return t.filter(e=>e.active&&e.key&&(e.value||e?.files))}function agt(t,e){const{requestBody:n}=t,r=YU(t,e);return["binary","multipart/form-data"].includes(n.type.get())?[]:fve(r)?[]:[{id:"",key:"Content-Type",value:n.type.get(),active:!0,in:"header"}]}function fs(t,e){return e?vr(t,Uv(e)?.inputs):t}function lgt(t,e){return jmt(t)||Ek(t)||!!(e&&Ek(aE(t),e))}function cgt({proxyUrl:t,resolvedUrl:e,ignoreProxy:n,queryParameters:r=""}){const i=t!=="/"?xQ(t):t;let o;return n||!i?o=e:o=`${i}/${e}`,r&&(o+=`?${r}`),o}function HU(t){return t.flatMap(e=>{const n=e.id.get();return(e.paths?.keys??[]).flatMap(i=>{const o=e.paths.nested(i),a=(o.keys??[]).filter(u=>["get","put","post","delete","options","head","patch","trace","x-query","query"].includes(u.toLowerCase())).map(u=>{const d=o.nested(u),p=d.operationId.get()||"",f=d.summary.get();return{apiId:n,path:i,method:u,operationId:p,summary:f,isAdditionalOperation:!1}}),l=o.additionalOperations?.get(),c=l?Object.entries(l).map(([u,d])=>({apiId:n,path:i,method:u,operationId:d.operationId||"",summary:d.summary,isAdditionalOperation:!0})):[];return[...a,...c]})})}const Sve=(t,e,n)=>{if(!e)return null;const{apiId:r,method:i,path:o}=e,s=t.find(l=>l.id.get()===r);if(!s)return null;if(n)try{return n(o,i,s.get({noproxy:!0}))??null}catch(l){console.error("Failed to convert operation to replay value",l)}const a=s.paths?.nested(o)?.nested(i)?.ornull;return a?{id:a.operationId.get()??"",name:a.summary.get()??"",method:i,path:o,href:"",operationId:a.operationId.get(),parameters:[],servers:[],security:[]}:null};function Jv({tabsState:{activeTabIdx:t,tabs:e}}){return e[t?.get()??0]}function ugt(t){const{environments:e,apis:n,tabsState:{tabs:r}}=t,i=r.filter(l=>l.data.type.get()===ft.Step),o=HU(n),s=i.map(l=>{const{collectionId:c,workflowId:u,satisfiesScheme:d}=l.data.get(),p=l.data.draftStep.ornull;if(p===null)return null;const{operationId:f,apiId:m}=p.get().operation??{};if(!d||!f)return null;const g=t.collections.find(_=>_.id.get()===c),y=g?.workflows.find(_=>_.workflowId.get()===u),b=o.find(_=>_.operationId===f&&_.apiId===m);if(!b)return null;const v=lE(p,y,g,t),x=YU(p,t),O=sgt(p,y,g,t),w=Ove(p,y,g,t),S=p.requestBody.activeExampleName;return{apiPath:{path:b.path,method:b.method},requestValues:{cookie:O,header:v,query:w,body:x},activeExampleName:S.get()}}).filter(l=>l!==null),a=Uv(t);return{operations:s,environment:a?.name,environments:Object.fromEntries(e.get().map(l=>[l.name,{...Object.fromEntries(l.inputs.filter(({isSecret:c})=>!c).map(({name:c,value:u})=>[c,u])),...Object.fromEntries(l.servers.map(({apiId:c,value:u})=>[c,u]))}]))}}function dgt(t){return t.filter(e=>["get","put","post","delete","options","head","patch","trace","x-query","query"].includes(e.toLowerCase()))}function pgt(t){const e=new Map;return(t.paths?.keys??[]).forEach(r=>{const i=t.paths.nested(r);dgt(i.keys).forEach(a=>{const l=i.nested(a),c=l.tags?.get()||[],u=l.summary?.get(),d=l.operationId?.get();(c.length?c:["Untagged"]).forEach(f=>{const m=e.get(f)??[];m.push({path:r,method:a,summary:u,operationId:d,isAdditionalOperation:!1}),e.set(f,m)})});const s=i.additionalOperations?.get();s&&Object.entries(s).forEach(([a,l])=>{const c=l.tags||[],u=l.summary,d=l.operationId;(c.length?c:["Untagged"]).forEach(f=>{const m=e.get(f)??[];m.push({path:r,method:a,summary:u,operationId:d,isAdditionalOperation:!0}),e.set(f,m)})})}),e}function fgt({apiId:t,apiTitle:e,tagToOperations:n}){return Array.from(n.entries()).map(([i,o])=>{const s=o.map(a=>({id:KU({apiId:t,method:a.method,path:a.path}),name:a.summary||a.path,apiTitle:e,type:"operation",apiId:t,path:a.path,tagName:i,method:a.method,summary:a.summary,isAdditionalOperation:a.isAdditionalOperation}));return s.length===0?null:{id:`${t}-${i}`,name:i,apiTitle:e,type:"tag",apiId:t,tagName:i,children:s}}).filter(Boolean)}function _ve(t){const e=t.id.get(),n=t.info?.title?.get()||e,r=pgt(t),i=fgt({apiId:e,apiTitle:n,tagToOperations:r});return i.length===0?null:{id:e,name:n,apiTitle:n,type:"api",apiId:e,api:t,children:i}}const KU=({apiId:t,method:e,path:n})=>`${t}-${e.toUpperCase()}-${n}`;function hgt(t){const e=t.data.get();switch(e.type){case ft.Workflow:return`${e.collectionId}/${e.workflowId}`;case ft.Collection:return e.collectionId;case ft.Step:return`${e.collectionId}/${e.workflowId}/${e.stepId}`;case ft.WorkflowRun:return`${e.collectionId}/${e.workflowId}`}}function mgt(t){const e=t.data.get();if(e.type!==ft.Step)return;const{apiId:n,path:r,method:i}=e.draftStep?.operation??{};if(!(!n||!r||!i))return KU({apiId:n,path:r,method:i})}function Lf(t){const e=nn(),n=Jv(e);return!n.get()||t&&!ii(n.data.get(),t)?{tab:null,tabDataId:void 0,apiNodeId:void 0}:{tab:n,tabDataId:hgt(n),apiNodeId:mgt(n)}}function ggt(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return $.useMemo(()=>r=>{e.forEach(i=>i(r))},e)}const cE=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function eb(t){const e=Object.prototype.toString.call(t);return e==="[object Window]"||e==="[object global]"}function JU(t){return"nodeType"in t}function ua(t){var e,n;return t?eb(t)?t:JU(t)&&(e=(n=t.ownerDocument)==null?void 0:n.defaultView)!=null?e:window:window}function e4(t){const{Document:e}=ua(t);return t instanceof e}function $w(t){return eb(t)?!1:t instanceof ua(t).HTMLElement}function Cve(t){return t instanceof ua(t).SVGElement}function tb(t){return t?eb(t)?t.document:JU(t)?e4(t)?t:$w(t)||Cve(t)?t.ownerDocument:document:document:document}const ec=cE?$.useLayoutEffect:$.useEffect;function uE(t){const e=$.useRef(t);return ec(()=>{e.current=t}),$.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.current==null?void 0:e.current(...r)},[])}function ygt(){const t=$.useRef(null),e=$.useCallback((r,i)=>{t.current=setInterval(r,i)},[]),n=$.useCallback(()=>{t.current!==null&&(clearInterval(t.current),t.current=null)},[]);return[e,n]}function fx(t,e){e===void 0&&(e=[t]);const n=$.useRef(t);return ec(()=>{n.current!==t&&(n.current=t)},e),n}function Ew(t,e){const n=$.useRef();return $.useMemo(()=>{const r=t(n.current);return n.current=r,r},[...e])}function Ak(t){const e=uE(t),n=$.useRef(null),r=$.useCallback(i=>{i!==n.current&&e?.(i,n.current),n.current=i},[]);return[n,r]}function Rk(t){const e=$.useRef();return $.useEffect(()=>{e.current=t},[t]),e.current}let aj={};function Aw(t,e){return $.useMemo(()=>{if(e)return e;const n=aj[t]==null?0:aj[t]+1;return aj[t]=n,t+"-"+n},[t,e])}function Tve(t){return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.reduce((o,s)=>{const a=Object.entries(s);for(const[l,c]of a){const u=o[l];u!=null&&(o[l]=u+t*c)}return o},{...e})}}const Ny=Tve(1),jk=Tve(-1);function vgt(t){return"clientX"in t&&"clientY"in t}function dE(t){if(!t)return!1;const{KeyboardEvent:e}=ua(t.target);return e&&t instanceof e}function bgt(t){if(!t)return!1;const{TouchEvent:e}=ua(t.target);return e&&t instanceof e}function Nk(t){if(bgt(t)){if(t.touches&&t.touches.length){const{clientX:e,clientY:n}=t.touches[0];return{x:e,y:n}}else if(t.changedTouches&&t.changedTouches.length){const{clientX:e,clientY:n}=t.changedTouches[0];return{x:e,y:n}}}return vgt(t)?{x:t.clientX,y:t.clientY}:null}const kf=Object.freeze({Translate:{toString(t){if(!t)return;const{x:e,y:n}=t;return"translate3d("+(e?Math.round(e):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(t){if(!t)return;const{scaleX:e,scaleY:n}=t;return"scaleX("+e+") scaleY("+n+")"}},Transform:{toString(t){if(t)return[kf.Translate.toString(t),kf.Scale.toString(t)].join(" ")}},Transition:{toString(t){let{property:e,duration:n,easing:r}=t;return e+" "+n+"ms "+r}}}),rH="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ogt(t){return t.matches(rH)?t:t.querySelector(rH)}const xgt={display:"none"};function wgt(t){let{id:e,value:n}=t;return _e.default.createElement("div",{id:e,style:xgt},n)}function Sgt(t){let{id:e,announcement:n,ariaLiveType:r="assertive"}=t;const i={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return _e.default.createElement("div",{id:e,style:i,role:"status","aria-live":r,"aria-atomic":!0},n)}function _gt(){const[t,e]=$.useState("");return{announce:$.useCallback(r=>{r!=null&&e(r)},[]),announcement:t}}const Ive=$.createContext(null);function Cgt(t){const e=$.useContext(Ive);$.useEffect(()=>{if(!e)throw new Error("useDndMonitor must be used within a children of <DndContext>");return e(t)},[t,e])}function Tgt(){const[t]=$.useState(()=>new Set),e=$.useCallback(r=>(t.add(r),()=>t.delete(r)),[t]);return[$.useCallback(r=>{let{type:i,event:o}=r;t.forEach(s=>{var a;return(a=s[i])==null?void 0:a.call(s,o)})},[t]),e]}const Igt={draggable:`
960
960
  To pick up a draggable item, press the space bar.
961
961
  While dragging, use the arrow keys to move the item.
962
962
  Press space again to drop the item in its new position, or press escape to cancel.
@@ -3921,7 +3921,7 @@ Please report this to https://github.com/markedjs/marked.`,t){const i="<p>An err
3921
3921
  gap: var(--spacing-xs);
3922
3922
  `,qT={[So.SIMPLE]:{label:"Simple",tooltipContent:"Success criteria conditions in the form of basic literals, operators, and loose comparisons"},[So.REGEX]:{label:"Regex",tooltipContent:"Regex patterns used as success criteria conditions"},[So.JSONPATH]:{label:"JSONPath",tooltipContent:"JSONPath expressions as success criteria conditions"},[So.XPATH]:{label:"XPath",tooltipContent:"XPath expressions as success criteria conditions"}},BWt=Object.keys(qT);function WWt({successCriteria:t}){const{sendEvent:e}=Xt(),n=o=>{e("com.redocly.button.click",[{...Ze("button","addSuccessCriteria"),source:"workflow",action:"add_success_criteria",success_criteria_type:o}]),t.set(s=>[...s||[],{...eU(o)}])},r=$.useMemo(()=>t.filter(o=>o.get()!==void 0),[t]),i=o=>{e("com.redocly.button.click",[{...Ze("button","removeSuccessCriteria"),source:"workflow",action:"remove_success_criteria",success_criteria_type:o.get().type,condition:o.get().condition}]),o.set(dn)};return h.jsxs(h.Fragment,{children:[h.jsxs(rd,{children:["Success criteria",h.jsx(_a,{content:"List of conditions required to complete the step."})]}),r.map(o=>h.jsx($.Fragment,{children:h.jsx(qWt,{successCriteria:o,label:qT[o.get().type].label,tooltipContent:qT[o.get().type].tooltipContent,additionalActions:h.jsx(pl,{"data-testid":"remove-success-criteria-button",variant:"text",icon:h.jsx(Y.TrashCanIcon,{}),onClick:()=>i(o)})})},o.get().id)),h.jsx(XWt,{renderInput:()=>h.jsx(Y.Button,{variant:"outlined",icon:h.jsx(Y.AddIcon,{}),iconPosition:"left",size:"small",children:"Add success criteria"}),dataTestId:"workflow-step-success-criteria-select",options:BWt.map(o=>({element:qT[o].label,label:o,value:o})),onChange:o=>{n(o)},placement:"top",hideCheckmarkIcon:!0})]})}const XWt=E.default(Y.Select)`
3923
3923
  border-radius: var(--border-radius-md);
3924
- `;function ZWt({step:t,workflowId:e,collectionId:n}){const{handleIdChange:r}=zm(),i=t.stepId.get();return h.jsx(h.Fragment,{children:h.jsxs(rCe,{children:[h.jsx(rd,{children:"Info"}),h.jsxs(or,{children:[h.jsxs(or.Row,{children:[h.jsx(or.Cell,{children:h.jsxs(Gh,{children:["Step ID",h.jsx(_a,{content:"This step's unique identifier"})]})}),h.jsx(or.Cell,{$readonly:!0,children:h.jsx(hq,{attribute:t.stepId,editorTitle:"Change step ID",placeholder:"Add step ID",onSave:o=>{n&&e&&r({collectionId:n,workflowId:e,stepId:i},{collectionId:n,workflowId:e,stepId:o})}})})]}),h.jsxs(or.Row,{children:[h.jsx(or.Cell,{children:h.jsxs(Gh,{children:["Description",h.jsx(_a,{content:"The step's purpose in the workflow."})]})}),h.jsx(or.Cell,{children:h.jsx(p3,{state:t.description,placeholder:"Add description"})})]})]}),h.jsxs(qy,{children:[h.jsx(rd,{children:"Operation"}),h.jsx(MWt,{step:t,collectionId:n})]}),h.jsx(qy,{children:h.jsx(nCe,{outputs:t.outputs,tooltipText:"Data generated in this step that can be used in the next steps."})}),h.jsx(qy,{children:h.jsx(WWt,{successCriteria:t.successCriteria})})]})})}const GWt=["text","file"];function YWt({onParameterChange:t,files:e}){const n=$.useRef(null),r=a=>{a.target.files?.length&&t(Array.from(a.target.files).map(l=>({absolutePath:null,file:l})))},i=async()=>{if(Kn())try{const{open:a}=await Promise.resolve().then(()=>require("./replay-index-pa2eIJu5.js")),l=await a({multiple:!0});if(!l)return;const u=(Array.isArray(l)?l:[l]).map(vw),p=(await Promise.all(u)).filter(f=>f!==null);t(p)}catch(a){console.error("Failed to open file dialog or read file:",a)}else n.current?.click()},o=$.useCallback(()=>{t(null)},[t]),s=$.useMemo(()=>{if(!e)return null;if(e.length===1)return h.jsx(Fne,{icon:h.jsx(Y.CloseIcon,{}),variant:"secondary",onClick:o,iconPosition:"right",size:"small",children:h.jsx(Bne,{children:e[0].file.name})});if(e.length>1)return h.jsx(Fne,{icon:h.jsx(Y.CloseIcon,{}),variant:"secondary",onClick:o,iconPosition:"right",size:"small",children:h.jsxs(Bne,{children:[e.length," files"]})})},[e,o]);return h.jsx(HWt,{children:h.jsxs(KWt,{children:[h.jsx(JWt,{children:s||h.jsx(n7t,{children:"Add files here"})}),h.jsxs(e7t,{children:[h.jsx(t7t,{onClick:i,variant:"secondary",size:"small","data-testid":"add-button",icon:h.jsx(Y.AddIcon,{color:"--button-content-color"})}),h.jsx("input",{"data-testid":"file-input",hidden:!0,ref:n,type:"file",multiple:!0,accept:"files/*",onChange:r})]})]})})}const HWt=E.default.div`
3924
+ `;function ZWt({step:t,workflowId:e,collectionId:n}){const{handleIdChange:r}=zm(),i=t.stepId.get();return h.jsx(h.Fragment,{children:h.jsxs(rCe,{children:[h.jsx(rd,{children:"Info"}),h.jsxs(or,{children:[h.jsxs(or.Row,{children:[h.jsx(or.Cell,{children:h.jsxs(Gh,{children:["Step ID",h.jsx(_a,{content:"This step's unique identifier"})]})}),h.jsx(or.Cell,{$readonly:!0,children:h.jsx(hq,{attribute:t.stepId,editorTitle:"Change step ID",placeholder:"Add step ID",onSave:o=>{n&&e&&r({collectionId:n,workflowId:e,stepId:i},{collectionId:n,workflowId:e,stepId:o})}})})]}),h.jsxs(or.Row,{children:[h.jsx(or.Cell,{children:h.jsxs(Gh,{children:["Description",h.jsx(_a,{content:"The step's purpose in the workflow."})]})}),h.jsx(or.Cell,{children:h.jsx(p3,{state:t.description,placeholder:"Add description"})})]})]}),h.jsxs(qy,{children:[h.jsx(rd,{children:"Operation"}),h.jsx(MWt,{step:t,collectionId:n})]}),h.jsx(qy,{children:h.jsx(nCe,{outputs:t.outputs,tooltipText:"Data generated in this step that can be used in the next steps."})}),h.jsx(qy,{children:h.jsx(WWt,{successCriteria:t.successCriteria})})]})})}const GWt=["text","file"];function YWt({onParameterChange:t,files:e}){const n=$.useRef(null),r=a=>{a.target.files?.length&&t(Array.from(a.target.files).map(l=>({absolutePath:null,file:l})))},i=async()=>{if(Kn())try{const{open:a}=await Promise.resolve().then(()=>require("./replay-index-DdzJ9I8C.js")),l=await a({multiple:!0});if(!l)return;const u=(Array.isArray(l)?l:[l]).map(vw),p=(await Promise.all(u)).filter(f=>f!==null);t(p)}catch(a){console.error("Failed to open file dialog or read file:",a)}else n.current?.click()},o=$.useCallback(()=>{t(null)},[t]),s=$.useMemo(()=>{if(!e)return null;if(e.length===1)return h.jsx(Fne,{icon:h.jsx(Y.CloseIcon,{}),variant:"secondary",onClick:o,iconPosition:"right",size:"small",children:h.jsx(Bne,{children:e[0].file.name})});if(e.length>1)return h.jsx(Fne,{icon:h.jsx(Y.CloseIcon,{}),variant:"secondary",onClick:o,iconPosition:"right",size:"small",children:h.jsxs(Bne,{children:[e.length," files"]})})},[e,o]);return h.jsx(HWt,{children:h.jsxs(KWt,{children:[h.jsx(JWt,{children:s||h.jsx(n7t,{children:"Add files here"})}),h.jsxs(e7t,{children:[h.jsx(t7t,{onClick:i,variant:"secondary",size:"small","data-testid":"add-button",icon:h.jsx(Y.AddIcon,{color:"--button-content-color"})}),h.jsx("input",{"data-testid":"file-input",hidden:!0,ref:n,type:"file",multiple:!0,accept:"files/*",onChange:r})]})]})})}const HWt=E.default.div`
3925
3925
  position: relative;
3926
3926
  display: flex;
3927
3927
  flex-grow: 1;
@@ -4060,7 +4060,7 @@ Please report this to https://github.com/markedjs/marked.`,t){const i="<p>An err
4060
4060
  `,h7t=E.default.div`
4061
4061
  display: flex;
4062
4062
  justify-content: center;
4063
- `,iCe=t=>t==="file"?h.jsx(Y.FileIcon,{size:"14px"}):h.jsx(Y.CharacterIcon,{size:"14px"}),m7t=GWt.map(t=>({label:h.jsxs(r7t,{children:[iCe(t),h.jsx(p7t,{children:t})]}),value:t}));function Wne({isLast:t,index:e,parameter:n,onKeyChange:r,onValueChange:i,onActiveChange:o,onTypeChange:s,onFilesChange:a,environment:l,keyName:c,enableInputTypeSelection:u,autoCompleteOptions:d,actions:p}){const{value:f,key:m,active:g,type:y,files:b}=n,v=t?"form-data-name-ghost":`form-data-name-${e}`,x=t?"form-data-value-ghost":`form-data-value-${e}`,O=t?"form-data-checkbox-ghost":`form-data-checkbox-${e}`;return h.jsxs(a7t,{children:[h.jsx(l7t,{children:!t&&h.jsxs(h.Fragment,{children:[h.jsx(c7t,{"data-testid":O,type:"checkbox",checked:g,onChange:({target:w})=>o(w.checked)}),h.jsx(u7t,{checked:g})]})}),h.jsx($t,{}),h.jsxs(h.Fragment,{children:[h.jsx(Dn,{dataTestId:v,placeholder:`${t?"New ":""}${c}`,value:m,environment:l,onChange:r}),u&&h.jsx(h7t,{children:h.jsx(f7t,{options:m7t,value:{label:iCe(y),value:y,active:!0},onChange:({value:w})=>s(w),withArrow:!1,size:"small"})})]}),h.jsx($t,{}),y==="file"?h.jsx(YWt,{files:b,onParameterChange:a}):h.jsx(Dn,{dataTestId:x,placeholder:"Value",value:f,environment:l,options:d,onChange:i}),h.jsx($t,{}),h.jsx(d7t,{children:!t&&p(e)})]})}function g7t({title:t,enableInputTypeSelection:e=!1,onParameterChange:n,actions:r,formElements:i,keyName:o,environment:s,createEmptyParameter:a}){const l=Na(),{ghostState:c,ghostValue:u,promoteGhost:d}=M1e({elements:i,createEmptyParameter:a,onParameterChange:n}),p={environment:s,keyName:o,enableInputTypeSelection:e,autoCompleteOptions:l,actions:r};return h.jsxs(i7t,{children:[t&&h.jsx(o7t,{children:t}),h.jsx(s7t,{children:[...i.map((f,m)=>{const g=f.get();return h.jsx(Wne,{isLast:!1,index:m,parameter:g,onKeyChange:y=>{f.nested("key").set(y),n?.(f)},onValueChange:y=>{f.nested("value").set(y),n?.(f)},onActiveChange:y=>{f.active.set(y),n?.(f)},onTypeChange:y=>{f.nested("type").set(y),n?.(f)},onFilesChange:y=>{f.nested("files").set(y),n?.(f)},...p},g.id)}),a?h.jsx(Wne,{isLast:!0,index:i.length,parameter:u,onKeyChange:f=>d({key:f}),onValueChange:f=>d({value:f}),onActiveChange:f=>c.active.set(f),onTypeChange:f=>c.type.set(f),onFilesChange:f=>d({files:f}),...p},u.id):null]})]})}function y7t({data:t,type:e}){const n=dr(),r=t[e];function i(o){r[o].set(dn)}return h.jsx(g7t,{keyName:"Param",formElements:r,environment:n,enableInputTypeSelection:e!==To["application/x-www-form-urlencoded"],createEmptyParameter:g7e,actions:o=>h.jsx(pl,{onClick:()=>i(o),variant:"text",icon:h.jsx(Y.TrashCanIcon,{})})})}const v7t=({data:t})=>{const e=t.get(),[n,r]=$.useState(!1),i=$.useRef(null),o=l=>{const c=l.target.files?.[0];if(c){r(!0);const u=new FileReader;u.onload=()=>{r(!1),t.set({absolutePath:null,file:c})},u.readAsDataURL(c)}},s=async()=>{if(Kn())try{const{open:l}=await Promise.resolve().then(()=>require("./replay-index-pa2eIJu5.js")),c=await l();if(!c)return;const u=await vw(c);t.set(u)}catch(l){console.error("Failed to open file dialog or read file:",l)}else i.current?.click()},a=()=>{t.set(null)};return n?h.jsxs(b7t,{children:[h.jsx(Y.SpinnerIcon,{}),"Loading..."]}):e&&e.file?.name?h.jsxs(O7t,{children:[h.jsxs(x7t,{children:[h.jsx(Y.DocumentBlankIcon,{size:"16px"}),h.jsx(w7t,{children:e.file?.name})]}),h.jsx(pl,{onClick:a,icon:h.jsx(Y.TrashCanIcon,{})})]}):h.jsx(oCe,{children:!e&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"file",hidden:!0,ref:i,onChange:o}),h.jsx(Y.Button,{type:"button",variant:"text",onClick:s,icon:h.jsx(Y.CloudUploadIcon,{}),children:"Upload file"})]})})},oCe=E.default.div`
4063
+ `,iCe=t=>t==="file"?h.jsx(Y.FileIcon,{size:"14px"}):h.jsx(Y.CharacterIcon,{size:"14px"}),m7t=GWt.map(t=>({label:h.jsxs(r7t,{children:[iCe(t),h.jsx(p7t,{children:t})]}),value:t}));function Wne({isLast:t,index:e,parameter:n,onKeyChange:r,onValueChange:i,onActiveChange:o,onTypeChange:s,onFilesChange:a,environment:l,keyName:c,enableInputTypeSelection:u,autoCompleteOptions:d,actions:p}){const{value:f,key:m,active:g,type:y,files:b}=n,v=t?"form-data-name-ghost":`form-data-name-${e}`,x=t?"form-data-value-ghost":`form-data-value-${e}`,O=t?"form-data-checkbox-ghost":`form-data-checkbox-${e}`;return h.jsxs(a7t,{children:[h.jsx(l7t,{children:!t&&h.jsxs(h.Fragment,{children:[h.jsx(c7t,{"data-testid":O,type:"checkbox",checked:g,onChange:({target:w})=>o(w.checked)}),h.jsx(u7t,{checked:g})]})}),h.jsx($t,{}),h.jsxs(h.Fragment,{children:[h.jsx(Dn,{dataTestId:v,placeholder:`${t?"New ":""}${c}`,value:m,environment:l,onChange:r}),u&&h.jsx(h7t,{children:h.jsx(f7t,{options:m7t,value:{label:iCe(y),value:y,active:!0},onChange:({value:w})=>s(w),withArrow:!1,size:"small"})})]}),h.jsx($t,{}),y==="file"?h.jsx(YWt,{files:b,onParameterChange:a}):h.jsx(Dn,{dataTestId:x,placeholder:"Value",value:f,environment:l,options:d,onChange:i}),h.jsx($t,{}),h.jsx(d7t,{children:!t&&p(e)})]})}function g7t({title:t,enableInputTypeSelection:e=!1,onParameterChange:n,actions:r,formElements:i,keyName:o,environment:s,createEmptyParameter:a}){const l=Na(),{ghostState:c,ghostValue:u,promoteGhost:d}=M1e({elements:i,createEmptyParameter:a,onParameterChange:n}),p={environment:s,keyName:o,enableInputTypeSelection:e,autoCompleteOptions:l,actions:r};return h.jsxs(i7t,{children:[t&&h.jsx(o7t,{children:t}),h.jsx(s7t,{children:[...i.map((f,m)=>{const g=f.get();return h.jsx(Wne,{isLast:!1,index:m,parameter:g,onKeyChange:y=>{f.nested("key").set(y),n?.(f)},onValueChange:y=>{f.nested("value").set(y),n?.(f)},onActiveChange:y=>{f.active.set(y),n?.(f)},onTypeChange:y=>{f.nested("type").set(y),n?.(f)},onFilesChange:y=>{f.nested("files").set(y),n?.(f)},...p},g.id)}),a?h.jsx(Wne,{isLast:!0,index:i.length,parameter:u,onKeyChange:f=>d({key:f}),onValueChange:f=>d({value:f}),onActiveChange:f=>c.active.set(f),onTypeChange:f=>c.type.set(f),onFilesChange:f=>d({files:f}),...p},u.id):null]})]})}function y7t({data:t,type:e}){const n=dr(),r=t[e];function i(o){r[o].set(dn)}return h.jsx(g7t,{keyName:"Param",formElements:r,environment:n,enableInputTypeSelection:e!==To["application/x-www-form-urlencoded"],createEmptyParameter:g7e,actions:o=>h.jsx(pl,{onClick:()=>i(o),variant:"text",icon:h.jsx(Y.TrashCanIcon,{})})})}const v7t=({data:t})=>{const e=t.get(),[n,r]=$.useState(!1),i=$.useRef(null),o=l=>{const c=l.target.files?.[0];if(c){r(!0);const u=new FileReader;u.onload=()=>{r(!1),t.set({absolutePath:null,file:c})},u.readAsDataURL(c)}},s=async()=>{if(Kn())try{const{open:l}=await Promise.resolve().then(()=>require("./replay-index-DdzJ9I8C.js")),c=await l();if(!c)return;const u=await vw(c);t.set(u)}catch(l){console.error("Failed to open file dialog or read file:",l)}else i.current?.click()},a=()=>{t.set(null)};return n?h.jsxs(b7t,{children:[h.jsx(Y.SpinnerIcon,{}),"Loading..."]}):e&&e.file?.name?h.jsxs(O7t,{children:[h.jsxs(x7t,{children:[h.jsx(Y.DocumentBlankIcon,{size:"16px"}),h.jsx(w7t,{children:e.file?.name})]}),h.jsx(pl,{onClick:a,icon:h.jsx(Y.TrashCanIcon,{})})]}):h.jsx(oCe,{children:!e&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"file",hidden:!0,ref:i,onChange:o}),h.jsx(Y.Button,{type:"button",variant:"text",onClick:s,icon:h.jsx(Y.CloudUploadIcon,{}),children:"Upload file"})]})})},oCe=E.default.div`
4064
4064
  display: flex;
4065
4065
  align-items: center;
4066
4066
  justify-content: flex-start;
@@ -4246,7 +4246,7 @@ Please report this to https://github.com/markedjs/marked.`,t){const i="<p>An err
4246
4246
  font-size: var(--font-size-base);
4247
4247
  font-weight: var(--font-weight-medium);
4248
4248
  padding: var(--spacing-xs);
4249
- `;function t6t(t=32){let e="";for(;e.length<t;)e+=Math.random().toString(32).substring(2);return e.substring(0,t)}function Xne(t){return new TextEncoder().encode(t)}function n6t(t){const e=new ArrayBuffer(t.length),n=new Uint8Array(e);for(let r=0,i=t.length;r<i;r++)n[r]=t.charCodeAt(r);return e}function Zne(t){return btoa(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function r6t(t){return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}async function i6t(t){const e=new TextEncoder().encode(t);return crypto?.subtle.digest("SHA-256",e)}function o6t(t){if(t)return btoa(String.fromCharCode.apply(null,new Uint8Array(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function mq(t,e,n){const r=typeof t=="string"?t:t.toString();if(Kn()){const{openUrl:i}=await Promise.resolve().then(()=>require("./replay-index-CDeXY19w.js"));await i(r);return}window.open(r,e,n)}const Gne="/_auth/oauth2-redirect.html";let oA=class IO{static async authorizeImplicit({authorizationUrl:e,clientId:n,scopes:r,extraAuthParams:i={},routingBasePath:o="/",redirectUri:s,successCallback:a,errorCallback:l}){const c=Yne({date:new Date().toString()});try{const u=new URL(e),d=o==="/"?"":o,p=`${window.location.origin}${d}${Gne}`;u.searchParams.set("client_id",n),u.searchParams.set("redirect_uri",s||p),u.searchParams.set("response_type","token"),u.searchParams.set("state",c),Array.isArray(r)&&u.searchParams.set("scope",r.join(" "));for(const f in i)u.searchParams.set(f,i[f]);window.redirectOAuth2={flow:"implicit",data:{authorizationUrl:e,clientId:n,scopes:r},state:c,successCallback:f=>{a(f),IO.clearRedirectData("implicit")},errorCallback:f=>{l(f),IO.clearRedirectData("implicit")}},await mq(u.toString())}catch(u){l(Nd.OAuth2Error.fromError(u))}}static async authorizeAuthorizationCode({authorizationUrl:e,tokenUrl:n,serverUrl:r,clientId:i,clientSecret:o,codeVerifier:s,codeChallenge:a,scopes:l,extraAuthParams:c={},extraTokenHeaders:u={},extraTokenBody:d={},extraTokenParams:p={},routingBasePath:f="/",redirectUri:m,withPkce:g,successCallback:y,errorCallback:b}){try{const v=R1({url:e,serverUrl:r}),x=new URL(v),O=R1({url:n,serverUrl:r}),w=new URL(O),S=f==="/"?"":f,_=`${window.location.origin}${S}${Gne}`,C=Yne({date:new Date().toString()});x.searchParams.set("client_id",i),x.searchParams.set("redirect_uri",m||_),x.searchParams.set("response_type","code"),x.searchParams.set("state",C),Array.isArray(l)&&x.searchParams.set("scope",l.join(" ")),g&&(!a&&!s&&(s=l6t(),a=await s6t(s)),a&&(x.searchParams.set("code_challenge",a),x.searchParams.set("code_challenge_method","S256")));for(const I in c)x.searchParams.set(I,c[I]);for(const I in p)w.searchParams.set(I,p[I]);window.redirectOAuth2={flow:"authorizationCode",data:{authorizationUrl:e,clientId:i,scopes:l},state:C,successCallback:async({auth_code:I})=>{const A=jc({client_id:i,client_secret:o,...s&&{code_verifier:s},code:I,grant_type:"authorization_code",redirect_uri:m||_,...d});try{const R=await Nc(w,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8",Accept:"application/json",...u},body:new URLSearchParams(A).toString()});await SN(R,y,b)}catch(R){b(Nd.OAuth2Error.fromError(R))}IO.clearRedirectData("authorizationCode")},errorCallback:I=>{b(Nd.OAuth2Error.fromError(I)),IO.clearRedirectData("authorizationCode")}},await mq(x.toString())}catch(v){b(Nd.OAuth2Error.fromError(v))}}static clearRedirectData(e){window.redirectOAuth2={flow:e,data:{authorizationUrl:"",clientId:"",scopes:[]},state:"",successCallback:()=>{},errorCallback:()=>{}}}static async authorizeClientCredentials({tokenUrl:e,clientId:n,clientSecret:r,scopes:i=[],extraTokenParams:o={},extraTokenHeaders:s={},extraTokenBody:a={},corsProxyUrl:l,serverUrl:c,assertionType:u,clientAssertion:d,successCallback:p,errorCallback:f}){try{const m={client_id:n,client_secret:r,grant_type:"client_credentials",scope:Array.isArray(i)&&i.length?i.join(" "):void 0,client_assertion_type:u,client_assertion:d,...a},g=R1({url:e,serverUrl:c,corsProxyUrl:l}),y=new URL(g);for(const v in o)y.searchParams.set(v,o[v]);const b=await Nc(g,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8",Accept:"application/json",...s},body:new URLSearchParams(V7(m)).toString()});await SN(b,p,f)}catch(m){f(Nd.OAuth2Error.fromError(m))}}static async authorizePasswordGrant({username:e,password:n,tokenUrl:r,clientId:i,clientSecret:o,scopes:s=[],extraTokenParams:a={},extraTokenHeaders:l={},extraTokenBody:c={},corsProxyUrl:u,serverUrl:d,successCallback:p,errorCallback:f}){try{const m={client_id:i,client_secret:o,grant_type:"password",username:e,password:n,scope:Array.isArray(s)&&s.length?s.join(" "):void 0,...c},g=R1({url:r,serverUrl:d,corsProxyUrl:u}),y=new URL(g);for(const v in a)y.searchParams.set(v,a[v]);const b=await Nc(g,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8",Accept:"application/json",...l},body:new URLSearchParams(V7(m)).toString()});await SN(b,p,f)}catch(m){f(Nd.OAuth2Error.fromError(m))}}};function Yne(t){const e={randomStr:t6t(),...t};return btoa(encodeURIComponent(JSON.stringify(e)))}async function SN(t,e,n){if(t.ok){const r=await t.json();if(r.error){n(Nd.OAuth2Error.fromJsonData(r));return}e(r)}else{if((t.headers.get("Content-Type")||"").indexOf("json")>-1){const o=await t.json();n(Nd.OAuth2Error.fromJsonData(o));return}n(Nd.OAuth2Error.fromTextData(await t.text()))}}async function s6t(t){return o6t(await i6t(t))}function a6t(t){return("0"+t.toString(16)).slice(-2)}function l6t(){const t=new Uint32Array(28);return crypto.getRandomValues(t),Array.from(t,a6t).join("")}function sA({scopes:t,environment:e}){const n=r=>{t[r].set(dn)};return h.jsx(c6t,{children:h.jsx(u6t,{keyName:"Scopes",elements:t,createEmptyParameter:m7e,environment:e,actions:r=>h.jsx(pl,{onClick:()=>n(r),variant:"text",icon:h.jsx(Y.TrashCanIcon,{})}),singleValue:!0,hideOuterBorders:!0,valuePlaceholder:"New scope item"})})}const c6t=E.default.div`
4249
+ `;function t6t(t=32){let e="";for(;e.length<t;)e+=Math.random().toString(32).substring(2);return e.substring(0,t)}function Xne(t){return new TextEncoder().encode(t)}function n6t(t){const e=new ArrayBuffer(t.length),n=new Uint8Array(e);for(let r=0,i=t.length;r<i;r++)n[r]=t.charCodeAt(r);return e}function Zne(t){return btoa(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function r6t(t){return btoa(String.fromCharCode(...new Uint8Array(t))).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}async function i6t(t){const e=new TextEncoder().encode(t);return crypto?.subtle.digest("SHA-256",e)}function o6t(t){if(t)return btoa(String.fromCharCode.apply(null,new Uint8Array(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function mq(t,e,n){const r=typeof t=="string"?t:t.toString();if(Kn()){const{openUrl:i}=await Promise.resolve().then(()=>require("./replay-index-DPExJ2sC.js"));await i(r);return}window.open(r,e,n)}const Gne="/_auth/oauth2-redirect.html";let oA=class IO{static async authorizeImplicit({authorizationUrl:e,clientId:n,scopes:r,extraAuthParams:i={},routingBasePath:o="/",redirectUri:s,successCallback:a,errorCallback:l}){const c=Yne({date:new Date().toString()});try{const u=new URL(e),d=o==="/"?"":o,p=`${window.location.origin}${d}${Gne}`;u.searchParams.set("client_id",n),u.searchParams.set("redirect_uri",s||p),u.searchParams.set("response_type","token"),u.searchParams.set("state",c),Array.isArray(r)&&u.searchParams.set("scope",r.join(" "));for(const f in i)u.searchParams.set(f,i[f]);window.redirectOAuth2={flow:"implicit",data:{authorizationUrl:e,clientId:n,scopes:r},state:c,successCallback:f=>{a(f),IO.clearRedirectData("implicit")},errorCallback:f=>{l(f),IO.clearRedirectData("implicit")}},await mq(u.toString())}catch(u){l(Nd.OAuth2Error.fromError(u))}}static async authorizeAuthorizationCode({authorizationUrl:e,tokenUrl:n,serverUrl:r,clientId:i,clientSecret:o,codeVerifier:s,codeChallenge:a,scopes:l,extraAuthParams:c={},extraTokenHeaders:u={},extraTokenBody:d={},extraTokenParams:p={},routingBasePath:f="/",redirectUri:m,withPkce:g,successCallback:y,errorCallback:b}){try{const v=R1({url:e,serverUrl:r}),x=new URL(v),O=R1({url:n,serverUrl:r}),w=new URL(O),S=f==="/"?"":f,_=`${window.location.origin}${S}${Gne}`,C=Yne({date:new Date().toString()});x.searchParams.set("client_id",i),x.searchParams.set("redirect_uri",m||_),x.searchParams.set("response_type","code"),x.searchParams.set("state",C),Array.isArray(l)&&x.searchParams.set("scope",l.join(" ")),g&&(!a&&!s&&(s=l6t(),a=await s6t(s)),a&&(x.searchParams.set("code_challenge",a),x.searchParams.set("code_challenge_method","S256")));for(const I in c)x.searchParams.set(I,c[I]);for(const I in p)w.searchParams.set(I,p[I]);window.redirectOAuth2={flow:"authorizationCode",data:{authorizationUrl:e,clientId:i,scopes:l},state:C,successCallback:async({auth_code:I})=>{const A=jc({client_id:i,client_secret:o,...s&&{code_verifier:s},code:I,grant_type:"authorization_code",redirect_uri:m||_,...d});try{const R=await Nc(w,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8",Accept:"application/json",...u},body:new URLSearchParams(A).toString()});await SN(R,y,b)}catch(R){b(Nd.OAuth2Error.fromError(R))}IO.clearRedirectData("authorizationCode")},errorCallback:I=>{b(Nd.OAuth2Error.fromError(I)),IO.clearRedirectData("authorizationCode")}},await mq(x.toString())}catch(v){b(Nd.OAuth2Error.fromError(v))}}static clearRedirectData(e){window.redirectOAuth2={flow:e,data:{authorizationUrl:"",clientId:"",scopes:[]},state:"",successCallback:()=>{},errorCallback:()=>{}}}static async authorizeClientCredentials({tokenUrl:e,clientId:n,clientSecret:r,scopes:i=[],extraTokenParams:o={},extraTokenHeaders:s={},extraTokenBody:a={},corsProxyUrl:l,serverUrl:c,assertionType:u,clientAssertion:d,successCallback:p,errorCallback:f}){try{const m={client_id:n,client_secret:r,grant_type:"client_credentials",scope:Array.isArray(i)&&i.length?i.join(" "):void 0,client_assertion_type:u,client_assertion:d,...a},g=R1({url:e,serverUrl:c,corsProxyUrl:l}),y=new URL(g);for(const v in o)y.searchParams.set(v,o[v]);const b=await Nc(g,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8",Accept:"application/json",...s},body:new URLSearchParams(V7(m)).toString()});await SN(b,p,f)}catch(m){f(Nd.OAuth2Error.fromError(m))}}static async authorizePasswordGrant({username:e,password:n,tokenUrl:r,clientId:i,clientSecret:o,scopes:s=[],extraTokenParams:a={},extraTokenHeaders:l={},extraTokenBody:c={},corsProxyUrl:u,serverUrl:d,successCallback:p,errorCallback:f}){try{const m={client_id:i,client_secret:o,grant_type:"password",username:e,password:n,scope:Array.isArray(s)&&s.length?s.join(" "):void 0,...c},g=R1({url:r,serverUrl:d,corsProxyUrl:u}),y=new URL(g);for(const v in a)y.searchParams.set(v,a[v]);const b=await Nc(g,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8",Accept:"application/json",...l},body:new URLSearchParams(V7(m)).toString()});await SN(b,p,f)}catch(m){f(Nd.OAuth2Error.fromError(m))}}};function Yne(t){const e={randomStr:t6t(),...t};return btoa(encodeURIComponent(JSON.stringify(e)))}async function SN(t,e,n){if(t.ok){const r=await t.json();if(r.error){n(Nd.OAuth2Error.fromJsonData(r));return}e(r)}else{if((t.headers.get("Content-Type")||"").indexOf("json")>-1){const o=await t.json();n(Nd.OAuth2Error.fromJsonData(o));return}n(Nd.OAuth2Error.fromTextData(await t.text()))}}async function s6t(t){return o6t(await i6t(t))}function a6t(t){return("0"+t.toString(16)).slice(-2)}function l6t(){const t=new Uint32Array(28);return crypto.getRandomValues(t),Array.from(t,a6t).join("")}function sA({scopes:t,environment:e}){const n=r=>{t[r].set(dn)};return h.jsx(c6t,{children:h.jsx(u6t,{keyName:"Scopes",elements:t,createEmptyParameter:m7e,environment:e,actions:r=>h.jsx(pl,{onClick:()=>n(r),variant:"text",icon:h.jsx(Y.TrashCanIcon,{})}),singleValue:!0,hideOuterBorders:!0,valuePlaceholder:"New scope item"})})}const c6t=E.default.div`
4250
4250
  width: 100%;
4251
4251
 
4252
4252
  > div {
@@ -4902,7 +4902,7 @@ Please report this to https://github.com/markedjs/marked.`,t){const i="<p>An err
4902
4902
  @media (max-width: ${ks}px) {
4903
4903
  padding: var(--spacing-xs) var(--spacing-sm);
4904
4904
  }
4905
- `,$Xt=t=>t instanceof URL?t.toString():t instanceof Request?t.url:t;function EXt({collectionId:t,workflowId:e}){const{project:{userFilesDir:n}}=nn(),{certificates:r}=hs(),i=dr(),{getCollection:o}=bp(),s=o(t),a=n.get(),{inputs:l,servers:c}=i.get(),u=s?.sourceDescriptions.get()??[];return{execute:async p=>{const f=`${a}/${t}`,m=new Yme,g=l.map(x=>JSON.stringify({[x.name]:x.value})),y=AXt(c,u),{run:b}=await Promise.resolve().then(()=>require("./replay-respect-run-CrnMaVJe.js")),v=await b({files:[f],workflow:e?[e]:[],fetch:(x,O)=>{const w=$Xt(x),{clientCert:S,clientKey:_}=pve(w,r?r.get({noproxy:!0}):[]);return Nc(w,{...O,clientCert:S,clientKey:_})},logger:j1e,maxSteps:500,maxFetchTimeout:4e4,requestFileLoader:{getFileBody:async x=>{if(!await g$(x))throw new Error(`File ${x} doesn't exist or isn't readable.`);try{const w=await m$(x),S=new TextEncoder().encode(w);return new File([S],await Z5(x))}catch(w){throw new Error(`Failed to read file ${x}: ${w}`)}}},envVariables:{},config:await Mle({}),externalRefResolver:m,input:g,server:y,severity:JSON.stringify(p),skipLint:!0,noSecretsMasking:!0});try{await RBt(t,e,v?.[0]?.ctx)}catch(x){console.error("Failed to persist workflow step context:",x)}return v}}}function AXt(t,e){return e.map(n=>{const r=t.find(o=>o.apiId===n.apiId);if(!r)return null;let i=r.value;if(r.variables)for(const o of r.variables){const s=new RegExp(`\\{${o.name}\\}`,"g");i=i.replace(s,o.value)}return`${n.name}=${i}`}).filter(n=>n!==null)}function B3(t){return t==null?"N/A":t<1e3?`${t} ms`:t<1e4?`${(t/1e3).toFixed(1)} s`:`${Math.round(t/1e3)} s`}function RXt({checks:t}){const e=t.filter(f=>f.severity!=="off"),n=e.filter(f=>f.passed).length,r=e.filter(f=>f.severity==="warn"&&!f.passed).length,i=e.length,o=i-n-r,s=n===i,a=n===0,[l,c]=_e.default.useState(o>0||r>0),u=()=>s?"All checks passed":a?"All checks failed":`Some ${i>1?"checks were":"check was"} not successful`,d=()=>s?h.jsx(Y.CheckmarkFilledIcon,{color:"var(--color-success-base)"}):o>0?h.jsx(Y.ErrorFilledIcon,{color:"var(--color-error-base)"}):h.jsx(Y.WarningFilledIcon,{color:"var(--color-warning-base)"}),p=f=>{f.stopPropagation(),c(!l)};return!e||e.length===0?null:h.jsxs(jXt,{children:[h.jsxs(NXt,{onClick:p,children:[h.jsxs(MXt,{children:[h.jsx(DXt,{children:h.jsx(QXt,{children:d()})}),h.jsxs(LXt,{children:[h.jsx(qXt,{children:u()}),h.jsxs(zXt,{children:[n," successful",r>0&&h.jsxs(h.Fragment,{children:[", ",r," ",r===1?"warning":"warnings"]}),o>0&&h.jsxs(h.Fragment,{children:[", ",o," failed"]})]})]})]}),h.jsx(UXt,{isExpanded:l,children:l?h.jsx(Y.ChevronDownIcon,{}):h.jsx(Y.ChevronRightIcon,{})})]}),h.jsx(VXt,{isExpanded:l,children:e.map((f,m)=>h.jsxs(FXt,{children:[h.jsx(BXt,{children:f.passed?h.jsx(Y.CheckmarkIcon,{color:"var(--color-success-base)",size:"14px"}):!f.passed&&["warn"].includes(f.severity)?h.jsx(Y.WarningFilledIcon,{color:"var(--color-warning-base)",size:"14px"}):h.jsx(Y.CloseOutlineIcon,{color:"var(--color-error-base)",size:"14px"})}),h.jsxs(WXt,{children:[h.jsx(XXt,{children:f.name}),f.message&&h.jsx(ZXt,{children:f.message})]})]},m))})]})}const jXt=E.default.div`
4905
+ `,$Xt=t=>t instanceof URL?t.toString():t instanceof Request?t.url:t;function EXt({collectionId:t,workflowId:e}){const{project:{userFilesDir:n}}=nn(),{certificates:r}=hs(),i=dr(),{getCollection:o}=bp(),s=o(t),a=n.get(),{inputs:l,servers:c}=i.get(),u=s?.sourceDescriptions.get()??[];return{execute:async p=>{const f=`${a}/${t}`,m=new Yme,g=l.map(x=>JSON.stringify({[x.name]:x.value})),y=AXt(c,u),{run:b}=await Promise.resolve().then(()=>require("./replay-respect-run-DlcK3pCq.js")),v=await b({files:[f],workflow:e?[e]:[],fetch:(x,O)=>{const w=$Xt(x),{clientCert:S,clientKey:_}=pve(w,r?r.get({noproxy:!0}):[]);return Nc(w,{...O,clientCert:S,clientKey:_})},logger:j1e,maxSteps:500,maxFetchTimeout:4e4,requestFileLoader:{getFileBody:async x=>{if(!await g$(x))throw new Error(`File ${x} doesn't exist or isn't readable.`);try{const w=await m$(x),S=new TextEncoder().encode(w);return new File([S],await Z5(x))}catch(w){throw new Error(`Failed to read file ${x}: ${w}`)}}},envVariables:{},config:await Mle({}),externalRefResolver:m,input:g,server:y,severity:JSON.stringify(p),skipLint:!0,noSecretsMasking:!0});try{await RBt(t,e,v?.[0]?.ctx)}catch(x){console.error("Failed to persist workflow step context:",x)}return v}}}function AXt(t,e){return e.map(n=>{const r=t.find(o=>o.apiId===n.apiId);if(!r)return null;let i=r.value;if(r.variables)for(const o of r.variables){const s=new RegExp(`\\{${o.name}\\}`,"g");i=i.replace(s,o.value)}return`${n.name}=${i}`}).filter(n=>n!==null)}function B3(t){return t==null?"N/A":t<1e3?`${t} ms`:t<1e4?`${(t/1e3).toFixed(1)} s`:`${Math.round(t/1e3)} s`}function RXt({checks:t}){const e=t.filter(f=>f.severity!=="off"),n=e.filter(f=>f.passed).length,r=e.filter(f=>f.severity==="warn"&&!f.passed).length,i=e.length,o=i-n-r,s=n===i,a=n===0,[l,c]=_e.default.useState(o>0||r>0),u=()=>s?"All checks passed":a?"All checks failed":`Some ${i>1?"checks were":"check was"} not successful`,d=()=>s?h.jsx(Y.CheckmarkFilledIcon,{color:"var(--color-success-base)"}):o>0?h.jsx(Y.ErrorFilledIcon,{color:"var(--color-error-base)"}):h.jsx(Y.WarningFilledIcon,{color:"var(--color-warning-base)"}),p=f=>{f.stopPropagation(),c(!l)};return!e||e.length===0?null:h.jsxs(jXt,{children:[h.jsxs(NXt,{onClick:p,children:[h.jsxs(MXt,{children:[h.jsx(DXt,{children:h.jsx(QXt,{children:d()})}),h.jsxs(LXt,{children:[h.jsx(qXt,{children:u()}),h.jsxs(zXt,{children:[n," successful",r>0&&h.jsxs(h.Fragment,{children:[", ",r," ",r===1?"warning":"warnings"]}),o>0&&h.jsxs(h.Fragment,{children:[", ",o," failed"]})]})]})]}),h.jsx(UXt,{isExpanded:l,children:l?h.jsx(Y.ChevronDownIcon,{}):h.jsx(Y.ChevronRightIcon,{})})]}),h.jsx(VXt,{isExpanded:l,children:e.map((f,m)=>h.jsxs(FXt,{children:[h.jsx(BXt,{children:f.passed?h.jsx(Y.CheckmarkIcon,{color:"var(--color-success-base)",size:"14px"}):!f.passed&&["warn"].includes(f.severity)?h.jsx(Y.WarningFilledIcon,{color:"var(--color-warning-base)",size:"14px"}):h.jsx(Y.CloseOutlineIcon,{color:"var(--color-error-base)",size:"14px"})}),h.jsxs(WXt,{children:[h.jsx(XXt,{children:f.name}),f.message&&h.jsx(ZXt,{children:f.message})]})]},m))})]})}const jXt=E.default.div`
4906
4906
  margin-bottom: 0;
4907
4907
  margin-top: var(--spacing-xxs);
4908
4908
  `,NXt=E.default.div`
@@ -6832,7 +6832,7 @@ Please report this to https://github.com/markedjs/marked.`,t){const i="<p>An err
6832
6832
  `,JJt=E.default.div`
6833
6833
  display: flex;
6834
6834
  gap: var(--spacing-xs);
6835
- `;async function sV(t,e,n){try{const{join:r,dirname:i}=await Promise.resolve().then(()=>rue),{exists:o}=await Promise.resolve().then(()=>y$),{revealItemInDir:s,openPath:a}=await Promise.resolve().then(()=>require("./replay-index-CDeXY19w.js")),l=await r(t,e);if(n||!await o(l)){const c=await i(l);await a(c);return}await s(l)}catch(r){throw console.error("Failed to reveal item in folder:",r),r}}function een({node:t}){const e=t.data.type==="api"&&t.data.api.srcType.get()===ps.WEB,{project:n}=nn(),r=$.useMemo(()=>Kn(),[]),{sendEvent:i}=Xt();if(e)return null;const o=()=>{t.tree.delete(t.id)},s=async a=>{a.stopPropagation();try{if(t.data.type==="api"){const l=t.data.api.id.get({noproxy:!0}),c=n.userFilesDir.get({noproxy:!0});await sV(c,l),i("com.redocly.node.management",[{...Ze("api","apiNode"),action:"reveal_in_folder",node_type:"api",name:l}])}}catch(l){console.error("Failed to reveal API in folder:",l)}};return h.jsx(ten,{children:h.jsx(fi,{content:"More actions",placement:"topRight",children:h.jsx(Y.Dropdown,{trigger:h.jsx(Y.Button,{variant:"text",size:"small",icon:h.jsx(Y.OverflowMenuVerticalIcon,{})}),alignment:"end",children:h.jsxs(Y.DropdownMenu,{children:[r&&h.jsxs(po,{onClick:s,children:[h.jsx(Y.FolderIcon,{size:"14px"}),"Reveal in folder"]}),h.jsxs(po,{onClick:o,children:[h.jsx(Y.TrashCanIcon,{size:"14px"}),"Delete"]})]})})})})}const ten=E.default.div`
6835
+ `;async function sV(t,e,n){try{const{join:r,dirname:i}=await Promise.resolve().then(()=>rue),{exists:o}=await Promise.resolve().then(()=>y$),{revealItemInDir:s,openPath:a}=await Promise.resolve().then(()=>require("./replay-index-DPExJ2sC.js")),l=await r(t,e);if(n||!await o(l)){const c=await i(l);await a(c);return}await s(l)}catch(r){throw console.error("Failed to reveal item in folder:",r),r}}function een({node:t}){const e=t.data.type==="api"&&t.data.api.srcType.get()===ps.WEB,{project:n}=nn(),r=$.useMemo(()=>Kn(),[]),{sendEvent:i}=Xt();if(e)return null;const o=()=>{t.tree.delete(t.id)},s=async a=>{a.stopPropagation();try{if(t.data.type==="api"){const l=t.data.api.id.get({noproxy:!0}),c=n.userFilesDir.get({noproxy:!0});await sV(c,l),i("com.redocly.node.management",[{...Ze("api","apiNode"),action:"reveal_in_folder",node_type:"api",name:l}])}}catch(l){console.error("Failed to reveal API in folder:",l)}};return h.jsx(ten,{children:h.jsx(fi,{content:"More actions",placement:"topRight",children:h.jsx(Y.Dropdown,{trigger:h.jsx(Y.Button,{variant:"text",size:"small",icon:h.jsx(Y.OverflowMenuVerticalIcon,{})}),alignment:"end",children:h.jsxs(Y.DropdownMenu,{children:[r&&h.jsxs(po,{onClick:s,children:[h.jsx(Y.FolderIcon,{size:"14px"}),"Reveal in folder"]}),h.jsxs(po,{onClick:o,children:[h.jsx(Y.TrashCanIcon,{size:"14px"}),"Delete"]})]})})})})}const ten=E.default.div`
6836
6836
  display: flex;
6837
6837
  gap: var(--spacing-xxs);
6838
6838
  `;function nen({onImport:t}){return h.jsxs(ren,{children:[h.jsx(ien,{children:"No OpenAPI files were imported yet"}),h.jsx(oen,{children:h.jsx(Y.Button,{icon:h.jsx(Y.DownloadIcon,{}),onClick:t,children:"Import OpenAPI file"})})]})}const ren=E.default.div`