Lines 5-45javascript
5`:"";return(a.children||[]).map(m).join("")+g}k.convertElementToRawText=m},{"./documents":4}],25:[function(C,ie,k){var D=C("underscore");k.Result=m,k.success=a,k.warning=g,k.error=f;function m(r,d){this.value=r,this.messages=d||[]}m.prototype.map=function(r){return new m(r(this.value),this.messages)},m.prototype.flatMap=function(r){var d=r(this.value);return new m(d.value,s([this,d]))},m.prototype.flatMapThen=function(r){var d=this;return r(this.value).then(function(p){return new m(p.value,s([d,p]))})},m.combine=function(r){var d=D.flatten(D.pluck(r,"value")),p=s(r);return new m(d,p)};function ...
6`,r:"\r",t:" "};function t(R){return R.replace(/\\(.)/g,function(A,Y){return o[Y]||Y})}var n=m.rules.sequence(m.rules.tokenOfType("open-square-bracket"),m.rules.sequence.cut(),m.rules.sequence.capture(y),m.rules.tokenOfType("equals"),m.rules.sequence.capture(h),m.rules.tokenOfType("close-square-bracket")).map(function(R,A){return{name:R,value:A,append:!1}}),b=m.rules.sequence(m.rules.tokenOfType("dot"),m.rules.sequence.cut(),m.rules.sequence.capture(y)).map(function(R){return{name:"class",value:R,append:!0}}),U=m.rules.firstOf("attribute or class",n,b);function M(R,A){var Y=f(A),ae=m.Parser(), ...
7`+A.errors().map(W).join(`
8`)}function W(R){return"Error was at character number "+R.characterNumber()+": Expected "+R.expected+" but got "+R.actual}var I=e()},{"./results":25,"./styles/document-matchers":27,"./styles/html-paths":28,"./styles/parser/tokeniser":29,lop:89,underscore:102}],27:[function(C,ie,k){k.paragraph=D,k.run=m,k.table=a,k.bold=new f("bold"),k.italic=new f("italic"),k.underline=new f("underline"),k.strikethrough=new f("strikethrough"),k.allCaps=new f("allCaps"),k.smallCaps=new f("smallCaps"),k.highlight=g,k.commentReference=new f("commentReference"),k.lineBreak=new i({breakType:"line"}),k.pageBreak=new ...
10`+r);y.text(W)}function t(E,W){U(),y.selfClosing(E,W)}function n(){return d.length===0||a[d[d.length-1]]}function b(){c||(U(),c=!0)}function
11`);for(var E=0;E<e;E++)y._append(r)}}function M(){return D.some(d,function(E){return E==="pre"})}return{asString:y.asString,open:u,close:h,text:o,selfClosing:t}}function f(){var e=[];function
13`,list:{isOrdered:c.isOrdered,indent:u?u.indent+1:0,count:0}}}}function i(c,y,u){y=y||{indent:0,isOrdered:!1,count:0},y.count++,u.hasClosed=!1;var h=y.isOrdered?y.count+".":"-",o=r(" ",y.indent)+h+" ";return{start:o,end:function(){if(!u.hasClosed)return u.hasClosed=!0,`
17`),ul:s({isOrdered:!1}),ol:s({isOrdered:!0}),li:i,strong:m("__"),em:m("*"),a:g,img:f};(function(){for(var c=1;c<=6;c++)e["h"+c]=a(r("#",c)+" ",`
19`)})();function r(c,y){return new Array(y+1).join(c)}function d(){var c=[],y=[],u=null,h={};function o(E,W){W=W||{};var I=e[E]||function(){return{}},R=I(W,u,h);y.push({end:R.end,list:u}),R.list&&(u=R.list);var A=R.anchorPosition==="before";A&&t(W),c.push(R.start||""),A||t(W)}function t(E){E.id&&c.push('<a id="'+E.id+'"></a>')}function n(E){var W=y.pop();u=W.list;var I=D.isFunction(W.end)?W.end():W.end;c.push(I||"")}function b(E,W){o(E,W),n()}function U(E){c.push(p(E))}function M(){return c.join("")}return{asString:M,open:o,close:n,text:U,selfClosing:b}}k.writer=d;function p(c){return c.replace ...
20`).replace(/[\r\u0085\u2028]/g,`
21`)}function d(t){this.options=t||{locator:{}}}d.prototype.parseFromString=function(t,n){var b=this.options,U=new e,M=b.domBuilder||new c,E=b.errorHandler,W=b.locator,I=b.xmlns||{},R=
22@`+(t.systemId||"")+"#[line:"+t.lineNumber+",col:"+t.columnNumber+"]"}function h(t,n,b){return typeof t=="string"?t.substr(n,b):t.length>=n+b||n?new java.lang.String(t,n,b)+"":t}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(t){c.prototype[t]=function(){return null}});function o(t,n){t.currentElement?t.currentElement.appendChild(n):t.doc.appendChild(n)}k.__DOMHandler=c,k.normalizeLineEndings=r,k.DOMParser=d},{"./conventions":41,"./dom":43,"./entities":44,"./sa ...
23`),D.exit(2)):this.throwLater(d)},s.prototype.throwLater=function(d,p){if(arguments.length===1&&(p=d,d=function(){throw p}),typeof setTimeout<"u")setTimeout(function(){d(p)},
25 See http://goo.gl/MqrFmX
26`)}};function i(d,p,c){this._lateQueue.push(d,p,c),this._queueTick()}function e(d,p,c){this._normalQueue.push(d,p,c),this.
27 return function(obj) {
LowEval
Package source references a known benign dynamic code generation pattern.
dist/client/assets/docx-D39uvoU4.jsView on unpkg · L25 29 var len = this.length;
30 ensureMethod(obj, 'methodName');
32 case 1: return obj.methodName(this[0]);
33 case 2: return obj.methodName(this[0], this[1]);
34 case 3: return obj.methodName(this[0], this[1], this[2]);
35 case 0: return obj.methodName();
37 return obj.methodName.apply(obj, this);
40 `.replace(/methodName/g,t))(y)},p=function(t){return new Function("obj",`
42 return obj.propertyName;
43 `.replace("propertyName",t))},c=function(t,n,b){var U=b[t];if(typeof U!="function"){if(!i(t))return null;if(U=n(t),b[t]=U,b[" size"]++,b[" size"]>512){for(var M=Object.keys(b),E=0;E<256;++E)delete b[M[E]];b[" size"]=M.length-256}}return U};e=function(t){return c(t,d,m)},r=function(t){return c(t,p,a)}}function y(t,n){var b;if(t!=null&&(b=t[n]),typeof b!="function"){var U="Object "+f.classString(t)+" has no method '"+f.toString(n)+"'";throw new g.TypeError(U)}return b}function u(t){var n=this.pop(),b=y(t,n);return b.apply(t,this)}g.prototype.call=function(t){for(var n=arguments.length,b= ...
45 See http://goo.gl/MqrFmX
Long lines were clipped for display.