@redocly/replay 0.27.0-next.8 → 0.27.0-next.9

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.
Files changed (47) hide show
  1. package/dist/{replay-AiChatProvider-DHIxHTKX.js → replay-AiChatProvider-B94RnQsz.js} +6 -6
  2. package/dist/{replay-AiChatProvider-O8HHQobN.js → replay-AiChatProvider-P2u2MtTk.js} +1 -1
  3. package/dist/{replay-AiChatSqliteDBStorage-DjUq9VX3.js → replay-AiChatSqliteDBStorage-BtTa9KkQ.js} +1 -1
  4. package/dist/{replay-AiChatSqliteDBStorage-DNMrzkJg.js → replay-AiChatSqliteDBStorage-z_QUPu2M.js} +1 -1
  5. package/dist/{replay-AiPanel-CR815YqV.js → replay-AiPanel-BCkDovN_.js} +4 -4
  6. package/dist/{replay-AiPanel-CfYBCkrN.js → replay-AiPanel-COL9ADyD.js} +1 -1
  7. package/dist/{replay-SqliteDBStorage-CC9kLioX.js → replay-SqliteDBStorage-D9b6LAKr.js} +1 -1
  8. package/dist/{replay-SqliteDBStorage-B3oYWXem.js → replay-SqliteDBStorage-DMxFWJQ7.js} +1 -1
  9. package/dist/{replay-agent-loop-CTq5eJ4u.js → replay-agent-loop-C2QNfRSA.js} +1 -1
  10. package/dist/{replay-agent-loop-CCYOzyHo.js → replay-agent-loop-C8ERLqB5.js} +3 -3
  11. package/dist/{replay-ai-chat-mappers-B_wovMvG.js → replay-ai-chat-mappers-BMhtm64Y.js} +1 -1
  12. package/dist/{replay-ai-chat-mappers-C8y5UhCq.js → replay-ai-chat-mappers-fViZvzIy.js} +1 -1
  13. package/dist/{replay-create-model-CBCmuEKC.js → replay-create-model-BgR6vFGV.js} +2 -2
  14. package/dist/{replay-create-model-C5yvtnXA.js → replay-create-model-BhuazQ2q.js} +3 -3
  15. package/dist/{replay-db-CCBQadnT.js → replay-db-DAiJFj0l.js} +1 -1
  16. package/dist/{replay-db-DfOjLqsq.js → replay-db-DKzJowQC.js} +1 -1
  17. package/dist/{replay-external-resolver-B6tpqUZt.js → replay-external-resolver-BY6AAeGp.js} +1 -1
  18. package/dist/{replay-external-resolver-BRouROm6.js → replay-external-resolver-UONYkON2.js} +2 -2
  19. package/dist/{replay-index-BzzBKjHm.js → replay-index-BowK-_3Z.js} +17243 -17183
  20. package/dist/{replay-index-B_OHqSlS.js → replay-index-BubK_s3I.js} +18 -18
  21. package/dist/{replay-index-Dfnqt_IZ.js → replay-index-ClVtMDHn.js} +1080 -1080
  22. package/dist/replay-index-DM12kT-D.js +21 -0
  23. package/dist/{replay-index-Xq6K7XSm.js → replay-index-DWKlhkdU.js} +1 -1
  24. package/dist/replay-index-F528jCaH.js +1 -0
  25. package/dist/{replay-index-Bzttek8l.js → replay-index-amF_dPN8.js} +1 -1
  26. package/dist/replay-index-fpeoVNQb.js +1 -0
  27. package/dist/{replay-lint-gtuMJgII.js → replay-lint-CAN3a2zf.js} +122 -122
  28. package/dist/{replay-lint-DlDmPTBV.js → replay-lint-a0aMVdOC.js} +8921 -8880
  29. package/dist/{replay-lint-graphql-DHOq8lRT.js → replay-lint-graphql-C3aqm51r.js} +1 -1
  30. package/dist/{replay-lint-graphql-BQJ00lU4.js → replay-lint-graphql-DnztHI0i.js} +1 -1
  31. package/dist/replay-resolve-BoryNVbu.js +47 -0
  32. package/dist/{replay-resolve-DsgcWnjC.js → replay-resolve-LjvT95Yw.js} +1078 -1053
  33. package/dist/{replay-respect-run-7Cwe1_ri.js → replay-respect-run-DLSZ4d4p.js} +1 -1
  34. package/dist/{replay-respect-run-D1zyh-5j.js → replay-respect-run-wqqp8WHA.js} +3 -3
  35. package/dist/{replay-tauri-path-BAY3g5sW.js → replay-tauri-path-Bg-T0cwI.js} +5 -5
  36. package/dist/{replay-tauri-path-CaVeI3a-.js → replay-tauri-path-DHZlqqfb.js} +1 -1
  37. package/dist/{replay-useAiChatQueries-D99tAUpY.js → replay-useAiChatQueries-DuNxx5rQ.js} +1 -1
  38. package/dist/{replay-useAiChatQueries-CxZNLVje.js → replay-useAiChatQueries-Dy-kPGKF.js} +3 -3
  39. package/dist/{replay-validate-key-Cv0mvYDS.js → replay-validate-key-B2N6AiQk.js} +1 -1
  40. package/dist/{replay-validate-key-Di8MCBz7.js → replay-validate-key-B7RBY-6z.js} +2 -2
  41. package/dist/replay.cjs +1 -1
  42. package/dist/replay.js +4 -4
  43. package/package.json +7 -7
  44. package/dist/replay-index-C6SJPGDO.js +0 -23
  45. package/dist/replay-index-CUs62_1f.js +0 -1
  46. package/dist/replay-index-Cpkh9r0X.js +0 -1
  47. package/dist/replay-resolve-DqFS69S_.js +0 -47
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./replay-index-Dfnqt_IZ.js"),h0=require("./replay-resolve-DqFS69S_.js"),wu=require("./replay-lint-gtuMJgII.js");function q1(u){return C.isPlainObject(u)&&"name"in u&&"value"in u&&!("in"in u)}function ze(u){return C.isPlainObject(u)&&"in"in u&&typeof u.in=="string"&&["header","query","path","cookie"].includes(u.in)}const Z1=/^image\/(png|jpeg|gif|bmp|webp|svg\+xml)|application\/pdf$/;function ti(u){return u.startsWith("$file(")&&u.endsWith(")")?u.substring(7,u.length-2):u}const ha=async(u,a,e,r,i)=>{const n=C.pathBrowserifyExports.dirname(r),o=C.pathBrowserifyExports.resolve(n,ti(e));u.append(a,await i.options.requestFileLoader.getFileBody(o))},si=(u,a,e,r,i,n)=>{Object.entries(e).forEach(([o,s])=>{const E=n?`${n}[${o}]`:o;typeof s=="string"&&s.startsWith("$file(")&&s.endsWith(")")?u.push(ha(a,E,s,r,i)):Array.isArray(s)?s.forEach(l=>{typeof l=="string"&&l.startsWith("$file(")&&l.endsWith(")")?u.push(ha(a,E,l,r,i)):a.append(E,l.toString())}):C.isPlainObject(s)?si(u,a,s,r,i,E):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&a.append(E,s.toString())})},U1=async(u,a,e,r)=>{if(C.isPlainObject(u)){const i=[];si(i,a,u,e,r),await Promise.all(i)}},Y1=async(u,a)=>{if(typeof u=="string"&&u.startsWith("$file(")&&u.endsWith(")")){const e=C.pathBrowserifyExports.resolve(C.pathBrowserifyExports.dirname(a.options.filePath),ti(u));return a.options.requestFileLoader.getFileBody(e)}else return u};async function Q1(u,a){if(!u)return{payload:void 0,contentType:void 0,encoding:void 0,replacements:void 0};const{payload:e,contentType:r}=u;if(r==="multipart/form-data"){const i=new FormData,n=C.pathBrowserifyExports.resolve(a.options.filePath);return await U1(e,i,n,a),{...u,payload:i}}else{if(r==="application/octet-stream"||typeof r=="string"&&Z1.test(r))return{...u,payload:await Y1(e,a),contentType:"application/octet-stream"};if(r==="application/x-www-form-urlencoded"&&typeof e=="string")return{...u,payload:Object.fromEntries(new URLSearchParams(e).entries()),contentType:"application/x-www-form-urlencoded"}}return u}function X1({payload:u,replacements:a,expressionContext:e,logger:r}){for(const i of a){const{target:n,value:o}=i;if(typeof n!="string")throw new Error(`Invalid JSON Pointer: ${n}`);try{const s=C.JsonPointerLib.get(u,n),E=C.evaluateRuntimeExpressionPayload({payload:o,context:e,logger:r});s!==void 0&&C.JsonPointerLib.set(u,n,E)}catch{throw new Error(`Invalid JSON Pointer: ${n}`)}}}const uo=["parameters","failureActions","successActions"];function eo(u,a){const{reference:e,value:r}=u;if(!uo.some(n=>e.includes(`$components.${n}`)))throw new Error("Invalid reference: available components are $components.parameters, $components.failureActions, or $components.successActions");const i=C.getValueFromContext({value:e,ctx:a,logger:a.options.logger});return C.isPlainObject(i)&&"value"in i&&r?{...i,value:r}:i}function k0(u,a){return"reference"in u?eo(u,a):u}const ru={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 li extends Error{}class Ei extends li{}class Di extends li{}async function ao(u){const{descriptionPath:a,externalRefResolver:e,base:r}=u,i=await wu.bundle({base:r,ref:a,config:u.config,dereference:!0,externalRefResolver:e});if(!i)throw new Error(`Could not find source description file '${a}'.`);return i.bundle.parsed}const io={title:"[REPLACE WITH API title]",version:"[REPLACE WITH API version]"},pe=Symbol("skip");function c0(u){return u<10?"0"+u:u}function ro(u,a,e,r){var i=e?"":u.getUTCFullYear()+"-"+c0(u.getUTCMonth()+1)+"-"+c0(u.getUTCDate());return a||(i+="T"+c0(u.getUTCHours())+":"+c0(u.getUTCMinutes())+":"+c0(u.getUTCSeconds())+"Z"),i}function xi(u,a){return a>u.length?u.repeat(Math.trunc(a/u.length)+1).substring(0,a):u}function V0(...u){const a=e=>e&&typeof e=="object";return u.reduce((e,r)=>(Object.keys(r||{}).forEach(i=>{const n=e[i],o=r[i];a(n)&&a(o)?e[i]=V0(n,o):e[i]=o}),e),Array.isArray(u[u.length-1])?[]:{})}function no(u){var a=so(u),e=lo(a,a,a,a),r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,i=>{var n=e()*16%16|0;return(i=="x"?n:n&3|8).toString(16)});return r}function te(u){return{value:u==="object"?{}:u==="array"?[]:void 0}}function Vu(u,a){a&&u.pop()}function oo(u){return{name:u?.xml?.name||"",prefix:u?.xml?.prefix||"",namespace:u?.xml?.namespace||null,attribute:u?.xml?.attribute??!1,wrapped:u?.xml?.wrapped??!1}}function to(u){const a=u?.xml;return a?.nodeType?a.nodeType:a?.attribute===!0?"attribute":a?.wrapped===!0&&u?.type==="array"?"element":u?.$ref||u?.$dynamicRef||u?.type==="array"||u?.oneOf||u?.anyOf||u?.allOf?"none":"element"}function J0(u,a={},e={}){const{value:r}=u,{propertyName:i}=e,{name:n,prefix:o,namespace:s}=oo(a),E=to(a);let l=n||i?`${o?o+":":""}${n||i}`:null,D=typeof r=="object"?Array.isArray(r)?[...r]:{...r}:r;switch(E){case"attribute":l&&(l=`$${l}`);break;case"text":l="#text";break;case"cdata":l="#cdata";break;case"none":a.type==="array"?(l=null,a.example!==void 0&&(l=a.items?.xml?.name||l)):l=null;break;default:a.type==="array"&&Array.isArray(D)&&(D={[l]:[...D]});break}return s&&E!=="text"&&E!=="cdata"&&E!=="none"&&(typeof D=="object"?D[`$xmlns${o?":"+o:""}`]=s:D={[`$xmlns${o?":"+o:""}`]:s,"#text":D}),{propertyName:l,value:D}}function so(u){var a=0;if(u.length==0)return a;for(var e=0;e<u.length;e++){var r=u.charCodeAt(e);a=(a<<5)-a+r,a=a&a}return a}function lo(u,a,e,r){return function(){u|=0,a|=0,e|=0,r|=0;var i=u-(a<<27|a>>>5)|0;return u=a^(e<<17|e>>>15),a=e+r|0,e=r+i|0,r=u+i|0,(r>>>0)/4294967296}}function Eo(u,a,e,r,i){let n=Su(u,e,r);const o=[];for(let s of a){const{type:E,readOnly:l,writeOnly:D,value:d}=Su({type:n.type,...s},e,r,{...i,isAllOfChild:!0});n.type&&E&&E!==n.type&&(console.warn("allOf: schemas with different types can't be merged"),n.type=E),n.type=n.type||E,n.readOnly=n.readOnly||l,n.writeOnly=n.writeOnly||D,d!=null&&o.push(d)}if(n.type==="object"){n.value=V0(n.value||{},...o.filter(s=>typeof s=="object"));for(const s in n.value)n.value[s]===pe&&delete n.value[s];return n}else{n.type==="array"&&(e.quiet||console.warn('OpenAPI Sampler: found allOf with "array" type. Result may be incorrect'));const s=o[o.length-1];return n.value=s??n.value,n}}const ga={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 z0(u){if(u.type!==void 0)return Array.isArray(u.type)?u.type.length===0?null:u.type[0]:u.type;const a=Object.keys(ga);for(var e=0;e<a.length;e++){let r=a[e],i=ga[r];if(u[r]!==void 0)return i}return null}let N0={},zu=[];function Do(){N0={},zu=[]}function ci(u){let a;return u.const!==void 0?a=u.const:u.examples!==void 0&&u.examples.length?a=u.examples[0]:u.enum!==void 0&&u.enum.length?a=u.enum[0]:u.default!==void 0&&(a=u.default),a}function pa(u){const a=ci(u);if(a!==void 0)return{value:a,readOnly:u.readOnly,writeOnly:u.writeOnly,type:null}}function Su(u,a,e,r){if(r){if(zu.includes(u))return te(z0(u));zu.push(u)}if(r&&r.depth>a.maxSampleDepth)return Vu(zu,r),te(z0(u));if(u.$ref){if(!e)throw new Error("Your schema contains $ref. You must provide full specification in the third parameter.");let s=decodeURIComponent(u.$ref);s.startsWith("#")&&(s=s.substring(1));const E=C.JsonPointerLib.get(e,s);let l;if(N0[s]!==!0){N0[s]=!0;const D=Su(E,a,e,r);if(a.format==="xml"){const d=s.split("/").pop(),F={...r,propertyName:r?.propertyName||d},{propertyName:k,value:B}=J0(D,E,F);l={...D,value:{[k||"root"]:B}}}else l=D;N0[s]=!1}else{const D=z0(E);l=te(D)}return Vu(zu,r),l}if(u.example!==void 0)return Vu(zu,r),{value:u.example,readOnly:u.readOnly,writeOnly:u.writeOnly,type:u.type};if(u.allOf!==void 0)return Vu(zu,r),pa(u)||Eo({...u,allOf:void 0},u.allOf,a,e,r);if(u.oneOf&&u.oneOf.length){u.anyOf&&(a.quiet||console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf")),Vu(zu,r);const s=Object.assign({readOnly:u.readOnly,writeOnly:u.writeOnly},u.oneOf[0]);return o(u,s)}if(u.anyOf&&u.anyOf.length){Vu(zu,r);const s=Object.assign({readOnly:u.readOnly,writeOnly:u.writeOnly},u.anyOf[0]);return o(u,s)}if(u.if&&u.then){Vu(zu,r);const{if:s,then:E,...l}=u;return Su(V0(l,s,E),a,e,r)}let i=ci(u),n=null;if(i===void 0){i=null,n=u.type,Array.isArray(n)&&u.type.length>0&&(n=u.type[0]),n||(n=z0(u));let s=Fi[n];s&&(i=s(u,a,e,r))}return Vu(zu,r),{value:i,readOnly:u.readOnly,writeOnly:u.writeOnly,type:n};function o(s,E){const l=pa(s);if(l!==void 0)return l;const D=Su({...s,oneOf:void 0,anyOf:void 0},a,e,r),d=Su(E,a,e,r);if(typeof D.value=="object"&&typeof d.value=="object"){const F=V0(D.value,d.value);return{...d,value:F}}return d}}function xo(u,a={},e,r){const i=r&&r.depth||1;let n=Math.min(u.maxItems!=null?u.maxItems:1/0,u.minItems||1);const o=u.prefixItems||u.items||u.contains;Array.isArray(o)&&(n=Math.max(n,o.length));let s=l=>Array.isArray(o)?o[l]||{}:o||{},E=[];if(!o)return E;for(let l=0;l<n;l++){let D=s(l),{value:d}=Su(D,a,e,{depth:i+1});if(a?.format==="xml"){const{value:F,propertyName:k}=J0({value:d},D,r);k?(E?.[k]||(E={...E,[k]:[]}),E[k].push(F)):E={...E,...F}}else E.push(d)}if(a?.format==="xml"&&i===1){const{value:l,propertyName:D}=J0({value:null},u,r);D&&(l?E=Array.isArray(E)?{[D]:{...l,...E.map(d=>({"#text":{...d}}))}}:{[D]:{...E,...l}}:E={[D]:E})}return E}function co(u){return!0}function di(u){let a=0;if(u.type==="number"&&(u.format==="float"||u.format==="double")&&(a=.1),typeof u.exclusiveMinimum=="boolean"||typeof u.exclusiveMaximum=="boolean"){if(u.maximum&&u.minimum)return a=u.exclusiveMinimum?Math.floor(u.minimum)+1:u.minimum,(u.exclusiveMaximum&&a>=u.maximum||!u.exclusiveMaximum&&a>u.maximum)&&(a=(u.maximum+u.minimum)/2),a;if(u.minimum)return u.exclusiveMinimum?Math.floor(u.minimum)+1:u.minimum;if(u.maximum)return u.exclusiveMaximum?u.maximum>0?0:Math.floor(u.maximum)-1:u.maximum>0?0:u.maximum}else{if(u.minimum)return u.minimum;u.exclusiveMinimum?(a=Math.floor(u.exclusiveMinimum)+1,a===u.exclusiveMaximum&&(a=(a+Math.floor(u.exclusiveMaximum)-1)/2)):u.exclusiveMaximum?a=Math.floor(u.exclusiveMaximum)-1:u.maximum&&(a=u.maximum)}return a}function mo(u,a={},e,r){let i={};const n=r&&r.depth||1;if(u&&typeof u.properties=="object"){const o=Array.isArray(u.required)?u.required:[],s={};for(const E of o)s[E]=!0;Object.keys(u.properties).forEach(E=>{if(a.skipNonRequired&&!s.hasOwnProperty(E))return;const l=Su(u.properties[E],a,e,{propertyName:E,depth:n+1});if(a.skipReadOnly&&l.readOnly){r?.isAllOfChild&&(i[E]=pe);return}if(a.skipWriteOnly&&l.writeOnly){r?.isAllOfChild&&(i[E]=pe);return}if(a?.format==="xml"){const{propertyName:D,value:d}=J0(l,u.properties[E],{propertyName:E});D?i[D]=d:d!==null&&typeof d=="object"&&(i={...i,...d})}else i[E]=l.value})}if(u&&typeof u.additionalProperties=="object"){const o=u.additionalProperties["x-additionalPropertiesName"]||"property";i[`${String(o)}1`]=Su(u.additionalProperties,a,e,{depth:n+1}).value,i[`${String(o)}2`]=Su(u.additionalProperties,a,e,{depth:n+1}).value}if(u&&typeof u.properties=="object"&&u.maxProperties!==void 0&&Object.keys(i).length>u.maxProperties){const o={};let s=0;(Array.isArray(u.required)?u.required:[]).forEach(l=>{i[l]!==void 0&&(o[l]=i[l],s++)}),Object.keys(i).forEach(l=>{s<u.maxProperties&&!o.hasOwnProperty(l)&&(o[l]=i[l],s++)}),i=o}return i}function g0(u,a){return u}function va(u,a,e){let r=1;if(u)switch(u){case"?":{r=0;break}case"*":{r=g0(0);break}case"+":{r=g0(1);break}default:throw new Error("Unknown quantifier symbol provided.")}else a!=null&&e!=null?r=g0(parseInt(a)):a!=null&&e==null&&(r=parseInt(a));return r}function Fo(u){let a=!1;u instanceof RegExp&&(a=u.flags.includes("i"),u=u.toString(),u=u.match(/\/(.+?)\//)?.[1]??""),u=u.replace(/^(\^)?(.*?)(\$)?$/,"$2");let e,r,i;const n=/([.A-Za-z0-9])(?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+))(?![^[]*]|[^{]*})/;let o=u.match(n);for(;o!=null;){const d=o[2],F=o[3],k=o[4];i=va(k,d,F),u=u.slice(0,o.index)+o[1].repeat(i)+u.slice(o.index+o[0].length),o=u.match(n)}const s=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,E=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+)|)/;for(o=u.match(E);o!=null;){const d=o[1]==="^",F=o[2]==="-",k=o[4],B=o[5],y=o[6],K=[];let V=o[3],H=V.match(s);for(F&&K.push(45);H!=null;){if(H[0].indexOf("-")===-1)a&&isNaN(Number(H[0]))?(K.push(H[0].toUpperCase().charCodeAt(0)),K.push(H[0].toLowerCase().charCodeAt(0))):K.push(H[0].charCodeAt(0));else{const v=H[0].split("-").map(h=>h.charCodeAt(0));if(e=v[0],r=v[1],e>r)throw new Error("Character range provided is out of order.");for(let h=e;h<=r;h++)if(a&&isNaN(Number(String.fromCharCode(h)))){const z=String.fromCharCode(h);K.push(z.toUpperCase().charCodeAt(0)),K.push(z.toLowerCase().charCodeAt(0))}else K.push(h)}V=V.substring(H[0].length),H=V.match(s)}if(i=va(y,k,B),d){let v=-1;for(let h=48;h<=57;h++){if(v=K.indexOf(h),v>-1){K.splice(v,1);continue}K.push(h)}for(let h=65;h<=90;h++){if(v=K.indexOf(h),v>-1){K.splice(v,1);continue}K.push(h)}for(let h=97;h<=122;h++){if(v=K.indexOf(h),v>-1){K.splice(v,1);continue}K.push(h)}}const G=Array.from({length:i},()=>String.fromCharCode(K[g0(0)])).join("");u=u.slice(0,o.index)+G+u.slice(o.index+o[0].length),o=u.match(E)}const l=/(.)\{(\d+)\,(\d+)\}/;for(o=u.match(l);o!=null;){if(e=parseInt(o[2]),r=parseInt(o[3]),e>r)throw new Error("Numbers out of order in {} quantifier.");i=g0(e),u=u.slice(0,o.index)+o[1].repeat(i)+u.slice(o.index+o[0].length),o=u.match(l)}const D=/(.)\{(\d+)\}/;for(o=u.match(D);o!=null;)i=parseInt(o[2]),u=u.slice(0,o.index)+o[1].repeat(i)+u.slice(o.index+o[0].length),o=u.match(D);return u}const ko="qwerty!@#$%^123456";function Co(){return"user@example.com"}function ho(){return"пошта@укр.нет"}function go(u,a){let e="pa$$word";return u>e.length&&(e+="_",e+=xi(ko,u-e.length).substring(0,u-e.length)),e}function Se({min:u,max:a,omitTime:e,omitDate:r}){let i=ro(new Date("2019-08-24T14:15:22.123Z"),e,r);return i.length<u&&console.warn(`Using minLength = ${u} is incorrect with format "date-time"`),a&&i.length>a&&console.warn(`Using maxLength = ${a} is incorrect with format "date-time"`),i}function po(u,a){return Se({min:u,max:a,omitTime:!1,omitDate:!1})}function vo(u,a){return Se({min:u,max:a,omitTime:!0,omitDate:!1})}function bo(u,a){return Se({min:u,max:a,omitTime:!1,omitDate:!0}).slice(1)}function mi(u,a,e,r,i=!1){if(r&&i)return Fo(r);let n=xi("string",u);return a&&n.length>a&&(n=n.substring(0,a)),n}function Bo(){return"192.168.0.1"}function Ao(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}function yo(){return"example.com"}function fo(){return"приклад.укр"}function zo(){return"http://example.com"}function So(){return"../dictionary"}function Mo(){return"http://example.com/{endpoint}"}function jo(){return"http://example.com/entity/1"}function Po(){return"/entity/1"}function wo(u,a,e){return no(e||"id")}function Ko(){return"/json/pointer"}function To(){return"1/relative/json/pointer"}function Lo(){return"/regex/"}const No={email:Co,"idn-email":ho,password:go,"date-time":po,date:vo,time:bo,ipv4:Bo,ipv6:Ao,hostname:yo,"idn-hostname":fo,iri:jo,"iri-reference":Po,uri:zo,"uri-reference":So,"uri-template":Mo,uuid:wo,default:mi,"json-pointer":Ko,"relative-json-pointer":To,regex:Lo};function Ro(u,a,e,r){let i=u.format||"default",n=No[i]||mi,o=r&&r.propertyName;return n(u.minLength||0,u.maxLength,o,u.pattern,a?.enablePatterns)}var Fi={};const Ho={skipReadOnly:!1,maxSampleDepth:15};function Go(u,a){if(!u)throw new Error("Unknown format output for building XML.");return(Array.isArray(u)||Object.keys(u).length>1)&&(u={[a?.xml?.name||"root"]:u}),new C.Builder({ignoreAttributes:!1,format:!0,attributeNamePrefix:"$",textNodeName:"#text",cdataPropName:"#cdata"}).build(u)}function Vo(u,a,e){let r=Object.assign({},Ho,a);Do();let i=Su(u,r,e).value;return r?.format==="xml"?Go(i,u):i}function l0(u,a){Fi[u]=a}l0("array",xo);l0("boolean",co);l0("integer",di);l0("number",di);l0("object",mo);l0("string",Ro);function ki(u,a){if(u)try{return Vo(u,{skipReadOnly:!0,skipNonRequired:!1,quiet:!0})}catch(e){a.error(C.bgRed(" Error while generating test data from JSON Schema ")+`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./replay-index-ClVtMDHn.js"),h0=require("./replay-resolve-BoryNVbu.js"),wu=require("./replay-lint-CAN3a2zf.js");function q1(u){return C.isPlainObject(u)&&"name"in u&&"value"in u&&!("in"in u)}function ze(u){return C.isPlainObject(u)&&"in"in u&&typeof u.in=="string"&&["header","query","path","cookie"].includes(u.in)}const Z1=/^image\/(png|jpeg|gif|bmp|webp|svg\+xml)|application\/pdf$/;function ti(u){return u.startsWith("$file(")&&u.endsWith(")")?u.substring(7,u.length-2):u}const ha=async(u,a,e,r,i)=>{const n=C.pathBrowserifyExports.dirname(r),o=C.pathBrowserifyExports.resolve(n,ti(e));u.append(a,await i.options.requestFileLoader.getFileBody(o))},si=(u,a,e,r,i,n)=>{Object.entries(e).forEach(([o,s])=>{const E=n?`${n}[${o}]`:o;typeof s=="string"&&s.startsWith("$file(")&&s.endsWith(")")?u.push(ha(a,E,s,r,i)):Array.isArray(s)?s.forEach(l=>{typeof l=="string"&&l.startsWith("$file(")&&l.endsWith(")")?u.push(ha(a,E,l,r,i)):a.append(E,l.toString())}):C.isPlainObject(s)?si(u,a,s,r,i,E):(typeof s=="string"||typeof s=="number"||typeof s=="boolean")&&a.append(E,s.toString())})},U1=async(u,a,e,r)=>{if(C.isPlainObject(u)){const i=[];si(i,a,u,e,r),await Promise.all(i)}},Y1=async(u,a)=>{if(typeof u=="string"&&u.startsWith("$file(")&&u.endsWith(")")){const e=C.pathBrowserifyExports.resolve(C.pathBrowserifyExports.dirname(a.options.filePath),ti(u));return a.options.requestFileLoader.getFileBody(e)}else return u};async function Q1(u,a){if(!u)return{payload:void 0,contentType:void 0,encoding:void 0,replacements:void 0};const{payload:e,contentType:r}=u;if(r==="multipart/form-data"){const i=new FormData,n=C.pathBrowserifyExports.resolve(a.options.filePath);return await U1(e,i,n,a),{...u,payload:i}}else{if(r==="application/octet-stream"||typeof r=="string"&&Z1.test(r))return{...u,payload:await Y1(e,a),contentType:"application/octet-stream"};if(r==="application/x-www-form-urlencoded"&&typeof e=="string")return{...u,payload:Object.fromEntries(new URLSearchParams(e).entries()),contentType:"application/x-www-form-urlencoded"}}return u}function X1({payload:u,replacements:a,expressionContext:e,logger:r}){for(const i of a){const{target:n,value:o}=i;if(typeof n!="string")throw new Error(`Invalid JSON Pointer: ${n}`);try{const s=C.JsonPointerLib.get(u,n),E=C.evaluateRuntimeExpressionPayload({payload:o,context:e,logger:r});s!==void 0&&C.JsonPointerLib.set(u,n,E)}catch{throw new Error(`Invalid JSON Pointer: ${n}`)}}}const uo=["parameters","failureActions","successActions"];function eo(u,a){const{reference:e,value:r}=u;if(!uo.some(n=>e.includes(`$components.${n}`)))throw new Error("Invalid reference: available components are $components.parameters, $components.failureActions, or $components.successActions");const i=C.getValueFromContext({value:e,ctx:a,logger:a.options.logger});return C.isPlainObject(i)&&"value"in i&&r?{...i,value:r}:i}function k0(u,a){return"reference"in u?eo(u,a):u}const ru={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 li extends Error{}class Ei extends li{}class Di extends li{}async function ao(u){const{descriptionPath:a,externalRefResolver:e,base:r}=u,i=await wu.bundle({base:r,ref:a,config:u.config,dereference:!0,externalRefResolver:e});if(!i)throw new Error(`Could not find source description file '${a}'.`);return i.bundle.parsed}const io={title:"[REPLACE WITH API title]",version:"[REPLACE WITH API version]"},pe=Symbol("skip");function c0(u){return u<10?"0"+u:u}function ro(u,a,e,r){var i=e?"":u.getUTCFullYear()+"-"+c0(u.getUTCMonth()+1)+"-"+c0(u.getUTCDate());return a||(i+="T"+c0(u.getUTCHours())+":"+c0(u.getUTCMinutes())+":"+c0(u.getUTCSeconds())+"Z"),i}function xi(u,a){return a>u.length?u.repeat(Math.trunc(a/u.length)+1).substring(0,a):u}function V0(...u){const a=e=>e&&typeof e=="object";return u.reduce((e,r)=>(Object.keys(r||{}).forEach(i=>{const n=e[i],o=r[i];a(n)&&a(o)?e[i]=V0(n,o):e[i]=o}),e),Array.isArray(u[u.length-1])?[]:{})}function no(u){var a=so(u),e=lo(a,a,a,a),r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,i=>{var n=e()*16%16|0;return(i=="x"?n:n&3|8).toString(16)});return r}function te(u){return{value:u==="object"?{}:u==="array"?[]:void 0}}function Vu(u,a){a&&u.pop()}function oo(u){return{name:u?.xml?.name||"",prefix:u?.xml?.prefix||"",namespace:u?.xml?.namespace||null,attribute:u?.xml?.attribute??!1,wrapped:u?.xml?.wrapped??!1}}function to(u){const a=u?.xml;return a?.nodeType?a.nodeType:a?.attribute===!0?"attribute":a?.wrapped===!0&&u?.type==="array"?"element":u?.$ref||u?.$dynamicRef||u?.type==="array"||u?.oneOf||u?.anyOf||u?.allOf?"none":"element"}function J0(u,a={},e={}){const{value:r}=u,{propertyName:i}=e,{name:n,prefix:o,namespace:s}=oo(a),E=to(a);let l=n||i?`${o?o+":":""}${n||i}`:null,D=typeof r=="object"?Array.isArray(r)?[...r]:{...r}:r;switch(E){case"attribute":l&&(l=`$${l}`);break;case"text":l="#text";break;case"cdata":l="#cdata";break;case"none":a.type==="array"?(l=null,a.example!==void 0&&(l=a.items?.xml?.name||l)):l=null;break;default:a.type==="array"&&Array.isArray(D)&&(D={[l]:[...D]});break}return s&&E!=="text"&&E!=="cdata"&&E!=="none"&&(typeof D=="object"?D[`$xmlns${o?":"+o:""}`]=s:D={[`$xmlns${o?":"+o:""}`]:s,"#text":D}),{propertyName:l,value:D}}function so(u){var a=0;if(u.length==0)return a;for(var e=0;e<u.length;e++){var r=u.charCodeAt(e);a=(a<<5)-a+r,a=a&a}return a}function lo(u,a,e,r){return function(){u|=0,a|=0,e|=0,r|=0;var i=u-(a<<27|a>>>5)|0;return u=a^(e<<17|e>>>15),a=e+r|0,e=r+i|0,r=u+i|0,(r>>>0)/4294967296}}function Eo(u,a,e,r,i){let n=Su(u,e,r);const o=[];for(let s of a){const{type:E,readOnly:l,writeOnly:D,value:d}=Su({type:n.type,...s},e,r,{...i,isAllOfChild:!0});n.type&&E&&E!==n.type&&(console.warn("allOf: schemas with different types can't be merged"),n.type=E),n.type=n.type||E,n.readOnly=n.readOnly||l,n.writeOnly=n.writeOnly||D,d!=null&&o.push(d)}if(n.type==="object"){n.value=V0(n.value||{},...o.filter(s=>typeof s=="object"));for(const s in n.value)n.value[s]===pe&&delete n.value[s];return n}else{n.type==="array"&&(e.quiet||console.warn('OpenAPI Sampler: found allOf with "array" type. Result may be incorrect'));const s=o[o.length-1];return n.value=s??n.value,n}}const ga={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 z0(u){if(u.type!==void 0)return Array.isArray(u.type)?u.type.length===0?null:u.type[0]:u.type;const a=Object.keys(ga);for(var e=0;e<a.length;e++){let r=a[e],i=ga[r];if(u[r]!==void 0)return i}return null}let N0={},zu=[];function Do(){N0={},zu=[]}function ci(u){let a;return u.const!==void 0?a=u.const:u.examples!==void 0&&u.examples.length?a=u.examples[0]:u.enum!==void 0&&u.enum.length?a=u.enum[0]:u.default!==void 0&&(a=u.default),a}function pa(u){const a=ci(u);if(a!==void 0)return{value:a,readOnly:u.readOnly,writeOnly:u.writeOnly,type:null}}function Su(u,a,e,r){if(r){if(zu.includes(u))return te(z0(u));zu.push(u)}if(r&&r.depth>a.maxSampleDepth)return Vu(zu,r),te(z0(u));if(u.$ref){if(!e)throw new Error("Your schema contains $ref. You must provide full specification in the third parameter.");let s=decodeURIComponent(u.$ref);s.startsWith("#")&&(s=s.substring(1));const E=C.JsonPointerLib.get(e,s);let l;if(N0[s]!==!0){N0[s]=!0;const D=Su(E,a,e,r);if(a.format==="xml"){const d=s.split("/").pop(),F={...r,propertyName:r?.propertyName||d},{propertyName:k,value:B}=J0(D,E,F);l={...D,value:{[k||"root"]:B}}}else l=D;N0[s]=!1}else{const D=z0(E);l=te(D)}return Vu(zu,r),l}if(u.example!==void 0)return Vu(zu,r),{value:u.example,readOnly:u.readOnly,writeOnly:u.writeOnly,type:u.type};if(u.allOf!==void 0)return Vu(zu,r),pa(u)||Eo({...u,allOf:void 0},u.allOf,a,e,r);if(u.oneOf&&u.oneOf.length){u.anyOf&&(a.quiet||console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf")),Vu(zu,r);const s=Object.assign({readOnly:u.readOnly,writeOnly:u.writeOnly},u.oneOf[0]);return o(u,s)}if(u.anyOf&&u.anyOf.length){Vu(zu,r);const s=Object.assign({readOnly:u.readOnly,writeOnly:u.writeOnly},u.anyOf[0]);return o(u,s)}if(u.if&&u.then){Vu(zu,r);const{if:s,then:E,...l}=u;return Su(V0(l,s,E),a,e,r)}let i=ci(u),n=null;if(i===void 0){i=null,n=u.type,Array.isArray(n)&&u.type.length>0&&(n=u.type[0]),n||(n=z0(u));let s=Fi[n];s&&(i=s(u,a,e,r))}return Vu(zu,r),{value:i,readOnly:u.readOnly,writeOnly:u.writeOnly,type:n};function o(s,E){const l=pa(s);if(l!==void 0)return l;const D=Su({...s,oneOf:void 0,anyOf:void 0},a,e,r),d=Su(E,a,e,r);if(typeof D.value=="object"&&typeof d.value=="object"){const F=V0(D.value,d.value);return{...d,value:F}}return d}}function xo(u,a={},e,r){const i=r&&r.depth||1;let n=Math.min(u.maxItems!=null?u.maxItems:1/0,u.minItems||1);const o=u.prefixItems||u.items||u.contains;Array.isArray(o)&&(n=Math.max(n,o.length));let s=l=>Array.isArray(o)?o[l]||{}:o||{},E=[];if(!o)return E;for(let l=0;l<n;l++){let D=s(l),{value:d}=Su(D,a,e,{depth:i+1});if(a?.format==="xml"){const{value:F,propertyName:k}=J0({value:d},D,r);k?(E?.[k]||(E={...E,[k]:[]}),E[k].push(F)):E={...E,...F}}else E.push(d)}if(a?.format==="xml"&&i===1){const{value:l,propertyName:D}=J0({value:null},u,r);D&&(l?E=Array.isArray(E)?{[D]:{...l,...E.map(d=>({"#text":{...d}}))}}:{[D]:{...E,...l}}:E={[D]:E})}return E}function co(u){return!0}function di(u){let a=0;if(u.type==="number"&&(u.format==="float"||u.format==="double")&&(a=.1),typeof u.exclusiveMinimum=="boolean"||typeof u.exclusiveMaximum=="boolean"){if(u.maximum&&u.minimum)return a=u.exclusiveMinimum?Math.floor(u.minimum)+1:u.minimum,(u.exclusiveMaximum&&a>=u.maximum||!u.exclusiveMaximum&&a>u.maximum)&&(a=(u.maximum+u.minimum)/2),a;if(u.minimum)return u.exclusiveMinimum?Math.floor(u.minimum)+1:u.minimum;if(u.maximum)return u.exclusiveMaximum?u.maximum>0?0:Math.floor(u.maximum)-1:u.maximum>0?0:u.maximum}else{if(u.minimum)return u.minimum;u.exclusiveMinimum?(a=Math.floor(u.exclusiveMinimum)+1,a===u.exclusiveMaximum&&(a=(a+Math.floor(u.exclusiveMaximum)-1)/2)):u.exclusiveMaximum?a=Math.floor(u.exclusiveMaximum)-1:u.maximum&&(a=u.maximum)}return a}function mo(u,a={},e,r){let i={};const n=r&&r.depth||1;if(u&&typeof u.properties=="object"){const o=Array.isArray(u.required)?u.required:[],s={};for(const E of o)s[E]=!0;Object.keys(u.properties).forEach(E=>{if(a.skipNonRequired&&!s.hasOwnProperty(E))return;const l=Su(u.properties[E],a,e,{propertyName:E,depth:n+1});if(a.skipReadOnly&&l.readOnly){r?.isAllOfChild&&(i[E]=pe);return}if(a.skipWriteOnly&&l.writeOnly){r?.isAllOfChild&&(i[E]=pe);return}if(a?.format==="xml"){const{propertyName:D,value:d}=J0(l,u.properties[E],{propertyName:E});D?i[D]=d:d!==null&&typeof d=="object"&&(i={...i,...d})}else i[E]=l.value})}if(u&&typeof u.additionalProperties=="object"){const o=u.additionalProperties["x-additionalPropertiesName"]||"property";i[`${String(o)}1`]=Su(u.additionalProperties,a,e,{depth:n+1}).value,i[`${String(o)}2`]=Su(u.additionalProperties,a,e,{depth:n+1}).value}if(u&&typeof u.properties=="object"&&u.maxProperties!==void 0&&Object.keys(i).length>u.maxProperties){const o={};let s=0;(Array.isArray(u.required)?u.required:[]).forEach(l=>{i[l]!==void 0&&(o[l]=i[l],s++)}),Object.keys(i).forEach(l=>{s<u.maxProperties&&!o.hasOwnProperty(l)&&(o[l]=i[l],s++)}),i=o}return i}function g0(u,a){return u}function va(u,a,e){let r=1;if(u)switch(u){case"?":{r=0;break}case"*":{r=g0(0);break}case"+":{r=g0(1);break}default:throw new Error("Unknown quantifier symbol provided.")}else a!=null&&e!=null?r=g0(parseInt(a)):a!=null&&e==null&&(r=parseInt(a));return r}function Fo(u){let a=!1;u instanceof RegExp&&(a=u.flags.includes("i"),u=u.toString(),u=u.match(/\/(.+?)\//)?.[1]??""),u=u.replace(/^(\^)?(.*?)(\$)?$/,"$2");let e,r,i;const n=/([.A-Za-z0-9])(?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+))(?![^[]*]|[^{]*})/;let o=u.match(n);for(;o!=null;){const d=o[2],F=o[3],k=o[4];i=va(k,d,F),u=u.slice(0,o.index)+o[1].repeat(i)+u.slice(o.index+o[0].length),o=u.match(n)}const s=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,E=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+)|)/;for(o=u.match(E);o!=null;){const d=o[1]==="^",F=o[2]==="-",k=o[4],B=o[5],y=o[6],K=[];let V=o[3],H=V.match(s);for(F&&K.push(45);H!=null;){if(H[0].indexOf("-")===-1)a&&isNaN(Number(H[0]))?(K.push(H[0].toUpperCase().charCodeAt(0)),K.push(H[0].toLowerCase().charCodeAt(0))):K.push(H[0].charCodeAt(0));else{const v=H[0].split("-").map(h=>h.charCodeAt(0));if(e=v[0],r=v[1],e>r)throw new Error("Character range provided is out of order.");for(let h=e;h<=r;h++)if(a&&isNaN(Number(String.fromCharCode(h)))){const z=String.fromCharCode(h);K.push(z.toUpperCase().charCodeAt(0)),K.push(z.toLowerCase().charCodeAt(0))}else K.push(h)}V=V.substring(H[0].length),H=V.match(s)}if(i=va(y,k,B),d){let v=-1;for(let h=48;h<=57;h++){if(v=K.indexOf(h),v>-1){K.splice(v,1);continue}K.push(h)}for(let h=65;h<=90;h++){if(v=K.indexOf(h),v>-1){K.splice(v,1);continue}K.push(h)}for(let h=97;h<=122;h++){if(v=K.indexOf(h),v>-1){K.splice(v,1);continue}K.push(h)}}const G=Array.from({length:i},()=>String.fromCharCode(K[g0(0)])).join("");u=u.slice(0,o.index)+G+u.slice(o.index+o[0].length),o=u.match(E)}const l=/(.)\{(\d+)\,(\d+)\}/;for(o=u.match(l);o!=null;){if(e=parseInt(o[2]),r=parseInt(o[3]),e>r)throw new Error("Numbers out of order in {} quantifier.");i=g0(e),u=u.slice(0,o.index)+o[1].repeat(i)+u.slice(o.index+o[0].length),o=u.match(l)}const D=/(.)\{(\d+)\}/;for(o=u.match(D);o!=null;)i=parseInt(o[2]),u=u.slice(0,o.index)+o[1].repeat(i)+u.slice(o.index+o[0].length),o=u.match(D);return u}const ko="qwerty!@#$%^123456";function Co(){return"user@example.com"}function ho(){return"пошта@укр.нет"}function go(u,a){let e="pa$$word";return u>e.length&&(e+="_",e+=xi(ko,u-e.length).substring(0,u-e.length)),e}function Se({min:u,max:a,omitTime:e,omitDate:r}){let i=ro(new Date("2019-08-24T14:15:22.123Z"),e,r);return i.length<u&&console.warn(`Using minLength = ${u} is incorrect with format "date-time"`),a&&i.length>a&&console.warn(`Using maxLength = ${a} is incorrect with format "date-time"`),i}function po(u,a){return Se({min:u,max:a,omitTime:!1,omitDate:!1})}function vo(u,a){return Se({min:u,max:a,omitTime:!0,omitDate:!1})}function bo(u,a){return Se({min:u,max:a,omitTime:!1,omitDate:!0}).slice(1)}function mi(u,a,e,r,i=!1){if(r&&i)return Fo(r);let n=xi("string",u);return a&&n.length>a&&(n=n.substring(0,a)),n}function Bo(){return"192.168.0.1"}function Ao(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}function yo(){return"example.com"}function fo(){return"приклад.укр"}function zo(){return"http://example.com"}function So(){return"../dictionary"}function Mo(){return"http://example.com/{endpoint}"}function jo(){return"http://example.com/entity/1"}function Po(){return"/entity/1"}function wo(u,a,e){return no(e||"id")}function Ko(){return"/json/pointer"}function To(){return"1/relative/json/pointer"}function Lo(){return"/regex/"}const No={email:Co,"idn-email":ho,password:go,"date-time":po,date:vo,time:bo,ipv4:Bo,ipv6:Ao,hostname:yo,"idn-hostname":fo,iri:jo,"iri-reference":Po,uri:zo,"uri-reference":So,"uri-template":Mo,uuid:wo,default:mi,"json-pointer":Ko,"relative-json-pointer":To,regex:Lo};function Ro(u,a,e,r){let i=u.format||"default",n=No[i]||mi,o=r&&r.propertyName;return n(u.minLength||0,u.maxLength,o,u.pattern,a?.enablePatterns)}var Fi={};const Ho={skipReadOnly:!1,maxSampleDepth:15};function Go(u,a){if(!u)throw new Error("Unknown format output for building XML.");return(Array.isArray(u)||Object.keys(u).length>1)&&(u={[a?.xml?.name||"root"]:u}),new C.Builder({ignoreAttributes:!1,format:!0,attributeNamePrefix:"$",textNodeName:"#text",cdataPropName:"#cdata"}).build(u)}function Vo(u,a,e){let r=Object.assign({},Ho,a);Do();let i=Su(u,r,e).value;return r?.format==="xml"?Go(i,u):i}function l0(u,a){Fi[u]=a}l0("array",xo);l0("boolean",co);l0("integer",di);l0("number",di);l0("object",mo);l0("string",Ro);function ki(u,a){if(u)try{return Vo(u,{skipReadOnly:!0,skipNonRequired:!1,quiet:!0})}catch(e){a.error(C.bgRed(" Error while generating test data from JSON Schema ")+`
2
2
  `+e);return}}function Jo(u,a){if(u?.example)return u.example;if(C.isPlainObject(u?.examples))return Ci(u.examples);if(u?.schema)return ki(u.schema,a)}function Ci(u){if(C.isPlainObject(u)){const a=Object.keys(u)[0];return a?u[a]?.value:void 0}else return}function _o(u,a){const e=u?.requestBody?.content||{},[r,i]=Object.entries(e)[0]||[],n=i?.example||Ci(i?.examples)||ki(i?.schema,a),o=$o(u);return{parameters:Io([...ba(u.pathParameters,a),...ba(u.parameters,a)]).filter(({value:E})=>E),contentTypeParameters:[...r?[{name:"content-type",in:"header",value:r}]:[],...o?[{name:"accept",in:"header",value:o}]:[]],requestBody:n,contentType:r}}function $o(u){return u?.responses?Array.from(new Set(Object.values(u.responses).flatMap(a=>C.isPlainObject(a)&&"content"in a?Object.keys(a.content||{}):[]))).join(", "):void 0}function ba(u,a){return(u||[]).filter(e=>e?.required===!0).map(e=>{if(ze(e))return{name:e.name,in:e.in,value:Jo(e,a),...e.allowReserved&&{allowReserved:e.allowReserved}}}).filter(e=>e!==void 0)}function Io(u){const a={};for(const e of u)ze(e)&&(a[(e.name+":"+e.in).toLowerCase()]=e);return Object.values(a)}function Oo(u,a){let e,r;if(u.includes("$sourceDescriptions.")){const[,E,l]=u.split(".");e=E,r=l}else u.includes(".")?[e,r]=u.split("."):(r=u,e=Object.keys(a)[0]);const i=Object.keys(a);if(!a[e])throw new Error(`Unknown description name ${C.red(e)} at ${C.red(u)}. Available descriptions: ${i.join(", ")}.`);const n=a[e],o=n?.components?.securitySchemes,s=n.servers;for(const[E,l]of Object.entries(a[e].paths)){if(!l)return;for(const[D,d]of Object.entries(l))if(d.operationId===r)return{servers:l.servers||s,...d,pathParameters:d.parameters||[],path:E,method:D,descriptionName:e,securitySchemes:o}}throw new Error(`Unknown operationId ${C.red(r)} at ${C.red(u)}.`)}function Wo(u,a){const{$sourceDescriptions:e,sourceDescriptions:r}=a,[i,n]=u.split("#");if(!r)throw new Error("Missing described sourceDescriptions");const o=r.find(y=>{if(["openapi","arazzo"].includes(y.type)){if(i.includes("$sourceDescriptions.")){const[,K]=i.split(".");return y.name===K}return"url"in y&&y.url===i}return!1})?.name;if(!o)throw new Error(`Unknown operationPath ${C.red(u)}. API description ${C.red(i)} is not listed in 'sourceDescriptions' workflow section.`);const s=e[o]||{},E=s?.components?.securitySchemes,[l,D,d]=C.JsonPointerLib.parse(n);if(l!=="paths")throw new Error(`Invalid fragment identifier: ${n} at operationPath ${C.red(u)}.`);const{servers:F}=s,k=C.JsonPointerLib.get(s,n)||{},B=C.JsonPointerLib.get(s,C.JsonPointerLib.compile(["paths",D]))||{};return{servers:B.servers||F,...k,pathParameters:B.parameters||[],path:D,method:d,descriptionName:o,securitySchemes:E}}function qo(u,a){if(!u.operationId&&!u.operationPath)return;const{$sourceDescriptions:e,sourceDescriptions:r}=a,{operationId:i,operationPath:n}=u;return i?Oo(i,e):n?Wo(n,{$sourceDescriptions:e,sourceDescriptions:r}):void 0}function Zo({statusCode:u,contentType:a,descriptionResponses:e}){return e?(e[u]||e.default)?.content?.[a]?.schema:void 0}function Uo(u,a){if(!a)return;const r=a.requestBody?.content;return r&&r[u]?.schema||void 0}function hi({ctx:u,security:a,operation:e}){const{scheme:r,schemeName:i}=a;if(r)return a.scheme;if(i){if(typeof i=="string"&&i.startsWith("$sourceDescriptions.")){const[n,o,s]=i.split("."),l=(o&&u.$sourceDescriptions[o])?.components?.securitySchemes;return s&&l?l[s]:void 0}return e?.securitySchemes?.[i]}}function S0(){}function Ba(){return typeof WeakMap<"u"?new WeakMap:Yo()}function Yo(){return{add:S0,delete:S0,get:S0,set:S0,has:function(u){return!1}}}var Qo=Object.prototype.hasOwnProperty,ve=function(u,a){return Qo.call(u,a)};function se(u,a){for(var e in a)ve(a,e)&&(u[e]=a[e]);return u}var Xo=/^[ \t]*(?:\r\n|\r|\n)/,u4=/(?:\r\n|\r|\n)[ \t]*$/,e4=/^(?:[\r\n]|$)/,a4=/(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/,i4=/^[ \t]*[\r\n][ \t\r\n]*$/;function Aa(u,a,e){var r=0,i=u[0].match(a4);i&&(r=i[1].length);var n="(\\r\\n|\\r|\\n).{0,"+r+"}",o=new RegExp(n,"g");a&&(u=u.slice(1));var s=e.newline,E=e.trimLeadingNewline,l=e.trimTrailingNewline,D=typeof s=="string",d=u.length,F=u.map(function(k,B){return k=k.replace(o,"$1"),B===0&&E&&(k=k.replace(Xo,"")),B===d-1&&l&&(k=k.replace(u4,"")),D&&(k=k.replace(/\r\n|\n|\r/g,function(y){return s})),k});return F}function r4(u,a){for(var e="",r=0,i=u.length;r<i;r++)e+=u[r],r<i-1&&(e+=a[r]);return e}function n4(u){return ve(u,"raw")&&ve(u,"length")}function gi(u){var a=Ba(),e=Ba();function r(n){for(var o=[],s=1;s<arguments.length;s++)o[s-1]=arguments[s];if(n4(n)){var E=n,l=(o[0]===r||o[0]===Pu)&&i4.test(E[0])&&e4.test(E[1]),D=l?e:a,d=D.get(E);if(d||(d=Aa(E,l,u),D.set(E,d)),o.length===0)return d[0];var F=r4(d,l?o.slice(1):o);return F}else return gi(se(se({},u),n||{}))}var i=se(r,{string:function(n){return Aa([n],!1,u)[0]}});return i}var Pu=gi({trimLeadingNewline:!0,trimTrailingNewline:!0});if(typeof module<"u")try{module.exports=Pu,Object.defineProperty(Pu,"__esModule",{value:!0}),Pu.default=Pu,Pu.outdent=Pu}catch{}function o4(u){return!h0.isBrowser&&process.env.NODE_ENV==="test"?"<test>ms":`${Math.ceil(performance.now()-u)}ms`}function W0(u){const a=u.length;let e=0,r=0,i=0,n=0,o=0,s=0,E=0;const l=new Set;let D=0;const d=new Set,F=new Set;for(const k of u){const B=pi(k.executedSteps);let y=!1;for(const K of B){if(n++,K.retriesLeft&&K.retriesLeft!==0)continue;i++;let V=!1;for(const H of K.checks)if(r++,!H.passed)switch(H.severity){case"warn":o++,l.add(k.workflowId),F.add(k.workflowId+":"+K.stepId);break;case"off":s++,d.add(k.workflowId+":"+K.stepId);break;default:e++,V=!0}V&&(D++,y=!0)}y&&E++}return{workflows:{passed:a-E,failed:E,warnings:l.size,skipped:0,total:a},steps:{passed:i-D,failed:D,warnings:F.size,skipped:d.size,total:i},checks:{passed:r-e,failed:e,warnings:o,skipped:s,total:r},totalRequests:n}}function pi(u){return u.flatMap(a=>"executedSteps"in a?pi(a.executedSteps):[a])}function t4(u){try{return JSON.parse(u),!0}catch{return!1}}function s4(u,a){const e=u.endsWith("/")?u.slice(0,-1):u,r=a.startsWith("/")?a.slice(1):a;return`${e}/${r}`}const ya=50;function vi({testNameToDisplay:u,checks:a,verboseLogs:e,verboseResponseLogs:r,logger:i}){const n=a.every(({passed:o})=>o);i.output(` ${n?C.green("✓"):C.red("✗")} ${C.blue(u)}`),e&&(i.output(`${hu}
3
3
  `+(fa({logs:e,logger:i})||"")),i.printNewLine()),r&&(i.output(`${hu}
4
4
  `+(fa({logs:r,type:"response",logger:i})||"")),i.printNewLine()),i.printNewLine();for(const o of a)i.output(`${au(l4(o,o.severity),4)}
@@ -1,6 +1,6 @@
1
- import { aL as su, aK as Su, aR as s0, aS as Wu, aT as He, aU as mo, aV as I0, aW as eu, aX as d0, aY as Du, aZ as cu, a_ as qu, a$ as Zu, b0 as Bi, b1 as Fo, b2 as Pa, b3 as ko, b4 as Co, b5 as wa, g as Ge, b6 as ho, b7 as O0, b8 as je, b9 as Ka } from "./replay-index-BzzBKjHm.js";
2
- import { a as f0 } from "./replay-resolve-DsgcWnjC.js";
3
- import { y as Ai, a4 as Ta, c as go, Z as po, U as vo, J as bo, a9 as yi } from "./replay-lint-DlDmPTBV.js";
1
+ import { aM as su, aL as Su, aS as s0, aT as Wu, aU as He, aV as mo, aW as I0, aX as eu, aY as d0, aZ as Du, a_ as cu, a$ as qu, b0 as Zu, b1 as Bi, b2 as Fo, b3 as Pa, b4 as ko, b5 as Co, b6 as wa, g as Ge, b7 as ho, b8 as O0, b9 as je, ba as Ka } from "./replay-index-BowK-_3Z.js";
2
+ import { a as f0 } from "./replay-resolve-LjvT95Yw.js";
3
+ import { y as Ai, a4 as Ta, c as go, Z as po, U as vo, J as bo, a9 as yi } from "./replay-lint-a0aMVdOC.js";
4
4
  function Bo(u) {
5
5
  return su(u) && "name" in u && "value" in u && !("in" in u);
6
6
  }
@@ -1,5 +1,5 @@
1
- import { aE as h, aF as x, aG as i } from "./replay-index-BzzBKjHm.js";
2
- import { aH as E, aI as b, aJ as j } from "./replay-index-BzzBKjHm.js";
1
+ import { aF as h, aG as x, aH as i } from "./replay-index-BowK-_3Z.js";
2
+ import { aI as b, aJ as j, aK as y } from "./replay-index-BowK-_3Z.js";
3
3
  async function u(n, e) {
4
4
  const t = x(), l = await i(n), c = await i(e), o = l.replace(new RegExp(`^${t}+`), "").split(t).filter(Boolean), r = c.replace(new RegExp(`^${t}+`), "").split(t).filter(Boolean), m = Math.min(o.length, r.length);
5
5
  let s = 0;
@@ -13,10 +13,10 @@ async function w(n) {
13
13
  return e ? `.${e}` : "";
14
14
  }
15
15
  export {
16
- E as dirname,
16
+ b as dirname,
17
17
  w as extname,
18
- b as isAbsolute,
19
- j as join,
18
+ j as isAbsolute,
19
+ y as join,
20
20
  u as relative,
21
21
  i as resolve
22
22
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-Dfnqt_IZ.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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-ClVtMDHn.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,4 +1,4 @@
1
- "use strict";const ge=require("react"),l=require("./replay-index-Dfnqt_IZ.js"),m=require("./replay-db-CCBQadnT.js"),n=require("./replay-create-model-CBCmuEKC.js"),Ie=require("@tanstack/react-query"),x={path:"pathParameters",query:"queryParameters",header:"headers",cookie:"cookies"},ot={run_request:{approveLabel:"Run",denyLabel:"Skip"},update_step:{approveLabel:"Apply",denyLabel:"Dismiss"},update_security:{approveLabel:"Apply",denyLabel:"Dismiss"}},nt={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"},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"}},rt={CHAT:"chat",HISTORY:"history"},st="report_status",it="run_workflow",P={WEB_SEARCH:"web_search"};function at(e){switch(e.provider){case l.AI_PROVIDERS.GEMINI:return{[P.WEB_SEARCH]:n.google.tools.googleSearch({})};case l.AI_PROVIDERS.OPENAI:return{[P.WEB_SEARCH]:n.openai.tools.webSearch({})};case l.AI_PROVIDERS.ANTHROPIC:return{[P.WEB_SEARCH]:n.anthropic.tools.webFetch_20250910()};case l.REUNITE_AI_PROVIDER:return{[P.WEB_SEARCH]:{type:"provider",id:"reunite.web_search",name:"web_search",args:{}}};default:return{}}}const ct=["info","workflows","sourceDescriptions"];function lt(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,`
1
+ "use strict";const ge=require("react"),l=require("./replay-index-ClVtMDHn.js"),m=require("./replay-db-DAiJFj0l.js"),n=require("./replay-create-model-BgR6vFGV.js"),Ie=require("@tanstack/react-query"),x={path:"pathParameters",query:"queryParameters",header:"headers",cookie:"cookies"},ot={run_request:{approveLabel:"Run",denyLabel:"Skip"},update_step:{approveLabel:"Apply",denyLabel:"Dismiss"},update_security:{approveLabel:"Apply",denyLabel:"Dismiss"}},nt={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"},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"}},rt={CHAT:"chat",HISTORY:"history"},st="report_status",it="run_workflow",P={WEB_SEARCH:"web_search"};function at(e){switch(e.provider){case l.AI_PROVIDERS.GEMINI:return{[P.WEB_SEARCH]:n.google.tools.googleSearch({})};case l.AI_PROVIDERS.OPENAI:return{[P.WEB_SEARCH]:n.openai.tools.webSearch({})};case l.AI_PROVIDERS.ANTHROPIC:return{[P.WEB_SEARCH]:n.anthropic.tools.webFetch_20250910()};case l.REUNITE_AI_PROVIDER:return{[P.WEB_SEARCH]:{type:"provider",id:"reunite.web_search",name:"web_search",args:{}}};default:return{}}}const ct=["info","workflows","sourceDescriptions"];function lt(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 dt(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 ut(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 pt(e,t){const o=["Current tab (collection)"];for(const r of t)switch(r){case"info":o.push(lt(e));break;case"workflows":o.push(dt(e));break;case"sourceDescriptions":o.push(ut(e));break}return m.buildMessageFromArray(o,`
@@ -1,7 +1,7 @@
1
1
  import { useContext as Et, createContext as xt } from "react";
2
- import { R as $t, E as se, a1 as H, a2 as Rt, a3 as _t, a4 as qt, b as O, U as D, a5 as Je, a6 as de, Q as ue, a7 as Qe, a8 as pe, a9 as fe, aa as Pt, ab as j, ac as me, ad as Xe, ae as Ze, af as he, ag as Nt, ah as Ut, ai as Dt, I as Lt, aj as Wt, ak as et, al as tt, am as Mt, J as X, an as Ft, T as ot, H as nt, ao as jt, Y as Bt, ap as Oe, aq as Yt, ar as zt, as as Ae, at as Ht, au as Gt, O as g, av as Ee, aw as Vt, ax as xe, ay as Kt, az as Jt, aA as Qt, A as rt, a as st } from "./replay-index-BzzBKjHm.js";
3
- import { b as k, f as at, a as it, c as ct, d as Z, e as lt, i as $e, h as we, R as L, j as Xt, k as Zt, p as eo, s as Re, l as to } from "./replay-db-DfOjLqsq.js";
4
- import { b as oo, o as no, d as ro, e as p, u as ee, f as c, h as x, j as S, n as T, k as U, m as w, q as b, r as Ie, t as B, v as te, Z as W, w as so, x as _e, c as ao, s as io, y as co } from "./replay-create-model-C5yvtnXA.js";
2
+ import { R as $t, E as se, a1 as H, a2 as Rt, a3 as _t, a4 as qt, b as O, U as D, a5 as Je, a6 as de, Q as ue, a7 as Qe, a8 as pe, a9 as fe, aa as Pt, ab as j, ac as me, ad as Xe, ae as Ze, af as he, ag as Nt, ah as Ut, ai as Dt, I as Lt, aj as Wt, ak as et, al as tt, am as Mt, J as X, an as Ft, T as ot, H as nt, ao as jt, Y as Bt, ap as Oe, aq as Yt, ar as zt, as as Ae, at as Ht, au as Gt, O as g, av as Ee, aw as Vt, ax as xe, ay as Kt, az as Jt, aA as Qt, A as rt, a as st } from "./replay-index-BowK-_3Z.js";
3
+ import { b as k, f as at, a as it, c as ct, d as Z, e as lt, i as $e, h as we, R as L, j as Xt, k as Zt, p as eo, s as Re, l as to } from "./replay-db-DKzJowQC.js";
4
+ import { b as oo, o as no, d as ro, e as p, u as ee, f as c, h as x, j as S, n as T, k as U, m as w, q as b, r as Ie, t as B, v as te, Z as W, w as so, x as _e, c as ao, s as io, y as co } from "./replay-create-model-BhuazQ2q.js";
5
5
  import { useInfiniteQuery as lo, useQuery as uo } from "@tanstack/react-query";
6
6
  const G = {
7
7
  path: "pathParameters",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./replay-create-model-CBCmuEKC.js"),n=require("./replay-index-Dfnqt_IZ.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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./replay-create-model-BgR6vFGV.js"),n=require("./replay-index-ClVtMDHn.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-C5yvtnXA.js";
2
- import { M as s } from "./replay-index-BzzBKjHm.js";
1
+ import { c as i, g as n } from "./replay-create-model-BhuazQ2q.js";
2
+ import { M as s } from "./replay-index-BowK-_3Z.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-Dfnqt_IZ.js"),t=require("./replay-oauth2-redirect-handler-Bqw5UUvl.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-ClVtMDHn.js"),t=require("./replay-oauth2-redirect-handler-Bqw5UUvl.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,4 +1,4 @@
1
- import { E as s, r, bd as t, be as l, R as o, bf as b, bg as d, x as R, bh as m, bi as p, z as n, bj as i, bk as y, bl as h, bm as u, p as A, o as T, bn as E, bo as O } from "./replay-index-BzzBKjHm.js";
1
+ import { E as s, r, be as t, bf as l, R as o, bg as b, bh as p, x as R, bi as d, bj as m, z as n, bk as i, bl as y, bm as h, bn as u, p as A, o as T, bo as E, bp as O } from "./replay-index-BowK-_3Z.js";
2
2
  import { O as I, h as P } from "./replay-oauth2-redirect-handler-CqKZB3aV.js";
3
3
  export {
4
4
  s as AI_PROVIDERS,
@@ -8,10 +8,10 @@ export {
8
8
  I as OAuth2Error,
9
9
  o as REUNITE_AI_PROVIDER,
10
10
  b as Replay,
11
- d as ReplayOverlay,
11
+ p as ReplayOverlay,
12
12
  R as SpanStatusCode,
13
- m as TelemetryClient,
14
- p as applyThemeToDOM,
13
+ d as TelemetryClient,
14
+ m as applyThemeToDOM,
15
15
  n as createResource,
16
16
  i as getCurrentTheme,
17
17
  P as handleOAuth2Redirect,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/replay",
3
- "version": "0.27.0-next.8",
3
+ "version": "0.27.0-next.9",
4
4
  "type": "module",
5
5
  "main": "./dist/replay.cjs",
6
6
  "module": "./dist/replay.js",
@@ -17,11 +17,11 @@
17
17
  },
18
18
  "peerDependencies": {
19
19
  "@tanstack/react-query": "5.62.3",
20
- "react": "^19.2.4",
21
- "react-dom": "^19.2.4",
22
- "react-router-dom": "^7.18.1",
20
+ "react": "^19.2.7",
21
+ "react-dom": "^19.2.7",
22
+ "react-router": "^8.3.0",
23
23
  "styled-components": "^6.4.2",
24
- "@redocly/theme": "0.68.0-next.6"
24
+ "@redocly/theme": "0.68.0-next.7"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@ai-sdk/anthropic": "4.0.4",
@@ -53,8 +53,8 @@
53
53
  "@opentelemetry/api": "1.9.1",
54
54
  "@redocly/hookstate-core": "^4.2.4",
55
55
  "@redocly/hookstate-devtools": "^4.2.1",
56
- "@redocly/openapi-core": "2.44.2",
57
- "@redocly/respect-core": "2.44.2",
56
+ "@redocly/openapi-core": "2.45.0",
57
+ "@redocly/respect-core": "2.45.0",
58
58
  "@redocly/vscode-json-languageservice": "^3.4.9",
59
59
  "@tauri-apps/api": "2.4.1",
60
60
  "@tauri-apps/plugin-dialog": "2.0.0-rc.1",
@@ -1,23 +0,0 @@
1
- async function e(n, r = {}, o) {
2
- return window.__TAURI_INTERNALS__.invoke(n, r, o);
3
- }
4
- async function p(n, r) {
5
- await e("plugin:opener|open_url", {
6
- url: n,
7
- with: r
8
- });
9
- }
10
- async function t(n, r) {
11
- await e("plugin:opener|open_path", {
12
- path: n,
13
- with: r
14
- });
15
- }
16
- async function i(n) {
17
- return e("plugin:opener|reveal_item_in_dir", { paths: typeof n == "string" ? [n] : n });
18
- }
19
- export {
20
- t as openPath,
21
- p as openUrl,
22
- i as revealItemInDir
23
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});async function r(e,n={},o){return window.__TAURI_INTERNALS__.invoke(e,n,o)}async function t(e,n){await r("plugin:opener|open_url",{url:e,with:n})}async function i(e,n){await r("plugin:opener|open_path",{path:e,with:n})}async function p(e){return r("plugin:opener|reveal_item_in_dir",{paths:typeof e=="string"?[e]:e})}exports.openPath=i;exports.openUrl=t;exports.revealItemInDir=p;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./replay-index-Dfnqt_IZ.js");async function a(t={}){return typeof t=="object"&&Object.freeze(t),await i.invoke("plugin:dialog|open",{options:t})}async function o(t={}){return typeof t=="object"&&Object.freeze(t),await i.invoke("plugin:dialog|save",{options:t})}async function l(t,n){const e=typeof n=="string"?{title:n}:n;await i.invoke("plugin:dialog|message",{message:t.toString(),title:e?.title?.toString(),kind:e?.kind,okButtonLabel:e?.okLabel?.toString()})}async function r(t,n){const e=typeof n=="string"?{title:n}:n;return await i.invoke("plugin:dialog|ask",{message:t.toString(),title:e?.title?.toString(),kind:e?.kind,okButtonLabel:e?.okLabel?.toString()??"Yes",cancelButtonLabel:e?.cancelLabel?.toString()??"No"})}async function c(t,n){const e=typeof n=="string"?{title:n}:n;return await i.invoke("plugin:dialog|confirm",{message:t.toString(),title:e?.title?.toString(),kind:e?.kind,okButtonLabel:e?.okLabel?.toString()??"Ok",cancelButtonLabel:e?.cancelLabel?.toString()??"Cancel"})}exports.ask=r;exports.confirm=c;exports.message=l;exports.open=a;exports.save=o;
@@ -1,47 +0,0 @@
1
- "use strict";const le=require("./replay-index-Dfnqt_IZ.js");function Pn(e){return!!e}var Tt={},Ct,un;function dt(){if(un)return Ct;un=1;const e="\\\\/",t=`[^${e}]`,n=0,r="\\.",i="\\+",o="\\?",a="\\/",s="(?=.)",l="[^/]",u=`(?:${a}|$)`,c=`(?:^|${a})`,y=`${r}{1,2}${u}`,g=`(?!${r})`,T=`(?!${c}${y})`,E=`(?!${r}{0,1}${u})`,w=`(?!${y})`,F=`[^.${a}]`,N=`${l}*?`,R={DOT_LITERAL:r,PLUS_LITERAL:i,QMARK_LITERAL:o,SLASH_LITERAL:a,ONE_CHAR:s,QMARK:l,END_ANCHOR:u,DOTS_SLASH:y,NO_DOT:g,NO_DOTS:T,NO_DOT_SLASH:E,NO_DOTS_SLASH:w,QMARK_NO_DOT:F,STAR:N,START_ANCHOR:c,SEP:"/"},p={...R,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:"\\"},x={__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 Ct={DEFAULT_MAX_EXTGLOB_RECURSION:n,MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:x,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(_){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${_.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(_){return _===!0?p:R}},Ct}var fn;function ht(){return fn||(fn=1,(function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:i}=dt();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,pn;function Sr(){if(pn)return vt;pn=1;const e=ht(),{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:y,CHAR_QUESTION_MARK:g,CHAR_RIGHT_CURLY_BRACE:T,CHAR_RIGHT_PARENTHESES:E,CHAR_RIGHT_SQUARE_BRACKET:w}=dt(),F=R=>R===s||R===r,N=R=>{R.isPrefix!==!0&&(R.depth=R.isGlobstar?1/0:1)};return vt=(R,p)=>{const x=p||{},_=R.length-1,b=x.parts===!0||x.scanToEnd===!0,S=[],m=[],Q=[];let W=R,P=-1,G=0,J=0,ce=!1,ue=!1,j=!1,Se=!1,be=!1,B=!1,oe=!1,xe=!1,Pe=!1,K=!1,ae=0,Ae,$,f={value:"",depth:0,isGlob:!1};const Z=()=>P>=_,he=()=>W.charCodeAt(P+1),ee=()=>(Ae=$,W.charCodeAt(++P));for(;P<_;){$=ee();let V;if($===r){oe=f.backslashes=!0,$=ee(),$===l&&(B=!0);continue}if(B===!0||$===l){for(ae++;Z()!==!0&&($=ee());){if($===r){oe=f.backslashes=!0,ee();continue}if($===l){ae++;continue}if(B!==!0&&$===o&&($=ee())===o){if(ce=f.isBrace=!0,j=f.isGlob=!0,K=!0,b===!0)continue;break}if(B!==!0&&$===i){if(ce=f.isBrace=!0,j=f.isGlob=!0,K=!0,b===!0)continue;break}if($===T&&(ae--,ae===0)){B=!1,ce=f.isBrace=!0,K=!0;break}}if(b===!0)continue;break}if($===s){if(S.push(P),m.push(f),f={value:"",depth:0,isGlob:!1},K===!0)continue;if(Ae===o&&P===G+1){G+=2;continue}J=P+1;continue}if(x.noext!==!0&&($===y||$===n||$===t||$===g||$===a)===!0&&he()===u){if(j=f.isGlob=!0,Se=f.isExtglob=!0,K=!0,$===a&&P===G&&(Pe=!0),b===!0){for(;Z()!==!0&&($=ee());){if($===r){oe=f.backslashes=!0,$=ee();continue}if($===E){j=f.isGlob=!0,K=!0;break}}continue}break}if($===t){if(Ae===t&&(be=f.isGlobstar=!0),j=f.isGlob=!0,K=!0,b===!0)continue;break}if($===g){if(j=f.isGlob=!0,K=!0,b===!0)continue;break}if($===c){for(;Z()!==!0&&(V=ee());){if(V===r){oe=f.backslashes=!0,ee();continue}if(V===w){ue=f.isBracket=!0,j=f.isGlob=!0,K=!0;break}}if(b===!0)continue;break}if(x.nonegate!==!0&&$===a&&P===G){xe=f.negated=!0,G++;continue}if(x.noparen!==!0&&$===u){if(j=f.isGlob=!0,b===!0){for(;Z()!==!0&&($=ee());){if($===u){oe=f.backslashes=!0,$=ee();continue}if($===E){K=!0;break}}continue}break}if(j===!0){if(K=!0,b===!0)continue;break}}x.noext===!0&&(Se=!1,j=!1);let d=W,h="",fe="";G>0&&(h=W.slice(0,G),W=W.slice(G),J-=G),d&&j===!0&&J>0?(d=W.slice(0,J),fe=W.slice(J)):j===!0?(d="",fe=W):d=W,d&&d!==""&&d!=="/"&&d!==W&&F(d.charCodeAt(d.length-1))&&(d=d.slice(0,-1)),x.unescape===!0&&(fe&&(fe=e.removeBackslashes(fe)),d&&oe===!0&&(d=e.removeBackslashes(d)));const D={prefix:h,input:R,start:G,base:d,glob:fe,isBrace:ce,isBracket:ue,isGlob:j,isExtglob:Se,isGlobstar:be,negated:xe,negatedExtglob:Pe};if(x.tokens===!0&&(D.maxDepth=0,F($)||m.push(f),D.tokens=m),x.parts===!0||x.tokens===!0){let V;for(let Y=0;Y<S.length;Y++){const pe=V?V+1:G,_e=S[Y],Ke=R.slice(pe,_e);x.tokens&&(Y===0&&G!==0?(m[Y].isPrefix=!0,m[Y].value=h):m[Y].value=Ke,N(m[Y]),D.maxDepth+=m[Y].depth),(Y!==0||Ke!=="")&&Q.push(Ke),V=_e}if(V&&V+1<R.length){const Y=R.slice(V+1);Q.push(Y),x.tokens&&(m[m.length-1].value=Y,N(m[m.length-1]),D.maxDepth+=m[m.length-1].depth)}D.slashes=S,D.parts=Q}return D},vt}var Rt,dn;function Tr(){if(dn)return Rt;dn=1;const e=dt(),t=ht(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:r,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:o,REPLACEMENTS:a}=e,s=(A,R)=>{if(typeof R.expandRange=="function")return R.expandRange(...A,R);A.sort();const p=`[${A.join("-")}]`;try{new RegExp(p)}catch{return A.map(_=>t.escapeRegex(_)).join("..")}return p},l=(A,R)=>`Missing ${A}: "${R}" - use "\\\\${R}" to match literal characters`,u=A=>{const R=[];let p=0,x=0,_=0,b="",S=!1;for(const m of A){if(S===!0){b+=m,S=!1;continue}if(m==="\\"){b+=m,S=!0;continue}if(m==='"'){_=_===1?0:1,b+=m;continue}if(_===0){if(m==="[")p++;else if(m==="]"&&p>0)p--;else if(p===0){if(m==="(")x++;else if(m===")"&&x>0)x--;else if(m==="|"&&x===0){R.push(b),b="";continue}}}b+=m}return R.push(b),R},c=A=>{let R=!1;for(const p of A){if(R===!0){R=!1;continue}if(p==="\\"){R=!0;continue}if(/[?*+@!()[\]{}]/.test(p))return!1}return!0},y=A=>{let R=A.trim(),p=!0;for(;p===!0;)p=!1,/^@\([^\\()[\]{}|]+\)$/.test(R)&&(R=R.slice(2,-1),p=!0);if(c(R))return R.replace(/\\(.)/g,"$1")},g=A=>{const R=A.map(y).filter(Boolean);for(let p=0;p<R.length;p++)for(let x=p+1;x<R.length;x++){const _=R[p],b=R[x],S=_[0];if(!(!S||_!==S.repeat(_.length)||b!==S.repeat(b.length))&&(_===b||_.startsWith(b)||b.startsWith(_)))return!0}return!1},T=(A,R=!0)=>{if(A[0]!=="+"&&A[0]!=="*"||A[1]!=="(")return;let p=0,x=0,_=0,b=!1;for(let S=1;S<A.length;S++){const m=A[S];if(b===!0){b=!1;continue}if(m==="\\"){b=!0;continue}if(m==='"'){_=_===1?0:1;continue}if(_!==1){if(m==="["){p++;continue}if(m==="]"&&p>0){p--;continue}if(!(p>0)){if(m==="("){x++;continue}if(m===")"&&(x--,x===0))return R===!0&&S!==A.length-1?void 0:{type:A[0],body:A.slice(2,S),end:S}}}}},E=A=>{let R=0;const p=[];for(;R<A.length;){const _=T(A.slice(R),!1);if(!_||_.type!=="*")return;const b=u(_.body).map(m=>m.trim());if(b.length!==1)return;const S=y(b[0]);if(!S||S.length!==1)return;p.push(S),R+=_.end+1}return p.length<1?void 0:`${p.length===1?t.escapeRegex(p[0]):`[${p.map(_=>t.escapeRegex(_)).join("")}]`}*`},w=A=>{let R=0,p=A.trim(),x=T(p);for(;x;)R++,p=x.body.trim(),x=T(p);return R},F=(A,R)=>{if(R.maxExtglobRecursion===!1)return{risky:!1};const p=typeof R.maxExtglobRecursion=="number"?R.maxExtglobRecursion:e.DEFAULT_MAX_EXTGLOB_RECURSION,x=u(A).map(_=>_.trim());if(x.length>1&&(x.some(_=>_==="")||x.some(_=>/^[*?]+$/.test(_))||g(x)))return{risky:!0};for(const _ of x){const b=E(_);if(b)return{risky:!0,safeOutput:b};if(w(_)>p)return{risky:!0}}return{risky:!1}},N=(A,R)=>{if(typeof A!="string")throw new TypeError("Expected a string");A=a[A]||A;const p={...R},x=typeof p.maxLength=="number"?Math.min(n,p.maxLength):n;let _=A.length;if(_>x)throw new SyntaxError(`Input length: ${_}, exceeds maximum allowed length: ${x}`);const b={type:"bos",value:"",output:p.prepend||""},S=[b],m=p.capture?"":"?:",Q=e.globChars(p.windows),W=e.extglobChars(Q),{DOT_LITERAL:P,PLUS_LITERAL:G,SLASH_LITERAL:J,ONE_CHAR:ce,DOTS_SLASH:ue,NO_DOT:j,NO_DOT_SLASH:Se,NO_DOTS_SLASH:be,QMARK:B,QMARK_NO_DOT:oe,STAR:xe,START_ANCHOR:Pe}=Q,K=v=>`(${m}(?:(?!${Pe}${v.dot?ue:P}).)*?)`,ae=p.dot?"":j,Ae=p.dot?B:oe;let $=p.bash===!0?K(p):xe;p.capture&&($=`(${$})`),typeof p.noext=="boolean"&&(p.noextglob=p.noext);const f={input:A,index:-1,start:0,dot:p.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:S};A=t.removePrefix(A,f),_=A.length;const Z=[],he=[],ee=[];let d=b,h;const fe=()=>f.index===_-1,D=f.peek=(v=1)=>A[f.index+v],V=f.advance=()=>A[++f.index]||"",Y=()=>A.slice(f.index+1),pe=(v="",q=0)=>{f.consumed+=v,f.index+=q},_e=v=>{f.output+=v.output!=null?v.output:v.value,pe(v.value)},Ke=()=>{let v=1;for(;D()==="!"&&(D(2)!=="("||D(3)==="?");)V(),f.start++,v++;return v%2===0?!1:(f.negated=!0,f.start++,!0)},tt=v=>{f[v]++,ee.push(v)},Te=v=>{f[v]--,ee.pop()},L=v=>{if(d.type==="globstar"){const q=f.braces>0&&(v.type==="comma"||v.type==="brace"),C=v.extglob===!0||Z.length&&(v.type==="pipe"||v.type==="paren");v.type!=="slash"&&v.type!=="paren"&&!q&&!C&&(f.output=f.output.slice(0,-d.output.length),d.type="star",d.value="*",d.output=$,f.output+=d.output)}if(Z.length&&v.type!=="paren"&&(Z[Z.length-1].inner+=v.value),(v.value||v.output)&&_e(v),d&&d.type==="text"&&v.type==="text"){d.output=(d.output||d.value)+v.value,d.value+=v.value;return}v.prev=d,S.push(v),d=v},nt=(v,q)=>{const C={...W[q],conditions:1,inner:""};C.prev=d,C.parens=f.parens,C.output=f.output,C.startIndex=f.index,C.tokensIndex=S.length;const k=(p.capture?"(":"")+C.open;tt("parens"),L({type:v,value:q,output:f.output?"":ce}),L({type:"paren",extglob:!0,value:V(),output:k}),Z.push(C)},Er=v=>{const q=A.slice(v.startIndex,f.index+1),C=A.slice(v.startIndex+2,f.index),k=F(C,p);if((v.type==="plus"||v.type==="star")&&k.risky){const M=k.safeOutput?(v.output?"":ce)+(p.capture?`(${k.safeOutput})`:k.safeOutput):void 0,ge=S[v.tokensIndex];ge.type="text",ge.value=q,ge.output=M||t.escapeRegex(q);for(let me=v.tokensIndex+1;me<S.length;me++)S[me].value="",S[me].output="",delete S[me].suffix;f.output=v.output+ge.output,f.backtrack=!0,L({type:"paren",extglob:!0,value:h,output:""}),Te("parens");return}let U=v.close+(p.capture?")":""),X;if(v.type==="negate"){let M=$;if(v.inner&&v.inner.length>1&&v.inner.includes("/")&&(M=K(p)),(M!==$||fe()||/^\)+$/.test(Y()))&&(U=v.close=`)$))${M}`),v.inner.includes("*")&&(X=Y())&&/^\.[^\\/.]+$/.test(X)){const ge=N(X,{...R,fastpaths:!1}).output;U=v.close=`)${ge})${M})`}v.prev.type==="bos"&&(f.negatedExtglob=!0)}L({type:"paren",extglob:!0,value:h,output:U}),Te("parens")};if(p.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(A)){let v=!1,q=A.replace(o,(C,k,U,X,M,ge)=>X==="\\"?(v=!0,C):X==="?"?k?k+X+(M?B.repeat(M.length):""):ge===0?Ae+(M?B.repeat(M.length):""):B.repeat(U.length):X==="."?P.repeat(U.length):X==="*"?k?k+X+(M?$:""):$:k?C:`\\${C}`);return v===!0&&(p.unescape===!0?q=q.replace(/\\/g,""):q=q.replace(/\\+/g,C=>C.length%2===0?"\\\\":C?"\\":"")),q===A&&p.contains===!0?(f.output=A,f):(f.output=t.wrapOutput(q,f,R),f)}for(;!fe();){if(h=V(),h==="\0")continue;if(h==="\\"){const C=D();if(C==="/"&&p.bash!==!0||C==="."||C===";")continue;if(!C){h+="\\",L({type:"text",value:h});continue}const k=/^\\+/.exec(Y());let U=0;if(k&&k[0].length>2&&(U=k[0].length,f.index+=U,U%2!==0&&(h+="\\")),p.unescape===!0?h=V():h+=V(),f.brackets===0){L({type:"text",value:h});continue}}if(f.brackets>0&&(h!=="]"||d.value==="["||d.value==="[^")){if(p.posix!==!1&&h===":"){const C=d.value.slice(1);if(C.includes("[")&&(d.posix=!0,C.includes(":"))){const k=d.value.lastIndexOf("["),U=d.value.slice(0,k),X=d.value.slice(k+2),M=r[X];if(M){d.value=U+M,f.backtrack=!0,V(),!b.output&&S.indexOf(d)===1&&(b.output=ce);continue}}}(h==="["&&D()!==":"||h==="-"&&D()==="]")&&(h=`\\${h}`),h==="]"&&(d.value==="["||d.value==="[^")&&(h=`\\${h}`),p.posix===!0&&h==="!"&&d.value==="["&&(h="^"),d.value+=h,_e({value:h});continue}if(f.quotes===1&&h!=='"'){h=t.escapeRegex(h),d.value+=h,_e({value:h});continue}if(h==='"'){f.quotes=f.quotes===1?0:1,p.keepQuotes===!0&&L({type:"text",value:h});continue}if(h==="("){tt("parens"),L({type:"paren",value:h});continue}if(h===")"){if(f.parens===0&&p.strictBrackets===!0)throw new SyntaxError(l("opening","("));const C=Z[Z.length-1];if(C&&f.parens===C.parens+1){Er(Z.pop());continue}L({type:"paren",value:h,output:f.parens?")":"\\)"}),Te("parens");continue}if(h==="["){if(p.nobracket===!0||!Y().includes("]")){if(p.nobracket!==!0&&p.strictBrackets===!0)throw new SyntaxError(l("closing","]"));h=`\\${h}`}else tt("brackets");L({type:"bracket",value:h});continue}if(h==="]"){if(p.nobracket===!0||d&&d.type==="bracket"&&d.value.length===1){L({type:"text",value:h,output:`\\${h}`});continue}if(f.brackets===0){if(p.strictBrackets===!0)throw new SyntaxError(l("opening","["));L({type:"text",value:h,output:`\\${h}`});continue}Te("brackets");const C=d.value.slice(1);if(d.posix!==!0&&C[0]==="^"&&!C.includes("/")&&(h=`/${h}`),d.value+=h,_e({value:h}),p.literalBrackets===!1||t.hasRegexChars(C))continue;const k=t.escapeRegex(d.value);if(f.output=f.output.slice(0,-d.value.length),p.literalBrackets===!0){f.output+=k,d.value=k;continue}d.value=`(${m}${k}|${d.value})`,f.output+=d.value;continue}if(h==="{"&&p.nobrace!==!0){tt("braces");const C={type:"brace",value:h,output:"(",outputIndex:f.output.length,tokensIndex:f.tokens.length};he.push(C),L(C);continue}if(h==="}"){const C=he[he.length-1];if(p.nobrace===!0||!C){L({type:"text",value:h,output:h});continue}let k=")";if(C.dots===!0){const U=S.slice(),X=[];for(let M=U.length-1;M>=0&&(S.pop(),U[M].type!=="brace");M--)U[M].type!=="dots"&&X.unshift(U[M].value);k=s(X,p),f.backtrack=!0}if(C.comma!==!0&&C.dots!==!0){const U=f.output.slice(0,C.outputIndex),X=f.tokens.slice(C.tokensIndex);C.value=C.output="\\{",h=k="\\}",f.output=U;for(const M of X)f.output+=M.output||M.value}L({type:"brace",value:h,output:k}),Te("braces"),he.pop();continue}if(h==="|"){Z.length>0&&Z[Z.length-1].conditions++,L({type:"text",value:h});continue}if(h===","){let C=h;const k=he[he.length-1];k&&ee[ee.length-1]==="braces"&&(k.comma=!0,C="|"),L({type:"comma",value:h,output:C});continue}if(h==="/"){if(d.type==="dot"&&f.index===f.start+1){f.start=f.index+1,f.consumed="",f.output="",S.pop(),d=b;continue}L({type:"slash",value:h,output:J});continue}if(h==="."){if(f.braces>0&&d.type==="dot"){d.value==="."&&(d.output=P);const C=he[he.length-1];d.type="dots",d.output+=h,d.value+=h,C.dots=!0;continue}if(f.braces+f.parens===0&&d.type!=="bos"&&d.type!=="slash"){L({type:"text",value:h,output:P});continue}L({type:"dot",value:h,output:P});continue}if(h==="?"){if(!(d&&d.value==="(")&&p.noextglob!==!0&&D()==="("&&D(2)!=="?"){nt("qmark",h);continue}if(d&&d.type==="paren"){const k=D();let U=h;(d.value==="("&&!/[!=<:]/.test(k)||k==="<"&&!/<([!=]|\w+>)/.test(Y()))&&(U=`\\${h}`),L({type:"text",value:h,output:U});continue}if(p.dot!==!0&&(d.type==="slash"||d.type==="bos")){L({type:"qmark",value:h,output:oe});continue}L({type:"qmark",value:h,output:B});continue}if(h==="!"){if(p.noextglob!==!0&&D()==="("&&(D(2)!=="?"||!/[!=<:]/.test(D(3)))){nt("negate",h);continue}if(p.nonegate!==!0&&f.index===0){Ke();continue}}if(h==="+"){if(p.noextglob!==!0&&D()==="("&&D(2)!=="?"){nt("plus",h);continue}if(d&&d.value==="("||p.regex===!1){L({type:"plus",value:h,output:G});continue}if(d&&(d.type==="bracket"||d.type==="paren"||d.type==="brace")||f.parens>0){L({type:"plus",value:h});continue}L({type:"plus",value:G});continue}if(h==="@"){if(p.noextglob!==!0&&D()==="("&&D(2)!=="?"){L({type:"at",extglob:!0,value:h,output:""});continue}L({type:"text",value:h});continue}if(h!=="*"){(h==="$"||h==="^")&&(h=`\\${h}`);const C=i.exec(Y());C&&(h+=C[0],f.index+=C[0].length),L({type:"text",value:h});continue}if(d&&(d.type==="globstar"||d.star===!0)){d.type="star",d.star=!0,d.value+=h,d.output=$,f.backtrack=!0,f.globstar=!0,pe(h);continue}let v=Y();if(p.noextglob!==!0&&/^\([^?]/.test(v)){nt("star",h);continue}if(d.type==="star"){if(p.noglobstar===!0){pe(h);continue}const C=d.prev,k=C.prev,U=C.type==="slash"||C.type==="bos",X=k&&(k.type==="star"||k.type==="globstar");if(p.bash===!0&&(!U||v[0]&&v[0]!=="/")){L({type:"star",value:h,output:""});continue}const M=f.braces>0&&(C.type==="comma"||C.type==="brace"),ge=Z.length&&(C.type==="pipe"||C.type==="paren");if(!U&&C.type!=="paren"&&!M&&!ge){L({type:"star",value:h,output:""});continue}for(;v.slice(0,3)==="/**";){const me=A[f.index+4];if(me&&me!=="/")break;v=v.slice(3),pe("/**",3)}if(C.type==="bos"&&fe()){d.type="globstar",d.value+=h,d.output=K(p),f.output=d.output,f.globstar=!0,pe(h);continue}if(C.type==="slash"&&C.prev.type!=="bos"&&!X&&fe()){f.output=f.output.slice(0,-(C.output+d.output).length),C.output=`(?:${C.output}`,d.type="globstar",d.output=K(p)+(p.strictSlashes?")":"|$)"),d.value+=h,f.globstar=!0,f.output+=C.output+d.output,pe(h);continue}if(C.type==="slash"&&C.prev.type!=="bos"&&v[0]==="/"){const me=v[1]!==void 0?"|$":"";f.output=f.output.slice(0,-(C.output+d.output).length),C.output=`(?:${C.output}`,d.type="globstar",d.output=`${K(p)}${J}|${J}${me})`,d.value+=h,f.output+=C.output+d.output,f.globstar=!0,pe(h+V()),L({type:"slash",value:"/",output:""});continue}if(C.type==="bos"&&v[0]==="/"){d.type="globstar",d.value+=h,d.output=`(?:^|${J}|${K(p)}${J})`,f.output=d.output,f.globstar=!0,pe(h+V()),L({type:"slash",value:"/",output:""});continue}f.output=f.output.slice(0,-d.output.length),d.type="globstar",d.output=K(p),d.value+=h,f.output+=d.output,f.globstar=!0,pe(h);continue}const q={type:"star",value:h,output:$};if(p.bash===!0){q.output=".*?",(d.type==="bos"||d.type==="slash")&&(q.output=ae+q.output),L(q);continue}if(d&&(d.type==="bracket"||d.type==="paren")&&p.regex===!0){q.output=h,L(q);continue}(f.index===f.start||d.type==="slash"||d.type==="dot")&&(d.type==="dot"?(f.output+=Se,d.output+=Se):p.dot===!0?(f.output+=be,d.output+=be):(f.output+=ae,d.output+=ae),D()!=="*"&&(f.output+=ce,d.output+=ce)),L(q)}for(;f.brackets>0;){if(p.strictBrackets===!0)throw new SyntaxError(l("closing","]"));f.output=t.escapeLast(f.output,"["),Te("brackets")}for(;f.parens>0;){if(p.strictBrackets===!0)throw new SyntaxError(l("closing",")"));f.output=t.escapeLast(f.output,"("),Te("parens")}for(;f.braces>0;){if(p.strictBrackets===!0)throw new SyntaxError(l("closing","}"));f.output=t.escapeLast(f.output,"{"),Te("braces")}if(p.strictSlashes!==!0&&(d.type==="star"||d.type==="bracket")&&L({type:"maybe_slash",value:"",output:`${J}?`}),f.backtrack===!0){f.output="";for(const v of f.tokens)f.output+=v.output!=null?v.output:v.value,v.suffix&&(f.output+=v.suffix)}return f};return N.fastpaths=(A,R)=>{const p={...R},x=typeof p.maxLength=="number"?Math.min(n,p.maxLength):n,_=A.length;if(_>x)throw new SyntaxError(`Input length: ${_}, exceeds maximum allowed length: ${x}`);A=a[A]||A;const{DOT_LITERAL:b,SLASH_LITERAL:S,ONE_CHAR:m,DOTS_SLASH:Q,NO_DOT:W,NO_DOTS:P,NO_DOTS_SLASH:G,STAR:J,START_ANCHOR:ce}=e.globChars(p.windows),ue=p.dot?P:W,j=p.dot?G:W,Se=p.capture?"":"?:",be={negated:!1,prefix:""};let B=p.bash===!0?".*?":J;p.capture&&(B=`(${B})`);const oe=ae=>ae.noglobstar===!0?B:`(${Se}(?:(?!${ce}${ae.dot?Q:b}).)*?)`,xe=ae=>{switch(ae){case"*":return`${ue}${m}${B}`;case".*":return`${b}${m}${B}`;case"*.*":return`${ue}${B}${b}${m}${B}`;case"*/*":return`${ue}${B}${S}${m}${j}${B}`;case"**":return ue+oe(p);case"**/*":return`(?:${ue}${oe(p)}${S})?${j}${m}${B}`;case"**/*.*":return`(?:${ue}${oe(p)}${S})?${j}${B}${b}${m}${B}`;case"**/.*":return`(?:${ue}${oe(p)}${S})?${b}${m}${B}`;default:{const Ae=/^(.*?)\.(\w+)$/.exec(ae);if(!Ae)return;const $=xe(Ae[1]);return $?$+b+Ae[2]:void 0}}},Pe=t.removePrefix(A,be);let K=xe(Pe);return K&&p.strictSlashes!==!0&&(K+=`${S}?`),K},Rt=N,Rt}var bt,hn;function Cr(){if(hn)return bt;hn=1;const e=Sr(),t=Tr(),n=ht(),r=dt(),i=a=>a&&typeof a=="object"&&!Array.isArray(a),o=(a,s,l=!1)=>{if(Array.isArray(a)){const F=a.map(A=>o(A,s,l));return A=>{for(const R of F){const p=R(A);if(p)return p}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||{},y=c.windows,g=u?o.compileRe(a,s):o.makeRe(a,s,!1,!0),T=g.state;delete g.state;let E=()=>!1;if(c.ignore){const F={...s,ignore:null,onMatch:null,onResult:null};E=o(c.ignore,F,l)}const w=(F,N=!1)=>{const{isMatch:A,match:R,output:p}=o.test(F,g,s,{glob:a,posix:y}),x={glob:a,state:T,regex:g,posix:y,input:F,output:p,match:R,isMatch:A};return typeof c.onResult=="function"&&c.onResult(x),A===!1?(x.isMatch=!1,N?x:!1):E(F)?(typeof c.onIgnore=="function"&&c.onIgnore(x),x.isMatch=!1,N?x:!1):(typeof c.onMatch=="function"&&c.onMatch(x),N?x:!0)};return l&&(w.state=T),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 y=l||{},g=y.format||(c?n.toPosixSlashes:null);let T=a===u,E=T&&g?g(a):a;return T===!1&&(E=g?g(a):a,T=E===u),(T===!1||y.capture===!0)&&(y.matchBase===!0||y.basename===!0?T=o.matchBase(a,s,l,c):T=s.exec(E)),{isMatch:!!T,match:T,output:E}},o.matchBase=(a,s,l)=>(s instanceof RegExp?s:o.makeRe(s,l)).test(n.basename(a)),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||{},y=c.contains?"":"^",g=c.contains?"":"$";let T=`${y}(?:${a.output})${g}`;a&&a.negated===!0&&(T=`^(?!${T}).*$`);const E=o.toRegex(T,s);return u===!0&&(E.state=a),E},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,bt=o,bt}var xt,gn;function vr(){if(gn)return xt;gn=1;const e=Cr(),t=ht();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),xt=n,xt}var Rr=vr();const br=le.getDefaultExportFromCjs(Rr),Fn=typeof window<"u"||typeof process>"u"||process?.platform==="browser",Hn=Fn?{}:process.env||{};async function Mn(e,t){const n={};for(const i of t.headers)xr(e,i.matches)&&(n[i.name]=i.envVariable!==void 0?Hn[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 xr(e,t){return t.match(/^https?:\/\//)||(e=e.replace(/^https?:\/\//,"")),br.isMatch(e,t)}function _r(e,t={}){return{name:`${e}List`,properties:{},items:e,...t}}function Ir(e,t={}){return{name:`${e}Map`,properties:{},additionalProperties:()=>e,...t}}const je={name:"SpecExtension",properties:{},additionalProperties:{resolvable:!0}};function wr(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)):Ve(o)?(o={...o},r(o),o):o?.directResolveAs!==void 0?{...o,directResolveAs:i(o.directResolveAs)??void 0}:o}}function Ve(e){return typeof e?.name=="string"}function Ce(e,t){return e===""&&(e="#/"),e[e.length-1]==="/"?e+t:e+"/"+t}function ot(e){return le.isPlainObject(e)&&typeof e.$ref=="string"}function Bn(e){return le.isPlainObject(e)&&typeof e.externalValue=="string"}class Xt{source;pointer;constructor(t,n){this.source=t,this.pointer=n}child(t){return new Xt(this.source,Ce(this.pointer,(Array.isArray(t)?t:[t]).map(we).join("/")))}key(){return{...this,reportOnKey:!0}}get absolutePointer(){return this.source.absoluteRef+(this.pointer==="#/"?"":this.pointer)}}function Dn(e){const t=e.indexOf("~")===-1?e:e.replaceAll("~1","/").replaceAll("~0","~");try{return decodeURIComponent(t)}catch{return t}}function we(e){return typeof e=="number"||e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replaceAll("~","~0").replaceAll("/","~1")}function Un(e){const[t,n=""]=e.split("#/");return{uri:(t.endsWith("#")?t.slice(0,-1):t)||null,pointer:qn(n)}}function qn(e){return e.split("/").map(Dn).filter(Pn)}function Nr(e){const t=e.split("/");return t[t.length-1]}function $r(e){const t=e.split(/[\/\\]/);return t[t.length-1].replace(/\.[^.]+$/,"")}function Ne(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://")||e.startsWith("data:")}function Lr(e){return le.pathBrowserifyExports.extname(e)?Ne(e)?e.substring(0,e.lastIndexOf("/")):le.pathBrowserifyExports.dirname(e):e}function kr(e,t){return Ne(e)?new URL(t,e.endsWith("/")?e:`${e}/`).href:le.pathBrowserifyExports.resolve(e,t)}function Or(e){return typeof e=="string"&&(e.startsWith("#")||Ne(e)||e.startsWith("./")||e.startsWith("../")||e.indexOf("/")>-1||/\.(ya?ml|json)$/i.test(e))}function Pr(e){return/^#[A-Za-z][A-Za-z0-9\-_:.]*$/.test(e)}function Fr(e,t,n){if(!le.isPlainObject(t.node))n.parent[n.key]=t.node;else{delete e.$ref;const r=Object.assign({},t.node,e);Object.assign(e,r)}}var O=Symbol("NOT_RESOLVED"),Qt=Symbol("MERGE_KEY");function te(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 gt(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 Hr=te("tag:yaml.org,2002:str",{resolve:e=>e,identify:e=>typeof e=="string"}),Mr=["","~","null","Null","NULL"],Br=te("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:e=>Mr.indexOf(e)!==-1?null:O,identify:e=>e===null,represent:()=>"null"}),Dr=te("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["n"],resolve:(e,t)=>e==="null"||t&&e===""?null:O,identify:e=>e===null,represent:()=>"null"}),Ur=["","~","null","Null","NULL"],qr=te("tag:yaml.org,2002:null",{implicit:!0,implicitFirstChars:["","~","n","N"],resolve:e=>Ur.indexOf(e)!==-1?null:O,identify:e=>e===null,represent:()=>"null"}),Kr=["true","True","TRUE"],Gr=["false","False","FALSE"],Yr=te("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","T","f","F"],resolve:e=>Kr.indexOf(e)!==-1?!0:Gr.indexOf(e)!==-1?!1:O,identify:e=>Object.prototype.toString.call(e)==="[object Boolean]",represent:e=>e?"true":"false"}),Wr=["true"],jr=["false"],Vr=te("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["t","f"],resolve:e=>Wr.indexOf(e)!==-1?!0:jr.indexOf(e)!==-1?!1:O,identify:e=>Object.prototype.toString.call(e)==="[object Boolean]",represent:e=>e?"true":"false"}),Xr=["true","True","TRUE","y","Y","yes","Yes","YES","on","On","ON"],Qr=["false","False","FALSE","n","N","no","No","NO","off","Off","OFF"],zr=te("tag:yaml.org,2002:bool",{implicit:!0,implicitFirstChars:["y","Y","n","N","t","T","f","F","o","O"],resolve:e=>Xr.indexOf(e)!==-1?!0:Qr.indexOf(e)!==-1?!1:O,identify:e=>Object.prototype.toString.call(e)==="[object Boolean]",represent:e=>e?"true":"false"}),Zr=new RegExp("^(?:0o[0-7]+|0x[0-9a-fA-F]+|[-+]?[0-9]+)$"),Jr=new RegExp("^(?:[-+]?0b[0-1]+|[-+]?0o[0-7]+|[-+]?0x[0-9a-fA-F]+|[-+]?[0-9]+)$");function ei(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 ti(e,t){if(t){if(!Jr.test(e))return O}else if(!Zr.test(e))return O;const n=ei(e);return Number.isFinite(n)?n:O}var Kn=te("tag:yaml.org,2002:int",{implicit:!0,implicitFirstChars:["-","+",..."0123456789"],resolve:ti,identify:e=>Number.isInteger(e)&&!Object.is(e,-0)&&e.toString(10).indexOf("e")<0,represent:e=>e.toString(10)}),ni=new RegExp("^-?(?:0|[1-9][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 O}else if(!ni.test(e))return O;const n=ii(e);return Number.isFinite(n)?n:O}var ai=te("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)}),si=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 li(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 ci(e){if(!si.test(e))return O;const t=li(e);return Number.isFinite(t)?t:O}var kt=te("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)}),ui=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),fi=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function pi(e){if(!ui.test(e))return O;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)||fi.test(e)?r:O}function di(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 Gn=te("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:pi,identify:e=>typeof e=="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:di}),hi=new RegExp("^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$"),gi=new RegExp("^(?:[-+]?[0-9]+(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|[-+]?\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function mi(e,t){if(t){if(!gi.test(e))return O;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:O}if(!hi.test(e))return O;const n=Number(e);return Number.isFinite(n)?n:O}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 yi=te("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}),Ei=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))$"),Si=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function Ti(e){if(!Ei.test(e))return O;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)||Si.test(e)?r:O}function Ci(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 Ot=te("tag:yaml.org,2002:float",{implicit:!0,implicitFirstChars:["-","+",".",..."0123456789"],resolve:Ti,identify:e=>typeof e=="number"&&(!Number.isInteger(e)||Object.is(e,-0)||e.toString(10).indexOf("e")>=0),represent:Ci}),Yn=te("tag:yaml.org,2002:merge",{implicit:!0,implicitFirstChars:["<"],resolve:(e,t)=>e==="<<"||t&&e===""?Qt:O}),vi=/^[A-Za-z0-9+/]*={0,2}$/;function Ri(e){const t=e.replace(/\s/g,"");if(t.length%4!==0||!vi.test(t))return O;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 bi(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}var Wn=te("tag:yaml.org,2002:binary",{resolve:Ri,identify:e=>Object.prototype.toString.call(e)==="[object Uint8Array]",represent:bi}),xi=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),_i=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 Ii(e){let t=xi.exec(e);if(t===null&&(t=_i.exec(e)),t===null)return O;const n=+t[1],r=+t[2]-1,i=+t[3];if(!t[4]){const c=new Date(Date.UTC(n,r,i));return c.getUTCFullYear()!==n||c.getUTCMonth()!==r||c.getUTCDate()!==i?O:c}const o=+t[4],a=+t[5],s=+t[6];let l=0;if(o>23||a>59||s>59)return O;if(t[7]){let c=t[7].slice(0,3);for(;c.length<3;)c+="0";l=+c}const u=new Date(Date.UTC(n,r,i,o,a,s,l));if(u.getUTCFullYear()!==n||u.getUTCMonth()!==r||u.getUTCDate()!==i)return O;if(t[9]){const c=+t[10],y=+(t[11]||0);if(c>23||y>59)return O;const g=(c*60+y)*6e4;u.setTime(u.getTime()-(t[9]==="-"?-g:g))}return u}var wi=te("tag:yaml.org,2002:timestamp",{implicit:!0,implicitFirstChars:[..."0123456789"],resolve:Ii,identify:e=>e instanceof Date,represent:e=>e.toISOString()}),Ni=zt("tag:yaml.org,2002:seq",{create:()=>[],addItem:(e,t)=>{e.push(t)},identify:Array.isArray});function mt(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Pt(e,t){const n={};for(const r of t)e[r]!==void 0&&(n[r]=e[r]);return n}var jn=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(mt(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}),Vn=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]]]),"")}}),$i=gt("tag:yaml.org,2002:map",{create:()=>({}),identify:mt,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)=>e[String(t)]}),Xn=gt("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 Li(){return{scalar:{},sequence:{},mapping:{}}}function ki(){return{scalar:[],sequence:[],mapping:[]}}function Oi(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 At=class Qn{tags;implicitScalarTags;implicitScalarByFirstChar;implicitScalarAnyFirstChar;defaultScalarTag;defaultSequenceTag;defaultMappingTag;exact;prefix;constructor(t){const n=Oi(t),r=[],i=Li(),o=ki();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 y of c.implicitFirstChars)s.add(y);const l=new Map;for(const c of s)l.set(c,r.filter(y=>y.implicitFirstChars===null||y.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 Qn([...this.tags,...n])}},Zt=new At([Hr,Ni,$i]);new At([...Zt.tags,Dr,Vr,ai,yi]);var zn=new At([...Zt.tags,Br,Yr,Kn,Gn]),Pi=new At([...Zt.tags,qr,zr,kt,Ot,wi,Yn,Wn,jn,Vn,Xn]);gt("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||mt(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 mn(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)}gt("tag:yaml.org,2002:map",{create:()=>({}),identify:mt,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=mn(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=mn(t);return n!==null&&Object.prototype.hasOwnProperty.call(e,n)},keys:e=>Object.keys(e),get:(e,t)=>e[String(t)]});var Fi={maxLength:79,indent:1,linesBefore:3,linesAfter:2};function _t(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 It(e,t){return" ".repeat(Math.max(t-e.length,0))+e}function Hi(e,t){if(!e.buffer)return null;const n={...Fi,...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 g=1;g<=n.linesBefore&&!(s-g<0);g++){const T=_t(e.buffer,i[s-g],o[s-g],e.position-(i[s]-i[s-g]),c);l=`${" ".repeat(n.indent)}${It((e.line-g+1).toString(),u)} | ${T.str}
2
- ${l}`}const y=_t(e.buffer,i[s],o[s],e.position,c);l+=`${" ".repeat(n.indent)}${It((e.line+1).toString(),u)} | ${y.str}
3
- `,l+=`${"-".repeat(n.indent+u+3+y.pos)}^
4
- `;for(let g=1;g<=n.linesAfter&&!(s+g>=o.length);g++){const T=_t(e.buffer,i[s+g],o[s+g],e.position-(i[s]-i[s+g]),c);l+=`${" ".repeat(n.indent)}${It((e.line+g+1).toString(),u)} | ${T.str}
5
- `}return l.replace(/\n$/,"")}function An(e,t){let n="";return e.mark?(e.mark.name&&(n+=`in "${e.mark.name}" `),n+=`(${e.mark.line+1}:${e.mark.column+1})`,!t&&e.mark.snippet&&(n+=`
6
-
7
- ${e.mark.snippet}`),`${e.reason} ${n}`):e.reason}var yt=class extends Error{reason;mark;constructor(e,t){super(),this.name="YAMLException",this.reason=e,this.mark=t,this.message=An(this,!1),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toString(e){return`${this.name}: ${An(this,e)}`}};function Et(e,t,n,r=""){let i=0,o=0;for(let s=0;s<t;s++){const l=e.charCodeAt(s);l===10?(i++,o=s+1):l===13&&(i++,e.charCodeAt(s+1)===10&&s++,o=s+1)}const a={name:r,buffer:e,position:t,line:i,column:t-o};throw a.snippet=Hi(a),new yt(n,a)}var Mi=-1;function yn(e){switch(e){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
8
- `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}var Zn=new Array(256),Jn=new Array(256);for(let e=0;e<256;e++)Zn[e]=yn(e)?1:0,Jn[e]=yn(e);function Bi(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function Di(e){return e>=48&&e<=57?e-48:(e|32)-97+10}function Ui(e){return e===120?2:e===117?4:8}function ct(e,t,n){let r=0;for(;t<n;){const i=e.charCodeAt(t);if(i===10)r++,t++;else if(i===13)r++,t++,e.charCodeAt(t)===10&&t++;else if(i===32||i===9)t++;else break}return{position:t,breaks:r}}function Jt(e){return e===1?" ":`
9
- `.repeat(e-1)}function qi(e,t,n){let r="",i=t,o=t,a=t;for(;i<n;){const s=e.charCodeAt(i);if(s===10||s===13){r+=e.slice(o,a);const l=ct(e,i,n);r+=Jt(l.breaks),i=o=a=l.position}else i++,s!==32&&s!==9&&(a=i)}return r+e.slice(o,a)}function Ki(e,t,n){let r="",i=t,o=t,a=t;for(;i<n;){const s=e.charCodeAt(i);if(s===39)r+=e.slice(o,i)+"'",i+=2,o=a=i;else if(s===10||s===13){r+=e.slice(o,a);const l=ct(e,i,n);r+=Jt(l.breaks),i=o=a=l.position}else i++,s!==32&&s!==9&&(a=i)}return r+e.slice(o,n)}function Gi(e,t,n){let r="",i=t,o=t,a=t;for(;i<n;){const s=e.charCodeAt(i);if(s===92){r+=e.slice(o,i),i++;const l=e.charCodeAt(i);if(l===10||l===13)i=ct(e,i,n).position;else if(l<256&&Zn[l])r+=Jn[l],i++;else{let u=Ui(l),c=0;for(;u>0;u--){i++;const y=Di(e.charCodeAt(i));c=(c<<4)+y}r+=Bi(c),i++}o=a=i}else if(s===10||s===13){r+=e.slice(o,a);const l=ct(e,i,n);r+=Jt(l.breaks),i=o=a=l.position}else i++,s!==32&&s!==9&&(a=i)}return r+e.slice(o,n)}function En(e,t,n,r,i,o){const a=r<0?0:r,s=e.slice(t,n).replace(/\r\n?/g,`
10
- `),l=s===""?[]:(s.endsWith(`
11
- `)?s.slice(0,-1):s).split(`
12
- `);let u="",c=!1,y=0,g=!1;for(const T of l){let E=0;for(;E<a&&T.charCodeAt(E)===32;)E++;if(r<0||E>=T.length){y++;continue}const w=T.slice(a),F=w.charCodeAt(0);o?F===32||F===9?(g=!0,u+=`
13
- `.repeat(c?1+y:y)):g?(g=!1,u+=`
14
- `.repeat(y+1)):y===0?c&&(u+=" "):u+=`
15
- `.repeat(y):u+=`
16
- `.repeat(c?1+y:y),u+=w,c=!0,y=0}return i===3?u+=`
17
- `.repeat(c?1+y:y):i!==2&&c&&(u+=`
18
- `),u}function Yi(e,t){if(t.valueStart===Mi)return"";const{valueStart:n,valueEnd:r}=t;if(t.fast)return e.slice(n,r);switch(t.style){case 2:return Ki(e,n,r);case 3:return Gi(e,n,r);case 4:return En(e,n,r,t.indent,t.chomping,!1);case 5:return En(e,n,r,t.indent,t.chomping,!0);default:return qi(e,n,r)}}var Wi={"!":"!","!!":"tag:yaml.org,2002:"};function wt(e){return encodeURI(e).replace(/!/g,"%21")}function er(e,t){if(e.startsWith("!<")&&e.endsWith(">"))return decodeURIComponent(e.slice(2,-1));const n=e.indexOf("!",1),r=n===-1?"!":e.slice(0,n+1),i=t?.[r]??Wi[r]??r;return decodeURIComponent(i)+decodeURIComponent(e.slice(r.length))}function tr(e){let t=e;return t.charCodeAt(0)===33?(t=t.slice(1),`!${wt(t)}`):t.slice(0,18)==="tag:yaml.org,2002:"?`!!${wt(t.slice(18))}`:`!<${wt(t)}>`}var Fe=-1,en={filename:"",schema:zn,json:!1,maxTotalMergeKeys:1e4,maxAliases:-1};function ji(e){return"tagStart"in e&&e.tagStart!==Fe?e.tagStart:"anchorStart"in e&&e.anchorStart!==Fe?e.anchorStart:"valueStart"in e&&e.valueStart!==Fe?e.valueStart:"start"in e?e.start:0}function se(e,t){Et(e.source,e.position,t,e.filename)}function nr(e,t,n,r){try{return n.finalize(r)}catch(i){if(i instanceof yt)throw i;Et(e.source,t,i instanceof Error?i.message:String(i),e.filename)}}function at(e,t,n){const r=e[n];if(r)return r;for(const i of t)if(n.startsWith(i.tagName))return i}function Vi(e,t,n,r,i){const o=at(t,n,r);if(o)return o;se(e,`unknown ${i} tag !<${r}>`)}function Xi(e,t){const n=Yi(e.source,t),r=t.tagStart===Fe?"":e.source.slice(t.tagStart,t.tagEnd),i=e.schema.defaultScalarTag;if(r!==""){if(r==="!")return{value:n,tag:i};const o=er(r,e.tagHandlers),a=at(e.schema.exact.scalar,e.schema.prefix.scalar,o);if(a){const l=a.resolve(n,!0,o);return l===O&&se(e,`cannot resolve a node with !<${o}> explicit tag`),{value:l,tag:a}}const s=at(e.schema.exact.mapping,e.schema.prefix.mapping,o)??at(e.schema.exact.sequence,e.schema.prefix.sequence,o);if(s){n!==""&&se(e,`cannot resolve a node with !<${o}> explicit tag`);const l=s.create(o);return{value:s.carrierIsResult?l:nr(e,e.position,s,l),tag:s}}se(e,`unknown scalar tag !<${o}>`)}if(t.style===1){const o=e.schema.implicitScalarByFirstChar.get(n.charAt(0))??e.schema.implicitScalarAnyFirstChar;for(const a of o){const s=a.resolve(n,!1,a.tagName);if(s!==O)return{value:s,tag:a}}}return{value:i.resolve(n,!1,i.tagName),tag:i}}function Sn(e,t,n,r,i,o){const a=t.tagStart===Fe?"":e.source.slice(t.tagStart,t.tagEnd),s=a===""||a==="!"?i:er(a,e.tagHandlers);return{tagName:s,tag:Vi(e,n,r,s,o)}}function rr(e){return e.nodeKind==="mapping"}function Tn(e,t,n,r){for(const i of r.keys(n)){if(e.maxTotalMergeKeys!==-1&&++e.totalMergeKeys>e.maxTotalMergeKeys&&se(e,`merge keys exceeded maxTotalMergeKeys (${e.maxTotalMergeKeys})`),t.tag.has(t.value,i))continue;const o=t.tag.addPair(t.value,i,r.get(n,i));o&&se(e,o),(t.overridable??=new Set).add(i)}}function Qi(e,t,n,r){if(e.position=t.keyPosition,rr(r))Tn(e,t,n,r);else if(r.nodeKind==="sequence"&&Array.isArray(n))for(const i of n)Tn(e,t,i,t.tag);else se(e,"cannot merge mappings; the provided source object is unacceptable")}function zi(e,t,n,r,i){if(e.position=t.keyPosition,n===Qt){Qi(e,t,r,i);return}!e.json&&t.tag.has(t.value,n)&&!t.overridable?.has(n)&&se(e,"duplicated mapping key");const o=t.tag.addPair(t.value,n,r);o&&se(e,o),t.overridable?.delete(n)}function Nt(e,t,n){const r=e.frames[e.frames.length-1];if(r.kind==="document")r.value=t,r.hasValue=!0;else if(r.kind==="sequence"){r.merge&&(rr(n)||se(e,"cannot merge mappings; the provided source object is unacceptable"));const i=r.tag.addItem(r.value,t,r.index++);i&&se(e,i)}else if(r.hasKey){const i=r.key;r.key=void 0,r.hasKey=!1,zi(e,r,i,t,n)}else r.key=t,r.keyPosition=e.position,r.hasKey=!0}function $t(e,t,n,r,i){if(t.anchorStart!==Fe){const o={value:n,tag:r,isValueFinal:i};return e.anchors.set(e.source.slice(t.anchorStart,t.anchorEnd),o),o}return null}function Zi(e,t){const n={...en,...t,events:e,documents:[],eventIndex:0,position:0,frames:[],anchors:new Map,tagHandlers:Object.create(null),totalMergeKeys:0,aliasCount:0};for(;n.eventIndex<n.events.length;){const r=n.events[n.eventIndex++];switch(n.position=ji(r),r.type){case 1:n.anchors=new Map,n.aliasCount=0,n.tagHandlers=Object.create(null);for(const i of r.directives)i.kind==="tag"&&(n.tagHandlers[i.handle]=i.prefix);n.frames.push({kind:"document",position:n.position,value:void 0,hasValue:!1});break;case 4:{const{value:i,tag:o}=Xi(n,r);$t(n,r,i,o,!0),Nt(n,i,o);break}case 2:{const i=Sn(n,r,n.schema.exact.sequence,n.schema.prefix.sequence,"tag:yaml.org,2002:seq","sequence"),o=i.tag.create(i.tagName),a=$t(n,r,o,i.tag,i.tag.carrierIsResult),s=n.frames[n.frames.length-1],l=s!==void 0&&s.kind==="mapping"&&s.hasKey&&s.key===Qt;n.frames.push({kind:"sequence",position:n.position,value:o,tag:i.tag,anchor:a,index:0,merge:l});break}case 3:{const i=Sn(n,r,n.schema.exact.mapping,n.schema.prefix.mapping,"tag:yaml.org,2002:map","mapping"),o=i.tag.create(i.tagName),a=$t(n,r,o,i.tag,i.tag.carrierIsResult);n.frames.push({kind:"mapping",position:n.position,value:o,tag:i.tag,anchor:a,key:void 0,keyPosition:n.position,hasKey:!1,overridable:null});break}case 5:{n.maxAliases!==-1&&++n.aliasCount>n.maxAliases&&se(n,`aliases exceeded maxAliases (${n.maxAliases})`);const i=n.source.slice(r.anchorStart,r.anchorEnd),o=n.anchors.get(i);o||se(n,`unidentified alias "${i}"`),o.isValueFinal||se(n,`recursive alias "${i}" is not supported for tag ${o.tag.tagName} because it uses finalize()`),Nt(n,o.value,o.tag);break}case 6:{const i=n.frames.pop();if(i.kind==="document")n.documents.push(i.value);else{const o=i.tag.carrierIsResult?i.value:nr(n,i.position,i.tag,i.value);i.anchor&&(i.anchor.value=o,i.anchor.isValueFinal=!0),Nt(n,o,i.tag)}break}}}return n.documents}var H=-1,ir=Object.prototype.hasOwnProperty,De=1,Ft=2,or=3,ut=4,Ji=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,eo=/[,\[\]{}]/,ar=/^(?:!|!!|![0-9A-Za-z-]+!)$/,Ht=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$,_.!~*'()\[\]])`,sr=String.raw`(?:%[0-9A-Fa-f]{2}|[0-9A-Za-z\-#;/?:@&=+$.~*'()_])`,to=new RegExp(`^(?:${Ht})*$`),no=new RegExp(`^(?:${sr})+$`),ro=new RegExp(`^(?:!(?:${Ht})*|${sr}(?:${Ht})*)$`),tn={filename:"",maxDepth:100};function io(e,t,n){e.events.push({type:1,explicitStart:t,explicitEnd:n,directives:e.directives})}function lr(e,t,n,r,i,o,a){e.events.push({type:2,start:t,anchorStart:n,anchorEnd:r,tagStart:i,tagEnd:o,style:a})}function Mt(e,t,n,r,i,o,a){e.events.push({type:3,start:t,anchorStart:n,anchorEnd:r,tagStart:i,tagEnd:o,style:a})}function Cn(e,t){e.events.splice(t.eventsLength,0,{type:3,start:t.position,anchorStart:H,anchorEnd:H,tagStart:H,tagEnd:H,style:2})}function qe(e,t,n,r,i,o,a,s,l=1,u=-1,c=!1){e.events.push({type:4,valueStart:t,valueEnd:n,anchorStart:r,anchorEnd:i,tagStart:o,tagEnd:a,style:s,chomping:l,indent:u,fast:c})}function oo(e,t,n){e.events.push({type:5,anchorStart:t,anchorEnd:n})}function He(e){e.events.push({type:6})}function re(e){qe(e,H,H,H,H,H,H,1)}function vn(){return{anchorStart:H,anchorEnd:H,tagStart:H,tagEnd:H}}function Xe(e){return{position:e.position,line:e.line,lineStart:e.lineStart,lineIndent:e.lineIndent,firstTabInLine:e.firstTabInLine,eventsLength:e.events.length}}function Me(e,t){e.position=t.position,e.line=t.line,e.lineStart=t.lineStart,e.lineIndent=t.lineIndent,e.firstTabInLine=t.firstTabInLine,e.events.length=t.eventsLength}function I(e,t){Et(e.input.slice(0,e.length),e.position,t,e.filename)}function z(e){return e===10||e===13}function Le(e){return e===9||e===32}function de(e){return Le(e)||z(e)}function ye(e){return e===0||de(e)}function ke(e){return e===44||e===91||e===93||e===123||e===125}function ao(e){return e>=48&&e<=57?e-48:-1}function so(e){if(e>=48&&e<=57)return e-48;const t=e|32;return t>=97&&t<=102?t-97+10:-1}function lo(e){return e===120?2:e===117?4:e===85?8:0}function co(e){return e===48||e===97||e===98||e===116||e===9||e===110||e===118||e===102||e===114||e===101||e===32||e===34||e===47||e===92||e===78||e===95||e===76||e===80}function ft(e){e.input.charCodeAt(e.position)===10?e.position++:(e.position++,e.input.charCodeAt(e.position)===10&&e.position++),e.line++,e.lineStart=e.position,e.lineIndent=0,e.firstTabInLine=-1}function ie(e,t){let n=0,r=e.input.charCodeAt(e.position),i=e.position===e.lineStart||de(e.input.charCodeAt(e.position-1));for(;r!==0;){for(;Le(r);)i=!0,r===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),r=e.input.charCodeAt(++e.position);if(t&&i&&r===35)do r=e.input.charCodeAt(++e.position);while(!z(r)&&r!==0);if(!z(r))break;for(ft(e),n++,i=!0,r=e.input.charCodeAt(e.position);r===32;)e.lineIndent++,r=e.input.charCodeAt(++e.position)}return n}function Re(e,t=e.position){const n=e.input.charCodeAt(t);if((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)){const r=e.input.charCodeAt(t+3);return r===0||de(r)}return!1}function Rn(e){let t=e.input.charCodeAt(e.position);for(;t!==0&&!z(t);)t=e.input.charCodeAt(++e.position)}function cr(e,t,n){Ji.test(e.input.slice(t,n))&&I(e,"the stream contains non-printable characters")}function uo(e,t,n){if(e.input.charCodeAt(e.position)!==33)return!1;t.tagStart!==H&&I(e,"duplication of a tag property");const r=e.position;let i=!1,o=!1,a="!",s=e.input.charCodeAt(++e.position);s===60?(i=!0,s=e.input.charCodeAt(++e.position)):s===33&&(o=!0,a="!!",s=e.input.charCodeAt(++e.position));let l=e.position,u;if(i){for(;s!==0&&s!==62;)s=e.input.charCodeAt(++e.position);s!==62&&I(e,"unexpected end of the stream within a verbatim tag"),u=e.input.slice(l,e.position),e.position++}else{for(;s!==0&&!de(s)&&!(n&&ke(s));)s===33&&(o?I(e,"tag suffix cannot contain exclamation marks"):(a=e.input.slice(l-1,e.position+1),ar.test(a)||I(e,"named tag handle cannot contain such characters"),o=!0,l=e.position+1)),s=e.input.charCodeAt(++e.position);u=e.input.slice(l,e.position),eo.test(u)&&I(e,"tag suffix cannot contain flow indicator characters")}return u&&!(i?to.test(u):no.test(u))&&I(e,`tag name cannot contain such characters: ${u}`),!i&&a!=="!"&&a!=="!!"&&!ir.call(e.tagHandlers,a)&&I(e,`undeclared tag handle "${a}"`),t.tagStart=r,t.tagEnd=e.position,!0}function fo(e,t){if(e.input.charCodeAt(e.position)!==38)return!1;t.anchorStart!==H&&I(e,"duplication of an anchor property"),e.position++;const n=e.position;for(;e.input.charCodeAt(e.position)!==0&&!de(e.input.charCodeAt(e.position))&&!ke(e.input.charCodeAt(e.position));)e.position++;return e.position===n&&I(e,"name of an anchor node must contain at least one character"),t.anchorStart=n,t.anchorEnd=e.position,!0}function po(e,t){if(e.input.charCodeAt(e.position)!==42)return!1;(t.anchorStart!==H||t.tagStart!==H)&&I(e,"alias node should not have any properties"),e.position++;const n=e.position;for(;e.input.charCodeAt(e.position)!==0&&!de(e.input.charCodeAt(e.position))&&!ke(e.input.charCodeAt(e.position));)e.position++;return e.position===n&&I(e,"name of an alias node must contain at least one character"),oo(e,n,e.position),!0}function Bt(e,t){ie(e,!1),e.lineIndent<t&&I(e,"deficient indentation")}function ho(e,t,n){if(e.input.charCodeAt(e.position)!==39)return!1;e.position++;const r=e.position;let i=!0;for(;e.input.charCodeAt(e.position)!==0;){const o=e.input.charCodeAt(e.position);if(o===39){if(e.input.charCodeAt(e.position+1)===39){i=!1,e.position+=2;continue}const a=e.position;return e.position++,qe(e,r,a,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,2,1,-1,i),!0}z(o)?(i=!1,Bt(e,t)):e.position===e.lineStart&&Re(e)?I(e,"unexpected end of the document within a single quoted scalar"):o!==9&&o<32?I(e,"expected valid JSON character"):e.position++}I(e,"unexpected end of the stream within a single quoted scalar")}function go(e,t,n){if(e.input.charCodeAt(e.position)!==34)return!1;e.position++;const r=e.position;let i=!0;for(;e.input.charCodeAt(e.position)!==0;){const o=e.input.charCodeAt(e.position);if(o===34){const a=e.position;return e.position++,qe(e,r,a,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,3,1,-1,i),!0}if(o===92){i=!1;const a=e.input.charCodeAt(++e.position);if(z(a))Bt(e,t);else if(co(a))e.position++;else{let s=lo(a);for(s===0&&I(e,"unknown escape sequence");s-- >0;)e.position++,so(e.input.charCodeAt(e.position))<0&&I(e,"expected hexadecimal character");e.position++}}else z(o)?(i=!1,Bt(e,t)):e.position===e.lineStart&&Re(e)?I(e,"unexpected end of the document within a double quoted scalar"):o!==9&&o<32?I(e,"expected valid JSON character"):e.position++}I(e,"unexpected end of the stream within a double quoted scalar")}function mo(e,t,n){const r=e.input.charCodeAt(e.position);let i=1,o=-1,a=!1;if(r!==124&&r!==62)return!1;const s=r===124?4:5;for(e.position++;e.input.charCodeAt(e.position)!==0;){const T=e.input.charCodeAt(e.position),E=ao(T);if(T===43||T===45)i!==1&&I(e,"repeat of a chomping mode identifier"),i=T===43?3:2,e.position++;else if(E>=0)E===0&&I(e,"bad explicit indentation width of a block scalar; it cannot be less than one"),a&&I(e,"repeat of an indentation width identifier"),o=t+E-1,a=!0,e.position++;else break}let l=!1;for(;Le(e.input.charCodeAt(e.position));)l=!0,e.position++;l&&e.input.charCodeAt(e.position)===35&&Rn(e),z(e.input.charCodeAt(e.position))?ft(e):e.input.charCodeAt(e.position)!==0&&I(e,"a line break is expected");let u=a?o:-1,c=0;const y=e.position;let g=e.position;for(;e.input.charCodeAt(e.position)!==0;){const T=e.position;let E=0;for(;e.input.charCodeAt(T+E)===32;)E++;const w=e.input.charCodeAt(T+E);if(w===0){u>=0?E>u&&(g=T+E):E>0&&(g=T+E);break}if(T===e.lineStart&&Re(e,T))break;if(!a&&u===-1&&z(w)&&(c=Math.max(c,E)),!a&&u===-1&&!z(w)&&(w===9&&E<t&&(e.position=T+E,I(e,"tab characters must not be used in indentation")),E<c&&(e.position=T+E,I(e,"bad indentation of a mapping entry"))),u===-1&&w!==0&&!z(w)&&E<t){e.lineIndent=E,e.position=T+E;break}!a&&w!==0&&!z(w)&&u===-1&&(u=E);const F=u===-1?t+1:u;if(w!==0&&!z(w)&&E<F){e.lineIndent=E,e.position=T+E;break}Rn(e),g=e.position,z(e.input.charCodeAt(e.position))&&(ft(e),g=e.position)}return cr(e,y,g),qe(e,y,g,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,s,i,u),!0}function Ao(e,t){const n=e.input.charCodeAt(e.position),r=t===De;if(n===0||de(n)||n===35||n===38||n===42||n===33||n===124||n===62||n===39||n===34||n===37||n===64||n===96||r&&ke(n))return!1;if(n===63||n===45){const i=e.input.charCodeAt(e.position+1);if(ye(i)||r&&ke(i))return!1}return!0}function yo(e,t,n,r){if(!Ao(e,n))return!1;const i=e.position;let o=e.position,a=e.input.charCodeAt(e.position);const s=n===De;let l=!1;for(;a!==0&&!(e.position===e.lineStart&&Re(e));){if(a===58){const u=e.input.charCodeAt(e.position+1);if(ye(u)||s&&ke(u))break}else if(a===35){if(de(e.input.charCodeAt(e.position-1)))break}else{if(s&&ke(a))break;if(z(a)){const u=e.position,c=e.line,y=e.lineStart,g=e.lineIndent;if(ie(e,!1),e.lineIndent>=t){l=!0,a=e.input.charCodeAt(e.position);continue}e.position=u,e.line=c,e.lineStart=y,e.lineIndent=g;break}}Le(a)||(o=e.position+1),a=e.input.charCodeAt(++e.position)}return o===i?!1:(cr(e,i,o),qe(e,i,o,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,1,1,-1,!l),!0)}function Ge(e,t){const n=e.line;ie(e,!0),(e.line>n&&e.lineIndent<t||e.firstTabInLine!==-1&&e.lineIndent<t)&&I(e,"deficient indentation")}function Eo(e,t,n){const r=e.input.charCodeAt(e.position),i=r===123,o=e.position;let a=!0;if(r!==91&&r!==123)return!1;const s=i?125:93;for(i?Mt(e,o,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,2):lr(e,o,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,2),e.position++;e.input.charCodeAt(e.position)!==0;){Ge(e,t);let l=e.input.charCodeAt(e.position);if(l===s)return e.position++,He(e),!0;a?l===44&&I(e,"expected the node content, but found ','"):I(e,"missed comma between flow collection entries");let u=!1,c=!1;l===63&&de(e.input.charCodeAt(e.position+1))&&(u=c=!0,e.position+=1,Ge(e,t));const y=e.line,g=Xe(e),T=$e(e,t,De,!1,!0);Ge(e,t),l=e.input.charCodeAt(e.position),(i||c||e.line===y)&&l===58?(u=!0,e.position++,Ge(e,t),i||Cn(e,g),T||re(e),$e(e,t,De,!1,!0)||re(e),Ge(e,t),i||He(e)):i&&u?(T||re(e),re(e)):i?re(e):u&&(Cn(e,g),T||re(e),re(e),He(e)),l=e.input.charCodeAt(e.position),l===44?(a=!0,e.position++):a=!1}I(e,"unexpected end of the stream within a flow collection")}function bn(e,t,n){if(e.firstTabInLine!==-1||e.input.charCodeAt(e.position)!==45||!ye(e.input.charCodeAt(e.position+1)))return!1;for(lr(e,e.position,n.anchorStart,n.anchorEnd,n.tagStart,n.tagEnd,1);e.input.charCodeAt(e.position)===45&&ye(e.input.charCodeAt(e.position+1));){e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,I(e,"tab characters must not be used in indentation"));const r=e.line;e.position++;const i=ie(e,!0)>0;if(e.firstTabInLine!==-1&&e.input.charCodeAt(e.position)===45&&ye(e.input.charCodeAt(e.position+1))&&I(e,"bad indentation of a sequence entry"),i&&e.lineIndent<=t?re(e):$e(e,t,or,!1,!0),ie(e,!0),e.lineIndent<t||e.position>=e.length)break;e.lineIndent>t&&I(e,"bad indentation of a sequence entry"),e.line===r&&e.input.charCodeAt(e.position)===45&&ye(e.input.charCodeAt(e.position+1))&&I(e,"bad indentation of a sequence entry")}return He(e),!0}function Lt(e,t,n,r){let i=!1,o=!1,a=!1,s=!1;if(e.firstTabInLine!==-1)return!1;let l=e.input.charCodeAt(e.position);for(;l!==0;){!i&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,I(e,"tab characters must not be used in indentation"));const u=e.input.charCodeAt(e.position+1),c=e.line;if((l===63||l===58)&&ye(u))a||(Mt(e,e.position,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,1),a=!0),l===63?(i&&re(e),o=!0,i=!0):(i||(re(e),o=!0),i=!1),e.position+=1,s=!0;else{i&&(re(e),i=!1);const y=Xe(e);if(!$e(e,n,Ft,!1,!0))break;if(e.line===c){for(l=e.input.charCodeAt(e.position);Le(l);)l=e.input.charCodeAt(++e.position);if(l===58){if(l=e.input.charCodeAt(++e.position),ye(l)||I(e,"a whitespace character is expected after the key-value separator within a block mapping"),!a){for(Me(e,y),Mt(e,y.position,r.anchorStart,r.anchorEnd,r.tagStart,r.tagEnd,1),a=!0,$e(e,n,Ft,!1,!0),l=e.input.charCodeAt(e.position);Le(l);)l=e.input.charCodeAt(++e.position);e.position++}o=!0,i=!1,s=!1}else if(o)I(e,"expected ':' after a mapping key");else return r.anchorStart!==H||r.tagStart!==H?(Me(e,y),!1):!0}else if(o)I(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return r.anchorStart!==H||r.tagStart!==H?(Me(e,y),!1):!0}if($e(e,t,ut,!0,s)&&(s=!1),i||s&&(re(e),s=!1),ie(e,!0),l=e.input.charCodeAt(e.position),(e.line===c||e.lineIndent>t)&&l!==0)I(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return o?(i&&re(e),a&&He(e),!0):!1}function $e(e,t,n,r,i,o=!0){e.depth>=e.maxDepth&&I(e,`nesting exceeded maxDepth (${e.maxDepth})`),e.depth++;let a=1,s=!1,l=!1,u=null;const c=vn();let y=n===ut||n===or,g=y;const T=y;if(r&&ie(e,!0)&&(s=!0,e.lineIndent>t?a=1:e.lineIndent===t?a=0:a=-1),e.position===e.lineStart&&Re(e))return e.depth--,!1;if(a===1)for(;;){const E=e.input.charCodeAt(e.position),w=Xe(e);if(s&&a!==1&&(E===33||E===38))break;if(s&&T&&(c.tagStart!==H||c.anchorStart!==H)&&(E===33||E===38)){const F=Xe(e),N=t+1;if(Lt(e,e.position-e.lineStart,N,c)&&e.events[F.eventsLength]?.type===3)return e.depth--,!0;Me(e,F)}if(s&&(E===33&&c.tagStart!==H||E===38&&c.anchorStart!==H)||!uo(e,c,n===De)&&!fo(e,c))break;u===null&&(u=w),ie(e,!0)?(s=!0,g=T,e.lineIndent>t?a=1:e.lineIndent===t?a=0:a=-1):g=!1}if(g&&(g=s||i),a===1||n===ut){const E=n===De||n===Ft?t:t+1,w=e.position-e.lineStart;if(a===1)if(g&&(bn(e,w,c)||Lt(e,w,E,c))||Eo(e,E,c))l=!0;else{const F=e.input.charCodeAt(e.position);if(u!==null&&o&&T&&!g&&F!==124&&F!==62){const N=Xe(e),A=u.position-u.lineStart;Me(e,u),Lt(e,A,E,vn())&&e.events[N.eventsLength]?.type===3?l=!0:Me(e,N)}!l&&(y&&mo(e,E,c)||ho(e,E,c)||go(e,E,c)||po(e,c)||yo(e,E,n,c))&&(l=!0)}else a===0&&(l=g&&bn(e,w,c))}return y=y&&!l,!l&&(c.anchorStart!==H||c.tagStart!==H||y)&&(qe(e,H,H,c.anchorStart,c.anchorEnd,c.tagStart,c.tagEnd,1),l=!0),e.depth--,l||c.anchorStart!==H||c.tagStart!==H}function So(e){if(e.lineIndent>0||e.input.charCodeAt(e.position)!==37)return!1;e.position++;const t=e.position;for(;e.input.charCodeAt(e.position)!==0&&!de(e.input.charCodeAt(e.position));)e.position++;const n=e.input.slice(t,e.position),r=[];for(n.length===0&&I(e,"directive name must not be less than one character in length");e.input.charCodeAt(e.position)!==0&&!z(e.input.charCodeAt(e.position));){for(;Le(e.input.charCodeAt(e.position));)e.position++;if(e.input.charCodeAt(e.position)===35||z(e.input.charCodeAt(e.position))||e.input.charCodeAt(e.position)===0)break;const i=e.position;for(;e.input.charCodeAt(e.position)!==0&&!de(e.input.charCodeAt(e.position));)e.position++;r.push(e.input.slice(i,e.position))}if(z(e.input.charCodeAt(e.position))&&ft(e),n==="YAML"){e.directives.some(o=>o.kind==="yaml")&&I(e,"duplication of %YAML directive"),r.length!==1&&I(e,"YAML directive accepts exactly one argument");const i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);i===null&&I(e,"ill-formed argument of the YAML directive"),parseInt(i[1],10)!==1&&I(e,"unacceptable YAML version of the document"),e.directives.push({kind:"yaml",version:r[0]})}else if(n==="TAG"){r.length!==2&&I(e,"TAG directive accepts exactly two arguments");const[i,o]=r;ar.test(i)||I(e,"ill-formed tag handle (first argument) of the TAG directive"),ir.call(e.tagHandlers,i)&&I(e,`there is a previously declared suffix for "${i}" tag handle`),ro.test(o)||I(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagHandlers[i]=o,e.directives.push({kind:"tag",handle:i,prefix:o})}return!0}function To(e){e.directives=[],e.tagHandlers=Object.create(null);let t=!1;for(ie(e,!0);So(e);)t=!0,ie(e,!0);let n=!1,r=!1,i=!0;if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45&&ye(e.input.charCodeAt(e.position+3))){n=!0;const s=e.line;e.position+=3,ie(e,!0),i=e.line>s}else t&&I(e,"directives end mark is expected");const o=e.events.length;if(!n&&e.position===e.lineStart&&e.input.charCodeAt(e.position)===46&&Re(e)){e.position+=3,ie(e,!0);return}if(io(e,n,!1),$e(e,e.lineIndent-1,ut,!1,i,i)||re(e),ie(e,!0),e.position===e.lineStart&&Re(e)&&(r=e.input.charCodeAt(e.position)===46,r)){const s=e.line;e.position+=3,ie(e,!0),e.line===s&&e.position<e.length&&I(e,"end of the stream or a document separator is expected")}const a=e.events[o];a?.type===1&&(a.explicitEnd=r),He(e),!r&&e.position<e.length&&!(e.position===e.lineStart&&Re(e))&&I(e,"end of the stream or a document separator is expected")}function Co(e,t){const n=e.length,r={...tn,...t,input:`${e}\0`,length:n,position:0,line:0,lineStart:0,lineIndent:0,firstTabInLine:-1,depth:0,directives:[],tagHandlers:Object.create(null),events:[]},i=e.indexOf("\0");for(i!==-1&&Et(e,i,"null byte is not allowed in input",r.filename),r.input.charCodeAt(r.position)===65279&&r.position++;r.position<r.length&&(ie(r,!0),!(r.position>=r.length));){const o=r.position;To(r),r.position===o&&I(r,"can not read a document")}return r.events}var vo={...tn,...en};function Ro(e,t={}){const n={...vo,...t},r=String(e),i=Object.keys(tn),o=Object.keys(en);return Zi(Co(r,Pt(n,i)),{...Pt(n,o),source:r})}function bo(e,t,n){let r=null;typeof t=="function"?r=t:t!==null&&typeof t=="object"&&(n=t);const i=Ro(e,n);if(r===null)return i;for(const o of i)r(o)}var rt=class{tagged=!1;flow=!1;singleQuoted=!1;doubleQuoted=!1;literal=!1;folded=!1},Ie=Symbol("INVALID");function xo(e){const t=new Set([e.defaultScalarTag,e.defaultSequenceTag,e.defaultMappingTag].filter(o=>o!==void 0)),n=e.implicitScalarTags,r=e.tags.filter(o=>!(o.nodeKind==="scalar"&&o.implicit)&&!t.has(o)),i=e.tags.filter(o=>t.has(o));return[...n.map(o=>({tag:o,implicitTag:!0})),...r.map(o=>({tag:o,implicitTag:!1})),...i.map(o=>({tag:o,implicitTag:!0}))]}function _o(e,t){for(let n=0,r=e.representTypes.length;n<r;n+=1){const{tag:i,implicitTag:o}=e.representTypes[n];if(i.identify&&i.identify(t)){let a;return i.matchByTagPrefix&&i.representTagName?a=i.representTagName(t):a=i.tagName,{tag:i,tagName:a,implicitTag:o}}}return null}function We(e,t){if(!e.noRefs&&t!==null&&typeof t=="object"){const c=e.refs.get(t);if(c)return c.anchor===void 0&&(c.anchor=`ref_${e.refCounter++}`),{kind:"alias",tag:"",style:new rt,anchor:c.anchor}}const n=_o(e,t);if(!n){if(t===void 0||e.skipInvalid)return Ie;throw new yt(`unacceptable kind of an object to dump ${Object.prototype.toString.call(t)}`)}const{tag:r,tagName:i,implicitTag:o}=n,a=o?i:tr(i);if(r.nodeKind==="scalar"){const c=new rt;return c.tagged=!o,{kind:"scalar",tag:a,style:c,value:r.represent(t)}}if(r.nodeKind==="sequence"){const c=r.represent(t),y=new rt;y.tagged=!o;const g={kind:"sequence",tag:a,style:y,items:[]};e.noRefs||e.refs.set(t,g);for(let T=0,E=c.length;T<E;T+=1){let w=We(e,c[T]);w===Ie&&c[T]===void 0&&(w=We(e,null)),w!==Ie&&g.items.push(w)}return g}const s=r.represent(t),l=new rt;l.tagged=!o;const u={kind:"mapping",tag:a,style:l,items:[]};e.noRefs||e.refs.set(t,u);for(const[c,y]of s){const g=We(e,c);if(g===Ie)continue;const T=We(e,y);T!==Ie&&u.items.push({key:g,value:T})}return u}function Io(e,t,n={}){const r=We({representTypes:xo(t),noRefs:n.noRefs??!1,skipInvalid:n.skipInvalid??!1,refs:new Map,refCounter:0},e);return[{contents:r===Ie?null:r,directives:[]}]}var wo=Symbol("visit:break"),ur=Symbol("visit:skip");function st(e,t,n){const r=t(e,n);if(r===wo)return!0;if(r===ur)return!1;const i=n.depth+1;switch(e.kind){case"sequence":for(const o of e.items)if(st(o,t,{depth:i,parent:e,isKey:!1}))return!0;break;case"mapping":for(const{key:o,value:a}of e.items)if(st(o,t,{depth:i,parent:e,isKey:!0})||st(a,t,{depth:i,parent:e,isKey:!1}))return!0;break}return!1}function No(e,t){for(const n of e)if(n.contents&&st(n.contents,t,{depth:0,parent:null,isKey:!1}))return}var nn=65279,$o=9,Oe=10,fr=13,Lo=32,ko=33,pr=34,Dt=35,Oo=37,Po=38,dr=39,Fo=42,Ut=44,rn=45,ze=58,Ho=61,Mo=62,hr=63,Bo=64,qt=91,Kt=93,Do=96,Gt=123,Uo=124,Yt=125,ne={};ne[0]="\\0";ne[7]="\\a";ne[8]="\\b";ne[9]="\\t";ne[10]="\\n";ne[11]="\\v";ne[12]="\\f";ne[13]="\\r";ne[27]="\\e";ne[34]='\\"';ne[92]="\\\\";ne[133]="\\N";ne[160]="\\_";ne[8232]="\\L";ne[8233]="\\P";var on={indent:2,seqNoIndent:!1,seqInlineFirst:!0,sortKeys:!1,lineWidth:80,flowBracketPadding:!1,flowSkipCommaSpace:!1,flowSkipColonSpace:!1,quoteFlowKeys:!1,quoteStyle:"single",forceQuotes:!1,tagBeforeAnchor:!1};function qo(e){return e.style.tagged?e.tag:tr(e.tag)}function Ko(e){const t={...on,...e};return{...t,defaultScalarTagName:t.schema.defaultScalarTag.tagName,implicitResolvers:t.schema.implicitScalarTags}}function Go(e){const t=e.toString(16).toUpperCase(),n=e<=255?"x":"u",r=e<=255?2:4;return`\\${n}${"0".repeat(r-t.length)}${t}`}function xn(e,t){const n=" ".repeat(t);let r=0,i="";const o=e.length;for(;r<o;){let a;const s=e.indexOf(`
19
- `,r);s===-1?(a=e.slice(r),r=o):(a=e.slice(r,s+1),r=s+1),a.length&&a!==`
20
- `&&(i+=n),i+=a}return i}function Wt(e,t){return`
21
- ${" ".repeat(e.indent*t)}`}function Yo(e,t){const n=e.indent*Math.max(1,t);return{indent:n,blockIndent:t===0?e.indent+1:e.indent,lineWidth:e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-n)}}function _n(e,t){for(let n=0,r=e.implicitResolvers.length;n<r;n+=1){const i=e.implicitResolvers[n];if(i.resolve(t,!1,i.tagName)!==O)return i.tagName}return e.defaultScalarTagName}function Ue(e){return e===Lo||e===$o}function Wo(e){const t=e.charCodeAt(0);if(t!==rn&&t!==46||e.charCodeAt(1)!==t||e.charCodeAt(2)!==t)return!1;if(e.length===3)return!0;const n=e.charCodeAt(3);return Ue(n)||n===fr||n===Oe}function Ze(e){return e>=32&&e<=126||e>=161&&e<=55295&&e!==8232&&e!==8233||e>=57344&&e<=65533&&e!==nn||e>=65536&&e<=1114111}function In(e){return Ze(e)&&e!==nn&&e!==fr&&e!==Oe}function jt(e,t,n){const r=In(e),i=r&&!Ue(e);return(n?r:r&&e!==Ut&&e!==qt&&e!==Kt&&e!==Gt&&e!==Yt)&&e!==Dt&&!(t===ze&&!i)||In(t)&&!Ue(t)&&e===Dt||t===ze&&i&&(n||e!==Ut&&e!==qt&&e!==Kt&&e!==Gt&&e!==Yt)}function jo(e){return Ze(e)&&e!==nn&&!Ue(e)&&e!==rn&&e!==hr&&e!==ze&&e!==Ut&&e!==qt&&e!==Kt&&e!==Gt&&e!==Yt&&e!==Dt&&e!==Po&&e!==Fo&&e!==ko&&e!==Uo&&e!==Ho&&e!==Mo&&e!==dr&&e!==pr&&e!==Oo&&e!==Bo&&e!==Do}function Vo(e,t){const n=Be(e,0);if(jo(n))return!0;if(e.length>1&&(n===rn||n===hr||n===ze)){const r=Be(e,1);return!Ue(r)&&jt(r,n,t)}return!1}function Xo(e){return!Ue(e)&&e!==ze}function Be(e,t){const n=e.charCodeAt(t);let r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}function gr(e){return/^\n* /.test(e)}var Je=1,Qe=2,an=3,sn=4,ve=5;function Qo(e,t,n,r,i,o){const{blockIndent:a,lineWidth:s}=n;let l,u=0,c=-1,y=!1,g=!1;const T=s!==-1;let E=-1,w=!Wo(t)&&Vo(t,o)&&Xo(Be(t,t.length-1));if(r||i)for(l=0;l<t.length;u>=65536?l+=2:l++){if(u=Be(t,l),!Ze(u))return ve;w=w&&jt(u,c,o),c=u}else{for(l=0;l<t.length;u>=65536?l+=2:l++){if(u=Be(t,l),u===Oe)y=!0,T&&(g=g||l-E-1>s&&t[E+1]!==" ",E=l);else if(!Ze(u))return ve;w=w&&jt(u,c,o),c=u}g=g||T&&l-E-1>s&&t[E+1]!==" "}return!y&&!g?w&&!i?Je:e.quoteStyle==="double"?ve:Qe:a>9&&gr(t)?ve:g?sn:an}function zo(e,t,n){const{indent:r,blockIndent:i,lineWidth:o}=n;switch(t){case Je:return Nn(e,r);case Qe:return`'${Nn(e,r).replace(/'/g,"''")}'`;case an:return"|"+wn(e,i)+$n(xn(e,r));case sn:return">"+wn(e,i)+$n(xn(Jo(e,o),r));case ve:return`"${ea(e)}"`}}function Zo(e,t,n,r,i){const o=r||!i;if(t.style.singleQuoted)return Qe;if(t.style.doubleQuoted)return ve;if(!o){if(t.style.literal)return an;if(t.style.folded)return sn}const a=t.value;if(a.length===0)return t.style.tagged||_n(e,a)===t.tag?Je:e.quoteStyle==="double"?ve:Qe;const s=Qo(e,a,n,o,e.forceQuotes&&!r,i);return s===Je&&!t.style.tagged&&_n(e,a)!==t.tag?e.quoteStyle==="double"?ve:Qe:s}function wn(e,t){const n=gr(e)?String(t):"",r=e[e.length-1]===`
22
- `;return`${n}${r&&(e[e.length-2]===`
23
- `||e===`
24
- `)?"+":r?"":"-"}
25
- `}function Nn(e,t){let n=e.indexOf(`
26
- `);if(n===-1)return e;const r=" ".repeat(t);let i=e.slice(0,n);const o=/(\n+)([^\n]*)/g;o.lastIndex=n;let a;for(;a=o.exec(e);){const s=a[1].length,l=a[2];i+=`
27
- `.repeat(s+1)+r+l}return i}function $n(e){return e[e.length-1]===`
28
- `?e.slice(0,-1):e}function Jo(e,t){const n=/(\n+)([^\n]*)/g;let r=e.indexOf(`
29
- `);r===-1&&(r=e.length),n.lastIndex=r;let i=Ln(e.slice(0,r),t),o=e[0]===`
30
- `||e[0]===" ",a,s;for(;s=n.exec(e);){const l=s[1],u=s[2];a=u[0]===" ",i+=l+(!o&&!a&&u!==""?`
31
- `:"")+Ln(u,t),o=a}return i}function Ln(e,t){if(e===""||e[0]===" ")return e;const n=/ [^ ]/g;let r,i=0,o,a=0,s=0,l="";for(;r=n.exec(e);)s=r.index,s-i>t&&(o=a>i?a:s,l+=`
32
- ${e.slice(i,o)}`,i=o+1),a=s;return l+=`
33
- `,e.length-i>t&&a>i?l+=`${e.slice(i,a)}
34
- ${e.slice(a+1)}`:l+=e.slice(i),l.slice(1)}function ea(e){let t="",n=0;for(let r=0;r<e.length;n>=65536?r+=2:r++){n=Be(e,r);const i=ne[n];if(i){t+=i;continue}if(Ze(n)){t+=e[r],n>=65536&&(t+=e[r+1]);continue}t+=Go(n)}return t}function ta(e,t,n){let r="";for(let o=0,a=n.items.length;o<a;o+=1){const s=Ee(e,t,n.items[o],{});r!==""&&(r+=`,${e.flowSkipCommaSpace?"":" "}`),r+=s}const i=e.flowBracketPadding&&r!==""?" ":"";return`[${i}${r}${i}]`}function kn(e,t,n,r){let i="";for(let o=0,a=n.items.length;o<a;o+=1){const s=Ee(e,t+1,n.items[o],{block:!0,compact:e.seqInlineFirst,isblockseq:!0});(!r||i!=="")&&(i+=Wt(e,t)),s===""||Oe===s.charCodeAt(0)?i+="-":i+="- ",i+=s}return i}function na(e,t,n){let r="";const i=mr(e,n.items);for(const{key:a,value:s}of i){let l="";r!==""&&(l+=`,${e.flowSkipCommaSpace?"":" "}`);const u=Ee(e,t,a,{iskey:!0}),c=u.length>1024;c?l+="? ":e.quoteFlowKeys&&(l+='"');const y=Ee(e,t,s,{}),g=e.flowSkipColonSpace||y===""?"":" ";l+=`${u}${e.quoteFlowKeys&&!c?'"':""}:${g}${y}`,r+=l}const o=e.flowBracketPadding&&r!==""?" ":"";return`{${o}${r}${o}}`}function it(e){return e.kind==="scalar"?e.value:e}function mr(e,t){if(!e.sortKeys)return t;const n=t.slice();if(e.sortKeys===!0)n.sort((r,i)=>{const o=it(r.key),a=it(i.key);return o<a?-1:o>a?1:0});else{const r=e.sortKeys;n.sort((i,o)=>r(it(i.key),it(o.key)))}return n}function ra(e,t,n,r){let i="";const o=mr(e,n.items);for(let a=0,s=o.length;a<s;a+=1){let l="";(!r||i!=="")&&(l+=Wt(e,t));const{key:u,value:c}=o[a],y=(u.kind==="mapping"||u.kind==="sequence")&&!u.style.flow&&u.items.length!==0||u.kind==="scalar"&&(u.style.literal||u.style.folded),g=y?Ee(e,t+1,u,{block:!0,compact:!0,isblockseq:!Vt(e,u,t+1)}):Ee(e,t+1,u,{block:!0,compact:!0,iskey:!0}),T=u.kind==="scalar"&&u.value.indexOf(`
35
- `)!==-1,E=y||T||g.length>1024;E&&(g&&Oe===g.charCodeAt(0)?l+="?":l+="? "),l+=g,E&&(l+=Wt(e,t));const w=Ee(e,t+1,c,{block:!0,compact:E,isblockseq:E&&!Vt(e,c,t+1)}),F=u.kind==="scalar"&&u.value===""&&g!==""&&g.charCodeAt(g.length-1)!==dr&&g.charCodeAt(g.length-1)!==pr,N=!E&&(u.kind==="alias"||F)?" ":"";w===""||Oe===w.charCodeAt(0)?l+=`${N}:`:l+=`${N}: `,l+=w,i+=l}return i}function Vt(e,t,n){return t.style.tagged||t.anchor!==void 0||e.indent<2&&n>0}function Ee(e,t,n,r){if(n.kind==="alias")return`*${n.anchor}`;const{block:i=!1,iskey:o=!1,isblockseq:a=!1}=r;let s=r.compact??!1;const l=n.anchor!==void 0;Vt(e,n,t)&&(s=!1);let u,c=n.style.tagged;const y=i&&(n.kind==="mapping"||n.kind==="sequence")&&!n.style.flow&&n.items.length!==0;if(n.kind==="mapping")y?u=ra(e,t,n,s):u=na(e,t,n);else if(n.kind==="sequence")y?e.seqNoIndent&&!a&&t>0?u=kn(e,t-1,n,s):u=kn(e,t,n,s):u=ta(e,t,n);else{const g=Yo(e,t),T=Zo(e,n,g,o,i);u=zo(n.value,T,g),c=n.style.tagged||T!==Je&&n.tag!==e.defaultScalarTagName}if(y&&s&&t>0&&e.indent>2&&(u=`${" ".repeat(e.indent-2)}${u}`),c||l){const g=[],T=c?qo(n):null,E=l?`&${n.anchor}`:null;e.tagBeforeAnchor?(T!==null&&g.push(T),E!==null&&g.push(E)):(E!==null&&g.push(E),T!==null&&g.push(T));const w=u===""||u.charCodeAt(0)===Oe?"":" ";u=`${g.join(" ")}${w}${u}`}return u}function ia(e){return(e.kind==="sequence"||e.kind==="mapping")&&!e.style.flow&&e.items.length!==0&&!e.style.tagged&&e.anchor===void 0}function oa(e){let t=e;for(;(t.kind==="sequence"||t.kind==="mapping")&&!t.style.flow&&t.items.length!==0;)t=t.kind==="sequence"?t.items[t.items.length-1]:t.items[t.items.length-1].value;if(t.kind!=="scalar"||!(t.style.literal||t.style.folded))return!1;const{value:n}=t;return n.endsWith(`
36
-
37
- `)||n===`
38
- `}function aa(e){let t="";for(const n of e.directives){if(n.kind==="yaml"){t+=`%YAML ${n.version}
39
- `;continue}const{handle:r,prefix:i}=n;t+=`%TAG ${r} ${i}
40
- `}return t}function sa(e,t){const n=Ko(t);let r="",i=!1;for(let o=0;o<e.length;o+=1){const a=e[o],s=aa(a),l=s!=="",u=a.explicitStart||l||o>0&&!i;if(r+=s,a.contents===null)u&&(r+=`---
41
- `);else if(u){const c=Ee(n,0,a.contents,{block:!0,compact:!0}),y=c===""?"":l||ia(a.contents)?`
42
- `:" ";r+=`---${y}${c}
43
- `}else r+=Ee(n,0,a.contents,{block:!0,compact:!0})+`
44
- `;i=a.explicitEnd||a.contents!==null&&oa(a.contents),i&&(r+=`...
45
- `)}return r}var la=Pi.withTags({...kt,resolve:(e,t,n)=>{const r=kt.resolve(e,t,n);return r===O?Kn.resolve(e,t,n):r}},{...Ot,resolve:(e,t,n)=>{const r=Ot.resolve(e,t,n);return r===O?Gn.resolve(e,t,n):r}}),ca={...on,schema:la,skipInvalid:!1,noRefs:!1,flowLevel:-1,transform:()=>{}};function ua(e,t={}){const n={...ca,...t},r=Io(e,n.schema,{noRefs:n.noRefs,skipInvalid:n.skipInvalid});return n.flowLevel>=0&&No(r,(i,o)=>{if(!(o.depth<n.flowLevel))return i.style.flow=!0,ur}),n.transform(r),sa(r,{...Pt(n,Object.keys(on)),schema:n.schema})}const fa=zn.withTags(Yn,Wn,jn,Vn,Xn),ln=(e,t)=>{const n=bo(e,{schema:fa,...t});if(n.length===0)return e.trim()===""?void 0:null;if(n.length>1)throw new yt("expected a single document in the stream, but found more");return n[0]},pa=(e,t)=>ua(e,t);function Ar(e,t){return e.hasOwnProperty(t)?e[t]:void 0}const da=/\((\d+):(\d+)\)$/;class et extends Error{originalError;source;col;line;constructor(t,n){super(t.message.split(`
46
- `)[0]),this.originalError=t,this.source=n,Object.setPrototypeOf(this,et.prototype);const[,r,i]=this.message.match(da)||[];this.line=parseInt(r,10),this.col=parseInt(i,10)}}function yr(e){return e.endsWith(".yaml")||e.endsWith(".yml")||e.endsWith(".json")}const ha=[".graphql",".gql"];function cn(e){const t=e.toLowerCase();return ha.some(n=>t.endsWith(n))}function lt(e,t){return e+"::"+t}function ga(){return new Promise(e=>{setTimeout(e)})}class pt{absoluteRef;body;mimeType;constructor(t,n,r){this.absoluteRef=t,this.body=n,this.mimeType=r}#e;#t;getAst(t){return this.#e===void 0&&(this.#e=t(this.body,{filename:this.absoluteRef})??void 0,this.#e&&this.#e.kind===0&&this.#e.value===""&&this.#e.startPosition!==1&&(this.#e.startPosition=1,this.#e.endPosition=1)),this.#e}getLines(){return this.#t===void 0&&(this.#t=this.body.split(/\r\n|[\n\r]/g)),this.#t}}class St extends Error{originalError;constructor(t){super(t.message),this.originalError=t,Object.setPrototypeOf(this,St.prototype)}}function ma(e,t){const n=new pt(t,e);if(cn(t))return{source:n,parsed:e};try{return{source:n,parsed:ln(e,{filename:t})}}catch(r){throw new et(r,n)}}class Aa{config;cache=new Map;constructor(t={http:{headers:[]}}){this.config=t}getFiles(){return new Set(Array.from(this.cache.keys()))}resolveExternalRef(t,n){return Ne(n)?n:t&&Ne(t)?new URL(n,t).href:le.pathBrowserifyExports.resolve(t?le.pathBrowserifyExports.dirname(t):process.cwd(),n)}async loadExternalRef(t){try{if(Ne(t)){const{body:n,mimeType:r}=await Mn(t,this.config.http);return new pt(t,n,r)}else{if((void 0)(t).isDirectory())throw new Error(`Expected a file but received a folder at ${t}.`);const n=await(void 0).readFile(t,"utf-8");return new pt(t,n.replace(/\r\n/g,`
47
- `))}}catch(n){throw n.message=n.message.replace(", lstat",""),new St(n)}}parseDocument(t,n=!1){if(cn(t.absoluteRef))return{source:t,parsed:t.body};if(!yr(t.absoluteRef)&&!t.mimeType?.match(/(json|yaml|openapi)/)&&!n)return{source:t,parsed:t.body};try{return{source:t,parsed:ln(t.body,{filename:t.absoluteRef})}}catch(r){throw new et(r,t)}}async resolveDocument(t,n,r=!1){const i=this.resolveExternalRef(t,n),o=this.cache.get(i);if(o)return o;const a=this.loadExternalRef(i).then(s=>this.parseDocument(s,r));return this.cache.set(i,a),a}}function On(e,t){return{prev:e,node:t}}function ya(e,t){for(;e;){if(e.node===t)return!0;e=e.prev}return!1}const Ye={name:"unknown",properties:{}},Ea={name:"scalar",properties:{}};async function Sa(e){const{rootDocument:t,externalRefResolver:n,rootType:r}=e,i=new Map,o=new Set,a=[];l(t.parsed,t,"#/",r);let s;do s=await Promise.all(a);while(a.length!==s.length);return i;function l(u,c,y,g){const T=c.source.absoluteRef,E=new Map;w(u,g,T+y);function w(N,A,R){if(!le.isPlainObject(N)&&!Array.isArray(N))return;const p=`${A.name}::${R}`;if(o.has(p))return;if(o.add(p),Array.isArray(N)){const b=A.items;if(b===void 0&&A!==Ye&&A!==je)return;const S=typeof b=="function";for(let m=0;m<N.length;m++){let Q=S?b(N[m],Ce(R,m)):b;if(Q===void 0&&A!==Ye&&A!==je)continue;const W=Q?.directResolveAs?{$ref:N[m]}:N[m];Q=Q?.directResolveAs||Q,w(W,Ve(Q)?Q:Ye,Ce(R,m))}return}const[x,_]=Object.entries(N).find(([b])=>b==="$anchor")||[];_&&E.set(`#${_}`,N);for(const b of Object.keys(N)){let S=N[b],m=Ar(A.properties,b);m===void 0&&(m=A.additionalProperties),typeof m=="function"&&(m=m(S,b)),m===void 0&&(m=Ye),A.extensionsPrefix&&b.startsWith(A.extensionsPrefix)&&m===Ye&&(m=je),!Ve(m)&&m?.directResolveAs&&(m=m.directResolveAs,S={$ref:S}),m&&m.name===void 0&&m.resolvable!==!1&&(m=Ea),!(!Ve(m)||!(le.isPlainObject(S)||Array.isArray(S)))&&w(S,m,Ce(R,we(b)))}if(ot(N)){const b=F(c,N,{prev:null,node:N}).then(S=>{S.resolved&&l(S.node,S.document,S.nodePointer,A)});a.push(b)}if(Bn(N)){const b=F(c,{$ref:N.externalValue},{prev:null,node:N}).then(S=>{S.resolved&&l(S.node,S.document,S.nodePointer,A)});a.push(b)}}async function F(N,A,R){if(ya(R.prev,A))throw new Error("Self-referencing circular pointer");if(Pr(A.$ref)){await ga();const P={resolved:!0,isRemote:!1,node:E.get(A.$ref),document:N,nodePointer:A.$ref},G=lt(N.source.absoluteRef,A.$ref);return i.set(G,P),P}const{uri:p,pointer:x}=Un(A.$ref),_=p!==null&&n.resolveExternalRef(N.source.absoluteRef,p)!==N.source.absoluteRef;let b;try{b=_?await n.resolveDocument(N.source.absoluteRef,p):N}catch(P){const G={resolved:!1,isRemote:_,document:void 0,error:P},J=lt(N.source.absoluteRef,A.$ref);return i.set(J,G),G}let S={resolved:!0,document:b,isRemote:_,node:N.parsed,nodePointer:"#/"},m=b.parsed;const Q=x;for(const P of Q)if(le.isPlainObject(m)&&m[P]!==void 0)m=m[P],S.nodePointer=Ce(S.nodePointer,we(P));else if(Array.isArray(m)&&m[+P]!==void 0)m=m[+P],S.nodePointer=Ce(S.nodePointer,we(P));else if(ot(m))if(S=await F(b,m,On(R,m)),b=S.document||b,le.isPlainObject(S.node))m=S.node[P],S.nodePointer=Ce(S.nodePointer,we(P));else if(Array.isArray(S.node))m=S.node[+P],S.nodePointer=Ce(S.nodePointer,we(P));else{m=void 0;break}else{m=void 0;break}S.node=m,S.document=b;const W=lt(N.source.absoluteRef,A.$ref);return S.document&&ot(m)&&(S=await F(S.document,m,On(R,m))),i.set(W,S),{...S}}}}exports.BaseResolver=Aa;exports.Location=Xt;exports.ResolveError=St;exports.Source=pt;exports.SpecExtension=je;exports.YamlParseError=et;exports.env=Hn;exports.escapePointerFragment=we;exports.getDir=Lr;exports.getOwn=Ar;exports.isAbsoluteUrl=Ne;exports.isBrowser=Fn;exports.isExternalValue=Bn;exports.isGraphqlRef=cn;exports.isMappingRef=Or;exports.isNamedType=Ve;exports.isRef=ot;exports.isSupportedExtension=yr;exports.isTruthy=Pn;exports.listOf=_r;exports.makeDocumentFromString=ma;exports.makeRefId=lt;exports.mapOf=Ir;exports.normalizeTypes=wr;exports.parsePointer=qn;exports.parseRef=Un;exports.parseYaml=ln;exports.pointerBaseName=Nr;exports.readFileFromUrl=Mn;exports.refBaseName=$r;exports.replaceRef=Fr;exports.resolveDocument=Sa;exports.resolvePath=kr;exports.stringifyYaml=pa;exports.unescapePointerFragment=Dn;