UNPKG

prowler-sdk-poc

Version:
1,624 lines (1,324 loc) 336 kB
module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__(1); /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { // Generated by CoffeeScript 1.12.7 (function() { "use strict"; var builder, defaults, parser, processors, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; defaults = __webpack_require__(2); builder = __webpack_require__(3); parser = __webpack_require__(26); processors = __webpack_require__(60); exports.defaults = defaults.defaults; exports.processors = processors; exports.ValidationError = (function(superClass) { extend(ValidationError, superClass); function ValidationError(message) { this.message = message; } return ValidationError; })(Error); exports.Builder = builder.Builder; exports.Parser = parser.Parser; exports.parseString = parser.parseString; }).call(this); /***/ }), /* 2 */ /***/ (function(module, exports) { // Generated by CoffeeScript 1.12.7 (function() { exports.defaults = { "0.1": { explicitCharkey: false, trim: true, normalize: true, normalizeTags: false, attrkey: "@", charkey: "#", explicitArray: false, ignoreAttrs: false, mergeAttrs: false, explicitRoot: false, validator: null, xmlns: false, explicitChildren: false, childkey: '@@', charsAsChildren: false, includeWhiteChars: false, async: false, strict: true, attrNameProcessors: null, attrValueProcessors: null, tagNameProcessors: null, valueProcessors: null, emptyTag: '' }, "0.2": { explicitCharkey: false, trim: false, normalize: false, normalizeTags: false, attrkey: "$", charkey: "_", explicitArray: true, ignoreAttrs: false, mergeAttrs: false, explicitRoot: true, validator: null, xmlns: false, explicitChildren: false, preserveChildrenOrder: false, childkey: '$$', charsAsChildren: false, includeWhiteChars: false, async: false, strict: true, attrNameProcessors: null, attrValueProcessors: null, tagNameProcessors: null, valueProcessors: null, rootName: 'root', xmldec: { 'version': '1.0', 'encoding': 'UTF-8', 'standalone': true }, doctype: null, renderOpts: { 'pretty': true, 'indent': ' ', 'newline': '\n' }, headless: false, chunkSize: 10000, emptyTag: '', cdata: false } }; }).call(this); /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { // Generated by CoffeeScript 1.12.7 (function() { "use strict"; var builder, defaults, escapeCDATA, requiresCDATA, wrapCDATA, hasProp = {}.hasOwnProperty; builder = __webpack_require__(4); defaults = __webpack_require__(2).defaults; requiresCDATA = function(entry) { return typeof entry === "string" && (entry.indexOf('&') >= 0 || entry.indexOf('>') >= 0 || entry.indexOf('<') >= 0); }; wrapCDATA = function(entry) { return "<![CDATA[" + (escapeCDATA(entry)) + "]]>"; }; escapeCDATA = function(entry) { return entry.replace(']]>', ']]]]><![CDATA[>'); }; exports.Builder = (function() { function Builder(opts) { var key, ref, value; this.options = {}; ref = defaults["0.2"]; for (key in ref) { if (!hasProp.call(ref, key)) continue; value = ref[key]; this.options[key] = value; } for (key in opts) { if (!hasProp.call(opts, key)) continue; value = opts[key]; this.options[key] = value; } } Builder.prototype.buildObject = function(rootObj) { var attrkey, charkey, render, rootElement, rootName; attrkey = this.options.attrkey; charkey = this.options.charkey; if ((Object.keys(rootObj).length === 1) && (this.options.rootName === defaults['0.2'].rootName)) { rootName = Object.keys(rootObj)[0]; rootObj = rootObj[rootName]; } else { rootName = this.options.rootName; } render = (function(_this) { return function(element, obj) { var attr, child, entry, index, key, value; if (typeof obj !== 'object') { if (_this.options.cdata && requiresCDATA(obj)) { element.raw(wrapCDATA(obj)); } else { element.txt(obj); } } else if (Array.isArray(obj)) { for (index in obj) { if (!hasProp.call(obj, index)) continue; child = obj[index]; for (key in child) { entry = child[key]; element = render(element.ele(key), entry).up(); } } } else { for (key in obj) { if (!hasProp.call(obj, key)) continue; child = obj[key]; if (key === attrkey) { if (typeof child === "object") { for (attr in child) { value = child[attr]; element = element.att(attr, value); } } } else if (key === charkey) { if (_this.options.cdata && requiresCDATA(child)) { element = element.raw(wrapCDATA(child)); } else { element = element.txt(child); } } else if (Array.isArray(child)) { for (index in child) { if (!hasProp.call(child, index)) continue; entry = child[index]; if (typeof entry === 'string') { if (_this.options.cdata && requiresCDATA(entry)) { element = element.ele(key).raw(wrapCDATA(entry)).up(); } else { element = element.ele(key, entry).up(); } } else { element = render(element.ele(key), entry).up(); } } } else if (typeof child === "object") { element = render(element.ele(key), child).up(); } else { if (typeof child === 'string' && _this.options.cdata && requiresCDATA(child)) { element = element.ele(key).raw(wrapCDATA(child)).up(); } else { if (child == null) { child = ''; } element = element.ele(key, child.toString()).up(); } } } } return element; }; })(this); rootElement = builder.create(rootName, this.options.xmldec, this.options.doctype, { headless: this.options.headless, allowSurrogateChars: this.options.allowSurrogateChars }); return render(rootElement, rootObj).end(this.options.renderOpts); }; return Builder; })(); }).call(this); /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { // Generated by CoffeeScript 1.12.7 (function() { var XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction, ref; ref = __webpack_require__(5), assign = ref.assign, isFunction = ref.isFunction; XMLDocument = __webpack_require__(6); XMLDocumentCB = __webpack_require__(24); XMLStringWriter = __webpack_require__(22); XMLStreamWriter = __webpack_require__(25); module.exports.create = function(name, xmldec, doctype, options) { var doc, root; if (name == null) { throw new Error("Root element needs a name"); } options = assign({}, xmldec, doctype, options); doc = new XMLDocument(options); root = doc.element(name); if (!options.headless) { doc.declaration(options); if ((options.pubID != null) || (options.sysID != null)) { doc.doctype(options); } } return root; }; module.exports.begin = function(options, onData, onEnd) { var ref1; if (isFunction(options)) { ref1 = [options, onData], onData = ref1[0], onEnd = ref1[1]; options = {}; } if (onData) { return new XMLDocumentCB(options, onData, onEnd); } else { return new XMLDocument(options); } }; module.exports.stringWriter = function(options) { return new XMLStringWriter(options); }; module.exports.streamWriter = function(stream, options) { return new XMLStreamWriter(stream, options); }; }).call(this); /***/ }), /* 5 */ /***/ (function(module, exports) { // Generated by CoffeeScript 1.12.7 (function() { var assign, isArray, isEmpty, isFunction, isObject, isPlainObject, slice = [].slice, hasProp = {}.hasOwnProperty; assign = function() { var i, key, len, source, sources, target; target = arguments[0], sources = 2 <= arguments.length ? slice.call(arguments, 1) : []; if (isFunction(Object.assign)) { Object.assign.apply(null, arguments); } else { for (i = 0, len = sources.length; i < len; i++) { source = sources[i]; if (source != null) { for (key in source) { if (!hasProp.call(source, key)) continue; target[key] = source[key]; } } } } return target; }; isFunction = function(val) { return !!val && Object.prototype.toString.call(val) === '[object Function]'; }; isObject = function(val) { var ref; return !!val && ((ref = typeof val) === 'function' || ref === 'object'); }; isArray = function(val) { if (isFunction(Array.isArray)) { return Array.isArray(val); } else { return Object.prototype.toString.call(val) === '[object Array]'; } }; isEmpty = function(val) { var key; if (isArray(val)) { return !val.length; } else { for (key in val) { if (!hasProp.call(val, key)) continue; return false; } return true; } }; isPlainObject = function(val) { var ctor, proto; return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object)); }; module.exports.assign = assign; module.exports.isFunction = isFunction; module.exports.isObject = isObject; module.exports.isArray = isArray; module.exports.isEmpty = isEmpty; module.exports.isPlainObject = isPlainObject; }).call(this); /***/ }), /* 6 */ /***/ (function(module, exports, __webpack_require__) { // Generated by CoffeeScript 1.12.7 (function() { var XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; isPlainObject = __webpack_require__(5).isPlainObject; XMLNode = __webpack_require__(7); XMLStringifier = __webpack_require__(21); XMLStringWriter = __webpack_require__(22); module.exports = XMLDocument = (function(superClass) { extend(XMLDocument, superClass); function XMLDocument(options) { XMLDocument.__super__.constructor.call(this, null); options || (options = {}); if (!options.writer) { options.writer = new XMLStringWriter(); } this.options = options; this.stringify = new XMLStringifier(options); this.isDocument = true; } XMLDocument.prototype.end = function(writer) { var writerOptions; if (!writer) { writer = this.options.writer; } else if (isPlainObject(writer)) { writerOptions = writer; writer = this.options.writer.set(writerOptions); } return writer.document(this); }; XMLDocument.prototype.toString = function(options) { return this.options.writer.set(options).document(this); }; return XMLDocument; })(XMLNode); }).call(this); /***/ }), /* 7 */ /***/ (function(module, exports, __webpack_require__) { // Generated by CoffeeScript 1.12.7 (function() { var XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLElement, XMLNode, XMLProcessingInstruction, XMLRaw, XMLText, isEmpty, isFunction, isObject, ref, hasProp = {}.hasOwnProperty; ref = __webpack_require__(5), isObject = ref.isObject, isFunction = ref.isFunction, isEmpty = ref.isEmpty; XMLElement = null; XMLCData = null; XMLComment = null; XMLDeclaration = null; XMLDocType = null; XMLRaw = null; XMLText = null; XMLProcessingInstruction = null; module.exports = XMLNode = (function() { function XMLNode(parent) { this.parent = parent; if (this.parent) { this.options = this.parent.options; this.stringify = this.parent.stringify; } this.children = []; if (!XMLElement) { XMLElement = __webpack_require__(8); XMLCData = __webpack_require__(10); XMLComment = __webpack_require__(11); XMLDeclaration = __webpack_require__(12); XMLDocType = __webpack_require__(13); XMLRaw = __webpack_require__(18); XMLText = __webpack_require__(19); XMLProcessingInstruction = __webpack_require__(20); } } XMLNode.prototype.element = function(name, attributes, text) { var childNode, item, j, k, key, lastChild, len, len1, ref1, val; lastChild = null; if (attributes == null) { attributes = {}; } attributes = attributes.valueOf(); if (!isObject(attributes)) { ref1 = [attributes, text], text = ref1[0], attributes = ref1[1]; } if (name != null) { name = name.valueOf(); } if (Array.isArray(name)) { for (j = 0, len = name.length; j < len; j++) { item = name[j]; lastChild = this.element(item); } } else if (isFunction(name)) { lastChild = this.element(name.apply()); } else if (isObject(name)) { for (key in name) { if (!hasProp.call(name, key)) continue; val = name[key]; if (isFunction(val)) { val = val.apply(); } if ((isObject(val)) && (isEmpty(val))) { val = null; } if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); } else if (!this.options.separateArrayItems && Array.isArray(val)) { for (k = 0, len1 = val.length; k < len1; k++) { item = val[k]; childNode = {}; childNode[key] = item; lastChild = this.element(childNode); } } else if (isObject(val)) { lastChild = this.element(key); lastChild.element(val); } else { lastChild = this.element(key, val); } } } else { if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { lastChild = this.text(text); } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { lastChild = this.cdata(text); } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { lastChild = this.comment(text); } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { lastChild = this.raw(text); } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) { lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text); } else { lastChild = this.node(name, attributes, text); } } if (lastChild == null) { throw new Error("Could not create any elements with: " + name); } return lastChild; }; XMLNode.prototype.insertBefore = function(name, attributes, text) { var child, i, removed; if (this.isRoot) { throw new Error("Cannot insert elements at root level"); } i = this.parent.children.indexOf(this); removed = this.parent.children.splice(i); child = this.parent.element(name, attributes, text); Array.prototype.push.apply(this.parent.children, removed); return child; }; XMLNode.prototype.insertAfter = function(name, attributes, text) { var child, i, removed; if (this.isRoot) { throw new Error("Cannot insert elements at root level"); } i = this.parent.children.indexOf(this); removed = this.parent.children.splice(i + 1); child = this.parent.element(name, attributes, text); Array.prototype.push.apply(this.parent.children, removed); return child; }; XMLNode.prototype.remove = function() { var i, ref1; if (this.isRoot) { throw new Error("Cannot remove the root element"); } i = this.parent.children.indexOf(this); [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref1 = [])), ref1; return this.parent; }; XMLNode.prototype.node = function(name, attributes, text) { var child, ref1; if (name != null) { name = name.valueOf(); } attributes || (attributes = {}); attributes = attributes.valueOf(); if (!isObject(attributes)) { ref1 = [attributes, text], text = ref1[0], attributes = ref1[1]; } child = new XMLElement(this, name, attributes); if (text != null) { child.text(text); } this.children.push(child); return child; }; XMLNode.prototype.text = function(value) { var child; child = new XMLText(this, value); this.children.push(child); return this; }; XMLNode.prototype.cdata = function(value) { var child; child = new XMLCData(this, value); this.children.push(child); return this; }; XMLNode.prototype.comment = function(value) { var child; child = new XMLComment(this, value); this.children.push(child); return this; }; XMLNode.prototype.commentBefore = function(value) { var child, i, removed; i = this.parent.children.indexOf(this); removed = this.parent.children.splice(i); child = this.parent.comment(value); Array.prototype.push.apply(this.parent.children, removed); return this; }; XMLNode.prototype.commentAfter = function(value) { var child, i, removed; i = this.parent.children.indexOf(this); removed = this.parent.children.splice(i + 1); child = this.parent.comment(value); Array.prototype.push.apply(this.parent.children, removed); return this; }; XMLNode.prototype.raw = function(value) { var child; child = new XMLRaw(this, value); this.children.push(child); return this; }; XMLNode.prototype.instruction = function(target, value) { var insTarget, insValue, instruction, j, len; if (target != null) { target = target.valueOf(); } if (value != null) { value = value.valueOf(); } if (Array.isArray(target)) { for (j = 0, len = target.length; j < len; j++) { insTarget = target[j]; this.instruction(insTarget); } } else if (isObject(target)) { for (insTarget in target) { if (!hasProp.call(target, insTarget)) continue; insValue = target[insTarget]; this.instruction(insTarget, insValue); } } else { if (isFunction(value)) { value = value.apply(); } instruction = new XMLProcessingInstruction(this, target, value); this.children.push(instruction); } return this; }; XMLNode.prototype.instructionBefore = function(target, value) { var child, i, removed; i = this.parent.children.indexOf(this); removed = this.parent.children.splice(i); child = this.parent.instruction(target, value); Array.prototype.push.apply(this.parent.children, removed); return this; }; XMLNode.prototype.instructionAfter = function(target, value) { var child, i, removed; i = this.parent.children.indexOf(this); removed = this.parent.children.splice(i + 1); child = this.parent.instruction(target, value); Array.prototype.push.apply(this.parent.children, removed); return this; }; XMLNode.prototype.declaration = function(version, encoding, standalone) { var doc, xmldec; doc = this.document(); xmldec = new XMLDeclaration(doc, version, encoding, standalone); if (doc.children[0] instanceof XMLDeclaration) { doc.children[0] = xmldec; } else { doc.children.unshift(xmldec); } return doc.root() || doc; }; XMLNode.prototype.doctype = function(pubID, sysID) { var child, doc, doctype, i, j, k, len, len1, ref1, ref2; doc = this.document(); doctype = new XMLDocType(doc, pubID, sysID); ref1 = doc.children; for (i = j = 0, len = ref1.length; j < len; i = ++j) { child = ref1[i]; if (child instanceof XMLDocType) { doc.children[i] = doctype; return doctype; } } ref2 = doc.children; for (i = k = 0, len1 = ref2.length; k < len1; i = ++k) { child = ref2[i]; if (child.isRoot) { doc.children.splice(i, 0, doctype); return doctype; } } doc.children.push(doctype); return doctype; }; XMLNode.prototype.up = function() { if (this.isRoot) { throw new Error("The root node has no parent. Use doc() if you need to get the document object."); } return this.parent; }; XMLNode.prototype.root = function() { var node; node = this; while (node) { if (node.isDocument) { return node.rootObject; } else if (node.isRoot) { return node; } else { node = node.parent; } } }; XMLNode.prototype.document = function() { var node; node = this; while (node) { if (node.isDocument) { return node; } else { node = node.parent; } } }; XMLNode.prototype.end = function(options) { return this.document().end(options); }; XMLNode.prototype.prev = function() { var i; i = this.parent.children.indexOf(this); if (i < 1) { throw new Error("Already at the first node"); } return this.parent.children[i - 1]; }; XMLNode.prototype.next = function() { var i; i = this.parent.children.indexOf(this); if (i === -1 || i === this.parent.children.length - 1) { throw new Error("Already at the last node"); } return this.parent.children[i + 1]; }; XMLNode.prototype.importDocument = function(doc) { var clonedRoot; clonedRoot = doc.root().clone(); clonedRoot.parent = this; clonedRoot.isRoot = false; this.children.push(clonedRoot); return this; }; XMLNode.prototype.ele = function(name, attributes, text) { return this.element(name, attributes, text); }; XMLNode.prototype.nod = function(name, attributes, text) { return this.node(name, attributes, text); }; XMLNode.prototype.txt = function(value) { return this.text(value); }; XMLNode.prototype.dat = function(value) { return this.cdata(value); }; XMLNode.prototype.com = function(value) { return this.comment(value); }; XMLNode.prototype.ins = function(target, value) { return this.instruction(target, value); }; XMLNode.prototype.doc = function() { return this.document(); }; XMLNode.prototype.dec = function(version, encoding, standalone) { return this.declaration(version, encoding, standalone); }; XMLNode.prototype.dtd = function(pubID, sysID) { return this.doctype(pubID, sysID); }; XMLNode.prototype.e = function(name, attributes, text) { return this.element(name, attributes, text); }; XMLNode.prototype.n = function(name, attributes, text) { return this.node(name, attributes, text); }; XMLNode.prototype.t = function(value) { return this.text(value); }; XMLNode.prototype.d = function(value) { return this.cdata(value); }; XMLNode.prototype.c = function(value) { return this.comment(value); }; XMLNode.prototype.r = function(value) { return this.raw(value); }; XMLNode.prototype.i = function(target, value) { return this.instruction(target, value); }; XMLNode.prototype.u = function() { return this.up(); }; XMLNode.prototype.importXMLBuilder = function(doc) { return this.importDocument(doc); }; return XMLNode; })(); }).call(this); /***/ }), /* 8 */ /***/ (function(module, exports, __webpack_require__) { // Generated by CoffeeScript 1.12.7 (function() { var XMLAttribute, XMLElement, XMLNode, isFunction, isObject, ref, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; ref = __webpack_require__(5), isObject = ref.isObject, isFunction = ref.isFunction; XMLNode = __webpack_require__(7); XMLAttribute = __webpack_require__(9); module.exports = XMLElement = (function(superClass) { extend(XMLElement, superClass); function XMLElement(parent, name, attributes) { XMLElement.__super__.constructor.call(this, parent); if (name == null) { throw new Error("Missing element name"); } this.name = this.stringify.eleName(name); this.attributes = {}; if (attributes != null) { this.attribute(attributes); } if (parent.isDocument) { this.isRoot = true; this.documentObject = parent; parent.rootObject = this; } } XMLElement.prototype.clone = function() { var att, attName, clonedSelf, ref1; clonedSelf = Object.create(this); if (clonedSelf.isRoot) { clonedSelf.documentObject = null; } clonedSelf.attributes = {}; ref1 = this.attributes; for (attName in ref1) { if (!hasProp.call(ref1, attName)) continue; att = ref1[attName]; clonedSelf.attributes[attName] = att.clone(); } clonedSelf.children = []; this.children.forEach(function(child) { var clonedChild; clonedChild = child.clone(); clonedChild.parent = clonedSelf; return clonedSelf.children.push(clonedChild); }); return clonedSelf; }; XMLElement.prototype.attribute = function(name, value) { var attName, attValue; if (name != null) { name = name.valueOf(); } if (isObject(name)) { for (attName in name) { if (!hasProp.call(name, attName)) continue; attValue = name[attName]; this.attribute(attName, attValue); } } else { if (isFunction(value)) { value = value.apply(); } if (!this.options.skipNullAttributes || (value != null)) { this.attributes[name] = new XMLAttribute(this, name, value); } } return this; }; XMLElement.prototype.removeAttribute = function(name) { var attName, i, len; if (name == null) { throw new Error("Missing attribute name"); } name = name.valueOf(); if (Array.isArray(name)) { for (i = 0, len = name.length; i < len; i++) { attName = name[i]; delete this.attributes[attName]; } } else { delete this.attributes[name]; } return this; }; XMLElement.prototype.toString = function(options) { return this.options.writer.set(options).element(this); }; XMLElement.prototype.att = function(name, value) { return this.attribute(name, value); }; XMLElement.prototype.a = function(name, value) { return this.attribute(name, value); }; return XMLElement; })(XMLNode); }).call(this); /***/ }), /* 9 */ /***/ (function(module, exports) { // Generated by CoffeeScript 1.12.7 (function() { var XMLAttribute; module.exports = XMLAttribute = (function() { function XMLAttribute(parent, name, value) { this.options = parent.options; this.stringify = parent.stringify; if (name == null) { throw new Error("Missing attribute name of element " + parent.name); } if (value == null) { throw new Error("Missing attribute value for attribute " + name + " of element " + parent.name); } this.name = this.stringify.attName(name); this.value = this.stringify.attValue(value); } XMLAttribute.prototype.clone = function() { return Object.create(this); }; XMLAttribute.prototype.toString = function(options) { return this.options.writer.set(options).attribute(this); }; return XMLAttribute; })(); }).call(this); /***/ }), /* 10 */ /***/ (function(module, exports, __webpack_require__) { // Generated by CoffeeScript 1.12.7 (function() { var XMLCData, XMLNode, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; XMLNode = __webpack_require__(7); module.exports = XMLCData = (function(superClass) { extend(XMLCData, superClass); function XMLCData(parent, text) { XMLCData.__super__.constructor.call(this, parent); if (text == null) { throw new Error("Missing CDATA text"); } this.text = this.stringify.cdata(text); } XMLCData.prototype.clone = function() { return Object.create(this); }; XMLCData.prototype.toString = function(options) { return this.options.writer.set(options).cdata(this); }; return XMLCData; })(XMLNode); }).call(this); /***/ }), /* 11 */ /***/ (function(module, exports, __webpack_require__) { // Generated by CoffeeScript 1.12.7 (function() { var XMLComment, XMLNode, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; XMLNode = __webpack_require__(7); module.exports = XMLComment = (function(superClass) { extend(XMLComment, superClass); function XMLComment(parent, text) { XMLComment.__super__.constructor.call(this, parent); if (text == null) { throw new Error("Missing comment text"); } this.text = this.stringify.comment(text); } XMLComment.prototype.clone = function() { return Object.create(this); }; XMLComment.prototype.toString = function(options) { return this.options.writer.set(options).comment(this); }; return XMLComment; })(XMLNode); }).call(this); /***/ }), /* 12 */ /***/ (function(module, exports, __webpack_require__) { // Generated by CoffeeScript 1.12.7 (function() { var XMLDeclaration, XMLNode, isObject, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; isObject = __webpack_require__(5).isObject; XMLNode = __webpack_require__(7); module.exports = XMLDeclaration = (function(superClass) { extend(XMLDeclaration, superClass); function XMLDeclaration(parent, version, encoding, standalone) { var ref; XMLDeclaration.__super__.constructor.call(this, parent); if (isObject(version)) { ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone; } if (!version) { version = '1.0'; } this.version = this.stringify.xmlVersion(version); if (encoding != null) { this.encoding = this.stringify.xmlEncoding(encoding); } if (standalone != null) { this.standalone = this.stringify.xmlStandalone(standalone); } } XMLDeclaration.prototype.toString = function(options) { return this.options.writer.set(options).declaration(this); }; return XMLDeclaration; })(XMLNode); }).call(this); /***/ }), /* 13 */ /***/ (function(module, exports, __webpack_require__) { // Generated by CoffeeScript 1.12.7 (function() { var XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNode, isObject, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; isObject = __webpack_require__(5).isObject; XMLNode = __webpack_require__(7); XMLDTDAttList = __webpack_require__(14); XMLDTDEntity = __webpack_require__(15); XMLDTDElement = __webpack_require__(16); XMLDTDNotation = __webpack_require__(17); module.exports = XMLDocType = (function(superClass) { extend(XMLDocType, superClass); function XMLDocType(parent, pubID, sysID) { var ref, ref1; XMLDocType.__super__.constructor.call(this, parent); this.documentObject = parent; if (isObject(pubID)) { ref = pubID, pubID = ref.pubID, sysID = ref.sysID; } if (sysID == null) { ref1 = [pubID, sysID], sysID = ref1[0], pubID = ref1[1]; } if (pubID != null) { this.pubID = this.stringify.dtdPubID(pubID); } if (sysID != null) { this.sysID = this.stringify.dtdSysID(sysID); } } XMLDocType.prototype.element = function(name, value) { var child; child = new XMLDTDElement(this, name, value); this.children.push(child); return this; }; XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { var child; child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); this.children.push(child); return this; }; XMLDocType.prototype.entity = function(name, value) { var child; child = new XMLDTDEntity(this, false, name, value); this.children.push(child); return this; }; XMLDocType.prototype.pEntity = function(name, value) { var child; child = new XMLDTDEntity(this, true, name, value); this.children.push(child); return this; }; XMLDocType.prototype.notation = function(name, value) { var child; child = new XMLDTDNotation(this, name, value); this.children.push(child); return this; }; XMLDocType.prototype.toString = function(options) { return this.options.writer.set(options).docType(this); }; XMLDocType.prototype.ele = function(name, value) { return this.element(name, value); }; XMLDocType.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue); }; XMLDocType.prototype.ent = function(name, value) { return this.entity(name, value); }; XMLDocType.prototype.pent = function(name, value) { return this.pEntity(name, value); }; XMLDocType.prototype.not = function(name, value) { return this.notation(name, value); }; XMLDocType.prototype.up = function() { return this.root() || this.documentObject; }; return XMLDocType; })(XMLNode); }).call(this); /***/ }), /* 14 */ /***/ (function(module, exports, __webpack_require__) { // Generated by CoffeeScript 1.12.7 (function() { var XMLDTDAttList, XMLNode, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; XMLNode = __webpack_require__(7); module.exports = XMLDTDAttList = (function(superClass) { extend(XMLDTDAttList, superClass); function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) { XMLDTDAttList.__super__.constructor.call(this, parent); if (elementName == null) { throw new Error("Missing DTD element name"); } if (attributeName == null) { throw new Error("Missing DTD attribute name"); } if (!attributeType) { throw new Error("Missing DTD attribute type"); } if (!defaultValueType) { throw new Error("Missing DTD attribute default"); } if (defaultValueType.indexOf('#') !== 0) { defaultValueType = '#' + defaultValueType; } if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) { throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT"); } if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) { throw new Error("Default value only applies to #FIXED or #DEFAULT"); } this.elementName = this.stringify.eleName(elementName); this.attributeName = this.stringify.attName(attributeName); this.attributeType = this.stringify.dtdAttType(attributeType); this.defaultValue = this.stringify.dtdAttDefault(defaultValue); this.defaultValueType = defaultValueType; } XMLDTDAttList.prototype.toString = function(options) { return this.options.writer.set(options).dtdAttList(this); }; return XMLDTDAttList; })(XMLNode); }).call(this); /***/ }), /* 15 */ /***/ (function(module, exports, __webpack_require__) { // Generated by CoffeeScript 1.12.7 (function() { var XMLDTDEntity, XMLNode, isObject, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; isObject = __webpack_require__(5).isObject; XMLNode = __webpack_require__(7); module.exports = XMLDTDEntity = (function(superClass) { extend(XMLDTDEntity, superClass); function XMLDTDEntity(parent, pe, name, value) { XMLDTDEntity.__super__.constructor.call(this, parent); if (name == null) { throw new Error("Missing entity name"); } if (value == null) { throw new Error("Missing entity value"); } this.pe = !!pe; this.name = this.stringify.eleName(name); if (!isObject(value)) { this.value = this.stringify.dtdEntityValue(value); } else { if (!value.pubID && !value.sysID) { throw new Error("Public and/or system identifiers are required for an external entity"); } if (value.pubID && !value.sysID) { throw new Error("System identifier is required for a public external entity"); } if (value.pubID != null) { this.pubID = this.stringify.dtdPubID(value.pubID); } if (value.sysID != null) { this.sysID = this.stringify.dtdSysID(value.sysID); } if (value.nData != null) { this.nData = this.stringify.dtdNData(value.nData); } if (this.pe && this.nData) { throw new Error("Notation declaration is not allowed in a parameter entity"); } } } XMLDTDEntity.prototype.toString = function(options) { return this.options.writer.set(options).dtdEntity(this); }; return XMLDTDEntity; })(XMLNode); }).call(this); /***/ }), /* 16 */ /***/ (function(module, exports, __webpack_require__) { // Generated by CoffeeScript 1.12.7 (function() { var XMLDTDElement, XMLNode, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; XMLNode = __webpack_require__(7); module.exports = XMLDTDElement = (function(superClass) { extend(XMLDTDElement, superClass); function XMLDTDElement(parent, name, value) { XMLDTDElement.__super__.constructor.call(this, parent); if (name == null) { throw new Error("Missing DTD element name"); } if (!value) { value = '(#PCDATA)'; } if (Array.isArray(value)) { value = '(' + value.join(',') + ')'; } this.name = this.stringify.eleName(name); this.value = this.stringify.dtdElementValue(value); } XMLDTDElement.prototype.toString = function(options) { return this.options.writer.set(options).dtdElement(this); }; return XMLDTDElement; })(XMLNode); }).call(this); /***/ }), /* 17 */ /***/ (function(module, exports, __webpack_require__) { // Generated by CoffeeScript 1.12.7 (function() { var XMLDTDNotation, XMLNode, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; XMLNode = __webpack_require__(7); module.exports = XMLDTDNotation = (function(superClass) { extend(XMLDTDNotation, superClass); function XMLDTDNotation(parent, name, value) { XMLDTDNotation.__super__.constructor.call(this, parent); if (name == null) { throw new Error("Missing notation name"); } if (!value.pubID && !value.sysID) { throw new Error("Public or system identifiers are required for an external entity"); } this.name = this.stringify.eleName(name); if (value.pubID != null) { this.pubID = this.stringify.dtdPubID(value.pubID); } if (value.sysID != null) { this.sysID = this.stringify.dtdSysID(value.sysID); } } XMLDTDNotation.prototype.toString = function(options) { return this.options.writer.set(options).dtdNotation(this); }; return XMLDTDNotation; })(XMLNode); }).call(this); /***/ }), /* 18 */ /***/ (function(module, exports, __webpack_require__) { // Generated by CoffeeScript 1.12.7 (function() { var XMLNode, XMLRaw, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; XMLNode = __webpack_require__(7); module.exports = XMLRaw = (function(superClass) { extend(XMLRaw, superClass); function XMLRaw(parent, text) { XMLRaw.__super__.constructor.call(this, parent); if (text == null) { throw new Error("Missing raw text"); } this.value = this.stringify.raw(text); } XMLRaw.prototype.clone = function() { return Object.create(this); }; XMLRaw.prototype.toString = function(options) { return this.options.writer.set(options).raw(this); }; return XMLRaw; })(XMLNode); }).call(this); /***/ }), /* 19 */ /***/ (function(module, exports, __webpack_require__) { // Generated by CoffeeScript 1.12.7 (function() { var XMLNode, XMLText, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; XMLNode = __webpack_require__(7); module.exports = XMLText = (function(superClass) { extend(XMLText, superClass); function XMLText(parent, text) { XMLText.__super__.constructor.call(this, parent); if (text == null) { throw new Error("Missing element text"); } this.value = this.stringify.eleText(text); } XMLText.prototype.clone = function() { return Object.create(this); }; XMLText.prototype.toString = function(options) { return this.options.writer.set(options).text(this); }; return XMLText; })(XMLNode); }).call(this); /***/ }), /* 20 */ /***/ (function(module, exports, __webpack_require__) { // Generated by CoffeeScript 1.12.7 (function() { var XMLNode, XMLProcessingInstruction, extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, hasProp = {}.hasOwnProperty; XMLNode = __webpack_require__(7); module.exports = XMLProcessingInstruction = (function(superClass) { extend(XMLProcessingInstruction, superClass); function XMLProcessingInstruction(parent, target, value) { XMLProcessingInstruction.__super__.constructor.call(this, parent); if (target == null) { throw new Error("Missing instruction target"); } this.target = this.stringify.insTarget(target); if (value) { this.value = this.st