1import{a as e,o as t}from"./type-guards-QvF4I9vK.js";import{n}from"./is-object-C09o0hfE.js";import{t as r}from"./is-http-method-Bq1hWWun.js";var i=new Set([`__proto__`,`prototype`,`constructor`]),a=(e,t)=>{if(i.has(e)){let n=t?`Prototype pollution key detected: "${e}" in ${t}`:`Prototype pollution key detected: "${e}"`;throw Error(n)}},o=e=>i.has(e);function s(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}var c=10,l=e=>e===e.toLowerCase()&&r(e),u=e=>n(e)&&Object.hasOwn(e,`$ref-value`),d=n=>{if(!n||typeof n!=`object`)return;let r=e(n,t);for(let n=1;u(r);n++){if(n>=c){let{"$ref-value":e,...t}=r;return console.warn(`Stopped resolving "${r.$ref}" after ${c} hops.\n\nThis reference most likely points at itself, directly or through another reference.`),t}r=e(r,t)}return r},f=(e,t)=>{let n=d(e);if(!n)return;if(l(t))return n[t];let r=n.additionalOperations;return r&&Object.hasOwn(r,t)?r[t]:void 0},p=(e,t,n)=>{if(!e||typeof e!=`object`)return;let r=`$ref`in e&&`$ref-value`in e?e[`$ref-value`]??e:e;l(t)?r[t]=n:(a(t),r.additionalOperations??={},r.additionalOperations[t]=n)},m=e=>{let t=[],r=e;for(;n(r)&&!t.includes(r)&&t.length<c&&(t.push(r),!(!(`$ref`in r)||!(`$ref-value`in r)));)r=r[`$ref-value`];return t},h=(e,t)=>{if(!(!e||typeof e!=`object`))for(let r of m(e))l(t)?delete r[t]:n(r.additionalOperations)&&(delete r.additionalOperations[t],Object.keys(r.additionalOperations).length===0&&delete r.additionalOperations)},g=(e,t)=>{let n=d(e);if(n){for(let[e,r]of Object.entries(n))!l(e)||r===void 0||t(e,r);for(let[e,r]of Object.entries(n.additionalOperations??{}))r!==void 0&&!l(e)&&t(e,r)}},_=e=>{let t=d(e);return!t||Object.keys(t).length===0},v=e=>l(e)?e:`additionalOperations/${s(e)}`,y=(e,t=new WeakMap)=>{if(typeof e!=`object`||!e)return e;if(t.has(e))return t.get(e);let n=Array.isArray(e)?[]:{};return t.set(e,n),Object.keys(e).forEach(r=>{n[r]=y(e[r],t)}),n};export{v as a,p as c,a as d,f as i,s as l,h as n,d as o,g as r,_ as s,y as t,o as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.