MCPcopy Create free account
hub / github.com/ChinaSiro/claude-code-sourcemap / l

Method l

package/cli.js:285–285  ·  view source on GitHub ↗
(q,K,_,z)

Source from the content-addressed store, hash-verified

283`):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function h6(Y6,_6,F6,W6){let v6=this.j2x(Y6,F6+1,W6.concat(_6));return Y6[this.options.textNodeName]!==void 0&&Object.keys(Y6).length===1?this.buildTextValNode(Y6[this.options.textNodeName],_6,v6.attrStr,F6):this.buildObjectNode(v6.val,_6,v6.attrStr,F6)}function x6(Y6){return this.options.indentBy.repeat(Y6)}function b6(Y6){return!(!Y6.startsWith(this.options.attributeNamePrefix)||Y6===this.options.textNodeName)&&Y6.substr(this.attrPrefixLen)}R6.prototype.build=function(Y6){return this.options.preserveOrder?n6(Y6,this.options):(Array.isArray(Y6)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(Y6={[this.options.arrayNodeName]:Y6}),this.j2x(Y6,0,[]).val)},R6.prototype.j2x=function(Y6,_6,F6){let W6="",v6="",m6=F6.join(".");for(let K8 in Y6)if(Object.prototype.hasOwnProperty.call(Y6,K8))if(Y6[K8]===void 0)this.isAttribute(K8)&&(v6+="");else if(Y6[K8]===null)this.isAttribute(K8)||K8===this.options.cdataPropName?v6+="":K8[0]==="?"?v6+=this.indentate(_6)+"<"+K8+"?"+this.tagEndChar:v6+=this.indentate(_6)+"<"+K8+"/"+this.tagEndChar;else if(Y6[K8]instanceof Date)v6+=this.buildTextValNode(Y6[K8],K8,"",_6);else if(typeof Y6[K8]!="object"){let H8=this.isAttribute(K8);if(H8&&!this.ignoreAttributesFn(H8,m6))W6+=this.buildAttrPairStr(H8,""+Y6[K8]);else if(!H8)if(K8===this.options.textNodeName){let M8=this.options.tagValueProcessor(K8,""+Y6[K8]);v6+=this.replaceEntitiesValue(M8)}else v6+=this.buildTextValNode(Y6[K8],K8,"",_6)}else if(Array.isArray(Y6[K8])){let H8=Y6[K8].length,M8="",X1="";for(let j1=0;j1<H8;j1++){let h1=Y6[K8][j1];if(h1===void 0);else if(h1===null)K8[0]==="?"?v6+=this.indentate(_6)+"<"+K8+"?"+this.tagEndChar:v6+=this.indentate(_6)+"<"+K8+"/"+this.tagEndChar;else if(typeof h1=="object")if(this.options.oneListGroup){let T7=this.j2x(h1,_6+1,F6.concat(K8));M8+=T7.val,this.options.attributesGroupName&&h1.hasOwnProperty(this.options.attributesGroupName)&&(X1+=T7.attrStr)}else M8+=this.processTextOrObjNode(h1,K8,_6,F6);else if(this.options.oneListGroup){let T7=this.options.tagValueProcessor(K8,h1);T7=this.replaceEntitiesValue(T7),M8+=T7}else M8+=this.buildTextValNode(h1,K8,"",_6)}this.options.oneListGroup&&(M8=this.buildObjectNode(M8,K8,X1,_6)),v6+=M8}else if(this.options.attributesGroupName&&K8===this.options.attributesGroupName){let H8=Object.keys(Y6[K8]),M8=H8.length;for(let X1=0;X1<M8;X1++)W6+=this.buildAttrPairStr(H8[X1],""+Y6[K8][H8[X1]])}else v6+=this.processTextOrObjNode(Y6[K8],K8,_6,F6);return{attrStr:W6,val:v6}},R6.prototype.buildAttrPairStr=function(Y6,_6){return _6=this.options.attributeValueProcessor(Y6,""+_6),_6=this.replaceEntitiesValue(_6),this.options.suppressBooleanAttributes&&_6==="true"?" "+Y6:" "+Y6+'="'+_6+'"'},R6.prototype.buildObjectNode=function(Y6,_6,F6,W6){if(Y6==="")return _6[0]==="?"?this.indentate(W6)+"<"+_6+F6+"?"+this.tagEndChar:this.indentate(W6)+"<"+_6+F6+this.closeTag(_6)+this.tagEndChar;{let v6="</"+_6+this.tagEndChar,m6="";return _6[0]==="?"&&(m6="?",v6=""),!F6&&F6!==""||Y6.indexOf("<")!==-1?this.options.commentPropName!==!1&&_6===this.options.commentPropName&&m6.length===0?this.indentate(W6)+`<!--${Y6}-->`+this.newLine:this.indentate(W6)+"<"+_6+F6+m6+this.tagEndChar+Y6+this.indentate(W6)+v6:this.indentate(W6)+"<"+_6+F6+m6+">"+Y6+v6}},R6.prototype.closeTag=function(Y6){let _6="";return this.options.unpairedTags.indexOf(Y6)!==-1?this.options.suppressUnpairedNode||(_6="/"):_6=this.options.suppressEmptyNode?"/":`></${Y6}`,_6},R6.prototype.buildTextValNode=function(Y6,_6,F6,W6){if(this.options.cdataPropName!==!1&&_6===this.options.cdataPropName)return this.indentate(W6)+`<![CDATA[${Y6}]]>`+this.newLine;if(this.options.commentPropName!==!1&&_6===this.options.commentPropName)return this.indentate(W6)+`<!--${Y6}-->`+this.newLine;if(_6[0]==="?")return this.indentate(W6)+"<"+_6+F6+"?"+this.tagEndChar;{let v6=this.options.tagValueProcessor(_6,Y6);return v6=this.replaceEntitiesValue(v6),v6===""?this.indentate(W6)+"<"+_6+F6+this.closeTag(_6)+this.tagEndChar:this.indentate(W6)+"<"+_6+F6+">"+v6+"</"+_6+this.tagEndChar}},R6.prototype.replaceEntitiesValue=function(Y6){if(Y6&&Y6.length>0&&this.options.processEntities)for(let _6=0;_6<this.options.entities.length;_6++){let F6=this.options.entities[_6];Y6=Y6.replace(F6.regex,F6.val)}return Y6};let Q6={validate:O};Or7.exports=K})()});var Hr7=m((jr7)=>{Object.defineProperty(jr7,"__esModule",{value:!0});jr7.parseXML=E93;var y93=wr7(),RY1=new y93.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(q,K)=>K.trim()===""&&K.includes(`
284`)?"":void 0});RY1.addEntity("#xD","\r");RY1.addEntity("#10",`
285`);function E93(q){return RY1.parse(q,!0)}});var SY1=m((Jr7)=>{var R93=Hr7();function h93(q){return q.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function S93(q){return q.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#x0D;").replace(/\n/g,"&#x0A;").replace(/\u0085/g,"&#x85;").replace(/\u2028/,"&#x2028;")}class hY1{value;constructor(q){this.value=q}toString(){return S93(""+this.value)}}class Jg6{name;children;attributes={};static of(q,K,_){let z=new Jg6(q);if(K!==void 0)z.addChildNode(new hY1(K));if(_!==void 0)z.withName(_);return z}constructor(q,K=[]){this.name=q,this.children=K}withName(q){return this.name=q,this}addAttribute(q,K){return this.attributes[q]=K,this}addChildNode(q){return this.children.push(q),this}removeAttribute(q){return delete this.attributes[q],this}n(q){return this.name=q,this}c(q){return this.children.push(q),this}a(q,K){if(K!=null)this.attributes[q]=K;return this}cc(q,K,_=K){if(q[K]!=null){let z=Jg6.of(K,q[K]).withName(_);this.c(z)}}l(q,K,_,z){if(q[K]!=null)z().map(($)=>{$.withName(_),this.c($)})}lc(q,K,_,z){if(q[K]!=null){let Y=z(),$=new Jg6(_);Y.map((A)=>{$.c(A)}),this.c($)}}toString(){let q=Boolean(this.children.length),K=`<${this.name}`,_=this.attributes;for(let z of Object.keys(_)){let Y=_[z];if(Y!=null)K+=` ${z}="${h93(""+Y)}"`}return K+=!q?"/>":`>${this.children.map((z)=>z.toString()).join("")}</${this.name}>`}}Object.defineProperty(Jr7,"parseXML",{enumerable:!0,get:function(){return R93.parseXML}});Jr7.XmlNode=Jg6;Jr7.XmlText=hY1});var Uw=m((e93)=>{var bY1=ow8(),Z66=DA(),Mr7=tM(),x93=AV(),Xr7=Gz1(),Pr7=fY1(),sA=Xj(),Ql=NY1(),Vf=HV(),hW=jV(),Xg6=LY1(),vr7=aA(),uh=SY1(),CY1={warningEmitted:!1},I93=(q)=>{if(q&&!CY1.warningEmitted&&parseInt(q.substring(1,q.indexOf(".")))<18)CY1.warningEmitted=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
286no longer support Node.js 16.x on January 6, 2025.
287
288To continue receiving updates to AWS services, bug fixes, and security

Callers

nothing calls this directly

Calls 3

cMethod · 0.95
withNameMethod · 0.80
zFunction · 0.70

Tested by

no test coverage detected