@redocly/cli 2.52.0 → 2.52.1

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 (89) hide show
  1. package/THIRD_PARTY_NOTICES +2 -2
  2. package/lib/chunks/{QNFSWXWM.js → 43FMQGIC.js} +1 -1
  3. package/lib/chunks/{LJ53IMLM.js → 4XWI7J57.js} +352 -339
  4. package/lib/chunks/{OMNGRJM6.js → ANMFTH7J.js} +1 -1
  5. package/lib/chunks/{U7Z4MLK3.js → AOOXKVZ6.js} +1 -1
  6. package/lib/chunks/{FPLER37P.js → BWQB4GUQ.js} +1 -1
  7. package/lib/chunks/{UKWZHJSE.js → DDB52L66.js} +1 -1
  8. package/lib/chunks/{WPCGRKTH.js → E44UEWCI.js} +1 -1
  9. package/lib/chunks/{BOUAXXEO.js → F7TVQGKE.js} +1 -1
  10. package/lib/chunks/{JQW53OZ2.js → GCM2GVOB.js} +1 -1
  11. package/lib/chunks/{RZMAAWKX.js → GNCL6OYK.js} +1 -1
  12. package/lib/chunks/{CD6HJQ7Z.js → IBTEY2L5.js} +1 -1
  13. package/lib/chunks/{2LDFGQ7M.js → KMCWK6TG.js} +1 -1
  14. package/lib/chunks/{GZNSV6XB.js → KTY2NT6E.js} +1 -1
  15. package/lib/chunks/{O6PRCLSV.js → KXHIHQWX.js} +6 -6
  16. package/lib/chunks/{SVJJMDUS.js → M7QRMIWR.js} +1 -1
  17. package/lib/chunks/{NY4C4KO6.js → MTD74D7D.js} +1 -1
  18. package/lib/chunks/{35R6GCFO.js → N2CTYNAN.js} +1 -1
  19. package/lib/chunks/{7AUMFZDC.js → NOI562GM.js} +1 -1
  20. package/lib/chunks/{EI27DJLF.js → OTGTOSNW.js} +1 -1
  21. package/lib/chunks/{RCG4MSAO.js → P3CVK7VZ.js} +1 -1
  22. package/lib/chunks/{BXFJJ63W.js → T5KTLVAZ.js} +1 -1
  23. package/lib/chunks/{XAKGO2KF.js → TWYMGTRR.js} +1 -1
  24. package/lib/chunks/{TR2ZE2NA.js → U3LG2XZJ.js} +1 -1
  25. package/lib/chunks/{SGNOWOE7.js → WNOJ33NP.js} +1 -1
  26. package/lib/chunks/{UXC4J2II.js → WNU6CBDY.js} +1 -1
  27. package/lib/chunks/{QTYASRSS.js → X4ZTHKYE.js} +1 -1
  28. package/lib/chunks/{X6NXBBZT.js → YDCOQ3IQ.js} +1 -1
  29. package/lib/chunks/{E23GS6YK.js → YMON5AYA.js} +1 -1
  30. package/lib/chunks/{P5GXYHU7.js → YVY7OG3K.js} +1 -1
  31. package/lib/chunks/{N6O32QAI.js → Z56NVT3C.js} +1 -1
  32. package/lib/chunks/{QB32BX35.js → ZAZG6Z4J.js} +1 -1
  33. package/lib/chunks/{BQFGD55Z.js → ZGSX24WO.js} +1 -1
  34. package/lib/chunks/{TPYGW72X.js → ZQYHXXTF.js} +1 -1
  35. package/lib/chunks/{AQFM7XGG.js → ZXPLB4LA.js} +1 -1
  36. package/lib/eject-assets/generators/cli/docs.ts +1 -1
  37. package/lib/eject-assets/generators/cli/engine-source.ts +1 -1
  38. package/lib/eject-assets/generators/cli/index.ts +2 -2
  39. package/lib/eject-assets/generators/cli/render.ts +1 -1
  40. package/lib/eject-assets/generators/go/client.ts +1 -1
  41. package/lib/eject-assets/generators/go/descriptor.ts +1 -1
  42. package/lib/eject-assets/generators/go/index.ts +2 -2
  43. package/lib/eject-assets/generators/go/models.ts +1 -1
  44. package/lib/eject-assets/generators/go/naming.ts +1 -1
  45. package/lib/eject-assets/generators/go/operations.ts +1 -1
  46. package/lib/eject-assets/generators/go/pagination.ts +1 -1
  47. package/lib/eject-assets/generators/go/types.ts +1 -1
  48. package/lib/eject-assets/generators/mock/faker.ts +1 -1
  49. package/lib/eject-assets/generators/mock/index.ts +2 -2
  50. package/lib/eject-assets/generators/mock/render.ts +1 -1
  51. package/lib/eject-assets/generators/mock/sample.ts +1 -1
  52. package/lib/eject-assets/generators/mock/values.ts +1 -1
  53. package/lib/eject-assets/generators/php/client.ts +1 -1
  54. package/lib/eject-assets/generators/php/descriptor.ts +1 -1
  55. package/lib/eject-assets/generators/php/index.ts +2 -2
  56. package/lib/eject-assets/generators/php/models.ts +1 -1
  57. package/lib/eject-assets/generators/php/naming.ts +1 -1
  58. package/lib/eject-assets/generators/php/operations.ts +1 -1
  59. package/lib/eject-assets/generators/php/pagination.ts +1 -1
  60. package/lib/eject-assets/generators/php/types.ts +1 -1
  61. package/lib/eject-assets/generators/python/client.ts +1 -1
  62. package/lib/eject-assets/generators/python/descriptor.ts +1 -1
  63. package/lib/eject-assets/generators/python/index.ts +2 -2
  64. package/lib/eject-assets/generators/python/models.ts +1 -1
  65. package/lib/eject-assets/generators/python/naming.ts +1 -1
  66. package/lib/eject-assets/generators/python/operations.ts +1 -1
  67. package/lib/eject-assets/generators/python/pagination.ts +1 -1
  68. package/lib/eject-assets/generators/python/types.ts +1 -1
  69. package/lib/eject-assets/generators/swr/index.ts +2 -2
  70. package/lib/eject-assets/generators/swr/render.ts +1 -1
  71. package/lib/eject-assets/generators/tanstack-query/index.ts +2 -2
  72. package/lib/eject-assets/generators/tanstack-query/render.ts +1 -1
  73. package/lib/eject-assets/generators/transformers/index.ts +2 -2
  74. package/lib/eject-assets/generators/transformers/render.ts +1 -1
  75. package/lib/eject-assets/generators/typescript/banner.ts +1 -1
  76. package/lib/eject-assets/generators/typescript/client.ts +1 -1
  77. package/lib/eject-assets/generators/typescript/descriptor.ts +1 -1
  78. package/lib/eject-assets/generators/typescript/index.ts +2 -2
  79. package/lib/eject-assets/generators/typescript/inline-runtime.ts +1 -1
  80. package/lib/eject-assets/generators/typescript/operation-signature.ts +1 -1
  81. package/lib/eject-assets/generators/typescript/operation-types.ts +1 -1
  82. package/lib/eject-assets/generators/typescript/operations.ts +1 -1
  83. package/lib/eject-assets/generators/typescript/response-headers.ts +1 -1
  84. package/lib/eject-assets/generators/typescript/type-guards.ts +1 -1
  85. package/lib/eject-assets/generators/typescript/types.ts +1 -1
  86. package/lib/eject-assets/generators/zod/index.ts +2 -2
  87. package/lib/eject-assets/generators/zod/schemas.ts +1 -1
  88. package/lib/index.js +8 -8
  89. package/package.json +1 -1
@@ -4,10 +4,10 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as yt,c as At}from"./RFWIIJFG.js";var Ft=At((Ie,Vt)=>{var Ae=Object.prototype.hasOwnProperty,Te=Object.prototype.toString;Vt.exports=function(D,tt,T){if(Te.call(tt)!=="[object Function]")throw new TypeError("iterator must be a function");var R=D.length;if(R===+R)for(var N=0;N<R;N++)tt.call(T,D[N],N,D);else for(var M in D)Ae.call(D,M)&&tt.call(T,D[M],M,D)}});var je=At((De,Ut)=>{"use strict";var Ce=Ft();Ut.exports=Q;function Q(et,D,tt){if(arguments.length===3)return Q.set(et,D,tt);if(arguments.length===2)return Q.get(et,D);var T=Q.bind(Q,et);for(var R in Q)Q.hasOwnProperty(R)&&(T[R]=Q[R].bind(T,et));return T}Q.get=function(D,tt){for(var T=Array.isArray(tt)?tt:Q.parse(tt),R=0;R<T.length;++R){var N=T[R];if(!(typeof D=="object"&&N in D))throw new Error("Invalid reference token: "+N);D=D[N]}return D};Q.set=function(D,tt,T){var R=Array.isArray(tt)?tt:Q.parse(tt),N=R[0];if(R.length===0)throw Error("Can not set the root object");for(var M=0;M<R.length-1;++M){var h=R[M];typeof h!="string"&&typeof h!="number"&&(h=String(h)),!(h==="__proto__"||h==="constructor"||h==="prototype")&&(h==="-"&&Array.isArray(D)&&(h=D.length),N=R[M+1],h in D||(N.match(/^(\d+|-)$/)?D[h]=[]:D[h]={}),D=D[h])}return N==="-"&&Array.isArray(D)&&(N=D.length),D[N]=T,this};Q.remove=function(et,D){var tt=Array.isArray(D)?D:Q.parse(D),T=tt[tt.length-1];if(T===void 0)throw new Error('Invalid JSON pointer for remove: "'+D+'"');var R=Q.get(et,tt.slice(0,-1));if(Array.isArray(R)){var N=+T;if(T===""&&isNaN(N))throw new Error('Invalid array index: "'+T+'"');Array.prototype.splice.call(R,N,1)}else delete R[T]};Q.dict=function(D,tt){var T={};return Q.walk(D,function(R,N){T[N]=R},tt),T};Q.walk=function(D,tt,T){var R=[];T=T||function(N){var M=Object.prototype.toString.call(N);return M==="[object Object]"||M==="[object Array]"},(function N(M){Ce(M,function(h,_){R.push(String(_)),T(h)?N(h):tt(h,Q.compile(R)),R.pop()})})(D)};Q.has=function(D,tt){try{Q.get(D,tt)}catch{return!1}return!0};Q.escape=function(D){return D.toString().replace(/~/g,"~0").replace(/\//g,"~1")};Q.unescape=function(D){return D.replace(/~1/g,"/").replace(/~0/g,"~")};Q.parse=function(D){if(D==="")return[];if(D.charAt(0)!=="/")throw new Error("Invalid JSON pointer: "+D);return D.substring(1).split(/\//).map(Q.unescape)};Q.compile=function(D){return D.length===0?"":"/"+D.map(Q.escape).join("/")}});var Me=At((Bt,Tt)=>{(function(et){if(typeof Bt=="object"&&typeof Tt<"u")Tt.exports=et();else if(typeof define=="function"&&define.amd)define([],et);else{var D;typeof window<"u"?D=window:typeof global<"u"?D=global:typeof self<"u"?D=self:D=this,D.OpenAPISampler=et()}})(function(){var et,D,tt;return(function(){function T(R,N,M){function h(w,I){if(!N[w]){if(!R[w]){var C=typeof yt=="function"&&yt;if(!I&&C)return C(w,!0);if(_)return _(w,!0);var $=new Error("Cannot find module '"+w+"'");throw $.code="MODULE_NOT_FOUND",$}var l=N[w]={exports:{}};R[w][0].call(l.exports,function(c){var v=R[w][1][c];return h(v||c)},l,l.exports,T,R,N,M)}return N[w].exports}for(var _=typeof yt=="function"&&yt,y=0;y<M.length;y++)h(M[y]);return h}return T})()({1:[function(T,R,N){(()=>{"use strict";var M={d:(r,t)=>{for(var e in t)M.o(t,e)&&!M.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:t[e]})},o:(r,t)=>Object.prototype.hasOwnProperty.call(r,t),r:r=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})}},h={};M.r(h),M.d(h,{XMLBuilder:()=>Pe,XMLParser:()=>ye,XMLValidator:()=>_e});let _=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",y=new RegExp("^["+_+"]["+_+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function w(r,t){let e=[],i=t.exec(r);for(;i;){let n=[];n.startIndex=t.lastIndex-i[0].length;let o=i.length;for(let u=0;u<o;u++)n.push(i[u]);e.push(n),i=t.exec(r)}return e}let I=function(r){return y.exec(r)!=null},C=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],$=["__proto__","constructor","prototype"],l={allowBooleanAttributes:!1,unpairedTags:[]};function c(r,t){t=Object.assign({},l,t);let e=[],i=!1,n=!1;r[0]==="\uFEFF"&&(r=r.substr(1));for(let o=0;o<r.length;o++)if(r[o]==="<"&&r[o+1]==="?"){if(o+=2,o=P(r,o),o.err)return o}else{if(r[o]!=="<"){if(v(r[o]))continue;return g("InvalidChar","char '"+r[o]+"' is not expected.",b(r,o))}{let u=o;if(o++,r[o]==="!"){o=E(r,o);continue}{let s=!1;r[o]==="/"&&(s=!0,o++);let d="";for(;o<r.length&&r[o]!==">"&&r[o]!==" "&&r[o]!==" "&&r[o]!==`
8
- `&&r[o]!=="\r";o++)d+=r[o];if(d=d.trim(),d[d.length-1]==="/"&&(d=d.substring(0,d.length-1),o--),!x(d)){let O;return O=d.trim().length===0?"Invalid space after '<'.":"Tag '"+d+"' is an invalid name.",g("InvalidTag",O,b(r,o))}let p=W(r,o);if(p===!1)return g("InvalidAttr","Attributes for '"+d+"' have open quote.",b(r,o));let m=p.value;if(o=p.index,m[m.length-1]==="/"){let O=o-m.length;m=m.substring(0,m.length-1);let j=Y(m,t);if(j!==!0)return g(j.err.code,j.err.msg,b(r,O+j.err.line));i=!0}else if(s){if(!p.tagClosed)return g("InvalidTag","Closing tag '"+d+"' doesn't have proper closing.",b(r,o));if(m.trim().length>0)return g("InvalidTag","Closing tag '"+d+"' can't have attributes or invalid starting.",b(r,u));if(e.length===0)return g("InvalidTag","Closing tag '"+d+"' has not been opened.",b(r,u));{let O=e.pop();if(d!==O.tagName){let j=b(r,O.tagStartPos);return g("InvalidTag","Expected closing tag '"+O.tagName+"' (opened in line "+j.line+", col "+j.col+") instead of closing tag '"+d+"'.",b(r,u))}e.length==0&&(n=!0)}}else{let O=Y(m,t);if(O!==!0)return g(O.err.code,O.err.msg,b(r,o-m.length+O.err.line));if(n===!0)return g("InvalidXml","Multiple possible root nodes found.",b(r,o));t.unpairedTags.indexOf(d)!==-1||e.push({tagName:d,tagStartPos:u}),i=!0}for(o++;o<r.length;o++)if(r[o]==="<"){if(r[o+1]==="!"){o++,o=E(r,o);continue}if(r[o+1]!=="?")break;if(o=P(r,++o),o.err)return o}else if(r[o]==="&"){let O=f(r,o);if(O==-1)return g("InvalidChar","char '&' is not expected.",b(r,o));o=O}else if(n===!0&&!v(r[o]))return g("InvalidXml","Extra text at the end",b(r,o));r[o]==="<"&&o--}}}return i?e.length==1?g("InvalidTag","Unclosed tag '"+e[0].tagName+"'.",b(r,e[0].tagStartPos)):!(e.length>0)||g("InvalidXml","Invalid '"+JSON.stringify(e.map(o=>o.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):g("InvalidXml","Start tag expected.",1)}function v(r){return r===" "||r===" "||r===`
9
- `||r==="\r"}function P(r,t){let e=t;for(;t<r.length;t++)if(r[t]=="?"||r[t]==" "){let i=r.substr(e,t-e);if(t>5&&i==="xml")return g("InvalidXml","XML declaration allowed only at the start of the document.",b(r,t));if(r[t]=="?"&&r[t+1]==">"){t++;break}continue}return t}function E(r,t){if(r.length>t+5&&r[t+1]==="-"&&r[t+2]==="-"){for(t+=3;t<r.length;t++)if(r[t]==="-"&&r[t+1]==="-"&&r[t+2]===">"){t+=2;break}}else if(r.length>t+8&&r[t+1]==="D"&&r[t+2]==="O"&&r[t+3]==="C"&&r[t+4]==="T"&&r[t+5]==="Y"&&r[t+6]==="P"&&r[t+7]==="E"){let e=1;for(t+=8;t<r.length;t++)if(r[t]==="<")e++;else if(r[t]===">"&&(e--,e===0))break}else if(r.length>t+9&&r[t+1]==="["&&r[t+2]==="C"&&r[t+3]==="D"&&r[t+4]==="A"&&r[t+5]==="T"&&r[t+6]==="A"&&r[t+7]==="["){for(t+=8;t<r.length;t++)if(r[t]==="]"&&r[t+1]==="]"&&r[t+2]===">"){t+=2;break}}return t}let F='"',q="'";function W(r,t){let e="",i="",n=!1;for(;t<r.length;t++){if(r[t]===F||r[t]===q)i===""?i=r[t]:i!==r[t]||(i="");else if(r[t]===">"&&i===""){n=!0;break}e+=r[t]}return i===""&&{value:e,index:t,tagClosed:n}}let U=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Y(r,t){let e=w(r,U),i={};for(let n=0;n<e.length;n++){if(e[n][1].length===0)return g("InvalidAttr","Attribute '"+e[n][2]+"' has no space in starting.",A(e[n]));if(e[n][3]!==void 0&&e[n][4]===void 0)return g("InvalidAttr","Attribute '"+e[n][2]+"' is without value.",A(e[n]));if(e[n][3]===void 0&&!t.allowBooleanAttributes)return g("InvalidAttr","boolean attribute '"+e[n][2]+"' is not allowed.",A(e[n]));let o=e[n][2];if(!a(o))return g("InvalidAttr","Attribute '"+o+"' is an invalid name.",A(e[n]));if(Object.prototype.hasOwnProperty.call(i,o))return g("InvalidAttr","Attribute '"+o+"' is repeated.",A(e[n]));i[o]=1}return!0}function f(r,t){if(r[++t]===";")return-1;if(r[t]==="#")return(function(i,n){let o=/\d/;for(i[n]==="x"&&(n++,o=/[\da-fA-F]/);n<i.length;n++){if(i[n]===";")return n;if(!i[n].match(o))break}return-1})(r,++t);let e=0;for(;t<r.length;t++,e++)if(!(r[t].match(/\w/)&&e<20)){if(r[t]===";")break;return-1}return t}function g(r,t,e){return{err:{code:r,msg:t,line:e.line||e,col:e.col}}}function a(r){return I(r)}function x(r){return I(r)}function b(r,t){let e=r.substring(0,t).split(/\r?\n/);return{line:e.length,col:e[e.length-1].length+1}}function A(r){return r.startIndex+r[1].length}let G=r=>C.includes(r)?"__"+r:r,Z={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(r,t){return t},attributeValueProcessor:function(r,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,entityDecoder:null,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(r,t,e){return r},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:G};function J(r,t){if(typeof r!="string")return;let e=r.toLowerCase();if(C.some(i=>e===i.toLowerCase()))throw new Error(`[SECURITY] Invalid ${t}: "${r}" is a reserved JavaScript keyword that could cause prototype pollution`);if($.some(i=>e===i.toLowerCase()))throw new Error(`[SECURITY] Invalid ${t}: "${r}" is a reserved JavaScript keyword that could cause prototype pollution`)}function S(r,t){return typeof r=="boolean"?{enabled:r,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1e3,allowedTags:null,tagFilter:null,appliesTo:"all"}:typeof r=="object"&&r!==null?{enabled:r.enabled!==!1,maxEntitySize:Math.max(1,r.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,r.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,r.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,r.maxExpandedLength??1e5),maxEntityCount:Math.max(1,r.maxEntityCount??1e3),allowedTags:r.allowedTags??null,tagFilter:r.tagFilter??null,appliesTo:r.appliesTo??"all"}:S(!0)}let B=function(r){let t=Object.assign({},Z,r),e=[{value:t.attributeNamePrefix,name:"attributeNamePrefix"},{value:t.attributesGroupName,name:"attributesGroupName"},{value:t.textNodeName,name:"textNodeName"},{value:t.cdataPropName,name:"cdataPropName"},{value:t.commentPropName,name:"commentPropName"}];for(let{value:i,name:n}of e)i&&J(i,n);return t.onDangerousProperty===null&&(t.onDangerousProperty=G),t.processEntities=S(t.processEntities,t.htmlEntities),t.unpairedTagsSet=new Set(t.unpairedTags),t.stopNodes&&Array.isArray(t.stopNodes)&&(t.stopNodes=t.stopNodes.map(i=>typeof i=="string"&&i.startsWith("*.")?".."+i.substring(2):i)),t},X;X=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class H{constructor(t){this.tagname=t,this.child=[],this[":@"]=Object.create(null)}add(t,e){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t,e){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),e!==void 0&&(this.child[this.child.length-1][X]={startIndex:e})}static getMetaDataSymbol(){return X}}class z{constructor(t){this.suppressValidationErr=!t,this.options=t}readDocType(t,e){let i=Object.create(null),n=0;if(t[e+3]!=="O"||t[e+4]!=="C"||t[e+5]!=="T"||t[e+6]!=="Y"||t[e+7]!=="P"||t[e+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let o=1,u=!1,s=!1,d="";for(;e<t.length;e++)if(t[e]!=="<"||s)if(t[e]===">"){if(s?t[e-1]==="-"&&t[e-2]==="-"&&(s=!1,o--):o--,o===0)break}else t[e]==="["?u=!0:d+=t[e];else{if(u&&nt(t,"!ENTITY",e)){let p,m;if(e+=7,[p,m,e]=this.readEntityExp(t,e+1,this.suppressValidationErr),m.indexOf("&")===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount!=null&&n>=this.options.maxEntityCount)throw new Error(`Entity count (${n+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);i[p]=m,n++}}else if(u&&nt(t,"!ELEMENT",e)){e+=8;let{index:p}=this.readElementExp(t,e+1);e=p}else if(u&&nt(t,"!ATTLIST",e))e+=8;else if(u&&nt(t,"!NOTATION",e)){e+=9;let{index:p}=this.readNotationExp(t,e+1,this.suppressValidationErr);e=p}else{if(!nt(t,"!--",e))throw new Error("Invalid DOCTYPE");s=!0}o++,d=""}if(o!==0)throw new Error("Unclosed DOCTYPE")}return{entities:i,i:e}}readEntityExp(t,e){let i=e=K(t,e);for(;e<t.length&&!/\s/.test(t[e])&&t[e]!=='"'&&t[e]!=="'";)e++;let n=t.substring(i,e);if(lt(n),e=K(t,e),!this.suppressValidationErr){if(t.substring(e,e+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(t[e]==="%")throw new Error("Parameter entities are not supported")}let o="";if([e,o]=this.readIdentifierVal(t,e,"entity"),this.options.enabled!==!1&&this.options.maxEntitySize!=null&&o.length>this.options.maxEntitySize)throw new Error(`Entity "${n}" size (${o.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[n,o,--e]}readNotationExp(t,e){let i=e=K(t,e);for(;e<t.length&&!/\s/.test(t[e]);)e++;let n=t.substring(i,e);!this.suppressValidationErr&&lt(n),e=K(t,e);let o=t.substring(e,e+6).toUpperCase();if(!this.suppressValidationErr&&o!=="SYSTEM"&&o!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${o}"`);e+=o.length,e=K(t,e);let u=null,s=null;if(o==="PUBLIC")[e,u]=this.readIdentifierVal(t,e,"publicIdentifier"),t[e=K(t,e)]!=='"'&&t[e]!=="'"||([e,s]=this.readIdentifierVal(t,e,"systemIdentifier"));else if(o==="SYSTEM"&&([e,s]=this.readIdentifierVal(t,e,"systemIdentifier"),!this.suppressValidationErr&&!s))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:u,systemIdentifier:s,index:--e}}readIdentifierVal(t,e,i){let n="",o=t[e];if(o!=='"'&&o!=="'")throw new Error(`Expected quoted string, found "${o}"`);let u=++e;for(;e<t.length&&t[e]!==o;)e++;if(n=t.substring(u,e),t[e]!==o)throw new Error(`Unterminated ${i} value`);return[++e,n]}readElementExp(t,e){let i=e=K(t,e);for(;e<t.length&&!/\s/.test(t[e]);)e++;let n=t.substring(i,e);if(!this.suppressValidationErr&&!I(n))throw new Error(`Invalid element name: "${n}"`);let o="";if(t[e=K(t,e)]==="E"&&nt(t,"MPTY",e))e+=4;else if(t[e]==="A"&&nt(t,"NY",e))e+=2;else if(t[e]==="("){let u=++e;for(;e<t.length&&t[e]!==")";)e++;if(o=t.substring(u,e),t[e]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${t[e]}"`);return{elementName:n,contentModel:o.trim(),index:e}}readAttlistExp(t,e){let i=e=K(t,e);for(;e<t.length&&!/\s/.test(t[e]);)e++;let n=t.substring(i,e);for(lt(n),i=e=K(t,e);e<t.length&&!/\s/.test(t[e]);)e++;let o=t.substring(i,e);if(!lt(o))throw new Error(`Invalid attribute name: "${o}"`);e=K(t,e);let u="";if(t.substring(e,e+8).toUpperCase()==="NOTATION"){if(u="NOTATION",t[e=K(t,e+=8)]!=="(")throw new Error(`Expected '(', found "${t[e]}"`);e++;let d=[];for(;e<t.length&&t[e]!==")";){let p=e;for(;e<t.length&&t[e]!=="|"&&t[e]!==")";)e++;let m=t.substring(p,e);if(m=m.trim(),!lt(m))throw new Error(`Invalid notation name: "${m}"`);d.push(m),t[e]==="|"&&(e++,e=K(t,e))}if(t[e]!==")")throw new Error("Unterminated list of notations");e++,u+=" ("+d.join("|")+")"}else{let d=e;for(;e<t.length&&!/\s/.test(t[e]);)e++;u+=t.substring(d,e);let p=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!p.includes(u.toUpperCase()))throw new Error(`Invalid attribute type: "${u}"`)}e=K(t,e);let s="";return t.substring(e,e+8).toUpperCase()==="#REQUIRED"?(s="#REQUIRED",e+=8):t.substring(e,e+7).toUpperCase()==="#IMPLIED"?(s="#IMPLIED",e+=7):[e,s]=this.readIdentifierVal(t,e,"ATTLIST"),{elementName:n,attributeName:o,attributeType:u,defaultValue:s,index:e}}}let K=(r,t)=>{for(;t<r.length&&/\s/.test(r[t]);)t++;return t};function nt(r,t,e){for(let i=0;i<t.length;i++)if(t[i]!==r[e+i+1])return!1;return!0}function lt(r){if(I(r))return r;throw new Error(`Invalid entity name ${r}`)}let ht=/^[-+]?0x[a-fA-F0-9]+$/,ct=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Gt={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original"},Wt=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;class Xt{constructor(t){this._matcher=t}get separator(){return this._matcher.separator}getCurrentTag(){let t=this._matcher.path;return t.length>0?t[t.length-1].tag:void 0}getCurrentNamespace(){let t=this._matcher.path;return t.length>0?t[t.length-1].namespace:void 0}getAttrValue(t){let e=this._matcher.path;if(e.length!==0)return e[e.length-1].values?.[t]}hasAttr(t){let e=this._matcher.path;if(e.length===0)return!1;let i=e[e.length-1];return i.values!==void 0&&t in i.values}getPosition(){let t=this._matcher.path;return t.length===0?-1:t[t.length-1].position??0}getCounter(){let t=this._matcher.path;return t.length===0?-1:t[t.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(t,e=!0){return this._matcher.toString(t,e)}toArray(){return this._matcher.path.map(t=>t.tag)}matches(t){return this._matcher.matches(t)}matchesAny(t){return t.matchesAny(this._matcher)}}class vt{constructor(t={}){this.separator=t.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new Xt(this)}push(t,e=null,i=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);let n=this.path.length;this.siblingStacks[n]||(this.siblingStacks[n]=new Map);let o=this.siblingStacks[n],u=i?`${i}:${t}`:t,s=o.get(u)||0,d=0;for(let m of o.values())d+=m;o.set(u,s+1);let p={tag:t,position:d,counter:s};i!=null&&(p.namespace=i),e!=null&&(p.values=e),this.path.push(p)}pop(){if(this.path.length===0)return;this._pathStringCache=null;let t=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),t}updateCurrent(t){if(this.path.length>0){let e=this.path[this.path.length-1];t!=null&&(e.values=t)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(t){if(this.path.length!==0)return this.path[this.path.length-1].values?.[t]}hasAttr(t){if(this.path.length===0)return!1;let e=this.path[this.path.length-1];return e.values!==void 0&&t in e.values}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(t,e=!0){let i=t||this.separator;if(i===this.separator&&e===!0){if(this._pathStringCache!==null)return this._pathStringCache;let n=this.path.map(o=>o.namespace?`${o.namespace}:${o.tag}`:o.tag).join(i);return this._pathStringCache=n,n}return this.path.map(n=>e&&n.namespace?`${n.namespace}:${n.tag}`:n.tag).join(i)}toArray(){return this.path.map(t=>t.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(t){let e=t.segments;return e.length!==0&&(t.hasDeepWildcard()?this._matchWithDeepWildcard(e):this._matchSimple(e))}_matchSimple(t){if(this.path.length!==t.length)return!1;for(let e=0;e<t.length;e++)if(!this._matchSegment(t[e],this.path[e],e===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(t){let e=this.path.length-1,i=t.length-1;for(;i>=0&&e>=0;){let n=t[i];if(n.type==="deep-wildcard"){if(i--,i<0)return!0;let o=t[i],u=!1;for(let s=e;s>=0;s--)if(this._matchSegment(o,this.path[s],s===this.path.length-1)){e=s-1,i--,u=!0;break}if(!u)return!1}else{if(!this._matchSegment(n,this.path[e],e===this.path.length-1))return!1;e--,i--}}return i<0}_matchSegment(t,e,i){if(t.tag!=="*"&&t.tag!==e.tag||t.namespace!==void 0&&t.namespace!=="*"&&t.namespace!==e.namespace||t.attrName!==void 0&&(!i||!e.values||!(t.attrName in e.values)||t.attrValue!==void 0&&String(e.values[t.attrName])!==String(t.attrValue)))return!1;if(t.position!==void 0){if(!i)return!1;let n=e.counter??0;if(t.position==="first"&&n!==0||t.position==="odd"&&n%2!=1||t.position==="even"&&n%2!=0||t.position==="nth"&&n!==t.positionValue)return!1}return!0}matchesAny(t){return t.matchesAny(this)}snapshot(){return{path:this.path.map(t=>({...t})),siblingStacks:this.siblingStacks.map(t=>new Map(t))}}restore(t){this._pathStringCache=null,this.path=t.path.map(e=>({...e})),this.siblingStacks=t.siblingStacks.map(e=>new Map(e))}readOnly(){return this._view}}class gt{constructor(t,e={},i){this.pattern=t,this.separator=e.separator||".",this.segments=this._parse(t),this.data=i,this._hasDeepWildcard=this.segments.some(n=>n.type==="deep-wildcard"),this._hasAttributeCondition=this.segments.some(n=>n.attrName!==void 0),this._hasPositionSelector=this.segments.some(n=>n.position!==void 0)}_parse(t){let e=[],i=0,n="";for(;i<t.length;)t[i]===this.separator?i+1<t.length&&t[i+1]===this.separator?(n.trim()&&(e.push(this._parseSegment(n.trim())),n=""),e.push({type:"deep-wildcard"}),i+=2):(n.trim()&&e.push(this._parseSegment(n.trim())),n="",i++):(n+=t[i],i++);return n.trim()&&e.push(this._parseSegment(n.trim())),e}_parseSegment(t){let e={type:"tag"},i=null,n=t,o=t.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(o&&(n=o[1]+o[3],o[2])){let m=o[2].slice(1,-1);m&&(i=m)}let u,s,d=n;if(n.includes("::")){let m=n.indexOf("::");if(u=n.substring(0,m).trim(),d=n.substring(m+2).trim(),!u)throw new Error(`Invalid namespace in pattern: ${t}`)}let p=null;if(d.includes(":")){let m=d.lastIndexOf(":"),O=d.substring(0,m).trim(),j=d.substring(m+1).trim();["first","last","odd","even"].includes(j)||/^nth\(\d+\)$/.test(j)?(s=O,p=j):s=d}else s=d;if(!s)throw new Error(`Invalid segment pattern: ${t}`);if(e.tag=s,u&&(e.namespace=u),i)if(i.includes("=")){let m=i.indexOf("=");e.attrName=i.substring(0,m).trim(),e.attrValue=i.substring(m+1).trim()}else e.attrName=i.trim();if(p){let m=p.match(/^nth\((\d+)\)$/);m?(e.position="nth",e.positionValue=parseInt(m[1],10)):e.position=p}return e}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class qt{constructor(){this._byDepthAndTag=new Map,this._wildcardByDepth=new Map,this._deepWildcards=[],this._patterns=new Set,this._sealed=!1}add(t){if(this._sealed)throw new TypeError("ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.");if(this._patterns.has(t.pattern))return this;if(this._patterns.add(t.pattern),t.hasDeepWildcard())return this._deepWildcards.push(t),this;let e=t.length,i=t.segments[t.segments.length-1],n=i?.tag;if(n&&n!=="*"){let o=`${e}:${n}`;this._byDepthAndTag.has(o)||this._byDepthAndTag.set(o,[]),this._byDepthAndTag.get(o).push(t)}else this._wildcardByDepth.has(e)||this._wildcardByDepth.set(e,[]),this._wildcardByDepth.get(e).push(t);return this}addAll(t){for(let e of t)this.add(e);return this}has(t){return this._patterns.has(t.pattern)}get size(){return this._patterns.size}seal(){return this._sealed=!0,this}get isSealed(){return this._sealed}matchesAny(t){return this.findMatch(t)!==null}findMatch(t){let e=t.getDepth(),i=`${e}:${t.getCurrentTag()}`,n=this._byDepthAndTag.get(i);if(n){for(let u=0;u<n.length;u++)if(t.matches(n[u]))return n[u]}let o=this._wildcardByDepth.get(e);if(o){for(let u=0;u<o.length;u++)if(t.matches(o[u]))return o[u]}for(let u=0;u<this._deepWildcards.length;u++)if(t.matches(this._deepWildcards[u]))return this._deepWildcards[u];return null}}let Yt={cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",euro:"\u20AC",dollar:"$",euro:"\u20AC",fnof:"\u0192",inr:"\u20B9",af:"\u060B",birr:"\u1265\u122D",peso:"\u20B1",rub:"\u20BD",won:"\u20A9",yuan:"\xA5",cedil:"\xB8"},Ct={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},Kt={nbsp:"\xA0",copy:"\xA9",reg:"\xAE",trade:"\u2122",mdash:"\u2014",ndash:"\u2013",hellip:"\u2026",laquo:"\xAB",raquo:"\xBB",lsquo:"\u2018",rsquo:"\u2019",ldquo:"\u201C",rdquo:"\u201D",bull:"\u2022",para:"\xB6",sect:"\xA7",deg:"\xB0",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE"},zt=new Set("!?\\\\/[]$%{}^&*()<>|+");function jt(r){if(r[0]==="#")throw new Error(`[EntityReplacer] Invalid character '#' in entity name: "${r}"`);for(let t of r)if(zt.has(t))throw new Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${r}"`);return r}function xt(...r){let t=Object.create(null);for(let e of r)if(e)for(let i of Object.keys(e)){let n=e[i];if(typeof n=="string")t[i]=n;else if(n&&typeof n=="object"&&n.val!==void 0){let o=n.val;typeof o=="string"&&(t[i]=o)}}return t}let dt="external",bt="base",wt="all",at=Object.freeze({allow:0,leave:1,remove:2,throw:3}),Jt=new Set([9,10,13]);class Zt{constructor(t={}){var e;this._limit=t.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck=typeof t.postCheck=="function"?t.postCheck:n=>n,this._limitTiers=(e=this._limit.applyLimitsTo??dt)&&e!==dt?e===wt?new Set([wt]):e===bt?new Set([bt]):Array.isArray(e)?new Set(e):new Set([dt]):new Set([dt]),this._numericAllowed=t.numericAllowed??!0,this._baseMap=xt(Ct,t.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(t.remove&&Array.isArray(t.remove)?t.remove:[]),this._leaveSet=new Set(t.leave&&Array.isArray(t.leave)?t.leave:[]);let i=(function(n){if(!n)return{xmlVersion:1,onLevel:at.allow,nullLevel:at.remove};let o=n.xmlVersion===1.1?1.1:1,u=at[n.onNCR]??at.allow,s=at[n.nullNCR]??at.remove;return{xmlVersion:o,onLevel:u,nullLevel:Math.max(s,at.remove)}})(t.ncr);this._ncrXmlVersion=i.xmlVersion,this._ncrOnLevel=i.onLevel,this._ncrNullLevel=i.nullLevel}setExternalEntities(t){if(t)for(let e of Object.keys(t))jt(e);this._externalMap=xt(t)}addExternalEntity(t,e){jt(t),typeof e=="string"&&e.indexOf("&")===-1&&(this._externalMap[t]=e)}addInputEntities(t){this._totalExpansions=0,this._expandedLength=0,this._inputMap=xt(t)}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(t){this._ncrXmlVersion=t===1.1?1.1:1}decode(t){if(typeof t!="string"||t.length===0)return t;let e=t,i=[],n=t.length,o=0,u=0,s=this._maxTotalExpansions>0,d=this._maxExpandedLength>0,p=s||d;for(;u<n;){if(t.charCodeAt(u)!==38){u++;continue}let O=u+1;for(;O<n&&t.charCodeAt(O)!==59&&O-u<=32;)O++;if(O>=n||t.charCodeAt(O)!==59){u++;continue}let j=t.slice(u+1,O);if(j.length===0){u++;continue}let L,k;if(this._removeSet.has(j))L="",k===void 0&&(k=dt);else{if(this._leaveSet.has(j)){u++;continue}if(j.charCodeAt(0)===35){let V=this._resolveNCR(j);if(V===void 0){u++;continue}L=V,k=bt}else{let V=this._resolveName(j);L=V?.value,k=V?.tier}}if(L!==void 0){if(u>o&&i.push(t.slice(o,u)),i.push(L),o=O+1,u=o,p&&this._tierCounts(k)){if(s&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw new Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(d){let V=L.length-(j.length+2);if(V>0&&(this._expandedLength+=V,this._expandedLength>this._maxExpandedLength))throw new Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}else u++}o<n&&i.push(t.slice(o));let m=i.length===0?t:i.join("");return this._postCheck(m,e)}_tierCounts(t){return!!this._limitTiers.has(wt)||this._limitTiers.has(t)}_resolveName(t){return t in this._inputMap?{value:this._inputMap[t],tier:dt}:t in this._externalMap?{value:this._externalMap[t],tier:dt}:t in this._baseMap?{value:this._baseMap[t],tier:bt}:void 0}_classifyNCR(t){return t===0?this._ncrNullLevel:t>=55296&&t<=57343||this._ncrXmlVersion===1&&t>=1&&t<=31&&!Jt.has(t)?at.remove:-1}_applyNCRAction(t,e,i){switch(t){case at.allow:return String.fromCodePoint(i);case at.remove:return"";case at.leave:return;case at.throw:throw new Error(`[EntityDecoder] Prohibited numeric character reference &${e}; (U+${i.toString(16).toUpperCase().padStart(4,"0")})`);default:return String.fromCodePoint(i)}}_resolveNCR(t){let e=t.charCodeAt(1),i;if(i=e===120||e===88?parseInt(t.slice(2),16):parseInt(t.slice(1),10),Number.isNaN(i)||i<0||i>1114111)return;let n=this._classifyNCR(i);if(!this._numericAllowed&&n<at.remove)return;let o=n===-1?this._ncrOnLevel:Math.max(this._ncrOnLevel,n);return this._applyNCRAction(o,t,i)}}function Ht(r,t){if(!r)return{};let e=t.attributesGroupName?r[t.attributesGroupName]:r;if(!e)return{};let i={};for(let n in e)n.startsWith(t.attributeNamePrefix)?i[n.substring(t.attributeNamePrefix.length)]=e[n]:i[n]=e[n];return i}function Qt(r){if(!r||typeof r!="string")return;let t=r.indexOf(":");if(t!==-1&&t>0){let e=r.substring(0,t);if(e!=="xmlns")return e}}class te{constructor(t){var e;this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.parseXml=oe,this.parseTextData=ee,this.resolveNameSpace=re,this.buildAttributesMap=ie,this.isItStopNode=ue,this.replaceEntitiesValue=ae,this.readStopNodeData=ce,this.saveTextToParentTag=le,this.addChild=se,this.ignoreAttributesFn=typeof(e=this.options.ignoreAttributes)=="function"?e:Array.isArray(e)?o=>{for(let u of e)if(typeof u=="string"&&o===u||u instanceof RegExp&&u.test(o))return!0}:()=>!1,this.entityExpansionCount=0,this.currentExpandedLength=0;let i={...Ct};this.options.entityDecoder?this.entityDecoder=this.options.entityDecoder:(typeof this.options.htmlEntities=="object"?i=this.options.htmlEntities:this.options.htmlEntities===!0&&(i={...Kt,...Yt}),this.entityDecoder=new Zt({namedEntities:i,numericAllowed:this.options.htmlEntities,limit:{maxTotalExpansions:this.options.processEntities.maxTotalExpansions,maxExpandedLength:this.options.processEntities.maxExpandedLength,applyLimitsTo:this.options.processEntities.appliesTo}})),this.matcher=new vt,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.stopNodeExpressionsSet=new qt;let n=this.options.stopNodes;if(n&&n.length>0){for(let o=0;o<n.length;o++){let u=n[o];typeof u=="string"?this.stopNodeExpressionsSet.add(new gt(u)):u instanceof gt&&this.stopNodeExpressionsSet.add(u)}this.stopNodeExpressionsSet.seal()}}}function ee(r,t,e,i,n,o,u){let s=this.options;if(r!==void 0&&(s.trimValues&&!i&&(r=r.trim()),r.length>0)){u||(r=this.replaceEntitiesValue(r,t,e));let d=s.jPath?e.toString():e,p=s.tagValueProcessor(t,r,d,n,o);return p==null?r:typeof p!=typeof r||p!==r?p:s.trimValues||r.trim()===r?Mt(r,s.parseTagValue,s.numberParseOptions):r}}function re(r){if(this.options.removeNSPrefix){let t=r.split(":"),e=r.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(r=e+t[1])}return r}let ne=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function ie(r,t,e,i=!1){let n=this.options;if(i===!0||n.ignoreAttributes!==!0&&typeof r=="string"){let o=w(r,ne),u=o.length,s={},d=new Array(u),p=!1,m={};for(let L=0;L<u;L++){let k=this.resolveNameSpace(o[L][1]),V=o[L][4];if(k.length&&V!==void 0){let rt=V;n.trimValues&&(rt=rt.trim()),rt=this.replaceEntitiesValue(rt,e,this.readonlyMatcher),d[L]=rt,m[k]=rt,p=!0}}p&&typeof t=="object"&&t.updateCurrent&&t.updateCurrent(m);let O=n.jPath?t.toString():this.readonlyMatcher,j=!1;for(let L=0;L<u;L++){let k=this.resolveNameSpace(o[L][1]);if(this.ignoreAttributesFn(k,O))continue;let V=n.attributeNamePrefix+k;if(k.length)if(n.transformAttributeName&&(V=n.transformAttributeName(V)),V=It(V,n),o[L][4]!==void 0){let rt=d[L],it=n.attributeValueProcessor(k,rt,O);s[V]=it==null?rt:typeof it!=typeof rt||it!==rt?it:Mt(rt,n.parseAttributeValue,n.numberParseOptions),j=!0}else n.allowBooleanAttributes&&(s[V]=!0,j=!0)}if(!j)return;if(n.attributesGroupName){let L={};return L[n.attributesGroupName]=s,L}return s}}let oe=function(r){r=r.replace(/\r\n?/g,`
10
- `);let t=new H("!xml"),e=t,i="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let n=this.options,o=new z(n.processEntities),u=r.length;for(let s=0;s<u;s++)if(r[s]==="<"){let d=r.charCodeAt(s+1);if(d===47){let p=mt(r,">",s,"Closing Tag is not closed."),m=r.substring(s+2,p).trim();if(n.removeNSPrefix){let j=m.indexOf(":");j!==-1&&(m=m.substr(j+1))}m=Ot(n.transformTagName,m,"",n).tagName,e&&(i=this.saveTextToParentTag(i,e,this.readonlyMatcher));let O=this.matcher.getCurrentTag();if(m&&n.unpairedTagsSet.has(m))throw new Error(`Unpaired tag can not be used as closing tag: </${m}>`);O&&n.unpairedTagsSet.has(O)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,e=this.tagsNodeStack.pop(),i="",s=p}else if(d===63){let p=Nt(r,s,!1,"?>");if(!p)throw new Error("Pi Tag is not closed.");i=this.saveTextToParentTag(i,e,this.readonlyMatcher);let m=this.buildAttributesMap(p.tagExp,this.matcher,p.tagName,!0);if(m){let O=m[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(O)||1)}if(!(n.ignoreDeclaration&&p.tagName==="?xml"||n.ignorePiTags)){let O=new H(p.tagName);O.add(n.textNodeName,""),p.tagName!==p.tagExp&&p.attrExpPresent&&n.ignoreAttributes!==!0&&(O[":@"]=m),this.addChild(e,O,this.readonlyMatcher,s)}s=p.closeIndex+1}else if(d===33&&r.charCodeAt(s+2)===45&&r.charCodeAt(s+3)===45){let p=mt(r,"-->",s+4,"Comment is not closed.");if(n.commentPropName){let m=r.substring(s+4,p-2);i=this.saveTextToParentTag(i,e,this.readonlyMatcher),e.add(n.commentPropName,[{[n.textNodeName]:m}])}s=p}else if(d===33&&r.charCodeAt(s+2)===68){let p=o.readDocType(r,s);this.entityDecoder.addInputEntities(p.entities),s=p.i}else if(d===33&&r.charCodeAt(s+2)===91){let p=mt(r,"]]>",s,"CDATA is not closed.")-2,m=r.substring(s+9,p);i=this.saveTextToParentTag(i,e,this.readonlyMatcher);let O=this.parseTextData(m,e.tagname,this.readonlyMatcher,!0,!1,!0,!0);O==null&&(O=""),n.cdataPropName?e.add(n.cdataPropName,[{[n.textNodeName]:m}]):e.add(n.textNodeName,O),s=p+2}else{let p=Nt(r,s,n.removeNSPrefix);if(!p){let st=r.substring(Math.max(0,s-50),Math.min(u,s+50));throw new Error(`readTagExp returned undefined at position ${s}. Context: "${st}"`)}let m=p.tagName,O=p.rawTagName,j=p.tagExp,L=p.attrExpPresent,k=p.closeIndex;if({tagName:m,tagExp:j}=Ot(n.transformTagName,m,j,n),n.strictReservedNames&&(m===n.commentPropName||m===n.cdataPropName||m===n.textNodeName||m===n.attributesGroupName))throw new Error(`Invalid tag name: ${m}`);e&&i&&e.tagname!=="!xml"&&(i=this.saveTextToParentTag(i,e,this.readonlyMatcher,!1));let V=e;V&&n.unpairedTagsSet.has(V.tagname)&&(e=this.tagsNodeStack.pop(),this.matcher.pop());let rt=!1;j.length>0&&j.lastIndexOf("/")===j.length-1&&(rt=!0,m[m.length-1]==="/"?(m=m.substr(0,m.length-1),j=m):j=j.substr(0,j.length-1),L=m!==j);let it,ot=null,ft={};it=Qt(O),m!==t.tagname&&this.matcher.push(m,{},it),m!==j&&L&&(ot=this.buildAttributesMap(j,this.matcher,m),ot&&(ft=Ht(ot,n))),m!==t.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let pt=s;if(this.isCurrentNodeStopNode){let st="";if(rt)s=p.closeIndex;else if(n.unpairedTagsSet.has(m))s=p.closeIndex;else{let _t=this.readStopNodeData(r,O,k+1);if(!_t)throw new Error(`Unexpected end of ${O}`);s=_t.i,st=_t.tagContent}let Pt=new H(m);ot&&(Pt[":@"]=ot),Pt.add(n.textNodeName,st),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(e,Pt,this.readonlyMatcher,pt)}else{if(rt){({tagName:m,tagExp:j}=Ot(n.transformTagName,m,j,n));let st=new H(m);ot&&(st[":@"]=ot),this.addChild(e,st,this.readonlyMatcher,pt),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(n.unpairedTagsSet.has(m)){let st=new H(m);ot&&(st[":@"]=ot),this.addChild(e,st,this.readonlyMatcher,pt),this.matcher.pop(),this.isCurrentNodeStopNode=!1,s=p.closeIndex;continue}{let st=new H(m);if(this.tagsNodeStack.length>n.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(e),ot&&(st[":@"]=ot),this.addChild(e,st,this.readonlyMatcher,pt),e=st}}i="",s=k}}}else i+=r[s];return t.child};function se(r,t,e,i){this.options.captureMetaData||(i=void 0);let n=this.options.jPath?e.toString():e,o=this.options.updateTag(t.tagname,n,t[":@"]);o===!1||(typeof o=="string"&&(t.tagname=o),r.addChild(t,i))}function ae(r,t,e){let i=this.options.processEntities;if(!i||!i.enabled)return r;if(i.allowedTags){let n=this.options.jPath?e.toString():e;if(!(Array.isArray(i.allowedTags)?i.allowedTags.includes(t):i.allowedTags(t,n)))return r}if(i.tagFilter){let n=this.options.jPath?e.toString():e;if(!i.tagFilter(t,n))return r}return this.entityDecoder.decode(r)}function le(r,t,e,i){return r&&(i===void 0&&(i=t.child.length===0),(r=this.parseTextData(r,t.tagname,e,!1,!!t[":@"]&&Object.keys(t[":@"]).length!==0,i))!==void 0&&r!==""&&t.add(this.options.textNodeName,r),r=""),r}function ue(){return this.stopNodeExpressionsSet.size!==0&&this.matcher.matchesAny(this.stopNodeExpressionsSet)}function mt(r,t,e,i){let n=r.indexOf(t,e);if(n===-1)throw new Error(i);return n+t.length-1}function pe(r,t,e,i){let n=r.indexOf(t,e);if(n===-1)throw new Error(i);return n}function Nt(r,t,e,i=">"){let n=(function(O,j,L=">"){let k=0,V=[],rt=O.length,it=L.charCodeAt(0),ot=L.length>1?L.charCodeAt(1):-1;for(let ft=j;ft<rt;ft++){let pt=O.charCodeAt(ft);if(k)pt===k&&(k=0);else if(pt===34||pt===39)k=pt;else if(pt===it){if(ot===-1)return{data:String.fromCharCode(...V),index:ft};if(O.charCodeAt(ft+1)===ot)return{data:String.fromCharCode(...V),index:ft}}else if(pt===9){V.push(32);continue}V.push(pt)}})(r,t+1,i);if(!n)return;let o=n.data,u=n.index,s=o.search(/\s/),d=o,p=!0;s!==-1&&(d=o.substring(0,s),o=o.substring(s+1).trimStart());let m=d;if(e){let O=d.indexOf(":");O!==-1&&(d=d.substr(O+1),p=d!==n.data.substr(O+1))}return{tagName:d,tagExp:o,closeIndex:u,attrExpPresent:p,rawTagName:m}}function ce(r,t,e){let i=e,n=1,o=r.length;for(;e<o;e++)if(r[e]==="<"){let u=r.charCodeAt(e+1);if(u===47){let s=pe(r,">",e,`${t} is not closed`);if(r.substring(e+2,s).trim()===t&&(n--,n===0))return{tagContent:r.substring(i,e),i:s};e=s}else if(u===63)e=mt(r,"?>",e+1,"StopNode is not closed.");else if(u===33&&r.charCodeAt(e+2)===45&&r.charCodeAt(e+3)===45)e=mt(r,"-->",e+3,"StopNode is not closed.");else if(u===33&&r.charCodeAt(e+2)===91)e=mt(r,"]]>",e,"StopNode is not closed.")-2;else{let s=Nt(r,e,">");s&&((s&&s.tagName)===t&&s.tagExp[s.tagExp.length-1]!=="/"&&n++,e=s.closeIndex)}}}function Mt(r,t,e){if(t&&typeof r=="string"){let i=r.trim();return i==="true"||i!=="false"&&(function(n,o={}){if(o=Object.assign({},Gt,o),!n||typeof n!="string")return n;let u=n.trim();if(u.length===0||o.skipLike!==void 0&&o.skipLike.test(u))return n;if(u==="0")return 0;if(o.hex&&ht.test(u))return(function(d){if(parseInt)return parseInt(d,16);if(Number.parseInt)return Number.parseInt(d,16);if(window&&window.parseInt)return window.parseInt(d,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")})(u);if(isFinite(u)){if(u.includes("e")||u.includes("E"))return(function(d,p,m){if(!m.eNotation)return d;let O=p.match(Wt);if(O){let j=O[1]||"",L=O[3].indexOf("e")===-1?"E":"e",k=O[2],V=j?d[k.length+1]===L:d[k.length]===L;return k.length>1&&V?d:(k.length!==1||!O[3].startsWith(`.${L}`)&&O[3][0]!==L)&&k.length>0?m.leadingZeros&&!V?(p=(O[1]||"")+O[3],Number(p)):d:Number(p)}return d})(n,u,o);{let d=ct.exec(u);if(d){let p=d[1]||"",m=d[2],O=((s=d[3])&&s.indexOf(".")!==-1&&((s=s.replace(/0+$/,""))==="."?s="0":s[0]==="."?s="0"+s:s[s.length-1]==="."&&(s=s.substring(0,s.length-1))),s),j=p?n[m.length+1]===".":n[m.length]===".";if(!o.leadingZeros&&(m.length>1||m.length===1&&!j))return n;{let L=Number(u),k=String(L);if(L===0)return L;if(k.search(/[eE]/)!==-1)return o.eNotation?L:n;if(u.indexOf(".")!==-1)return k==="0"||k===O||k===`${p}${O}`?L:n;let V=m?O:u;return m?V===k||p+V===k?L:n:V===k||V===p+k?L:n}}return n}}var s;return(function(d,p,m){let O=p===1/0;switch(m.infinity.toLowerCase()){case"null":return null;case"infinity":return p;case"string":return O?"Infinity":"-Infinity";default:return d}})(n,Number(u),o)})(r,e)}return r!==void 0?r:""}function Ot(r,t,e,i){if(r){let n=r(t);e===t&&(e=n),t=n}return{tagName:t=It(t,i),tagExp:e}}function It(r,t){if($.includes(r))throw new Error(`[SECURITY] Invalid name: "${r}" is a reserved JavaScript keyword that could cause prototype pollution`);return C.includes(r)?t.onDangerousProperty(r):r}let Et=H.getMetaDataSymbol();function fe(r,t){if(!r||typeof r!="object")return{};if(!t)return r;let e={};for(let i in r)i.startsWith(t)?e[i.substring(t.length)]=r[i]:e[i]=r[i];return e}function he(r,t,e,i){return Dt(r,t,e,i)}function Dt(r,t,e,i){let n,o={};for(let u=0;u<r.length;u++){let s=r[u],d=de(s);if(d!==void 0&&d!==t.textNodeName){let p=fe(s[":@"]||{},t.attributeNamePrefix);e.push(d,p)}if(d===t.textNodeName)n===void 0?n=s[d]:n+=""+s[d];else{if(d===void 0)continue;if(s[d]){let p=Dt(s[d],t,e,i),m=me(p,t);if(s[":@"]?ge(p,s[":@"],i,t):Object.keys(p).length!==1||p[t.textNodeName]===void 0||t.alwaysCreateTextNode?Object.keys(p).length===0&&(t.alwaysCreateTextNode?p[t.textNodeName]="":p=""):p=p[t.textNodeName],s[Et]!==void 0&&typeof p=="object"&&p!==null&&(p[Et]=s[Et]),o[d]!==void 0&&Object.prototype.hasOwnProperty.call(o,d))Array.isArray(o[d])||(o[d]=[o[d]]),o[d].push(p);else{let O=t.jPath?i.toString():i;t.isArray(d,O,m)?o[d]=[p]:o[d]=p}d!==void 0&&d!==t.textNodeName&&e.pop()}}}return typeof n=="string"?n.length>0&&(o[t.textNodeName]=n):n!==void 0&&(o[t.textNodeName]=n),o}function de(r){let t=Object.keys(r);for(let e=0;e<t.length;e++){let i=t[e];if(i!==":@")return i}}function ge(r,t,e,i){if(t){let n=Object.keys(t),o=n.length;for(let u=0;u<o;u++){let s=n[u],d=s.startsWith(i.attributeNamePrefix)?s.substring(i.attributeNamePrefix.length):s,p=i.jPath?e.toString()+"."+d:e;i.isArray(s,p,!0,!0)?r[s]=[t[s]]:r[s]=t[s]}}}function me(r,t){let{textNodeName:e}=t,i=Object.keys(r).length;return i===0||!(i!==1||!r[e]&&typeof r[e]!="boolean"&&r[e]!==0)}class ye{constructor(t){this.externalEntities={},this.options=B(t)}parse(t,e){if(typeof t!="string"&&t.toString)t=t.toString();else if(typeof t!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(e){e===!0&&(e={});let o=c(t,e);if(o!==!0)throw Error(`${o.err.msg}:${o.err.line}:${o.err.col}`)}let i=new te(this.options);i.entityDecoder.setExternalEntities(this.externalEntities);let n=i.parseXml(t);return this.options.preserveOrder||n===void 0?n:he(n,this.options,i.matcher,i.readonlyMatcher)}addEntity(t,e){if(e.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(t.indexOf("&")!==-1||t.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(e==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}static getMetaDataSymbol(){return H.getMetaDataSymbol()}}function be(r,t){let e="";t.format&&t.indentBy.length>0&&(e=`
11
- `);let i=[];if(t.stopNodes&&Array.isArray(t.stopNodes))for(let n=0;n<t.stopNodes.length;n++){let o=t.stopNodes[n];typeof o=="string"?i.push(new gt(o)):o instanceof gt&&i.push(o)}return $t(r,t,e,new vt,i)}function $t(r,t,e,i,n){let o="",u=!1;if(t.maxNestedTags&&i.getDepth()>t.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(r)){if(r!=null){let s=r.toString();return s=St(s,t),s}return""}for(let s=0;s<r.length;s++){let d=r[s],p=kt(d);if(p===void 0)continue;let m=ve(d[":@"],t);i.push(p,m);let O=we(i,n);if(p===t.textNodeName){let V=d[p];O||(V=t.tagValueProcessor(p,V),V=St(V,t)),u&&(o+=e),o+=V,u=!1,i.pop();continue}if(p===t.cdataPropName){u&&(o+=e);let V=d[p][0][t.textNodeName];o+=`<![CDATA[${String(V).replace(/\]\]>/g,"]]]]><![CDATA[>")}]]>`,u=!1,i.pop();continue}if(p===t.commentPropName){let V=d[p][0][t.textNodeName];o+=e+`<!--${String(V).replace(/--/g,"- -").replace(/-$/,"- ")}-->`,u=!0,i.pop();continue}if(p[0]==="?"){let V=Rt(d[":@"],t,O),rt=p==="?xml"?"":e,it=d[p][0][t.textNodeName];it=it.length!==0?" "+it:"",o+=rt+`<${p}${it}${V}?>`,u=!0,i.pop();continue}let j=e;j!==""&&(j+=t.indentBy);let L=e+`<${p}${Rt(d[":@"],t,O)}`,k;k=O?Lt(d[p],t):$t(d[p],t,j,i,n),t.unpairedTags.indexOf(p)!==-1?t.suppressUnpairedNode?o+=L+">":o+=L+"/>":k&&k.length!==0||!t.suppressEmptyNode?k&&k.endsWith(">")?o+=L+`>${k}${e}</${p}>`:(o+=L+">",k&&e!==""&&(k.includes("/>")||k.includes("</"))?o+=e+t.indentBy+k+e:o+=k,o+=`</${p}>`):o+=L+"/>",u=!0,i.pop()}return o}function ve(r,t){if(!r||t.ignoreAttributes)return null;let e={},i=!1;for(let n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n.startsWith(t.attributeNamePrefix)?n.substr(t.attributeNamePrefix.length):n]=r[n],i=!0);return i?e:null}function Lt(r,t){if(!Array.isArray(r))return r!=null?r.toString():"";let e="";for(let i=0;i<r.length;i++){let n=r[i],o=kt(n);if(o===t.textNodeName)e+=n[o];else if(o===t.cdataPropName)e+=n[o][0][t.textNodeName];else if(o===t.commentPropName)e+=n[o][0][t.textNodeName];else{if(o&&o[0]==="?")continue;if(o){let u=xe(n[":@"],t),s=Lt(n[o],t);s&&s.length!==0?e+=`<${o}${u}>${s}</${o}>`:e+=`<${o}${u}/>`}}}return e}function xe(r,t){let e="";if(r&&!t.ignoreAttributes)for(let i in r){if(!Object.prototype.hasOwnProperty.call(r,i))continue;let n=r[i];n===!0&&t.suppressBooleanAttributes?e+=` ${i.substr(t.attributeNamePrefix.length)}`:e+=` ${i.substr(t.attributeNamePrefix.length)}="${n}"`}return e}function kt(r){let t=Object.keys(r);for(let e=0;e<t.length;e++){let i=t[e];if(Object.prototype.hasOwnProperty.call(r,i)&&i!==":@")return i}}function Rt(r,t,e){let i="";if(r&&!t.ignoreAttributes)for(let n in r){if(!Object.prototype.hasOwnProperty.call(r,n))continue;let o;e?o=r[n]:(o=t.attributeValueProcessor(n,r[n]),o=St(o,t)),o===!0&&t.suppressBooleanAttributes?i+=` ${n.substr(t.attributeNamePrefix.length)}`:i+=` ${n.substr(t.attributeNamePrefix.length)}="${o}"`}return i}function we(r,t){if(!t||t.length===0)return!1;for(let e=0;e<t.length;e++)if(r.matches(t[e]))return!0;return!1}function St(r,t){if(r&&r.length>0&&t.processEntities)for(let e=0;e<t.entities.length;e++){let i=t.entities[e];r=r.replace(i.regex,i.val)}return r}let Ne={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(r,t){return t},attributeValueProcessor:function(r,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0};function ut(r){if(this.options=Object.assign({},Ne,r),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>typeof e=="string"&&e.startsWith("*.")?".."+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let e=0;e<this.options.stopNodes.length;e++){let i=this.options.stopNodes[e];typeof i=="string"?this.stopNodeExpressions.push(new gt(i)):i instanceof gt&&this.stopNodeExpressions.push(i)}var t;this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=typeof(t=this.options.ignoreAttributes)=="function"?t:Array.isArray(t)?e=>{for(let i of t)if(typeof i=="string"&&e===i||i instanceof RegExp&&i.test(e))return!0}:()=>!1,this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Se),this.processTextOrObjNode=Oe,this.options.format?(this.indentate=Ee,this.tagEndChar=`>
7
+ import{a as yt,c as At}from"./RFWIIJFG.js";var Ft=At((Ie,Vt)=>{var Ae=Object.prototype.hasOwnProperty,Te=Object.prototype.toString;Vt.exports=function(D,tt,T){if(Te.call(tt)!=="[object Function]")throw new TypeError("iterator must be a function");var R=D.length;if(R===+R)for(var w=0;w<R;w++)tt.call(T,D[w],w,D);else for(var M in D)Ae.call(D,M)&&tt.call(T,D[M],M,D)}});var je=At((De,Ut)=>{"use strict";var Ce=Ft();Ut.exports=Q;function Q(et,D,tt){if(arguments.length===3)return Q.set(et,D,tt);if(arguments.length===2)return Q.get(et,D);var T=Q.bind(Q,et);for(var R in Q)Q.hasOwnProperty(R)&&(T[R]=Q[R].bind(T,et));return T}Q.get=function(D,tt){for(var T=Array.isArray(tt)?tt:Q.parse(tt),R=0;R<T.length;++R){var w=T[R];if(!(typeof D=="object"&&w in D))throw new Error("Invalid reference token: "+w);D=D[w]}return D};Q.set=function(D,tt,T){var R=Array.isArray(tt)?tt:Q.parse(tt),w=R[0];if(R.length===0)throw Error("Can not set the root object");for(var M=0;M<R.length-1;++M){var h=R[M];typeof h!="string"&&typeof h!="number"&&(h=String(h)),!(h==="__proto__"||h==="constructor"||h==="prototype")&&(h==="-"&&Array.isArray(D)&&(h=D.length),w=R[M+1],h in D||(w.match(/^(\d+|-)$/)?D[h]=[]:D[h]={}),D=D[h])}return w==="-"&&Array.isArray(D)&&(w=D.length),D[w]=T,this};Q.remove=function(et,D){var tt=Array.isArray(D)?D:Q.parse(D),T=tt[tt.length-1];if(T===void 0)throw new Error('Invalid JSON pointer for remove: "'+D+'"');var R=Q.get(et,tt.slice(0,-1));if(Array.isArray(R)){var w=+T;if(T===""&&isNaN(w))throw new Error('Invalid array index: "'+T+'"');Array.prototype.splice.call(R,w,1)}else delete R[T]};Q.dict=function(D,tt){var T={};return Q.walk(D,function(R,w){T[w]=R},tt),T};Q.walk=function(D,tt,T){var R=[];T=T||function(w){var M=Object.prototype.toString.call(w);return M==="[object Object]"||M==="[object Array]"},(function w(M){Ce(M,function(h,_){R.push(String(_)),T(h)?w(h):tt(h,Q.compile(R)),R.pop()})})(D)};Q.has=function(D,tt){try{Q.get(D,tt)}catch{return!1}return!0};Q.escape=function(D){return D.toString().replace(/~/g,"~0").replace(/\//g,"~1")};Q.unescape=function(D){return D.replace(/~1/g,"/").replace(/~0/g,"~")};Q.parse=function(D){if(D==="")return[];if(D.charAt(0)!=="/")throw new Error("Invalid JSON pointer: "+D);return D.substring(1).split(/\//).map(Q.unescape)};Q.compile=function(D){return D.length===0?"":"/"+D.map(Q.escape).join("/")}});var Me=At((Bt,Tt)=>{(function(et){if(typeof Bt=="object"&&typeof Tt<"u")Tt.exports=et();else if(typeof define=="function"&&define.amd)define([],et);else{var D;typeof window<"u"?D=window:typeof global<"u"?D=global:typeof self<"u"?D=self:D=this,D.OpenAPISampler=et()}})(function(){var et,D,tt;return(function(){function T(R,w,M){function h(N,I){if(!w[N]){if(!R[N]){var C=typeof yt=="function"&&yt;if(!I&&C)return C(N,!0);if(_)return _(N,!0);var $=new Error("Cannot find module '"+N+"'");throw $.code="MODULE_NOT_FOUND",$}var l=w[N]={exports:{}};R[N][0].call(l.exports,function(c){var v=R[N][1][c];return h(v||c)},l,l.exports,T,R,w,M)}return w[N].exports}for(var _=typeof yt=="function"&&yt,y=0;y<M.length;y++)h(M[y]);return h}return T})()({1:[function(T,R,w){(()=>{"use strict";var M={d:(r,t)=>{for(var e in t)M.o(t,e)&&!M.o(r,e)&&Object.defineProperty(r,e,{enumerable:!0,get:t[e]})},o:(r,t)=>Object.prototype.hasOwnProperty.call(r,t),r:r=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})}},h={};M.r(h),M.d(h,{XMLBuilder:()=>Pe,XMLParser:()=>ye,XMLValidator:()=>_e});let _=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",y=new RegExp("^["+_+"]["+_+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function N(r,t){let e=[],i=t.exec(r);for(;i;){let n=[];n.startIndex=t.lastIndex-i[0].length;let o=i.length;for(let u=0;u<o;u++)n.push(i[u]);e.push(n),i=t.exec(r)}return e}let I=function(r){return y.exec(r)!=null},C=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],$=["__proto__","constructor","prototype"],l={allowBooleanAttributes:!1,unpairedTags:[]};function c(r,t){t=Object.assign({},l,t);let e=[],i=!1,n=!1;r[0]==="\uFEFF"&&(r=r.substr(1));for(let o=0;o<r.length;o++)if(r[o]==="<"&&r[o+1]==="?"){if(o+=2,o=P(r,o),o.err)return o}else{if(r[o]!=="<"){if(v(r[o]))continue;return m("InvalidChar","char '"+r[o]+"' is not expected.",b(r,o))}{let u=o;if(o++,r[o]==="!"){o=E(r,o);continue}{let s=!1;r[o]==="/"&&(s=!0,o++);let d="";for(;o<r.length&&r[o]!==">"&&r[o]!==" "&&r[o]!==" "&&r[o]!==`
8
+ `&&r[o]!=="\r";o++)d+=r[o];if(d=d.trim(),d[d.length-1]==="/"&&(d=d.substring(0,d.length-1),o--),!x(d)){let O;return O=d.trim().length===0?"Invalid space after '<'.":"Tag '"+d+"' is an invalid name.",m("InvalidTag",O,b(r,o))}let p=W(r,o);if(p===!1)return m("InvalidAttr","Attributes for '"+d+"' have open quote.",b(r,o));let g=p.value;if(o=p.index,g[g.length-1]==="/"){let O=o-g.length;g=g.substring(0,g.length-1);let j=Y(g,t);if(j!==!0)return m(j.err.code,j.err.msg,b(r,O+j.err.line));i=!0}else if(s){if(!p.tagClosed)return m("InvalidTag","Closing tag '"+d+"' doesn't have proper closing.",b(r,o));if(g.trim().length>0)return m("InvalidTag","Closing tag '"+d+"' can't have attributes or invalid starting.",b(r,u));if(e.length===0)return m("InvalidTag","Closing tag '"+d+"' has not been opened.",b(r,u));{let O=e.pop();if(d!==O.tagName){let j=b(r,O.tagStartPos);return m("InvalidTag","Expected closing tag '"+O.tagName+"' (opened in line "+j.line+", col "+j.col+") instead of closing tag '"+d+"'.",b(r,u))}e.length==0&&(n=!0)}}else{let O=Y(g,t);if(O!==!0)return m(O.err.code,O.err.msg,b(r,o-g.length+O.err.line));if(n===!0)return m("InvalidXml","Multiple possible root nodes found.",b(r,o));t.unpairedTags.indexOf(d)!==-1||e.push({tagName:d,tagStartPos:u}),i=!0}for(o++;o<r.length;o++)if(r[o]==="<"){if(r[o+1]==="!"){o++,o=E(r,o);continue}if(r[o+1]!=="?")break;if(o=P(r,++o),o.err)return o}else if(r[o]==="&"){let O=f(r,o);if(O==-1)return m("InvalidChar","char '&' is not expected.",b(r,o));o=O}else if(n===!0&&!v(r[o]))return m("InvalidXml","Extra text at the end",b(r,o));r[o]==="<"&&o--}}}return i?e.length==1?m("InvalidTag","Unclosed tag '"+e[0].tagName+"'.",b(r,e[0].tagStartPos)):!(e.length>0)||m("InvalidXml","Invalid '"+JSON.stringify(e.map(o=>o.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):m("InvalidXml","Start tag expected.",1)}function v(r){return r===" "||r===" "||r===`
9
+ `||r==="\r"}function P(r,t){let e=t;for(;t<r.length;t++)if(r[t]=="?"||r[t]==" "){let i=r.substr(e,t-e);if(t>5&&i==="xml")return m("InvalidXml","XML declaration allowed only at the start of the document.",b(r,t));if(r[t]=="?"&&r[t+1]==">"){t++;break}continue}return t}function E(r,t){if(r.length>t+5&&r[t+1]==="-"&&r[t+2]==="-"){for(t+=3;t<r.length;t++)if(r[t]==="-"&&r[t+1]==="-"&&r[t+2]===">"){t+=2;break}}else if(r.length>t+8&&r[t+1]==="D"&&r[t+2]==="O"&&r[t+3]==="C"&&r[t+4]==="T"&&r[t+5]==="Y"&&r[t+6]==="P"&&r[t+7]==="E"){let e=1;for(t+=8;t<r.length;t++)if(r[t]==="<")e++;else if(r[t]===">"&&(e--,e===0))break}else if(r.length>t+9&&r[t+1]==="["&&r[t+2]==="C"&&r[t+3]==="D"&&r[t+4]==="A"&&r[t+5]==="T"&&r[t+6]==="A"&&r[t+7]==="["){for(t+=8;t<r.length;t++)if(r[t]==="]"&&r[t+1]==="]"&&r[t+2]===">"){t+=2;break}}return t}let F='"',q="'";function W(r,t){let e="",i="",n=!1;for(;t<r.length;t++){if(r[t]===F||r[t]===q)i===""?i=r[t]:i!==r[t]||(i="");else if(r[t]===">"&&i===""){n=!0;break}e+=r[t]}return i===""&&{value:e,index:t,tagClosed:n}}let U=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Y(r,t){let e=N(r,U),i={};for(let n=0;n<e.length;n++){if(e[n][1].length===0)return m("InvalidAttr","Attribute '"+e[n][2]+"' has no space in starting.",A(e[n]));if(e[n][3]!==void 0&&e[n][4]===void 0)return m("InvalidAttr","Attribute '"+e[n][2]+"' is without value.",A(e[n]));if(e[n][3]===void 0&&!t.allowBooleanAttributes)return m("InvalidAttr","boolean attribute '"+e[n][2]+"' is not allowed.",A(e[n]));let o=e[n][2];if(!a(o))return m("InvalidAttr","Attribute '"+o+"' is an invalid name.",A(e[n]));if(Object.prototype.hasOwnProperty.call(i,o))return m("InvalidAttr","Attribute '"+o+"' is repeated.",A(e[n]));i[o]=1}return!0}function f(r,t){if(r[++t]===";")return-1;if(r[t]==="#")return(function(i,n){let o=/\d/;for(i[n]==="x"&&(n++,o=/[\da-fA-F]/);n<i.length;n++){if(i[n]===";")return n;if(!i[n].match(o))break}return-1})(r,++t);let e=0;for(;t<r.length;t++,e++)if(!(r[t].match(/\w/)&&e<20)){if(r[t]===";")break;return-1}return t}function m(r,t,e){return{err:{code:r,msg:t,line:e.line||e,col:e.col}}}function a(r){return I(r)}function x(r){return I(r)}function b(r,t){let e=r.substring(0,t).split(/\r?\n/);return{line:e.length,col:e[e.length-1].length+1}}function A(r){return r.startIndex+r[1].length}let G=r=>C.includes(r)?"__"+r:r,Z={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(r,t){return t},attributeValueProcessor:function(r,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,entityDecoder:null,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(r,t,e){return r},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:G};function J(r,t){if(typeof r!="string")return;let e=r.toLowerCase();if(C.some(i=>e===i.toLowerCase()))throw new Error(`[SECURITY] Invalid ${t}: "${r}" is a reserved JavaScript keyword that could cause prototype pollution`);if($.some(i=>e===i.toLowerCase()))throw new Error(`[SECURITY] Invalid ${t}: "${r}" is a reserved JavaScript keyword that could cause prototype pollution`)}function S(r,t){return typeof r=="boolean"?{enabled:r,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1e3,allowedTags:null,tagFilter:null,appliesTo:"all"}:typeof r=="object"&&r!==null?{enabled:r.enabled!==!1,maxEntitySize:Math.max(1,r.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,r.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,r.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,r.maxExpandedLength??1e5),maxEntityCount:Math.max(1,r.maxEntityCount??1e3),allowedTags:r.allowedTags??null,tagFilter:r.tagFilter??null,appliesTo:r.appliesTo??"all"}:S(!0)}let B=function(r){let t=Object.assign({},Z,r),e=[{value:t.attributeNamePrefix,name:"attributeNamePrefix"},{value:t.attributesGroupName,name:"attributesGroupName"},{value:t.textNodeName,name:"textNodeName"},{value:t.cdataPropName,name:"cdataPropName"},{value:t.commentPropName,name:"commentPropName"}];for(let{value:i,name:n}of e)i&&J(i,n);return t.onDangerousProperty===null&&(t.onDangerousProperty=G),t.processEntities=S(t.processEntities,t.htmlEntities),t.unpairedTagsSet=new Set(t.unpairedTags),t.stopNodes&&Array.isArray(t.stopNodes)&&(t.stopNodes=t.stopNodes.map(i=>typeof i=="string"&&i.startsWith("*.")?".."+i.substring(2):i)),t},X;X=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class H{constructor(t){this.tagname=t,this.child=[],this[":@"]=Object.create(null)}add(t,e){t==="__proto__"&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t,e){t.tagname==="__proto__"&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),e!==void 0&&(this.child[this.child.length-1][X]={startIndex:e})}static getMetaDataSymbol(){return X}}class z{constructor(t){this.suppressValidationErr=!t,this.options=t}readDocType(t,e){let i=Object.create(null),n=0;if(t[e+3]!=="O"||t[e+4]!=="C"||t[e+5]!=="T"||t[e+6]!=="Y"||t[e+7]!=="P"||t[e+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let o=1,u=!1,s=!1,d="";for(;e<t.length;e++)if(t[e]!=="<"||s)if(t[e]===">"){if(s?t[e-1]==="-"&&t[e-2]==="-"&&(s=!1,o--):o--,o===0)break}else t[e]==="["?u=!0:d+=t[e];else{if(u&&nt(t,"!ENTITY",e)){let p,g;if(e+=7,[p,g,e]=this.readEntityExp(t,e+1,this.suppressValidationErr),g.indexOf("&")===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount!=null&&n>=this.options.maxEntityCount)throw new Error(`Entity count (${n+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);i[p]=g,n++}}else if(u&&nt(t,"!ELEMENT",e)){e+=8;let{index:p}=this.readElementExp(t,e+1);e=p}else if(u&&nt(t,"!ATTLIST",e))e+=8;else if(u&&nt(t,"!NOTATION",e)){e+=9;let{index:p}=this.readNotationExp(t,e+1,this.suppressValidationErr);e=p}else{if(!nt(t,"!--",e))throw new Error("Invalid DOCTYPE");s=!0}o++,d=""}if(o!==0)throw new Error("Unclosed DOCTYPE")}return{entities:i,i:e}}readEntityExp(t,e){let i=e=K(t,e);for(;e<t.length&&!/\s/.test(t[e])&&t[e]!=='"'&&t[e]!=="'";)e++;let n=t.substring(i,e);if(lt(n),e=K(t,e),!this.suppressValidationErr){if(t.substring(e,e+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(t[e]==="%")throw new Error("Parameter entities are not supported")}let o="";if([e,o]=this.readIdentifierVal(t,e,"entity"),this.options.enabled!==!1&&this.options.maxEntitySize!=null&&o.length>this.options.maxEntitySize)throw new Error(`Entity "${n}" size (${o.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[n,o,--e]}readNotationExp(t,e){let i=e=K(t,e);for(;e<t.length&&!/\s/.test(t[e]);)e++;let n=t.substring(i,e);!this.suppressValidationErr&&lt(n),e=K(t,e);let o=t.substring(e,e+6).toUpperCase();if(!this.suppressValidationErr&&o!=="SYSTEM"&&o!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${o}"`);e+=o.length,e=K(t,e);let u=null,s=null;if(o==="PUBLIC")[e,u]=this.readIdentifierVal(t,e,"publicIdentifier"),t[e=K(t,e)]!=='"'&&t[e]!=="'"||([e,s]=this.readIdentifierVal(t,e,"systemIdentifier"));else if(o==="SYSTEM"&&([e,s]=this.readIdentifierVal(t,e,"systemIdentifier"),!this.suppressValidationErr&&!s))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:u,systemIdentifier:s,index:--e}}readIdentifierVal(t,e,i){let n="",o=t[e];if(o!=='"'&&o!=="'")throw new Error(`Expected quoted string, found "${o}"`);let u=++e;for(;e<t.length&&t[e]!==o;)e++;if(n=t.substring(u,e),t[e]!==o)throw new Error(`Unterminated ${i} value`);return[++e,n]}readElementExp(t,e){let i=e=K(t,e);for(;e<t.length&&!/\s/.test(t[e]);)e++;let n=t.substring(i,e);if(!this.suppressValidationErr&&!I(n))throw new Error(`Invalid element name: "${n}"`);let o="";if(t[e=K(t,e)]==="E"&&nt(t,"MPTY",e))e+=4;else if(t[e]==="A"&&nt(t,"NY",e))e+=2;else if(t[e]==="("){let u=++e;for(;e<t.length&&t[e]!==")";)e++;if(o=t.substring(u,e),t[e]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${t[e]}"`);return{elementName:n,contentModel:o.trim(),index:e}}readAttlistExp(t,e){let i=e=K(t,e);for(;e<t.length&&!/\s/.test(t[e]);)e++;let n=t.substring(i,e);for(lt(n),i=e=K(t,e);e<t.length&&!/\s/.test(t[e]);)e++;let o=t.substring(i,e);if(!lt(o))throw new Error(`Invalid attribute name: "${o}"`);e=K(t,e);let u="";if(t.substring(e,e+8).toUpperCase()==="NOTATION"){if(u="NOTATION",t[e=K(t,e+=8)]!=="(")throw new Error(`Expected '(', found "${t[e]}"`);e++;let d=[];for(;e<t.length&&t[e]!==")";){let p=e;for(;e<t.length&&t[e]!=="|"&&t[e]!==")";)e++;let g=t.substring(p,e);if(g=g.trim(),!lt(g))throw new Error(`Invalid notation name: "${g}"`);d.push(g),t[e]==="|"&&(e++,e=K(t,e))}if(t[e]!==")")throw new Error("Unterminated list of notations");e++,u+=" ("+d.join("|")+")"}else{let d=e;for(;e<t.length&&!/\s/.test(t[e]);)e++;u+=t.substring(d,e);let p=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!p.includes(u.toUpperCase()))throw new Error(`Invalid attribute type: "${u}"`)}e=K(t,e);let s="";return t.substring(e,e+8).toUpperCase()==="#REQUIRED"?(s="#REQUIRED",e+=8):t.substring(e,e+7).toUpperCase()==="#IMPLIED"?(s="#IMPLIED",e+=7):[e,s]=this.readIdentifierVal(t,e,"ATTLIST"),{elementName:n,attributeName:o,attributeType:u,defaultValue:s,index:e}}}let K=(r,t)=>{for(;t<r.length&&/\s/.test(r[t]);)t++;return t};function nt(r,t,e){for(let i=0;i<t.length;i++)if(t[i]!==r[e+i+1])return!1;return!0}function lt(r){if(I(r))return r;throw new Error(`Invalid entity name ${r}`)}let ht=/^[-+]?0x[a-fA-F0-9]+$/,ct=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Gt={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original"},Wt=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;class Xt{constructor(t){this._matcher=t}get separator(){return this._matcher.separator}getCurrentTag(){let t=this._matcher.path;return t.length>0?t[t.length-1].tag:void 0}getCurrentNamespace(){let t=this._matcher.path;return t.length>0?t[t.length-1].namespace:void 0}getAttrValue(t){let e=this._matcher.path;if(e.length!==0)return e[e.length-1].values?.[t]}hasAttr(t){let e=this._matcher.path;if(e.length===0)return!1;let i=e[e.length-1];return i.values!==void 0&&t in i.values}getPosition(){let t=this._matcher.path;return t.length===0?-1:t[t.length-1].position??0}getCounter(){let t=this._matcher.path;return t.length===0?-1:t[t.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(t,e=!0){return this._matcher.toString(t,e)}toArray(){return this._matcher.path.map(t=>t.tag)}matches(t){return this._matcher.matches(t)}matchesAny(t){return t.matchesAny(this._matcher)}}class vt{constructor(t={}){this.separator=t.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new Xt(this)}push(t,e=null,i=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);let n=this.path.length;this.siblingStacks[n]||(this.siblingStacks[n]=new Map);let o=this.siblingStacks[n],u=i?`${i}:${t}`:t,s=o.get(u)||0,d=0;for(let g of o.values())d+=g;o.set(u,s+1);let p={tag:t,position:d,counter:s};i!=null&&(p.namespace=i),e!=null&&(p.values=e),this.path.push(p)}pop(){if(this.path.length===0)return;this._pathStringCache=null;let t=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),t}updateCurrent(t){if(this.path.length>0){let e=this.path[this.path.length-1];t!=null&&(e.values=t)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(t){if(this.path.length!==0)return this.path[this.path.length-1].values?.[t]}hasAttr(t){if(this.path.length===0)return!1;let e=this.path[this.path.length-1];return e.values!==void 0&&t in e.values}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(t,e=!0){let i=t||this.separator;if(i===this.separator&&e===!0){if(this._pathStringCache!==null)return this._pathStringCache;let n=this.path.map(o=>o.namespace?`${o.namespace}:${o.tag}`:o.tag).join(i);return this._pathStringCache=n,n}return this.path.map(n=>e&&n.namespace?`${n.namespace}:${n.tag}`:n.tag).join(i)}toArray(){return this.path.map(t=>t.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(t){let e=t.segments;return e.length!==0&&(t.hasDeepWildcard()?this._matchWithDeepWildcard(e):this._matchSimple(e))}_matchSimple(t){if(this.path.length!==t.length)return!1;for(let e=0;e<t.length;e++)if(!this._matchSegment(t[e],this.path[e],e===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(t){let e=this.path.length-1,i=t.length-1;for(;i>=0&&e>=0;){let n=t[i];if(n.type==="deep-wildcard"){if(i--,i<0)return!0;let o=t[i],u=!1;for(let s=e;s>=0;s--)if(this._matchSegment(o,this.path[s],s===this.path.length-1)){e=s-1,i--,u=!0;break}if(!u)return!1}else{if(!this._matchSegment(n,this.path[e],e===this.path.length-1))return!1;e--,i--}}return i<0}_matchSegment(t,e,i){if(t.tag!=="*"&&t.tag!==e.tag||t.namespace!==void 0&&t.namespace!=="*"&&t.namespace!==e.namespace||t.attrName!==void 0&&(!i||!e.values||!(t.attrName in e.values)||t.attrValue!==void 0&&String(e.values[t.attrName])!==String(t.attrValue)))return!1;if(t.position!==void 0){if(!i)return!1;let n=e.counter??0;if(t.position==="first"&&n!==0||t.position==="odd"&&n%2!=1||t.position==="even"&&n%2!=0||t.position==="nth"&&n!==t.positionValue)return!1}return!0}matchesAny(t){return t.matchesAny(this)}snapshot(){return{path:this.path.map(t=>({...t})),siblingStacks:this.siblingStacks.map(t=>new Map(t))}}restore(t){this._pathStringCache=null,this.path=t.path.map(e=>({...e})),this.siblingStacks=t.siblingStacks.map(e=>new Map(e))}readOnly(){return this._view}}class mt{constructor(t,e={},i){this.pattern=t,this.separator=e.separator||".",this.segments=this._parse(t),this.data=i,this._hasDeepWildcard=this.segments.some(n=>n.type==="deep-wildcard"),this._hasAttributeCondition=this.segments.some(n=>n.attrName!==void 0),this._hasPositionSelector=this.segments.some(n=>n.position!==void 0)}_parse(t){let e=[],i=0,n="";for(;i<t.length;)t[i]===this.separator?i+1<t.length&&t[i+1]===this.separator?(n.trim()&&(e.push(this._parseSegment(n.trim())),n=""),e.push({type:"deep-wildcard"}),i+=2):(n.trim()&&e.push(this._parseSegment(n.trim())),n="",i++):(n+=t[i],i++);return n.trim()&&e.push(this._parseSegment(n.trim())),e}_parseSegment(t){let e={type:"tag"},i=null,n=t,o=t.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(o&&(n=o[1]+o[3],o[2])){let g=o[2].slice(1,-1);g&&(i=g)}let u,s,d=n;if(n.includes("::")){let g=n.indexOf("::");if(u=n.substring(0,g).trim(),d=n.substring(g+2).trim(),!u)throw new Error(`Invalid namespace in pattern: ${t}`)}let p=null;if(d.includes(":")){let g=d.lastIndexOf(":"),O=d.substring(0,g).trim(),j=d.substring(g+1).trim();["first","last","odd","even"].includes(j)||/^nth\(\d+\)$/.test(j)?(s=O,p=j):s=d}else s=d;if(!s)throw new Error(`Invalid segment pattern: ${t}`);if(e.tag=s,u&&(e.namespace=u),i)if(i.includes("=")){let g=i.indexOf("=");e.attrName=i.substring(0,g).trim(),e.attrValue=i.substring(g+1).trim()}else e.attrName=i.trim();if(p){let g=p.match(/^nth\((\d+)\)$/);g?(e.position="nth",e.positionValue=parseInt(g[1],10)):e.position=p}return e}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class qt{constructor(){this._byDepthAndTag=new Map,this._wildcardByDepth=new Map,this._deepWildcards=[],this._patterns=new Set,this._sealed=!1}add(t){if(this._sealed)throw new TypeError("ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.");if(this._patterns.has(t.pattern))return this;if(this._patterns.add(t.pattern),t.hasDeepWildcard())return this._deepWildcards.push(t),this;let e=t.length,i=t.segments[t.segments.length-1],n=i?.tag;if(n&&n!=="*"){let o=`${e}:${n}`;this._byDepthAndTag.has(o)||this._byDepthAndTag.set(o,[]),this._byDepthAndTag.get(o).push(t)}else this._wildcardByDepth.has(e)||this._wildcardByDepth.set(e,[]),this._wildcardByDepth.get(e).push(t);return this}addAll(t){for(let e of t)this.add(e);return this}has(t){return this._patterns.has(t.pattern)}get size(){return this._patterns.size}seal(){return this._sealed=!0,this}get isSealed(){return this._sealed}matchesAny(t){return this.findMatch(t)!==null}findMatch(t){let e=t.getDepth(),i=`${e}:${t.getCurrentTag()}`,n=this._byDepthAndTag.get(i);if(n){for(let u=0;u<n.length;u++)if(t.matches(n[u]))return n[u]}let o=this._wildcardByDepth.get(e);if(o){for(let u=0;u<o.length;u++)if(t.matches(o[u]))return o[u]}for(let u=0;u<this._deepWildcards.length;u++)if(t.matches(this._deepWildcards[u]))return this._deepWildcards[u];return null}}let Yt={cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",euro:"\u20AC",dollar:"$",euro:"\u20AC",fnof:"\u0192",inr:"\u20B9",af:"\u060B",birr:"\u1265\u122D",peso:"\u20B1",rub:"\u20BD",won:"\u20A9",yuan:"\xA5",cedil:"\xB8"},Ct={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},Kt={nbsp:"\xA0",copy:"\xA9",reg:"\xAE",trade:"\u2122",mdash:"\u2014",ndash:"\u2013",hellip:"\u2026",laquo:"\xAB",raquo:"\xBB",lsquo:"\u2018",rsquo:"\u2019",ldquo:"\u201C",rdquo:"\u201D",bull:"\u2022",para:"\xB6",sect:"\xA7",deg:"\xB0",frac12:"\xBD",frac14:"\xBC",frac34:"\xBE"},zt=new Set("!?\\\\/[]$%{}^&*()<>|+");function jt(r){if(r[0]==="#")throw new Error(`[EntityReplacer] Invalid character '#' in entity name: "${r}"`);for(let t of r)if(zt.has(t))throw new Error(`[EntityReplacer] Invalid character '${t}' in entity name: "${r}"`);return r}function xt(...r){let t=Object.create(null);for(let e of r)if(e)for(let i of Object.keys(e)){let n=e[i];if(typeof n=="string")t[i]=n;else if(n&&typeof n=="object"&&n.val!==void 0){let o=n.val;typeof o=="string"&&(t[i]=o)}}return t}let dt="external",bt="base",Nt="all",at=Object.freeze({allow:0,leave:1,remove:2,throw:3}),Jt=new Set([9,10,13]);class Zt{constructor(t={}){var e;this._limit=t.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck=typeof t.postCheck=="function"?t.postCheck:n=>n,this._limitTiers=(e=this._limit.applyLimitsTo??dt)&&e!==dt?e===Nt?new Set([Nt]):e===bt?new Set([bt]):Array.isArray(e)?new Set(e):new Set([dt]):new Set([dt]),this._numericAllowed=t.numericAllowed??!0,this._baseMap=xt(Ct,t.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(t.remove&&Array.isArray(t.remove)?t.remove:[]),this._leaveSet=new Set(t.leave&&Array.isArray(t.leave)?t.leave:[]);let i=(function(n){if(!n)return{xmlVersion:1,onLevel:at.allow,nullLevel:at.remove};let o=n.xmlVersion===1.1?1.1:1,u=at[n.onNCR]??at.allow,s=at[n.nullNCR]??at.remove;return{xmlVersion:o,onLevel:u,nullLevel:Math.max(s,at.remove)}})(t.ncr);this._ncrXmlVersion=i.xmlVersion,this._ncrOnLevel=i.onLevel,this._ncrNullLevel=i.nullLevel}setExternalEntities(t){if(t)for(let e of Object.keys(t))jt(e);this._externalMap=xt(t)}addExternalEntity(t,e){jt(t),typeof e=="string"&&e.indexOf("&")===-1&&(this._externalMap[t]=e)}addInputEntities(t){this._totalExpansions=0,this._expandedLength=0,this._inputMap=xt(t)}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(t){this._ncrXmlVersion=t===1.1?1.1:1}decode(t){if(typeof t!="string"||t.length===0)return t;let e=t,i=[],n=t.length,o=0,u=0,s=this._maxTotalExpansions>0,d=this._maxExpandedLength>0,p=s||d;for(;u<n;){if(t.charCodeAt(u)!==38){u++;continue}let O=u+1;for(;O<n&&t.charCodeAt(O)!==59&&O-u<=32;)O++;if(O>=n||t.charCodeAt(O)!==59){u++;continue}let j=t.slice(u+1,O);if(j.length===0){u++;continue}let L,k;if(this._removeSet.has(j))L="",k===void 0&&(k=dt);else{if(this._leaveSet.has(j)){u++;continue}if(j.charCodeAt(0)===35){let V=this._resolveNCR(j);if(V===void 0){u++;continue}L=V,k=bt}else{let V=this._resolveName(j);L=V?.value,k=V?.tier}}if(L!==void 0){if(u>o&&i.push(t.slice(o,u)),i.push(L),o=O+1,u=o,p&&this._tierCounts(k)){if(s&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw new Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(d){let V=L.length-(j.length+2);if(V>0&&(this._expandedLength+=V,this._expandedLength>this._maxExpandedLength))throw new Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}else u++}o<n&&i.push(t.slice(o));let g=i.length===0?t:i.join("");return this._postCheck(g,e)}_tierCounts(t){return!!this._limitTiers.has(Nt)||this._limitTiers.has(t)}_resolveName(t){return t in this._inputMap?{value:this._inputMap[t],tier:dt}:t in this._externalMap?{value:this._externalMap[t],tier:dt}:t in this._baseMap?{value:this._baseMap[t],tier:bt}:void 0}_classifyNCR(t){return t===0?this._ncrNullLevel:t>=55296&&t<=57343||this._ncrXmlVersion===1&&t>=1&&t<=31&&!Jt.has(t)?at.remove:-1}_applyNCRAction(t,e,i){switch(t){case at.allow:return String.fromCodePoint(i);case at.remove:return"";case at.leave:return;case at.throw:throw new Error(`[EntityDecoder] Prohibited numeric character reference &${e}; (U+${i.toString(16).toUpperCase().padStart(4,"0")})`);default:return String.fromCodePoint(i)}}_resolveNCR(t){let e=t.charCodeAt(1),i;if(i=e===120||e===88?parseInt(t.slice(2),16):parseInt(t.slice(1),10),Number.isNaN(i)||i<0||i>1114111)return;let n=this._classifyNCR(i);if(!this._numericAllowed&&n<at.remove)return;let o=n===-1?this._ncrOnLevel:Math.max(this._ncrOnLevel,n);return this._applyNCRAction(o,t,i)}}function Ht(r,t){if(!r)return{};let e=t.attributesGroupName?r[t.attributesGroupName]:r;if(!e)return{};let i={};for(let n in e)n.startsWith(t.attributeNamePrefix)?i[n.substring(t.attributeNamePrefix.length)]=e[n]:i[n]=e[n];return i}function Qt(r){if(!r||typeof r!="string")return;let t=r.indexOf(":");if(t!==-1&&t>0){let e=r.substring(0,t);if(e!=="xmlns")return e}}class te{constructor(t){var e;this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.parseXml=oe,this.parseTextData=ee,this.resolveNameSpace=re,this.buildAttributesMap=ie,this.isItStopNode=ue,this.replaceEntitiesValue=ae,this.readStopNodeData=ce,this.saveTextToParentTag=le,this.addChild=se,this.ignoreAttributesFn=typeof(e=this.options.ignoreAttributes)=="function"?e:Array.isArray(e)?o=>{for(let u of e)if(typeof u=="string"&&o===u||u instanceof RegExp&&u.test(o))return!0}:()=>!1,this.entityExpansionCount=0,this.currentExpandedLength=0;let i={...Ct};this.options.entityDecoder?this.entityDecoder=this.options.entityDecoder:(typeof this.options.htmlEntities=="object"?i=this.options.htmlEntities:this.options.htmlEntities===!0&&(i={...Kt,...Yt}),this.entityDecoder=new Zt({namedEntities:i,numericAllowed:this.options.htmlEntities,limit:{maxTotalExpansions:this.options.processEntities.maxTotalExpansions,maxExpandedLength:this.options.processEntities.maxExpandedLength,applyLimitsTo:this.options.processEntities.appliesTo}})),this.matcher=new vt,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.stopNodeExpressionsSet=new qt;let n=this.options.stopNodes;if(n&&n.length>0){for(let o=0;o<n.length;o++){let u=n[o];typeof u=="string"?this.stopNodeExpressionsSet.add(new mt(u)):u instanceof mt&&this.stopNodeExpressionsSet.add(u)}this.stopNodeExpressionsSet.seal()}}}function ee(r,t,e,i,n,o,u){let s=this.options;if(r!==void 0&&(s.trimValues&&!i&&(r=r.trim()),r.length>0)){u||(r=this.replaceEntitiesValue(r,t,e));let d=s.jPath?e.toString():e,p=s.tagValueProcessor(t,r,d,n,o);return p==null?r:typeof p!=typeof r||p!==r?p:s.trimValues||r.trim()===r?Mt(r,s.parseTagValue,s.numberParseOptions):r}}function re(r){if(this.options.removeNSPrefix){let t=r.split(":"),e=r.charAt(0)==="/"?"/":"";if(t[0]==="xmlns")return"";t.length===2&&(r=e+t[1])}return r}let ne=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function ie(r,t,e,i=!1){let n=this.options;if(i===!0||n.ignoreAttributes!==!0&&typeof r=="string"){let o=N(r,ne),u=o.length,s={},d=new Array(u),p=!1,g={};for(let L=0;L<u;L++){let k=this.resolveNameSpace(o[L][1]),V=o[L][4];if(k.length&&V!==void 0){let rt=V;n.trimValues&&(rt=rt.trim()),rt=this.replaceEntitiesValue(rt,e,this.readonlyMatcher),d[L]=rt,g[k]=rt,p=!0}}p&&typeof t=="object"&&t.updateCurrent&&t.updateCurrent(g);let O=n.jPath?t.toString():this.readonlyMatcher,j=!1;for(let L=0;L<u;L++){let k=this.resolveNameSpace(o[L][1]);if(this.ignoreAttributesFn(k,O))continue;let V=n.attributeNamePrefix+k;if(k.length)if(n.transformAttributeName&&(V=n.transformAttributeName(V)),V=It(V,n),o[L][4]!==void 0){let rt=d[L],it=n.attributeValueProcessor(k,rt,O);s[V]=it==null?rt:typeof it!=typeof rt||it!==rt?it:Mt(rt,n.parseAttributeValue,n.numberParseOptions),j=!0}else n.allowBooleanAttributes&&(s[V]=!0,j=!0)}if(!j)return;if(n.attributesGroupName){let L={};return L[n.attributesGroupName]=s,L}return s}}let oe=function(r){r=r.replace(/\r\n?/g,`
10
+ `);let t=new H("!xml"),e=t,i="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let n=this.options,o=new z(n.processEntities),u=r.length;for(let s=0;s<u;s++)if(r[s]==="<"){let d=r.charCodeAt(s+1);if(d===47){let p=gt(r,">",s,"Closing Tag is not closed."),g=r.substring(s+2,p).trim();if(n.removeNSPrefix){let j=g.indexOf(":");j!==-1&&(g=g.substr(j+1))}g=Ot(n.transformTagName,g,"",n).tagName,e&&(i=this.saveTextToParentTag(i,e,this.readonlyMatcher));let O=this.matcher.getCurrentTag();if(g&&n.unpairedTagsSet.has(g))throw new Error(`Unpaired tag can not be used as closing tag: </${g}>`);O&&n.unpairedTagsSet.has(O)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,e=this.tagsNodeStack.pop(),i="",s=p}else if(d===63){let p=wt(r,s,!1,"?>");if(!p)throw new Error("Pi Tag is not closed.");i=this.saveTextToParentTag(i,e,this.readonlyMatcher);let g=this.buildAttributesMap(p.tagExp,this.matcher,p.tagName,!0);if(g){let O=g[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(O)||1)}if(!(n.ignoreDeclaration&&p.tagName==="?xml"||n.ignorePiTags)){let O=new H(p.tagName);O.add(n.textNodeName,""),p.tagName!==p.tagExp&&p.attrExpPresent&&n.ignoreAttributes!==!0&&(O[":@"]=g),this.addChild(e,O,this.readonlyMatcher,s)}s=p.closeIndex+1}else if(d===33&&r.charCodeAt(s+2)===45&&r.charCodeAt(s+3)===45){let p=gt(r,"-->",s+4,"Comment is not closed.");if(n.commentPropName){let g=r.substring(s+4,p-2);i=this.saveTextToParentTag(i,e,this.readonlyMatcher),e.add(n.commentPropName,[{[n.textNodeName]:g}])}s=p}else if(d===33&&r.charCodeAt(s+2)===68){let p=o.readDocType(r,s);this.entityDecoder.addInputEntities(p.entities),s=p.i}else if(d===33&&r.charCodeAt(s+2)===91){let p=gt(r,"]]>",s,"CDATA is not closed.")-2,g=r.substring(s+9,p);i=this.saveTextToParentTag(i,e,this.readonlyMatcher);let O=this.parseTextData(g,e.tagname,this.readonlyMatcher,!0,!1,!0,!0);O==null&&(O=""),n.cdataPropName?e.add(n.cdataPropName,[{[n.textNodeName]:g}]):e.add(n.textNodeName,O),s=p+2}else{let p=wt(r,s,n.removeNSPrefix);if(!p){let st=r.substring(Math.max(0,s-50),Math.min(u,s+50));throw new Error(`readTagExp returned undefined at position ${s}. Context: "${st}"`)}let g=p.tagName,O=p.rawTagName,j=p.tagExp,L=p.attrExpPresent,k=p.closeIndex;if({tagName:g,tagExp:j}=Ot(n.transformTagName,g,j,n),n.strictReservedNames&&(g===n.commentPropName||g===n.cdataPropName||g===n.textNodeName||g===n.attributesGroupName))throw new Error(`Invalid tag name: ${g}`);e&&i&&e.tagname!=="!xml"&&(i=this.saveTextToParentTag(i,e,this.readonlyMatcher,!1));let V=e;V&&n.unpairedTagsSet.has(V.tagname)&&(e=this.tagsNodeStack.pop(),this.matcher.pop());let rt=!1;j.length>0&&j.lastIndexOf("/")===j.length-1&&(rt=!0,g[g.length-1]==="/"?(g=g.substr(0,g.length-1),j=g):j=j.substr(0,j.length-1),L=g!==j);let it,ot=null,ft={};it=Qt(O),g!==t.tagname&&this.matcher.push(g,{},it),g!==j&&L&&(ot=this.buildAttributesMap(j,this.matcher,g),ot&&(ft=Ht(ot,n))),g!==t.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let pt=s;if(this.isCurrentNodeStopNode){let st="";if(rt)s=p.closeIndex;else if(n.unpairedTagsSet.has(g))s=p.closeIndex;else{let _t=this.readStopNodeData(r,O,k+1);if(!_t)throw new Error(`Unexpected end of ${O}`);s=_t.i,st=_t.tagContent}let Pt=new H(g);ot&&(Pt[":@"]=ot),Pt.add(n.textNodeName,st),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(e,Pt,this.readonlyMatcher,pt)}else{if(rt){({tagName:g,tagExp:j}=Ot(n.transformTagName,g,j,n));let st=new H(g);ot&&(st[":@"]=ot),this.addChild(e,st,this.readonlyMatcher,pt),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(n.unpairedTagsSet.has(g)){let st=new H(g);ot&&(st[":@"]=ot),this.addChild(e,st,this.readonlyMatcher,pt),this.matcher.pop(),this.isCurrentNodeStopNode=!1,s=p.closeIndex;continue}{let st=new H(g);if(this.tagsNodeStack.length>n.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(e),ot&&(st[":@"]=ot),this.addChild(e,st,this.readonlyMatcher,pt),e=st}}i="",s=k}}}else i+=r[s];return t.child};function se(r,t,e,i){this.options.captureMetaData||(i=void 0);let n=this.options.jPath?e.toString():e,o=this.options.updateTag(t.tagname,n,t[":@"]);o===!1||(typeof o=="string"&&(t.tagname=o),r.addChild(t,i))}function ae(r,t,e){let i=this.options.processEntities;if(!i||!i.enabled)return r;if(i.allowedTags){let n=this.options.jPath?e.toString():e;if(!(Array.isArray(i.allowedTags)?i.allowedTags.includes(t):i.allowedTags(t,n)))return r}if(i.tagFilter){let n=this.options.jPath?e.toString():e;if(!i.tagFilter(t,n))return r}return this.entityDecoder.decode(r)}function le(r,t,e,i){return r&&(i===void 0&&(i=t.child.length===0),(r=this.parseTextData(r,t.tagname,e,!1,!!t[":@"]&&Object.keys(t[":@"]).length!==0,i))!==void 0&&r!==""&&t.add(this.options.textNodeName,r),r=""),r}function ue(){return this.stopNodeExpressionsSet.size!==0&&this.matcher.matchesAny(this.stopNodeExpressionsSet)}function gt(r,t,e,i){let n=r.indexOf(t,e);if(n===-1)throw new Error(i);return n+t.length-1}function pe(r,t,e,i){let n=r.indexOf(t,e);if(n===-1)throw new Error(i);return n}function wt(r,t,e,i=">"){let n=(function(O,j,L=">"){let k=0,V=[],rt=O.length,it=L.charCodeAt(0),ot=L.length>1?L.charCodeAt(1):-1;for(let ft=j;ft<rt;ft++){let pt=O.charCodeAt(ft);if(k)pt===k&&(k=0);else if(pt===34||pt===39)k=pt;else if(pt===it){if(ot===-1)return{data:String.fromCharCode(...V),index:ft};if(O.charCodeAt(ft+1)===ot)return{data:String.fromCharCode(...V),index:ft}}else if(pt===9){V.push(32);continue}V.push(pt)}})(r,t+1,i);if(!n)return;let o=n.data,u=n.index,s=o.search(/\s/),d=o,p=!0;s!==-1&&(d=o.substring(0,s),o=o.substring(s+1).trimStart());let g=d;if(e){let O=d.indexOf(":");O!==-1&&(d=d.substr(O+1),p=d!==n.data.substr(O+1))}return{tagName:d,tagExp:o,closeIndex:u,attrExpPresent:p,rawTagName:g}}function ce(r,t,e){let i=e,n=1,o=r.length;for(;e<o;e++)if(r[e]==="<"){let u=r.charCodeAt(e+1);if(u===47){let s=pe(r,">",e,`${t} is not closed`);if(r.substring(e+2,s).trim()===t&&(n--,n===0))return{tagContent:r.substring(i,e),i:s};e=s}else if(u===63)e=gt(r,"?>",e+1,"StopNode is not closed.");else if(u===33&&r.charCodeAt(e+2)===45&&r.charCodeAt(e+3)===45)e=gt(r,"-->",e+3,"StopNode is not closed.");else if(u===33&&r.charCodeAt(e+2)===91)e=gt(r,"]]>",e,"StopNode is not closed.")-2;else{let s=wt(r,e,">");s&&((s&&s.tagName)===t&&s.tagExp[s.tagExp.length-1]!=="/"&&n++,e=s.closeIndex)}}}function Mt(r,t,e){if(t&&typeof r=="string"){let i=r.trim();return i==="true"||i!=="false"&&(function(n,o={}){if(o=Object.assign({},Gt,o),!n||typeof n!="string")return n;let u=n.trim();if(u.length===0||o.skipLike!==void 0&&o.skipLike.test(u))return n;if(u==="0")return 0;if(o.hex&&ht.test(u))return(function(d){if(parseInt)return parseInt(d,16);if(Number.parseInt)return Number.parseInt(d,16);if(window&&window.parseInt)return window.parseInt(d,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")})(u);if(isFinite(u)){if(u.includes("e")||u.includes("E"))return(function(d,p,g){if(!g.eNotation)return d;let O=p.match(Wt);if(O){let j=O[1]||"",L=O[3].indexOf("e")===-1?"E":"e",k=O[2],V=j?d[k.length+1]===L:d[k.length]===L;return k.length>1&&V?d:(k.length!==1||!O[3].startsWith(`.${L}`)&&O[3][0]!==L)&&k.length>0?g.leadingZeros&&!V?(p=(O[1]||"")+O[3],Number(p)):d:Number(p)}return d})(n,u,o);{let d=ct.exec(u);if(d){let p=d[1]||"",g=d[2],O=((s=d[3])&&s.indexOf(".")!==-1&&((s=s.replace(/0+$/,""))==="."?s="0":s[0]==="."?s="0"+s:s[s.length-1]==="."&&(s=s.substring(0,s.length-1))),s),j=p?n[g.length+1]===".":n[g.length]===".";if(!o.leadingZeros&&(g.length>1||g.length===1&&!j))return n;{let L=Number(u),k=String(L);if(L===0)return L;if(k.search(/[eE]/)!==-1)return o.eNotation?L:n;if(u.indexOf(".")!==-1)return k==="0"||k===O||k===`${p}${O}`?L:n;let V=g?O:u;return g?V===k||p+V===k?L:n:V===k||V===p+k?L:n}}return n}}var s;return(function(d,p,g){let O=p===1/0;switch(g.infinity.toLowerCase()){case"null":return null;case"infinity":return p;case"string":return O?"Infinity":"-Infinity";default:return d}})(n,Number(u),o)})(r,e)}return r!==void 0?r:""}function Ot(r,t,e,i){if(r){let n=r(t);e===t&&(e=n),t=n}return{tagName:t=It(t,i),tagExp:e}}function It(r,t){if($.includes(r))throw new Error(`[SECURITY] Invalid name: "${r}" is a reserved JavaScript keyword that could cause prototype pollution`);return C.includes(r)?t.onDangerousProperty(r):r}let Et=H.getMetaDataSymbol();function fe(r,t){if(!r||typeof r!="object")return{};if(!t)return r;let e={};for(let i in r)i.startsWith(t)?e[i.substring(t.length)]=r[i]:e[i]=r[i];return e}function he(r,t,e,i){return Dt(r,t,e,i)}function Dt(r,t,e,i){let n,o={};for(let u=0;u<r.length;u++){let s=r[u],d=de(s);if(d!==void 0&&d!==t.textNodeName){let p=fe(s[":@"]||{},t.attributeNamePrefix);e.push(d,p)}if(d===t.textNodeName)n===void 0?n=s[d]:n+=""+s[d];else{if(d===void 0)continue;if(s[d]){let p=Dt(s[d],t,e,i),g=ge(p,t);if(s[":@"]?me(p,s[":@"],i,t):Object.keys(p).length!==1||p[t.textNodeName]===void 0||t.alwaysCreateTextNode?Object.keys(p).length===0&&(t.alwaysCreateTextNode?p[t.textNodeName]="":p=""):p=p[t.textNodeName],s[Et]!==void 0&&typeof p=="object"&&p!==null&&(p[Et]=s[Et]),o[d]!==void 0&&Object.prototype.hasOwnProperty.call(o,d))Array.isArray(o[d])||(o[d]=[o[d]]),o[d].push(p);else{let O=t.jPath?i.toString():i;t.isArray(d,O,g)?o[d]=[p]:o[d]=p}d!==void 0&&d!==t.textNodeName&&e.pop()}}}return typeof n=="string"?n.length>0&&(o[t.textNodeName]=n):n!==void 0&&(o[t.textNodeName]=n),o}function de(r){let t=Object.keys(r);for(let e=0;e<t.length;e++){let i=t[e];if(i!==":@")return i}}function me(r,t,e,i){if(t){let n=Object.keys(t),o=n.length;for(let u=0;u<o;u++){let s=n[u],d=s.startsWith(i.attributeNamePrefix)?s.substring(i.attributeNamePrefix.length):s,p=i.jPath?e.toString()+"."+d:e;i.isArray(s,p,!0,!0)?r[s]=[t[s]]:r[s]=t[s]}}}function ge(r,t){let{textNodeName:e}=t,i=Object.keys(r).length;return i===0||!(i!==1||!r[e]&&typeof r[e]!="boolean"&&r[e]!==0)}class ye{constructor(t){this.externalEntities={},this.options=B(t)}parse(t,e){if(typeof t!="string"&&t.toString)t=t.toString();else if(typeof t!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(e){e===!0&&(e={});let o=c(t,e);if(o!==!0)throw Error(`${o.err.msg}:${o.err.line}:${o.err.col}`)}let i=new te(this.options);i.entityDecoder.setExternalEntities(this.externalEntities);let n=i.parseXml(t);return this.options.preserveOrder||n===void 0?n:he(n,this.options,i.matcher,i.readonlyMatcher)}addEntity(t,e){if(e.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(t.indexOf("&")!==-1||t.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(e==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}static getMetaDataSymbol(){return H.getMetaDataSymbol()}}function be(r,t){let e="";t.format&&t.indentBy.length>0&&(e=`
11
+ `);let i=[];if(t.stopNodes&&Array.isArray(t.stopNodes))for(let n=0;n<t.stopNodes.length;n++){let o=t.stopNodes[n];typeof o=="string"?i.push(new mt(o)):o instanceof mt&&i.push(o)}return $t(r,t,e,new vt,i)}function $t(r,t,e,i,n){let o="",u=!1;if(t.maxNestedTags&&i.getDepth()>t.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(r)){if(r!=null){let s=r.toString();return s=St(s,t),s}return""}for(let s=0;s<r.length;s++){let d=r[s],p=kt(d);if(p===void 0)continue;let g=ve(d[":@"],t);i.push(p,g);let O=Ne(i,n);if(p===t.textNodeName){let V=d[p];O||(V=t.tagValueProcessor(p,V),V=St(V,t)),u&&(o+=e),o+=V,u=!1,i.pop();continue}if(p===t.cdataPropName){u&&(o+=e);let V=d[p][0][t.textNodeName];o+=`<![CDATA[${String(V).replace(/\]\]>/g,"]]]]><![CDATA[>")}]]>`,u=!1,i.pop();continue}if(p===t.commentPropName){let V=d[p][0][t.textNodeName];o+=e+`<!--${String(V).replace(/--/g,"- -").replace(/-$/,"- ")}-->`,u=!0,i.pop();continue}if(p[0]==="?"){let V=Rt(d[":@"],t,O),rt=p==="?xml"?"":e,it=d[p][0][t.textNodeName];it=it.length!==0?" "+it:"",o+=rt+`<${p}${it}${V}?>`,u=!0,i.pop();continue}let j=e;j!==""&&(j+=t.indentBy);let L=e+`<${p}${Rt(d[":@"],t,O)}`,k;k=O?Lt(d[p],t):$t(d[p],t,j,i,n),t.unpairedTags.indexOf(p)!==-1?t.suppressUnpairedNode?o+=L+">":o+=L+"/>":k&&k.length!==0||!t.suppressEmptyNode?k&&k.endsWith(">")?o+=L+`>${k}${e}</${p}>`:(o+=L+">",k&&e!==""&&(k.includes("/>")||k.includes("</"))?o+=e+t.indentBy+k+e:o+=k,o+=`</${p}>`):o+=L+"/>",u=!0,i.pop()}return o}function ve(r,t){if(!r||t.ignoreAttributes)return null;let e={},i=!1;for(let n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n.startsWith(t.attributeNamePrefix)?n.substr(t.attributeNamePrefix.length):n]=r[n],i=!0);return i?e:null}function Lt(r,t){if(!Array.isArray(r))return r!=null?r.toString():"";let e="";for(let i=0;i<r.length;i++){let n=r[i],o=kt(n);if(o===t.textNodeName)e+=n[o];else if(o===t.cdataPropName)e+=n[o][0][t.textNodeName];else if(o===t.commentPropName)e+=n[o][0][t.textNodeName];else{if(o&&o[0]==="?")continue;if(o){let u=xe(n[":@"],t),s=Lt(n[o],t);s&&s.length!==0?e+=`<${o}${u}>${s}</${o}>`:e+=`<${o}${u}/>`}}}return e}function xe(r,t){let e="";if(r&&!t.ignoreAttributes)for(let i in r){if(!Object.prototype.hasOwnProperty.call(r,i))continue;let n=r[i];n===!0&&t.suppressBooleanAttributes?e+=` ${i.substr(t.attributeNamePrefix.length)}`:e+=` ${i.substr(t.attributeNamePrefix.length)}="${n}"`}return e}function kt(r){let t=Object.keys(r);for(let e=0;e<t.length;e++){let i=t[e];if(Object.prototype.hasOwnProperty.call(r,i)&&i!==":@")return i}}function Rt(r,t,e){let i="";if(r&&!t.ignoreAttributes)for(let n in r){if(!Object.prototype.hasOwnProperty.call(r,n))continue;let o;e?o=r[n]:(o=t.attributeValueProcessor(n,r[n]),o=St(o,t)),o===!0&&t.suppressBooleanAttributes?i+=` ${n.substr(t.attributeNamePrefix.length)}`:i+=` ${n.substr(t.attributeNamePrefix.length)}="${o}"`}return i}function Ne(r,t){if(!t||t.length===0)return!1;for(let e=0;e<t.length;e++)if(r.matches(t[e]))return!0;return!1}function St(r,t){if(r&&r.length>0&&t.processEntities)for(let e=0;e<t.entities.length;e++){let i=t.entities[e];r=r.replace(i.regex,i.val)}return r}let we={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(r,t){return t},attributeValueProcessor:function(r,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0};function ut(r){if(this.options=Object.assign({},we,r),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>typeof e=="string"&&e.startsWith("*.")?".."+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let e=0;e<this.options.stopNodes.length;e++){let i=this.options.stopNodes[e];typeof i=="string"?this.stopNodeExpressions.push(new mt(i)):i instanceof mt&&this.stopNodeExpressions.push(i)}var t;this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=typeof(t=this.options.ignoreAttributes)=="function"?t:Array.isArray(t)?e=>{for(let i of t)if(typeof i=="string"&&e===i||i instanceof RegExp&&i.test(e))return!0}:()=>!1,this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Se),this.processTextOrObjNode=Oe,this.options.format?(this.indentate=Ee,this.tagEndChar=`>
12
12
  `,this.newLine=`
13
- `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Oe(r,t,e,i){let n=this.extractAttributes(r);if(i.push(t,n),this.checkStopNode(i)){let u=this.buildRawContent(r),s=this.buildAttributesForStopNode(r);return i.pop(),this.buildObjectNode(u,t,s,e)}let o=this.j2x(r,e+1,i);return i.pop(),r[this.options.textNodeName]!==void 0&&Object.keys(r).length===1?this.buildTextValNode(r[this.options.textNodeName],t,o.attrStr,e,i):this.buildObjectNode(o.val,t,o.attrStr,e)}function Ee(r){return this.options.indentBy.repeat(r)}function Se(r){return!(!r.startsWith(this.options.attributeNamePrefix)||r===this.options.textNodeName)&&r.substr(this.attrPrefixLen)}ut.prototype.build=function(r){if(this.options.preserveOrder)return be(r,this.options);{Array.isArray(r)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(r={[this.options.arrayNodeName]:r});let t=new vt;return this.j2x(r,0,t).val}},ut.prototype.j2x=function(r,t,e){let i="",n="";if(this.options.maxNestedTags&&e.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");let o=this.options.jPath?e.toString():e,u=this.checkStopNode(e);for(let s in r)if(Object.prototype.hasOwnProperty.call(r,s))if(r[s]===void 0)this.isAttribute(s)&&(n+="");else if(r[s]===null)this.isAttribute(s)||s===this.options.cdataPropName?n+="":s[0]==="?"?n+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if(r[s]instanceof Date)n+=this.buildTextValNode(r[s],s,"",t,e);else if(typeof r[s]!="object"){let d=this.isAttribute(s);if(d&&!this.ignoreAttributesFn(d,o))i+=this.buildAttrPairStr(d,""+r[s],u);else if(!d)if(s===this.options.textNodeName){let p=this.options.tagValueProcessor(s,""+r[s]);n+=this.replaceEntitiesValue(p)}else{e.push(s);let p=this.checkStopNode(e);if(e.pop(),p){let m=""+r[s];n+=m===""?this.indentate(t)+"<"+s+this.closeTag(s)+this.tagEndChar:this.indentate(t)+"<"+s+">"+m+"</"+s+this.tagEndChar}else n+=this.buildTextValNode(r[s],s,"",t,e)}}else if(Array.isArray(r[s])){let d=r[s].length,p="",m="";for(let O=0;O<d;O++){let j=r[s][O];if(j!==void 0)if(j===null)s[0]==="?"?n+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if(typeof j=="object")if(this.options.oneListGroup){e.push(s);let L=this.j2x(j,t+1,e);e.pop(),p+=L.val,this.options.attributesGroupName&&j.hasOwnProperty(this.options.attributesGroupName)&&(m+=L.attrStr)}else p+=this.processTextOrObjNode(j,s,t,e);else if(this.options.oneListGroup){let L=this.options.tagValueProcessor(s,j);L=this.replaceEntitiesValue(L),p+=L}else{e.push(s);let L=this.checkStopNode(e);if(e.pop(),L){let k=""+j;p+=k===""?this.indentate(t)+"<"+s+this.closeTag(s)+this.tagEndChar:this.indentate(t)+"<"+s+">"+k+"</"+s+this.tagEndChar}else p+=this.buildTextValNode(j,s,"",t,e)}}this.options.oneListGroup&&(p=this.buildObjectNode(p,s,m,t)),n+=p}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){let d=Object.keys(r[s]),p=d.length;for(let m=0;m<p;m++)i+=this.buildAttrPairStr(d[m],""+r[s][d[m]],u)}else n+=this.processTextOrObjNode(r[s],s,t,e);return{attrStr:i,val:n}},ut.prototype.buildAttrPairStr=function(r,t,e){return e||(t=this.options.attributeValueProcessor(r,""+t),t=this.replaceEntitiesValue(t)),this.options.suppressBooleanAttributes&&t==="true"?" "+r:" "+r+'="'+t+'"'},ut.prototype.extractAttributes=function(r){if(!r||typeof r!="object")return null;let t={},e=!1;if(this.options.attributesGroupName&&r[this.options.attributesGroupName]){let i=r[this.options.attributesGroupName];for(let n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n.startsWith(this.options.attributeNamePrefix)?n.substring(this.options.attributeNamePrefix.length):n]=i[n],e=!0)}else for(let i in r){if(!Object.prototype.hasOwnProperty.call(r,i))continue;let n=this.isAttribute(i);n&&(t[n]=r[i],e=!0)}return e?t:null},ut.prototype.buildRawContent=function(r){if(typeof r=="string")return r;if(typeof r!="object"||r===null)return String(r);if(r[this.options.textNodeName]!==void 0)return r[this.options.textNodeName];let t="";for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e)||this.isAttribute(e)||this.options.attributesGroupName&&e===this.options.attributesGroupName)continue;let i=r[e];if(e===this.options.textNodeName)t+=i;else if(Array.isArray(i)){for(let n of i)if(typeof n=="string"||typeof n=="number")t+=`<${e}>${n}</${e}>`;else if(typeof n=="object"&&n!==null){let o=this.buildRawContent(n),u=this.buildAttributesForStopNode(n);t+=o===""?`<${e}${u}/>`:`<${e}${u}>${o}</${e}>`}}else if(typeof i=="object"&&i!==null){let n=this.buildRawContent(i),o=this.buildAttributesForStopNode(i);t+=n===""?`<${e}${o}/>`:`<${e}${o}>${n}</${e}>`}else t+=`<${e}>${i}</${e}>`}return t},ut.prototype.buildAttributesForStopNode=function(r){if(!r||typeof r!="object")return"";let t="";if(this.options.attributesGroupName&&r[this.options.attributesGroupName]){let e=r[this.options.attributesGroupName];for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;let n=i.startsWith(this.options.attributeNamePrefix)?i.substring(this.options.attributeNamePrefix.length):i,o=e[i];o===!0&&this.options.suppressBooleanAttributes?t+=" "+n:t+=" "+n+'="'+o+'"'}}else for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e))continue;let i=this.isAttribute(e);if(i){let n=r[e];n===!0&&this.options.suppressBooleanAttributes?t+=" "+i:t+=" "+i+'="'+n+'"'}}return t},ut.prototype.buildObjectNode=function(r,t,e,i){if(r==="")return t[0]==="?"?this.indentate(i)+"<"+t+e+"?"+this.tagEndChar:this.indentate(i)+"<"+t+e+this.closeTag(t)+this.tagEndChar;{let n="</"+t+this.tagEndChar,o="";return t[0]==="?"&&(o="?",n=""),!e&&e!==""||r.indexOf("<")!==-1?this.options.commentPropName!==!1&&t===this.options.commentPropName&&o.length===0?this.indentate(i)+`<!--${r}-->`+this.newLine:this.indentate(i)+"<"+t+e+o+this.tagEndChar+r+this.indentate(i)+n:this.indentate(i)+"<"+t+e+o+">"+r+n}},ut.prototype.closeTag=function(r){let t="";return this.options.unpairedTags.indexOf(r)!==-1?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${r}`,t},ut.prototype.checkStopNode=function(r){if(!this.stopNodeExpressions||this.stopNodeExpressions.length===0)return!1;for(let t=0;t<this.stopNodeExpressions.length;t++)if(r.matches(this.stopNodeExpressions[t]))return!0;return!1},ut.prototype.buildTextValNode=function(r,t,e,i,n){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName){let o=String(r).replace(/\]\]>/g,"]]]]><![CDATA[>");return this.indentate(i)+`<![CDATA[${o}]]>`+this.newLine}if(this.options.commentPropName!==!1&&t===this.options.commentPropName){let o=String(r).replace(/--/g,"- -").replace(/-$/,"- ");return this.indentate(i)+`<!--${o}-->`+this.newLine}if(t[0]==="?")return this.indentate(i)+"<"+t+e+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(t,r);return o=this.replaceEntitiesValue(o),o===""?this.indentate(i)+"<"+t+e+this.closeTag(t)+this.tagEndChar:this.indentate(i)+"<"+t+e+">"+o+"</"+t+this.tagEndChar}},ut.prototype.replaceEntitiesValue=function(r){if(r&&r.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){let e=this.options.entities[t];r=r.replace(e.regex,e.val)}return r};let Pe=ut,_e={validate:c};R.exports=h})()},{}],2:[function(T,R,N){var M=Object.prototype.hasOwnProperty,h=Object.prototype.toString;R.exports=function(y,w,I){if(h.call(w)!=="[object Function]")throw new TypeError("iterator must be a function");var C=y.length;if(C===+C)for(var $=0;$<C;$++)w.call(I,y[$],$,y);else for(var l in y)M.call(y,l)&&w.call(I,y[l],l,y)}},{}],3:[function(T,R,N){"use strict";var M=T("foreach");R.exports=h;function h(_,y,w){if(arguments.length===3)return h.set(_,y,w);if(arguments.length===2)return h.get(_,y);var I=h.bind(h,_);for(var C in h)h.hasOwnProperty(C)&&(I[C]=h[C].bind(I,_));return I}h.get=function(y,w){for(var I=Array.isArray(w)?w:h.parse(w),C=0;C<I.length;++C){var $=I[C];if(!(typeof y=="object"&&$ in y))throw new Error("Invalid reference token: "+$);y=y[$]}return y},h.set=function(y,w,I){var C=Array.isArray(w)?w:h.parse(w),$=C[0];if(C.length===0)throw Error("Can not set the root object");for(var l=0;l<C.length-1;++l){var c=C[l];typeof c!="string"&&typeof c!="number"&&(c=String(c)),!(c==="__proto__"||c==="constructor"||c==="prototype")&&(c==="-"&&Array.isArray(y)&&(c=y.length),$=C[l+1],c in y||($.match(/^(\d+|-)$/)?y[c]=[]:y[c]={}),y=y[c])}return $==="-"&&Array.isArray(y)&&($=y.length),y[$]=I,this},h.remove=function(_,y){var w=Array.isArray(y)?y:h.parse(y),I=w[w.length-1];if(I===void 0)throw new Error('Invalid JSON pointer for remove: "'+y+'"');var C=h.get(_,w.slice(0,-1));if(Array.isArray(C)){var $=+I;if(I===""&&isNaN($))throw new Error('Invalid array index: "'+I+'"');Array.prototype.splice.call(C,$,1)}else delete C[I]},h.dict=function(y,w){var I={};return h.walk(y,function(C,$){I[$]=C},w),I},h.walk=function(y,w,I){var C=[];I=I||function($){var l=Object.prototype.toString.call($);return l==="[object Object]"||l==="[object Array]"},(function $(l){M(l,function(c,v){C.push(String(v)),I(c)?$(c):w(c,h.compile(C)),C.pop()})})(y)},h.has=function(y,w){try{h.get(y,w)}catch{return!1}return!0},h.escape=function(y){return y.toString().replace(/~/g,"~0").replace(/\//g,"~1")},h.unescape=function(y){return y.replace(/~1/g,"/").replace(/~0/g,"~")},h.parse=function(y){if(y==="")return[];if(y.charAt(0)!=="/")throw new Error("Invalid JSON pointer: "+y);return y.substring(1).split(/\//).map(h.unescape)},h.compile=function(y){return y.length===0?"":"/"+y.map(h.escape).join("/")}},{foreach:2}],4:[function(T,R,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.allOfSample=$;var M=T("./traverse"),h=T("./utils");function _(l,c){var v=Object.keys(l);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(l);c&&(P=P.filter(function(E){return Object.getOwnPropertyDescriptor(l,E).enumerable})),v.push.apply(v,P)}return v}function y(l){for(var c=1;c<arguments.length;c++){var v=arguments[c]!=null?arguments[c]:{};c%2?_(Object(v),!0).forEach(function(P){w(l,P,v[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(v)):_(Object(v)).forEach(function(P){Object.defineProperty(l,P,Object.getOwnPropertyDescriptor(v,P))})}return l}function w(l,c,v){return(c=I(c))in l?Object.defineProperty(l,c,{value:v,enumerable:!0,configurable:!0,writable:!0}):l[c]=v,l}function I(l){var c=C(l,"string");return typeof c=="symbol"?c:c+""}function C(l,c){if(typeof l!="object"||!l)return l;var v=l[Symbol.toPrimitive];if(v!==void 0){var P=v.call(l,c||"default");if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(l)}function $(l,c,v,P,E){let F=(0,M.traverse)(l,v,P),q=[];for(let W of c){let{type:U,readOnly:Y,writeOnly:f,value:g}=(0,M.traverse)(y({type:F.type},W),v,P,y(y({},E),{},{isAllOfChild:!0}));F.type&&U&&U!==F.type&&(console.warn("allOf: schemas with different types can't be merged"),F.type=U),F.type=F.type||U,F.readOnly=F.readOnly||Y,F.writeOnly=F.writeOnly||f,g!=null&&q.push(g)}if(F.type==="object"){F.value=(0,h.mergeDeep)(F.value||{},...q.filter(W=>typeof W=="object"));for(let W in F.value)F.value[W]===h.SKIP_SYMBOL&&delete F.value[W];return F}else{F.type==="array"&&(v.quiet||console.warn('OpenAPI Sampler: found allOf with "array" type. Result may be incorrect'));let W=q[q.length-1];return F.value=W??F.value,F}}},{"./traverse":14,"./utils":15}],5:[function(T,R,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.inferType=h;let M={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 h(_){if(_.type!==void 0)return Array.isArray(_.type)?_.type.length===0?null:_.type[0]:_.type;let y=Object.keys(M);for(var w=0;w<y.length;w++){let I=y[w],C=M[I];if(_[I]!==void 0)return C}return null}},{}],6:[function(T,R,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N._registerSampler=l,N._samplers=void 0,Object.defineProperty(N,"inferType",{enumerable:!0,get:function(){return y.inferType}}),N.sample=$;var M=T("./traverse"),h=T("./samplers/index"),_=T("fast-xml-parser"),y=T("./infer"),w=N._samplers={};let I={skipReadOnly:!1,maxSampleDepth:15};function C(c,v){if(!c)throw new Error("Unknown format output for building XML.");if(Array.isArray(c)||Object.keys(c).length>1){var P;c={[(v==null||(P=v.xml)===null||P===void 0?void 0:P.name)||"root"]:c}}return new _.XMLBuilder({ignoreAttributes:!1,format:!0,attributeNamePrefix:"$",textNodeName:"#text",cdataPropName:"#cdata"}).build(c)}function $(c,v,P){let E=Object.assign({},I,v);(0,M.clearCache)();let F=(0,M.traverse)(c,E,P).value;return E?.format==="xml"?C(F,c):F}function l(c,v){w[c]=v}l("array",h.sampleArray),l("boolean",h.sampleBoolean),l("integer",h.sampleNumber),l("number",h.sampleNumber),l("object",h.sampleObject),l("string",h.sampleString)},{"./infer":5,"./samplers/index":9,"./traverse":14,"fast-xml-parser":1}],7:[function(T,R,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.sampleArray=$;var M=T("../traverse"),h=T("../utils");function _(l,c){var v=Object.keys(l);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(l);c&&(P=P.filter(function(E){return Object.getOwnPropertyDescriptor(l,E).enumerable})),v.push.apply(v,P)}return v}function y(l){for(var c=1;c<arguments.length;c++){var v=arguments[c]!=null?arguments[c]:{};c%2?_(Object(v),!0).forEach(function(P){w(l,P,v[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(v)):_(Object(v)).forEach(function(P){Object.defineProperty(l,P,Object.getOwnPropertyDescriptor(v,P))})}return l}function w(l,c,v){return(c=I(c))in l?Object.defineProperty(l,c,{value:v,enumerable:!0,configurable:!0,writable:!0}):l[c]=v,l}function I(l){var c=C(l,"string");return typeof c=="symbol"?c:c+""}function C(l,c){if(typeof l!="object"||!l)return l;var v=l[Symbol.toPrimitive];if(v!==void 0){var P=v.call(l,c||"default");if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(l)}function $(l){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=arguments.length>2?arguments[2]:void 0,P=arguments.length>3?arguments[3]:void 0,E=P&&P.depth||1,F=Math.min(l.maxItems!=null?l.maxItems:1/0,l.minItems||1),q=l.prefixItems||l.items||l.contains;Array.isArray(q)&&(F=Math.max(F,q.length));let W=f=>Array.isArray(q)?q[f]||{}:q||{},U=[];if(!q)return U;for(let f=0;f<F;f++){let g=W(f),{value:a}=(0,M.traverse)(g,c,v,{depth:E+1});if(c?.format==="xml"){let{value:x,propertyName:b}=(0,h.applyXMLAttributes)({value:a},g,P);if(b){var Y;(Y=U)!==null&&Y!==void 0&&Y[b]||(U=y(y({},U),{},{[b]:[]})),U[b].push(x)}else U=y(y({},U),x)}else U.push(a)}if(c?.format==="xml"&&E===1){let{value:f,propertyName:g}=(0,h.applyXMLAttributes)({value:null},l,P);g&&(f?U=Array.isArray(U)?{[g]:y(y({},f),U.map(a=>({"#text":y({},a)})))}:{[g]:y(y({},U),f)}:U={[g]:U})}return U}},{"../traverse":14,"../utils":15}],8:[function(T,R,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.sampleBoolean=M;function M(h){return!0}},{}],9:[function(T,R,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),Object.defineProperty(N,"sampleArray",{enumerable:!0,get:function(){return M.sampleArray}}),Object.defineProperty(N,"sampleBoolean",{enumerable:!0,get:function(){return h.sampleBoolean}}),Object.defineProperty(N,"sampleNumber",{enumerable:!0,get:function(){return _.sampleNumber}}),Object.defineProperty(N,"sampleObject",{enumerable:!0,get:function(){return y.sampleObject}}),Object.defineProperty(N,"sampleString",{enumerable:!0,get:function(){return w.sampleString}});var M=T("./array"),h=T("./boolean"),_=T("./number"),y=T("./object"),w=T("./string")},{"./array":7,"./boolean":8,"./number":10,"./object":11,"./string":13}],10:[function(T,R,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.sampleNumber=M;function M(h){let _=0;if(h.type==="number"&&(h.format==="float"||h.format==="double")&&(_=.1),typeof h.exclusiveMinimum=="boolean"||typeof h.exclusiveMaximum=="boolean"){if(h.maximum&&h.minimum)return _=h.exclusiveMinimum?Math.floor(h.minimum)+1:h.minimum,(h.exclusiveMaximum&&_>=h.maximum||!h.exclusiveMaximum&&_>h.maximum)&&(_=(h.maximum+h.minimum)/2),_;if(h.minimum)return h.exclusiveMinimum?Math.floor(h.minimum)+1:h.minimum;if(h.maximum)return h.exclusiveMaximum?h.maximum>0?0:Math.floor(h.maximum)-1:h.maximum>0?0:h.maximum}else{if(h.minimum)return h.minimum;h.exclusiveMinimum?(_=Math.floor(h.exclusiveMinimum)+1,_===h.exclusiveMaximum&&(_=(_+Math.floor(h.exclusiveMaximum)-1)/2)):h.exclusiveMaximum?_=Math.floor(h.exclusiveMaximum)-1:h.maximum&&(_=h.maximum)}return _}},{}],11:[function(T,R,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.sampleObject=$;var M=T("../traverse"),h=T("../utils");function _(l,c){var v=Object.keys(l);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(l);c&&(P=P.filter(function(E){return Object.getOwnPropertyDescriptor(l,E).enumerable})),v.push.apply(v,P)}return v}function y(l){for(var c=1;c<arguments.length;c++){var v=arguments[c]!=null?arguments[c]:{};c%2?_(Object(v),!0).forEach(function(P){w(l,P,v[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(v)):_(Object(v)).forEach(function(P){Object.defineProperty(l,P,Object.getOwnPropertyDescriptor(v,P))})}return l}function w(l,c,v){return(c=I(c))in l?Object.defineProperty(l,c,{value:v,enumerable:!0,configurable:!0,writable:!0}):l[c]=v,l}function I(l){var c=C(l,"string");return typeof c=="symbol"?c:c+""}function C(l,c){if(typeof l!="object"||!l)return l;var v=l[Symbol.toPrimitive];if(v!==void 0){var P=v.call(l,c||"default");if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(l)}function $(l){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=arguments.length>2?arguments[2]:void 0,P=arguments.length>3?arguments[3]:void 0,E={},F=P&&P.depth||1;if(l&&typeof l.properties=="object"){let q=Array.isArray(l.required)?l.required:[],W={};for(let U of q)W[U]=!0;Object.keys(l.properties).forEach(U=>{if(c.skipNonRequired&&!W.hasOwnProperty(U))return;let Y=(0,M.traverse)(l.properties[U],c,v,{propertyName:U,depth:F+1});if(c.skipReadOnly&&Y.readOnly){P!=null&&P.isAllOfChild&&(E[U]=h.SKIP_SYMBOL);return}if(c.skipWriteOnly&&Y.writeOnly){P!=null&&P.isAllOfChild&&(E[U]=h.SKIP_SYMBOL);return}if(c?.format==="xml"){let{propertyName:f,value:g}=(0,h.applyXMLAttributes)(Y,l.properties[U],{propertyName:U});f?E[f]=g:g!==null&&typeof g=="object"&&(E=y(y({},E),g))}else E[U]=Y.value})}if(l&&typeof l.additionalProperties=="object"){let q=l.additionalProperties["x-additionalPropertiesName"]||"property";E["".concat(String(q),"1")]=(0,M.traverse)(l.additionalProperties,c,v,{depth:F+1}).value,E["".concat(String(q),"2")]=(0,M.traverse)(l.additionalProperties,c,v,{depth:F+1}).value}if(l&&typeof l.properties=="object"&&l.maxProperties!==void 0&&Object.keys(E).length>l.maxProperties){let q={},W=0;(Array.isArray(l.required)?l.required:[]).forEach(Y=>{E[Y]!==void 0&&(q[Y]=E[Y],W++)}),Object.keys(E).forEach(Y=>{W<l.maxProperties&&!q.hasOwnProperty(Y)&&(q[Y]=E[Y],W++)}),E=q}return E}},{"../traverse":14,"../utils":15}],12:[function(T,R,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.regexSample=y;function M(){return!0}function h(w,I){return w}function _(w,I,C){let $=1;if(w)switch(w){case"?":{$=M()?0:1;break}case"*":{$=h(0,8);break}case"+":{$=h(1,8);break}default:throw new Error("Unknown quantifier symbol provided.")}else I!=null&&C!=null?$=h(parseInt(I),parseInt(C)):I!=null&&C==null&&($=parseInt(I));return $}function y(w){let I=!1;if(w instanceof RegExp){var C,$;I=w.flags.includes("i"),w=w.toString(),w=(C=($=w.match(/\/(.+?)\//))===null||$===void 0?void 0:$[1])!==null&&C!==void 0?C:""}w=w.replace(/^(\^)?(.*?)(\$)?$/,"$2");let l,c,v,P=/([.A-Za-z0-9])(?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+))(?![^[]*]|[^{]*})/,E=w.match(P);for(;E!=null;){let Y=E[2],f=E[3],g=E[4];v=_(g,Y,f),w=w.slice(0,E.index)+E[1].repeat(v)+w.slice(E.index+E[0].length),E=w.match(P)}let F=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,q=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+)|)/;for(E=w.match(q);E!=null;){let Y=E[1]==="^",f=E[2]==="-",g=E[4],a=E[5],x=E[6],b=[],A=E[3],G=A.match(F);for(f&&b.push(45);G!=null;){if(G[0].indexOf("-")===-1)I&&isNaN(Number(G[0]))?(b.push(G[0].toUpperCase().charCodeAt(0)),b.push(G[0].toLowerCase().charCodeAt(0))):b.push(G[0].charCodeAt(0));else{let J=G[0].split("-").map(S=>S.charCodeAt(0));if(l=J[0],c=J[1],l>c)throw new Error("Character range provided is out of order.");for(let S=l;S<=c;S++)if(I&&isNaN(Number(String.fromCharCode(S)))){let B=String.fromCharCode(S);b.push(B.toUpperCase().charCodeAt(0)),b.push(B.toLowerCase().charCodeAt(0))}else b.push(S)}A=A.substring(G[0].length),G=A.match(F)}if(v=_(x,g,a),Y){let J=-1;for(let S=48;S<=57;S++){if(J=b.indexOf(S),J>-1){b.splice(J,1);continue}b.push(S)}for(let S=65;S<=90;S++){if(J=b.indexOf(S),J>-1){b.splice(J,1);continue}b.push(S)}for(let S=97;S<=122;S++){if(J=b.indexOf(S),J>-1){b.splice(J,1);continue}b.push(S)}}let Z=Array.from({length:v},()=>String.fromCharCode(b[h(0,b.length-1)])).join("");w=w.slice(0,E.index)+Z+w.slice(E.index+E[0].length),E=w.match(q)}let W=/(.)\{(\d+)\,(\d+)\}/;for(E=w.match(W);E!=null;){if(l=parseInt(E[2]),c=parseInt(E[3]),l>c)throw new Error("Numbers out of order in {} quantifier.");v=h(l,c),w=w.slice(0,E.index)+E[1].repeat(v)+w.slice(E.index+E[0].length),E=w.match(W)}let U=/(.)\{(\d+)\}/;for(E=w.match(U);E!=null;)v=parseInt(E[2]),w=w.slice(0,E.index)+E[1].repeat(v)+w.slice(E.index+E[0].length),E=w.match(U);return w}},{}],13:[function(T,R,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.sampleString=J;var M=T("../utils"),h=_(T("./string-regex"));function _(S,B){if(typeof WeakMap=="function")var X=new WeakMap,H=new WeakMap;return(_=function(z,K){if(!K&&z&&z.__esModule)return z;var nt,lt,ht={__proto__:null,default:z};if(z===null||typeof z!="object"&&typeof z!="function")return ht;if(nt=K?H:X){if(nt.has(z))return nt.get(z);nt.set(z,ht)}for(let ct in z)ct!=="default"&&{}.hasOwnProperty.call(z,ct)&&((lt=(nt=Object.defineProperty)&&Object.getOwnPropertyDescriptor(z,ct))&&(lt.get||lt.set)?nt(ht,ct,lt):ht[ct]=z[ct]);return ht})(S,B)}let y="qwerty!@#$%^123456";function w(){return"user@example.com"}function I(){return"\u043F\u043E\u0448\u0442\u0430@\u0443\u043A\u0440.\u043D\u0435\u0442"}function C(S,B){let X="pa$$word";return S>X.length&&(X+="_",X+=(0,M.ensureMinLength)(y,S-X.length).substring(0,S-X.length)),X}function $(S){let{min:B,max:X,omitTime:H,omitDate:z}=S,K=(0,M.toRFCDateTime)(new Date("2019-08-24T14:15:22.123Z"),H,z,!1);return K.length<B&&console.warn("Using minLength = ".concat(B,' is incorrect with format "date-time"')),X&&K.length>X&&console.warn("Using maxLength = ".concat(X,' is incorrect with format "date-time"')),K}function l(S,B){return $({min:S,max:B,omitTime:!1,omitDate:!1})}function c(S,B){return $({min:S,max:B,omitTime:!0,omitDate:!1})}function v(S,B){return $({min:S,max:B,omitTime:!1,omitDate:!0}).slice(1)}function P(S,B,X,H){let z=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(H&&z)return h.regexSample(H);let K=(0,M.ensureMinLength)("string",S);return B&&K.length>B&&(K=K.substring(0,B)),K}function E(){return"192.168.0.1"}function F(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}function q(){return"example.com"}function W(){return"\u043F\u0440\u0438\u043A\u043B\u0430\u0434.\u0443\u043A\u0440"}function U(){return"http://example.com"}function Y(){return"../dictionary"}function f(){return"http://example.com/{endpoint}"}function g(){return"http://example.com/entity/1"}function a(){return"/entity/1"}function x(S,B,X){return(0,M.uuid)(X||"id")}function b(){return"/json/pointer"}function A(){return"1/relative/json/pointer"}function G(){return"/regex/"}let Z={email:w,"idn-email":I,password:C,"date-time":l,date:c,time:v,ipv4:E,ipv6:F,hostname:q,"idn-hostname":W,iri:g,"iri-reference":a,uri:U,"uri-reference":Y,"uri-template":f,uuid:x,default:P,"json-pointer":b,"relative-json-pointer":A,regex:G};function J(S,B,X,H){let z=S.format||"default",K=Z[z]||P,nt=H&&H.propertyName;return K(S.minLength||0,S.maxLength,nt,S.pattern,B?.enablePatterns)}},{"../utils":15,"./string-regex":12}],14:[function(T,R,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.clearCache=U,N.traverse=g;var M=T("./openapi-sampler"),h=T("./allOf"),_=T("./infer"),y=T("./utils"),w=C(T("json-pointer"));let I=["if","then"];function C(a){return a&&a.__esModule?a:{default:a}}function $(a,x){if(a==null)return{};var b,A,G=l(a,x);if(Object.getOwnPropertySymbols){var Z=Object.getOwnPropertySymbols(a);for(A=0;A<Z.length;A++)b=Z[A],x.indexOf(b)===-1&&{}.propertyIsEnumerable.call(a,b)&&(G[b]=a[b])}return G}function l(a,x){if(a==null)return{};var b={};for(var A in a)if({}.hasOwnProperty.call(a,A)){if(x.indexOf(A)!==-1)continue;b[A]=a[A]}return b}function c(a,x){var b=Object.keys(a);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(a);x&&(A=A.filter(function(G){return Object.getOwnPropertyDescriptor(a,G).enumerable})),b.push.apply(b,A)}return b}function v(a){for(var x=1;x<arguments.length;x++){var b=arguments[x]!=null?arguments[x]:{};x%2?c(Object(b),!0).forEach(function(A){P(a,A,b[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):c(Object(b)).forEach(function(A){Object.defineProperty(a,A,Object.getOwnPropertyDescriptor(b,A))})}return a}function P(a,x,b){return(x=E(x))in a?Object.defineProperty(a,x,{value:b,enumerable:!0,configurable:!0,writable:!0}):a[x]=b,a}function E(a){var x=F(a,"string");return typeof x=="symbol"?x:x+""}function F(a,x){if(typeof a!="object"||!a)return a;var b=a[Symbol.toPrimitive];if(b!==void 0){var A=b.call(a,x||"default");if(typeof A!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(x==="string"?String:Number)(a)}let q={},W=[];function U(){q={},W=[]}function Y(a){let x;return a.const!==void 0?x=a.const:a.examples!==void 0&&a.examples.length?x=a.examples[0]:a.enum!==void 0&&a.enum.length?x=a.enum[0]:a.default!==void 0&&(x=a.default),x}function f(a){let x=Y(a);if(x!==void 0)return{value:x,readOnly:a.readOnly,writeOnly:a.writeOnly,type:null}}function g(a,x,b,A){if(A){if(W.includes(a))return(0,y.getResultForCircular)((0,_.inferType)(a));W.push(a)}if(A&&A.depth>x.maxSampleDepth)return(0,y.popSchemaStack)(W,A),(0,y.getResultForCircular)((0,_.inferType)(a));if(a.$ref){if(!b)throw new Error("Your schema contains $ref. You must provide full specification in the third parameter.");let S=decodeURIComponent(a.$ref);S.startsWith("#")&&(S=S.substring(1));let B=w.default.get(b,S),X;if(q[S]!==!0){q[S]=!0;let H=g(B,x,b,A);if(x.format==="xml"){let z=S.split("/").pop(),K=v(v({},A),{},{propertyName:A?.propertyName||z}),{propertyName:nt,value:lt}=(0,y.applyXMLAttributes)(H,B,K);X=v(v({},H),{},{value:{[nt||"root"]:lt}})}else X=H;q[S]=!1}else{let H=(0,_.inferType)(B);X=(0,y.getResultForCircular)(H)}return(0,y.popSchemaStack)(W,A),X}if(a.example!==void 0)return(0,y.popSchemaStack)(W,A),{value:a.example,readOnly:a.readOnly,writeOnly:a.writeOnly,type:a.type};if(a.allOf!==void 0)return(0,y.popSchemaStack)(W,A),f(a)||(0,h.allOfSample)(v(v({},a),{},{allOf:void 0}),a.allOf,x,b,A);if(a.oneOf&&a.oneOf.length){a.anyOf&&(x.quiet||console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf")),(0,y.popSchemaStack)(W,A);let S=Object.assign({readOnly:a.readOnly,writeOnly:a.writeOnly},a.oneOf[0]);return J(a,S)}if(a.anyOf&&a.anyOf.length){(0,y.popSchemaStack)(W,A);let S=Object.assign({readOnly:a.readOnly,writeOnly:a.writeOnly},a.anyOf[0]);return J(a,S)}if(a.if&&a.then){(0,y.popSchemaStack)(W,A);let{if:S,then:B}=a,X=$(a,I);return g((0,y.mergeDeep)(X,S,B),x,b,A)}let G=Y(a),Z=null;if(G===void 0){G=null,Z=a.type,Array.isArray(Z)&&a.type.length>0&&(Z=a.type[0]),Z||(Z=(0,_.inferType)(a));let S=M._samplers[Z];S&&(G=S(a,x,b,A))}return(0,y.popSchemaStack)(W,A),{value:G,readOnly:a.readOnly,writeOnly:a.writeOnly,type:Z};function J(S,B){let X=f(S);if(X!==void 0)return X;let H=g(v(v({},S),{},{oneOf:void 0,anyOf:void 0}),x,b,A),z=g(B,x,b,A);if(typeof H.value=="object"&&typeof z.value=="object"){let K=(0,y.mergeDeep)(H.value,z.value);return v(v({},z),{},{value:K})}return z}}},{"./allOf":4,"./infer":5,"./openapi-sampler":6,"./utils":15,"json-pointer":3}],15:[function(T,R,N){"use strict";Object.defineProperty(N,"__esModule",{value:!0}),N.SKIP_SYMBOL=void 0,N.applyXMLAttributes=W,N.ensureMinLength=l,N.getResultForCircular=P,N.getXMLAttributes=F,N.mergeDeep=c,N.popSchemaStack=E,N.toRFCDateTime=$,N.uuid=v;function M(f,g){var a=Object.keys(f);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(f);g&&(x=x.filter(function(b){return Object.getOwnPropertyDescriptor(f,b).enumerable})),a.push.apply(a,x)}return a}function h(f){for(var g=1;g<arguments.length;g++){var a=arguments[g]!=null?arguments[g]:{};g%2?M(Object(a),!0).forEach(function(x){_(f,x,a[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(a)):M(Object(a)).forEach(function(x){Object.defineProperty(f,x,Object.getOwnPropertyDescriptor(a,x))})}return f}function _(f,g,a){return(g=y(g))in f?Object.defineProperty(f,g,{value:a,enumerable:!0,configurable:!0,writable:!0}):f[g]=a,f}function y(f){var g=w(f,"string");return typeof g=="symbol"?g:g+""}function w(f,g){if(typeof f!="object"||!f)return f;var a=f[Symbol.toPrimitive];if(a!==void 0){var x=a.call(f,g||"default");if(typeof x!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(g==="string"?String:Number)(f)}let I=N.SKIP_SYMBOL=Symbol("skip");function C(f){return f<10?"0"+f:f}function $(f,g,a,x){var b=a?"":f.getUTCFullYear()+"-"+C(f.getUTCMonth()+1)+"-"+C(f.getUTCDate());return g||(b+="T"+C(f.getUTCHours())+":"+C(f.getUTCMinutes())+":"+C(f.getUTCSeconds())+(x?"."+(f.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5):"")+"Z"),b}function l(f,g){return g>f.length?f.repeat(Math.trunc(g/f.length)+1).substring(0,g):f}function c(){let f=b=>b&&typeof b=="object";for(var g=arguments.length,a=new Array(g),x=0;x<g;x++)a[x]=arguments[x];return a.reduce((b,A)=>(Object.keys(A||{}).forEach(G=>{let Z=b[G],J=A[G];f(Z)&&f(J)?b[G]=c(Z,J):b[G]=J}),b),Array.isArray(a[a.length-1])?[]:{})}function v(f){var g=U(f),a=Y(g,g,g,g),x="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,b=>{var A=a()*16%16|0;return(b=="x"?A:A&3|8).toString(16)});return x}function P(f){return{value:f==="object"?{}:f==="array"?[]:void 0}}function E(f,g){g&&f.pop()}function F(f){var g,a,x,b,A,G,Z;return{name:(f==null||(g=f.xml)===null||g===void 0?void 0:g.name)||"",prefix:(f==null||(a=f.xml)===null||a===void 0?void 0:a.prefix)||"",namespace:(f==null||(x=f.xml)===null||x===void 0?void 0:x.namespace)||null,attribute:(b=f==null||(A=f.xml)===null||A===void 0?void 0:A.attribute)!==null&&b!==void 0?b:!1,wrapped:(G=f==null||(Z=f.xml)===null||Z===void 0?void 0:Z.wrapped)!==null&&G!==void 0?G:!1}}function q(f){let g=f?.xml;return g!=null&&g.nodeType?g.nodeType:g?.attribute===!0?"attribute":g?.wrapped===!0&&f?.type==="array"?"element":f!=null&&f.$ref||f!=null&&f.$dynamicRef||f?.type==="array"||f!=null&&f.oneOf||f!=null&&f.anyOf||f!=null&&f.allOf?"none":"element"}function W(f){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{value:x}=f,{propertyName:b}=a,{name:A,prefix:G,namespace:Z}=F(g),J=q(g),S=A||b?"".concat(G?G+":":"").concat(A||b):null,B=typeof x=="object"?Array.isArray(x)?[...x]:h({},x):x;switch(J){case"attribute":S&&(S="$".concat(S));break;case"text":S="#text";break;case"cdata":S="#cdata";break;case"none":if(g.type==="array"){if(S=null,g.example!==void 0){var X;S=((X=g.items)===null||X===void 0||(X=X.xml)===null||X===void 0?void 0:X.name)||S}}else S=null;break;default:g.type==="array"&&Array.isArray(B)&&(B={[S]:[...B]});break}return Z&&J!=="text"&&J!=="cdata"&&J!=="none"&&(typeof B=="object"?B["$xmlns".concat(G?":"+G:"")]=Z:B={["$xmlns".concat(G?":"+G:"")]:Z,"#text":B}),{propertyName:S,value:B}}function U(f){var g=0;if(f.length==0)return g;for(var a=0;a<f.length;a++){var x=f.charCodeAt(a);g=(g<<5)-g+x,g=g&g}return g}function Y(f,g,a,x){return function(){f|=0,g|=0,a|=0,x|=0;var b=f-(g<<27|g>>>5)|0;return f=g^(a<<17|a>>>15),g=a+x|0,a=x+b|0,x=f+b|0,(x>>>0)/4294967296}}},{}]},{},[6])(6)})});export{je as a,Me as b};
13
+ `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Oe(r,t,e,i){let n=this.extractAttributes(r);if(i.push(t,n),this.checkStopNode(i)){let u=this.buildRawContent(r),s=this.buildAttributesForStopNode(r);return i.pop(),this.buildObjectNode(u,t,s,e)}let o=this.j2x(r,e+1,i);return i.pop(),r[this.options.textNodeName]!==void 0&&Object.keys(r).length===1?this.buildTextValNode(r[this.options.textNodeName],t,o.attrStr,e,i):this.buildObjectNode(o.val,t,o.attrStr,e)}function Ee(r){return this.options.indentBy.repeat(r)}function Se(r){return!(!r.startsWith(this.options.attributeNamePrefix)||r===this.options.textNodeName)&&r.substr(this.attrPrefixLen)}ut.prototype.build=function(r){if(this.options.preserveOrder)return be(r,this.options);{Array.isArray(r)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(r={[this.options.arrayNodeName]:r});let t=new vt;return this.j2x(r,0,t).val}},ut.prototype.j2x=function(r,t,e){let i="",n="";if(this.options.maxNestedTags&&e.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");let o=this.options.jPath?e.toString():e,u=this.checkStopNode(e);for(let s in r)if(Object.prototype.hasOwnProperty.call(r,s))if(r[s]===void 0)this.isAttribute(s)&&(n+="");else if(r[s]===null)this.isAttribute(s)||s===this.options.cdataPropName?n+="":s[0]==="?"?n+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if(r[s]instanceof Date)n+=this.buildTextValNode(r[s],s,"",t,e);else if(typeof r[s]!="object"){let d=this.isAttribute(s);if(d&&!this.ignoreAttributesFn(d,o))i+=this.buildAttrPairStr(d,""+r[s],u);else if(!d)if(s===this.options.textNodeName){let p=this.options.tagValueProcessor(s,""+r[s]);n+=this.replaceEntitiesValue(p)}else{e.push(s);let p=this.checkStopNode(e);if(e.pop(),p){let g=""+r[s];n+=g===""?this.indentate(t)+"<"+s+this.closeTag(s)+this.tagEndChar:this.indentate(t)+"<"+s+">"+g+"</"+s+this.tagEndChar}else n+=this.buildTextValNode(r[s],s,"",t,e)}}else if(Array.isArray(r[s])){let d=r[s].length,p="",g="";for(let O=0;O<d;O++){let j=r[s][O];if(j!==void 0)if(j===null)s[0]==="?"?n+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if(typeof j=="object")if(this.options.oneListGroup){e.push(s);let L=this.j2x(j,t+1,e);e.pop(),p+=L.val,this.options.attributesGroupName&&j.hasOwnProperty(this.options.attributesGroupName)&&(g+=L.attrStr)}else p+=this.processTextOrObjNode(j,s,t,e);else if(this.options.oneListGroup){let L=this.options.tagValueProcessor(s,j);L=this.replaceEntitiesValue(L),p+=L}else{e.push(s);let L=this.checkStopNode(e);if(e.pop(),L){let k=""+j;p+=k===""?this.indentate(t)+"<"+s+this.closeTag(s)+this.tagEndChar:this.indentate(t)+"<"+s+">"+k+"</"+s+this.tagEndChar}else p+=this.buildTextValNode(j,s,"",t,e)}}this.options.oneListGroup&&(p=this.buildObjectNode(p,s,g,t)),n+=p}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){let d=Object.keys(r[s]),p=d.length;for(let g=0;g<p;g++)i+=this.buildAttrPairStr(d[g],""+r[s][d[g]],u)}else n+=this.processTextOrObjNode(r[s],s,t,e);return{attrStr:i,val:n}},ut.prototype.buildAttrPairStr=function(r,t,e){return e||(t=this.options.attributeValueProcessor(r,""+t),t=this.replaceEntitiesValue(t)),this.options.suppressBooleanAttributes&&t==="true"?" "+r:" "+r+'="'+t+'"'},ut.prototype.extractAttributes=function(r){if(!r||typeof r!="object")return null;let t={},e=!1;if(this.options.attributesGroupName&&r[this.options.attributesGroupName]){let i=r[this.options.attributesGroupName];for(let n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n.startsWith(this.options.attributeNamePrefix)?n.substring(this.options.attributeNamePrefix.length):n]=i[n],e=!0)}else for(let i in r){if(!Object.prototype.hasOwnProperty.call(r,i))continue;let n=this.isAttribute(i);n&&(t[n]=r[i],e=!0)}return e?t:null},ut.prototype.buildRawContent=function(r){if(typeof r=="string")return r;if(typeof r!="object"||r===null)return String(r);if(r[this.options.textNodeName]!==void 0)return r[this.options.textNodeName];let t="";for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e)||this.isAttribute(e)||this.options.attributesGroupName&&e===this.options.attributesGroupName)continue;let i=r[e];if(e===this.options.textNodeName)t+=i;else if(Array.isArray(i)){for(let n of i)if(typeof n=="string"||typeof n=="number")t+=`<${e}>${n}</${e}>`;else if(typeof n=="object"&&n!==null){let o=this.buildRawContent(n),u=this.buildAttributesForStopNode(n);t+=o===""?`<${e}${u}/>`:`<${e}${u}>${o}</${e}>`}}else if(typeof i=="object"&&i!==null){let n=this.buildRawContent(i),o=this.buildAttributesForStopNode(i);t+=n===""?`<${e}${o}/>`:`<${e}${o}>${n}</${e}>`}else t+=`<${e}>${i}</${e}>`}return t},ut.prototype.buildAttributesForStopNode=function(r){if(!r||typeof r!="object")return"";let t="";if(this.options.attributesGroupName&&r[this.options.attributesGroupName]){let e=r[this.options.attributesGroupName];for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;let n=i.startsWith(this.options.attributeNamePrefix)?i.substring(this.options.attributeNamePrefix.length):i,o=e[i];o===!0&&this.options.suppressBooleanAttributes?t+=" "+n:t+=" "+n+'="'+o+'"'}}else for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e))continue;let i=this.isAttribute(e);if(i){let n=r[e];n===!0&&this.options.suppressBooleanAttributes?t+=" "+i:t+=" "+i+'="'+n+'"'}}return t},ut.prototype.buildObjectNode=function(r,t,e,i){if(r==="")return t[0]==="?"?this.indentate(i)+"<"+t+e+"?"+this.tagEndChar:this.indentate(i)+"<"+t+e+this.closeTag(t)+this.tagEndChar;{let n="</"+t+this.tagEndChar,o="";return t[0]==="?"&&(o="?",n=""),!e&&e!==""||r.indexOf("<")!==-1?this.options.commentPropName!==!1&&t===this.options.commentPropName&&o.length===0?this.indentate(i)+`<!--${r}-->`+this.newLine:this.indentate(i)+"<"+t+e+o+this.tagEndChar+r+this.indentate(i)+n:this.indentate(i)+"<"+t+e+o+">"+r+n}},ut.prototype.closeTag=function(r){let t="";return this.options.unpairedTags.indexOf(r)!==-1?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${r}`,t},ut.prototype.checkStopNode=function(r){if(!this.stopNodeExpressions||this.stopNodeExpressions.length===0)return!1;for(let t=0;t<this.stopNodeExpressions.length;t++)if(r.matches(this.stopNodeExpressions[t]))return!0;return!1},ut.prototype.buildTextValNode=function(r,t,e,i,n){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName){let o=String(r).replace(/\]\]>/g,"]]]]><![CDATA[>");return this.indentate(i)+`<![CDATA[${o}]]>`+this.newLine}if(this.options.commentPropName!==!1&&t===this.options.commentPropName){let o=String(r).replace(/--/g,"- -").replace(/-$/,"- ");return this.indentate(i)+`<!--${o}-->`+this.newLine}if(t[0]==="?")return this.indentate(i)+"<"+t+e+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(t,r);return o=this.replaceEntitiesValue(o),o===""?this.indentate(i)+"<"+t+e+this.closeTag(t)+this.tagEndChar:this.indentate(i)+"<"+t+e+">"+o+"</"+t+this.tagEndChar}},ut.prototype.replaceEntitiesValue=function(r){if(r&&r.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){let e=this.options.entities[t];r=r.replace(e.regex,e.val)}return r};let Pe=ut,_e={validate:c};R.exports=h})()},{}],2:[function(T,R,w){var M=Object.prototype.hasOwnProperty,h=Object.prototype.toString;R.exports=function(y,N,I){if(h.call(N)!=="[object Function]")throw new TypeError("iterator must be a function");var C=y.length;if(C===+C)for(var $=0;$<C;$++)N.call(I,y[$],$,y);else for(var l in y)M.call(y,l)&&N.call(I,y[l],l,y)}},{}],3:[function(T,R,w){"use strict";var M=T("foreach");R.exports=h;function h(_,y,N){if(arguments.length===3)return h.set(_,y,N);if(arguments.length===2)return h.get(_,y);var I=h.bind(h,_);for(var C in h)h.hasOwnProperty(C)&&(I[C]=h[C].bind(I,_));return I}h.get=function(y,N){for(var I=Array.isArray(N)?N:h.parse(N),C=0;C<I.length;++C){var $=I[C];if(!(typeof y=="object"&&$ in y))throw new Error("Invalid reference token: "+$);y=y[$]}return y},h.set=function(y,N,I){var C=Array.isArray(N)?N:h.parse(N),$=C[0];if(C.length===0)throw Error("Can not set the root object");for(var l=0;l<C.length-1;++l){var c=C[l];typeof c!="string"&&typeof c!="number"&&(c=String(c)),!(c==="__proto__"||c==="constructor"||c==="prototype")&&(c==="-"&&Array.isArray(y)&&(c=y.length),$=C[l+1],c in y||($.match(/^(\d+|-)$/)?y[c]=[]:y[c]={}),y=y[c])}return $==="-"&&Array.isArray(y)&&($=y.length),y[$]=I,this},h.remove=function(_,y){var N=Array.isArray(y)?y:h.parse(y),I=N[N.length-1];if(I===void 0)throw new Error('Invalid JSON pointer for remove: "'+y+'"');var C=h.get(_,N.slice(0,-1));if(Array.isArray(C)){var $=+I;if(I===""&&isNaN($))throw new Error('Invalid array index: "'+I+'"');Array.prototype.splice.call(C,$,1)}else delete C[I]},h.dict=function(y,N){var I={};return h.walk(y,function(C,$){I[$]=C},N),I},h.walk=function(y,N,I){var C=[];I=I||function($){var l=Object.prototype.toString.call($);return l==="[object Object]"||l==="[object Array]"},(function $(l){M(l,function(c,v){C.push(String(v)),I(c)?$(c):N(c,h.compile(C)),C.pop()})})(y)},h.has=function(y,N){try{h.get(y,N)}catch{return!1}return!0},h.escape=function(y){return y.toString().replace(/~/g,"~0").replace(/\//g,"~1")},h.unescape=function(y){return y.replace(/~1/g,"/").replace(/~0/g,"~")},h.parse=function(y){if(y==="")return[];if(y.charAt(0)!=="/")throw new Error("Invalid JSON pointer: "+y);return y.substring(1).split(/\//).map(h.unescape)},h.compile=function(y){return y.length===0?"":"/"+y.map(h.escape).join("/")}},{foreach:2}],4:[function(T,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.allOfSample=$;var M=T("./traverse"),h=T("./utils");function _(l,c){var v=Object.keys(l);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(l);c&&(P=P.filter(function(E){return Object.getOwnPropertyDescriptor(l,E).enumerable})),v.push.apply(v,P)}return v}function y(l){for(var c=1;c<arguments.length;c++){var v=arguments[c]!=null?arguments[c]:{};c%2?_(Object(v),!0).forEach(function(P){N(l,P,v[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(v)):_(Object(v)).forEach(function(P){Object.defineProperty(l,P,Object.getOwnPropertyDescriptor(v,P))})}return l}function N(l,c,v){return(c=I(c))in l?Object.defineProperty(l,c,{value:v,enumerable:!0,configurable:!0,writable:!0}):l[c]=v,l}function I(l){var c=C(l,"string");return typeof c=="symbol"?c:c+""}function C(l,c){if(typeof l!="object"||!l)return l;var v=l[Symbol.toPrimitive];if(v!==void 0){var P=v.call(l,c||"default");if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(l)}function $(l,c,v,P,E){let F=(0,M.traverse)(l,v,P),q=[];for(let W of c){let{type:U,readOnly:Y,writeOnly:f,value:m}=(0,M.traverse)(y({type:F.type},W),v,P,y(y({},E),{},{isAllOfChild:!0}));F.type&&U&&U!==F.type&&(console.warn("allOf: schemas with different types can't be merged"),F.type=U),F.type=F.type||U,F.readOnly=F.readOnly||Y,F.writeOnly=F.writeOnly||f,m!=null&&q.push(m)}if(F.type==="object"){F.value=(0,h.mergeDeep)(F.value||{},...q.filter(W=>typeof W=="object"));for(let W in F.value)F.value[W]===h.SKIP_SYMBOL&&delete F.value[W];return F}else{F.type==="array"&&(v.quiet||console.warn('OpenAPI Sampler: found allOf with "array" type. Result may be incorrect'));let W=q[q.length-1];return F.value=W??F.value,F}}},{"./traverse":14,"./utils":15}],5:[function(T,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.inferType=h;let M={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 h(_){if(_.type!==void 0)return Array.isArray(_.type)?_.type.length===0?null:_.type[0]:_.type;let y=Object.keys(M);for(var N=0;N<y.length;N++){let I=y[N],C=M[I];if(_[I]!==void 0)return C}return null}},{}],6:[function(T,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w._registerSampler=l,w._samplers=void 0,Object.defineProperty(w,"inferType",{enumerable:!0,get:function(){return y.inferType}}),w.sample=$;var M=T("./traverse"),h=T("./samplers/index"),_=T("fast-xml-parser"),y=T("./infer"),N=w._samplers={};let I={skipReadOnly:!1,maxSampleDepth:15};function C(c,v){if(!c)throw new Error("Unknown format output for building XML.");if(Array.isArray(c)||Object.keys(c).length>1){var P;c={[(v==null||(P=v.xml)===null||P===void 0?void 0:P.name)||"root"]:c}}return new _.XMLBuilder({ignoreAttributes:!1,format:!0,attributeNamePrefix:"$",textNodeName:"#text",cdataPropName:"#cdata"}).build(c)}function $(c,v,P){let E=Object.assign({},I,v);(0,M.clearCache)();let F=(0,M.traverse)(c,E,P).value;return E?.format==="xml"?C(F,c):F}function l(c,v){N[c]=v}l("array",h.sampleArray),l("boolean",h.sampleBoolean),l("integer",h.sampleNumber),l("number",h.sampleNumber),l("object",h.sampleObject),l("string",h.sampleString)},{"./infer":5,"./samplers/index":9,"./traverse":14,"fast-xml-parser":1}],7:[function(T,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.sampleArray=$;var M=T("../traverse"),h=T("../utils");function _(l,c){var v=Object.keys(l);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(l);c&&(P=P.filter(function(E){return Object.getOwnPropertyDescriptor(l,E).enumerable})),v.push.apply(v,P)}return v}function y(l){for(var c=1;c<arguments.length;c++){var v=arguments[c]!=null?arguments[c]:{};c%2?_(Object(v),!0).forEach(function(P){N(l,P,v[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(v)):_(Object(v)).forEach(function(P){Object.defineProperty(l,P,Object.getOwnPropertyDescriptor(v,P))})}return l}function N(l,c,v){return(c=I(c))in l?Object.defineProperty(l,c,{value:v,enumerable:!0,configurable:!0,writable:!0}):l[c]=v,l}function I(l){var c=C(l,"string");return typeof c=="symbol"?c:c+""}function C(l,c){if(typeof l!="object"||!l)return l;var v=l[Symbol.toPrimitive];if(v!==void 0){var P=v.call(l,c||"default");if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(l)}function $(l){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=arguments.length>2?arguments[2]:void 0,P=arguments.length>3?arguments[3]:void 0,E=P&&P.depth||1,F=Math.min(l.maxItems!=null?l.maxItems:1/0,l.minItems||1),q=l.prefixItems||l.items||l.contains;Array.isArray(q)&&(F=Math.max(F,q.length));let W=f=>Array.isArray(q)?q[f]||{}:q||{},U=[];if(!q)return U;for(let f=0;f<F;f++){let m=W(f),{value:a}=(0,M.traverse)(m,c,v,{depth:E+1});if(c?.format==="xml"){let{value:x,propertyName:b}=(0,h.applyXMLAttributes)({value:a},m,P);if(b){var Y;(Y=U)!==null&&Y!==void 0&&Y[b]||(U=y(y({},U),{},{[b]:[]})),U[b].push(x)}else U=y(y({},U),x)}else U.push(a)}if(c?.format==="xml"&&E===1){let{value:f,propertyName:m}=(0,h.applyXMLAttributes)({value:null},l,P);m&&(f?U=Array.isArray(U)?{[m]:y(y({},f),U.map(a=>({"#text":y({},a)})))}:{[m]:y(y({},U),f)}:U={[m]:U})}return U}},{"../traverse":14,"../utils":15}],8:[function(T,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.sampleBoolean=M;function M(h){return!0}},{}],9:[function(T,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),Object.defineProperty(w,"sampleArray",{enumerable:!0,get:function(){return M.sampleArray}}),Object.defineProperty(w,"sampleBoolean",{enumerable:!0,get:function(){return h.sampleBoolean}}),Object.defineProperty(w,"sampleNumber",{enumerable:!0,get:function(){return _.sampleNumber}}),Object.defineProperty(w,"sampleObject",{enumerable:!0,get:function(){return y.sampleObject}}),Object.defineProperty(w,"sampleString",{enumerable:!0,get:function(){return N.sampleString}});var M=T("./array"),h=T("./boolean"),_=T("./number"),y=T("./object"),N=T("./string")},{"./array":7,"./boolean":8,"./number":10,"./object":11,"./string":13}],10:[function(T,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.sampleNumber=M;function M(h){let _=0;if(h.type==="number"&&(h.format==="float"||h.format==="double")&&(_=.1),typeof h.exclusiveMinimum=="boolean"||typeof h.exclusiveMaximum=="boolean"){if(Number.isFinite(h.maximum)&&Number.isFinite(h.minimum))return _=h.exclusiveMinimum?Math.floor(h.minimum)+1:h.minimum,(h.exclusiveMaximum&&_>=h.maximum||!h.exclusiveMaximum&&_>h.maximum)&&(_=(h.maximum+h.minimum)/2),_;if(Number.isFinite(h.minimum))return h.exclusiveMinimum?Math.floor(h.minimum)+1:h.minimum;if(Number.isFinite(h.maximum))return h.exclusiveMaximum?h.maximum>0?0:Math.floor(h.maximum)-1:h.maximum>0?0:h.maximum}else{if(Number.isFinite(h.minimum))return h.minimum;Number.isFinite(h.exclusiveMinimum)?(_=Math.floor(h.exclusiveMinimum)+1,_===h.exclusiveMaximum&&(_=(_+Math.floor(h.exclusiveMaximum)-1)/2)):Number.isFinite(h.exclusiveMaximum)?_=Math.floor(h.exclusiveMaximum)-1:Number.isFinite(h.maximum)&&(_=h.maximum)}return _}},{}],11:[function(T,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.sampleObject=$;var M=T("../traverse"),h=T("../utils");function _(l,c){var v=Object.keys(l);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(l);c&&(P=P.filter(function(E){return Object.getOwnPropertyDescriptor(l,E).enumerable})),v.push.apply(v,P)}return v}function y(l){for(var c=1;c<arguments.length;c++){var v=arguments[c]!=null?arguments[c]:{};c%2?_(Object(v),!0).forEach(function(P){N(l,P,v[P])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(v)):_(Object(v)).forEach(function(P){Object.defineProperty(l,P,Object.getOwnPropertyDescriptor(v,P))})}return l}function N(l,c,v){return(c=I(c))in l?Object.defineProperty(l,c,{value:v,enumerable:!0,configurable:!0,writable:!0}):l[c]=v,l}function I(l){var c=C(l,"string");return typeof c=="symbol"?c:c+""}function C(l,c){if(typeof l!="object"||!l)return l;var v=l[Symbol.toPrimitive];if(v!==void 0){var P=v.call(l,c||"default");if(typeof P!="object")return P;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(l)}function $(l){let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v=arguments.length>2?arguments[2]:void 0,P=arguments.length>3?arguments[3]:void 0,E={},F=P&&P.depth||1;if(l&&typeof l.properties=="object"){let q=Array.isArray(l.required)?l.required:[],W={};for(let U of q)W[U]=!0;Object.keys(l.properties).forEach(U=>{if(c.skipNonRequired&&!W.hasOwnProperty(U))return;let Y=(0,M.traverse)(l.properties[U],c,v,{propertyName:U,depth:F+1});if(c.skipReadOnly&&Y.readOnly){P!=null&&P.isAllOfChild&&(E[U]=h.SKIP_SYMBOL);return}if(c.skipWriteOnly&&Y.writeOnly){P!=null&&P.isAllOfChild&&(E[U]=h.SKIP_SYMBOL);return}if(c?.format==="xml"){let{propertyName:f,value:m}=(0,h.applyXMLAttributes)(Y,l.properties[U],{propertyName:U});f?E[f]=m:m!==null&&typeof m=="object"&&(E=y(y({},E),m))}else E[U]=Y.value})}if(l&&typeof l.additionalProperties=="object"){let q=l.additionalProperties["x-additionalPropertiesName"]||"property";E["".concat(String(q),"1")]=(0,M.traverse)(l.additionalProperties,c,v,{depth:F+1}).value,E["".concat(String(q),"2")]=(0,M.traverse)(l.additionalProperties,c,v,{depth:F+1}).value}if(l&&typeof l.properties=="object"&&l.maxProperties!==void 0&&Object.keys(E).length>l.maxProperties){let q={},W=0;(Array.isArray(l.required)?l.required:[]).forEach(Y=>{E[Y]!==void 0&&(q[Y]=E[Y],W++)}),Object.keys(E).forEach(Y=>{W<l.maxProperties&&!q.hasOwnProperty(Y)&&(q[Y]=E[Y],W++)}),E=q}return E}},{"../traverse":14,"../utils":15}],12:[function(T,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.regexSample=y;function M(){return!0}function h(N,I){return N}function _(N,I,C){let $=1;if(N)switch(N){case"?":{$=M()?0:1;break}case"*":{$=h(0,8);break}case"+":{$=h(1,8);break}default:throw new Error("Unknown quantifier symbol provided.")}else I!=null&&C!=null?$=h(parseInt(I),parseInt(C)):I!=null&&C==null&&($=parseInt(I));return $}function y(N){let I=!1;if(N instanceof RegExp){var C,$;I=N.flags.includes("i"),N=N.toString(),N=(C=($=N.match(/\/(.+?)\//))===null||$===void 0?void 0:$[1])!==null&&C!==void 0?C:""}N=N.replace(/^(\^)?(.*?)(\$)?$/,"$2");let l,c,v,P=/([.A-Za-z0-9])(?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+))(?![^[]*]|[^{]*})/,E=N.match(P);for(;E!=null;){let Y=E[2],f=E[3],m=E[4];v=_(m,Y,f),N=N.slice(0,E.index)+E[1].repeat(v)+N.slice(E.index+E[0].length),E=N.match(P)}let F=/(\d-\d|\w-\w|\d|\w|[-!@#$&()`.+,/"])/,q=/\[(\^|)(-|)(.+?)\](?:\{(\d+)(?:\,(\d+)|)\}|(\?|\*|\+)|)/;for(E=N.match(q);E!=null;){let Y=E[1]==="^",f=E[2]==="-",m=E[4],a=E[5],x=E[6],b=[],A=E[3],G=A.match(F);for(f&&b.push(45);G!=null;){if(G[0].indexOf("-")===-1)I&&isNaN(Number(G[0]))?(b.push(G[0].toUpperCase().charCodeAt(0)),b.push(G[0].toLowerCase().charCodeAt(0))):b.push(G[0].charCodeAt(0));else{let J=G[0].split("-").map(S=>S.charCodeAt(0));if(l=J[0],c=J[1],l>c)throw new Error("Character range provided is out of order.");for(let S=l;S<=c;S++)if(I&&isNaN(Number(String.fromCharCode(S)))){let B=String.fromCharCode(S);b.push(B.toUpperCase().charCodeAt(0)),b.push(B.toLowerCase().charCodeAt(0))}else b.push(S)}A=A.substring(G[0].length),G=A.match(F)}if(v=_(x,m,a),Y){let J=-1;for(let S=48;S<=57;S++){if(J=b.indexOf(S),J>-1){b.splice(J,1);continue}b.push(S)}for(let S=65;S<=90;S++){if(J=b.indexOf(S),J>-1){b.splice(J,1);continue}b.push(S)}for(let S=97;S<=122;S++){if(J=b.indexOf(S),J>-1){b.splice(J,1);continue}b.push(S)}}let Z=Array.from({length:v},()=>String.fromCharCode(b[h(0,b.length-1)])).join("");N=N.slice(0,E.index)+Z+N.slice(E.index+E[0].length),E=N.match(q)}let W=/(.)\{(\d+)\,(\d+)\}/;for(E=N.match(W);E!=null;){if(l=parseInt(E[2]),c=parseInt(E[3]),l>c)throw new Error("Numbers out of order in {} quantifier.");v=h(l,c),N=N.slice(0,E.index)+E[1].repeat(v)+N.slice(E.index+E[0].length),E=N.match(W)}let U=/(.)\{(\d+)\}/;for(E=N.match(U);E!=null;)v=parseInt(E[2]),N=N.slice(0,E.index)+E[1].repeat(v)+N.slice(E.index+E[0].length),E=N.match(U);return N}},{}],13:[function(T,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.sampleString=J;var M=T("../utils"),h=_(T("./string-regex"));function _(S,B){if(typeof WeakMap=="function")var X=new WeakMap,H=new WeakMap;return(_=function(z,K){if(!K&&z&&z.__esModule)return z;var nt,lt,ht={__proto__:null,default:z};if(z===null||typeof z!="object"&&typeof z!="function")return ht;if(nt=K?H:X){if(nt.has(z))return nt.get(z);nt.set(z,ht)}for(let ct in z)ct!=="default"&&{}.hasOwnProperty.call(z,ct)&&((lt=(nt=Object.defineProperty)&&Object.getOwnPropertyDescriptor(z,ct))&&(lt.get||lt.set)?nt(ht,ct,lt):ht[ct]=z[ct]);return ht})(S,B)}let y="qwerty!@#$%^123456";function N(){return"user@example.com"}function I(){return"\u043F\u043E\u0448\u0442\u0430@\u0443\u043A\u0440.\u043D\u0435\u0442"}function C(S,B){let X="pa$$word";return S>X.length&&(X+="_",X+=(0,M.ensureMinLength)(y,S-X.length).substring(0,S-X.length)),X}function $(S){let{min:B,max:X,omitTime:H,omitDate:z}=S,K=(0,M.toRFCDateTime)(new Date("2019-08-24T14:15:22.123Z"),H,z,!1);return K.length<B&&console.warn("Using minLength = ".concat(B,' is incorrect with format "date-time"')),X&&K.length>X&&console.warn("Using maxLength = ".concat(X,' is incorrect with format "date-time"')),K}function l(S,B){return $({min:S,max:B,omitTime:!1,omitDate:!1})}function c(S,B){return $({min:S,max:B,omitTime:!0,omitDate:!1})}function v(S,B){return $({min:S,max:B,omitTime:!1,omitDate:!0}).slice(1)}function P(S,B,X,H){let z=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(H&&z)return h.regexSample(H);let K=(0,M.ensureMinLength)("string",S);return B&&K.length>B&&(K=K.substring(0,B)),K}function E(){return"192.168.0.1"}function F(){return"2001:0db8:85a3:0000:0000:8a2e:0370:7334"}function q(){return"example.com"}function W(){return"\u043F\u0440\u0438\u043A\u043B\u0430\u0434.\u0443\u043A\u0440"}function U(){return"http://example.com"}function Y(){return"../dictionary"}function f(){return"http://example.com/{endpoint}"}function m(){return"http://example.com/entity/1"}function a(){return"/entity/1"}function x(S,B,X){return(0,M.uuid)(X||"id")}function b(){return"/json/pointer"}function A(){return"1/relative/json/pointer"}function G(){return"/regex/"}let Z={email:N,"idn-email":I,password:C,"date-time":l,date:c,time:v,ipv4:E,ipv6:F,hostname:q,"idn-hostname":W,iri:m,"iri-reference":a,uri:U,"uri-reference":Y,"uri-template":f,uuid:x,default:P,"json-pointer":b,"relative-json-pointer":A,regex:G};function J(S,B,X,H){let z=S.format||"default",K=Z[z]||P,nt=H&&H.propertyName;return K(S.minLength||0,S.maxLength,nt,S.pattern,B?.enablePatterns)}},{"../utils":15,"./string-regex":12}],14:[function(T,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.clearCache=U,w.traverse=m;var M=T("./openapi-sampler"),h=T("./allOf"),_=T("./infer"),y=T("./utils"),N=C(T("json-pointer"));let I=["if","then"];function C(a){return a&&a.__esModule?a:{default:a}}function $(a,x){if(a==null)return{};var b,A,G=l(a,x);if(Object.getOwnPropertySymbols){var Z=Object.getOwnPropertySymbols(a);for(A=0;A<Z.length;A++)b=Z[A],x.indexOf(b)===-1&&{}.propertyIsEnumerable.call(a,b)&&(G[b]=a[b])}return G}function l(a,x){if(a==null)return{};var b={};for(var A in a)if({}.hasOwnProperty.call(a,A)){if(x.indexOf(A)!==-1)continue;b[A]=a[A]}return b}function c(a,x){var b=Object.keys(a);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(a);x&&(A=A.filter(function(G){return Object.getOwnPropertyDescriptor(a,G).enumerable})),b.push.apply(b,A)}return b}function v(a){for(var x=1;x<arguments.length;x++){var b=arguments[x]!=null?arguments[x]:{};x%2?c(Object(b),!0).forEach(function(A){P(a,A,b[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):c(Object(b)).forEach(function(A){Object.defineProperty(a,A,Object.getOwnPropertyDescriptor(b,A))})}return a}function P(a,x,b){return(x=E(x))in a?Object.defineProperty(a,x,{value:b,enumerable:!0,configurable:!0,writable:!0}):a[x]=b,a}function E(a){var x=F(a,"string");return typeof x=="symbol"?x:x+""}function F(a,x){if(typeof a!="object"||!a)return a;var b=a[Symbol.toPrimitive];if(b!==void 0){var A=b.call(a,x||"default");if(typeof A!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return(x==="string"?String:Number)(a)}let q={},W=[];function U(){q={},W=[]}function Y(a){let x;return a.const!==void 0?x=a.const:a.examples!==void 0&&a.examples.length?x=a.examples[0]:a.enum!==void 0&&a.enum.length?x=a.enum[0]:a.default!==void 0&&(x=a.default),x}function f(a){let x=Y(a);if(x!==void 0)return{value:x,readOnly:a.readOnly,writeOnly:a.writeOnly,type:null}}function m(a,x,b,A){if(A){if(W.includes(a))return(0,y.getResultForCircular)((0,_.inferType)(a));W.push(a)}if(A&&A.depth>x.maxSampleDepth)return(0,y.popSchemaStack)(W,A),(0,y.getResultForCircular)((0,_.inferType)(a));if(a.$ref){if(!b)throw new Error("Your schema contains $ref. You must provide full specification in the third parameter.");let S=decodeURIComponent(a.$ref);S.startsWith("#")&&(S=S.substring(1));let B=N.default.get(b,S),X;if(q[S]!==!0){q[S]=!0;let H=m(B,x,b,A);if(x.format==="xml"){let z=S.split("/").pop(),K=v(v({},A),{},{propertyName:A?.propertyName||z}),{propertyName:nt,value:lt}=(0,y.applyXMLAttributes)(H,B,K);X=v(v({},H),{},{value:{[nt||"root"]:lt}})}else X=H;q[S]=!1}else{let H=(0,_.inferType)(B);X=(0,y.getResultForCircular)(H)}return(0,y.popSchemaStack)(W,A),X}if(a.example!==void 0)return(0,y.popSchemaStack)(W,A),{value:a.example,readOnly:a.readOnly,writeOnly:a.writeOnly,type:a.type};if(a.allOf!==void 0)return(0,y.popSchemaStack)(W,A),f(a)||(0,h.allOfSample)(v(v({},a),{},{allOf:void 0}),a.allOf,x,b,A);if(a.oneOf&&a.oneOf.length){a.anyOf&&(x.quiet||console.warn("oneOf and anyOf are not supported on the same level. Skipping anyOf")),(0,y.popSchemaStack)(W,A);let S=Object.assign({readOnly:a.readOnly,writeOnly:a.writeOnly},a.oneOf[0]);return J(a,S)}if(a.anyOf&&a.anyOf.length){(0,y.popSchemaStack)(W,A);let S=Object.assign({readOnly:a.readOnly,writeOnly:a.writeOnly},a.anyOf[0]);return J(a,S)}if(a.if&&a.then){(0,y.popSchemaStack)(W,A);let{if:S,then:B}=a,X=$(a,I);return m((0,y.mergeDeep)(X,S,B),x,b,A)}let G=Y(a),Z=null;if(G===void 0){G=null,Z=a.type,Array.isArray(Z)&&a.type.length>0&&(Z=a.type[0]),Z||(Z=(0,_.inferType)(a));let S=M._samplers[Z];S&&(G=S(a,x,b,A))}return(0,y.popSchemaStack)(W,A),{value:G,readOnly:a.readOnly,writeOnly:a.writeOnly,type:Z};function J(S,B){let X=f(S);if(X!==void 0)return X;let H=m(v(v({},S),{},{oneOf:void 0,anyOf:void 0}),x,b,A),z=m(B,x,b,A);if(typeof H.value=="object"&&typeof z.value=="object"){let K=(0,y.mergeDeep)(H.value,z.value);return v(v({},z),{},{value:K})}return z}}},{"./allOf":4,"./infer":5,"./openapi-sampler":6,"./utils":15,"json-pointer":3}],15:[function(T,R,w){"use strict";Object.defineProperty(w,"__esModule",{value:!0}),w.SKIP_SYMBOL=void 0,w.applyXMLAttributes=W,w.ensureMinLength=l,w.getResultForCircular=P,w.getXMLAttributes=F,w.mergeDeep=c,w.popSchemaStack=E,w.toRFCDateTime=$,w.uuid=v;function M(f,m){var a=Object.keys(f);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(f);m&&(x=x.filter(function(b){return Object.getOwnPropertyDescriptor(f,b).enumerable})),a.push.apply(a,x)}return a}function h(f){for(var m=1;m<arguments.length;m++){var a=arguments[m]!=null?arguments[m]:{};m%2?M(Object(a),!0).forEach(function(x){_(f,x,a[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(a)):M(Object(a)).forEach(function(x){Object.defineProperty(f,x,Object.getOwnPropertyDescriptor(a,x))})}return f}function _(f,m,a){return(m=y(m))in f?Object.defineProperty(f,m,{value:a,enumerable:!0,configurable:!0,writable:!0}):f[m]=a,f}function y(f){var m=N(f,"string");return typeof m=="symbol"?m:m+""}function N(f,m){if(typeof f!="object"||!f)return f;var a=f[Symbol.toPrimitive];if(a!==void 0){var x=a.call(f,m||"default");if(typeof x!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(m==="string"?String:Number)(f)}let I=w.SKIP_SYMBOL=Symbol("skip");function C(f){return f<10?"0"+f:f}function $(f,m,a,x){var b=a?"":f.getUTCFullYear()+"-"+C(f.getUTCMonth()+1)+"-"+C(f.getUTCDate());return m||(b+="T"+C(f.getUTCHours())+":"+C(f.getUTCMinutes())+":"+C(f.getUTCSeconds())+(x?"."+(f.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5):"")+"Z"),b}function l(f,m){return m>f.length?f.repeat(Math.trunc(m/f.length)+1).substring(0,m):f}function c(){let f=b=>b&&typeof b=="object";for(var m=arguments.length,a=new Array(m),x=0;x<m;x++)a[x]=arguments[x];return a.reduce((b,A)=>(Object.keys(A||{}).forEach(G=>{let Z=b[G],J=A[G];f(Z)&&f(J)?b[G]=c(Z,J):b[G]=J}),b),Array.isArray(a[a.length-1])?[]:{})}function v(f){var m=U(f),a=Y(m,m,m,m),x="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,b=>{var A=a()*16%16|0;return(b=="x"?A:A&3|8).toString(16)});return x}function P(f){return{value:f==="object"?{}:f==="array"?[]:void 0}}function E(f,m){m&&f.pop()}function F(f){var m,a,x,b,A,G,Z;return{name:(f==null||(m=f.xml)===null||m===void 0?void 0:m.name)||"",prefix:(f==null||(a=f.xml)===null||a===void 0?void 0:a.prefix)||"",namespace:(f==null||(x=f.xml)===null||x===void 0?void 0:x.namespace)||null,attribute:(b=f==null||(A=f.xml)===null||A===void 0?void 0:A.attribute)!==null&&b!==void 0?b:!1,wrapped:(G=f==null||(Z=f.xml)===null||Z===void 0?void 0:Z.wrapped)!==null&&G!==void 0?G:!1}}function q(f){let m=f?.xml;return m!=null&&m.nodeType?m.nodeType:m?.attribute===!0?"attribute":m?.wrapped===!0&&f?.type==="array"?"element":f!=null&&f.$ref||f!=null&&f.$dynamicRef||f?.type==="array"||f!=null&&f.oneOf||f!=null&&f.anyOf||f!=null&&f.allOf?"none":"element"}function W(f){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{value:x}=f,{propertyName:b}=a,{name:A,prefix:G,namespace:Z}=F(m),J=q(m),S=A||b?"".concat(G?G+":":"").concat(A||b):null,B=typeof x=="object"?Array.isArray(x)?[...x]:h({},x):x;switch(J){case"attribute":S&&(S="$".concat(S));break;case"text":S="#text";break;case"cdata":S="#cdata";break;case"none":if(m.type==="array"){if(S=null,m.example!==void 0){var X;S=((X=m.items)===null||X===void 0||(X=X.xml)===null||X===void 0?void 0:X.name)||S}}else S=null;break;default:m.type==="array"&&Array.isArray(B)&&(B={[S]:[...B]});break}return Z&&J!=="text"&&J!=="cdata"&&J!=="none"&&(typeof B=="object"?B["$xmlns".concat(G?":"+G:"")]=Z:B={["$xmlns".concat(G?":"+G:"")]:Z,"#text":B}),{propertyName:S,value:B}}function U(f){var m=0;if(f.length==0)return m;for(var a=0;a<f.length;a++){var x=f.charCodeAt(a);m=(m<<5)-m+x,m=m&m}return m}function Y(f,m,a,x){return function(){f|=0,m|=0,a|=0,x|=0;var b=f-(m<<27|m>>>5)|0;return f=m^(a<<17|a>>>15),m=a+x|0,a=x+b|0,x=f+b|0,(x>>>0)/4294967296}}},{}]},{},[6])(6)})});export{je as a,Me as b};
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as Z,b as ee,f as te,g as G,h as ne}from"./BOUAXXEO.js";import{a as y}from"./WZXA5XPB.js";import{C as J,H as V,W as b,Y as W,ba as Q,c as x,da as E,ka as Y,q as v,s as H}from"./MJSI4VHA.js";import{b as M,c as T,k as D}from"./LD5MEXEL.js";import{mkdir as at,readFile as ct,writeFile as ut}from"node:fs/promises";import{dirname as $e,parse as dt,resolve as R,sep as ft}from"node:path";function A(e){return{requires:["typescript"],errorModes:["throw"],load:()=>import("./BXFJJ63W.js").then(t=>({run:t.tanstackQueryGenerator(e)}))}}var U={outputMode:"it always emits one self-contained file",runtime:"the runtime is always embedded in the generated file",argsStyle:"inputs follow the target language's own idiom",importExt:"the generated file has no relative imports"},I={typescript:{load:()=>import("./QB32BX35.js").then(e=>({run:e.typescriptGenerator,sample:e.typescriptSample,docs:e.typescriptDocs}))},zod:{load:()=>import("./AQFM7XGG.js").then(e=>({run:e.zodGenerator}))},transformers:{requires:["typescript"],dateTypes:["Date"],load:()=>import("./IULINGO6.js").then(e=>({run:e.transformersGenerator}))},"tanstack-query":A("react"),"tanstack-query-vue":A("vue"),"tanstack-query-svelte":A("svelte"),"tanstack-query-solid":A("solid"),swr:{requires:["typescript"],errorModes:["throw"],load:()=>import("./U7Z4MLK3.js").then(e=>({run:e.swrGenerator}))},mock:{requires:["typescript"],load:()=>import("./35R6GCFO.js").then(e=>({run:e.mockGenerator}))},cli:{requires:["typescript","zod"],errorModes:["throw"],load:()=>import("./TR2ZE2NA.js").then(e=>({run:e.cliGenerator,sample:e.cliSample,docs:e.cliDocs}))},python:{notApplicable:U,load:()=>import("./WPCGRKTH.js").then(e=>({run:e.pythonGenerator,sample:e.pythonSample,docs:e.pythonDocs,options:e.pythonOptions}))},go:{errorModes:["throw"],notApplicable:U,load:()=>import("./RCG4MSAO.js").then(e=>({run:e.goGenerator,sample:e.goSample,docs:e.goDocs}))},php:{errorModes:["throw"],notApplicable:U,load:()=>import("./EI27DJLF.js").then(e=>({run:e.phpGenerator,sample:e.phpSample,docs:e.phpDocs}))}};function re(e,t,n,r){let s=new Set(e);t.goPackage!==void 0&&!s.has("go")&&b.warn(`generate-client: goPackage is ignored \u2014 it declares the Go package clause, and no selected generator uses it (add --generator go).
7
+ import{a as Z,b as ee,f as te,g as G,h as ne}from"./F7TVQGKE.js";import{a as y}from"./WZXA5XPB.js";import{C as J,H as V,W as b,Y as W,ba as Q,c as x,da as E,ka as Y,q as v,s as H}from"./MJSI4VHA.js";import{b as M,c as T,k as D}from"./LD5MEXEL.js";import{mkdir as at,readFile as ct,writeFile as ut}from"node:fs/promises";import{dirname as $e,parse as dt,resolve as R,sep as ft}from"node:path";function A(e){return{requires:["typescript"],errorModes:["throw"],load:()=>import("./T5KTLVAZ.js").then(t=>({run:t.tanstackQueryGenerator(e)}))}}var U={outputMode:"it always emits one self-contained file",runtime:"the runtime is always embedded in the generated file",argsStyle:"inputs follow the target language's own idiom",importExt:"the generated file has no relative imports"},I={typescript:{load:()=>import("./ZAZG6Z4J.js").then(e=>({run:e.typescriptGenerator,sample:e.typescriptSample,docs:e.typescriptDocs}))},zod:{load:()=>import("./ZXPLB4LA.js").then(e=>({run:e.zodGenerator}))},transformers:{requires:["typescript"],dateTypes:["Date"],load:()=>import("./IULINGO6.js").then(e=>({run:e.transformersGenerator}))},"tanstack-query":A("react"),"tanstack-query-vue":A("vue"),"tanstack-query-svelte":A("svelte"),"tanstack-query-solid":A("solid"),swr:{requires:["typescript"],errorModes:["throw"],load:()=>import("./AOOXKVZ6.js").then(e=>({run:e.swrGenerator}))},mock:{requires:["typescript"],load:()=>import("./N2CTYNAN.js").then(e=>({run:e.mockGenerator}))},cli:{requires:["typescript","zod"],errorModes:["throw"],load:()=>import("./U3LG2XZJ.js").then(e=>({run:e.cliGenerator,sample:e.cliSample,docs:e.cliDocs}))},python:{notApplicable:U,load:()=>import("./E44UEWCI.js").then(e=>({run:e.pythonGenerator,sample:e.pythonSample,docs:e.pythonDocs,options:e.pythonOptions}))},go:{errorModes:["throw"],notApplicable:U,load:()=>import("./P3CVK7VZ.js").then(e=>({run:e.goGenerator,sample:e.goSample,docs:e.goDocs}))},php:{errorModes:["throw"],notApplicable:U,load:()=>import("./OTGTOSNW.js").then(e=>({run:e.phpGenerator,sample:e.phpSample,docs:e.phpDocs}))}};function re(e,t,n,r){let s=new Set(e);t.goPackage!==void 0&&!s.has("go")&&b.warn(`generate-client: goPackage is ignored \u2014 it declares the Go package clause, and no selected generator uses it (add --generator go).
8
8
  `);let o=t.errorMode??"throw",i=t.dateType??"string";for(let a of e){let c=n.get(a);if(!c)throw new y(`Unknown generator: ${a}`);for(let d of c.requires??[])if(!s.has(d)){let f=[...new Set([d,...e])].map(h=>`--generator ${h}`).join(" ");throw new y(`The "${a}" generator requires the "${d}" generator. Add it, e.g. ${f}.`)}if(c.errorModes&&!c.errorModes.includes(o))throw new y(`The "${a}" generator does not support --error-mode "${o}" (supported: ${c.errorModes.join(", ")}).`);if(c.dateTypes&&!c.dateTypes.includes(i))throw new y(`The "${a}" generator requires --date-type ${c.dateTypes.join(" or ")} (got "${i}") so the runtime values match the generated types.`);let u={...t,outputMode:r};for(let[d,f]of Object.entries(c.notApplicable??{}))u[d]!==void 0&&b.warn(`generate-client: the "${a}" generator ignores ${d} \u2014 ${f}.
9
9
  `)}}function oe(e,t,n){let r=new Map;for(let s of e){let o=t.get(s)?.options,i=n?.[s];if(o===void 0){i!==void 0&&b.warn(`generate-client: the "${s}" generator declares no options, so client.options.${s} is ignored.
10
10
  `),r.set(s,{});continue}r.set(s,ke(s,o,i))}return r}function ke(e,t,n){if(n!==void 0&&!x(n))throw new y(`The "${e}" generator's options must be a map of option names to values.`);let r=n??{},s=Object.keys(t.properties);if(t.additionalProperties!==!0){for(let i of Object.keys(r))if(!s.includes(i))throw new y(`The "${e}" generator got an unknown option "${i}". Declared options: ${s.join(", ")||"(none)"}.`)}for(let i of t.required??[])if(r[i]===void 0)throw new y(`The "${e}" generator requires the "${i}" option.`);let o={...r};for(let[i,a]of Object.entries(t.properties)){if(o[i]===void 0){a.default!==void 0&&(o[i]=a.default);continue}let c=ve(a,o[i]);if(c!==void 0)throw new y(`The "${e}" generator's "${i}" ${c}.`)}return o}function ve(e,t){if("enum"in e)return e.enum.includes(t)?void 0:`must be one of: ${e.enum.join(", ")}`;if(e.type==="array"){let n=e.items.type;return Array.isArray(t)&&t.every(r=>typeof r===n)?void 0:`must be an array of ${n}`}return typeof t===e.type?void 0:`must be a ${e.type}`}import{isAbsolute as Oe,resolve as xe}from"node:path";import{pathToFileURL as qe}from"node:url";var Se=function(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(n,r,s,o,i){return r?t?".jsx":".js":s&&(!o||!i)?n:s+o+"."+i.toLowerCase()+"js"}):e};async function ie(e,t={}){let n=new Map;for(let a of t.customGenerators??[])ae(n,a);let r=[];for(let a of e)r.push(await se(a,n,t.configDir));let s=[],o=new Set,i=async a=>{if(!(s.includes(a)||o.has(a))){o.add(a);for(let c of n.get(a).requires??[])(n.has(c)||c in I)&&await i(await se(c,n,t.configDir));o.delete(a),s.push(a)}};for(let a of r)await i(a);return{selected:s,registry:n}}async function se(e,t,n){if(t.has(e))return e;let r=I[e];if(r!==void 0){let{load:o,...i}=r;return t.set(e,{...i,...await o()}),e}if(e==="sdk")throw new y('The "sdk" generator is now named "typescript". Update the `generators` list or the --generator flag.');let s=await Pe(e,n??process.cwd());return ae(t,s),s.name}function ae(e,t){if(!x(t)||typeof t.name!="string"||t.name===""||typeof t.run!="function")throw new y("Invalid custom generator: expected an object with a non-empty string `name` and a `run` function (build one with `defineGenerator`).");if(e.has(t.name))throw new y(`Generator name "${t.name}" collides with an existing generator. Rename the custom generator.`);if(t.requiresGenerator!==void 0){let n=ne(G,t.requiresGenerator);if(n===void 0)throw new y(`Generator "${t.name}" declares requiresGenerator "${t.requiresGenerator}", which is not a range we read. Use ^1.2.0, ~1.2.0, >=1.2.0, or an exact version.`);if(!n)throw new y(`Generator "${t.name}" needs @redocly/client-generator ${t.requiresGenerator}; this CLI ships ${G}. Upgrade @redocly/cli if the generator is newer, or update the generator \u2014 \`redocly eject-generator <name> --update\` for an ejected file, or upgrade its package.`)}t.name in I&&b.warn(`generate-client: custom generator "${t.name}" takes over the built-in generator of the same name.
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a as g,b as h,c as r,d as s,e as t,f as u,g as v,h as w,i as x,j as y,k as B,l as C,m as D,n as F,o as G}from"./XAKGO2KF.js";import{a as z,e as A,g as E}from"./BOUAXXEO.js";import{a}from"./WZXA5XPB.js";import"./MJSI4VHA.js";import"./NEWT5A6S.js";import{a as b,b as c,c as d,d as e,e as f,f as i,g as j,h as k,i as l,j as m,k as n,l as o,m as p,n as q}from"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{x as AUTHORING_HELPER_NAMES,E as GENERATOR_VERSION,a as NotSupportedError,b as Printer,d as RESERVED_WORDS,A as WIRING_NAMES,z as allOperations,c as casing,C as constantCase,y as defineClientSetup,F as defineGenerator,i as deref,k as discriminatorCases,o as docText,n as enumValues,j as flattenAllOf,G as generateClient,B as groupSlug,q as headerCoerceType,e as identifierFor,t as isMultipartBody,l as isNullable,r as jsonSuccessSchema,D as mergeConfig,w as paginationItemSchema,g as paginationRuleFor,h as renderReferencePage,p as resolveSchemaPointer,p as schemaAtPointer,v as securityRequirements,u as serverUrlParts,s as sseResponse,f as uniqueIdentifiers,m as unwrapNullable};
7
+ import{a as g,b as h,c as r,d as s,e as t,f as u,g as v,h as w,i as x,j as y,k as B,l as C,m as D,n as F,o as G}from"./TWYMGTRR.js";import{a as z,e as A,g as E}from"./F7TVQGKE.js";import{a}from"./WZXA5XPB.js";import"./MJSI4VHA.js";import"./NEWT5A6S.js";import{a as b,b as c,c as d,d as e,e as f,f as i,g as j,h as k,i as l,j as m,k as n,l as o,m as p,n as q}from"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{x as AUTHORING_HELPER_NAMES,E as GENERATOR_VERSION,a as NotSupportedError,b as Printer,d as RESERVED_WORDS,A as WIRING_NAMES,z as allOperations,c as casing,C as constantCase,y as defineClientSetup,F as defineGenerator,i as deref,k as discriminatorCases,o as docText,n as enumValues,j as flattenAllOf,G as generateClient,B as groupSlug,q as headerCoerceType,e as identifierFor,t as isMultipartBody,l as isNullable,r as jsonSuccessSchema,D as mergeConfig,w as paginationItemSchema,g as paginationRuleFor,h as renderReferencePage,p as resolveSchemaPointer,p as schemaAtPointer,v as securityRequirements,u as serverUrlParts,s as sseResponse,f as uniqueIdentifiers,m as unwrapNullable};
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a}from"./RZMAAWKX.js";import"./XAKGO2KF.js";import"./BOUAXXEO.js";import"./WZXA5XPB.js";import"./MJSI4VHA.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as mockGenerator};
7
+ import{a}from"./GNCL6OYK.js";import"./TWYMGTRR.js";import"./F7TVQGKE.js";import"./WZXA5XPB.js";import"./MJSI4VHA.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as mockGenerator};
@@ -4,7 +4,7 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{h as g}from"./SGNOWOE7.js";import{k as u,l as m}from"./XAKGO2KF.js";import{c as C,d as j}from"./BOUAXXEO.js";import{W as b}from"./MJSI4VHA.js";import{a as S,b as k}from"./UW4UC7ZI.js";import{join as $}from"node:path";function h(r){return(r??"").replace(/\s+/g," ").trim().replace(/\\/g,"\\\\").replace(/\|/g,"\\|")}function v(r){return[r.group===void 0?void 0:u(r.group),r.name].filter(Boolean).join(" ")}function N(r,e){return[r,v(e),...e.positionals.map(o=>`<${o.name}>`),...e.flags.filter(o=>o.required).map(o=>`--${o.name} <${o.type}>`),...e.body?[e.body.required?"--json '<json>'":"[--json '<json>']"]:[]].filter(o=>o!=="").join(" ")}function T(r,e){r.line("| Flag | Type | Required | Description |"),r.line("| ---- | ---- | -------- | ----------- |");for(let n of e){let o=[h(n.description),n.enum===void 0?"":`One of ${n.enum.map(t=>`\`${t}\``).join(", ")}.`,n.type==="array"?"Repeat the flag for multiple values.":""].filter(t=>t!=="").join(" ");r.line(`| \`--${n.name}\` | ${n.type} | ${n.required?"yes":"no"} | ${o} |`)}r.blank()}function D(r,e,n){if(r.line(`### \`${v(e)}\``),r.blank(),e.summary!==void 0&&(r.line(h(e.summary)),r.blank()),r.line(`\`${e.method} ${e.path}\``),r.blank(),r.line("```sh"),r.line(N(n.name,e)),r.line("```"),r.blank(),e.positionals.length>0){r.line("| Argument | Description |"),r.line("| -------- | ----------- |");for(let t of e.positionals)r.line(`| \`<${t.name}>\` | ${h(t.description)} |`);r.blank()}e.flags.length>0&&T(r,e.flags);let o=[e.body===void 0?"":`Takes a JSON body${e.body.required?" (required)":""}: \`--json '<json>'\`, \`--json @file.json\`, or \`--json @-\` for stdin.`,e.unsupportedBody===void 0?"":`Takes a \`${e.unsupportedBody}\` body, which the CLI cannot build \u2014 call this operation through the generated client instead.`,e.paginated===!0?"Paginated: `--page-all` follows every page, printing one JSON page per line.":"",e.sse===!0?"Streams server-sent events as one JSON object per line.":"",e.blob===!0?"Returns binary content, so `--output <path>` is required.":""].filter(t=>t!=="");for(let t of o)r.line(t);o.length>0&&r.blank()}function w(r,e){let n=new S;e.frontmatter&&(n.line("---"),n.line(`title: ${e.title}`),n.line("---"),n.blank()),n.line(`# ${e.title}`),n.blank(),n.line(`Generated command-line reference for \`${e.name}\`, produced from the API description by \`redocly generate-client\`.`),n.line("Re-run generation to update it \u2014 this file is not hand-edited."),n.blank(),n.line("## Usage"),n.blank(),n.line("```sh"),n.line(`${e.name} <command> [flags]`),n.line(`${e.name} --help`),n.line(`${e.name} schema <command> # request/response schemas`),n.line("```"),n.blank(),n.line("Install the file under any `bin` name: the command takes that name, and the credential variables below do not change."),n.blank(),n.line("## Global flags"),n.blank(),n.line("| Flag | Description |"),n.line("| ---- | ----------- |");let o=e.schemes.some(i=>i.kind==="bearer");for(let[i,s]of[["--server-url <url>","Override the server URL included in the client."],["--format <json\\|ndjson>","Output format."],["--dry-run","Print the prepared request, credentials redacted, without sending it."],["--page-all","Follow pagination, printing one JSON page per line."],["--output <path>","Write the response body to a file. Required for binary responses."],...o?[["--token <token>","Bearer token, overriding the environment."]]:[],["--json <json\\|@file\\|@->","Request body, inline or from a file or stdin."]])n.line(`| \`${i}\` | ${s} |`);n.blank();let t=m(e.name);if(n.line("## Credentials"),n.blank(),e.schemes.length===0)n.line("The description declares no security schemes, so no credentials are read.");else{n.line("Credentials come from the environment:"),n.blank(),n.line("| Scheme | Variable |"),n.line("| ------ | -------- |");for(let i of e.schemes){let s=i.kind==="bearer"?`\`${t}_TOKEN\` (or \`--token\`)`:i.kind==="basic"?`\`${t}_USERNAME\` and \`${t}_PASSWORD\``:`\`${t}_API_KEY_${m(i.key)}\``;n.line(`| ${i.kind} (\`${i.key}\`) | ${s} |`)}}n.blank(),n.line("## Exit codes"),n.blank(),n.line("| Code | Meaning |"),n.line("| ---- | ------- |");for(let[i,s]of[[0,"success"],[1,"API error (status other than 401 or 403)"],[2,"auth error (401 or 403)"],[3,"validation error"],[4,"usage error (unknown command or flag, bad `--json`)"]])n.line(`| ${i} | ${s} |`);n.blank(),n.line("Errors print one JSON object to stderr, so stdout stays clean for piping."),n.blank();let a=[...new Set(r.map(i=>i.group))];for(let i of a){let s=r.filter(l=>l.group===i);i===void 0?(n.line("## Commands"),n.blank()):(n.line(`## ${i}`),n.blank(),n.line(`Addressed as \`${e.name} ${u(i)} <command>\`.`),n.blank());for(let l of s)D(n,l,e)}return n.toString().replace(/\n{3,}/g,`
7
+ import{h as g}from"./WNOJ33NP.js";import{k as u,l as m}from"./TWYMGTRR.js";import{c as C,d as j}from"./F7TVQGKE.js";import{W as b}from"./MJSI4VHA.js";import{a as S,b as k}from"./UW4UC7ZI.js";import{join as $}from"node:path";function h(r){return(r??"").replace(/\s+/g," ").trim().replace(/\\/g,"\\\\").replace(/\|/g,"\\|")}function v(r){return[r.group===void 0?void 0:u(r.group),r.name].filter(Boolean).join(" ")}function N(r,e){return[r,v(e),...e.positionals.map(o=>`<${o.name}>`),...e.flags.filter(o=>o.required).map(o=>`--${o.name} <${o.type}>`),...e.body?[e.body.required?"--json '<json>'":"[--json '<json>']"]:[]].filter(o=>o!=="").join(" ")}function T(r,e){r.line("| Flag | Type | Required | Description |"),r.line("| ---- | ---- | -------- | ----------- |");for(let n of e){let o=[h(n.description),n.enum===void 0?"":`One of ${n.enum.map(t=>`\`${t}\``).join(", ")}.`,n.type==="array"?"Repeat the flag for multiple values.":""].filter(t=>t!=="").join(" ");r.line(`| \`--${n.name}\` | ${n.type} | ${n.required?"yes":"no"} | ${o} |`)}r.blank()}function D(r,e,n){if(r.line(`### \`${v(e)}\``),r.blank(),e.summary!==void 0&&(r.line(h(e.summary)),r.blank()),r.line(`\`${e.method} ${e.path}\``),r.blank(),r.line("```sh"),r.line(N(n.name,e)),r.line("```"),r.blank(),e.positionals.length>0){r.line("| Argument | Description |"),r.line("| -------- | ----------- |");for(let t of e.positionals)r.line(`| \`<${t.name}>\` | ${h(t.description)} |`);r.blank()}e.flags.length>0&&T(r,e.flags);let o=[e.body===void 0?"":`Takes a JSON body${e.body.required?" (required)":""}: \`--json '<json>'\`, \`--json @file.json\`, or \`--json @-\` for stdin.`,e.unsupportedBody===void 0?"":`Takes a \`${e.unsupportedBody}\` body, which the CLI cannot build \u2014 call this operation through the generated client instead.`,e.paginated===!0?"Paginated: `--page-all` follows every page, printing one JSON page per line.":"",e.sse===!0?"Streams server-sent events as one JSON object per line.":"",e.blob===!0?"Returns binary content, so `--output <path>` is required.":""].filter(t=>t!=="");for(let t of o)r.line(t);o.length>0&&r.blank()}function w(r,e){let n=new S;e.frontmatter&&(n.line("---"),n.line(`title: ${e.title}`),n.line("---"),n.blank()),n.line(`# ${e.title}`),n.blank(),n.line(`Generated command-line reference for \`${e.name}\`, produced from the API description by \`redocly generate-client\`.`),n.line("Re-run generation to update it \u2014 this file is not hand-edited."),n.blank(),n.line("## Usage"),n.blank(),n.line("```sh"),n.line(`${e.name} <command> [flags]`),n.line(`${e.name} --help`),n.line(`${e.name} schema <command> # request/response schemas`),n.line("```"),n.blank(),n.line("Install the file under any `bin` name: the command takes that name, and the credential variables below do not change."),n.blank(),n.line("## Global flags"),n.blank(),n.line("| Flag | Description |"),n.line("| ---- | ----------- |");let o=e.schemes.some(i=>i.kind==="bearer");for(let[i,s]of[["--server-url <url>","Override the server URL included in the client."],["--format <json\\|ndjson>","Output format."],["--dry-run","Print the prepared request, credentials redacted, without sending it."],["--page-all","Follow pagination, printing one JSON page per line."],["--output <path>","Write the response body to a file. Required for binary responses."],...o?[["--token <token>","Bearer token, overriding the environment."]]:[],["--json <json\\|@file\\|@->","Request body, inline or from a file or stdin."]])n.line(`| \`${i}\` | ${s} |`);n.blank();let t=m(e.name);if(n.line("## Credentials"),n.blank(),e.schemes.length===0)n.line("The description declares no security schemes, so no credentials are read.");else{n.line("Credentials come from the environment:"),n.blank(),n.line("| Scheme | Variable |"),n.line("| ------ | -------- |");for(let i of e.schemes){let s=i.kind==="bearer"?`\`${t}_TOKEN\` (or \`--token\`)`:i.kind==="basic"?`\`${t}_USERNAME\` and \`${t}_PASSWORD\``:`\`${t}_API_KEY_${m(i.key)}\``;n.line(`| ${i.kind} (\`${i.key}\`) | ${s} |`)}}n.blank(),n.line("## Exit codes"),n.blank(),n.line("| Code | Meaning |"),n.line("| ---- | ------- |");for(let[i,s]of[[0,"success"],[1,"API error (status other than 401 or 403)"],[2,"auth error (401 or 403)"],[3,"validation error"],[4,"usage error (unknown command or flag, bad `--json`)"]])n.line(`| ${i} | ${s} |`);n.blank(),n.line("Errors print one JSON object to stderr, so stdout stays clean for piping."),n.blank();let a=[...new Set(r.map(i=>i.group))];for(let i of a){let s=r.filter(l=>l.group===i);i===void 0?(n.line("## Commands"),n.blank()):(n.line(`## ${i}`),n.blank(),n.line(`Addressed as \`${e.name} ${u(i)} <command>\`.`),n.blank());for(let l of s)D(n,l,e)}return n.toString().replace(/\n{3,}/g,`
8
8
 
9
9
  `).trimEnd()+`
10
10
  `}function R(){return j["cli.ts"]}function x(){return C["cli.ts"]}var O="// Generated by @redocly/client-generator \u2014 do not edit by hand.\n// Source: OpenAPI description. Re-run `redocly generate-client` to update.";function q(r){return k.snake(r).replace(/_/g,"-")}function E(r){let e=r.schema,n=e.kind==="array"?"array":e.kind==="scalar"&&(e.scalar==="integer"||e.scalar==="number")?"number":e.kind==="scalar"&&e.scalar==="boolean"?"boolean":"string";return{name:q(r.name),param:r.name,type:n,required:r.required,...e.kind==="enum"?{enum:e.values.map(String)}:{},...r.description!==void 0?{description:r.description}:{}}}function F(r){let e=r.successResponses;return e.some(n=>n.contentType.toLowerCase().includes("json"))?!1:e.some(n=>n.contentType.startsWith("image/")||n.contentType==="application/octet-stream")}function M(r){return r.successResponses.find(e=>e.contentType.toLowerCase().includes("json"))?.schema}function U(r,e,n){if(n!=="flat")return{};let o=g(r,e.schemas);return"mergeBody"in o&&o.mergeBody?{merged:!0}:{}}function _(r,e,n){return n!=="flat"?{}:"collisions"in g(r,e.schemas)?{argsStyle:"grouped"}:{}}function f(r,e){let n=[];for(let o of r.services)for(let t of o.operations){let a=t.requestBody?.contentType.toLowerCase().includes("json")?t.requestBody:void 0,i=M(t);n.push({...t.tags.length>0?{group:t.tags[0]}:{},name:t.name,...t.summary!==void 0?{summary:t.summary}:{},method:t.method.toUpperCase(),path:t.path,positionals:t.pathParams.map(s=>({name:s.name,type:E(s).type,...s.description!==void 0?{description:s.description}:{}})),flags:t.queryParams.map(E),...a?{body:{required:a.required,...U(t,r,e.argsStyle)}}:{},...a===void 0&&t.requestBody!==void 0?{unsupportedBody:t.requestBody.contentType}:{},...e.pagination?.has(t.name)===!0?{paginated:!0}:{},..._(t,r,e.argsStyle),...t.sse!==void 0?{sse:!0}:{},...F(t)?{blob:!0}:{},...a!==void 0||i!==void 0?{schemas:{...a?{request:a.schema}:{},...i!==void 0?{response:i}:{}}}:{}})}return n}var P=`function isProcessEntry(): boolean {
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a,b,c,d,e}from"./UKWZHJSE.js";import"./2U6O26CV.js";import"./XAKGO2KF.js";import"./BOUAXXEO.js";import"./WZXA5XPB.js";import"./MJSI4VHA.js";import"./NEWT5A6S.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{e as phpDocs,c as phpGenerator,d as phpSample,a as phpType,b as renderPhpModels};
7
+ import{a,b,c,d,e}from"./DDB52L66.js";import"./2U6O26CV.js";import"./TWYMGTRR.js";import"./F7TVQGKE.js";import"./WZXA5XPB.js";import"./MJSI4VHA.js";import"./NEWT5A6S.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{e as phpDocs,c as phpGenerator,d as phpSample,a as phpType,b as renderPhpModels};
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a,b,c,d,e}from"./FPLER37P.js";import"./2U6O26CV.js";import"./XAKGO2KF.js";import"./BOUAXXEO.js";import"./WZXA5XPB.js";import"./MJSI4VHA.js";import"./NEWT5A6S.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{e as goDocs,c as goGenerator,d as goSample,a as goType,b as renderGoModels};
7
+ import{a,b,c,d,e}from"./BWQB4GUQ.js";import"./2U6O26CV.js";import"./TWYMGTRR.js";import"./F7TVQGKE.js";import"./WZXA5XPB.js";import"./MJSI4VHA.js";import"./NEWT5A6S.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{e as goDocs,c as goGenerator,d as goSample,a as goType,b as renderGoModels};
@@ -4,4 +4,4 @@ import { dirname as __pathDirname } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import{a}from"./E23GS6YK.js";import"./QNFSWXWM.js";import"./SGNOWOE7.js";import"./XAKGO2KF.js";import"./BOUAXXEO.js";import"./WZXA5XPB.js";import"./MJSI4VHA.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as tanstackQueryGenerator};
7
+ import{a}from"./YMON5AYA.js";import"./43FMQGIC.js";import"./WNOJ33NP.js";import"./TWYMGTRR.js";import"./F7TVQGKE.js";import"./WZXA5XPB.js";import"./MJSI4VHA.js";import"./NEWT5A6S.js";import"./LD5MEXEL.js";import"./UW4UC7ZI.js";import"./RFWIIJFG.js";export{a as tanstackQueryGenerator};