@redocly/replay 0.29.0-next.4 → 0.29.0-next.5
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.
- package/dist/oauth2-redirect.cjs +1 -1
- package/dist/oauth2-redirect.js +1 -1
- package/dist/{replay-AiChatProvider-GWJ-n-vh.js → replay-AiChatProvider-CMWF3IYp.js} +1 -1
- package/dist/{replay-AiChatProvider-DR7NuYZo.js → replay-AiChatProvider-DUR0_fHq.js} +6 -6
- package/dist/{replay-AiChatSqliteDBStorage-BFkOn15p.js → replay-AiChatSqliteDBStorage-CEltYx94.js} +1 -1
- package/dist/{replay-AiChatSqliteDBStorage--C03eLtv.js → replay-AiChatSqliteDBStorage-CITb7hSz.js} +1 -1
- package/dist/{replay-AiPanel-1tEi12j1.js → replay-AiPanel-CYHXUjMI.js} +1 -1
- package/dist/{replay-AiPanel-CXIw_O8d.js → replay-AiPanel-DbiJfTWy.js} +4 -4
- package/dist/{replay-FileWatcher-B9PZyA8D.js → replay-FileWatcher-Bs6dX18v.js} +1 -1
- package/dist/{replay-FileWatcher-SUnXmGod.js → replay-FileWatcher-Ds_JSG57.js} +2 -2
- package/dist/{replay-SemanticSearchService-BGg8Dbuq.js → replay-SemanticSearchService-CdF1TQ_0.js} +1 -1
- package/dist/{replay-SemanticSearchService-vr1hqPU7.js → replay-SemanticSearchService-CeHFhNDz.js} +1 -1
- package/dist/{replay-SqliteDBStorage-lUh6lJSO.js → replay-SqliteDBStorage-BFfjCMEn.js} +1 -1
- package/dist/{replay-SqliteDBStorage-DcIA3sjg.js → replay-SqliteDBStorage-BRc6vHai.js} +1 -1
- package/dist/{replay-TauriFileSystemAdapter-wAZBliTE.js → replay-TauriFileSystemAdapter-OQ2SMUiS.js} +1 -1
- package/dist/{replay-TauriFileSystemAdapter-C2c2Qy4S.js → replay-TauriFileSystemAdapter-Z0n8Fot4.js} +1 -1
- package/dist/{replay-TauriRootStorage-CwVriXnS.js → replay-TauriRootStorage-C9pPtxdD.js} +2 -2
- package/dist/{replay-TauriRootStorage-olGW7jq5.js → replay-TauriRootStorage-CIPk_4D6.js} +1 -1
- package/dist/{replay-agent-loop-QLgzMDfU.js → replay-agent-loop-ByI1Wra6.js} +3 -3
- package/dist/{replay-agent-loop-GDXIQGy5.js → replay-agent-loop-qMZ-yh7C.js} +1 -1
- package/dist/{replay-ai-chat-mappers-DFVcviEH.js → replay-ai-chat-mappers-BJG4qsVh.js} +1 -1
- package/dist/{replay-ai-chat-mappers-Dkj4vl9T.js → replay-ai-chat-mappers-BhXui_cP.js} +1 -1
- package/dist/{replay-create-model-UDURpFQ4.js → replay-create-model-DT8aanzL.js} +3 -3
- package/dist/{replay-create-model-D9NcJ3yx.js → replay-create-model-nf-dFfMt.js} +3 -3
- package/dist/{replay-db-CMt9dX-H.js → replay-db-B7DOUIxd.js} +1 -1
- package/dist/{replay-db-CFx-F30d.js → replay-db-CEncswPh.js} +1 -1
- package/dist/{replay-external-resolver-rqFR7T0O.js → replay-external-resolver-BO-EH2ei.js} +2 -2
- package/dist/{replay-external-resolver-CPD4hskh.js → replay-external-resolver-CMQ9upb6.js} +1 -1
- package/dist/{replay-index-CVhBLstt.js → replay-index-BNjWkfVs.js} +1 -1
- package/dist/{replay-index-0MfVkwY4.js → replay-index-BZZRT4XV.js} +1 -1
- package/dist/{replay-index-X5PC09Iq.js → replay-index-CBonfX4Z.js} +1 -1
- package/dist/replay-index-CFwGH3xH.js +4 -0
- package/dist/{replay-index-DhelzkVo.js → replay-index-DfpfSyMZ.js} +15574 -15507
- package/dist/{replay-index-DFpzg2pO.js → replay-index-DiLsdDeo.js} +1 -1
- package/dist/{replay-index-CLJOTBS9.js → replay-index-Dlmw0x6l.js} +1072 -1057
- package/dist/{replay-index-DFopWLS5.js → replay-index-Dr16XpGK.js} +5 -5
- package/dist/{replay-lint-xvdvEmuK.js → replay-lint-BfS0UNDE.js} +3 -3
- package/dist/{replay-lint-VrViwed0.js → replay-lint-DPvfVFm_.js} +3 -3
- package/dist/{replay-lint-graphql-Cj0YxKYW.js → replay-lint-graphql-D6-d3ArO.js} +1 -1
- package/dist/{replay-lint-graphql-BytE8Msa.js → replay-lint-graphql-DeG9a5xu.js} +2 -2
- package/dist/replay-oauth2-redirect-handler-BfZRvm6l.js +4 -0
- package/dist/{replay-oauth2-redirect-handler-CqKZB3aV.js → replay-oauth2-redirect-handler-Bq6bpZMm.js} +1 -1
- package/dist/{replay-periodic-revalidation-UaQh_EiA.js → replay-periodic-revalidation-BPCrKV7q.js} +1 -1
- package/dist/{replay-periodic-revalidation-CBK4GGcK.js → replay-periodic-revalidation-DC30GN6O.js} +1 -1
- package/dist/{replay-resolve-B-ScAEQ_.js → replay-resolve-B-ubny1s.js} +1 -1
- package/dist/{replay-resolve-DxLYwKrU.js → replay-resolve-CgA90BKO.js} +1 -1
- package/dist/{replay-respect-run-C84RN_GR.js → replay-respect-run-DU4lsMa5.js} +3 -3
- package/dist/{replay-respect-run-BC7vr1j1.js → replay-respect-run-FINRH3Fr.js} +1 -1
- package/dist/{replay-tauri-path-Bl15GRY1.js → replay-tauri-path-1LJEbhgj.js} +1 -1
- package/dist/{replay-tauri-path-B-SLo2Ec.js → replay-tauri-path-DRie4WYN.js} +2 -2
- package/dist/{replay-useAiChatQueries-C-ZR0ZaE.js → replay-useAiChatQueries-AyEiBMVh.js} +2 -2
- package/dist/{replay-useAiChatQueries-gO6Sj7A5.js → replay-useAiChatQueries-DqmuaoyJ.js} +5 -5
- package/dist/{replay-validate-key-CuCnpHLS.js → replay-validate-key-Dn0a7PBu.js} +1 -1
- package/dist/{replay-validate-key-D5QLY_qk.js → replay-validate-key-qLqRQU88.js} +2 -2
- package/dist/replay.cjs +1 -1
- package/dist/replay.js +2 -2
- package/package.json +2 -2
- package/dist/replay-index-BTZoG4e-.js +0 -4
- package/dist/replay-oauth2-redirect-handler-Bqw5UUvl.js +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./replay-lint-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./replay-lint-DPvfVFm_.js"),u=require("./replay-index-Dlmw0x6l.js");function h(t,n){const e={};for(const o of Object.keys(t)){const r=t[o];if(!r)continue;const c=typeof r=="function"?r:r.enter,s=typeof r=="function"?void 0:r.leave;e[o]={...c?{enter:g(c,n)}:{},...s?{leave:g(s,n)}:{}}}return e}function g(t,n){return(e,o,r,c,s)=>{t(e,v(e,n,s))}}function v(t,n,e=[]){const{ruleId:o,severity:r,message:c,source:s,config:a,problems:l}=n,f=e.filter(i=>!Array.isArray(i));return{source:s,config:a,ancestors:f,report(i){const p=i.node??t,d=i.loc??q(p),m={source:s,pointer:void 0,start:d?.start??{line:1,col:1},end:d?.end};l.push({ruleId:i.ruleId??o,severity:i.severity??r,message:c?c.replace("{{message}}",i.message):i.message,suggest:i.suggest??[],location:[m]})}}}function q(t){if(!t?.loc)return;const n=u.getLocation(t.loc.source,t.loc.start),e=u.getLocation(t.loc.source,t.loc.end);return{start:{line:n.line,col:n.column},end:{line:e.line,col:e.column}}}function I(t){const{document:n,config:e}=t,o=n.source;if(o.body.trim()==="")return[{ruleId:"struct",severity:"error",message:"The GraphQL document is empty. Expected at least one type definition.",suggest:[],location:[{source:o,pointer:void 0,start:{line:1,col:1}}]}];let r;try{r=u.parse(new u.Source(o.body,o.absoluteRef))}catch(l){if(l instanceof u.GraphQLError)return[b(l,o)];throw l}const c=e.getRulesForSpecVersion("graphql")??[],s=y.initRules(c,e,"rules","graphql");return G({ast:r,source:o,config:e,rules:s}).map(l=>e.addProblemToIgnore(l))}function b(t,n){const e=t.locations?.[0];return{ruleId:"struct",severity:"error",message:t.message,suggest:[],location:[{source:n,pointer:void 0,start:e?{line:e.line,col:e.column}:{line:1,col:1}}]}}function G(t){const{ast:n,source:e,config:o,rules:r}=t,c=[],s=r.map(({ruleId:a,severity:l,message:f,visitor:i})=>h(i,{ruleId:a,severity:l,message:f,source:e,config:o,problems:c}));return s.length>0&&u.visit(n,u.visitInParallel(s)),c}exports.lintGraphqlDocument=I;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as y } from "./replay-lint-
|
|
2
|
-
import { x as d, y as h, S as v, G as I, z as x, B as G } from "./replay-index-
|
|
1
|
+
import { i as y } from "./replay-lint-BfS0UNDE.js";
|
|
2
|
+
import { x as d, y as h, S as v, G as I, z as x, B as G } from "./replay-index-DfpfSyMZ.js";
|
|
3
3
|
function b(t, n) {
|
|
4
4
|
const e = {};
|
|
5
5
|
for (const o of Object.keys(t)) {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";const d="Something went wrong, please, try again.";function h(r){return r&&r.replace(new RegExp("(?<!=)=+$"),"")}function m(r,e){return!!r&&!!e&&h(r)===h(e)}const w={invalid_request:"The request is missing a required parameter, includes an unsupported parameter value (other than grant type), repeats a parameter, includes multiple credentials, utilizes more than one mechanism for authenticating the client, or is otherwise malformed.",invalid_client:"Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method).",invalid_grant:"The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.",unauthorized_client:"The authenticated client is not authorized to use this authorization grant type.",unsupported_grant_type:"The authorization grant type is not supported by the authorization server.",invalid_scope:"The requested scope is invalid, unknown, malformed, or exceeds the scope granted by the resource owner.",unsupported_response_type:"The requested response type is not supported by the authorization server.",access_denied:"The resource owner or authorization server denied the request.",server_error:"The authorization server encountered an unexpected condition.",temporarily_unavailable:"The authorization server is currently unable to handle the request due to a temporary overloading or maintenance."};class n extends Error{error;error_description;constructor({message:e,error:t,error_description:i}){const o=i||t&&w[t]||t||e||d;super(o),this.name="OAuth2Error",this.error=t,this.error_description=i}static fromJsonData(e){return e.error&&typeof e.error=="object"?new n({message:e.error.message}):new n({error:e.error,error_description:e.error_description})}static fromTextData(e){return new n({message:e})}static fromError(e){return new n({error:e.message})}}function y(r,e){let t;const i=e?new URL(e):window.location;if(/code|token|error/.test(i.hash)?t=i.hash.substring(1):t=i.search.substring(1),!t)throw console.error("No query string in OAuth 2 redirect URL"),new n({message:d});const o=new URLSearchParams(t),s=o.get("access_token"),a=o.get("code"),c=o.get("token_type"),l=o.get("expires_in"),p=o.get("state"),u=o.get("error"),g=o.get("error_description");if(u)throw new n({error:u,error_description:g??void 0});if(!m(p,r?.state))throw new Error("Outdated OAuth2 state");if(r?.flow==="implicit"){if(!s)throw new Error(`Your OAuth2 authentication service provider redirected you without an "access_token".
|
|
2
|
+
Please, try again or make sure your OAuth2 settings are correct.`);if(!c)throw new Error(`Your OAuth2 authentication service provider redirected you without a "token_type".
|
|
3
|
+
Please, try again or make sure your OAuth2 settings are correct.`);r?.successCallback({access_token:s,token_type:c,expires_in:l,auth_code:""})}if(r?.flow==="authorizationCode"){if(!a)throw new Error(`Your OAuth2 authentication service provider redirected you without authorization "code".
|
|
4
|
+
Please, try again or make sure your OAuth2 settings are correct.`);r?.successCallback({auth_code:a,access_token:"",token_type:"bearer"})}}exports.OAuth2Error=n;exports.handleOAuth2Redirect=y;
|
package/dist/{replay-periodic-revalidation-CBK4GGcK.js → replay-periodic-revalidation-DC30GN6O.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./replay-index-Dlmw0x6l.js"),s=300*1e3;function i(e){return()=>({apis:e.get(n.apisAtom),collections:e.get(n.collectionsAtom)})}function d(e,r,a=s){let t=!1;const o=i(r),c=setInterval(()=>{t||e.getIndexingActivityState().inProgress||(t=!0,e.reindex(o).catch(l=>console.error("Semantic index revalidation:",l)).finally(()=>{t=!1}))},a);return()=>clearInterval(c)}exports.createIndexSnapshotGetter=i;exports.startPeriodicIndexRevalidation=d;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const se=require("./replay-index-CLJOTBS9.js");function Hn(e){return!!e}var Tt={},Rt,fn;function gt(){if(fn)return Rt;fn=1;const e="\\\\/",t=`[^${e}]`,n=0,r="\\.",i="\\+",o="\\?",a="\\/",s="(?=.)",l="[^/]",u=`(?:${a}|$)`,c=`(?:^|${a})`,E=`${r}{1,2}${u}`,m=`(?!${r})`,b=`(?!${c}${E})`,S=`(?!${r}{0,1}${u})`,w=`(?!${E})`,M=`[^.${a}]`,N=`${l}*?`,y={DOT_LITERAL:r,PLUS_LITERAL:i,QMARK_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:s,QMARK:l,END_ANCHOR:u,DOTS_SLASH:E,NO_DOT:m,NO_DOTS:b,NO_DOT_SLASH:S,NO_DOTS_SLASH:w,QMARK_NO_DOT:M,STAR:N,START_ANCHOR:c,SEP:"/"},v={...y,SLASH_LITERAL:`[${e}]`,QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${r}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${r})`,NO_DOTS:`(?!(?:^|[${e}])${r}{1,2}(?:[${e}]|$))`,NO_DOT_SLASH:`(?!${r}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${r}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`,SEP:"\\"},f={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return Rt={DEFAULT_MAX_EXTGLOB_RECURSION:n,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:f,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(I){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${I.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(I){return I===!0?v:y}},Rt}var pn;function mt(){return pn||(pn=1,(function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=gt();e.isObject=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),e.hasRegexChars=o=>r.test(o),e.isRegexChar=o=>o.length===1&&e.hasRegexChars(o),e.escapeRegex=o=>o.replace(i,"\\$1"),e.toPosixSlashes=o=>o.replace(t,"/"),e.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const o=navigator.platform.toLowerCase();return o==="win32"||o==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1},e.removeBackslashes=o=>o.replace(n,a=>a==="\\"?"":a),e.escapeLast=(o,a,s)=>{const l=o.lastIndexOf(a,s);return l===-1?o:o[l-1]==="\\"?e.escapeLast(o,a,l-1):`${o.slice(0,l)}\\${o.slice(l)}`},e.removePrefix=(o,a={})=>{let s=o;return s.startsWith("./")&&(s=s.slice(2),a.prefix="./"),s},e.wrapOutput=(o,a={},s={})=>{const l=s.contains?"":"^",u=s.contains?"":"$";let c=`${l}(?:${o})${u}`;return a.negated===!0&&(c=`(?:^(?!${c}).*$)`),c},e.basename=(o,{windows:a}={})=>{const s=o.split(a?/[\\/]/:"/"),l=s[s.length-1];return l===""?s[s.length-2]:l}})(Tt)),Tt}var vt,dn;function Rr(){if(dn)return vt;dn=1;const e=mt(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:i,CHAR_DOT:o,CHAR_EXCLAMATION_MARK:a,CHAR_FORWARD_SLASH:s,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:u,CHAR_LEFT_SQUARE_BRACKET:c,CHAR_PLUS:E,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:b,CHAR_RIGHT_PARENTHESES:S,CHAR_RIGHT_SQUARE_BRACKET:w}=gt(),M=y=>y===s||y===r,N=y=>{y.isPrefix!==!0&&(y.depth=y.isGlobstar?1/0:1)};return vt=(y,v)=>{const f=v||{},I=y.length-1,R=f.parts===!0||f.scanToEnd===!0,A=[],g=[],x=[];let j=y,k=-1,q=0,ue=0,le=!1,he=!1,W=!1,Ee=!1,we=!1,ge=!1,U=!1,me=!1,Ie=!1,ne=!1,J=0,ce,O,F={value:"",depth:0,isGlob:!1};const h=()=>k>=I,ae=()=>j.charCodeAt(k+1),z=()=>(ce=O,j.charCodeAt(++k));for(;k<I;){O=z();let D;if(O===r){U=F.backslashes=!0,O=z(),O===l&&(ge=!0);continue}if(ge===!0||O===l){for(J++;h()!==!0&&(O=z());){if(O===r){U=F.backslashes=!0,z();continue}if(O===l){J++;continue}if(ge!==!0&&O===o&&(O=z())===o){if(le=F.isBrace=!0,W=F.isGlob=!0,ne=!0,R===!0)continue;break}if(ge!==!0&&O===i){if(le=F.isBrace=!0,W=F.isGlob=!0,ne=!0,R===!0)continue;break}if(O===b&&(J--,J===0)){ge=!1,le=F.isBrace=!0,ne=!0;break}}if(R===!0)continue;break}if(O===s){if(A.push(k),g.push(F),F={value:"",depth:0,isGlob:!1},ne===!0)continue;if(ce===o&&k===q+1){q+=2;continue}ue=k+1;continue}if(f.noext!==!0&&(O===E||O===n||O===t||O===m||O===a)===!0&&ae()===u){if(W=F.isGlob=!0,Ee=F.isExtglob=!0,ne=!0,O===a&&k===q&&(Ie=!0),R===!0){for(;h()!==!0&&(O=z());){if(O===r){U=F.backslashes=!0,O=z();continue}if(O===S){W=F.isGlob=!0,ne=!0;break}}continue}break}if(O===t){if(ce===t&&(we=F.isGlobstar=!0),W=F.isGlob=!0,ne=!0,R===!0)continue;break}if(O===m){if(W=F.isGlob=!0,ne=!0,R===!0)continue;break}if(O===c){for(;h()!==!0&&(D=z());){if(D===r){U=F.backslashes=!0,z();continue}if(D===w){he=F.isBracket=!0,W=F.isGlob=!0,ne=!0;break}}if(R===!0)continue;break}if(f.nonegate!==!0&&O===a&&k===q){me=F.negated=!0,q++;continue}if(f.noparen!==!0&&O===u){if(W=F.isGlob=!0,R===!0){for(;h()!==!0&&(O=z());){if(O===u){U=F.backslashes=!0,O=z();continue}if(O===S){ne=!0;break}}continue}break}if(W===!0){if(ne=!0,R===!0)continue;break}}f.noext===!0&&(Ee=!1,W=!1);let X=j,d="",p="";q>0&&(d=j.slice(0,q),j=j.slice(q),ue-=q),X&&W===!0&&ue>0?(X=j.slice(0,ue),p=j.slice(ue)):W===!0?(X="",p=j):X=j,X&&X!==""&&X!=="/"&&X!==j&&M(X.charCodeAt(X.length-1))&&(X=X.slice(0,-1)),f.unescape===!0&&(p&&(p=e.removeBackslashes(p)),X&&U===!0&&(X=e.removeBackslashes(X)));const fe={prefix:d,input:y,start:q,base:X,glob:p,isBrace:le,isBracket:he,isGlob:W,isExtglob:Ee,isGlobstar:we,negated:me,negatedExtglob:Ie};if(f.tokens===!0&&(fe.maxDepth=0,M(O)||g.push(F),fe.tokens=g),f.parts===!0||f.tokens===!0){let D;for(let V=0;V<A.length;V++){const Se=D?D+1:q,pe=A[V],Re=y.slice(Se,pe);f.tokens&&(V===0&&q!==0?(g[V].isPrefix=!0,g[V].value=d):g[V].value=Re,N(g[V]),fe.maxDepth+=g[V].depth),(V!==0||Re!=="")&&x.push(Re),D=pe}if(D&&D+1<y.length){const V=y.slice(D+1);x.push(V),f.tokens&&(g[g.length-1].value=V,N(g[g.length-1]),fe.maxDepth+=g[g.length-1].depth)}fe.slashes=A,fe.parts=x}return fe},vt}var xt,hn;function vr(){if(hn)return xt;hn=1;const e=gt(),t=mt(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:o,REPLACEMENTS:a}=e,s=(y,v)=>{if(typeof v.expandRange=="function")return v.expandRange(...y,v);y.sort();const f=`[${y.join("-")}]`;try{new RegExp(f)}catch{return y.map(R=>t.escapeRegex(R)).join("..")}return f},l=(y,v)=>`Missing ${y}: "${v}" - use "\\\\${v}" to match literal characters`,u=y=>{const v=[];let f=0,I=0,R=0,A="",g=!1;for(const x of y){if(g===!0){A+=x,g=!1;continue}if(x==="\\"){A+=x,g=!0;continue}if(x==='"'){R=R===1?0:1,A+=x;continue}if(R===0){if(x==="[")f++;else if(x==="]"&&f>0)f--;else if(f===0){if(x==="(")I++;else if(x===")"&&I>0)I--;else if(x==="|"&&I===0){v.push(A),A="";continue}}}A+=x}return v.push(A),v},c=y=>{let v=!1;for(const f of y){if(v===!0){v=!1;continue}if(f==="\\"){v=!0;continue}if(/[?*+@!()[\]{}]/.test(f))return!1}return!0},E=y=>{let v=y.trim(),f=!0;for(;f===!0;)f=!1,/^@\([^\\()[\]{}|]+\)$/.test(v)&&(v=v.slice(2,-1),f=!0);if(c(v))return v.replace(/\\(.)/g,"$1")},m=y=>{const v=y.map(E).filter(Boolean);for(let f=0;f<v.length;f++)for(let I=f+1;I<v.length;I++){const R=v[f],A=v[I],g=R[0];if(!(!g||R!==g.repeat(R.length)||A!==g.repeat(A.length))&&(R===A||R.startsWith(A)||A.startsWith(R)))return!0}return!1},b=(y,v=!0)=>{if(y[0]!=="+"&&y[0]!=="*"||y[1]!=="(")return;let f=0,I=0,R=0,A=!1;for(let g=1;g<y.length;g++){const x=y[g];if(A===!0){A=!1;continue}if(x==="\\"){A=!0;continue}if(x==='"'){R=R===1?0:1;continue}if(R!==1){if(x==="["){f++;continue}if(x==="]"&&f>0){f--;continue}if(!(f>0)){if(x==="("){I++;continue}if(x===")"&&(I--,I===0))return v===!0&&g!==y.length-1?void 0:{type:y[0],body:y.slice(2,g),end:g}}}}},S=y=>`${y.length===1?t.escapeRegex(y[0]):`[${y.map(f=>t.escapeRegex(f)).join("")}]`}*`,w=y=>{let v=0;const f=[];for(;v<y.length;){const I=b(y.slice(v),!1);if(!I||I.type!=="*")return;const R=u(I.body).map(g=>g.trim());if(R.length!==1)return;const A=E(R[0]);if(!A||A.length!==1)return;f.push(A),v+=I.end+1}if(!(f.length<1))return f},M=y=>{let v=0,f=y.trim(),I=b(f);for(;I;)v++,f=I.body.trim(),I=b(f);return v},N=(y,v)=>{if(v.maxExtglobRecursion===!1)return{risky:!1};const f=typeof v.maxExtglobRecursion=="number"?v.maxExtglobRecursion:e.DEFAULT_MAX_EXTGLOB_RECURSION,I=u(y).map(x=>x.trim());if(I.length>1&&(I.some(x=>x==="")||I.some(x=>/^[*?]+$/.test(x))||m(I)))return{risky:!0};const R=[];let A=!1,g=!0;for(const x of I){const j=w(x);if(j){A=!0,R.push(...j);continue}const k=E(x);if(k&&k.length===1){R.push(k);continue}if(g=!1,M(x)>f)return{risky:!0}}return A?g?{risky:!0,safeOutput:S([...new Set(R)])}:{risky:!0}:{risky:!1}},$=(y,v)=>{if(typeof y!="string")throw new TypeError("Expected a string");y=a[y]||y;const f={...v},I=typeof f.maxLength=="number"?Math.min(n,f.maxLength):n;let R=y.length;if(R>I)throw new SyntaxError(`Input length: ${R}, exceeds maximum allowed length: ${I}`);const A={type:"bos",value:"",output:f.prepend||""},g=[A],x=f.capture?"":"?:",j=e.globChars(f.windows),k=e.extglobChars(j),{DOT_LITERAL:q,PLUS_LITERAL:ue,SLASH_LITERAL:le,ONE_CHAR:he,DOTS_SLASH:W,NO_DOT:Ee,NO_DOT_SLASH:we,NO_DOTS_SLASH:ge,QMARK:U,QMARK_NO_DOT:me,STAR:Ie,START_ANCHOR:ne}=j,J=T=>`(${x}(?:(?!${ne}${T.dot?W:q}).)*?)`,ce=f.dot?"":Ee,O=f.dot?U:me;let F=f.bash===!0?J(f):Ie;f.capture&&(F=`(${F})`),typeof f.noext=="boolean"&&(f.noextglob=f.noext);const h={input:y,index:-1,start:0,dot:f.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};y=t.removePrefix(y,h),R=y.length;const ae=[],z=[],X=[];let d=A,p;const fe=()=>h.index===R-1,D=h.peek=(T=1)=>y[h.index+T],V=h.advance=()=>y[++h.index]||"",Se=()=>y.slice(h.index+1),pe=(T="",Y=0)=>{h.consumed+=T,h.index+=Y},Re=T=>{h.output+=T.output!=null?T.output:T.value,pe(T.value)},Cr=()=>{let T=1;for(;D()==="!"&&(D(2)!=="("||D(3)==="?");)V(),h.start++,T++;return T%2===0?!1:(h.negated=!0,h.start++,!0)},rt=T=>{h[T]++,X.push(T)},ve=T=>{h[T]--,X.pop()},L=T=>{if(d.type==="globstar"){const Y=h.braces>0&&(T.type==="comma"||T.type==="brace"),C=T.extglob===!0||ae.length&&(T.type==="pipe"||T.type==="paren");T.type!=="slash"&&T.type!=="paren"&&!Y&&!C&&(h.output=h.output.slice(0,-d.output.length),d.type="star",d.value="*",d.output=F,h.output+=d.output)}if(ae.length&&T.type!=="paren"&&(ae[ae.length-1].inner+=T.value),(T.value||T.output)&&Re(T),d&&d.type==="text"&&T.type==="text"){d.output=(d.output||d.value)+T.value,d.value+=T.value;return}T.prev=d,g.push(T),d=T},it=(T,Y)=>{const C={...k[Y],conditions:1,inner:""};C.prev=d,C.parens=h.parens,C.output=h.output,C.startIndex=h.index,C.tokensIndex=g.length;const P=(f.capture?"(":"")+C.open;rt("parens"),L({type:T,value:Y,output:h.output?"":he}),L({type:"paren",extglob:!0,value:V(),output:P}),ae.push(C)},Tr=T=>{const Y=y.slice(T.startIndex,h.index+1),C=y.slice(T.startIndex+2,h.index),P=N(C,f);if((T.type==="plus"||T.type==="star")&&P.risky){const K=P.safeOutput?(T.output?"":he)+(f.capture?`(${P.safeOutput})`:P.safeOutput):void 0,Ae=g[T.tokensIndex];Ae.type="text",Ae.value=Y,Ae.output=K||t.escapeRegex(Y);for(let ye=T.tokensIndex+1;ye<g.length;ye++)g[ye].value="",g[ye].output="",delete g[ye].suffix;h.output=T.output+Ae.output,h.backtrack=!0,L({type:"paren",extglob:!0,value:p,output:""}),ve("parens");return}let G=T.close+(f.capture?")":""),Q;if(T.type==="negate"){let K=F;if(T.inner&&T.inner.length>1&&T.inner.includes("/")&&(K=J(f)),(K!==F||fe()||/^\)+$/.test(Se()))&&(G=T.close=`)$))${K}`),T.inner.includes("*")&&(Q=Se())&&/^\.[^\\/.]+$/.test(Q)){const Ae=$(Q,{...v,fastpaths:!1}).output;G=T.close=`)${Ae})${K})`}T.prev.type==="bos"&&(h.negatedExtglob=!0)}L({type:"paren",extglob:!0,value:p,output:G}),ve("parens")};if(f.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(y)){let T=!1,Y=y.replace(o,(C,P,G,Q,K,Ae)=>Q==="\\"?(T=!0,C):Q==="?"?P?P+Q+(K?U.repeat(K.length):""):Ae===0?O+(K?U.repeat(K.length):""):U.repeat(G.length):Q==="."?q.repeat(G.length):Q==="*"?P?P+Q+(K?F:""):F:P?C:`\\${C}`);return T===!0&&(f.unescape===!0?Y=Y.replace(/\\/g,""):Y=Y.replace(/\\+/g,C=>C.length%2===0?"\\\\":C?"\\":"")),Y===y&&f.contains===!0?(h.output=y,h):(h.output=t.wrapOutput(Y,h,v),h)}for(;!fe();){if(p=V(),p==="\0")continue;if(p==="\\"){const C=D();if(C==="/"&&f.bash!==!0||C==="."||C===";")continue;if(!C){p+="\\",L({type:"text",value:p});continue}const P=/^\\+/.exec(Se());let G=0;if(P&&P[0].length>2&&(G=P[0].length,h.index+=G,G%2!==0&&(p+="\\")),f.unescape===!0?p=V():p+=V(),h.brackets===0){L({type:"text",value:p});continue}}if(h.brackets>0&&(p!=="]"||d.value==="["||d.value==="[^")){if(f.posix!==!1&&p===":"){const C=d.value.slice(1);if(C.includes("[")&&(d.posix=!0,C.includes(":"))){const P=d.value.lastIndexOf("["),G=d.value.slice(0,P),Q=d.value.slice(P+2),K=r[Q];if(K){d.value=G+K,h.backtrack=!0,V(),!A.output&&g.indexOf(d)===1&&(A.output=he);continue}}}(p==="["&&D()!==":"||p==="-"&&D()==="]")&&(p=`\\${p}`),p==="]"&&(d.value==="["||d.value==="[^")&&(p=`\\${p}`),f.posix===!0&&p==="!"&&d.value==="["&&(p="^"),d.value+=p,Re({value:p});continue}if(h.quotes===1&&p!=='"'){p=t.escapeRegex(p),d.value+=p,Re({value:p});continue}if(p==='"'){h.quotes=h.quotes===1?0:1,f.keepQuotes===!0&&L({type:"text",value:p});continue}if(p==="("){rt("parens"),L({type:"paren",value:p});continue}if(p===")"){if(h.parens===0&&f.strictBrackets===!0)throw new SyntaxError(l("opening","("));const C=ae[ae.length-1];if(C&&h.parens===C.parens+1){Tr(ae.pop());continue}L({type:"paren",value:p,output:h.parens?")":"\\)"}),ve("parens");continue}if(p==="["){if(f.nobracket===!0||!Se().includes("]")){if(f.nobracket!==!0&&f.strictBrackets===!0)throw new SyntaxError(l("closing","]"));p=`\\${p}`}else rt("brackets");L({type:"bracket",value:p});continue}if(p==="]"){if(f.nobracket===!0||d&&d.type==="bracket"&&d.value.length===1){L({type:"text",value:p,output:`\\${p}`});continue}if(h.brackets===0){if(f.strictBrackets===!0)throw new SyntaxError(l("opening","["));L({type:"text",value:p,output:`\\${p}`});continue}ve("brackets");const C=d.value.slice(1);if(d.posix!==!0&&C[0]==="^"&&!C.includes("/")&&(p=`/${p}`),d.value+=p,Re({value:p}),f.literalBrackets===!1||t.hasRegexChars(C))continue;const P=t.escapeRegex(d.value);if(h.output=h.output.slice(0,-d.value.length),f.literalBrackets===!0){h.output+=P,d.value=P;continue}d.value=`(${x}${P}|${d.value})`,h.output+=d.value;continue}if(p==="{"&&f.nobrace!==!0){rt("braces");const C={type:"brace",value:p,output:"(",outputIndex:h.output.length,tokensIndex:h.tokens.length};z.push(C),L(C);continue}if(p==="}"){const C=z[z.length-1];if(f.nobrace===!0||!C){L({type:"text",value:p,output:p});continue}let P=")";if(C.dots===!0){const G=g.slice(),Q=[];for(let K=G.length-1;K>=0&&(g.pop(),G[K].type!=="brace");K--)G[K].type!=="dots"&&Q.unshift(G[K].value);P=s(Q,f),h.backtrack=!0}if(C.comma!==!0&&C.dots!==!0){const G=h.output.slice(0,C.outputIndex),Q=h.tokens.slice(C.tokensIndex);C.value=C.output="\\{",p=P="\\}",h.output=G;for(const K of Q)h.output+=K.output||K.value}L({type:"brace",value:p,output:P}),ve("braces"),z.pop();continue}if(p==="|"){ae.length>0&&ae[ae.length-1].conditions++,L({type:"text",value:p});continue}if(p===","){let C=p;const P=z[z.length-1];P&&X[X.length-1]==="braces"&&(P.comma=!0,C="|"),L({type:"comma",value:p,output:C});continue}if(p==="/"){if(d.type==="dot"&&h.index===h.start+1){h.start=h.index+1,h.consumed="",h.output="",g.pop(),d=A;continue}L({type:"slash",value:p,output:le});continue}if(p==="."){if(h.braces>0&&d.type==="dot"){d.value==="."&&(d.output=q);const C=z[z.length-1];d.type="dots",d.output+=p,d.value+=p,C.dots=!0;continue}if(h.braces+h.parens===0&&d.type!=="bos"&&d.type!=="slash"){L({type:"text",value:p,output:q});continue}L({type:"dot",value:p,output:q});continue}if(p==="?"){if(!(d&&d.value==="(")&&f.noextglob!==!0&&D()==="("&&D(2)!=="?"){it("qmark",p);continue}if(d&&d.type==="paren"){const P=D();let G=p;(d.value==="("&&!/[!=<:]/.test(P)||P==="<"&&!/<([!=]|\w+>)/.test(Se()))&&(G=`\\${p}`),L({type:"text",value:p,output:G});continue}if(f.dot!==!0&&(d.type==="slash"||d.type==="bos")){L({type:"qmark",value:p,output:me});continue}L({type:"qmark",value:p,output:U});continue}if(p==="!"){if(f.noextglob!==!0&&D()==="("&&(D(2)!=="?"||!/[!=<:]/.test(D(3)))){it("negate",p);continue}if(f.nonegate!==!0&&h.index===0){Cr();continue}}if(p==="+"){if(f.noextglob!==!0&&D()==="("&&D(2)!=="?"){it("plus",p);continue}if(d&&d.value==="("||f.regex===!1){L({type:"plus",value:p,output:ue});continue}if(d&&(d.type==="bracket"||d.type==="paren"||d.type==="brace")||h.parens>0){L({type:"plus",value:p});continue}L({type:"plus",value:ue});continue}if(p==="@"){if(f.noextglob!==!0&&D()==="("&&D(2)!=="?"){L({type:"at",extglob:!0,value:p,output:""});continue}L({type:"text",value:p});continue}if(p!=="*"){(p==="$"||p==="^")&&(p=`\\${p}`);const C=i.exec(Se());C&&(p+=C[0],h.index+=C[0].length),L({type:"text",value:p});continue}if(d&&(d.type==="globstar"||d.star===!0)){d.type="star",d.star=!0,d.value+=p,d.output=F,h.backtrack=!0,h.globstar=!0,pe(p);continue}let T=Se();if(f.noextglob!==!0&&/^\([^?]/.test(T)){it("star",p);continue}if(d.type==="star"){if(f.noglobstar===!0){pe(p);continue}const C=d.prev,P=C.prev,G=C.type==="slash"||C.type==="bos",Q=P&&(P.type==="star"||P.type==="globstar");if(f.bash===!0&&(!G||T[0]&&T[0]!=="/")){L({type:"star",value:p,output:""});continue}const K=h.braces>0&&(C.type==="comma"||C.type==="brace"),Ae=ae.length&&(C.type==="pipe"||C.type==="paren");if(!G&&C.type!=="paren"&&!K&&!Ae){L({type:"star",value:p,output:""});continue}for(;T.slice(0,3)==="/**";){const ye=y[h.index+4];if(ye&&ye!=="/")break;T=T.slice(3),pe("/**",3)}if(C.type==="bos"&&fe()){d.type="globstar",d.value+=p,d.output=J(f),h.output=d.output,h.globstar=!0,pe(p);continue}if(C.type==="slash"&&C.prev.type!=="bos"&&!Q&&fe()){h.output=h.output.slice(0,-(C.output+d.output).length),C.output=`(?:${C.output}`,d.type="globstar",d.output=J(f)+(f.strictSlashes?")":"|$)"),d.value+=p,h.globstar=!0,h.output+=C.output+d.output,pe(p);continue}if(C.type==="slash"&&C.prev.type!=="bos"&&T[0]==="/"){const ye=T[1]!==void 0?"|$":"";h.output=h.output.slice(0,-(C.output+d.output).length),C.output=`(?:${C.output}`,d.type="globstar",d.output=`${J(f)}${le}|${le}${ye})`,d.value+=p,h.output+=C.output+d.output,h.globstar=!0,pe(p+V()),L({type:"slash",value:"/",output:""});continue}if(C.type==="bos"&&T[0]==="/"){d.type="globstar",d.value+=p,d.output=`(?:^|${le}|${J(f)}${le})`,h.output=d.output,h.globstar=!0,pe(p+V()),L({type:"slash",value:"/",output:""});continue}h.output=h.output.slice(0,-d.output.length),d.type="globstar",d.output=J(f),d.value+=p,h.output+=d.output,h.globstar=!0,pe(p);continue}const Y={type:"star",value:p,output:F};if(f.bash===!0){Y.output=".*?",(d.type==="bos"||d.type==="slash")&&(Y.output=ce+Y.output),L(Y);continue}if(d&&(d.type==="bracket"||d.type==="paren")&&f.regex===!0){Y.output=p,L(Y);continue}(h.index===h.start||d.type==="slash"||d.type==="dot")&&(d.type==="dot"?(h.output+=we,d.output+=we):f.dot===!0?(h.output+=ge,d.output+=ge):(h.output+=ce,d.output+=ce),D()!=="*"&&(h.output+=he,d.output+=he)),L(Y)}for(;h.brackets>0;){if(f.strictBrackets===!0)throw new SyntaxError(l("closing","]"));h.output=t.escapeLast(h.output,"["),ve("brackets")}for(;h.parens>0;){if(f.strictBrackets===!0)throw new SyntaxError(l("closing",")"));h.output=t.escapeLast(h.output,"("),ve("parens")}for(;h.braces>0;){if(f.strictBrackets===!0)throw new SyntaxError(l("closing","}"));h.output=t.escapeLast(h.output,"{"),ve("braces")}if(f.strictSlashes!==!0&&(d.type==="star"||d.type==="bracket")&&L({type:"maybe_slash",value:"",output:`${le}?`}),h.backtrack===!0){h.output="";for(const T of h.tokens)h.output+=T.output!=null?T.output:T.value,T.suffix&&(h.output+=T.suffix)}return h};return $.fastpaths=(y,v)=>{const f={...v},I=typeof f.maxLength=="number"?Math.min(n,f.maxLength):n,R=y.length;if(R>I)throw new SyntaxError(`Input length: ${R}, exceeds maximum allowed length: ${I}`);y=a[y]||y;const{DOT_LITERAL:A,SLASH_LITERAL:g,ONE_CHAR:x,DOTS_SLASH:j,NO_DOT:k,NO_DOTS:q,NO_DOTS_SLASH:ue,STAR:le,START_ANCHOR:he}=e.globChars(f.windows),W=f.dot?q:k,Ee=f.dot?ue:k,we=f.capture?"":"?:",ge={negated:!1,prefix:""};let U=f.bash===!0?".*?":le;f.capture&&(U=`(${U})`);const me=ce=>ce.noglobstar===!0?U:`(${we}(?:(?!${he}${ce.dot?j:A}).)*?)`,Ie=ce=>{switch(ce){case"*":return`${W}${x}${U}`;case".*":return`${A}${x}${U}`;case"*.*":return`${W}${U}${A}${x}${U}`;case"*/*":return`${W}${U}${g}${x}${Ee}${U}`;case"**":return W+me(f);case"**/*":return`(?:${W}${me(f)}${g})?${Ee}${x}${U}`;case"**/*.*":return`(?:${W}${me(f)}${g})?${Ee}${U}${A}${x}${U}`;case"**/.*":return`(?:${W}${me(f)}${g})?${A}${x}${U}`;default:{const O=/^(.*?)\.(\w+)$/.exec(ce);if(!O)return;const F=Ie(O[1]);return F?F+A+O[2]:void 0}}},ne=t.removePrefix(y,ge);let J=Ie(ne);return J&&f.strictSlashes!==!0&&(J+=`${g}?`),J},xt=$,xt}var _t,gn;function xr(){if(gn)return _t;gn=1;const e=Rr(),t=vr(),n=mt(),r=gt(),i=a=>a&&typeof a=="object"&&!Array.isArray(a),o=(a,s,l=!1)=>{if(Array.isArray(a)){const M=a.map($=>o($,s,l));return $=>{for(const y of M){const v=y($);if(v)return v}return!1}}const u=i(a)&&a.tokens&&a.input;if(a===""||typeof a!="string"&&!u)throw new TypeError("Expected pattern to be a non-empty string");const c=s||{},E=c.windows,m=u?o.compileRe(a,s):o.makeRe(a,s,!1,!0),b=m.state;delete m.state;let S=()=>!1;if(c.ignore){const M={...s,ignore:null,onMatch:null,onResult:null};S=o(c.ignore,M,l)}const w=(M,N=!1)=>{const{isMatch:$,match:y,output:v}=o.test(M,m,s,{glob:a,posix:E}),f={glob:a,state:b,regex:m,posix:E,input:M,output:v,match:y,isMatch:$};return typeof c.onResult=="function"&&c.onResult(f),$===!1?(f.isMatch=!1,N?f:!1):S(M)?(typeof c.onIgnore=="function"&&c.onIgnore(f),f.isMatch=!1,N?f:!1):(typeof c.onMatch=="function"&&c.onMatch(f),N?f:!0)};return l&&(w.state=b),w};return o.test=(a,s,l,{glob:u,posix:c}={})=>{if(typeof a!="string")throw new TypeError("Expected input to be a string");if(a==="")return{isMatch:!1,output:""};const E=l||{},m=E.format||(c?n.toPosixSlashes:null);let b=a===u,S=b&&m?m(a):a;return b===!1&&(S=m?m(a):a,b=S===u),(b===!1||E.capture===!0)&&(E.matchBase===!0||E.basename===!0?b=o.matchBase(a,s,l,c):b=s.exec(S)),{isMatch:!!b,match:b,output:S}},o.matchBase=(a,s,l,u=l&&l.windows)=>(s instanceof RegExp?s:o.makeRe(s,l)).test(n.basename(a,{windows:u})),o.isMatch=(a,s,l)=>o(s,l)(a),o.parse=(a,s)=>Array.isArray(a)?a.map(l=>o.parse(l,s)):t(a,{...s,fastpaths:!1}),o.scan=(a,s)=>e(a,s),o.compileRe=(a,s,l=!1,u=!1)=>{if(l===!0)return a.output;const c=s||{},E=c.contains?"":"^",m=c.contains?"":"$";let b=`${E}(?:${a.output})${m}`;a&&a.negated===!0&&(b=`^(?!${b}).*$`);const S=o.toRegex(b,s);return u===!0&&(S.state=a),S},o.makeRe=(a,s={},l=!1,u=!1)=>{if(!a||typeof a!="string")throw new TypeError("Expected a non-empty string");let c={negated:!1,fastpaths:!0};return s.fastpaths!==!1&&(a[0]==="."||a[0]==="*")&&(c.output=t.fastpaths(a,s)),c.output||(c=t(a,s)),o.compileRe(c,s,l,u)},o.toRegex=(a,s)=>{try{const l=s||{};return new RegExp(a,l.flags||(l.nocase?"i":""))}catch(l){if(s&&s.debug===!0)throw l;return/$^/}},o.constants=r,_t=o,_t}var wt,mn;function _r(){if(mn)return wt;mn=1;const e=xr(),t=mt();function n(r,i,o=!1){return i&&(i.windows===null||i.windows===void 0)&&(i={...i,windows:t.isWindows()}),e(r,i,o)}return Object.assign(n,e),wt=n,wt}var wr=_r();const Ir=se.getDefaultExportFromCjs(wr),Mn=typeof window<"u"||typeof process>"u"||process?.platform==="browser",Bn=Mn?{}:process.env||{};async function Dn(e,t){const n={};for(const i of t.headers)Nr(e,i.matches)&&(n[i.name]=i.envVariable!==void 0?Bn[i.envVariable]||"":i.value);const r=await(t.customFetch||fetch)(e,{headers:n});if(!r.ok)throw new Error(`Failed to load ${e}: ${r.status} ${r.statusText}`);return{body:await r.text(),mimeType:r.headers.get("content-type")}}function Nr(e,t){return t.match(/^https?:\/\//)||(e=e.replace(/^https?:\/\//,"")),Ir.isMatch(e,t)}function Or(e,t={}){return{name:`${e}List`,properties:{},items:e,...t}}function $r(e,t={}){return{name:`${e}Map`,properties:{},additionalProperties:()=>e,...t}}const je={name:"SpecExtension",properties:{},additionalProperties:{resolvable:!0}};function kr(e,t={}){const n={};for(const o of Object.keys(e))n[o]={...e[o],name:o};for(const o of Object.values(n))r(o);return n.SpecExtension=je,n;function r(o){if(o.additionalProperties&&(o.additionalProperties=i(o.additionalProperties)),o.items&&(o.items=i(o.items)),o.properties){const a={};for(const[s,l]of Object.entries(o.properties))a[s]=i(l),t.doNotResolveExamples&&l&&l.isExample&&(a[s]={...l,resolvable:!1});o.properties=a}}function i(o){if(typeof o=="string"){if(!n[o])throw new Error(`Unknown type name found: ${o}`);return n[o]}else return typeof o=="function"?(a,s)=>i(o(a,s)):We(o)?(o={...o},r(o),o):o?.directResolveAs!==void 0?{...o,directResolveAs:i(o.directResolveAs)??void 0}:o}}function We(e){return typeof e?.name=="string"}function be(e,t){return e===""&&(e="#/"),e[e.length-1]==="/"?e+t:e+"/"+t}function Ve(e){return se.isPlainObject(e)&&typeof e.$ref=="string"}function Un(e){return Ve(e)&&Object.keys(e).length>1}function Kn(e){return se.isPlainObject(e)&&typeof e.externalValue=="string"}class Qe{source;pointer;constructor(t,n){this.source=t,this.pointer=n}child(t){return new Qe(this.source,be(this.pointer,(Array.isArray(t)?t:[t]).map(Oe).join("/")))}key(){return Object.assign(Object.create(Qe.prototype),this,{reportOnKey:!0})}get absolutePointer(){return this.source.absoluteRef+(this.pointer==="#/"?"":this.pointer)}}function qn(e){const t=e.indexOf("~")===-1?e:e.replaceAll("~1","/").replaceAll("~0","~");try{return decodeURIComponent(t)}catch{return t}}function Oe(e){return typeof e=="number"||e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replaceAll("~","~0").replaceAll("/","~1")}function Gn(e){const[t,n=""]=e.split("#/");return{uri:(t.endsWith("#")?t.slice(0,-1):t)||null,pointer:Yn(n)}}function Yn(e){return e.split("/").map(qn).filter(Hn)}function Lr(e){const t=e.split("/");return t[t.length-1]}function Pr(e){const t=e.split(/[\/\\]/);return t[t.length-1].replace(/\.[^.]+$/,"")}function xe(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://")||e.startsWith("data:")}function Fr(e){return se.pathBrowserifyExports.extname(e)?xe(e)?e.substring(0,e.lastIndexOf("/")):se.pathBrowserifyExports.dirname(e):e}function Hr(e,t){return xe(e)?new URL(t,e.endsWith("/")?e:`${e}/`).href:se.pathBrowserifyExports.resolve(e,t)}function Mr(e){return typeof e=="string"&&(e.startsWith("#")||xe(e)||e.startsWith("./")||e.startsWith("../")||e.indexOf("/")>-1||/\.(ya?ml|json)$/i.test(e))}function Br(e){return/^#[A-Za-z][A-Za-z0-9\-_:.]*$/.test(e)}function Dr(e,t,n){if(!se.isPlainObject(t.node)&&n.parent){n.parent[n.key]=t.node;return}delete e.$ref,se.isPlainObject(t.node)&&Object.assign(e,{...t.node,...e})}var H=Symbol("NOT_RESOLVED"),Qt=Symbol("MERGE_KEY");function ee(e,t){return{tagName:e,nodeKind:"scalar",implicit:t.implicit??!1,matchByTagPrefix:t.matchByTagPrefix??!1,implicitFirstChars:t.implicitFirstChars??null,resolve:t.resolve,identify:t.identify??null,represent:t.represent??(n=>String(n)),representTagName:t.representTagName??null}}function Zt(e,t){const n=t.finalize===void 0;return{tagName:e,nodeKind:"sequence",implicit:!1,matchByTagPrefix:t.matchByTagPrefix??!1,create:t.create,addItem:t.addItem,finalize:t.finalize??(r=>r),carrierIsResult:n,identify:t.identify??null,represent:t.represent??(r=>r),representTagName:t.representTagName??null}}function At(e,t){const n=t.finalize===void 0;return{tagName:e,nodeKind:"mapping",implicit:!1,matchByTagPrefix:t.matchByTagPrefix??!1,create:t.create,addPair:t.addPair,has:t.has,keys:t.keys,get:t.get,finalize:t.finalize??(r=>r),carrierIsResult:n,identify:t.identify??null,represent:t.represent??(r=>r),representTagName:t.representTagName??null}}var Ur=ee("tag:yaml.org,2002:str",{resolve:e=>e,identify:e=>typeof e=="string"}),Kr=["","~","null","Null","NULL"],qr=ee("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:e=>Kr.indexOf(e)!==-1?null:H,identify:e=>e===null,represent:()=>"null"}),Gr=ee("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["n"],resolve:(e,t)=>e==="null"||t&&e===""?null:H,identify:e=>e===null,represent:()=>"null"}),Yr=["","~","null","Null","NULL"],jr=ee("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:e=>Yr.indexOf(e)!==-1?null:H,identify:e=>e===null,represent:()=>"null"}),Wr=["true","True","TRUE"],Vr=["false","False","FALSE"],Xr=ee("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","T","f","F"],resolve:e=>Wr.indexOf(e)!==-1?!0:Vr.indexOf(e)!==-1?!1:H,identify:e=>Object.prototype.toString.call(e)==="[object Boolean]",represent:e=>e?"true":"false"}),zr=["true"],Qr=["false"],Zr=ee("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","f"],resolve:e=>zr.indexOf(e)!==-1?!0:Qr.indexOf(e)!==-1?!1:H,identify:e=>Object.prototype.toString.call(e)==="[object Boolean]",represent:e=>e?"true":"false"}),Jr=["true","True","TRUE","y","Y","yes","Yes","YES","on","On","ON"],ei=["false","False","FALSE","n","N","no","No","NO","off","Off","OFF"],ti=ee("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["y","Y","n","N","t","T","f","F","o","O"],resolve:e=>Jr.indexOf(e)!==-1?!0:ei.indexOf(e)!==-1?!1:H,identify:e=>Object.prototype.toString.call(e)==="[object Boolean]",represent:e=>e?"true":"false"}),ni=new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"),ri=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function ii(e){let t=e,n=1;return(t[0]==="-"||t[0]==="+")&&(t[0]==="-"&&(n=-1),t=t.slice(1)),t.startsWith("0b")?n*parseInt(t.slice(2),2):t.startsWith("0o")?n*parseInt(t.slice(2),8):t.startsWith("0x")?n*parseInt(t.slice(2),16):n*parseInt(t,10)}function oi(e,t){if(t){if(!ri.test(e))return H}else if(!ni.test(e))return H;const n=ii(e);return Number.isFinite(n)?n:H}var jn=ee("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:oi,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:e=>e.toString(10)}),ai=new RegExp("^-?(?:0|[1-9][0-9]*)$"),si=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function li(e){let t=e,n=1;return(t[0]==="-"||t[0]==="+")&&(t[0]==="-"&&(n=-1),t=t.slice(1)),t.startsWith("0b")?n*parseInt(t.slice(2),2):t.startsWith("0o")?n*parseInt(t.slice(2),8):t.startsWith("0x")?n*parseInt(t.slice(2),16):n*parseInt(t,10)}function ci(e,t){if(t){if(!si.test(e))return H}else if(!ai.test(e))return H;const n=li(e);return Number.isFinite(n)?n:H}var ui=ee("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:ci,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:e=>e.toString(10)}),fi=new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");function pi(e){let t=e.replace(/_/g,""),n=1;if((t[0]==="-"||t[0]==="+")&&(t[0]==="-"&&(n=-1),t=t.slice(1)),t.startsWith("0b"))return n*parseInt(t.slice(2),2);if(t.startsWith("0x"))return n*parseInt(t.slice(2),16);if(t.includes(":")){let r=0;for(const i of t.split(":"))r=r*60+Number(i);return n*r}return t!=="0"&&t[0]==="0"?n*parseInt(t,8):n*parseInt(t,10)}function di(e){if(!fi.test(e))return H;const t=pi(e);return Number.isFinite(t)?t:H}var Pt=ee("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:di,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:e=>e.toString(10)}),hi=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),gi=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function mi(e){if(!hi.test(e))return H;let t=e.toLowerCase();const n=t[0]==="-"?-1:1;if("+-".includes(t[0])&&(t=t.slice(1)),t===".inf")return n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(t===".nan")return NaN;const r=n*parseFloat(t);return Number.isFinite(r)||gi.test(e)?r:H}function Ai(e){if(isNaN(e))return".nan";if(e===Number.POSITIVE_INFINITY)return".inf";if(e===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(e,-0))return"-0.0";const t=e.toString(10);return/^[-+]?[0-9]+e/.test(t)?t.replace("e",".e"):t}var Wn=ee("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:mi,identify:e=>typeof e=="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:Ai}),yi=new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"),Ei=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Si(e,t){if(t){if(!Ei.test(e))return H;let r=e.toLowerCase();const i=r[0]==="-"?-1:1;if("+-".includes(r[0])&&(r=r.slice(1)),r===".inf")return i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(r===".nan")return NaN;const o=i*parseFloat(r);return Number.isFinite(o)?o:H}if(!yi.test(e))return H;const n=Number(e);return Number.isFinite(n)?n:H}function bi(e){if(isNaN(e))return".nan";if(e===Number.POSITIVE_INFINITY)return".inf";if(e===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(e,-0))return"-0.0";const t=e.toString(10);return/^[-+]?[0-9]+e/.test(t)?t.replace("e",".e"):t}var Ci=ee("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:Si,identify:e=>typeof e=="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:bi}),Ti=new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Ri=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function vi(e){if(!Ti.test(e))return H;let t=e.toLowerCase().replace(/_/g,"");const n=t[0]==="-"?-1:1;if("+-".includes(t[0])&&(t=t.slice(1)),t===".inf")return n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(t===".nan")return NaN;let r=0;if(t.includes(":")){for(const i of t.split(":"))r=r*60+Number(i);r*=n}else r=n*parseFloat(t);return Number.isFinite(r)||Ri.test(e)?r:H}function xi(e){if(isNaN(e))return".nan";if(e===Number.POSITIVE_INFINITY)return".inf";if(e===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(e,-0))return"-0.0";const t=e.toString(10);return/^[-+]?[0-9]+e/.test(t)?t.replace("e",".e"):t}var Ft=ee("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:vi,identify:e=>typeof e=="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:xi}),Vn=ee("tag:yaml.org,2002:merge",{implicit:!0,implicitFirstChars:["<"],resolve:(e,t)=>e==="<<"||t&&e===""?Qt:H}),_i=/^[A-Za-z0-9+/]*={0,2}$/;function wi(e){const t=e.replace(/\s/g,"");if(t.length%4!==0||!_i.test(t))return H;const n=atob(t),r=new Uint8Array(n.length);for(let i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return r}function Ii(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}var Xn=ee("tag:yaml.org,2002:binary",{resolve:wi,identify:e=>Object.prototype.toString.call(e)==="[object Uint8Array]",represent:Ii}),Ni=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Oi=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function An(e,t,n,r=0,i=0,o=0,a=0){const s=new Date(Date.UTC(e,t,n,r,i,o,a));return s.setUTCFullYear(e,t,n),s}function $i(e){let t=Ni.exec(e);if(t===null&&(t=Oi.exec(e)),t===null)return H;const n=+t[1],r=+t[2]-1,i=+t[3];if(!t[4]){const c=An(n,r,i);return c.getUTCFullYear()!==n||c.getUTCMonth()!==r||c.getUTCDate()!==i?H:c}const o=+t[4],a=+t[5],s=+t[6];let l=0;if(o>23||a>59||s>59)return H;if(t[7]){let c=t[7].slice(0,3);for(;c.length<3;)c+="0";l=+c}const u=An(n,r,i,o,a,s,l);if(u.getUTCFullYear()!==n||u.getUTCMonth()!==r||u.getUTCDate()!==i)return H;if(t[9]){const c=+t[10],E=+(t[11]||0);if(c>23||E>59)return H;const m=(c*60+E)*6e4;u.setTime(u.getTime()-(t[9]==="-"?-m:m))}return u}var ki=ee("tag:yaml.org,2002:timestamp",{implicit:!0,implicitFirstChars:[..."0123456789"],resolve:$i,identify:e=>e instanceof Date,represent:e=>e.toISOString()}),Li=Zt("tag:yaml.org,2002:seq",{create:()=>[],addItem:(e,t)=>{e.push(t)},identify:Array.isArray});function yt(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Ht(e,t){const n={};for(const r of t)e[r]!==void 0&&(n[r]=e[r]);return n}var zn=Zt("tag:yaml.org,2002:omap",{create:()=>({list:[],seen:new Set}),addItem:(e,t)=>{let n;if(t instanceof Map){if(t.size!==1)return"cannot resolve an ordered map item";n=t.keys().next().value}else if(yt(t)){const r=Object.keys(t);if(r.length!==1)return"cannot resolve an ordered map item";n=r[0]}else return"cannot resolve an ordered map item";return e.seen.has(n)?"duplicate key in ordered map":(e.seen.add(n),e.list.push(t),"")},finalize:e=>e.list}),Qn=Zt("tag:yaml.org,2002:pairs",{create:()=>[],addItem:(e,t)=>{if(t instanceof Map)return t.size!==1?"cannot resolve a pairs item":(e.push(t.entries().next().value),"");if(Object.prototype.toString.call(t)!=="[object Object]")return"cannot resolve a pairs item";const n=t,r=Object.keys(n);return r.length!==1?"cannot resolve a pairs item":(e.push([r[0],n[r[0]]]),"")}}),Pi=At("tag:yaml.org,2002:map",{create:()=>({}),identify:yt,represent:e=>{const t=new Map;for(const n of Object.keys(e))t.set(n,e[n]);return t},addPair:(e,t,n)=>{if(t!==null&&typeof t=="object")return"object-based map does not support complex keys";const r=String(t);return r==="__proto__"?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,""},has:(e,t)=>t!==null&&typeof t=="object"?!1:Object.prototype.hasOwnProperty.call(e,String(t)),keys:e=>Object.keys(e),get:(e,t)=>{const n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?e[n]:null}}),Zn=At("tag:yaml.org,2002:set",{create:()=>new Set,identify:e=>e instanceof Set,represent:e=>{const t=new Map;for(const n of e)t.set(n,null);return t},addPair:(e,t,n)=>n!==null?"cannot resolve a set item":(e.add(t),""),has:(e,t)=>e.has(t),keys:e=>e.keys(),get:()=>null});function Fi(){return{scalar:Object.create(null),sequence:Object.create(null),mapping:Object.create(null)}}function Hi(){return{scalar:[],sequence:[],mapping:[]}}function Mi(e){const t=[];for(const n of e){let r=t.length;for(let i=0;i<t.length;i++){const o=t[i];if(o.nodeKind===n.nodeKind&&o.tagName===n.tagName&&o.matchByTagPrefix===n.matchByTagPrefix){r=i;break}}t[r]=n}return t}var Et=class Jn{tags;implicitScalarTags;implicitScalarByFirstChar;implicitScalarAnyFirstChar;defaultScalarTag;defaultSequenceTag;defaultMappingTag;exact;prefix;constructor(t){const n=Mi(t),r=[],i=Fi(),o=Hi();for(const c of n){if(c.nodeKind==="scalar"&&c.implicit){if(c.matchByTagPrefix)throw new Error("Implicit scalar tags cannot match by tag prefix");r.push(c)}switch(c.nodeKind){case"scalar":c.matchByTagPrefix?o.scalar.push(c):i.scalar[c.tagName]=c;break;case"sequence":c.matchByTagPrefix?o.sequence.push(c):i.sequence[c.tagName]=c;break;case"mapping":c.matchByTagPrefix?o.mapping.push(c):i.mapping[c.tagName]=c;break}}const a=r.filter(c=>c.implicitFirstChars===null),s=new Set;for(const c of r)if(c.implicitFirstChars!==null)for(const E of c.implicitFirstChars)s.add(E);const l=new Map;for(const c of s)l.set(c,r.filter(E=>E.implicitFirstChars===null||E.implicitFirstChars.indexOf(c)!==-1));const u=i.scalar["tag:yaml.org,2002:str"];if(!u)throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");this.tags=n,this.implicitScalarTags=r,this.implicitScalarByFirstChar=l,this.implicitScalarAnyFirstChar=a,this.defaultScalarTag=u,this.defaultSequenceTag=i.sequence["tag:yaml.org,2002:seq"],this.defaultMappingTag=i.mapping["tag:yaml.org,2002:map"],this.exact=i,this.prefix=o}withTags(...t){let n=[];for(const r of t)n=n.concat(r);return new Jn([...this.tags,...n])}},Jt=new Et([Ur,Li,Pi]);new Et([...Jt.tags,Gr,Zr,ui,Ci]);var er=new Et([...Jt.tags,qr,Xr,jn,Wn]),Bi=new Et([...Jt.tags,jr,ti,Pt,Ft,ki,Vn,Xn,zn,Qn,Zn]);At("tag:yaml.org,2002:map",{create:()=>new Map,addPair:(e,t,n)=>(e.set(t,n),""),has:(e,t)=>e.has(t),keys:e=>e.keys(),get:(e,t)=>e.get(t),identify:e=>e instanceof Map||yt(e),represent:e=>{if(e instanceof Map)return e;const t=new Map,n=e;for(const r of Object.keys(n))t.set(r,n[r]);return t}});function yn(e){if(Array.isArray(e)){const t=Array.prototype.slice.call(e);for(let n=0;n<t.length;n++){if(Array.isArray(t[n]))return null;typeof t[n]=="object"&&Object.prototype.toString.call(t[n])==="[object Object]"&&(t[n]="[object Object]")}return String(t)}return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"?"[object Object]":String(e)}At("tag:yaml.org,2002:map",{create:()=>({}),identify:yt,represent:e=>{const t=new Map;for(const n of Object.keys(e))t.set(n,e[n]);return t},addPair:(e,t,n)=>{const r=yn(t);return r===null?"nested arrays are not supported inside keys":(r==="__proto__"?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,"")},has:(e,t)=>{const n=yn(t);return n!==null&&Object.prototype.hasOwnProperty.call(e,n)},keys:e=>Object.keys(e),get:(e,t)=>{const n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?e[n]:null}});var Di={maxLength:79,indent:1,linesBefore:3,linesAfter:2};function It(e,t,n,r,i){let o="",a="";const s=Math.floor(i/2)-1;return r-t>s&&(o=" ... ",t=r-s+o.length),n-r>s&&(a=" ...",n=r+s-a.length),{str:o+e.slice(t,n).replace(/\t/g,"→")+a,pos:r-t+o.length}}function Nt(e,t){return" ".repeat(Math.max(t-e.length,0))+e}function Ui(e,t){if(!e.buffer)return null;const n={...Di,...t},r=/\r?\n|\r|\0/g,i=[0],o=[];let a,s=-1;for(;a=r.exec(e.buffer);)o.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);let l="";const u=Math.min(e.line+n.linesAfter,o.length).toString().length,c=n.maxLength-(n.indent+u+3);for(let m=1;m<=n.linesBefore&&!(s-m<0);m++){const b=It(e.buffer,i[s-m],o[s-m],e.position-(i[s]-i[s-m]),c);l=`${" ".repeat(n.indent)}${Nt((e.line-m+1).toString(),u)} | ${b.str}
|
|
1
|
+
"use strict";const se=require("./replay-index-Dlmw0x6l.js");function Hn(e){return!!e}var Tt={},Rt,fn;function gt(){if(fn)return Rt;fn=1;const e="\\\\/",t=`[^${e}]`,n=0,r="\\.",i="\\+",o="\\?",a="\\/",s="(?=.)",l="[^/]",u=`(?:${a}|$)`,c=`(?:^|${a})`,E=`${r}{1,2}${u}`,m=`(?!${r})`,b=`(?!${c}${E})`,S=`(?!${r}{0,1}${u})`,w=`(?!${E})`,M=`[^.${a}]`,N=`${l}*?`,y={DOT_LITERAL:r,PLUS_LITERAL:i,QMARK_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:s,QMARK:l,END_ANCHOR:u,DOTS_SLASH:E,NO_DOT:m,NO_DOTS:b,NO_DOT_SLASH:S,NO_DOTS_SLASH:w,QMARK_NO_DOT:M,STAR:N,START_ANCHOR:c,SEP:"/"},v={...y,SLASH_LITERAL:`[${e}]`,QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${r}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${r})`,NO_DOTS:`(?!(?:^|[${e}])${r}{1,2}(?:[${e}]|$))`,NO_DOT_SLASH:`(?!${r}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${r}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`,SEP:"\\"},f={__proto__:null,alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return Rt={DEFAULT_MAX_EXTGLOB_RECURSION:n,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:f,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(I){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${I.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(I){return I===!0?v:y}},Rt}var pn;function mt(){return pn||(pn=1,(function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=gt();e.isObject=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),e.hasRegexChars=o=>r.test(o),e.isRegexChar=o=>o.length===1&&e.hasRegexChars(o),e.escapeRegex=o=>o.replace(i,"\\$1"),e.toPosixSlashes=o=>o.replace(t,"/"),e.isWindows=()=>{if(typeof navigator<"u"&&navigator.platform){const o=navigator.platform.toLowerCase();return o==="win32"||o==="windows"}return typeof process<"u"&&process.platform?process.platform==="win32":!1},e.removeBackslashes=o=>o.replace(n,a=>a==="\\"?"":a),e.escapeLast=(o,a,s)=>{const l=o.lastIndexOf(a,s);return l===-1?o:o[l-1]==="\\"?e.escapeLast(o,a,l-1):`${o.slice(0,l)}\\${o.slice(l)}`},e.removePrefix=(o,a={})=>{let s=o;return s.startsWith("./")&&(s=s.slice(2),a.prefix="./"),s},e.wrapOutput=(o,a={},s={})=>{const l=s.contains?"":"^",u=s.contains?"":"$";let c=`${l}(?:${o})${u}`;return a.negated===!0&&(c=`(?:^(?!${c}).*$)`),c},e.basename=(o,{windows:a}={})=>{const s=o.split(a?/[\\/]/:"/"),l=s[s.length-1];return l===""?s[s.length-2]:l}})(Tt)),Tt}var vt,dn;function Rr(){if(dn)return vt;dn=1;const e=mt(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:r,CHAR_COMMA:i,CHAR_DOT:o,CHAR_EXCLAMATION_MARK:a,CHAR_FORWARD_SLASH:s,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:u,CHAR_LEFT_SQUARE_BRACKET:c,CHAR_PLUS:E,CHAR_QUESTION_MARK:m,CHAR_RIGHT_CURLY_BRACE:b,CHAR_RIGHT_PARENTHESES:S,CHAR_RIGHT_SQUARE_BRACKET:w}=gt(),M=y=>y===s||y===r,N=y=>{y.isPrefix!==!0&&(y.depth=y.isGlobstar?1/0:1)};return vt=(y,v)=>{const f=v||{},I=y.length-1,R=f.parts===!0||f.scanToEnd===!0,A=[],g=[],x=[];let j=y,k=-1,q=0,ue=0,le=!1,he=!1,W=!1,Ee=!1,we=!1,ge=!1,U=!1,me=!1,Ie=!1,ne=!1,J=0,ce,O,F={value:"",depth:0,isGlob:!1};const h=()=>k>=I,ae=()=>j.charCodeAt(k+1),z=()=>(ce=O,j.charCodeAt(++k));for(;k<I;){O=z();let D;if(O===r){U=F.backslashes=!0,O=z(),O===l&&(ge=!0);continue}if(ge===!0||O===l){for(J++;h()!==!0&&(O=z());){if(O===r){U=F.backslashes=!0,z();continue}if(O===l){J++;continue}if(ge!==!0&&O===o&&(O=z())===o){if(le=F.isBrace=!0,W=F.isGlob=!0,ne=!0,R===!0)continue;break}if(ge!==!0&&O===i){if(le=F.isBrace=!0,W=F.isGlob=!0,ne=!0,R===!0)continue;break}if(O===b&&(J--,J===0)){ge=!1,le=F.isBrace=!0,ne=!0;break}}if(R===!0)continue;break}if(O===s){if(A.push(k),g.push(F),F={value:"",depth:0,isGlob:!1},ne===!0)continue;if(ce===o&&k===q+1){q+=2;continue}ue=k+1;continue}if(f.noext!==!0&&(O===E||O===n||O===t||O===m||O===a)===!0&&ae()===u){if(W=F.isGlob=!0,Ee=F.isExtglob=!0,ne=!0,O===a&&k===q&&(Ie=!0),R===!0){for(;h()!==!0&&(O=z());){if(O===r){U=F.backslashes=!0,O=z();continue}if(O===S){W=F.isGlob=!0,ne=!0;break}}continue}break}if(O===t){if(ce===t&&(we=F.isGlobstar=!0),W=F.isGlob=!0,ne=!0,R===!0)continue;break}if(O===m){if(W=F.isGlob=!0,ne=!0,R===!0)continue;break}if(O===c){for(;h()!==!0&&(D=z());){if(D===r){U=F.backslashes=!0,z();continue}if(D===w){he=F.isBracket=!0,W=F.isGlob=!0,ne=!0;break}}if(R===!0)continue;break}if(f.nonegate!==!0&&O===a&&k===q){me=F.negated=!0,q++;continue}if(f.noparen!==!0&&O===u){if(W=F.isGlob=!0,R===!0){for(;h()!==!0&&(O=z());){if(O===u){U=F.backslashes=!0,O=z();continue}if(O===S){ne=!0;break}}continue}break}if(W===!0){if(ne=!0,R===!0)continue;break}}f.noext===!0&&(Ee=!1,W=!1);let X=j,d="",p="";q>0&&(d=j.slice(0,q),j=j.slice(q),ue-=q),X&&W===!0&&ue>0?(X=j.slice(0,ue),p=j.slice(ue)):W===!0?(X="",p=j):X=j,X&&X!==""&&X!=="/"&&X!==j&&M(X.charCodeAt(X.length-1))&&(X=X.slice(0,-1)),f.unescape===!0&&(p&&(p=e.removeBackslashes(p)),X&&U===!0&&(X=e.removeBackslashes(X)));const fe={prefix:d,input:y,start:q,base:X,glob:p,isBrace:le,isBracket:he,isGlob:W,isExtglob:Ee,isGlobstar:we,negated:me,negatedExtglob:Ie};if(f.tokens===!0&&(fe.maxDepth=0,M(O)||g.push(F),fe.tokens=g),f.parts===!0||f.tokens===!0){let D;for(let V=0;V<A.length;V++){const Se=D?D+1:q,pe=A[V],Re=y.slice(Se,pe);f.tokens&&(V===0&&q!==0?(g[V].isPrefix=!0,g[V].value=d):g[V].value=Re,N(g[V]),fe.maxDepth+=g[V].depth),(V!==0||Re!=="")&&x.push(Re),D=pe}if(D&&D+1<y.length){const V=y.slice(D+1);x.push(V),f.tokens&&(g[g.length-1].value=V,N(g[g.length-1]),fe.maxDepth+=g[g.length-1].depth)}fe.slashes=A,fe.parts=x}return fe},vt}var xt,hn;function vr(){if(hn)return xt;hn=1;const e=gt(),t=mt(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:o,REPLACEMENTS:a}=e,s=(y,v)=>{if(typeof v.expandRange=="function")return v.expandRange(...y,v);y.sort();const f=`[${y.join("-")}]`;try{new RegExp(f)}catch{return y.map(R=>t.escapeRegex(R)).join("..")}return f},l=(y,v)=>`Missing ${y}: "${v}" - use "\\\\${v}" to match literal characters`,u=y=>{const v=[];let f=0,I=0,R=0,A="",g=!1;for(const x of y){if(g===!0){A+=x,g=!1;continue}if(x==="\\"){A+=x,g=!0;continue}if(x==='"'){R=R===1?0:1,A+=x;continue}if(R===0){if(x==="[")f++;else if(x==="]"&&f>0)f--;else if(f===0){if(x==="(")I++;else if(x===")"&&I>0)I--;else if(x==="|"&&I===0){v.push(A),A="";continue}}}A+=x}return v.push(A),v},c=y=>{let v=!1;for(const f of y){if(v===!0){v=!1;continue}if(f==="\\"){v=!0;continue}if(/[?*+@!()[\]{}]/.test(f))return!1}return!0},E=y=>{let v=y.trim(),f=!0;for(;f===!0;)f=!1,/^@\([^\\()[\]{}|]+\)$/.test(v)&&(v=v.slice(2,-1),f=!0);if(c(v))return v.replace(/\\(.)/g,"$1")},m=y=>{const v=y.map(E).filter(Boolean);for(let f=0;f<v.length;f++)for(let I=f+1;I<v.length;I++){const R=v[f],A=v[I],g=R[0];if(!(!g||R!==g.repeat(R.length)||A!==g.repeat(A.length))&&(R===A||R.startsWith(A)||A.startsWith(R)))return!0}return!1},b=(y,v=!0)=>{if(y[0]!=="+"&&y[0]!=="*"||y[1]!=="(")return;let f=0,I=0,R=0,A=!1;for(let g=1;g<y.length;g++){const x=y[g];if(A===!0){A=!1;continue}if(x==="\\"){A=!0;continue}if(x==='"'){R=R===1?0:1;continue}if(R!==1){if(x==="["){f++;continue}if(x==="]"&&f>0){f--;continue}if(!(f>0)){if(x==="("){I++;continue}if(x===")"&&(I--,I===0))return v===!0&&g!==y.length-1?void 0:{type:y[0],body:y.slice(2,g),end:g}}}}},S=y=>`${y.length===1?t.escapeRegex(y[0]):`[${y.map(f=>t.escapeRegex(f)).join("")}]`}*`,w=y=>{let v=0;const f=[];for(;v<y.length;){const I=b(y.slice(v),!1);if(!I||I.type!=="*")return;const R=u(I.body).map(g=>g.trim());if(R.length!==1)return;const A=E(R[0]);if(!A||A.length!==1)return;f.push(A),v+=I.end+1}if(!(f.length<1))return f},M=y=>{let v=0,f=y.trim(),I=b(f);for(;I;)v++,f=I.body.trim(),I=b(f);return v},N=(y,v)=>{if(v.maxExtglobRecursion===!1)return{risky:!1};const f=typeof v.maxExtglobRecursion=="number"?v.maxExtglobRecursion:e.DEFAULT_MAX_EXTGLOB_RECURSION,I=u(y).map(x=>x.trim());if(I.length>1&&(I.some(x=>x==="")||I.some(x=>/^[*?]+$/.test(x))||m(I)))return{risky:!0};const R=[];let A=!1,g=!0;for(const x of I){const j=w(x);if(j){A=!0,R.push(...j);continue}const k=E(x);if(k&&k.length===1){R.push(k);continue}if(g=!1,M(x)>f)return{risky:!0}}return A?g?{risky:!0,safeOutput:S([...new Set(R)])}:{risky:!0}:{risky:!1}},$=(y,v)=>{if(typeof y!="string")throw new TypeError("Expected a string");y=a[y]||y;const f={...v},I=typeof f.maxLength=="number"?Math.min(n,f.maxLength):n;let R=y.length;if(R>I)throw new SyntaxError(`Input length: ${R}, exceeds maximum allowed length: ${I}`);const A={type:"bos",value:"",output:f.prepend||""},g=[A],x=f.capture?"":"?:",j=e.globChars(f.windows),k=e.extglobChars(j),{DOT_LITERAL:q,PLUS_LITERAL:ue,SLASH_LITERAL:le,ONE_CHAR:he,DOTS_SLASH:W,NO_DOT:Ee,NO_DOT_SLASH:we,NO_DOTS_SLASH:ge,QMARK:U,QMARK_NO_DOT:me,STAR:Ie,START_ANCHOR:ne}=j,J=T=>`(${x}(?:(?!${ne}${T.dot?W:q}).)*?)`,ce=f.dot?"":Ee,O=f.dot?U:me;let F=f.bash===!0?J(f):Ie;f.capture&&(F=`(${F})`),typeof f.noext=="boolean"&&(f.noextglob=f.noext);const h={input:y,index:-1,start:0,dot:f.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:g};y=t.removePrefix(y,h),R=y.length;const ae=[],z=[],X=[];let d=A,p;const fe=()=>h.index===R-1,D=h.peek=(T=1)=>y[h.index+T],V=h.advance=()=>y[++h.index]||"",Se=()=>y.slice(h.index+1),pe=(T="",Y=0)=>{h.consumed+=T,h.index+=Y},Re=T=>{h.output+=T.output!=null?T.output:T.value,pe(T.value)},Cr=()=>{let T=1;for(;D()==="!"&&(D(2)!=="("||D(3)==="?");)V(),h.start++,T++;return T%2===0?!1:(h.negated=!0,h.start++,!0)},rt=T=>{h[T]++,X.push(T)},ve=T=>{h[T]--,X.pop()},L=T=>{if(d.type==="globstar"){const Y=h.braces>0&&(T.type==="comma"||T.type==="brace"),C=T.extglob===!0||ae.length&&(T.type==="pipe"||T.type==="paren");T.type!=="slash"&&T.type!=="paren"&&!Y&&!C&&(h.output=h.output.slice(0,-d.output.length),d.type="star",d.value="*",d.output=F,h.output+=d.output)}if(ae.length&&T.type!=="paren"&&(ae[ae.length-1].inner+=T.value),(T.value||T.output)&&Re(T),d&&d.type==="text"&&T.type==="text"){d.output=(d.output||d.value)+T.value,d.value+=T.value;return}T.prev=d,g.push(T),d=T},it=(T,Y)=>{const C={...k[Y],conditions:1,inner:""};C.prev=d,C.parens=h.parens,C.output=h.output,C.startIndex=h.index,C.tokensIndex=g.length;const P=(f.capture?"(":"")+C.open;rt("parens"),L({type:T,value:Y,output:h.output?"":he}),L({type:"paren",extglob:!0,value:V(),output:P}),ae.push(C)},Tr=T=>{const Y=y.slice(T.startIndex,h.index+1),C=y.slice(T.startIndex+2,h.index),P=N(C,f);if((T.type==="plus"||T.type==="star")&&P.risky){const K=P.safeOutput?(T.output?"":he)+(f.capture?`(${P.safeOutput})`:P.safeOutput):void 0,Ae=g[T.tokensIndex];Ae.type="text",Ae.value=Y,Ae.output=K||t.escapeRegex(Y);for(let ye=T.tokensIndex+1;ye<g.length;ye++)g[ye].value="",g[ye].output="",delete g[ye].suffix;h.output=T.output+Ae.output,h.backtrack=!0,L({type:"paren",extglob:!0,value:p,output:""}),ve("parens");return}let G=T.close+(f.capture?")":""),Q;if(T.type==="negate"){let K=F;if(T.inner&&T.inner.length>1&&T.inner.includes("/")&&(K=J(f)),(K!==F||fe()||/^\)+$/.test(Se()))&&(G=T.close=`)$))${K}`),T.inner.includes("*")&&(Q=Se())&&/^\.[^\\/.]+$/.test(Q)){const Ae=$(Q,{...v,fastpaths:!1}).output;G=T.close=`)${Ae})${K})`}T.prev.type==="bos"&&(h.negatedExtglob=!0)}L({type:"paren",extglob:!0,value:p,output:G}),ve("parens")};if(f.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(y)){let T=!1,Y=y.replace(o,(C,P,G,Q,K,Ae)=>Q==="\\"?(T=!0,C):Q==="?"?P?P+Q+(K?U.repeat(K.length):""):Ae===0?O+(K?U.repeat(K.length):""):U.repeat(G.length):Q==="."?q.repeat(G.length):Q==="*"?P?P+Q+(K?F:""):F:P?C:`\\${C}`);return T===!0&&(f.unescape===!0?Y=Y.replace(/\\/g,""):Y=Y.replace(/\\+/g,C=>C.length%2===0?"\\\\":C?"\\":"")),Y===y&&f.contains===!0?(h.output=y,h):(h.output=t.wrapOutput(Y,h,v),h)}for(;!fe();){if(p=V(),p==="\0")continue;if(p==="\\"){const C=D();if(C==="/"&&f.bash!==!0||C==="."||C===";")continue;if(!C){p+="\\",L({type:"text",value:p});continue}const P=/^\\+/.exec(Se());let G=0;if(P&&P[0].length>2&&(G=P[0].length,h.index+=G,G%2!==0&&(p+="\\")),f.unescape===!0?p=V():p+=V(),h.brackets===0){L({type:"text",value:p});continue}}if(h.brackets>0&&(p!=="]"||d.value==="["||d.value==="[^")){if(f.posix!==!1&&p===":"){const C=d.value.slice(1);if(C.includes("[")&&(d.posix=!0,C.includes(":"))){const P=d.value.lastIndexOf("["),G=d.value.slice(0,P),Q=d.value.slice(P+2),K=r[Q];if(K){d.value=G+K,h.backtrack=!0,V(),!A.output&&g.indexOf(d)===1&&(A.output=he);continue}}}(p==="["&&D()!==":"||p==="-"&&D()==="]")&&(p=`\\${p}`),p==="]"&&(d.value==="["||d.value==="[^")&&(p=`\\${p}`),f.posix===!0&&p==="!"&&d.value==="["&&(p="^"),d.value+=p,Re({value:p});continue}if(h.quotes===1&&p!=='"'){p=t.escapeRegex(p),d.value+=p,Re({value:p});continue}if(p==='"'){h.quotes=h.quotes===1?0:1,f.keepQuotes===!0&&L({type:"text",value:p});continue}if(p==="("){rt("parens"),L({type:"paren",value:p});continue}if(p===")"){if(h.parens===0&&f.strictBrackets===!0)throw new SyntaxError(l("opening","("));const C=ae[ae.length-1];if(C&&h.parens===C.parens+1){Tr(ae.pop());continue}L({type:"paren",value:p,output:h.parens?")":"\\)"}),ve("parens");continue}if(p==="["){if(f.nobracket===!0||!Se().includes("]")){if(f.nobracket!==!0&&f.strictBrackets===!0)throw new SyntaxError(l("closing","]"));p=`\\${p}`}else rt("brackets");L({type:"bracket",value:p});continue}if(p==="]"){if(f.nobracket===!0||d&&d.type==="bracket"&&d.value.length===1){L({type:"text",value:p,output:`\\${p}`});continue}if(h.brackets===0){if(f.strictBrackets===!0)throw new SyntaxError(l("opening","["));L({type:"text",value:p,output:`\\${p}`});continue}ve("brackets");const C=d.value.slice(1);if(d.posix!==!0&&C[0]==="^"&&!C.includes("/")&&(p=`/${p}`),d.value+=p,Re({value:p}),f.literalBrackets===!1||t.hasRegexChars(C))continue;const P=t.escapeRegex(d.value);if(h.output=h.output.slice(0,-d.value.length),f.literalBrackets===!0){h.output+=P,d.value=P;continue}d.value=`(${x}${P}|${d.value})`,h.output+=d.value;continue}if(p==="{"&&f.nobrace!==!0){rt("braces");const C={type:"brace",value:p,output:"(",outputIndex:h.output.length,tokensIndex:h.tokens.length};z.push(C),L(C);continue}if(p==="}"){const C=z[z.length-1];if(f.nobrace===!0||!C){L({type:"text",value:p,output:p});continue}let P=")";if(C.dots===!0){const G=g.slice(),Q=[];for(let K=G.length-1;K>=0&&(g.pop(),G[K].type!=="brace");K--)G[K].type!=="dots"&&Q.unshift(G[K].value);P=s(Q,f),h.backtrack=!0}if(C.comma!==!0&&C.dots!==!0){const G=h.output.slice(0,C.outputIndex),Q=h.tokens.slice(C.tokensIndex);C.value=C.output="\\{",p=P="\\}",h.output=G;for(const K of Q)h.output+=K.output||K.value}L({type:"brace",value:p,output:P}),ve("braces"),z.pop();continue}if(p==="|"){ae.length>0&&ae[ae.length-1].conditions++,L({type:"text",value:p});continue}if(p===","){let C=p;const P=z[z.length-1];P&&X[X.length-1]==="braces"&&(P.comma=!0,C="|"),L({type:"comma",value:p,output:C});continue}if(p==="/"){if(d.type==="dot"&&h.index===h.start+1){h.start=h.index+1,h.consumed="",h.output="",g.pop(),d=A;continue}L({type:"slash",value:p,output:le});continue}if(p==="."){if(h.braces>0&&d.type==="dot"){d.value==="."&&(d.output=q);const C=z[z.length-1];d.type="dots",d.output+=p,d.value+=p,C.dots=!0;continue}if(h.braces+h.parens===0&&d.type!=="bos"&&d.type!=="slash"){L({type:"text",value:p,output:q});continue}L({type:"dot",value:p,output:q});continue}if(p==="?"){if(!(d&&d.value==="(")&&f.noextglob!==!0&&D()==="("&&D(2)!=="?"){it("qmark",p);continue}if(d&&d.type==="paren"){const P=D();let G=p;(d.value==="("&&!/[!=<:]/.test(P)||P==="<"&&!/<([!=]|\w+>)/.test(Se()))&&(G=`\\${p}`),L({type:"text",value:p,output:G});continue}if(f.dot!==!0&&(d.type==="slash"||d.type==="bos")){L({type:"qmark",value:p,output:me});continue}L({type:"qmark",value:p,output:U});continue}if(p==="!"){if(f.noextglob!==!0&&D()==="("&&(D(2)!=="?"||!/[!=<:]/.test(D(3)))){it("negate",p);continue}if(f.nonegate!==!0&&h.index===0){Cr();continue}}if(p==="+"){if(f.noextglob!==!0&&D()==="("&&D(2)!=="?"){it("plus",p);continue}if(d&&d.value==="("||f.regex===!1){L({type:"plus",value:p,output:ue});continue}if(d&&(d.type==="bracket"||d.type==="paren"||d.type==="brace")||h.parens>0){L({type:"plus",value:p});continue}L({type:"plus",value:ue});continue}if(p==="@"){if(f.noextglob!==!0&&D()==="("&&D(2)!=="?"){L({type:"at",extglob:!0,value:p,output:""});continue}L({type:"text",value:p});continue}if(p!=="*"){(p==="$"||p==="^")&&(p=`\\${p}`);const C=i.exec(Se());C&&(p+=C[0],h.index+=C[0].length),L({type:"text",value:p});continue}if(d&&(d.type==="globstar"||d.star===!0)){d.type="star",d.star=!0,d.value+=p,d.output=F,h.backtrack=!0,h.globstar=!0,pe(p);continue}let T=Se();if(f.noextglob!==!0&&/^\([^?]/.test(T)){it("star",p);continue}if(d.type==="star"){if(f.noglobstar===!0){pe(p);continue}const C=d.prev,P=C.prev,G=C.type==="slash"||C.type==="bos",Q=P&&(P.type==="star"||P.type==="globstar");if(f.bash===!0&&(!G||T[0]&&T[0]!=="/")){L({type:"star",value:p,output:""});continue}const K=h.braces>0&&(C.type==="comma"||C.type==="brace"),Ae=ae.length&&(C.type==="pipe"||C.type==="paren");if(!G&&C.type!=="paren"&&!K&&!Ae){L({type:"star",value:p,output:""});continue}for(;T.slice(0,3)==="/**";){const ye=y[h.index+4];if(ye&&ye!=="/")break;T=T.slice(3),pe("/**",3)}if(C.type==="bos"&&fe()){d.type="globstar",d.value+=p,d.output=J(f),h.output=d.output,h.globstar=!0,pe(p);continue}if(C.type==="slash"&&C.prev.type!=="bos"&&!Q&&fe()){h.output=h.output.slice(0,-(C.output+d.output).length),C.output=`(?:${C.output}`,d.type="globstar",d.output=J(f)+(f.strictSlashes?")":"|$)"),d.value+=p,h.globstar=!0,h.output+=C.output+d.output,pe(p);continue}if(C.type==="slash"&&C.prev.type!=="bos"&&T[0]==="/"){const ye=T[1]!==void 0?"|$":"";h.output=h.output.slice(0,-(C.output+d.output).length),C.output=`(?:${C.output}`,d.type="globstar",d.output=`${J(f)}${le}|${le}${ye})`,d.value+=p,h.output+=C.output+d.output,h.globstar=!0,pe(p+V()),L({type:"slash",value:"/",output:""});continue}if(C.type==="bos"&&T[0]==="/"){d.type="globstar",d.value+=p,d.output=`(?:^|${le}|${J(f)}${le})`,h.output=d.output,h.globstar=!0,pe(p+V()),L({type:"slash",value:"/",output:""});continue}h.output=h.output.slice(0,-d.output.length),d.type="globstar",d.output=J(f),d.value+=p,h.output+=d.output,h.globstar=!0,pe(p);continue}const Y={type:"star",value:p,output:F};if(f.bash===!0){Y.output=".*?",(d.type==="bos"||d.type==="slash")&&(Y.output=ce+Y.output),L(Y);continue}if(d&&(d.type==="bracket"||d.type==="paren")&&f.regex===!0){Y.output=p,L(Y);continue}(h.index===h.start||d.type==="slash"||d.type==="dot")&&(d.type==="dot"?(h.output+=we,d.output+=we):f.dot===!0?(h.output+=ge,d.output+=ge):(h.output+=ce,d.output+=ce),D()!=="*"&&(h.output+=he,d.output+=he)),L(Y)}for(;h.brackets>0;){if(f.strictBrackets===!0)throw new SyntaxError(l("closing","]"));h.output=t.escapeLast(h.output,"["),ve("brackets")}for(;h.parens>0;){if(f.strictBrackets===!0)throw new SyntaxError(l("closing",")"));h.output=t.escapeLast(h.output,"("),ve("parens")}for(;h.braces>0;){if(f.strictBrackets===!0)throw new SyntaxError(l("closing","}"));h.output=t.escapeLast(h.output,"{"),ve("braces")}if(f.strictSlashes!==!0&&(d.type==="star"||d.type==="bracket")&&L({type:"maybe_slash",value:"",output:`${le}?`}),h.backtrack===!0){h.output="";for(const T of h.tokens)h.output+=T.output!=null?T.output:T.value,T.suffix&&(h.output+=T.suffix)}return h};return $.fastpaths=(y,v)=>{const f={...v},I=typeof f.maxLength=="number"?Math.min(n,f.maxLength):n,R=y.length;if(R>I)throw new SyntaxError(`Input length: ${R}, exceeds maximum allowed length: ${I}`);y=a[y]||y;const{DOT_LITERAL:A,SLASH_LITERAL:g,ONE_CHAR:x,DOTS_SLASH:j,NO_DOT:k,NO_DOTS:q,NO_DOTS_SLASH:ue,STAR:le,START_ANCHOR:he}=e.globChars(f.windows),W=f.dot?q:k,Ee=f.dot?ue:k,we=f.capture?"":"?:",ge={negated:!1,prefix:""};let U=f.bash===!0?".*?":le;f.capture&&(U=`(${U})`);const me=ce=>ce.noglobstar===!0?U:`(${we}(?:(?!${he}${ce.dot?j:A}).)*?)`,Ie=ce=>{switch(ce){case"*":return`${W}${x}${U}`;case".*":return`${A}${x}${U}`;case"*.*":return`${W}${U}${A}${x}${U}`;case"*/*":return`${W}${U}${g}${x}${Ee}${U}`;case"**":return W+me(f);case"**/*":return`(?:${W}${me(f)}${g})?${Ee}${x}${U}`;case"**/*.*":return`(?:${W}${me(f)}${g})?${Ee}${U}${A}${x}${U}`;case"**/.*":return`(?:${W}${me(f)}${g})?${A}${x}${U}`;default:{const O=/^(.*?)\.(\w+)$/.exec(ce);if(!O)return;const F=Ie(O[1]);return F?F+A+O[2]:void 0}}},ne=t.removePrefix(y,ge);let J=Ie(ne);return J&&f.strictSlashes!==!0&&(J+=`${g}?`),J},xt=$,xt}var _t,gn;function xr(){if(gn)return _t;gn=1;const e=Rr(),t=vr(),n=mt(),r=gt(),i=a=>a&&typeof a=="object"&&!Array.isArray(a),o=(a,s,l=!1)=>{if(Array.isArray(a)){const M=a.map($=>o($,s,l));return $=>{for(const y of M){const v=y($);if(v)return v}return!1}}const u=i(a)&&a.tokens&&a.input;if(a===""||typeof a!="string"&&!u)throw new TypeError("Expected pattern to be a non-empty string");const c=s||{},E=c.windows,m=u?o.compileRe(a,s):o.makeRe(a,s,!1,!0),b=m.state;delete m.state;let S=()=>!1;if(c.ignore){const M={...s,ignore:null,onMatch:null,onResult:null};S=o(c.ignore,M,l)}const w=(M,N=!1)=>{const{isMatch:$,match:y,output:v}=o.test(M,m,s,{glob:a,posix:E}),f={glob:a,state:b,regex:m,posix:E,input:M,output:v,match:y,isMatch:$};return typeof c.onResult=="function"&&c.onResult(f),$===!1?(f.isMatch=!1,N?f:!1):S(M)?(typeof c.onIgnore=="function"&&c.onIgnore(f),f.isMatch=!1,N?f:!1):(typeof c.onMatch=="function"&&c.onMatch(f),N?f:!0)};return l&&(w.state=b),w};return o.test=(a,s,l,{glob:u,posix:c}={})=>{if(typeof a!="string")throw new TypeError("Expected input to be a string");if(a==="")return{isMatch:!1,output:""};const E=l||{},m=E.format||(c?n.toPosixSlashes:null);let b=a===u,S=b&&m?m(a):a;return b===!1&&(S=m?m(a):a,b=S===u),(b===!1||E.capture===!0)&&(E.matchBase===!0||E.basename===!0?b=o.matchBase(a,s,l,c):b=s.exec(S)),{isMatch:!!b,match:b,output:S}},o.matchBase=(a,s,l,u=l&&l.windows)=>(s instanceof RegExp?s:o.makeRe(s,l)).test(n.basename(a,{windows:u})),o.isMatch=(a,s,l)=>o(s,l)(a),o.parse=(a,s)=>Array.isArray(a)?a.map(l=>o.parse(l,s)):t(a,{...s,fastpaths:!1}),o.scan=(a,s)=>e(a,s),o.compileRe=(a,s,l=!1,u=!1)=>{if(l===!0)return a.output;const c=s||{},E=c.contains?"":"^",m=c.contains?"":"$";let b=`${E}(?:${a.output})${m}`;a&&a.negated===!0&&(b=`^(?!${b}).*$`);const S=o.toRegex(b,s);return u===!0&&(S.state=a),S},o.makeRe=(a,s={},l=!1,u=!1)=>{if(!a||typeof a!="string")throw new TypeError("Expected a non-empty string");let c={negated:!1,fastpaths:!0};return s.fastpaths!==!1&&(a[0]==="."||a[0]==="*")&&(c.output=t.fastpaths(a,s)),c.output||(c=t(a,s)),o.compileRe(c,s,l,u)},o.toRegex=(a,s)=>{try{const l=s||{};return new RegExp(a,l.flags||(l.nocase?"i":""))}catch(l){if(s&&s.debug===!0)throw l;return/$^/}},o.constants=r,_t=o,_t}var wt,mn;function _r(){if(mn)return wt;mn=1;const e=xr(),t=mt();function n(r,i,o=!1){return i&&(i.windows===null||i.windows===void 0)&&(i={...i,windows:t.isWindows()}),e(r,i,o)}return Object.assign(n,e),wt=n,wt}var wr=_r();const Ir=se.getDefaultExportFromCjs(wr),Mn=typeof window<"u"||typeof process>"u"||process?.platform==="browser",Bn=Mn?{}:process.env||{};async function Dn(e,t){const n={};for(const i of t.headers)Nr(e,i.matches)&&(n[i.name]=i.envVariable!==void 0?Bn[i.envVariable]||"":i.value);const r=await(t.customFetch||fetch)(e,{headers:n});if(!r.ok)throw new Error(`Failed to load ${e}: ${r.status} ${r.statusText}`);return{body:await r.text(),mimeType:r.headers.get("content-type")}}function Nr(e,t){return t.match(/^https?:\/\//)||(e=e.replace(/^https?:\/\//,"")),Ir.isMatch(e,t)}function Or(e,t={}){return{name:`${e}List`,properties:{},items:e,...t}}function $r(e,t={}){return{name:`${e}Map`,properties:{},additionalProperties:()=>e,...t}}const je={name:"SpecExtension",properties:{},additionalProperties:{resolvable:!0}};function kr(e,t={}){const n={};for(const o of Object.keys(e))n[o]={...e[o],name:o};for(const o of Object.values(n))r(o);return n.SpecExtension=je,n;function r(o){if(o.additionalProperties&&(o.additionalProperties=i(o.additionalProperties)),o.items&&(o.items=i(o.items)),o.properties){const a={};for(const[s,l]of Object.entries(o.properties))a[s]=i(l),t.doNotResolveExamples&&l&&l.isExample&&(a[s]={...l,resolvable:!1});o.properties=a}}function i(o){if(typeof o=="string"){if(!n[o])throw new Error(`Unknown type name found: ${o}`);return n[o]}else return typeof o=="function"?(a,s)=>i(o(a,s)):We(o)?(o={...o},r(o),o):o?.directResolveAs!==void 0?{...o,directResolveAs:i(o.directResolveAs)??void 0}:o}}function We(e){return typeof e?.name=="string"}function be(e,t){return e===""&&(e="#/"),e[e.length-1]==="/"?e+t:e+"/"+t}function Ve(e){return se.isPlainObject(e)&&typeof e.$ref=="string"}function Un(e){return Ve(e)&&Object.keys(e).length>1}function Kn(e){return se.isPlainObject(e)&&typeof e.externalValue=="string"}class Qe{source;pointer;constructor(t,n){this.source=t,this.pointer=n}child(t){return new Qe(this.source,be(this.pointer,(Array.isArray(t)?t:[t]).map(Oe).join("/")))}key(){return Object.assign(Object.create(Qe.prototype),this,{reportOnKey:!0})}get absolutePointer(){return this.source.absoluteRef+(this.pointer==="#/"?"":this.pointer)}}function qn(e){const t=e.indexOf("~")===-1?e:e.replaceAll("~1","/").replaceAll("~0","~");try{return decodeURIComponent(t)}catch{return t}}function Oe(e){return typeof e=="number"||e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replaceAll("~","~0").replaceAll("/","~1")}function Gn(e){const[t,n=""]=e.split("#/");return{uri:(t.endsWith("#")?t.slice(0,-1):t)||null,pointer:Yn(n)}}function Yn(e){return e.split("/").map(qn).filter(Hn)}function Lr(e){const t=e.split("/");return t[t.length-1]}function Pr(e){const t=e.split(/[\/\\]/);return t[t.length-1].replace(/\.[^.]+$/,"")}function xe(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://")||e.startsWith("data:")}function Fr(e){return se.pathBrowserifyExports.extname(e)?xe(e)?e.substring(0,e.lastIndexOf("/")):se.pathBrowserifyExports.dirname(e):e}function Hr(e,t){return xe(e)?new URL(t,e.endsWith("/")?e:`${e}/`).href:se.pathBrowserifyExports.resolve(e,t)}function Mr(e){return typeof e=="string"&&(e.startsWith("#")||xe(e)||e.startsWith("./")||e.startsWith("../")||e.indexOf("/")>-1||/\.(ya?ml|json)$/i.test(e))}function Br(e){return/^#[A-Za-z][A-Za-z0-9\-_:.]*$/.test(e)}function Dr(e,t,n){if(!se.isPlainObject(t.node)&&n.parent){n.parent[n.key]=t.node;return}delete e.$ref,se.isPlainObject(t.node)&&Object.assign(e,{...t.node,...e})}var H=Symbol("NOT_RESOLVED"),Qt=Symbol("MERGE_KEY");function ee(e,t){return{tagName:e,nodeKind:"scalar",implicit:t.implicit??!1,matchByTagPrefix:t.matchByTagPrefix??!1,implicitFirstChars:t.implicitFirstChars??null,resolve:t.resolve,identify:t.identify??null,represent:t.represent??(n=>String(n)),representTagName:t.representTagName??null}}function Zt(e,t){const n=t.finalize===void 0;return{tagName:e,nodeKind:"sequence",implicit:!1,matchByTagPrefix:t.matchByTagPrefix??!1,create:t.create,addItem:t.addItem,finalize:t.finalize??(r=>r),carrierIsResult:n,identify:t.identify??null,represent:t.represent??(r=>r),representTagName:t.representTagName??null}}function At(e,t){const n=t.finalize===void 0;return{tagName:e,nodeKind:"mapping",implicit:!1,matchByTagPrefix:t.matchByTagPrefix??!1,create:t.create,addPair:t.addPair,has:t.has,keys:t.keys,get:t.get,finalize:t.finalize??(r=>r),carrierIsResult:n,identify:t.identify??null,represent:t.represent??(r=>r),representTagName:t.representTagName??null}}var Ur=ee("tag:yaml.org,2002:str",{resolve:e=>e,identify:e=>typeof e=="string"}),Kr=["","~","null","Null","NULL"],qr=ee("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:e=>Kr.indexOf(e)!==-1?null:H,identify:e=>e===null,represent:()=>"null"}),Gr=ee("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["n"],resolve:(e,t)=>e==="null"||t&&e===""?null:H,identify:e=>e===null,represent:()=>"null"}),Yr=["","~","null","Null","NULL"],jr=ee("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:e=>Yr.indexOf(e)!==-1?null:H,identify:e=>e===null,represent:()=>"null"}),Wr=["true","True","TRUE"],Vr=["false","False","FALSE"],Xr=ee("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","T","f","F"],resolve:e=>Wr.indexOf(e)!==-1?!0:Vr.indexOf(e)!==-1?!1:H,identify:e=>Object.prototype.toString.call(e)==="[object Boolean]",represent:e=>e?"true":"false"}),zr=["true"],Qr=["false"],Zr=ee("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","f"],resolve:e=>zr.indexOf(e)!==-1?!0:Qr.indexOf(e)!==-1?!1:H,identify:e=>Object.prototype.toString.call(e)==="[object Boolean]",represent:e=>e?"true":"false"}),Jr=["true","True","TRUE","y","Y","yes","Yes","YES","on","On","ON"],ei=["false","False","FALSE","n","N","no","No","NO","off","Off","OFF"],ti=ee("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["y","Y","n","N","t","T","f","F","o","O"],resolve:e=>Jr.indexOf(e)!==-1?!0:ei.indexOf(e)!==-1?!1:H,identify:e=>Object.prototype.toString.call(e)==="[object Boolean]",represent:e=>e?"true":"false"}),ni=new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"),ri=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function ii(e){let t=e,n=1;return(t[0]==="-"||t[0]==="+")&&(t[0]==="-"&&(n=-1),t=t.slice(1)),t.startsWith("0b")?n*parseInt(t.slice(2),2):t.startsWith("0o")?n*parseInt(t.slice(2),8):t.startsWith("0x")?n*parseInt(t.slice(2),16):n*parseInt(t,10)}function oi(e,t){if(t){if(!ri.test(e))return H}else if(!ni.test(e))return H;const n=ii(e);return Number.isFinite(n)?n:H}var jn=ee("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:oi,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:e=>e.toString(10)}),ai=new RegExp("^-?(?:0|[1-9][0-9]*)$"),si=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function li(e){let t=e,n=1;return(t[0]==="-"||t[0]==="+")&&(t[0]==="-"&&(n=-1),t=t.slice(1)),t.startsWith("0b")?n*parseInt(t.slice(2),2):t.startsWith("0o")?n*parseInt(t.slice(2),8):t.startsWith("0x")?n*parseInt(t.slice(2),16):n*parseInt(t,10)}function ci(e,t){if(t){if(!si.test(e))return H}else if(!ai.test(e))return H;const n=li(e);return Number.isFinite(n)?n:H}var ui=ee("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:ci,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:e=>e.toString(10)}),fi=new RegExp("^(?:[-+]?0b[0-1_]+|[-+]?0[0-7_]+|[-+]?0x[0-9a-fA-F_]+|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+|[-+]?(?:0|[1-9][0-9_]*))$");function pi(e){let t=e.replace(/_/g,""),n=1;if((t[0]==="-"||t[0]==="+")&&(t[0]==="-"&&(n=-1),t=t.slice(1)),t.startsWith("0b"))return n*parseInt(t.slice(2),2);if(t.startsWith("0x"))return n*parseInt(t.slice(2),16);if(t.includes(":")){let r=0;for(const i of t.split(":"))r=r*60+Number(i);return n*r}return t!=="0"&&t[0]==="0"?n*parseInt(t,8):n*parseInt(t,10)}function di(e){if(!fi.test(e))return H;const t=pi(e);return Number.isFinite(t)?t:H}var Pt=ee("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:di,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:e=>e.toString(10)}),hi=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),gi=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function mi(e){if(!hi.test(e))return H;let t=e.toLowerCase();const n=t[0]==="-"?-1:1;if("+-".includes(t[0])&&(t=t.slice(1)),t===".inf")return n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(t===".nan")return NaN;const r=n*parseFloat(t);return Number.isFinite(r)||gi.test(e)?r:H}function Ai(e){if(isNaN(e))return".nan";if(e===Number.POSITIVE_INFINITY)return".inf";if(e===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(e,-0))return"-0.0";const t=e.toString(10);return/^[-+]?[0-9]+e/.test(t)?t.replace("e",".e"):t}var Wn=ee("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:mi,identify:e=>typeof e=="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:Ai}),yi=new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"),Ei=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Si(e,t){if(t){if(!Ei.test(e))return H;let r=e.toLowerCase();const i=r[0]==="-"?-1:1;if("+-".includes(r[0])&&(r=r.slice(1)),r===".inf")return i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(r===".nan")return NaN;const o=i*parseFloat(r);return Number.isFinite(o)?o:H}if(!yi.test(e))return H;const n=Number(e);return Number.isFinite(n)?n:H}function bi(e){if(isNaN(e))return".nan";if(e===Number.POSITIVE_INFINITY)return".inf";if(e===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(e,-0))return"-0.0";const t=e.toString(10);return/^[-+]?[0-9]+e/.test(t)?t.replace("e",".e"):t}var Ci=ee("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-",..."0123456789"],resolve:Si,identify:e=>typeof e=="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:bi}),Ti=new RegExp("^(?:[-+]?(?:(?:[0-9][0-9_]*)?\\.[0-9_]*)(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Ri=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function vi(e){if(!Ti.test(e))return H;let t=e.toLowerCase().replace(/_/g,"");const n=t[0]==="-"?-1:1;if("+-".includes(t[0])&&(t=t.slice(1)),t===".inf")return n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(t===".nan")return NaN;let r=0;if(t.includes(":")){for(const i of t.split(":"))r=r*60+Number(i);r*=n}else r=n*parseFloat(t);return Number.isFinite(r)||Ri.test(e)?r:H}function xi(e){if(isNaN(e))return".nan";if(e===Number.POSITIVE_INFINITY)return".inf";if(e===Number.NEGATIVE_INFINITY)return"-.inf";if(Object.is(e,-0))return"-0.0";const t=e.toString(10);return/^[-+]?[0-9]+e/.test(t)?t.replace("e",".e"):t}var Ft=ee("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:vi,identify:e=>typeof e=="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:xi}),Vn=ee("tag:yaml.org,2002:merge",{implicit:!0,implicitFirstChars:["<"],resolve:(e,t)=>e==="<<"||t&&e===""?Qt:H}),_i=/^[A-Za-z0-9+/]*={0,2}$/;function wi(e){const t=e.replace(/\s/g,"");if(t.length%4!==0||!_i.test(t))return H;const n=atob(t),r=new Uint8Array(n.length);for(let i=0;i<n.length;i++)r[i]=n.charCodeAt(i);return r}function Ii(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}var Xn=ee("tag:yaml.org,2002:binary",{resolve:wi,identify:e=>Object.prototype.toString.call(e)==="[object Uint8Array]",represent:Ii}),Ni=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Oi=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function An(e,t,n,r=0,i=0,o=0,a=0){const s=new Date(Date.UTC(e,t,n,r,i,o,a));return s.setUTCFullYear(e,t,n),s}function $i(e){let t=Ni.exec(e);if(t===null&&(t=Oi.exec(e)),t===null)return H;const n=+t[1],r=+t[2]-1,i=+t[3];if(!t[4]){const c=An(n,r,i);return c.getUTCFullYear()!==n||c.getUTCMonth()!==r||c.getUTCDate()!==i?H:c}const o=+t[4],a=+t[5],s=+t[6];let l=0;if(o>23||a>59||s>59)return H;if(t[7]){let c=t[7].slice(0,3);for(;c.length<3;)c+="0";l=+c}const u=An(n,r,i,o,a,s,l);if(u.getUTCFullYear()!==n||u.getUTCMonth()!==r||u.getUTCDate()!==i)return H;if(t[9]){const c=+t[10],E=+(t[11]||0);if(c>23||E>59)return H;const m=(c*60+E)*6e4;u.setTime(u.getTime()-(t[9]==="-"?-m:m))}return u}var ki=ee("tag:yaml.org,2002:timestamp",{implicit:!0,implicitFirstChars:[..."0123456789"],resolve:$i,identify:e=>e instanceof Date,represent:e=>e.toISOString()}),Li=Zt("tag:yaml.org,2002:seq",{create:()=>[],addItem:(e,t)=>{e.push(t)},identify:Array.isArray});function yt(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Ht(e,t){const n={};for(const r of t)e[r]!==void 0&&(n[r]=e[r]);return n}var zn=Zt("tag:yaml.org,2002:omap",{create:()=>({list:[],seen:new Set}),addItem:(e,t)=>{let n;if(t instanceof Map){if(t.size!==1)return"cannot resolve an ordered map item";n=t.keys().next().value}else if(yt(t)){const r=Object.keys(t);if(r.length!==1)return"cannot resolve an ordered map item";n=r[0]}else return"cannot resolve an ordered map item";return e.seen.has(n)?"duplicate key in ordered map":(e.seen.add(n),e.list.push(t),"")},finalize:e=>e.list}),Qn=Zt("tag:yaml.org,2002:pairs",{create:()=>[],addItem:(e,t)=>{if(t instanceof Map)return t.size!==1?"cannot resolve a pairs item":(e.push(t.entries().next().value),"");if(Object.prototype.toString.call(t)!=="[object Object]")return"cannot resolve a pairs item";const n=t,r=Object.keys(n);return r.length!==1?"cannot resolve a pairs item":(e.push([r[0],n[r[0]]]),"")}}),Pi=At("tag:yaml.org,2002:map",{create:()=>({}),identify:yt,represent:e=>{const t=new Map;for(const n of Object.keys(e))t.set(n,e[n]);return t},addPair:(e,t,n)=>{if(t!==null&&typeof t=="object")return"object-based map does not support complex keys";const r=String(t);return r==="__proto__"?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,""},has:(e,t)=>t!==null&&typeof t=="object"?!1:Object.prototype.hasOwnProperty.call(e,String(t)),keys:e=>Object.keys(e),get:(e,t)=>{const n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?e[n]:null}}),Zn=At("tag:yaml.org,2002:set",{create:()=>new Set,identify:e=>e instanceof Set,represent:e=>{const t=new Map;for(const n of e)t.set(n,null);return t},addPair:(e,t,n)=>n!==null?"cannot resolve a set item":(e.add(t),""),has:(e,t)=>e.has(t),keys:e=>e.keys(),get:()=>null});function Fi(){return{scalar:Object.create(null),sequence:Object.create(null),mapping:Object.create(null)}}function Hi(){return{scalar:[],sequence:[],mapping:[]}}function Mi(e){const t=[];for(const n of e){let r=t.length;for(let i=0;i<t.length;i++){const o=t[i];if(o.nodeKind===n.nodeKind&&o.tagName===n.tagName&&o.matchByTagPrefix===n.matchByTagPrefix){r=i;break}}t[r]=n}return t}var Et=class Jn{tags;implicitScalarTags;implicitScalarByFirstChar;implicitScalarAnyFirstChar;defaultScalarTag;defaultSequenceTag;defaultMappingTag;exact;prefix;constructor(t){const n=Mi(t),r=[],i=Fi(),o=Hi();for(const c of n){if(c.nodeKind==="scalar"&&c.implicit){if(c.matchByTagPrefix)throw new Error("Implicit scalar tags cannot match by tag prefix");r.push(c)}switch(c.nodeKind){case"scalar":c.matchByTagPrefix?o.scalar.push(c):i.scalar[c.tagName]=c;break;case"sequence":c.matchByTagPrefix?o.sequence.push(c):i.sequence[c.tagName]=c;break;case"mapping":c.matchByTagPrefix?o.mapping.push(c):i.mapping[c.tagName]=c;break}}const a=r.filter(c=>c.implicitFirstChars===null),s=new Set;for(const c of r)if(c.implicitFirstChars!==null)for(const E of c.implicitFirstChars)s.add(E);const l=new Map;for(const c of s)l.set(c,r.filter(E=>E.implicitFirstChars===null||E.implicitFirstChars.indexOf(c)!==-1));const u=i.scalar["tag:yaml.org,2002:str"];if(!u)throw new Error("schema does not define the default scalar tag (tag:yaml.org,2002:str)");this.tags=n,this.implicitScalarTags=r,this.implicitScalarByFirstChar=l,this.implicitScalarAnyFirstChar=a,this.defaultScalarTag=u,this.defaultSequenceTag=i.sequence["tag:yaml.org,2002:seq"],this.defaultMappingTag=i.mapping["tag:yaml.org,2002:map"],this.exact=i,this.prefix=o}withTags(...t){let n=[];for(const r of t)n=n.concat(r);return new Jn([...this.tags,...n])}},Jt=new Et([Ur,Li,Pi]);new Et([...Jt.tags,Gr,Zr,ui,Ci]);var er=new Et([...Jt.tags,qr,Xr,jn,Wn]),Bi=new Et([...Jt.tags,jr,ti,Pt,Ft,ki,Vn,Xn,zn,Qn,Zn]);At("tag:yaml.org,2002:map",{create:()=>new Map,addPair:(e,t,n)=>(e.set(t,n),""),has:(e,t)=>e.has(t),keys:e=>e.keys(),get:(e,t)=>e.get(t),identify:e=>e instanceof Map||yt(e),represent:e=>{if(e instanceof Map)return e;const t=new Map,n=e;for(const r of Object.keys(n))t.set(r,n[r]);return t}});function yn(e){if(Array.isArray(e)){const t=Array.prototype.slice.call(e);for(let n=0;n<t.length;n++){if(Array.isArray(t[n]))return null;typeof t[n]=="object"&&Object.prototype.toString.call(t[n])==="[object Object]"&&(t[n]="[object Object]")}return String(t)}return typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"?"[object Object]":String(e)}At("tag:yaml.org,2002:map",{create:()=>({}),identify:yt,represent:e=>{const t=new Map;for(const n of Object.keys(e))t.set(n,e[n]);return t},addPair:(e,t,n)=>{const r=yn(t);return r===null?"nested arrays are not supported inside keys":(r==="__proto__"?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,"")},has:(e,t)=>{const n=yn(t);return n!==null&&Object.prototype.hasOwnProperty.call(e,n)},keys:e=>Object.keys(e),get:(e,t)=>{const n=String(t);return Object.prototype.hasOwnProperty.call(e,n)?e[n]:null}});var Di={maxLength:79,indent:1,linesBefore:3,linesAfter:2};function It(e,t,n,r,i){let o="",a="";const s=Math.floor(i/2)-1;return r-t>s&&(o=" ... ",t=r-s+o.length),n-r>s&&(a=" ...",n=r+s-a.length),{str:o+e.slice(t,n).replace(/\t/g,"→")+a,pos:r-t+o.length}}function Nt(e,t){return" ".repeat(Math.max(t-e.length,0))+e}function Ui(e,t){if(!e.buffer)return null;const n={...Di,...t},r=/\r?\n|\r|\0/g,i=[0],o=[];let a,s=-1;for(;a=r.exec(e.buffer);)o.push(a.index),i.push(a.index+a[0].length),e.position<=a.index&&s<0&&(s=i.length-2);s<0&&(s=i.length-1);let l="";const u=Math.min(e.line+n.linesAfter,o.length).toString().length,c=n.maxLength-(n.indent+u+3);for(let m=1;m<=n.linesBefore&&!(s-m<0);m++){const b=It(e.buffer,i[s-m],o[s-m],e.position-(i[s]-i[s-m]),c);l=`${" ".repeat(n.indent)}${Nt((e.line-m+1).toString(),u)} | ${b.str}
|
|
2
2
|
${l}`}const E=It(e.buffer,i[s],o[s],e.position,c);l+=`${" ".repeat(n.indent)}${Nt((e.line+1).toString(),u)} | ${E.str}
|
|
3
3
|
`,l+=`${"-".repeat(n.indent+u+3+E.pos)}^
|
|
4
4
|
`;for(let m=1;m<=n.linesAfter&&!(s+m>=o.length);m++){const b=It(e.buffer,i[s+m],o[s+m],e.position-(i[s]-i[s+m]),c);l+=`${" ".repeat(n.indent)}${Nt((e.line+m+1).toString(),u)} | ${b.str}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a5 as le, a4 as Ee, bp as ua, bq as qe, br as Yr, bs as Zs, bt as _a, bu as re, bv as ya, bw as he, bx as pe, by as Ze, bz as Xe, bA as zt, bB as Xs, Q as Jn, U as Qs, bC as el, bD as zn, V as qr, bE as al, bF as Ua, bG as Fr, bH as jn } from "./replay-index-
|
|
2
|
-
import { c as La } from "./replay-resolve-
|
|
3
|
-
import { z as jt, a5 as Vn, c as rl, Z as nl, U as tl, K as il, aa as Vt } from "./replay-lint-
|
|
1
|
+
import { a5 as le, a4 as Ee, bp as ua, bq as qe, br as Yr, bs as Zs, bt as _a, bu as re, bv as ya, bw as he, bx as pe, by as Ze, bz as Xe, bA as zt, bB as Xs, Q as Jn, U as Qs, bC as el, bD as zn, V as qr, bE as al, bF as Ua, bG as Fr, bH as jn } from "./replay-index-DfpfSyMZ.js";
|
|
2
|
+
import { c as La } from "./replay-resolve-CgA90BKO.js";
|
|
3
|
+
import { z as jt, a5 as Vn, c as rl, Z as nl, U as tl, K as il, aa as Vt } from "./replay-lint-BfS0UNDE.js";
|
|
4
4
|
function ol(e) {
|
|
5
5
|
return le(e) && "name" in e && "value" in e && !("in" in e);
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("./replay-index-CLJOTBS9.js"),Sa=require("./replay-resolve-B-ScAEQ_.js"),xe=require("./replay-lint-VrViwed0.js");function Ls(e){return k.isPlainObject(e)&&"name"in e&&"value"in e&&!("in"in e)}function Fr(e){return k.isPlainObject(e)&&"in"in e&&typeof e.in=="string"&&["header","query","path","cookie"].includes(e.in)}const Ds=/^image\/(png|jpeg|gif|bmp|webp|svg\+xml)|application\/pdf$/;function Bt(e){return e.startsWith("$file(")&&e.endsWith(")")?e.substring(7,e.length-2):e}const Pn=async(e,r,a,n,t)=>{const i=k.pathBrowserifyExports.dirname(n),o=k.pathBrowserifyExports.resolve(i,Bt(a));e.append(r,await t.options.requestFileLoader.getFileBody(o))},Rt=(e,r,a,n,t,i)=>{Object.entries(a).forEach(([o,l])=>{const c=i?`${i}[${o}]`:o;typeof l=="string"&&l.startsWith("$file(")&&l.endsWith(")")?e.push(Pn(r,c,l,n,t)):Array.isArray(l)?l.forEach(u=>{typeof u=="string"&&u.startsWith("$file(")&&u.endsWith(")")?e.push(Pn(r,c,u,n,t)):r.append(c,u.toString())}):k.isPlainObject(l)?Rt(e,r,l,n,t,c):(typeof l=="string"||typeof l=="number"||typeof l=="boolean")&&r.append(c,l.toString())})},Ns=async(e,r,a,n)=>{if(k.isPlainObject(e)){const t=[];Rt(t,r,e,a,n),await Promise.all(t)}},Hs=async(e,r)=>{if(typeof e=="string"&&e.startsWith("$file(")&&e.endsWith(")")){const a=k.pathBrowserifyExports.resolve(k.pathBrowserifyExports.dirname(r.options.filePath),Bt(e));return r.options.requestFileLoader.getFileBody(a)}else return e};async function xs(e,r){if(!e)return{payload:void 0,contentType:void 0,encoding:void 0,replacements:void 0};const{payload:a,contentType:n}=e;if(n==="multipart/form-data"){const t=new FormData,i=k.pathBrowserifyExports.resolve(r.options.filePath);return await Ns(a,t,i,r),{...e,payload:t}}else{if(n==="application/octet-stream"||typeof n=="string"&&Ds.test(n))return{...e,payload:await Hs(a,r),contentType:"application/octet-stream"};if(n==="application/x-www-form-urlencoded"&&typeof a=="string")return{...e,payload:Object.fromEntries(new URLSearchParams(a).entries()),contentType:"application/x-www-form-urlencoded"}}return e}function Ws({payload:e,replacements:r,expressionContext:a,logger:n}){for(const t of r){const{target:i,value:o}=t;if(typeof i!="string")throw new Error(`Invalid JSON Pointer: ${i}`);try{const l=k.JsonPointerLib.get(e,i),c=k.evaluateRuntimeExpressionPayload({payload:o,context:a,logger:n});l!==void 0&&k.JsonPointerLib.set(e,i,c)}catch{throw new Error(`Invalid JSON Pointer: ${i}`)}}}const Gs=["parameters","failureActions","successActions"];function Fs(e,r){const{reference:a,value:n}=e;if(!Gs.some(i=>a.includes(`$components.${i}`)))throw new Error("Invalid reference: available components are $components.parameters, $components.failureActions, or $components.successActions");const t=k.getValueFromContext({value:a,ctx:r,logger:r.options.logger});return k.isPlainObject(t)&&"value"in t&&n?{...t,value:n}:t}function Ca(e,r){return"reference"in e?Fs(e,r):e}const ie={SUCCESS_CRITERIA_CHECK:"success criteria check",STATUS_CODE_CHECK:"status code check",SCHEMA_CHECK:"schema check",CONTENT_TYPE_CHECK:"content-type check",GLOBAL_TIMEOUT_ERROR:"global timeout error",MAX_STEPS_REACHED_ERROR:"maximum steps reached",NETWORK_ERROR:"failed network request",UNEXPECTED_ERROR:"unexpected error"};class Et extends Error{}class Pt extends Et{}class Lt extends Et{}async function Is(e){const{descriptionPath:r,externalRefResolver:a,base:n}=e,t=await xe.bundle({base:n,ref:r,config:e.config,dereference:!0,externalRefResolver:a});if(!t)throw new Error(`Could not find source description file '${r}'.`);return t.bundle.parsed}const Os={title:"[REPLACE WITH API title]",version:"[REPLACE WITH API version]"},Rr=Symbol("skip");function fa(e){return e<10?"0"+e:e}function $s(e,r,a,n){var t=a?"":e.getUTCFullYear()+"-"+fa(e.getUTCMonth()+1)+"-"+fa(e.getUTCDate());return r||(t+="T"+fa(e.getUTCHours())+":"+fa(e.getUTCMinutes())+":"+fa(e.getUTCSeconds())+"Z"),t}function Dt(e,r){return r>e.length?e.repeat(Math.trunc(r/e.length)+1).substring(0,r):e}function Ja(...e){const r=a=>a&&typeof a=="object";return e.reduce((a,n)=>(Object.keys(n||{}).forEach(t=>{const i=a[t],o=n[t];r(i)&&r(o)?a[t]=Ja(i,o):a[t]=o}),a),Array.isArray(e[e.length-1])?[]:{})}function Ks(e){var r=js(e),a=Vs(r,r,r,r),n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{var i=a()*16%16|0;return(t=="x"?i:i&3|8).toString(16)});return n}function cr(e){return{value:e==="object"?{}:e==="array"?[]:void 0}}function Je(e,r){r&&e.pop()}function Js(e){return{name:e?.xml?.name||"",prefix:e?.xml?.prefix||"",namespace:e?.xml?.namespace||null,attribute:e?.xml?.attribute??!1,wrapped:e?.xml?.wrapped??!1}}function zs(e){const r=e?.xml;return r?.nodeType?r.nodeType:r?.attribute===!0?"attribute":r?.wrapped===!0&&e?.type==="array"?"element":e?.$ref||e?.$dynamicRef||e?.type==="array"||e?.oneOf||e?.anyOf||e?.allOf?"none":"element"}function za(e,r={},a={}){const{value:n}=e,{propertyName:t}=a,{name:i,prefix:o,namespace:l}=Js(r),c=zs(r);let u=i||t?`${o?o+":":""}${i||t}`:null,h=typeof n=="object"?Array.isArray(n)?[...n]:{...n}:n;switch(c){case"attribute":u&&(u=`$${u}`);break;case"text":u="#text";break;case"cdata":u="#cdata";break;case"none":r.type==="array"?(u=null,r.example!==void 0&&(u=r.items?.xml?.name||u)):u=null;break;default:r.type==="array"&&Array.isArray(h)&&(h={[u]:[...h]});break}return l&&c!=="text"&&c!=="cdata"&&c!=="none"&&(typeof h=="object"?h[`$xmlns${o?":"+o:""}`]=l:h={[`$xmlns${o?":"+o:""}`]:l,"#text":h}),{propertyName:u,value:h}}function js(e){var r=0;if(e.length==0)return r;for(var a=0;a<e.length;a++){var n=e.charCodeAt(a);r=(r<<5)-r+n,r=r&r}return r}function Vs(e,r,a,n){return function(){e|=0,r|=0,a|=0,n|=0;var t=e-(r<<27|r>>>5)|0;return e=r^(a<<17|a>>>15),r=a+n|0,a=n+t|0,n=e+t|0,(n>>>0)/4294967296}}function _s(e,r,a,n,t){let i=Pe(e,a,n);const o=[];for(let l of r){const{type:c,readOnly:u,writeOnly:h,value:p}=Pe({type:i.type,...l},a,n,{...t,isAllOfChild:!0});i.type&&c&&c!==i.type&&(console.warn("allOf: schemas with different types can't be merged"),i.type=c),i.type=i.type||c,i.readOnly=i.readOnly||u,i.writeOnly=i.writeOnly||h,p!=null&&o.push(p)}if(i.type==="object"){i.value=Ja(i.value||{},...o.filter(l=>typeof l=="object"));for(const l in i.value)i.value[l]===Rr&&delete i.value[l];return i}else{i.type==="array"&&(a.quiet||console.warn('OpenAPI Sampler: found allOf with "array" type. Result may be incorrect'));const l=o[o.length-1];return i.value=l??i.value,i}}const Ln={multipleOf:"number",maximum:"number",exclusiveMaximum:"number",minimum:"number",exclusiveMinimum:"number",maxLength:"string",minLength:"string",pattern:"string",items:"array",maxItems:"array",minItems:"array",uniqueItems:"array",additionalItems:"array",maxProperties:"object",minProperties:"object",required:"object",additionalProperties:"object",properties:"object",patternProperties:"object",dependencies:"object"};function La(e){if(e.type!==void 0)return Array.isArray(e.type)?e.type.length===0?null:e.type[0]:e.type;const r=Object.keys(Ln);for(var a=0;a<r.length;a++){let n=r[a],t=Ln[n];if(e[n]!==void 0)return t}return null}let Ia={},Ee=[];function Us(){Ia={},Ee=[]}function Nt(e){let r;return e.const!==void 0?r=e.const:e.examples!==void 0&&e.examples.length?r=e.examples[0]:e.enum!==void 0&&e.enum.length?r=e.enum[0]:e.default!==void 0&&(r=e.default),r}function Dn(e){const r=Nt(e);if(r!==void 0)return{value:r,readOnly:e.readOnly,writeOnly:e.writeOnly,type:null}}function Pe(e,r,a,n){if(n){if(Ee.includes(e))return cr(La(e));Ee.push(e)}if(n&&n.depth>r.maxSampleDepth)return Je(Ee,n),cr(La(e));if(e.$ref){if(!a)throw new Error("Your schema contains $ref. You must provide full specification in the third parameter.");let l=decodeURIComponent(e.$ref);l.startsWith("#")&&(l=l.substring(1));const c=k.JsonPointerLib.get(a,l);let u;if(Ia[l]!==!0){Ia[l]=!0;const h=Pe(c,r,a,n);if(r.format==="xml"){const p=l.split("/").pop(),y={...n,propertyName:n?.propertyName||p},{propertyName:g,value:A}=za(h,c,y);u={...h,value:{[g||"root"]:A}}}else u=h;Ia[l]=!1}else{const h=La(c);u=cr(h)}return Je(Ee,n),u}if(e.example!==void 0)return Je(Ee,n),{value:e.example,readOnly:e.readOnly,writeOnly:e.writeOnly,type:e.type};if(e.allOf!==void 0)return Je(Ee,n),Dn(e)||_s({...e,allOf:void 0},e.allOf,r,a,n);if(e.oneOf&&e.oneOf.length){e.anyOf&&(r.quiet||console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf")),Je(Ee,n);const l=Object.assign({readOnly:e.readOnly,writeOnly:e.writeOnly},e.oneOf[0]);return o(e,l)}if(e.anyOf&&e.anyOf.length){Je(Ee,n);const l=Object.assign({readOnly:e.readOnly,writeOnly:e.writeOnly},e.anyOf[0]);return o(e,l)}if(e.if&&e.then){Je(Ee,n);const{if:l,then:c,...u}=e;return Pe(Ja(u,l,c),r,a,n)}let t=Nt(e),i=null;if(t===void 0){t=null,i=e.type,Array.isArray(i)&&e.type.length>0&&(i=e.type[0]),i||(i=La(e));let l=Wt[i];l&&(t=l(e,r,a,n))}return Je(Ee,n),{value:t,readOnly:e.readOnly,writeOnly:e.writeOnly,type:i};function o(l,c){const u=Dn(l);if(u!==void 0)return u;const h=Pe({...l,oneOf:void 0,anyOf:void 0},r,a,n),p=Pe(c,r,a,n);if(typeof h.value=="object"&&typeof p.value=="object"){const y=Ja(h.value,p.value);return{...p,value:y}}return p}}function Ys(e,r={},a,n){const t=n&&n.depth||1;let i=Math.min(e.maxItems!=null?e.maxItems:1/0,e.minItems||1);const o=e.prefixItems||e.items||e.contains;Array.isArray(o)&&(i=Math.max(i,o.length));let l=u=>Array.isArray(o)?o[u]||{}:o||{},c=[];if(!o)return c;for(let u=0;u<i;u++){let h=l(u),{value:p}=Pe(h,r,a,{depth:t+1});if(r?.format==="xml"){const{value:y,propertyName:g}=za({value:p},h,n);g?(c?.[g]||(c={...c,[g]:[]}),c[g].push(y)):c={...c,...y}}else c.push(p)}if(r?.format==="xml"&&t===1){const{value:u,propertyName:h}=za({value:null},e,n);h&&(u?c=Array.isArray(c)?{[h]:{...u,...c.map(p=>({"#text":{...p}}))}}:{[h]:{...c,...u}}:c={[h]:c})}return c}function qs(e){return!0}function Ht(e){let r=0;if(e.type==="number"&&(e.format==="float"||e.format==="double")&&(r=.1),typeof e.exclusiveMinimum=="boolean"||typeof e.exclusiveMaximum=="boolean"){if(Number.isFinite(e.maximum)&&Number.isFinite(e.minimum))return r=e.exclusiveMinimum?Math.floor(e.minimum)+1:e.minimum,(e.exclusiveMaximum&&r>=e.maximum||!e.exclusiveMaximum&&r>e.maximum)&&(r=(e.maximum+e.minimum)/2),r;if(Number.isFinite(e.minimum))return e.exclusiveMinimum?Math.floor(e.minimum)+1:e.minimum;if(Number.isFinite(e.maximum))return e.exclusiveMaximum?e.maximum>0?0:Math.floor(e.maximum)-1:e.maximum>0?0:e.maximum}else{if(Number.isFinite(e.minimum))return e.minimum;Number.isFinite(e.exclusiveMinimum)?(r=Math.floor(e.exclusiveMinimum)+1,r===e.exclusiveMaximum&&(r=(r+Math.floor(e.exclusiveMaximum)-1)/2)):Number.isFinite(e.exclusiveMaximum)?r=Math.floor(e.exclusiveMaximum)-1:Number.isFinite(e.maximum)&&(r=e.maximum)}return r}function Zs(e,r={},a,n){let t={};const i=n&&n.depth||1;if(e&&typeof e.properties=="object"){const o=Array.isArray(e.required)?e.required:[],l={};for(const c of o)l[c]=!0;Object.keys(e.properties).forEach(c=>{if(r.skipNonRequired&&!l.hasOwnProperty(c))return;const u=Pe(e.properties[c],r,a,{propertyName:c,depth:i+1});if(r.skipReadOnly&&u.readOnly){n?.isAllOfChild&&(t[c]=Rr);return}if(r.skipWriteOnly&&u.writeOnly){n?.isAllOfChild&&(t[c]=Rr);return}if(r?.format==="xml"){const{propertyName:h,value:p}=za(u,e.properties[c],{propertyName:c});h?t[h]=p:p!==null&&typeof p=="object"&&(t={...t,...p})}else t[c]=u.value})}if(e&&typeof e.additionalProperties=="object"){const o=e.additionalProperties["x-additionalPropertiesName"]||"property";t[`${String(o)}1`]=Pe(e.additionalProperties,r,a,{depth:i+1}).value,t[`${String(o)}2`]=Pe(e.additionalProperties,r,a,{depth:i+1}).value}if(e&&typeof e.properties=="object"&&e.maxProperties!==void 0&&Object.keys(t).length>e.maxProperties){const o={};let l=0;(Array.isArray(e.required)?e.required:[]).forEach(u=>{t[u]!==void 0&&(o[u]=t[u],l++)}),Object.keys(t).forEach(u=>{l<e.maxProperties&&!o.hasOwnProperty(u)&&(o[u]=t[u],l++)}),t=o}return t}function wa(e,r){return e}function Nn(e,r,a){let n=1;if(e)switch(e){case"?":{n=0;break}case"*":{n=wa(0);break}case"+":{n=wa(1);break}default:throw new Error("Unknown quantifier symbol provided.")}else r!=null&&a!=null?n=wa(parseInt(r)):r!=null&&a==null&&(n=parseInt(r));return n}function Xs(e){let r=!1;e instanceof RegExp&&(r=e.flags.includes("i"),e=e.toString(),e=e.match(/\/(.+?)\//)?.[1]??""),e=e.replace(/^(\^)?(.*?)(\$)?$/,"$2");let a,n,t;const i=/([.A-Za-z0-9])(?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+))(?![^[]*]|[^{]*})/;let o=e.match(i);for(;o!=null;){const p=o[2],y=o[3],g=o[4];t=Nn(g,p,y),e=e.slice(0,o.index)+o[1].repeat(t)+e.slice(o.index+o[0].length),o=e.match(i)}const l=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,c=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+)|)/;for(o=e.match(c);o!=null;){const p=o[1]==="^",y=o[2]==="-",g=o[4],A=o[5],R=o[6],E=[];let $=o[3],W=$.match(l);for(y&&E.push(45);W!=null;){if(W[0].indexOf("-")===-1)r&&isNaN(Number(W[0]))?(E.push(W[0].toUpperCase().charCodeAt(0)),E.push(W[0].toLowerCase().charCodeAt(0))):E.push(W[0].charCodeAt(0));else{const v=W[0].split("-").map(b=>b.charCodeAt(0));if(a=v[0],n=v[1],a>n)throw new Error("Character range provided is out of order.");for(let b=a;b<=n;b++)if(r&&isNaN(Number(String.fromCharCode(b)))){const T=String.fromCharCode(b);E.push(T.toUpperCase().charCodeAt(0)),E.push(T.toLowerCase().charCodeAt(0))}else E.push(b)}$=$.substring(W[0].length),W=$.match(l)}if(t=Nn(R,g,A),p){let v=-1;for(let b=48;b<=57;b++){if(v=E.indexOf(b),v>-1){E.splice(v,1);continue}E.push(b)}for(let b=65;b<=90;b++){if(v=E.indexOf(b),v>-1){E.splice(v,1);continue}E.push(b)}for(let b=97;b<=122;b++){if(v=E.indexOf(b),v>-1){E.splice(v,1);continue}E.push(b)}}const K=Array.from({length:t},()=>String.fromCharCode(E[wa(0)])).join("");e=e.slice(0,o.index)+K+e.slice(o.index+o[0].length),o=e.match(c)}const u=/(.)\{(\d+)\,(\d+)\}/;for(o=e.match(u);o!=null;){if(a=parseInt(o[2]),n=parseInt(o[3]),a>n)throw new Error("Numbers out of order in {} quantifier.");t=wa(a),e=e.slice(0,o.index)+o[1].repeat(t)+e.slice(o.index+o[0].length),o=e.match(u)}const h=/(.)\{(\d+)\}/;for(o=e.match(h);o!=null;)t=parseInt(o[2]),e=e.slice(0,o.index)+o[1].repeat(t)+e.slice(o.index+o[0].length),o=e.match(h);return e}const Qs="qwerty!@#$%^123456";function el(){return"user@example.com"}function al(){return"пошта@укр.нет"}function rl(e,r){let a="pa$$word";return e>a.length&&(a+="_",a+=Dt(Qs,e-a.length).substring(0,e-a.length)),a}function Ir({min:e,max:r,omitTime:a,omitDate:n}){let t=$s(new Date("2019-08-24T14:15:22.123Z"),a,n);return t.length<e&&console.warn(`Using minLength = ${e} is incorrect with format "date-time"`),r&&t.length>r&&console.warn(`Using maxLength = ${r} is incorrect with format "date-time"`),t}function nl(e,r){return Ir({min:e,max:r,omitTime:!1,omitDate:!1})}function tl(e,r){return Ir({min:e,max:r,omitTime:!0,omitDate:!1})}function il(e,r){return Ir({min:e,max:r,omitTime:!1,omitDate:!0}).slice(1)}function xt(e,r,a,n,t=!1){if(n&&t)return Xs(n);let i=Dt("string",e);return r&&i.length>r&&(i=i.substring(0,r)),i}function ol(){return"192.168.0.1"}function sl(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}function ll(){return"example.com"}function ul(){return"приклад.укр"}function cl(){return"http://example.com"}function dl(){return"../dictionary"}function hl(){return"http://example.com/{endpoint}"}function ml(){return"http://example.com/entity/1"}function pl(){return"/entity/1"}function fl(e,r,a){return Ks(a||"id")}function yl(){return"/json/pointer"}function gl(){return"1/relative/json/pointer"}function bl(){return"/regex/"}const kl={email:el,"idn-email":al,password:rl,"date-time":nl,date:tl,time:il,ipv4:ol,ipv6:sl,hostname:ll,"idn-hostname":ul,iri:ml,"iri-reference":pl,uri:cl,"uri-reference":dl,"uri-template":hl,uuid:fl,default:xt,"json-pointer":yl,"relative-json-pointer":gl,regex:bl};function Cl(e,r,a,n){let t=e.format||"default",i=kl[t]||xt,o=n&&n.propertyName;return i(e.minLength||0,e.maxLength,o,e.pattern,r?.enablePatterns)}var Wt={};const vl={skipReadOnly:!1,maxSampleDepth:15};function Sl(e,r){if(!e)throw new Error("Unknown format output for building XML.");return(Array.isArray(e)||Object.keys(e).length>1)&&(e={[r?.xml?.name||"root"]:e}),new k.Builder({ignoreAttributes:!1,format:!0,attributeNamePrefix:"$",textNodeName:"#text",cdataPropName:"#cdata"}).build(e)}function wl(e,r,a){let n=Object.assign({},vl,r);Us();let t=Pe(e,n,a).value;return n?.format==="xml"?Sl(t,e):t}function da(e,r){Wt[e]=r}da("array",Ys);da("boolean",qs);da("integer",Ht);da("number",Ht);da("object",Zs);da("string",Cl);function Gt(e,r){if(e)try{return wl(e,{skipReadOnly:!0,skipNonRequired:!1,quiet:!0})}catch(a){r.error(k.bgRed(" Error while generating test data from JSON Schema ")+`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("./replay-index-Dlmw0x6l.js"),Sa=require("./replay-resolve-B-ubny1s.js"),xe=require("./replay-lint-DPvfVFm_.js");function Ls(e){return k.isPlainObject(e)&&"name"in e&&"value"in e&&!("in"in e)}function Fr(e){return k.isPlainObject(e)&&"in"in e&&typeof e.in=="string"&&["header","query","path","cookie"].includes(e.in)}const Ds=/^image\/(png|jpeg|gif|bmp|webp|svg\+xml)|application\/pdf$/;function Bt(e){return e.startsWith("$file(")&&e.endsWith(")")?e.substring(7,e.length-2):e}const Pn=async(e,r,a,n,t)=>{const i=k.pathBrowserifyExports.dirname(n),o=k.pathBrowserifyExports.resolve(i,Bt(a));e.append(r,await t.options.requestFileLoader.getFileBody(o))},Rt=(e,r,a,n,t,i)=>{Object.entries(a).forEach(([o,l])=>{const c=i?`${i}[${o}]`:o;typeof l=="string"&&l.startsWith("$file(")&&l.endsWith(")")?e.push(Pn(r,c,l,n,t)):Array.isArray(l)?l.forEach(u=>{typeof u=="string"&&u.startsWith("$file(")&&u.endsWith(")")?e.push(Pn(r,c,u,n,t)):r.append(c,u.toString())}):k.isPlainObject(l)?Rt(e,r,l,n,t,c):(typeof l=="string"||typeof l=="number"||typeof l=="boolean")&&r.append(c,l.toString())})},Ns=async(e,r,a,n)=>{if(k.isPlainObject(e)){const t=[];Rt(t,r,e,a,n),await Promise.all(t)}},Hs=async(e,r)=>{if(typeof e=="string"&&e.startsWith("$file(")&&e.endsWith(")")){const a=k.pathBrowserifyExports.resolve(k.pathBrowserifyExports.dirname(r.options.filePath),Bt(e));return r.options.requestFileLoader.getFileBody(a)}else return e};async function xs(e,r){if(!e)return{payload:void 0,contentType:void 0,encoding:void 0,replacements:void 0};const{payload:a,contentType:n}=e;if(n==="multipart/form-data"){const t=new FormData,i=k.pathBrowserifyExports.resolve(r.options.filePath);return await Ns(a,t,i,r),{...e,payload:t}}else{if(n==="application/octet-stream"||typeof n=="string"&&Ds.test(n))return{...e,payload:await Hs(a,r),contentType:"application/octet-stream"};if(n==="application/x-www-form-urlencoded"&&typeof a=="string")return{...e,payload:Object.fromEntries(new URLSearchParams(a).entries()),contentType:"application/x-www-form-urlencoded"}}return e}function Ws({payload:e,replacements:r,expressionContext:a,logger:n}){for(const t of r){const{target:i,value:o}=t;if(typeof i!="string")throw new Error(`Invalid JSON Pointer: ${i}`);try{const l=k.JsonPointerLib.get(e,i),c=k.evaluateRuntimeExpressionPayload({payload:o,context:a,logger:n});l!==void 0&&k.JsonPointerLib.set(e,i,c)}catch{throw new Error(`Invalid JSON Pointer: ${i}`)}}}const Gs=["parameters","failureActions","successActions"];function Fs(e,r){const{reference:a,value:n}=e;if(!Gs.some(i=>a.includes(`$components.${i}`)))throw new Error("Invalid reference: available components are $components.parameters, $components.failureActions, or $components.successActions");const t=k.getValueFromContext({value:a,ctx:r,logger:r.options.logger});return k.isPlainObject(t)&&"value"in t&&n?{...t,value:n}:t}function Ca(e,r){return"reference"in e?Fs(e,r):e}const ie={SUCCESS_CRITERIA_CHECK:"success criteria check",STATUS_CODE_CHECK:"status code check",SCHEMA_CHECK:"schema check",CONTENT_TYPE_CHECK:"content-type check",GLOBAL_TIMEOUT_ERROR:"global timeout error",MAX_STEPS_REACHED_ERROR:"maximum steps reached",NETWORK_ERROR:"failed network request",UNEXPECTED_ERROR:"unexpected error"};class Et extends Error{}class Pt extends Et{}class Lt extends Et{}async function Is(e){const{descriptionPath:r,externalRefResolver:a,base:n}=e,t=await xe.bundle({base:n,ref:r,config:e.config,dereference:!0,externalRefResolver:a});if(!t)throw new Error(`Could not find source description file '${r}'.`);return t.bundle.parsed}const Os={title:"[REPLACE WITH API title]",version:"[REPLACE WITH API version]"},Rr=Symbol("skip");function fa(e){return e<10?"0"+e:e}function $s(e,r,a,n){var t=a?"":e.getUTCFullYear()+"-"+fa(e.getUTCMonth()+1)+"-"+fa(e.getUTCDate());return r||(t+="T"+fa(e.getUTCHours())+":"+fa(e.getUTCMinutes())+":"+fa(e.getUTCSeconds())+"Z"),t}function Dt(e,r){return r>e.length?e.repeat(Math.trunc(r/e.length)+1).substring(0,r):e}function Ja(...e){const r=a=>a&&typeof a=="object";return e.reduce((a,n)=>(Object.keys(n||{}).forEach(t=>{const i=a[t],o=n[t];r(i)&&r(o)?a[t]=Ja(i,o):a[t]=o}),a),Array.isArray(e[e.length-1])?[]:{})}function Ks(e){var r=js(e),a=Vs(r,r,r,r),n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{var i=a()*16%16|0;return(t=="x"?i:i&3|8).toString(16)});return n}function cr(e){return{value:e==="object"?{}:e==="array"?[]:void 0}}function Je(e,r){r&&e.pop()}function Js(e){return{name:e?.xml?.name||"",prefix:e?.xml?.prefix||"",namespace:e?.xml?.namespace||null,attribute:e?.xml?.attribute??!1,wrapped:e?.xml?.wrapped??!1}}function zs(e){const r=e?.xml;return r?.nodeType?r.nodeType:r?.attribute===!0?"attribute":r?.wrapped===!0&&e?.type==="array"?"element":e?.$ref||e?.$dynamicRef||e?.type==="array"||e?.oneOf||e?.anyOf||e?.allOf?"none":"element"}function za(e,r={},a={}){const{value:n}=e,{propertyName:t}=a,{name:i,prefix:o,namespace:l}=Js(r),c=zs(r);let u=i||t?`${o?o+":":""}${i||t}`:null,h=typeof n=="object"?Array.isArray(n)?[...n]:{...n}:n;switch(c){case"attribute":u&&(u=`$${u}`);break;case"text":u="#text";break;case"cdata":u="#cdata";break;case"none":r.type==="array"?(u=null,r.example!==void 0&&(u=r.items?.xml?.name||u)):u=null;break;default:r.type==="array"&&Array.isArray(h)&&(h={[u]:[...h]});break}return l&&c!=="text"&&c!=="cdata"&&c!=="none"&&(typeof h=="object"?h[`$xmlns${o?":"+o:""}`]=l:h={[`$xmlns${o?":"+o:""}`]:l,"#text":h}),{propertyName:u,value:h}}function js(e){var r=0;if(e.length==0)return r;for(var a=0;a<e.length;a++){var n=e.charCodeAt(a);r=(r<<5)-r+n,r=r&r}return r}function Vs(e,r,a,n){return function(){e|=0,r|=0,a|=0,n|=0;var t=e-(r<<27|r>>>5)|0;return e=r^(a<<17|a>>>15),r=a+n|0,a=n+t|0,n=e+t|0,(n>>>0)/4294967296}}function _s(e,r,a,n,t){let i=Pe(e,a,n);const o=[];for(let l of r){const{type:c,readOnly:u,writeOnly:h,value:p}=Pe({type:i.type,...l},a,n,{...t,isAllOfChild:!0});i.type&&c&&c!==i.type&&(console.warn("allOf: schemas with different types can't be merged"),i.type=c),i.type=i.type||c,i.readOnly=i.readOnly||u,i.writeOnly=i.writeOnly||h,p!=null&&o.push(p)}if(i.type==="object"){i.value=Ja(i.value||{},...o.filter(l=>typeof l=="object"));for(const l in i.value)i.value[l]===Rr&&delete i.value[l];return i}else{i.type==="array"&&(a.quiet||console.warn('OpenAPI Sampler: found allOf with "array" type. Result may be incorrect'));const l=o[o.length-1];return i.value=l??i.value,i}}const Ln={multipleOf:"number",maximum:"number",exclusiveMaximum:"number",minimum:"number",exclusiveMinimum:"number",maxLength:"string",minLength:"string",pattern:"string",items:"array",maxItems:"array",minItems:"array",uniqueItems:"array",additionalItems:"array",maxProperties:"object",minProperties:"object",required:"object",additionalProperties:"object",properties:"object",patternProperties:"object",dependencies:"object"};function La(e){if(e.type!==void 0)return Array.isArray(e.type)?e.type.length===0?null:e.type[0]:e.type;const r=Object.keys(Ln);for(var a=0;a<r.length;a++){let n=r[a],t=Ln[n];if(e[n]!==void 0)return t}return null}let Ia={},Ee=[];function Us(){Ia={},Ee=[]}function Nt(e){let r;return e.const!==void 0?r=e.const:e.examples!==void 0&&e.examples.length?r=e.examples[0]:e.enum!==void 0&&e.enum.length?r=e.enum[0]:e.default!==void 0&&(r=e.default),r}function Dn(e){const r=Nt(e);if(r!==void 0)return{value:r,readOnly:e.readOnly,writeOnly:e.writeOnly,type:null}}function Pe(e,r,a,n){if(n){if(Ee.includes(e))return cr(La(e));Ee.push(e)}if(n&&n.depth>r.maxSampleDepth)return Je(Ee,n),cr(La(e));if(e.$ref){if(!a)throw new Error("Your schema contains $ref. You must provide full specification in the third parameter.");let l=decodeURIComponent(e.$ref);l.startsWith("#")&&(l=l.substring(1));const c=k.JsonPointerLib.get(a,l);let u;if(Ia[l]!==!0){Ia[l]=!0;const h=Pe(c,r,a,n);if(r.format==="xml"){const p=l.split("/").pop(),y={...n,propertyName:n?.propertyName||p},{propertyName:g,value:A}=za(h,c,y);u={...h,value:{[g||"root"]:A}}}else u=h;Ia[l]=!1}else{const h=La(c);u=cr(h)}return Je(Ee,n),u}if(e.example!==void 0)return Je(Ee,n),{value:e.example,readOnly:e.readOnly,writeOnly:e.writeOnly,type:e.type};if(e.allOf!==void 0)return Je(Ee,n),Dn(e)||_s({...e,allOf:void 0},e.allOf,r,a,n);if(e.oneOf&&e.oneOf.length){e.anyOf&&(r.quiet||console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf")),Je(Ee,n);const l=Object.assign({readOnly:e.readOnly,writeOnly:e.writeOnly},e.oneOf[0]);return o(e,l)}if(e.anyOf&&e.anyOf.length){Je(Ee,n);const l=Object.assign({readOnly:e.readOnly,writeOnly:e.writeOnly},e.anyOf[0]);return o(e,l)}if(e.if&&e.then){Je(Ee,n);const{if:l,then:c,...u}=e;return Pe(Ja(u,l,c),r,a,n)}let t=Nt(e),i=null;if(t===void 0){t=null,i=e.type,Array.isArray(i)&&e.type.length>0&&(i=e.type[0]),i||(i=La(e));let l=Wt[i];l&&(t=l(e,r,a,n))}return Je(Ee,n),{value:t,readOnly:e.readOnly,writeOnly:e.writeOnly,type:i};function o(l,c){const u=Dn(l);if(u!==void 0)return u;const h=Pe({...l,oneOf:void 0,anyOf:void 0},r,a,n),p=Pe(c,r,a,n);if(typeof h.value=="object"&&typeof p.value=="object"){const y=Ja(h.value,p.value);return{...p,value:y}}return p}}function Ys(e,r={},a,n){const t=n&&n.depth||1;let i=Math.min(e.maxItems!=null?e.maxItems:1/0,e.minItems||1);const o=e.prefixItems||e.items||e.contains;Array.isArray(o)&&(i=Math.max(i,o.length));let l=u=>Array.isArray(o)?o[u]||{}:o||{},c=[];if(!o)return c;for(let u=0;u<i;u++){let h=l(u),{value:p}=Pe(h,r,a,{depth:t+1});if(r?.format==="xml"){const{value:y,propertyName:g}=za({value:p},h,n);g?(c?.[g]||(c={...c,[g]:[]}),c[g].push(y)):c={...c,...y}}else c.push(p)}if(r?.format==="xml"&&t===1){const{value:u,propertyName:h}=za({value:null},e,n);h&&(u?c=Array.isArray(c)?{[h]:{...u,...c.map(p=>({"#text":{...p}}))}}:{[h]:{...c,...u}}:c={[h]:c})}return c}function qs(e){return!0}function Ht(e){let r=0;if(e.type==="number"&&(e.format==="float"||e.format==="double")&&(r=.1),typeof e.exclusiveMinimum=="boolean"||typeof e.exclusiveMaximum=="boolean"){if(Number.isFinite(e.maximum)&&Number.isFinite(e.minimum))return r=e.exclusiveMinimum?Math.floor(e.minimum)+1:e.minimum,(e.exclusiveMaximum&&r>=e.maximum||!e.exclusiveMaximum&&r>e.maximum)&&(r=(e.maximum+e.minimum)/2),r;if(Number.isFinite(e.minimum))return e.exclusiveMinimum?Math.floor(e.minimum)+1:e.minimum;if(Number.isFinite(e.maximum))return e.exclusiveMaximum?e.maximum>0?0:Math.floor(e.maximum)-1:e.maximum>0?0:e.maximum}else{if(Number.isFinite(e.minimum))return e.minimum;Number.isFinite(e.exclusiveMinimum)?(r=Math.floor(e.exclusiveMinimum)+1,r===e.exclusiveMaximum&&(r=(r+Math.floor(e.exclusiveMaximum)-1)/2)):Number.isFinite(e.exclusiveMaximum)?r=Math.floor(e.exclusiveMaximum)-1:Number.isFinite(e.maximum)&&(r=e.maximum)}return r}function Zs(e,r={},a,n){let t={};const i=n&&n.depth||1;if(e&&typeof e.properties=="object"){const o=Array.isArray(e.required)?e.required:[],l={};for(const c of o)l[c]=!0;Object.keys(e.properties).forEach(c=>{if(r.skipNonRequired&&!l.hasOwnProperty(c))return;const u=Pe(e.properties[c],r,a,{propertyName:c,depth:i+1});if(r.skipReadOnly&&u.readOnly){n?.isAllOfChild&&(t[c]=Rr);return}if(r.skipWriteOnly&&u.writeOnly){n?.isAllOfChild&&(t[c]=Rr);return}if(r?.format==="xml"){const{propertyName:h,value:p}=za(u,e.properties[c],{propertyName:c});h?t[h]=p:p!==null&&typeof p=="object"&&(t={...t,...p})}else t[c]=u.value})}if(e&&typeof e.additionalProperties=="object"){const o=e.additionalProperties["x-additionalPropertiesName"]||"property";t[`${String(o)}1`]=Pe(e.additionalProperties,r,a,{depth:i+1}).value,t[`${String(o)}2`]=Pe(e.additionalProperties,r,a,{depth:i+1}).value}if(e&&typeof e.properties=="object"&&e.maxProperties!==void 0&&Object.keys(t).length>e.maxProperties){const o={};let l=0;(Array.isArray(e.required)?e.required:[]).forEach(u=>{t[u]!==void 0&&(o[u]=t[u],l++)}),Object.keys(t).forEach(u=>{l<e.maxProperties&&!o.hasOwnProperty(u)&&(o[u]=t[u],l++)}),t=o}return t}function wa(e,r){return e}function Nn(e,r,a){let n=1;if(e)switch(e){case"?":{n=0;break}case"*":{n=wa(0);break}case"+":{n=wa(1);break}default:throw new Error("Unknown quantifier symbol provided.")}else r!=null&&a!=null?n=wa(parseInt(r)):r!=null&&a==null&&(n=parseInt(r));return n}function Xs(e){let r=!1;e instanceof RegExp&&(r=e.flags.includes("i"),e=e.toString(),e=e.match(/\/(.+?)\//)?.[1]??""),e=e.replace(/^(\^)?(.*?)(\$)?$/,"$2");let a,n,t;const i=/([.A-Za-z0-9])(?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+))(?![^[]*]|[^{]*})/;let o=e.match(i);for(;o!=null;){const p=o[2],y=o[3],g=o[4];t=Nn(g,p,y),e=e.slice(0,o.index)+o[1].repeat(t)+e.slice(o.index+o[0].length),o=e.match(i)}const l=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,c=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+)|)/;for(o=e.match(c);o!=null;){const p=o[1]==="^",y=o[2]==="-",g=o[4],A=o[5],R=o[6],E=[];let $=o[3],W=$.match(l);for(y&&E.push(45);W!=null;){if(W[0].indexOf("-")===-1)r&&isNaN(Number(W[0]))?(E.push(W[0].toUpperCase().charCodeAt(0)),E.push(W[0].toLowerCase().charCodeAt(0))):E.push(W[0].charCodeAt(0));else{const v=W[0].split("-").map(b=>b.charCodeAt(0));if(a=v[0],n=v[1],a>n)throw new Error("Character range provided is out of order.");for(let b=a;b<=n;b++)if(r&&isNaN(Number(String.fromCharCode(b)))){const T=String.fromCharCode(b);E.push(T.toUpperCase().charCodeAt(0)),E.push(T.toLowerCase().charCodeAt(0))}else E.push(b)}$=$.substring(W[0].length),W=$.match(l)}if(t=Nn(R,g,A),p){let v=-1;for(let b=48;b<=57;b++){if(v=E.indexOf(b),v>-1){E.splice(v,1);continue}E.push(b)}for(let b=65;b<=90;b++){if(v=E.indexOf(b),v>-1){E.splice(v,1);continue}E.push(b)}for(let b=97;b<=122;b++){if(v=E.indexOf(b),v>-1){E.splice(v,1);continue}E.push(b)}}const K=Array.from({length:t},()=>String.fromCharCode(E[wa(0)])).join("");e=e.slice(0,o.index)+K+e.slice(o.index+o[0].length),o=e.match(c)}const u=/(.)\{(\d+)\,(\d+)\}/;for(o=e.match(u);o!=null;){if(a=parseInt(o[2]),n=parseInt(o[3]),a>n)throw new Error("Numbers out of order in {} quantifier.");t=wa(a),e=e.slice(0,o.index)+o[1].repeat(t)+e.slice(o.index+o[0].length),o=e.match(u)}const h=/(.)\{(\d+)\}/;for(o=e.match(h);o!=null;)t=parseInt(o[2]),e=e.slice(0,o.index)+o[1].repeat(t)+e.slice(o.index+o[0].length),o=e.match(h);return e}const Qs="qwerty!@#$%^123456";function el(){return"user@example.com"}function al(){return"пошта@укр.нет"}function rl(e,r){let a="pa$$word";return e>a.length&&(a+="_",a+=Dt(Qs,e-a.length).substring(0,e-a.length)),a}function Ir({min:e,max:r,omitTime:a,omitDate:n}){let t=$s(new Date("2019-08-24T14:15:22.123Z"),a,n);return t.length<e&&console.warn(`Using minLength = ${e} is incorrect with format "date-time"`),r&&t.length>r&&console.warn(`Using maxLength = ${r} is incorrect with format "date-time"`),t}function nl(e,r){return Ir({min:e,max:r,omitTime:!1,omitDate:!1})}function tl(e,r){return Ir({min:e,max:r,omitTime:!0,omitDate:!1})}function il(e,r){return Ir({min:e,max:r,omitTime:!1,omitDate:!0}).slice(1)}function xt(e,r,a,n,t=!1){if(n&&t)return Xs(n);let i=Dt("string",e);return r&&i.length>r&&(i=i.substring(0,r)),i}function ol(){return"192.168.0.1"}function sl(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}function ll(){return"example.com"}function ul(){return"приклад.укр"}function cl(){return"http://example.com"}function dl(){return"../dictionary"}function hl(){return"http://example.com/{endpoint}"}function ml(){return"http://example.com/entity/1"}function pl(){return"/entity/1"}function fl(e,r,a){return Ks(a||"id")}function yl(){return"/json/pointer"}function gl(){return"1/relative/json/pointer"}function bl(){return"/regex/"}const kl={email:el,"idn-email":al,password:rl,"date-time":nl,date:tl,time:il,ipv4:ol,ipv6:sl,hostname:ll,"idn-hostname":ul,iri:ml,"iri-reference":pl,uri:cl,"uri-reference":dl,"uri-template":hl,uuid:fl,default:xt,"json-pointer":yl,"relative-json-pointer":gl,regex:bl};function Cl(e,r,a,n){let t=e.format||"default",i=kl[t]||xt,o=n&&n.propertyName;return i(e.minLength||0,e.maxLength,o,e.pattern,r?.enablePatterns)}var Wt={};const vl={skipReadOnly:!1,maxSampleDepth:15};function Sl(e,r){if(!e)throw new Error("Unknown format output for building XML.");return(Array.isArray(e)||Object.keys(e).length>1)&&(e={[r?.xml?.name||"root"]:e}),new k.Builder({ignoreAttributes:!1,format:!0,attributeNamePrefix:"$",textNodeName:"#text",cdataPropName:"#cdata"}).build(e)}function wl(e,r,a){let n=Object.assign({},vl,r);Us();let t=Pe(e,n,a).value;return n?.format==="xml"?Sl(t,e):t}function da(e,r){Wt[e]=r}da("array",Ys);da("boolean",qs);da("integer",Ht);da("number",Ht);da("object",Zs);da("string",Cl);function Gt(e,r){if(e)try{return wl(e,{skipReadOnly:!0,skipNonRequired:!1,quiet:!0})}catch(a){r.error(k.bgRed(" Error while generating test data from JSON Schema ")+`
|
|
2
2
|
`+a);return}}function Al(e,r){if(e?.example)return e.example;if(k.isPlainObject(e?.examples))return Ft(e.examples);if(e?.schema)return Gt(e.schema,r)}function Ft(e){if(k.isPlainObject(e)){const r=Object.keys(e)[0];return r?e[r]?.value:void 0}else return}function Tl(e,r){const a=e?.requestBody?.content||{},[n,t]=Object.entries(a)[0]||[],i=t?.example||Ft(t?.examples)||Gt(t?.schema,r),o=Ml(e);return{parameters:Bl([...Hn(e.pathParameters,r),...Hn(e.parameters,r)]).filter(({value:c})=>c),contentTypeParameters:[...n?[{name:"content-type",in:"header",value:n}]:[],...o?[{name:"accept",in:"header",value:o}]:[]],requestBody:i,contentType:n}}function Ml(e){return e?.responses?Array.from(new Set(Object.values(e.responses).flatMap(r=>k.isPlainObject(r)&&"content"in r?Object.keys(r.content||{}):[]))).join(", "):void 0}function Hn(e,r){return(e||[]).filter(a=>a?.required===!0).map(a=>{if(Fr(a))return{name:a.name,in:a.in,value:Al(a,r),...a.allowReserved&&{allowReserved:a.allowReserved}}}).filter(a=>a!==void 0)}function Bl(e){const r={};for(const a of e)Fr(a)&&(r[(a.name+":"+a.in).toLowerCase()]=a);return Object.values(r)}function Rl(e,r){let a,n;if(e.includes("$sourceDescriptions.")){const[,c,u]=e.split(".");a=c,n=u}else e.includes(".")?[a,n]=e.split("."):(n=e,a=Object.keys(r)[0]);const t=Object.keys(r);if(!r[a])throw new Error(`Unknown description name ${k.red(a)} at ${k.red(e)}. Available descriptions: ${t.join(", ")}.`);const i=r[a],o=i?.components?.securitySchemes,l=i.servers;for(const[c,u]of Object.entries(r[a].paths)){if(!u)return;for(const[h,p]of Object.entries(u))if(p.operationId===n)return{servers:u.servers||l,...p,pathParameters:p.parameters||[],path:c,method:h,descriptionName:a,securitySchemes:o}}throw new Error(`Unknown operationId ${k.red(n)} at ${k.red(e)}.`)}function El(e,r){const{$sourceDescriptions:a,sourceDescriptions:n}=r,[t,i]=e.split("#");if(!n)throw new Error("Missing described sourceDescriptions");const o=n.find(R=>{if(["openapi","arazzo"].includes(R.type)){if(t.includes("$sourceDescriptions.")){const[,E]=t.split(".");return R.name===E}return"url"in R&&R.url===t}return!1})?.name;if(!o)throw new Error(`Unknown operationPath ${k.red(e)}. API description ${k.red(t)} is not listed in 'sourceDescriptions' workflow section.`);const l=a[o]||{},c=l?.components?.securitySchemes,[u,h,p]=k.JsonPointerLib.parse(i);if(u!=="paths")throw new Error(`Invalid fragment identifier: ${i} at operationPath ${k.red(e)}.`);const{servers:y}=l,g=k.JsonPointerLib.get(l,i)||{},A=k.JsonPointerLib.get(l,k.JsonPointerLib.compile(["paths",h]))||{};return{servers:A.servers||y,...g,pathParameters:A.parameters||[],path:h,method:p,descriptionName:o,securitySchemes:c}}function Pl(e,r){if(!e.operationId&&!e.operationPath)return;const{$sourceDescriptions:a,sourceDescriptions:n}=r,{operationId:t,operationPath:i}=e;return t?Rl(t,a):i?El(i,{$sourceDescriptions:a,sourceDescriptions:n}):void 0}function Ll({statusCode:e,contentType:r,descriptionResponses:a}){return a?(a[e]||a.default)?.content?.[r]?.schema:void 0}function Dl(e,r){if(!r)return;const n=r.requestBody?.content;return n&&n[e]?.schema||void 0}function It({ctx:e,security:r,operation:a}){const{scheme:n,schemeName:t}=r;if(n)return r.scheme;if(t){if(typeof t=="string"&&t.startsWith("$sourceDescriptions.")){const[i,o,l]=t.split("."),u=(o&&e.$sourceDescriptions[o])?.components?.securitySchemes;return l&&u?u[l]:void 0}return a?.securitySchemes?.[t]}}function Da(){}function xn(){return typeof WeakMap<"u"?new WeakMap:Nl()}function Nl(){return{add:Da,delete:Da,get:Da,set:Da,has:function(e){return!1}}}var Hl=Object.prototype.hasOwnProperty,Er=function(e,r){return Hl.call(e,r)};function dr(e,r){for(var a in r)Er(r,a)&&(e[a]=r[a]);return e}var xl=/^[ \t]*(?:\r\n|\r|\n)/,Wl=/(?:\r\n|\r|\n)[ \t]*$/,Gl=/^(?:[\r\n]|$)/,Fl=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,Il=/^[ \t]*[\r\n][ \t\r\n]*$/;function Wn(e,r,a){var n=0,t=e[0].match(Fl);t&&(n=t[1].length);var i="(\\r\\n|\\r|\\n).{0,"+n+"}",o=new RegExp(i,"g");r&&(e=e.slice(1));var l=a.newline,c=a.trimLeadingNewline,u=a.trimTrailingNewline,h=typeof l=="string",p=e.length,y=e.map(function(g,A){return g=g.replace(o,"$1"),A===0&&c&&(g=g.replace(xl,"")),A===p-1&&u&&(g=g.replace(Wl,"")),h&&(g=g.replace(/\r\n|\n|\r/g,function(R){return l})),g});return y}function Ol(e,r){for(var a="",n=0,t=e.length;n<t;n++)a+=e[n],n<t-1&&(a+=r[n]);return a}function $l(e){return Er(e,"raw")&&Er(e,"length")}function Ot(e){var r=xn(),a=xn();function n(i){for(var o=[],l=1;l<arguments.length;l++)o[l-1]=arguments[l];if($l(i)){var c=i,u=(o[0]===n||o[0]===He)&&Il.test(c[0])&&Gl.test(c[1]),h=u?a:r,p=h.get(c);if(p||(p=Wn(c,u,e),h.set(c,p)),o.length===0)return p[0];var y=Ol(p,u?o.slice(1):o);return y}else return Ot(dr(dr({},e),i||{}))}var t=dr(n,{string:function(i){return Wn([i],!1,e)[0]}});return t}var He=Ot({trimLeadingNewline:!0,trimTrailingNewline:!0});if(typeof module<"u")try{module.exports=He,Object.defineProperty(He,"__esModule",{value:!0}),He.default=He,He.outdent=He}catch{}function Kl(e){return!Sa.isBrowser&&process.env.NODE_ENV==="test"?"<test>ms":`${Math.ceil(performance.now()-e)}ms`}function qa(e){const r=e.length;let a=0,n=0,t=0,i=0,o=0,l=0,c=0;const u=new Set;let h=0;const p=new Set,y=new Set;for(const g of e){const A=$t(g.executedSteps);let R=!1;for(const E of A){if(i++,E.retriesLeft&&E.retriesLeft!==0)continue;t++;let $=!1;for(const W of E.checks)if(n++,!W.passed)switch(W.severity){case"warn":o++,u.add(g.workflowId),y.add(g.workflowId+":"+E.stepId);break;case"off":l++,p.add(g.workflowId+":"+E.stepId);break;default:a++,$=!0}$&&(h++,R=!0)}R&&c++}return{workflows:{passed:r-c,failed:c,warnings:u.size,skipped:0,total:r},steps:{passed:t-h,failed:h,warnings:y.size,skipped:p.size,total:t},checks:{passed:n-a,failed:a,warnings:o,skipped:l,total:n},totalRequests:i}}function $t(e){return e.flatMap(r=>"executedSteps"in r?$t(r.executedSteps):[r])}function Jl(e){try{return JSON.parse(e),!0}catch{return!1}}function zl(e,r){const a=e.endsWith("/")?e.slice(0,-1):e,n=r.startsWith("/")?r.slice(1):r;return`${a}/${n}`}const Gn=50;function Kt({testNameToDisplay:e,checks:r,verboseLogs:a,verboseResponseLogs:n,logger:t}){const i=r.every(({passed:o})=>o);t.output(` ${i?k.green("✓"):k.red("✗")} ${k.blue(e)}`),a&&(t.output(`${ke}
|
|
3
3
|
`+(Fn({logs:a,logger:t})||"")),t.printNewLine()),n&&(t.output(`${ke}
|
|
4
4
|
`+(Fn({logs:n,type:"response",logger:t})||"")),t.printNewLine()),t.printNewLine();for(const o of r)t.output(`${ne(jl(o,o.severity),4)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-Dlmw0x6l.js");async function u(r,n){const t=e.sep(),l=await e.resolve(r),c=await e.resolve(n),a=l.replace(new RegExp(`^${t}+`),"").split(t).filter(Boolean),i=c.replace(new RegExp(`^${t}+`),"").split(t).filter(Boolean),m=Math.min(a.length,i.length);let s=0;for(let o=0;o<m&&a[o]===i[o];o++)s++;const p=a.slice(s).map(()=>".."),f=i.slice(s);return[...p,...f].join(t)}async function g(r){const n=await e.extname(r);return n?`.${n}`:""}exports.dirname=e.dirname;exports.isAbsolute=e.isAbsolute;exports.join=e.join;exports.resolve=e.resolve;exports.extname=g;exports.relative=u;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { k as h, s as x, l as i } from "./replay-index-
|
|
2
|
-
import { n as j, o as b, j as k } from "./replay-index-
|
|
1
|
+
import { k as h, s as x, l as i } from "./replay-index-DfpfSyMZ.js";
|
|
2
|
+
import { n as j, o as b, j as k } from "./replay-index-DfpfSyMZ.js";
|
|
3
3
|
async function u(a, e) {
|
|
4
4
|
const t = x(), l = await i(a), c = await i(e), o = l.replace(new RegExp(`^${t}+`), "").split(t).filter(Boolean), s = c.replace(new RegExp(`^${t}+`), "").split(t).filter(Boolean), m = Math.min(o.length, s.length);
|
|
5
5
|
let r = 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const Oe=require("react"),a=require("./replay-index-
|
|
1
|
+
"use strict";const Oe=require("react"),a=require("./replay-index-Dlmw0x6l.js"),m=require("./replay-db-CEncswPh.js"),r=require("./replay-create-model-nf-dFfMt.js"),A=require("./replay-SemanticSearchService-CeHFhNDz.js"),Ee=require("@tanstack/react-query"),M={path:"pathParameters",query:"queryParameters",header:"headers",cookie:"cookies"},mt={run_request:{approveLabel:"Run",denyLabel:"Skip"},update_step:{approveLabel:"Apply",denyLabel:"Dismiss"},update_security:{approveLabel:"Apply",denyLabel:"Dismiss"}},ht={set_active_environment:{approveLabel:"Switch",denyLabel:"Cancel"},add_environment:{approveLabel:"Add",denyLabel:"Cancel"},upsert_input:{approveLabel:"Set",denyLabel:"Cancel"},upsert_server:{approveLabel:"Set",denyLabel:"Cancel"},remove_input:{approveLabel:"Remove",denyLabel:"Cancel"},remove_server:{approveLabel:"Remove",denyLabel:"Cancel"},create_collection:{approveLabel:"Create",denyLabel:"Cancel"},create_workflow:{approveLabel:"Create",denyLabel:"Cancel"},create_step:{approveLabel:"Create",denyLabel:"Cancel"},move_step:{approveLabel:"Move",denyLabel:"Cancel"},delete_collection:{approveLabel:"Delete",denyLabel:"Cancel"},delete_workflow:{approveLabel:"Delete",denyLabel:"Cancel"},delete_step:{approveLabel:"Delete",denyLabel:"Cancel"},save_tab_to_collection:{approveLabel:"Save",denyLabel:"Cancel"}},yt={CHAT:"chat",HISTORY:"history"},It="report_status",wt="run_workflow",j={WEB_SEARCH:"web_search"};function gt(e){switch(e.provider){case a.AI_PROVIDERS.GEMINI:return{[j.WEB_SEARCH]:r.google.tools.googleSearch({})};case a.AI_PROVIDERS.OPENAI:return{[j.WEB_SEARCH]:r.openai.tools.webSearch({})};case a.AI_PROVIDERS.ANTHROPIC:return{[j.WEB_SEARCH]:r.anthropic.tools.webFetch_20250910()};case a.REUNITE_AI_PROVIDER:return{[j.WEB_SEARCH]:{type:"provider",id:"reunite.web_search",name:"web_search",args:{}}};default:return{}}}const bt=["info","workflows","sourceDescriptions"];function vt(e){const t=[];return e.collectionId&&t.push(`Collection ID: ${e.collectionId}`),e.collection?.info?.title&&t.push(`Title: ${e.collection.info.title}`),e.collection?.info?.summary&&t.push(`Summary: ${e.collection.info.summary}`),e.collection?.info?.description&&t.push(`Description: ${e.collection.info.description}`),m.buildMessageFromArray(t,`
|
|
2
2
|
`)}function Tt(e){const t=[];if(e.collection?.workflows?.length){t.push("Workflows:");for(const o of e.collection.workflows)t.push(` workflowId=${o.workflowId} ${o.summary??""}`)}return m.buildMessageFromArray(t,`
|
|
3
3
|
`)}function St(e){const t=[];if(e.collection?.sourceDescriptions?.length){t.push("Source descriptions:");for(const o of e.collection.sourceDescriptions)t.push(` name=${o.name} url=${o.url}`)}return m.buildMessageFromArray(t,`
|
|
4
4
|
`)}function kt(e,t){const o=["Current tab (collection)"];for(const n of t)switch(n){case"info":o.push(vt(e));break;case"workflows":o.push(Tt(e));break;case"sourceDescriptions":o.push(St(e));break}return m.buildMessageFromArray(o,`
|
|
@@ -38,7 +38,7 @@ ${de(f.step.response?.body,t,m.RESPONSE_BODY_PREVIEW_MAX,!0)}`:`Full response bo
|
|
|
38
38
|
`)}function no(e,t){const o=e.secretValues?[...e.secretValues]:void 0;if(e.runStatus==="running")return"Run status: RUNNING - the workflow is still executing; re-read this section to get the outcome, which will be reported as SUCCEEDED or FAILED once the run finishes.";if(e.runStatus==="error"){const n=`Run status: FAILED - execution error: ${a.maskSecretsInText(e.runError||"unknown error",o)}`;return e.result?`${n}
|
|
39
39
|
(the stored result is from an earlier run and is omitted as stale)`:n}return e.result?oo(e.result,o,t?.stepIds):"Run status: NOT STARTED - no run has executed on this tab yet."}function ro(e,t,o){const n=["Current tab (workflow run)"];for(const s of t)switch(s){case"info":n.push(Qt(e));break;case"severity":n.push(Zt(e));break;case"result":n.push(no(e,o));break}return m.buildMessageFromArray(n,`
|
|
40
40
|
|
|
41
|
-
`)}function so(e,t=["info"],o){if(!e)return null;switch(e.type){case a.TabDataType.Step:return Bt(e,t);case a.TabDataType.Workflow:return qt(e,t);case a.TabDataType.Collection:return kt(e,t);case a.TabDataType.WorkflowRun:return ro(e,t,o)}}function io(e){switch(e.type){case a.TabDataType.Collection:return bt;case a.TabDataType.Workflow:return Ot;case a.TabDataType.Step:return Ut;case a.TabDataType.WorkflowRun:return Kt}}function Re(e){return e.trim().replace(/\s+/g," ").replace(
|
|
41
|
+
`)}function so(e,t=["info"],o){if(!e)return null;switch(e.type){case a.TabDataType.Step:return Bt(e,t);case a.TabDataType.Workflow:return qt(e,t);case a.TabDataType.Collection:return kt(e,t);case a.TabDataType.WorkflowRun:return ro(e,t,o)}}function io(e){switch(e.type){case a.TabDataType.Collection:return bt;case a.TabDataType.Workflow:return Ot;case a.TabDataType.Step:return Ut;case a.TabDataType.WorkflowRun:return Kt}}function Re(e){return e.trim().replace(/\s+/g," ").replace(new RegExp("(?<![.!?:;,…])[.!?:;,…]+$"),"").toLowerCase()}function ao(e,t){const o=[];let n=0;for(const s of e??[])if(!(s.role!=="assistant"||!Array.isArray(s.content)))for(const i of s.content)i.type==="tool-call"&&(i.toolName===t?(n+=1,o.push(i.input)):n=0);return{priorInputs:o,consecutiveCalls:n}}function co(e,t,o){const n=[];let s=!1;for(const i of e){const c=i(t,o);c&&(n.push(c.message),c.action==="block"&&(s=!0))}return{blocked:s,notes:n}}function xe(e){const t=e.warn!==void 0?"warn":"block",o=e.warn!==void 0?e.warn:e.block;return(n,s)=>{const i=ue(e.key,n);return i===null?null:s.priorInputs.some(d=>ue(e.key,d)===i)?{action:t,message:o}:null}}function ue(e,t){try{return e(t)}catch{return null}}function lo(e){const t=pe("warn",e.warnAfter,e.warnMessage),o=pe("block",e.blockAfter,e.blockMessage);if(!t&&!o)throw new Error("consecutiveCallsRule requires at least warnAfter or blockAfter");if(t&&o&&o.after<=t.after)throw new Error("consecutiveCallsRule requires blockAfter to be greater than warnAfter");return(n,s)=>{const i=s.consecutiveCalls+1;return o&&i>=o.after?{action:"block",message:o.message(i)}:t&&i>=t.after?{action:"warn",message:t.message(i)}:null}}function pe(e,t,o){if(!(t===void 0&&o===void 0)){if(t===void 0||o===void 0)throw new Error(`consecutiveCallsRule requires ${e}After and ${e}Message together`);if(!Number.isInteger(t)||t<1)throw new Error(`consecutiveCallsRule requires ${e}After to be a positive integer`);return{after:t,message:o}}}function uo(e){if(!e||typeof e.safeParse!="function")return;const t=e;return o=>{const n=t.safeParse(o);return n.success?n.data:null}}function po(e,t,o,n){return!t||t.length===0?o:async(s,i)=>{const c=ao(i?.messages,e),d={consecutiveCalls:c.consecutiveCalls,priorInputs:n?c.priorInputs.map(n).filter(p=>p!==null):c.priorInputs},l=co(t,s,d);if(l.blocked)return{isError:!1,blocked:!0,note:l.notes.join(" ")};const u=await o(s,i);return l.notes.length===0||!fo(u)?u:{...u,note:[u.note,...l.notes].filter(Boolean).join(" ")}}}function fo(e){return e!==null&&typeof e=="object"&&e.isError===!1}function mo(e,t){return{name:e.name,definition:e.definition,execute:po(e.name,e.guards,e.createExecutor(t),uo(e.definition.inputSchema))}}const ho={messages:[],isStreaming:!1,sendMessage:async()=>{},updateMessages:()=>{},stopGeneration:()=>{},addToolApprovalResponse:()=>{},chatStatus:"ready",chatError:void 0},$e=Oe.createContext(ho);function yo(){return Oe.useContext($e)}const Io=r.objectType({message:r.stringType(),details:r.unknownType().optional()}),oe=r.objectType({action:r.enumType(["add","update","remove"]).describe('Action to perform: "add", "update" or "remove".'),approved:r.booleanType().default(!0)}),$=oe.extend({id:r.stringType().optional().describe("Existing item id. Required for update/remove actions.")}),wo=oe.extend({index:r.numberType().int().min(0).optional().describe("Existing item index. Required for update/remove actions.")}),go=r.objectType({isError:r.literalType(!1),blocked:r.literalType(!0),note:r.stringType(),data:r.neverType().optional(),error:r.neverType().optional()});function C(e){return r.unionType([r.objectType({isError:r.literalType(!0),error:Io,data:r.neverType().optional(),blocked:r.neverType().optional()}),r.objectType({isError:r.literalType(!1),data:e,error:r.neverType().optional(),note:r.stringType().optional(),blocked:r.neverType().optional()}),go])}const bo=r.objectType({status:r.enumType(["applied","failed"]),summary:r.stringType().optional()}),vo=r.objectType({totalChanges:r.numberType().int().min(0),approvedChanges:r.numberType().int().min(0),applied:r.arrayType(bo),resultingState:r.stringType().optional().describe("Resulting state of the mutated fields after all changes were applied.")}),Pe=C(vo),To="Read structured state from the **active** Replay tab.\n\n**What it does**\n- Returns structured data for the active tab.\n- Read-only: does not open/switch tabs and does not mutate saved or unsaved content.\n- Returns UI-facing tab data (editable fields, configured values, responses/results), not a full OpenAPI schema dump.\n\n**Use when**\n- You need to verify UI state in the active tab after an action (edit, save, execute, rerun, tab switch).\n- You need to inspect request/response/result content as rendered in Replay UI.\n\n**Never use when**\n- You are gathering **initial schema/context** for a request from project assets (OpenAPI/Arazzo); use project-asset lookup with exact ids/coordinates.\n- You need IDs or operation/workflow coordinates from project assets; resolve them via project-asset lookup, not active-tab UI reads.\n- You need a different tab; this tool never changes focus.\n- You need to run a request or change any saved/unsaved tab content; this tool is strictly read-only.\n\n**Input guidance**\n- Treat IDs from `info` as canonical for follow-up actions.\n- Request only needed sections and combine them in one call.\n- Prefer including `info` unless you need only one slice.\n- Sections by tab type:\n - Collection tab: `info`, `workflows`, `sourceDescriptions`.\n - Workflow tab: `info`, `inputs`, `parameters`, `security`, `outputs`, `steps`, `wiring` (every step's security bindings + outputs in one call - inspect or verify multi-step wiring without opening step tabs).\n - Step tab: `info`, `parameters`, `requestBody`, `security`, `outputs`, `successCriteria`, `response`.\n - Workflow run tab: `info`, `result` (status, per-step outcomes, masked bodies; `stepIds` fetches full ones), `severity`.\n- Invalid sections are skipped; if none apply, response falls back to `info`.\n\n**Loop/budget guidance**\n- Read each needed section once per turn.\n- Re-read only after mutation/save, or when you need to inspect new output.\n- If `result` is RUNNING, re-read until the run finishes.",So=r.enumType(["info","workflows","sourceDescriptions","inputs","parameters","security","outputs","steps","wiring","requestBody","successCriteria","response","result","severity"]),ko=r.strictObjectType({sections:r.arrayType(So).min(1).describe("Content blocks to include in the response. Use tab-type-specific sections from the tool description; invalid sections for the current tab are ignored."),stepIds:r.arrayType(r.stringType()).min(1).optional().describe("Workflow run tabs only, together with the `result` section: executed step ids to return the full (secret-masked) response body for. Use after the per-step preview proves insufficient.")}),Ao=r.objectType({message:r.stringType()}),Co=C(Ao),Oo={description:To,inputSchema:ko,outputSchema:Co,needsApproval:!1};function y(e,t){return{isError:!0,error:{message:e,details:t}}}function Eo(e,t){const o=io(e),n=[],s=[];for(const i of t)o.includes(i)?n.push(i):s.push(i);return{sections:n,skipped:s}}function _o(e){return async(t,o)=>{const n=e();if(!n)return y("No active tab data available.");const{sections:s,skipped:i}=Eo(n,t.sections),c=s.length>0?s:["info"];let l=so(n,c,{stepIds:t.stepIds})??"Unable to build a summary for the active tab.";return i.length>0&&(l+=`
|
|
42
42
|
|
|
43
43
|
(Sections not applicable for this tab type were omitted: ${i.join(", ")}.)`),s.length===0&&t.sections.length>0&&(l+="\n\n(No requested sections applied to this tab type; showing `info` instead.)"),t.stepIds?.length&&(n.type!==a.TabDataType.WorkflowRun?l+=`
|
|
44
44
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useContext as Ht, createContext as Gt } from "react";
|
|
2
|
-
import { R as Vt, A as be, aP as re, aQ as Kt, aR as Jt, aS as Qt, aa as x, a as de, aF as Y, aT as mt, aU as Oe, aE as Ee, aV as ht, aW as ue, aX as Z, c as b, aY as Xt, al as G, aj as V, aZ as It, a_ as pe, ak as $e, a$ as Zt, b0 as eo, b1 as to, b2 as oo, b3 as no, b4 as ro, b5 as so, ad as K, b6 as ao, ae as ee, a8 as io, b7 as co, b8 as lo, b9 as wt, ba as yt, bb as uo, bc as vt, bd as xe, be as Ae, ag as J, bf as po, a9 as gt, bg as _e, az as bt, bh as fo, bi as mo, C as k, bj as Be, bk as ho, bl as Ye, bm as Io, bn as wo, bo as yo, a7 as kt, a6 as St } from "./replay-index-
|
|
3
|
-
import { b as C, f as Tt, a as Ct, c as Ot, d as fe, e as At, i as ze, h as Re, R as z, j as vo, k as go, p as bo, s as He, l as ko } from "./replay-db-
|
|
4
|
-
import { b as So, o as To, d as Co, e as p, u as me, f as i, h as R, j as E, n as A, k as B, m as I, q as T, r as Pe, t as te, v as he, Z as H, w as Oo, x as Ge, c as Ao, s as Eo, y as $o } from "./replay-create-model-
|
|
5
|
-
import { g as xo, e as Ve, a as _o, b as Ro, c as Ke, d as Po, f as qo } from "./replay-SemanticSearchService-
|
|
2
|
+
import { R as Vt, A as be, aP as re, aQ as Kt, aR as Jt, aS as Qt, aa as x, a as de, aF as Y, aT as mt, aU as Oe, aE as Ee, aV as ht, aW as ue, aX as Z, c as b, aY as Xt, al as G, aj as V, aZ as It, a_ as pe, ak as $e, a$ as Zt, b0 as eo, b1 as to, b2 as oo, b3 as no, b4 as ro, b5 as so, ad as K, b6 as ao, ae as ee, a8 as io, b7 as co, b8 as lo, b9 as wt, ba as yt, bb as uo, bc as vt, bd as xe, be as Ae, ag as J, bf as po, a9 as gt, bg as _e, az as bt, bh as fo, bi as mo, C as k, bj as Be, bk as ho, bl as Ye, bm as Io, bn as wo, bo as yo, a7 as kt, a6 as St } from "./replay-index-DfpfSyMZ.js";
|
|
3
|
+
import { b as C, f as Tt, a as Ct, c as Ot, d as fe, e as At, i as ze, h as Re, R as z, j as vo, k as go, p as bo, s as He, l as ko } from "./replay-db-B7DOUIxd.js";
|
|
4
|
+
import { b as So, o as To, d as Co, e as p, u as me, f as i, h as R, j as E, n as A, k as B, m as I, q as T, r as Pe, t as te, v as he, Z as H, w as Oo, x as Ge, c as Ao, s as Eo, y as $o } from "./replay-create-model-DT8aanzL.js";
|
|
5
|
+
import { g as xo, e as Ve, a as _o, b as Ro, c as Ke, d as Po, f as qo } from "./replay-SemanticSearchService-CdF1TQ_0.js";
|
|
6
6
|
import { useInfiniteQuery as No, useQuery as Uo } from "@tanstack/react-query";
|
|
7
7
|
const se = {
|
|
8
8
|
path: "pathParameters",
|
|
@@ -504,7 +504,7 @@ function An(e) {
|
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
506
|
function $t(e) {
|
|
507
|
-
return e.trim().replace(/\s+/g, " ").replace(
|
|
507
|
+
return e.trim().replace(/\s+/g, " ").replace(new RegExp("(?<![.!?:;,…])[.!?:;,…]+$"), "").toLowerCase();
|
|
508
508
|
}
|
|
509
509
|
function En(e, t) {
|
|
510
510
|
const o = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./replay-create-model-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./replay-create-model-nf-dFfMt.js"),n=require("./replay-index-Dlmw0x6l.js"),l=require("./replay-defaults-DVvOnvnR.js");async function s(t,a,o,i){try{const e=r.createModel({provider:t,modelId:o,apiKey:a});return await r.generateText({model:e,prompt:l.VALIDATION_PROMPT,maxOutputTokens:n.MAX_OUTPUT_TOKENS_FOR_VALIDATION,abortSignal:i?.abortSignal}),{valid:!0}}catch(e){if(e instanceof Error&&e.name==="AbortError")throw e;return{valid:!1,error:e instanceof Error&&e.message.length>0?e.message:"Validation failed. Please try again."}}}exports.validateApiKey=s;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as i, g as n } from "./replay-create-model-
|
|
2
|
-
import { M as s } from "./replay-index-
|
|
1
|
+
import { c as i, g as n } from "./replay-create-model-DT8aanzL.js";
|
|
2
|
+
import { M as s } from "./replay-index-DfpfSyMZ.js";
|
|
3
3
|
import { V as l } from "./replay-defaults-CzR6jw9a.js";
|
|
4
4
|
async function g(a, e, t, o) {
|
|
5
5
|
try {
|
package/dist/replay.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-Dlmw0x6l.js"),t=require("./replay-oauth2-redirect-handler-BfZRvm6l.js");exports.AI_PROVIDERS=e.AI_PROVIDERS;exports.AiPanelContext=e.AiPanelContext;exports.EmbeddedReplay=e.EmbeddedReplay;exports.Modal=e.Modal;exports.REUNITE_AI_PROVIDER=e.REUNITE_AI_PROVIDER;exports.Replay=e.Replay;exports.ReplayOverlay=e.ReplayOverlay;Object.defineProperty(exports,"SpanStatusCode",{enumerable:!0,get:()=>e.SpanStatusCode});exports.TelemetryClient=e.TelemetryClient;exports.applyThemeToDOM=e.applyThemeToDOM;exports.createResource=e.createResource;exports.getCurrentTheme=e.getCurrentTheme;exports.loadAgentLoop=e.loadAgentLoop;exports.makeProviderRecord=e.makeProviderRecord;exports.resolveTheme=e.resolveTheme;exports.useAiPanel=e.useAiPanel;exports.useTelemetry=e.useTelemetry;exports.useTelemetryClient=e.useTelemetryClient;exports.validateApiKey=e.validateApiKey;exports.OAuth2Error=t.OAuth2Error;exports.handleOAuth2Redirect=t.handleOAuth2Redirect;
|
package/dist/replay.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as s, av as r, bN as t, bO as l, R as o, bP as b, bQ as R, K as d, bR as m, bS as p, L as n, bT as u, bU as y, bV as A, bW as T, au as i, at as O, bX as h, bY as E } from "./replay-index-
|
|
2
|
-
import { O as v, h as C } from "./replay-oauth2-redirect-handler-
|
|
1
|
+
import { A as s, av as r, bN as t, bO as l, R as o, bP as b, bQ as R, K as d, bR as m, bS as p, L as n, bT as u, bU as y, bV as A, bW as T, au as i, at as O, bX as h, bY as E } from "./replay-index-DfpfSyMZ.js";
|
|
2
|
+
import { O as v, h as C } from "./replay-oauth2-redirect-handler-Bq6bpZMm.js";
|
|
3
3
|
export {
|
|
4
4
|
s as AI_PROVIDERS,
|
|
5
5
|
r as AiPanelContext,
|