@redocly/cli 2.71.0 → 2.71.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.
- package/THIRD_PARTY_NOTICES +3 -3
- package/lib/chunks/{SXIMN47K.js → 25RSTUQA.js} +1 -1
- package/lib/chunks/{N37OGNC4.js → 2IUGP2IH.js} +3 -3
- package/lib/chunks/{STAMDB3P.js → 2NYYNBAC.js} +1 -1
- package/lib/chunks/{YDGFDJ2K.js → 3N7LKSDD.js} +1 -1
- package/lib/chunks/4DUOPCYP.js +7 -0
- package/lib/chunks/{QAPQYNI3.js → 54EKLNNI.js} +1 -1
- package/lib/chunks/5BQNATJZ.js +20 -0
- package/lib/chunks/{PF43QQZA.js → 5DW3QRJB.js} +2 -2
- package/lib/chunks/{E4MPGN3Z.js → 5SSWNONM.js} +1 -1
- package/lib/chunks/{B5KSRXXW.js → 6TCEQRVX.js} +1 -1
- package/lib/chunks/{G2M6SQCS.js → 6ZNJ7RDX.js} +2 -2
- package/lib/chunks/{YLRH4RVF.js → 7HFLPQAB.js} +2 -2
- package/lib/chunks/{JCP37EY3.js → ACAPGKSR.js} +59 -25
- package/lib/chunks/ACECCMWJ.js +14 -0
- package/lib/chunks/{O37B7ABT.js → AH6ANNYP.js} +1 -1
- package/lib/chunks/{EHQY7ZOF.js → B5SUTVG4.js} +1 -1
- package/lib/chunks/{HAOBCQWB.js → BE4Z5FOC.js} +10 -8
- package/lib/chunks/{TXSBWL3Y.js → BOWZV5S6.js} +1 -1
- package/lib/chunks/{IULINGO6.js → BPSWCUZE.js} +1 -1
- package/lib/chunks/{V6VNRABV.js → BXXX3ZCV.js} +1 -1
- package/lib/chunks/{QMS4UKIK.js → CHX7O5AM.js} +5 -5
- package/lib/chunks/{2NVGTELR.js → CJWIDJTB.js} +1 -1
- package/lib/chunks/{L4F2ERUL.js → CX76LEFC.js} +1 -1
- package/lib/chunks/{WBWCX3LS.js → DORXGE7Z.js} +93 -93
- package/lib/chunks/{LD5MEXEL.js → DP3T6VZX.js} +1 -1
- package/lib/chunks/{FKKC7G6X.js → DURXFJ7H.js} +1 -1
- package/lib/chunks/DVLD4FET.js +20 -0
- package/lib/chunks/{MV3ZJ5HR.js → EAFZ6DNQ.js} +1 -1
- package/lib/chunks/{LS3G7CUH.js → EBHQXW6Z.js} +1 -1
- package/lib/chunks/{RIGQPR2I.js → EO65RJ4Z.js} +1 -1
- package/lib/chunks/{T55LQK2H.js → EQOFXQKD.js} +1 -1
- package/lib/chunks/FBEEMKTB.js +7 -0
- package/lib/chunks/{BU4AMVHN.js → FGJDZKD2.js} +1 -1
- package/lib/chunks/G6SB4ZP5.js +7 -0
- package/lib/chunks/{LRMOPAZ4.js → GAKWND4S.js} +1 -1
- package/lib/chunks/HAGYQ4BK.js +20 -0
- package/lib/chunks/{LNEXTJNF.js → HBWCMTP3.js} +1 -1
- package/lib/chunks/{2R2CXBRH.js → HWOL3HHR.js} +1 -1
- package/lib/chunks/{2UAA6O26.js → ILYXMZRT.js} +1 -1
- package/lib/chunks/{NBMSBQEL.js → INGAWMLB.js} +1 -1
- package/lib/chunks/{3DMXMP4K.js → IYV7EO2J.js} +1 -1
- package/lib/chunks/IZMDARCL.js +22 -0
- package/lib/chunks/JOWPA3MJ.js +7 -0
- package/lib/chunks/KFQC57GK.js +145 -0
- package/lib/chunks/{CZS2ZXJ7.js → KJIUDCYZ.js} +1 -1
- package/lib/chunks/{QB6CQ2CV.js → L2O63VRM.js} +1 -1
- package/lib/chunks/{MYSYBBIO.js → MH5X2EVH.js} +1 -1
- package/lib/chunks/{RLJVKAOL.js → NLAPR7D4.js} +1 -1
- package/lib/chunks/O53IFFP3.js +98 -0
- package/lib/chunks/{MQUZ5IJ2.js → PBQOGZ5C.js} +1 -1
- package/lib/chunks/{BCRM4BTA.js → Q3IJURM3.js} +1 -1
- package/lib/chunks/{HHCU6T2V.js → QXBSAWH3.js} +1 -1
- package/lib/chunks/QXHFS5G6.js +7 -0
- package/lib/chunks/{E3FBSKNS.js → QZJAXPYF.js} +1 -1
- package/lib/chunks/{QTGTCBFK.js → RBJCAITC.js} +1 -1
- package/lib/chunks/{CN2ZOHYL.js → RBNQC5ZB.js} +1 -1
- package/lib/chunks/{2CMKIFTE.js → RNA6JDRC.js} +1 -1
- package/lib/chunks/{DHP4BBTH.js → RNL7TC2W.js} +1 -1
- package/lib/chunks/{WKDC6LN3.js → RUPTJCF5.js} +1 -1
- package/lib/chunks/{YDQCJP4F.js → S6W63XAS.js} +1 -1
- package/lib/chunks/{B3GE7EIX.js → TN3JQHMS.js} +1 -1
- package/lib/chunks/TNRIBQHV.js +7 -0
- package/lib/chunks/TZROZMVE.js +20 -0
- package/lib/chunks/{TR67FYLT.js → U7KIB7CD.js} +1 -1
- package/lib/chunks/{EFB2YVY2.js → UMN7TKTH.js} +2 -2
- package/lib/chunks/{VXD5O25A.js → V34D5CUU.js} +1 -1
- package/lib/chunks/{SBHCUK5I.js → W2CABGMW.js} +1 -1
- package/lib/chunks/{MYOQDPQZ.js → WCJ2HAN3.js} +1 -1
- package/lib/chunks/{5ECOOGVW.js → WJ3YDHQA.js} +1 -1
- package/lib/chunks/{6TE6AFQ3.js → WLI2XLEP.js} +1 -1
- package/lib/chunks/{NCDX4IGX.js → X7C43UBI.js} +1 -1
- package/lib/chunks/{EH6VW7JO.js → XGPGFZMH.js} +1 -1
- package/lib/chunks/{YUEIHUPX.js → XZIK3H6V.js} +1 -1
- package/lib/chunks/{P7LM57HK.js → Y3LDWYZD.js} +1 -1
- package/lib/chunks/{VJHJJBVN.js → Y5DDX2MU.js} +1 -1
- package/lib/chunks/{MT4W54PL.js → YL3LVBZF.js} +1 -1
- package/lib/chunks/{O6NMXFEP.js → ZBB6PS6I.js} +1 -1
- package/lib/chunks/{NZE22F7Q.js → ZQTHHPK3.js} +2 -2
- package/lib/eject-assets/generators/cli/docs.ts +1 -1
- package/lib/eject-assets/generators/cli/engine-source.ts +1 -1
- package/lib/eject-assets/generators/cli/index.ts +2 -2
- package/lib/eject-assets/generators/cli/render.ts +1 -1
- package/lib/eject-assets/generators/go/client.ts +1 -1
- package/lib/eject-assets/generators/go/descriptor.ts +1 -1
- package/lib/eject-assets/generators/go/index.ts +2 -2
- package/lib/eject-assets/generators/go/models.ts +7 -2
- package/lib/eject-assets/generators/go/naming.ts +1 -1
- package/lib/eject-assets/generators/go/operations.ts +1 -1
- package/lib/eject-assets/generators/go/pagination.ts +1 -1
- package/lib/eject-assets/generators/go/types.ts +1 -1
- package/lib/eject-assets/generators/mock/faker.ts +17 -9
- package/lib/eject-assets/generators/mock/index.ts +4 -3
- package/lib/eject-assets/generators/mock/render.ts +128 -9
- package/lib/eject-assets/generators/mock/sample.ts +87 -4
- package/lib/eject-assets/generators/mock/values.ts +1 -1
- package/lib/eject-assets/generators/php/client.ts +1 -1
- package/lib/eject-assets/generators/php/descriptor.ts +10 -1
- package/lib/eject-assets/generators/php/index.ts +2 -2
- package/lib/eject-assets/generators/php/models.ts +8 -3
- package/lib/eject-assets/generators/php/naming.ts +1 -1
- package/lib/eject-assets/generators/php/operations.ts +11 -6
- package/lib/eject-assets/generators/php/pagination.ts +3 -2
- package/lib/eject-assets/generators/php/types.ts +12 -2
- package/lib/eject-assets/generators/python/client.ts +1 -1
- package/lib/eject-assets/generators/python/descriptor.ts +1 -1
- package/lib/eject-assets/generators/python/index.ts +3 -3
- package/lib/eject-assets/generators/python/models.ts +9 -3
- package/lib/eject-assets/generators/python/naming.ts +1 -1
- package/lib/eject-assets/generators/python/operations.ts +6 -5
- package/lib/eject-assets/generators/python/pagination.ts +1 -1
- package/lib/eject-assets/generators/python/types.ts +1 -1
- package/lib/eject-assets/generators/swr/index.ts +2 -2
- package/lib/eject-assets/generators/swr/render.ts +1 -1
- package/lib/eject-assets/generators/tanstack-query/index.ts +2 -2
- package/lib/eject-assets/generators/tanstack-query/render.ts +6 -5
- package/lib/eject-assets/generators/transformers/index.ts +2 -2
- package/lib/eject-assets/generators/transformers/render.ts +34 -7
- package/lib/eject-assets/generators/typescript/banner.ts +1 -1
- package/lib/eject-assets/generators/typescript/client.ts +1 -1
- package/lib/eject-assets/generators/typescript/descriptor.ts +1 -1
- package/lib/eject-assets/generators/typescript/index.ts +2 -2
- package/lib/eject-assets/generators/typescript/inline-runtime.ts +1 -1
- package/lib/eject-assets/generators/typescript/operation-signature.ts +1 -1
- package/lib/eject-assets/generators/typescript/operation-types.ts +1 -1
- package/lib/eject-assets/generators/typescript/operations.ts +1 -1
- package/lib/eject-assets/generators/typescript/response-headers.ts +1 -1
- package/lib/eject-assets/generators/typescript/type-guards.ts +1 -1
- package/lib/eject-assets/generators/typescript/types.ts +1 -1
- package/lib/eject-assets/generators/zod/index.ts +2 -2
- package/lib/eject-assets/generators/zod/schemas.ts +1 -1
- package/lib/eject-assets/skills/go-generator/SKILL.md +3 -0
- package/lib/eject-assets/skills/mock-generator/SKILL.md +22 -0
- package/lib/eject-assets/skills/php-generator/SKILL.md +9 -2
- package/lib/eject-assets/skills/python-generator/SKILL.md +6 -0
- package/lib/eject-assets/skills/tanstack-query-generator/SKILL.md +2 -1
- package/lib/eject-assets/skills/transformers-generator/SKILL.md +4 -0
- package/lib/eject-assets/skills/typescript-generator/SKILL.md +5 -0
- package/lib/index.js +5 -5
- package/lib/skills/redocly-cli/SKILL.md +20 -1
- package/package.json +1 -1
- package/lib/chunks/2Y7MGFQS.js +0 -105
- package/lib/chunks/BPDHBW3N.js +0 -7
- package/lib/chunks/EWU57NBY.js +0 -20
- package/lib/chunks/GKXY6U4S.js +0 -145
- package/lib/chunks/GMGZQR6Q.js +0 -7
- package/lib/chunks/JM7BMZLD.js +0 -13
- package/lib/chunks/K6VR5YNF.js +0 -22
- package/lib/chunks/M6UVHV6D.js +0 -7
- package/lib/chunks/O72R3AD4.js +0 -20
- package/lib/chunks/RZ3FGCBT.js +0 -20
- package/lib/chunks/SBT63VHF.js +0 -7
- package/lib/chunks/UW4UC7ZI.js +0 -9
- package/lib/chunks/VQRJE4I2.js +0 -7
- package/lib/chunks/WACZWFKN.js +0 -19
- package/lib/chunks/WJXIZZA6.js +0 -7
|
@@ -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 _i,c as le,k as un,ka as Ki,m as ga,oa as jr,qa as ji,sa as Ji,t as $i,ta as zi,va as Vi}from"./
|
|
7
|
+
import{H as _i,c as le,k as un,ka as Ki,m as ga,oa as jr,qa as ji,sa as Ji,t as $i,ta as zi,va as Vi}from"./DORXGE7Z.js";import{a as Pa,c as we,e as Le}from"./RFWIIJFG.js";var uo=we((hy,lo)=>{var Fc=Object.prototype.hasOwnProperty,$c=Object.prototype.toString;lo.exports=function(a,r,t){if($c.call(r)!=="[object Function]")throw new TypeError("iterator must be a function");var n=a.length;if(n===+n)for(var i=0;i<n;i++)r.call(t,a[i],i,a);else for(var s in a)Fc.call(a,s)&&r.call(t,a[s],s,a)}});var Ur=we((my,co)=>{"use strict";var _c=uo();co.exports=ve;function ve(e,a,r){if(arguments.length===3)return ve.set(e,a,r);if(arguments.length===2)return ve.get(e,a);var t=ve.bind(ve,e);for(var n in ve)ve.hasOwnProperty(n)&&(t[n]=ve[n].bind(t,e));return t}ve.get=function(a,r){for(var t=Array.isArray(r)?r:ve.parse(r),n=0;n<t.length;++n){var i=t[n];if(!(typeof a=="object"&&i in a))throw new Error("Invalid reference token: "+i);a=a[i]}return a};ve.set=function(a,r,t){var n=Array.isArray(r)?r:ve.parse(r),i=n[0];if(n.length===0)throw Error("Can not set the root object");for(var s=0;s<n.length-1;++s){var u=n[s];typeof u!="string"&&typeof u!="number"&&(u=String(u)),!(u==="__proto__"||u==="constructor"||u==="prototype")&&(u==="-"&&Array.isArray(a)&&(u=a.length),i=n[s+1],u in a||(i.match(/^(\d+|-)$/)?a[u]=[]:a[u]={}),a=a[u])}return i==="-"&&Array.isArray(a)&&(i=a.length),a[i]=t,this};ve.remove=function(e,a){var r=Array.isArray(a)?a:ve.parse(a),t=r[r.length-1];if(t===void 0)throw new Error('Invalid JSON pointer for remove: "'+a+'"');var n=ve.get(e,r.slice(0,-1));if(Array.isArray(n)){var i=+t;if(t===""&&isNaN(i))throw new Error('Invalid array index: "'+t+'"');Array.prototype.splice.call(n,i,1)}else delete n[t]};ve.dict=function(a,r){var t={};return ve.walk(a,function(n,i){t[i]=n},r),t};ve.walk=function(a,r,t){var n=[];t=t||function(i){var s=Object.prototype.toString.call(i);return s==="[object Object]"||s==="[object Array]"},(function i(s){_c(s,function(u,h){n.push(String(h)),t(u)?i(u):r(u,ve.compile(n)),n.pop()})})(a)};ve.has=function(a,r){try{ve.get(a,r)}catch{return!1}return!0};ve.escape=function(a){return a.toString().replace(/~/g,"~0").replace(/\//g,"~1")};ve.unescape=function(a){return a.replace(/~1/g,"/").replace(/~0/g,"~")};ve.parse=function(a){if(a==="")return[];if(a.charAt(0)!=="/")throw new Error("Invalid JSON pointer: "+a);return a.substring(1).split(/\//).map(ve.unescape)};ve.compile=function(a){return a.length===0?"":"/"+a.map(ve.escape).join("/")}});var Oo=we((No,bn)=>{(function(e){if(typeof No=="object"&&typeof bn<"u")bn.exports=e();else if(typeof define=="function"&&define.amd)define([],e);else{var a;typeof window<"u"?a=window:typeof global<"u"?a=global:typeof self<"u"?a=self:a=this,a.OpenAPISampler=e()}})(function(){var e,a,r;return(function(){function t(n,i,s){function u(g,k){if(!i[g]){if(!n[g]){var B=typeof Pa=="function"&&Pa;if(!k&&B)return B(g,!0);if(h)return h(g,!0);var P=new Error("Cannot find module '"+g+"'");throw P.code="MODULE_NOT_FOUND",P}var C=i[g]={exports:{}};n[g][0].call(C.exports,function(A){var T=n[g][1][A];return u(T||A)},C,C.exports,t,n,i,s)}return i[g].exports}for(var h=typeof Pa=="function"&&Pa,m=0;m<s.length;m++)u(s[m]);return u}return t})()({1:[function(t,n,i){(()=>{"use strict";var s={d:(d,o)=>{for(var c in o)s.o(o,c)&&!s.o(d,c)&&Object.defineProperty(d,c,{enumerable:!0,get:o[c]})},o:(d,o)=>Object.prototype.hasOwnProperty.call(d,o),r:d=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})}},u={};s.r(u),s.d(u,{XMLBuilder:()=>Xt,XMLParser:()=>Ut,XMLValidator:()=>Qt});let h=":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",m=new RegExp("^["+h+"]["+h+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function g(d,o){let c=[],l=o.exec(d);for(;l;){let f=[];f.startIndex=o.lastIndex-l[0].length;let b=l.length;for(let D=0;D<b;D++)f.push(l[D]);c.push(f),l=o.exec(d)}return c}let k=function(d){return m.exec(d)!=null},B=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],P=["__proto__","constructor","prototype"],C={allowBooleanAttributes:!1,unpairedTags:[]};function A(d,o){o=Object.assign({},C,o);let c=[],l=!1,f=!1;d[0]==="\uFEFF"&&(d=d.substr(1));for(let b=0;b<d.length;b++)if(d[b]==="<"&&d[b+1]==="?"){if(b+=2,b=S(d,b),b.err)return b}else{if(d[b]!=="<"){if(T(d[b]))continue;return L("InvalidChar","char '"+d[b]+"' is not expected.",H(d,b))}{let D=b;if(b++,d[b]==="!"){b=w(d,b);continue}{let v=!1;d[b]==="/"&&(v=!0,b++);let I="";for(;b<d.length&&d[b]!==">"&&d[b]!==" "&&d[b]!==" "&&d[b]!==`
|
|
8
8
|
`&&d[b]!=="\r";b++)I+=d[b];if(I=I.trim(),I[I.length-1]==="/"&&(I=I.substring(0,I.length-1),b--),!O(I)){let V;return V=I.trim().length===0?"Invalid space after '<'.":"Tag '"+I+"' is an invalid name.",L("InvalidTag",V,H(d,b))}let N=F(d,b);if(N===!1)return L("InvalidAttr","Attributes for '"+I+"' have open quote.",H(d,b));let G=N.value;if(b=N.index,G[G.length-1]==="/"){let V=b-G.length;G=G.substring(0,G.length-1);let Y=U(G,o);if(Y!==!0)return L(Y.err.code,Y.err.msg,H(d,V+Y.err.line));l=!0}else if(v){if(!N.tagClosed)return L("InvalidTag","Closing tag '"+I+"' doesn't have proper closing.",H(d,b));if(G.trim().length>0)return L("InvalidTag","Closing tag '"+I+"' can't have attributes or invalid starting.",H(d,D));if(c.length===0)return L("InvalidTag","Closing tag '"+I+"' has not been opened.",H(d,D));{let V=c.pop();if(I!==V.tagName){let Y=H(d,V.tagStartPos);return L("InvalidTag","Expected closing tag '"+V.tagName+"' (opened in line "+Y.line+", col "+Y.col+") instead of closing tag '"+I+"'.",H(d,D))}c.length==0&&(f=!0)}}else{let V=U(G,o);if(V!==!0)return L(V.err.code,V.err.msg,H(d,b-G.length+V.err.line));if(f===!0)return L("InvalidXml","Multiple possible root nodes found.",H(d,b));o.unpairedTags.indexOf(I)!==-1||c.push({tagName:I,tagStartPos:D}),l=!0}for(b++;b<d.length;b++)if(d[b]==="<"){if(d[b+1]==="!"){b++,b=w(d,b);continue}if(d[b+1]!=="?")break;if(b=S(d,++b),b.err)return b}else if(d[b]==="&"){let V=R(d,b);if(V==-1)return L("InvalidChar","char '&' is not expected.",H(d,b));b=V}else if(f===!0&&!T(d[b]))return L("InvalidXml","Extra text at the end",H(d,b));d[b]==="<"&&b--}}}return l?c.length==1?L("InvalidTag","Unclosed tag '"+c[0].tagName+"'.",H(d,c[0].tagStartPos)):!(c.length>0)||L("InvalidXml","Invalid '"+JSON.stringify(c.map(b=>b.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):L("InvalidXml","Start tag expected.",1)}function T(d){return d===" "||d===" "||d===`
|
|
9
9
|
`||d==="\r"}function S(d,o){let c=o;for(;o<d.length;o++)if(d[o]=="?"||d[o]==" "){let l=d.substr(c,o-c);if(o>5&&l==="xml")return L("InvalidXml","XML declaration allowed only at the start of the document.",H(d,o));if(d[o]=="?"&&d[o+1]==">"){o++;break}continue}return o}function w(d,o){if(d.length>o+5&&d[o+1]==="-"&&d[o+2]==="-"){for(o+=3;o<d.length;o++)if(d[o]==="-"&&d[o+1]==="-"&&d[o+2]===">"){o+=2;break}}else if(d.length>o+8&&d[o+1]==="D"&&d[o+2]==="O"&&d[o+3]==="C"&&d[o+4]==="T"&&d[o+5]==="Y"&&d[o+6]==="P"&&d[o+7]==="E"){let c=1;for(o+=8;o<d.length;o++)if(d[o]==="<")c++;else if(d[o]===">"&&(c--,c===0))break}else if(d.length>o+9&&d[o+1]==="["&&d[o+2]==="C"&&d[o+3]==="D"&&d[o+4]==="A"&&d[o+5]==="T"&&d[o+6]==="A"&&d[o+7]==="["){for(o+=8;o<d.length;o++)if(d[o]==="]"&&d[o+1]==="]"&&d[o+2]===">"){o+=2;break}}return o}let W='"',K="'";function F(d,o){let c="",l="",f=!1;for(;o<d.length;o++){if(d[o]===W||d[o]===K)l===""?l=d[o]:l!==d[o]||(l="");else if(d[o]===">"&&l===""){f=!0;break}c+=d[o]}return l===""&&{value:c,index:o,tagClosed:f}}let _=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function U(d,o){let c=g(d,_),l={};for(let f=0;f<c.length;f++){if(c[f][1].length===0)return L("InvalidAttr","Attribute '"+c[f][2]+"' has no space in starting.",J(c[f]));if(c[f][3]!==void 0&&c[f][4]===void 0)return L("InvalidAttr","Attribute '"+c[f][2]+"' is without value.",J(c[f]));if(c[f][3]===void 0&&!o.allowBooleanAttributes)return L("InvalidAttr","boolean attribute '"+c[f][2]+"' is not allowed.",J(c[f]));let b=c[f][2];if(!x(b))return L("InvalidAttr","Attribute '"+b+"' is an invalid name.",J(c[f]));if(Object.prototype.hasOwnProperty.call(l,b))return L("InvalidAttr","Attribute '"+b+"' is repeated.",J(c[f]));l[b]=1}return!0}function R(d,o){if(d[++o]===";")return-1;if(d[o]==="#")return(function(l,f){let b=/\d/;for(l[f]==="x"&&(f++,b=/[\da-fA-F]/);f<l.length;f++){if(l[f]===";")return f;if(!l[f].match(b))break}return-1})(d,++o);let c=0;for(;o<d.length;o++,c++)if(!(d[o].match(/\w/)&&c<20)){if(d[o]===";")break;return-1}return o}function L(d,o,c){return{err:{code:d,msg:o,line:c.line||c,col:c.col}}}function x(d){return k(d)}function O(d){return k(d)}function H(d,o){let c=d.substring(0,o).split(/\r?\n/);return{line:c.length,col:c[c.length-1].length+1}}function J(d){return d.startIndex+d[1].length}let re=d=>B.includes(d)?"__"+d:d,oe={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(d,o){return o},attributeValueProcessor:function(d,o){return o},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,entityDecoder:null,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(d,o,c){return d},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:re};function he(d,o){if(typeof d!="string")return;let c=d.toLowerCase();if(B.some(l=>c===l.toLowerCase()))throw new Error(`[SECURITY] Invalid ${o}: "${d}" is a reserved JavaScript keyword that could cause prototype pollution`);if(P.some(l=>c===l.toLowerCase()))throw new Error(`[SECURITY] Invalid ${o}: "${d}" is a reserved JavaScript keyword that could cause prototype pollution`)}function j(d,o){return typeof d=="boolean"?{enabled:d,maxEntitySize:1e4,maxExpansionDepth:1e4,maxTotalExpansions:1/0,maxExpandedLength:1e5,maxEntityCount:1e3,allowedTags:null,tagFilter:null,appliesTo:"all"}:typeof d=="object"&&d!==null?{enabled:d.enabled!==!1,maxEntitySize:Math.max(1,d.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,d.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,d.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,d.maxExpandedLength??1e5),maxEntityCount:Math.max(1,d.maxEntityCount??1e3),allowedTags:d.allowedTags??null,tagFilter:d.tagFilter??null,appliesTo:d.appliesTo??"all"}:j(!0)}let ae=function(d){let o=Object.assign({},oe,d),c=[{value:o.attributeNamePrefix,name:"attributeNamePrefix"},{value:o.attributesGroupName,name:"attributesGroupName"},{value:o.textNodeName,name:"textNodeName"},{value:o.cdataPropName,name:"cdataPropName"},{value:o.commentPropName,name:"commentPropName"}];for(let{value:l,name:f}of c)l&&he(l,f);return o.onDangerousProperty===null&&(o.onDangerousProperty=re),o.processEntities=j(o.processEntities,o.htmlEntities),o.unpairedTagsSet=new Set(o.unpairedTags),o.stopNodes&&Array.isArray(o.stopNodes)&&(o.stopNodes=o.stopNodes.map(l=>typeof l=="string"&&l.startsWith("*.")?".."+l.substring(2):l)),o},ne;ne=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class de{constructor(o){this.tagname=o,this.child=[],this[":@"]=Object.create(null)}add(o,c){o==="__proto__"&&(o="#__proto__"),this.child.push({[o]:c})}addChild(o,c){o.tagname==="__proto__"&&(o.tagname="#__proto__"),o[":@"]&&Object.keys(o[":@"]).length>0?this.child.push({[o.tagname]:o.child,":@":o[":@"]}):this.child.push({[o.tagname]:o.child}),c!==void 0&&(this.child[this.child.length-1][ne]={startIndex:c})}static getMetaDataSymbol(){return ne}}class ue{constructor(o){this.suppressValidationErr=!o,this.options=o}readDocType(o,c){let l=Object.create(null),f=0;if(o[c+3]!=="O"||o[c+4]!=="C"||o[c+5]!=="T"||o[c+6]!=="Y"||o[c+7]!=="P"||o[c+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{c+=9;let b=1,D=!1,v=!1,I="";for(;c<o.length;c++)if(o[c]!=="<"||v)if(o[c]===">"){if(v?o[c-1]==="-"&&o[c-2]==="-"&&(v=!1,b--):b--,b===0)break}else o[c]==="["?D=!0:I+=o[c];else{if(D&&Se(o,"!ENTITY",c)){let N,G;if(c+=7,[N,G,c]=this.readEntityExp(o,c+1,this.suppressValidationErr),G.indexOf("&")===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount!=null&&f>=this.options.maxEntityCount)throw new Error(`Entity count (${f+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);l[N]=G,f++}}else if(D&&Se(o,"!ELEMENT",c)){c+=8;let{index:N}=this.readElementExp(o,c+1);c=N}else if(D&&Se(o,"!ATTLIST",c))c+=8;else if(D&&Se(o,"!NOTATION",c)){c+=9;let{index:N}=this.readNotationExp(o,c+1,this.suppressValidationErr);c=N}else{if(!Se(o,"!--",c))throw new Error("Invalid DOCTYPE");v=!0}b++,I=""}if(b!==0)throw new Error("Unclosed DOCTYPE")}return{entities:l,i:c}}readEntityExp(o,c){let l=c=se(o,c);for(;c<o.length&&!/\s/.test(o[c])&&o[c]!=='"'&&o[c]!=="'";)c++;let f=o.substring(l,c);if(Ce(f),c=se(o,c),!this.suppressValidationErr){if(o.substring(c,c+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(o[c]==="%")throw new Error("Parameter entities are not supported")}let b="";if([c,b]=this.readIdentifierVal(o,c,"entity"),this.options.enabled!==!1&&this.options.maxEntitySize!=null&&b.length>this.options.maxEntitySize)throw new Error(`Entity "${f}" size (${b.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[f,b,--c]}readNotationExp(o,c){let l=c=se(o,c);for(;c<o.length&&!/\s/.test(o[c]);)c++;let f=o.substring(l,c);!this.suppressValidationErr&&Ce(f),c=se(o,c);let b=o.substring(c,c+6).toUpperCase();if(!this.suppressValidationErr&&b!=="SYSTEM"&&b!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${b}"`);c+=b.length,c=se(o,c);let D=null,v=null;if(b==="PUBLIC")[c,D]=this.readIdentifierVal(o,c,"publicIdentifier"),o[c=se(o,c)]!=='"'&&o[c]!=="'"||([c,v]=this.readIdentifierVal(o,c,"systemIdentifier"));else if(b==="SYSTEM"&&([c,v]=this.readIdentifierVal(o,c,"systemIdentifier"),!this.suppressValidationErr&&!v))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:f,publicIdentifier:D,systemIdentifier:v,index:--c}}readIdentifierVal(o,c,l){let f="",b=o[c];if(b!=='"'&&b!=="'")throw new Error(`Expected quoted string, found "${b}"`);let D=++c;for(;c<o.length&&o[c]!==b;)c++;if(f=o.substring(D,c),o[c]!==b)throw new Error(`Unterminated ${l} value`);return[++c,f]}readElementExp(o,c){let l=c=se(o,c);for(;c<o.length&&!/\s/.test(o[c]);)c++;let f=o.substring(l,c);if(!this.suppressValidationErr&&!k(f))throw new Error(`Invalid element name: "${f}"`);let b="";if(o[c=se(o,c)]==="E"&&Se(o,"MPTY",c))c+=4;else if(o[c]==="A"&&Se(o,"NY",c))c+=2;else if(o[c]==="("){let D=++c;for(;c<o.length&&o[c]!==")";)c++;if(b=o.substring(D,c),o[c]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${o[c]}"`);return{elementName:f,contentModel:b.trim(),index:c}}readAttlistExp(o,c){let l=c=se(o,c);for(;c<o.length&&!/\s/.test(o[c]);)c++;let f=o.substring(l,c);for(Ce(f),l=c=se(o,c);c<o.length&&!/\s/.test(o[c]);)c++;let b=o.substring(l,c);if(!Ce(b))throw new Error(`Invalid attribute name: "${b}"`);c=se(o,c);let D="";if(o.substring(c,c+8).toUpperCase()==="NOTATION"){if(D="NOTATION",o[c=se(o,c+=8)]!=="(")throw new Error(`Expected '(', found "${o[c]}"`);c++;let I=[];for(;c<o.length&&o[c]!==")";){let N=c;for(;c<o.length&&o[c]!=="|"&&o[c]!==")";)c++;let G=o.substring(N,c);if(G=G.trim(),!Ce(G))throw new Error(`Invalid notation name: "${G}"`);I.push(G),o[c]==="|"&&(c++,c=se(o,c))}if(o[c]!==")")throw new Error("Unterminated list of notations");c++,D+=" ("+I.join("|")+")"}else{let I=c;for(;c<o.length&&!/\s/.test(o[c]);)c++;D+=o.substring(I,c);let N=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!N.includes(D.toUpperCase()))throw new Error(`Invalid attribute type: "${D}"`)}c=se(o,c);let v="";return o.substring(c,c+8).toUpperCase()==="#REQUIRED"?(v="#REQUIRED",c+=8):o.substring(c,c+7).toUpperCase()==="#IMPLIED"?(v="#IMPLIED",c+=7):[c,v]=this.readIdentifierVal(o,c,"ATTLIST"),{elementName:f,attributeName:b,attributeType:D,defaultValue:v,index:c}}}let se=(d,o)=>{for(;o<d.length&&/\s/.test(d[o]);)o++;return o};function Se(d,o,c){for(let l=0;l<o.length;l++)if(o[l]!==d[c+l+1])return!1;return!0}function Ce(d){if(k(d))return d;throw new Error(`Invalid entity name ${d}`)}let We=/^[-+]?0x[a-fA-F0-9]+$/,ie=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,De={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original"},Je=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;class ca{constructor(o){this._matcher=o}get separator(){return this._matcher.separator}getCurrentTag(){let o=this._matcher.path;return o.length>0?o[o.length-1].tag:void 0}getCurrentNamespace(){let o=this._matcher.path;return o.length>0?o[o.length-1].namespace:void 0}getAttrValue(o){let c=this._matcher.path;if(c.length!==0)return c[c.length-1].values?.[o]}hasAttr(o){let c=this._matcher.path;if(c.length===0)return!1;let l=c[c.length-1];return l.values!==void 0&&o in l.values}getPosition(){let o=this._matcher.path;return o.length===0?-1:o[o.length-1].position??0}getCounter(){let o=this._matcher.path;return o.length===0?-1:o[o.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this._matcher.path.length}toString(o,c=!0){return this._matcher.toString(o,c)}toArray(){return this._matcher.path.map(o=>o.tag)}matches(o){return this._matcher.matches(o)}matchesAny(o){return o.matchesAny(this._matcher)}}class da{constructor(o={}){this.separator=o.separator||".",this.path=[],this.siblingStacks=[],this._pathStringCache=null,this._view=new ca(this)}push(o,c=null,l=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);let f=this.path.length;this.siblingStacks[f]||(this.siblingStacks[f]=new Map);let b=this.siblingStacks[f],D=l?`${l}:${o}`:o,v=b.get(D)||0,I=0;for(let G of b.values())I+=G;b.set(D,v+1);let N={tag:o,position:I,counter:v};l!=null&&(N.namespace=l),c!=null&&(N.values=c),this.path.push(N)}pop(){if(this.path.length===0)return;this._pathStringCache=null;let o=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),o}updateCurrent(o){if(this.path.length>0){let c=this.path[this.path.length-1];o!=null&&(c.values=o)}}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(o){if(this.path.length!==0)return this.path[this.path.length-1].values?.[o]}hasAttr(o){if(this.path.length===0)return!1;let c=this.path[this.path.length-1];return c.values!==void 0&&o in c.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(o,c=!0){let l=o||this.separator;if(l===this.separator&&c===!0){if(this._pathStringCache!==null)return this._pathStringCache;let f=this.path.map(b=>b.namespace?`${b.namespace}:${b.tag}`:b.tag).join(l);return this._pathStringCache=f,f}return this.path.map(f=>c&&f.namespace?`${f.namespace}:${f.tag}`:f.tag).join(l)}toArray(){return this.path.map(o=>o.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(o){let c=o.segments;return c.length!==0&&(o.hasDeepWildcard()?this._matchWithDeepWildcard(c):this._matchSimple(c))}_matchSimple(o){if(this.path.length!==o.length)return!1;for(let c=0;c<o.length;c++)if(!this._matchSegment(o[c],this.path[c],c===this.path.length-1))return!1;return!0}_matchWithDeepWildcard(o){let c=this.path.length-1,l=o.length-1;for(;l>=0&&c>=0;){let f=o[l];if(f.type==="deep-wildcard"){if(l--,l<0)return!0;let b=o[l],D=!1;for(let v=c;v>=0;v--)if(this._matchSegment(b,this.path[v],v===this.path.length-1)){c=v-1,l--,D=!0;break}if(!D)return!1}else{if(!this._matchSegment(f,this.path[c],c===this.path.length-1))return!1;c--,l--}}return l<0}_matchSegment(o,c,l){if(o.tag!=="*"&&o.tag!==c.tag||o.namespace!==void 0&&o.namespace!=="*"&&o.namespace!==c.namespace||o.attrName!==void 0&&(!l||!c.values||!(o.attrName in c.values)||o.attrValue!==void 0&&String(c.values[o.attrName])!==String(o.attrValue)))return!1;if(o.position!==void 0){if(!l)return!1;let f=c.counter??0;if(o.position==="first"&&f!==0||o.position==="odd"&&f%2!=1||o.position==="even"&&f%2!=0||o.position==="nth"&&f!==o.positionValue)return!1}return!0}matchesAny(o){return o.matchesAny(this)}snapshot(){return{path:this.path.map(o=>({...o})),siblingStacks:this.siblingStacks.map(o=>new Map(o))}}restore(o){this._pathStringCache=null,this.path=o.path.map(c=>({...c})),this.siblingStacks=o.siblingStacks.map(c=>new Map(c))}readOnly(){return this._view}}class Ve{constructor(o,c={},l){this.pattern=o,this.separator=c.separator||".",this.segments=this._parse(o),this.data=l,this._hasDeepWildcard=this.segments.some(f=>f.type==="deep-wildcard"),this._hasAttributeCondition=this.segments.some(f=>f.attrName!==void 0),this._hasPositionSelector=this.segments.some(f=>f.position!==void 0)}_parse(o){let c=[],l=0,f="";for(;l<o.length;)o[l]===this.separator?l+1<o.length&&o[l+1]===this.separator?(f.trim()&&(c.push(this._parseSegment(f.trim())),f=""),c.push({type:"deep-wildcard"}),l+=2):(f.trim()&&c.push(this._parseSegment(f.trim())),f="",l++):(f+=o[l],l++);return f.trim()&&c.push(this._parseSegment(f.trim())),c}_parseSegment(o){let c={type:"tag"},l=null,f=o,b=o.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(b&&(f=b[1]+b[3],b[2])){let G=b[2].slice(1,-1);G&&(l=G)}let D,v,I=f;if(f.includes("::")){let G=f.indexOf("::");if(D=f.substring(0,G).trim(),I=f.substring(G+2).trim(),!D)throw new Error(`Invalid namespace in pattern: ${o}`)}let N=null;if(I.includes(":")){let G=I.lastIndexOf(":"),V=I.substring(0,G).trim(),Y=I.substring(G+1).trim();["first","last","odd","even"].includes(Y)||/^nth\(\d+\)$/.test(Y)?(v=V,N=Y):v=I}else v=I;if(!v)throw new Error(`Invalid segment pattern: ${o}`);if(c.tag=v,D&&(c.namespace=D),l)if(l.includes("=")){let G=l.indexOf("=");c.attrName=l.substring(0,G).trim(),c.attrValue=l.substring(G+1).trim()}else c.attrName=l.trim();if(N){let G=N.match(/^nth\((\d+)\)$/);G?(c.position="nth",c.positionValue=parseInt(G[1],10)):c.position=N}return c}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}class sr{constructor(){this._byDepthAndTag=new Map,this._wildcardByDepth=new Map,this._deepWildcards=[],this._patterns=new Set,this._sealed=!1}add(o){if(this._sealed)throw new TypeError("ExpressionSet is sealed. Create a new ExpressionSet to add more expressions.");if(this._patterns.has(o.pattern))return this;if(this._patterns.add(o.pattern),o.hasDeepWildcard())return this._deepWildcards.push(o),this;let c=o.length,l=o.segments[o.segments.length-1],f=l?.tag;if(f&&f!=="*"){let b=`${c}:${f}`;this._byDepthAndTag.has(b)||this._byDepthAndTag.set(b,[]),this._byDepthAndTag.get(b).push(o)}else this._wildcardByDepth.has(c)||this._wildcardByDepth.set(c,[]),this._wildcardByDepth.get(c).push(o);return this}addAll(o){for(let c of o)this.add(c);return this}has(o){return this._patterns.has(o.pattern)}get size(){return this._patterns.size}seal(){return this._sealed=!0,this}get isSealed(){return this._sealed}matchesAny(o){return this.findMatch(o)!==null}findMatch(o){let c=o.getDepth(),l=`${c}:${o.getCurrentTag()}`,f=this._byDepthAndTag.get(l);if(f){for(let D=0;D<f.length;D++)if(o.matches(f[D]))return f[D]}let b=this._wildcardByDepth.get(c);if(b){for(let D=0;D<b.length;D++)if(o.matches(b[D]))return b[D]}for(let D=0;D<this._deepWildcards.length;D++)if(o.matches(this._deepWildcards[D]))return this._deepWildcards[D];return null}}let $a={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"},Ba={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'},lr={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"},ha=new Set("!?\\\\/[]$%{}^&*()<>|+");function xa(d){if(d[0]==="#")throw new Error(`[EntityReplacer] Invalid character '#' in entity name: "${d}"`);for(let o of d)if(ha.has(o))throw new Error(`[EntityReplacer] Invalid character '${o}' in entity name: "${d}"`);return d}function ma(...d){let o=Object.create(null);for(let c of d)if(c)for(let l of Object.keys(c)){let f=c[l];if(typeof f=="string")o[l]=f;else if(f&&typeof f=="object"&&f.val!==void 0){let b=f.val;typeof b=="string"&&(o[l]=b)}}return o}let $e="external",Ue="base",pa="all",Ne=Object.freeze({allow:0,leave:1,remove:2,throw:3}),Et=new Set([9,10,13]);class Pt{constructor(o={}){var c;this._limit=o.limit||{},this._maxTotalExpansions=this._limit.maxTotalExpansions||0,this._maxExpandedLength=this._limit.maxExpandedLength||0,this._postCheck=typeof o.postCheck=="function"?o.postCheck:f=>f,this._limitTiers=(c=this._limit.applyLimitsTo??$e)&&c!==$e?c===pa?new Set([pa]):c===Ue?new Set([Ue]):Array.isArray(c)?new Set(c):new Set([$e]):new Set([$e]),this._numericAllowed=o.numericAllowed??!0,this._baseMap=ma(Ba,o.namedEntities||null),this._externalMap=Object.create(null),this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this._removeSet=new Set(o.remove&&Array.isArray(o.remove)?o.remove:[]),this._leaveSet=new Set(o.leave&&Array.isArray(o.leave)?o.leave:[]);let l=(function(f){if(!f)return{xmlVersion:1,onLevel:Ne.allow,nullLevel:Ne.remove};let b=f.xmlVersion===1.1?1.1:1,D=Ne[f.onNCR]??Ne.allow,v=Ne[f.nullNCR]??Ne.remove;return{xmlVersion:b,onLevel:D,nullLevel:Math.max(v,Ne.remove)}})(o.ncr);this._ncrXmlVersion=l.xmlVersion,this._ncrOnLevel=l.onLevel,this._ncrNullLevel=l.nullLevel}setExternalEntities(o){if(o)for(let c of Object.keys(o))xa(c);this._externalMap=ma(o)}addExternalEntity(o,c){xa(o),typeof c=="string"&&c.indexOf("&")===-1&&(this._externalMap[o]=c)}addInputEntities(o){this._totalExpansions=0,this._expandedLength=0,this._inputMap=ma(o)}reset(){return this._inputMap=Object.create(null),this._totalExpansions=0,this._expandedLength=0,this}setXmlVersion(o){this._ncrXmlVersion=o===1.1?1.1:1}decode(o){if(typeof o!="string"||o.length===0)return o;let c=o,l=[],f=o.length,b=0,D=0,v=this._maxTotalExpansions>0,I=this._maxExpandedLength>0,N=v||I;for(;D<f;){if(o.charCodeAt(D)!==38){D++;continue}let V=D+1;for(;V<f&&o.charCodeAt(V)!==59&&V-D<=32;)V++;if(V>=f||o.charCodeAt(V)!==59){D++;continue}let Y=o.slice(D+1,V);if(Y.length===0){D++;continue}let X,te;if(this._removeSet.has(Y))X="",te===void 0&&(te=$e);else{if(this._leaveSet.has(Y)){D++;continue}if(Y.charCodeAt(0)===35){let z=this._resolveNCR(Y);if(z===void 0){D++;continue}X=z,te=Ue}else{let z=this._resolveName(Y);X=z?.value,te=z?.tier}}if(X!==void 0){if(D>b&&l.push(o.slice(b,D)),l.push(X),b=V+1,D=b,N&&this._tierCounts(te)){if(v&&(this._totalExpansions++,this._totalExpansions>this._maxTotalExpansions))throw new Error(`[EntityReplacer] Entity expansion count limit exceeded: ${this._totalExpansions} > ${this._maxTotalExpansions}`);if(I){let z=X.length-(Y.length+2);if(z>0&&(this._expandedLength+=z,this._expandedLength>this._maxExpandedLength))throw new Error(`[EntityReplacer] Expanded content length limit exceeded: ${this._expandedLength} > ${this._maxExpandedLength}`)}}}else D++}b<f&&l.push(o.slice(b));let G=l.length===0?o:l.join("");return this._postCheck(G,c)}_tierCounts(o){return!!this._limitTiers.has(pa)||this._limitTiers.has(o)}_resolveName(o){return o in this._inputMap?{value:this._inputMap[o],tier:$e}:o in this._externalMap?{value:this._externalMap[o],tier:$e}:o in this._baseMap?{value:this._baseMap[o],tier:Ue}:void 0}_classifyNCR(o){return o===0?this._ncrNullLevel:o>=55296&&o<=57343||this._ncrXmlVersion===1&&o>=1&&o<=31&&!Et.has(o)?Ne.remove:-1}_applyNCRAction(o,c,l){switch(o){case Ne.allow:return String.fromCodePoint(l);case Ne.remove:return"";case Ne.leave:return;case Ne.throw:throw new Error(`[EntityDecoder] Prohibited numeric character reference &${c}; (U+${l.toString(16).toUpperCase().padStart(4,"0")})`);default:return String.fromCodePoint(l)}}_resolveNCR(o){let c=o.charCodeAt(1),l;if(l=c===120||c===88?parseInt(o.slice(2),16):parseInt(o.slice(1),10),Number.isNaN(l)||l<0||l>1114111)return;let f=this._classifyNCR(l);if(!this._numericAllowed&&f<Ne.remove)return;let b=f===-1?this._ncrOnLevel:Math.max(this._ncrOnLevel,f);return this._applyNCRAction(b,o,l)}}function Rt(d,o){if(!d)return{};let c=o.attributesGroupName?d[o.attributesGroupName]:d;if(!c)return{};let l={};for(let f in c)f.startsWith(o.attributeNamePrefix)?l[f.substring(o.attributeNamePrefix.length)]=c[f]:l[f]=c[f];return l}function Lt(d){if(!d||typeof d!="string")return;let o=d.indexOf(":");if(o!==-1&&o>0){let c=d.substring(0,o);if(c!=="xmlns")return c}}class Dt{constructor(o){var c;this.options=o,this.currentNode=null,this.tagsNodeStack=[],this.parseXml=Ht,this.parseTextData=Nt,this.resolveNameSpace=Dr,this.buildAttributesMap=Ot,this.isItStopNode=Ft,this.replaceEntitiesValue=Wt,this.readStopNodeData=_t,this.saveTextToParentTag=Gt,this.addChild=It,this.ignoreAttributesFn=typeof(c=this.options.ignoreAttributes)=="function"?c:Array.isArray(c)?b=>{for(let D of c)if(typeof D=="string"&&b===D||D instanceof RegExp&&D.test(b))return!0}:()=>!1,this.entityExpansionCount=0,this.currentExpandedLength=0;let l={...Ba};this.options.entityDecoder?this.entityDecoder=this.options.entityDecoder:(typeof this.options.htmlEntities=="object"?l=this.options.htmlEntities:this.options.htmlEntities===!0&&(l={...lr,...$a}),this.entityDecoder=new Pt({namedEntities:l,numericAllowed:this.options.htmlEntities,limit:{maxTotalExpansions:this.options.processEntities.maxTotalExpansions,maxExpandedLength:this.options.processEntities.maxExpandedLength,applyLimitsTo:this.options.processEntities.appliesTo}})),this.matcher=new da,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.stopNodeExpressionsSet=new sr;let f=this.options.stopNodes;if(f&&f.length>0){for(let b=0;b<f.length;b++){let D=f[b];typeof D=="string"?this.stopNodeExpressionsSet.add(new Ve(D)):D instanceof Ve&&this.stopNodeExpressionsSet.add(D)}this.stopNodeExpressionsSet.seal()}}}function Nt(d,o,c,l,f,b,D){let v=this.options;if(d!==void 0&&(v.trimValues&&!l&&(d=d.trim()),d.length>0)){D||(d=this.replaceEntitiesValue(d,o,c));let I=v.jPath?c.toString():c,N=v.tagValueProcessor(o,d,I,f,b);return N==null?d:typeof N!=typeof d||N!==d?N:v.trimValues||d.trim()===d?Or(d,v.parseTagValue,v.numberParseOptions):d}}function Dr(d){if(this.options.removeNSPrefix){let o=d.split(":"),c=d.charAt(0)==="/"?"/":"";if(o[0]==="xmlns")return"";o.length===2&&(d=c+o[1])}return d}let Nr=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Ot(d,o,c,l=!1){let f=this.options;if(l===!0||f.ignoreAttributes!==!0&&typeof d=="string"){let b=g(d,Nr),D=b.length,v={},I=new Array(D),N=!1,G={};for(let X=0;X<D;X++){let te=this.resolveNameSpace(b[X][1]),z=b[X][4];if(te.length&&z!==void 0){let ye=z;f.trimValues&&(ye=ye.trim()),ye=this.replaceEntitiesValue(ye,c,this.readonlyMatcher),I[X]=ye,G[te]=ye,N=!0}}N&&typeof o=="object"&&o.updateCurrent&&o.updateCurrent(G);let V=f.jPath?o.toString():this.readonlyMatcher,Y=!1;for(let X=0;X<D;X++){let te=this.resolveNameSpace(b[X][1]);if(this.ignoreAttributesFn(te,V))continue;let z=f.attributeNamePrefix+te;if(te.length)if(f.transformAttributeName&&(z=f.transformAttributeName(z)),z=ya(z,f),b[X][4]!==void 0){let ye=I[X],He=f.attributeValueProcessor(te,ye,V);v[z]=He==null?ye:typeof He!=typeof ye||He!==ye?He:Or(ye,f.parseAttributeValue,f.numberParseOptions),Y=!0}else f.allowBooleanAttributes&&(v[z]=!0,Y=!0)}if(!Y)return;if(f.attributesGroupName){let X={};return X[f.attributesGroupName]=v,X}return v}}let Ht=function(d){d=d.replace(/\r\n?/g,`
|
|
10
10
|
`);let o=new de("!xml"),c=o,l="";this.matcher.reset(),this.entityDecoder.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let f=this.options,b=new ue(f.processEntities),D=d.length;for(let v=0;v<D;v++)if(d[v]==="<"){let I=d.charCodeAt(v+1);if(I===47){let N=fa(d,">",v,"Closing Tag is not closed."),G=d.substring(v+2,N).trim();if(f.removeNSPrefix){let Y=G.indexOf(":");Y!==-1&&(G=G.substr(Y+1))}G=cr(f.transformTagName,G,"",f).tagName,c&&(l=this.saveTextToParentTag(l,c,this.readonlyMatcher));let V=this.matcher.getCurrentTag();if(G&&f.unpairedTagsSet.has(G))throw new Error(`Unpaired tag can not be used as closing tag: </${G}>`);V&&f.unpairedTagsSet.has(V)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,c=this.tagsNodeStack.pop(),l="",v=N}else if(I===63){let N=ur(d,v,!1,"?>");if(!N)throw new Error("Pi Tag is not closed.");l=this.saveTextToParentTag(l,c,this.readonlyMatcher);let G=this.buildAttributesMap(N.tagExp,this.matcher,N.tagName,!0);if(G){let V=G[this.options.attributeNamePrefix+"version"];this.entityDecoder.setXmlVersion(Number(V)||1)}if(!(f.ignoreDeclaration&&N.tagName==="?xml"||f.ignorePiTags)){let V=new de(N.tagName);V.add(f.textNodeName,""),N.tagName!==N.tagExp&&N.attrExpPresent&&f.ignoreAttributes!==!0&&(V[":@"]=G),this.addChild(c,V,this.readonlyMatcher,v)}v=N.closeIndex+1}else if(I===33&&d.charCodeAt(v+2)===45&&d.charCodeAt(v+3)===45){let N=fa(d,"-->",v+4,"Comment is not closed.");if(f.commentPropName){let G=d.substring(v+4,N-2);l=this.saveTextToParentTag(l,c,this.readonlyMatcher),c.add(f.commentPropName,[{[f.textNodeName]:G}])}v=N}else if(I===33&&d.charCodeAt(v+2)===68){let N=b.readDocType(d,v);this.entityDecoder.addInputEntities(N.entities),v=N.i}else if(I===33&&d.charCodeAt(v+2)===91){let N=fa(d,"]]>",v,"CDATA is not closed.")-2,G=d.substring(v+9,N);l=this.saveTextToParentTag(l,c,this.readonlyMatcher);let V=this.parseTextData(G,c.tagname,this.readonlyMatcher,!0,!1,!0,!0);V==null&&(V=""),f.cdataPropName?c.add(f.cdataPropName,[{[f.textNodeName]:G}]):c.add(f.textNodeName,V),v=N+2}else{let N=ur(d,v,f.removeNSPrefix);if(!N){let Re=d.substring(Math.max(0,v-50),Math.min(D,v+50));throw new Error(`readTagExp returned undefined at position ${v}. Context: "${Re}"`)}let G=N.tagName,V=N.rawTagName,Y=N.tagExp,X=N.attrExpPresent,te=N.closeIndex;if({tagName:G,tagExp:Y}=cr(f.transformTagName,G,Y,f),f.strictReservedNames&&(G===f.commentPropName||G===f.cdataPropName||G===f.textNodeName||G===f.attributesGroupName))throw new Error(`Invalid tag name: ${G}`);c&&l&&c.tagname!=="!xml"&&(l=this.saveTextToParentTag(l,c,this.readonlyMatcher,!1));let z=c;z&&f.unpairedTagsSet.has(z.tagname)&&(c=this.tagsNodeStack.pop(),this.matcher.pop());let ye=!1;Y.length>0&&Y.lastIndexOf("/")===Y.length-1&&(ye=!0,G[G.length-1]==="/"?(G=G.substr(0,G.length-1),Y=G):Y=Y.substr(0,Y.length-1),X=G!==Y);let He,Pe=null,Ye={};He=Lt(V),G!==o.tagname&&this.matcher.push(G,{},He),G!==Y&&X&&(Pe=this.buildAttributesMap(Y,this.matcher,G),Pe&&(Ye=Rt(Pe,f))),G!==o.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode());let Ie=v;if(this.isCurrentNodeStopNode){let Re="";if(ye)v=N.closeIndex;else if(f.unpairedTagsSet.has(G))v=N.closeIndex;else{let pr=this.readStopNodeData(d,V,te+1);if(!pr)throw new Error(`Unexpected end of ${V}`);v=pr.i,Re=pr.tagContent}let ra=new de(G);Pe&&(ra[":@"]=Pe),ra.add(f.textNodeName,Re),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(c,ra,this.readonlyMatcher,Ie)}else{if(ye){({tagName:G,tagExp:Y}=cr(f.transformTagName,G,Y,f));let Re=new de(G);Pe&&(Re[":@"]=Pe),this.addChild(c,Re,this.readonlyMatcher,Ie),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(f.unpairedTagsSet.has(G)){let Re=new de(G);Pe&&(Re[":@"]=Pe),this.addChild(c,Re,this.readonlyMatcher,Ie),this.matcher.pop(),this.isCurrentNodeStopNode=!1,v=N.closeIndex;continue}{let Re=new de(G);if(this.tagsNodeStack.length>f.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(c),Pe&&(Re[":@"]=Pe),this.addChild(c,Re,this.readonlyMatcher,Ie),c=Re}}l="",v=te}}}else l+=d[v];return o.child};function It(d,o,c,l){this.options.captureMetaData||(l=void 0);let f=this.options.jPath?c.toString():c,b=this.options.updateTag(o.tagname,f,o[":@"]);b===!1||(typeof b=="string"&&(o.tagname=b),d.addChild(o,l))}function Wt(d,o,c){let l=this.options.processEntities;if(!l||!l.enabled)return d;if(l.allowedTags){let f=this.options.jPath?c.toString():c;if(!(Array.isArray(l.allowedTags)?l.allowedTags.includes(o):l.allowedTags(o,f)))return d}if(l.tagFilter){let f=this.options.jPath?c.toString():c;if(!l.tagFilter(o,f))return d}return this.entityDecoder.decode(d)}function Gt(d,o,c,l){return d&&(l===void 0&&(l=o.child.length===0),(d=this.parseTextData(d,o.tagname,c,!1,!!o[":@"]&&Object.keys(o[":@"]).length!==0,l))!==void 0&&d!==""&&o.add(this.options.textNodeName,d),d=""),d}function Ft(){return this.stopNodeExpressionsSet.size!==0&&this.matcher.matchesAny(this.stopNodeExpressionsSet)}function fa(d,o,c,l){let f=d.indexOf(o,c);if(f===-1)throw new Error(l);return f+o.length-1}function $t(d,o,c,l){let f=d.indexOf(o,c);if(f===-1)throw new Error(l);return f}function ur(d,o,c,l=">"){let f=(function(V,Y,X=">"){let te=0,z=[],ye=V.length,He=X.charCodeAt(0),Pe=X.length>1?X.charCodeAt(1):-1;for(let Ye=Y;Ye<ye;Ye++){let Ie=V.charCodeAt(Ye);if(te)Ie===te&&(te=0);else if(Ie===34||Ie===39)te=Ie;else if(Ie===He){if(Pe===-1)return{data:String.fromCharCode(...z),index:Ye};if(V.charCodeAt(Ye+1)===Pe)return{data:String.fromCharCode(...z),index:Ye}}else if(Ie===9){z.push(32);continue}z.push(Ie)}})(d,o+1,l);if(!f)return;let b=f.data,D=f.index,v=b.search(/\s/),I=b,N=!0;v!==-1&&(I=b.substring(0,v),b=b.substring(v+1).trimStart());let G=I;if(c){let V=I.indexOf(":");V!==-1&&(I=I.substr(V+1),N=I!==f.data.substr(V+1))}return{tagName:I,tagExp:b,closeIndex:D,attrExpPresent:N,rawTagName:G}}function _t(d,o,c){let l=c,f=1,b=d.length;for(;c<b;c++)if(d[c]==="<"){let D=d.charCodeAt(c+1);if(D===47){let v=$t(d,">",c,`${o} is not closed`);if(d.substring(c+2,v).trim()===o&&(f--,f===0))return{tagContent:d.substring(l,c),i:v};c=v}else if(D===63)c=fa(d,"?>",c+1,"StopNode is not closed.");else if(D===33&&d.charCodeAt(c+2)===45&&d.charCodeAt(c+3)===45)c=fa(d,"-->",c+3,"StopNode is not closed.");else if(D===33&&d.charCodeAt(c+2)===91)c=fa(d,"]]>",c,"StopNode is not closed.")-2;else{let v=ur(d,c,">");v&&((v&&v.tagName)===o&&v.tagExp[v.tagExp.length-1]!=="/"&&f++,c=v.closeIndex)}}}function Or(d,o,c){if(o&&typeof d=="string"){let l=d.trim();return l==="true"||l!=="false"&&(function(f,b={}){if(b=Object.assign({},De,b),!f||typeof f!="string")return f;let D=f.trim();if(D.length===0||b.skipLike!==void 0&&b.skipLike.test(D))return f;if(D==="0")return 0;if(b.hex&&We.test(D))return(function(I){if(parseInt)return parseInt(I,16);if(Number.parseInt)return Number.parseInt(I,16);if(window&&window.parseInt)return window.parseInt(I,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")})(D);if(isFinite(D)){if(D.includes("e")||D.includes("E"))return(function(I,N,G){if(!G.eNotation)return I;let V=N.match(Je);if(V){let Y=V[1]||"",X=V[3].indexOf("e")===-1?"E":"e",te=V[2],z=Y?I[te.length+1]===X:I[te.length]===X;return te.length>1&&z?I:(te.length!==1||!V[3].startsWith(`.${X}`)&&V[3][0]!==X)&&te.length>0?G.leadingZeros&&!z?(N=(V[1]||"")+V[3],Number(N)):I:Number(N)}return I})(f,D,b);{let I=ie.exec(D);if(I){let N=I[1]||"",G=I[2],V=((v=I[3])&&v.indexOf(".")!==-1&&((v=v.replace(/0+$/,""))==="."?v="0":v[0]==="."?v="0"+v:v[v.length-1]==="."&&(v=v.substring(0,v.length-1))),v),Y=N?f[G.length+1]===".":f[G.length]===".";if(!b.leadingZeros&&(G.length>1||G.length===1&&!Y))return f;{let X=Number(D),te=String(X);if(X===0)return X;if(te.search(/[eE]/)!==-1)return b.eNotation?X:f;if(D.indexOf(".")!==-1)return te==="0"||te===V||te===`${N}${V}`?X:f;let z=G?V:D;return G?z===te||N+z===te?X:f:z===te||z===N+te?X:f}}return f}}var v;return(function(I,N,G){let V=N===1/0;switch(G.infinity.toLowerCase()){case"null":return null;case"infinity":return N;case"string":return V?"Infinity":"-Infinity";default:return I}})(f,Number(D),b)})(d,c)}return d!==void 0?d:""}function cr(d,o,c,l){if(d){let f=d(o);c===o&&(c=f),o=f}return{tagName:o=ya(o,l),tagExp:c}}function ya(d,o){if(P.includes(d))throw new Error(`[SECURITY] Invalid name: "${d}" is a reserved JavaScript keyword that could cause prototype pollution`);return B.includes(d)?o.onDangerousProperty(d):d}let _a=de.getMetaDataSymbol();function Kt(d,o){if(!d||typeof d!="object")return{};if(!o)return d;let c={};for(let l in d)l.startsWith(o)?c[l.substring(o.length)]=d[l]:c[l]=d[l];return c}function jt(d,o,c,l){return Hr(d,o,c,l)}function Hr(d,o,c,l){let f,b={};for(let D=0;D<d.length;D++){let v=d[D],I=Jt(v);if(I!==void 0&&I!==o.textNodeName){let N=Kt(v[":@"]||{},o.attributeNamePrefix);c.push(I,N)}if(I===o.textNodeName)f===void 0?f=v[I]:f+=""+v[I];else{if(I===void 0)continue;if(v[I]){let N=Hr(v[I],o,c,l),G=Vt(N,o);if(v[":@"]?zt(N,v[":@"],l,o):Object.keys(N).length!==1||N[o.textNodeName]===void 0||o.alwaysCreateTextNode?Object.keys(N).length===0&&(o.alwaysCreateTextNode?N[o.textNodeName]="":N=""):N=N[o.textNodeName],v[_a]!==void 0&&typeof N=="object"&&N!==null&&(N[_a]=v[_a]),b[I]!==void 0&&Object.prototype.hasOwnProperty.call(b,I))Array.isArray(b[I])||(b[I]=[b[I]]),b[I].push(N);else{let V=o.jPath?l.toString():l;o.isArray(I,V,G)?b[I]=[N]:b[I]=N}I!==void 0&&I!==o.textNodeName&&c.pop()}}}return typeof f=="string"?f.length>0&&(b[o.textNodeName]=f):f!==void 0&&(b[o.textNodeName]=f),b}function Jt(d){let o=Object.keys(d);for(let c=0;c<o.length;c++){let l=o[c];if(l!==":@")return l}}function zt(d,o,c,l){if(o){let f=Object.keys(o),b=f.length;for(let D=0;D<b;D++){let v=f[D],I=v.startsWith(l.attributeNamePrefix)?v.substring(l.attributeNamePrefix.length):v,N=l.jPath?c.toString()+"."+I:c;l.isArray(v,N,!0,!0)?d[v]=[o[v]]:d[v]=o[v]}}}function Vt(d,o){let{textNodeName:c}=o,l=Object.keys(d).length;return l===0||!(l!==1||!d[c]&&typeof d[c]!="boolean"&&d[c]!==0)}class Ut{constructor(o){this.externalEntities={},this.options=ae(o)}parse(o,c){if(typeof o!="string"&&o.toString)o=o.toString();else if(typeof o!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(c){c===!0&&(c={});let b=A(o,c);if(b!==!0)throw Error(`${b.err.msg}:${b.err.line}:${b.err.col}`)}let l=new Dt(this.options);l.entityDecoder.setExternalEntities(this.externalEntities);let f=l.parseXml(o);return this.options.preserveOrder||f===void 0?f:jt(f,this.options,l.matcher,l.readonlyMatcher)}addEntity(o,c){if(c.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(o.indexOf("&")!==-1||o.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '
'");if(c==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[o]=c}static getMetaDataSymbol(){return de.getMetaDataSymbol()}}function Yt(d,o){let c="";o.format&&o.indentBy.length>0&&(c=`
|
|
@@ -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{i as c,l as a}from"./
|
|
7
|
+
import{i as c,l as a}from"./AH6ANNYP.js";import"./KFQC57GK.js";import{fa as s}from"./DORXGE7Z.js";import"./NEWT5A6S.js";import"./RFWIIJFG.js";async function g({operation:i,input:r,version:n}){let t=await l(r),e=`${t.protocol}://${t.host}`;if(i!=="get"||!c(e))return"";let o=process.env.REDOCLY_AUTHORIZATION||await new a(n).getAccessToken(e);return o?`username=redocly
|
|
8
8
|
password=${o}
|
|
9
9
|
`:(s.error(`You are not logged in to ${e}. Run \`redocly login --residency ${e}\` or set the REDOCLY_AUTHORIZATION environment variable.
|
|
10
10
|
`),`quit=1
|