UNPKG

hikvision-api

Version:

a simple toolkit to connect and control some equipments of hikvision

1 lines 376 kB
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=69)}([function(e,t){(function(){e.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}).call(this)},function(e,t,n){"use strict";var r=n(56),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}e.exports={isArray:o,isArrayBuffer:function(e){return"[object ArrayBuffer]"===i.call(e)},isBuffer:function(e){return null!==e&&!s(e)&&null!==e.constructor&&!s(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:a,isPlainObject:u,isUndefined:s,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:c,isStream:function(e){return a(e)&&c(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function e(){var t={};function n(n,r){u(t[r])&&u(n)?t[r]=e(t[r],n):u(n)?t[r]=e({},n):o(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)l(arguments[r],n);return t},extend:function(e,t,n){return l(t,(function(t,i){e[i]=n&&"function"==typeof t?r(t,n):t})),e},trim:function(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t,n){(function(){var t,r,i,o,s,a,u,c,l,p,h,d,f,m,y,_,g,v={}.hasOwnProperty;g=n(3),_=g.isObject,y=g.isFunction,m=g.isEmpty,f=g.getValue,c=null,i=null,o=null,s=null,a=null,h=null,d=null,p=null,u=null,r=null,l=null,t=null,e.exports=function(){function e(e){this.parent=e,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,c||(c=n(22),i=n(24),o=n(25),s=n(26),a=n(27),h=n(32),d=n(33),p=n(34),u=n(52),r=n(0),l=n(98),n(23),t=n(99))}return Object.defineProperty(e.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(e.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(e.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.childNodeList&&this.childNodeList.nodes||(this.childNodeList=new l(this.children)),this.childNodeList}}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){var e;return e=this.parent.children.indexOf(this),this.parent.children[e-1]||null}}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){var e;return e=this.parent.children.indexOf(this),this.parent.children[e+1]||null}}),Object.defineProperty(e.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(e.prototype,"textContent",{get:function(){var e,t,n,i,o;if(this.nodeType===r.Element||this.nodeType===r.DocumentFragment){for(o="",t=0,n=(i=this.children).length;t<n;t++)(e=i[t]).textContent&&(o+=e.textContent);return o}return null},set:function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),e.prototype.setParent=function(e){var t,n,r,i,o;for(this.parent=e,e&&(this.options=e.options,this.stringify=e.stringify),o=[],n=0,r=(i=this.children).length;n<r;n++)t=i[n],o.push(t.setParent(this));return o},e.prototype.element=function(e,t,n){var r,i,o,s,a,u,c,l,p,h,d;if(u=null,null===t&&null==n&&(t=(p=[{},null])[0],n=p[1]),null==t&&(t={}),t=f(t),_(t)||(n=(h=[t,n])[0],t=h[1]),null!=e&&(e=f(e)),Array.isArray(e))for(o=0,c=e.length;o<c;o++)i=e[o],u=this.element(i);else if(y(e))u=this.element(e.apply());else if(_(e)){for(a in e)if(v.call(e,a))if(d=e[a],y(d)&&(d=d.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&0===a.indexOf(this.stringify.convertAttKey))u=this.attribute(a.substr(this.stringify.convertAttKey.length),d);else if(!this.options.separateArrayItems&&Array.isArray(d)&&m(d))u=this.dummy();else if(_(d)&&m(d))u=this.element(a);else if(this.options.keepNullNodes||null!=d)if(!this.options.separateArrayItems&&Array.isArray(d))for(s=0,l=d.length;s<l;s++)i=d[s],(r={})[a]=i,u=this.element(r);else _(d)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===a.indexOf(this.stringify.convertTextKey)?u=this.element(d):(u=this.element(a)).element(d):u=this.element(a,d);else u=this.dummy()}else u=this.options.keepNullNodes||null!==n?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===e.indexOf(this.stringify.convertTextKey)?this.text(n):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&0===e.indexOf(this.stringify.convertCDataKey)?this.cdata(n):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&0===e.indexOf(this.stringify.convertCommentKey)?this.comment(n):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&0===e.indexOf(this.stringify.convertRawKey)?this.raw(n):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&0===e.indexOf(this.stringify.convertPIKey)?this.instruction(e.substr(this.stringify.convertPIKey.length),n):this.node(e,t,n):this.dummy();if(null==u)throw new Error("Could not create any elements with: "+e+". "+this.debugInfo());return u},e.prototype.insertBefore=function(e,t,n){var r,i,o,s,a;if(null!=e?e.type:void 0)return s=t,(o=e).setParent(this),s?(i=children.indexOf(s),a=children.splice(i),children.push(o),Array.prototype.push.apply(children,a)):children.push(o),o;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(e));return i=this.parent.children.indexOf(this),a=this.parent.children.splice(i),r=this.parent.element(e,t,n),Array.prototype.push.apply(this.parent.children,a),r},e.prototype.insertAfter=function(e,t,n){var r,i,o;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(e));return i=this.parent.children.indexOf(this),o=this.parent.children.splice(i+1),r=this.parent.element(e,t,n),Array.prototype.push.apply(this.parent.children,o),r},e.prototype.remove=function(){var e;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return e=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[e,e-e+1].concat([])),this.parent},e.prototype.node=function(e,t,n){var r,i;return null!=e&&(e=f(e)),t||(t={}),t=f(t),_(t)||(n=(i=[t,n])[0],t=i[1]),r=new c(this,e,t),null!=n&&r.text(n),this.children.push(r),r},e.prototype.text=function(e){var t;return _(e)&&this.element(e),t=new d(this,e),this.children.push(t),this},e.prototype.cdata=function(e){var t;return t=new i(this,e),this.children.push(t),this},e.prototype.comment=function(e){var t;return t=new o(this,e),this.children.push(t),this},e.prototype.commentBefore=function(e){var t,n;return t=this.parent.children.indexOf(this),n=this.parent.children.splice(t),this.parent.comment(e),Array.prototype.push.apply(this.parent.children,n),this},e.prototype.commentAfter=function(e){var t,n;return t=this.parent.children.indexOf(this),n=this.parent.children.splice(t+1),this.parent.comment(e),Array.prototype.push.apply(this.parent.children,n),this},e.prototype.raw=function(e){var t;return t=new h(this,e),this.children.push(t),this},e.prototype.dummy=function(){return new u(this)},e.prototype.instruction=function(e,t){var n,r,i,o,s;if(null!=e&&(e=f(e)),null!=t&&(t=f(t)),Array.isArray(e))for(o=0,s=e.length;o<s;o++)n=e[o],this.instruction(n);else if(_(e))for(n in e)v.call(e,n)&&(r=e[n],this.instruction(n,r));else y(t)&&(t=t.apply()),i=new p(this,e,t),this.children.push(i);return this},e.prototype.instructionBefore=function(e,t){var n,r;return n=this.parent.children.indexOf(this),r=this.parent.children.splice(n),this.parent.instruction(e,t),Array.prototype.push.apply(this.parent.children,r),this},e.prototype.instructionAfter=function(e,t){var n,r;return n=this.parent.children.indexOf(this),r=this.parent.children.splice(n+1),this.parent.instruction(e,t),Array.prototype.push.apply(this.parent.children,r),this},e.prototype.declaration=function(e,t,n){var i,o;return i=this.document(),o=new s(i,e,t,n),0===i.children.length?i.children.unshift(o):i.children[0].type===r.Declaration?i.children[0]=o:i.children.unshift(o),i.root()||i},e.prototype.dtd=function(e,t){var n,i,o,s,u,c,l,p,h;for(n=this.document(),i=new a(n,e,t),o=s=0,c=(p=n.children).length;s<c;o=++s)if(p[o].type===r.DocType)return n.children[o]=i,i;for(o=u=0,l=(h=n.children).length;u<l;o=++u)if(h[o].isRoot)return n.children.splice(o,0,i),i;return n.children.push(i),i},e.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},e.prototype.root=function(){var e;for(e=this;e;){if(e.type===r.Document)return e.rootObject;if(e.isRoot)return e;e=e.parent}},e.prototype.document=function(){var e;for(e=this;e;){if(e.type===r.Document)return e;e=e.parent}},e.prototype.end=function(e){return this.document().end(e)},e.prototype.prev=function(){var e;if((e=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[e-1]},e.prototype.next=function(){var e;if(-1===(e=this.parent.children.indexOf(this))||e===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[e+1]},e.prototype.importDocument=function(e){var t;return(t=e.root().clone()).parent=this,t.isRoot=!1,this.children.push(t),this},e.prototype.debugInfo=function(e){var t,n;return null!=(e=e||this.name)||(null!=(t=this.parent)?t.name:void 0)?null==e?"parent: <"+this.parent.name+">":(null!=(n=this.parent)?n.name:void 0)?"node: <"+e+">, parent: <"+this.parent.name+">":"node: <"+e+">":""},e.prototype.ele=function(e,t,n){return this.element(e,t,n)},e.prototype.nod=function(e,t,n){return this.node(e,t,n)},e.prototype.txt=function(e){return this.text(e)},e.prototype.dat=function(e){return this.cdata(e)},e.prototype.com=function(e){return this.comment(e)},e.prototype.ins=function(e,t){return this.instruction(e,t)},e.prototype.doc=function(){return this.document()},e.prototype.dec=function(e,t,n){return this.declaration(e,t,n)},e.prototype.e=function(e,t,n){return this.element(e,t,n)},e.prototype.n=function(e,t,n){return this.node(e,t,n)},e.prototype.t=function(e){return this.text(e)},e.prototype.d=function(e){return this.cdata(e)},e.prototype.c=function(e){return this.comment(e)},e.prototype.r=function(e){return this.raw(e)},e.prototype.i=function(e,t){return this.instruction(e,t)},e.prototype.u=function(){return this.up()},e.prototype.importXMLBuilder=function(e){return this.importDocument(e)},e.prototype.replaceChild=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.removeChild=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.appendChild=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.hasChildNodes=function(){return 0!==this.children.length},e.prototype.cloneNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.normalize=function(){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isSupported=function(e,t){return!0},e.prototype.hasAttributes=function(){return 0!==this.attribs.length},e.prototype.compareDocumentPosition=function(e){var n;return this,this===e?0:this.document()!==e.document()?(n=t.Disconnected|t.ImplementationSpecific,Math.random()<.5?n|=t.Preceding:n|=t.Following,n):this.isAncestor(e)?t.Contains|t.Preceding:this.isDescendant(e)?t.Contains|t.Following:this.isPreceding(e)?t.Preceding:t.Following},e.prototype.isSameNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.lookupPrefix=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isDefaultNamespace=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.lookupNamespaceURI=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.isEqualNode=function(e){var t,n,r;if(e.nodeType!==this.nodeType)return!1;if(e.children.length!==this.children.length)return!1;for(t=n=0,r=this.children.length-1;0<=r?n<=r:n>=r;t=0<=r?++n:--n)if(!this.children[t].isEqualNode(e.children[t]))return!1;return!0},e.prototype.getFeature=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.setUserData=function(e,t,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.getUserData=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},e.prototype.contains=function(e){return!!e&&(e===this||this.isDescendant(e))},e.prototype.isDescendant=function(e){var t,n,r,i;for(n=0,r=(i=this.children).length;n<r;n++){if(e===(t=i[n]))return!0;if(t.isDescendant(e))return!0}return!1},e.prototype.isAncestor=function(e){return e.isDescendant(this)},e.prototype.isPreceding=function(e){var t,n;return t=this.treePosition(e),n=this.treePosition(this),-1!==t&&-1!==n&&t<n},e.prototype.isFollowing=function(e){var t,n;return t=this.treePosition(e),n=this.treePosition(this),-1!==t&&-1!==n&&t>n},e.prototype.treePosition=function(e){var t,n;return n=0,t=!1,this.foreachTreeNode(this.document(),(function(r){if(n++,!t&&r===e)return t=!0})),t?n:-1},e.prototype.foreachTreeNode=function(e,t){var n,r,i,o,s;for(e||(e=this.document()),r=0,i=(o=e.children).length;r<i;r++){if(s=t(n=o[r]))return s;if(s=this.foreachTreeNode(n,t))return s}},e}()}).call(this)},function(e,t){(function(){var t,n,r,i,o,s,a,u=[].slice,c={}.hasOwnProperty;t=function(){var e,t,n,r,i,s;if(s=arguments[0],i=2<=arguments.length?u.call(arguments,1):[],o(Object.assign))Object.assign.apply(null,arguments);else for(e=0,n=i.length;e<n;e++)if(null!=(r=i[e]))for(t in r)c.call(r,t)&&(s[t]=r[t]);return s},o=function(e){return!!e&&"[object Function]"===Object.prototype.toString.call(e)},s=function(e){var t;return!!e&&("function"==(t=typeof e)||"object"===t)},r=function(e){return o(Array.isArray)?Array.isArray(e):"[object Array]"===Object.prototype.toString.call(e)},i=function(e){var t;if(r(e))return!e.length;for(t in e)if(c.call(e,t))return!1;return!0},a=function(e){var t,n;return s(e)&&(n=Object.getPrototypeOf(e))&&(t=n.constructor)&&"function"==typeof t&&t instanceof t&&Function.prototype.toString.call(t)===Function.prototype.toString.call(Object)},n=function(e){return o(e.valueOf)?e.valueOf():e},e.exports.assign=t,e.exports.isFunction=o,e.exports.isObject=s,e.exports.isArray=r,e.exports.isEmpty=i,e.exports.isPlainObject=a,e.exports.getValue=n}).call(this)},function(e,t,n){"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=n(80):e.exports=n(82)},function(e,t,n){"use strict";e.exports={BINARY_TYPES:["nodebuffer","arraybuffer","fragments"],GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),EMPTY_BUFFER:Buffer.alloc(0),NOOP:()=>{}}},function(e,t){e.exports=require("path")},function(e,t){e.exports=require("events")},function(module,__webpack_exports__,__webpack_require__){"use strict";let implementation;function selectImplementation(){return"function"==typeof require?require("worker_threads"):eval("require")("worker_threads")}function getImplementation(){return implementation||(implementation=selectImplementation()),implementation}__webpack_require__.d(__webpack_exports__,"a",(function(){return getImplementation}))},function(e,t){e.exports=require("http")},function(e,t,n){"use strict";const r=n(42),i=n(11),o=n(75),{kStatusCode:s,NOOP:a}=n(5),u=Buffer.from([0,0,255,255]),c=Symbol("permessage-deflate"),l=Symbol("total-length"),p=Symbol("callback"),h=Symbol("buffers"),d=Symbol("error");let f;function m(e){this[h].push(e),this[l]+=e.length}function y(e){this[l]+=e.length,this[c]._maxPayload<1||this[l]<=this[c]._maxPayload?this[h].push(e):(this[d]=new RangeError("Max payload size exceeded"),this[d][s]=1009,this.removeListener("data",y),this.reset())}function _(e){this[c]._inflate=null,e[s]=1007,this[p](e)}e.exports=class{constructor(e,t,n){if(this._maxPayload=0|n,this._options=e||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!f){const e=void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10;f=new o(e)}}static get extensionName(){return"permessage-deflate"}offer(){const e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){const e=this._deflate[p];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){const t=this._options,n=e.find(e=>!(!1===t.serverNoContextTakeover&&e.server_no_context_takeover||e.server_max_window_bits&&(!1===t.serverMaxWindowBits||"number"==typeof t.serverMaxWindowBits&&t.serverMaxWindowBits>e.server_max_window_bits)||"number"==typeof t.clientMaxWindowBits&&!e.client_max_window_bits));if(!n)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(n.server_no_context_takeover=!0),t.clientNoContextTakeover&&(n.client_no_context_takeover=!0),"number"==typeof t.serverMaxWindowBits&&(n.server_max_window_bits=t.serverMaxWindowBits),"number"==typeof t.clientMaxWindowBits?n.client_max_window_bits=t.clientMaxWindowBits:!0!==n.client_max_window_bits&&!1!==t.clientMaxWindowBits||delete n.client_max_window_bits,n}acceptAsClient(e){const t=e[0];if(!1===this._options.clientNoContextTakeover&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(t.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(t.client_max_window_bits=this._options.clientMaxWindowBits);return t}normalizeParams(e){return e.forEach(e=>{Object.keys(e).forEach(t=>{let n=e[t];if(n.length>1)throw new Error(`Parameter "${t}" must have only a single value`);if(n=n[0],"client_max_window_bits"===t){if(!0!==n){const e=+n;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${t}": ${n}`)}else if("server_max_window_bits"===t){const e=+n;if(!Number.isInteger(e)||e<8||e>15)throw new TypeError(`Invalid value for parameter "${t}": ${n}`);n=e}else{if("client_no_context_takeover"!==t&&"server_no_context_takeover"!==t)throw new Error(`Unknown parameter "${t}"`);if(!0!==n)throw new TypeError(`Invalid value for parameter "${t}": ${n}`)}e[t]=n})}),e}decompress(e,t,n){f.add(r=>{this._decompress(e,t,(e,t)=>{r(),n(e,t)})})}compress(e,t,n){f.add(r=>{this._compress(e,t,(e,t)=>{r(),n(e,t)})})}_decompress(e,t,n){const o=this._isServer?"client":"server";if(!this._inflate){const e=o+"_max_window_bits",t="number"!=typeof this.params[e]?r.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=r.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[c]=this,this._inflate[l]=0,this._inflate[h]=[],this._inflate.on("error",_),this._inflate.on("data",y)}this._inflate[p]=n,this._inflate.write(e),t&&this._inflate.write(u),this._inflate.flush(()=>{const e=this._inflate[d];if(e)return this._inflate.close(),this._inflate=null,void n(e);const r=i.concat(this._inflate[h],this._inflate[l]);t&&this.params[o+"_no_context_takeover"]?(this._inflate.close(),this._inflate=null):(this._inflate[l]=0,this._inflate[h]=[]),n(null,r)})}_compress(e,t,n){const o=this._isServer?"server":"client";if(!this._deflate){const e=o+"_max_window_bits",t="number"!=typeof this.params[e]?r.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=r.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[l]=0,this._deflate[h]=[],this._deflate.on("error",a),this._deflate.on("data",m)}this._deflate[p]=n,this._deflate.write(e),this._deflate.flush(r.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let e=i.concat(this._deflate[h],this._deflate[l]);t&&(e=e.slice(0,e.length-4)),this._deflate[p]=null,t&&this.params[o+"_no_context_takeover"]?(this._deflate.close(),this._deflate=null):(this._deflate[l]=0,this._deflate[h]=[]),n(null,e)})}}},function(e,t,n){"use strict";const{EMPTY_BUFFER:r}=n(5);function i(e,t){if(0===e.length)return r;if(1===e.length)return e[0];const n=Buffer.allocUnsafe(t);let i=0;for(let t=0;t<e.length;t++){const r=e[t];n.set(r,i),i+=r.length}return i<t?n.slice(0,i):n}function o(e,t,n,r,i){for(let o=0;o<i;o++)n[r+o]=e[o]^t[3&o]}function s(e,t){const n=e.length;for(let r=0;r<n;r++)e[r]^=t[3&r]}function a(e){return e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}function u(e){if(u.readOnly=!0,Buffer.isBuffer(e))return e;let t;return e instanceof ArrayBuffer?t=Buffer.from(e):ArrayBuffer.isView(e)?t=Buffer.from(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),u.readOnly=!1),t}try{const t=n(!function(){var e=new Error("Cannot find module 'bufferutil'");throw e.code="MODULE_NOT_FOUND",e}()),r=t.BufferUtil||t;e.exports={concat:i,mask(e,t,n,i,s){s<48?o(e,t,n,i,s):r.mask(e,t,n,i,s)},toArrayBuffer:a,toBuffer:u,unmask(e,t){e.length<32?s(e,t):r.unmask(e,t)}}}catch(t){e.exports={concat:i,mask:o,toArrayBuffer:a,toBuffer:u,unmask:s}}},function(e,t){e.exports=require("stream")},function(e,t,n){(function(){var t,r={}.hasOwnProperty;t=n(2),e.exports=function(e){function t(e){t.__super__.constructor.call(this,e),this.value=""}return function(e,t){for(var n in t)r.call(t,n)&&(e[n]=t[n]);function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype}(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return this.value},set:function(e){return this.value=e||""}}),Object.defineProperty(t.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(e){return this.value=e||""}}),t.prototype.clone=function(){return Object.create(this)},t.prototype.substringData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.appendData=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.insertData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.deleteData=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.replaceData=function(e,t,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},t.prototype.isEqualNode=function(e){return!!t.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)&&e.data===this.data},t}(t)}).call(this)},function(e,t){(function(){e.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}).call(this)},,function(e,t){e.exports=require("https")},function(e,t){e.exports=require("crypto")},function(e,t){e.exports=require("url")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=t.sleep=t.generateUUID=t.formatDate=void 0,t.formatDate=function(e,t){void 0===t&&(t="yyyy-MM-dd hh:mm:ss");var n={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};for(var r in/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),n)new RegExp("("+r+")").test(t)&&(t=t.replace(RegExp.$1,1===RegExp.$1.length?""+n[r]:("00"+n[r]).substr((""+n[r]).length)));return t},t.generateUUID=function(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)}))},t.sleep=function(e){return new Promise((function(t){setTimeout((function(){t()}),e)}))},t.isBrowser=function(){return"undefined"!=typeof window}},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.XmlHandler=void 0;var s=o(n(92)),a=n(36),u=function(){function e(){}return e.parser=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this._parser.parseStringPromise(e)];case 1:return[2,t.sent()]}}))}))},e.build=function(e){return this._builder.buildObject(e)},e._parser=new s.default.Parser({attrkey:"attr",charkey:"value",explicitArray:!1,attrValueProcessors:[a.parseNumbers,a.parseBooleans],valueProcessors:[a.parseNumbers,a.parseBooleans]}),e._builder=new s.default.Builder({headless:!0,renderOpts:{pretty:!1}}),e}();t.XmlHandler=u},function(e,t){(function(){t.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:"\n"},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(this)},function(e,t,n){(function(){var t,r,i,o,s,a,u,c,l={}.hasOwnProperty;c=n(3),u=c.isObject,a=c.isFunction,s=c.getValue,o=n(2),t=n(0),r=n(51),i=n(23),e.exports=function(e){function n(e,r,i){var o,s,a,u;if(n.__super__.constructor.call(this,e),null==r)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(r),this.type=t.Element,this.attribs={},this.schemaTypeInfo=null,null!=i&&this.attribute(i),e.type===t.Document&&(this.isRoot=!0,this.documentObject=e,e.rootObject=this,e.children))for(s=0,a=(u=e.children).length;s<a;s++)if((o=u[s]).type===t.DocType){o.name=this.name;break}}return function(e,t){for(var n in t)l.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(n,e),Object.defineProperty(n.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(n.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(n.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(n.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(n.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(n.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(n.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(n.prototype,"attributes",{get:function(){return this.attributeMap&&this.attributeMap.nodes||(this.attributeMap=new i(this.attribs)),this.attributeMap}}),n.prototype.clone=function(){var e,t,n,r;for(t in(n=Object.create(this)).isRoot&&(n.documentObject=null),n.attribs={},r=this.attribs)l.call(r,t)&&(e=r[t],n.attribs[t]=e.clone());return n.children=[],this.children.forEach((function(e){var t;return(t=e.clone()).parent=n,n.children.push(t)})),n},n.prototype.attribute=function(e,t){var n,i;if(null!=e&&(e=s(e)),u(e))for(n in e)l.call(e,n)&&(i=e[n],this.attribute(n,i));else a(t)&&(t=t.apply()),this.options.keepNullAttributes&&null==t?this.attribs[e]=new r(this,e,""):null!=t&&(this.attribs[e]=new r(this,e,t));return this},n.prototype.removeAttribute=function(e){var t,n,r;if(null==e)throw new Error("Missing attribute name. "+this.debugInfo());if(e=s(e),Array.isArray(e))for(n=0,r=e.length;n<r;n++)t=e[n],delete this.attribs[t];else delete this.attribs[e];return this},n.prototype.toString=function(e){return this.options.writer.element(this,this.options.writer.filterOptions(e))},n.prototype.att=function(e,t){return this.attribute(e,t)},n.prototype.a=function(e,t){return this.attribute(e,t)},n.prototype.getAttribute=function(e){return this.attribs.hasOwnProperty(e)?this.attribs[e].value:null},n.prototype.setAttribute=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.getAttributeNode=function(e){return this.attribs.hasOwnProperty(e)?this.attribs[e]:null},n.prototype.setAttributeNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.removeAttributeNode=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.getElementsByTagName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.getAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.setAttributeNS=function(e,t,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.removeAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.getAttributeNodeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.setAttributeNodeNS=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.getElementsByTagNameNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.hasAttribute=function(e){return this.attribs.hasOwnProperty(e)},n.prototype.hasAttributeNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.setIdAttribute=function(e,t){return this.attribs.hasOwnProperty(e)?this.attribs[e].isId:t},n.prototype.setIdAttributeNS=function(e,t,n){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.setIdAttributeNode=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.getElementsByTagName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.getElementsByTagNameNS=function(e,t){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.getElementsByClassName=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.isEqualNode=function(e){var t,r,i;if(!n.__super__.isEqualNode.apply(this,arguments).isEqualNode(e))return!1;if(e.namespaceURI!==this.namespaceURI)return!1;if(e.prefix!==this.prefix)return!1;if(e.localName!==this.localName)return!1;if(e.attribs.length!==this.attribs.length)return!1;for(t=r=0,i=this.attribs.length-1;0<=i?r<=i:r>=i;t=0<=i?++r:--r)if(!this.attribs[t].isEqualNode(e.attribs[t]))return!1;return!0},n}(o)}).call(this)},function(e,t){(function(){e.exports=function(){function e(e){this.nodes=e}return Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),e.prototype.clone=function(){return this.nodes=null},e.prototype.getNamedItem=function(e){return this.nodes[e]},e.prototype.setNamedItem=function(e){var t;return t=this.nodes[e.nodeName],this.nodes[e.nodeName]=e,t||null},e.prototype.removeNamedItem=function(e){var t;return t=this.nodes[e],delete this.nodes[e],t||null},e.prototype.item=function(e){return this.nodes[Object.keys(this.nodes)[e]]||null},e.prototype.getNamedItemNS=function(e,t){throw new Error("This DOM method is not implemented.")},e.prototype.setNamedItemNS=function(e){throw new Error("This DOM method is not implemented.")},e.prototype.removeNamedItemNS=function(e,t){throw new Error("This DOM method is not implemented.")},e}()}).call(this)},function(e,t,n){(function(){var t,r,i={}.hasOwnProperty;t=n(0),r=n(13),e.exports=function(e){function n(e,r){if(n.__super__.constructor.call(this,e),null==r)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=t.CData,this.value=this.stringify.cdata(r)}return function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(n,e),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(e){return this.options.writer.cdata(this,this.options.writer.filterOptions(e))},n}(r)}).call(this)},function(e,t,n){(function(){var t,r,i={}.hasOwnProperty;t=n(0),r=n(13),e.exports=function(e){function n(e,r){if(n.__super__.constructor.call(this,e),null==r)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=t.Comment,this.value=this.stringify.comment(r)}return function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(n,e),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(e){return this.options.writer.comment(this,this.options.writer.filterOptions(e))},n}(r)}).call(this)},function(e,t,n){(function(){var t,r,i,o={}.hasOwnProperty;i=n(3).isObject,r=n(2),t=n(0),e.exports=function(e){function n(e,r,o,s){var a;n.__super__.constructor.call(this,e),i(r)&&(r=(a=r).version,o=a.encoding,s=a.standalone),r||(r="1.0"),this.type=t.Declaration,this.version=this.stringify.xmlVersion(r),null!=o&&(this.encoding=this.stringify.xmlEncoding(o)),null!=s&&(this.standalone=this.stringify.xmlStandalone(s))}return function(e,t){for(var n in t)o.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(n,e),n.prototype.toString=function(e){return this.options.writer.declaration(this,this.options.writer.filterOptions(e))},n}(r)}).call(this)},function(e,t,n){(function(){var t,r,i,o,s,a,u,c,l={}.hasOwnProperty;c=n(3).isObject,u=n(2),t=n(0),r=n(28),o=n(29),i=n(30),s=n(31),a=n(23),e.exports=function(e){function n(e,r,i){var o,s,a,u,l,p;if(n.__super__.constructor.call(this,e),this.type=t.DocType,e.children)for(s=0,a=(u=e.children).length;s<a;s++)if((o=u[s]).type===t.Element){this.name=o.name;break}this.documentObject=e,c(r)&&(r=(l=r).pubID,i=l.sysID),null==i&&(i=(p=[r,i])[0],r=p[1]),null!=r&&(this.pubID=this.stringify.dtdPubID(r)),null!=i&&(this.sysID=this.stringify.dtdSysID(i))}return function(e,t){for(var n in t)l.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(n,e),Object.defineProperty(n.prototype,"entities",{get:function(){var e,n,r,i,o;for(i={},n=0,r=(o=this.children).length;n<r;n++)(e=o[n]).type!==t.EntityDeclaration||e.pe||(i[e.name]=e);return new a(i)}}),Object.defineProperty(n.prototype,"notations",{get:function(){var e,n,r,i,o;for(i={},n=0,r=(o=this.children).length;n<r;n++)(e=o[n]).type===t.NotationDeclaration&&(i[e.name]=e);return new a(i)}}),Object.defineProperty(n.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(n.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(n.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),n.prototype.element=function(e,t){var n;return n=new i(this,e,t),this.children.push(n),this},n.prototype.attList=function(e,t,n,i,o){var s;return s=new r(this,e,t,n,i,o),this.children.push(s),this},n.prototype.entity=function(e,t){var n;return n=new o(this,!1,e,t),this.children.push(n),this},n.prototype.pEntity=function(e,t){var n;return n=new o(this,!0,e,t),this.children.push(n),this},n.prototype.notation=function(e,t){var n;return n=new s(this,e,t),this.children.push(n),this},n.prototype.toString=function(e){return this.options.writer.docType(this,this.options.writer.filterOptions(e))},n.prototype.ele=function(e,t){return this.element(e,t)},n.prototype.att=function(e,t,n,r,i){return this.attList(e,t,n,r,i)},n.prototype.ent=function(e,t){return this.entity(e,t)},n.prototype.pent=function(e,t){return this.pEntity(e,t)},n.prototype.not=function(e,t){return this.notation(e,t)},n.prototype.up=function(){return this.root()||this.documentObject},n.prototype.isEqualNode=function(e){return!!n.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)&&(e.name===this.name&&(e.publicId===this.publicId&&e.systemId===this.systemId))},n}(u)}).call(this)},function(e,t,n){(function(){var t,r,i={}.hasOwnProperty;r=n(2),t=n(0),e.exports=function(e){function n(e,r,i,o,s,a){if(n.__super__.constructor.call(this,e),null==r)throw new Error("Missing DTD element name. "+this.debugInfo());if(null==i)throw new Error("Missing DTD attribute name. "+this.debugInfo(r));if(!o)throw new Error("Missing DTD attribute type. "+this.debugInfo(r));if(!s)throw new Error("Missing DTD attribute default. "+this.debugInfo(r));if(0!==s.indexOf("#")&&(s="#"+s),!s.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(r));if(a&&!s.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(r));this.elementName=this.stringify.name(r),this.type=t.AttributeDeclaration,this.attributeName=this.stringify.name(i),this.attributeType=this.stringify.dtdAttType(o),a&&(this.defaultValue=this.stringify.dtdAttDefault(a)),this.defaultValueType=s}return function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(n,e),n.prototype.toString=function(e){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(e))},n}(r)}).call(this)},function(e,t,n){(function(){var t,r,i,o={}.hasOwnProperty;i=n(3).isObject,r=n(2),t=n(0),e.exports=function(e){function n(e,r,o,s){if(n.__super__.constructor.call(this,e),null==o)throw new Error("Missing DTD entity name. "+this.debugInfo(o));if(null==s)throw new Error("Missing DTD entity value. "+this.debugInfo(o));if(this.pe=!!r,this.name=this.stringify.name(o),this.type=t.EntityDeclaration,i(s)){if(!s.pubID&&!s.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(o));if(s.pubID&&!s.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(o));if(this.internal=!1,null!=s.pubID&&(this.pubID=this.stringify.dtdPubID(s.pubID)),null!=s.sysID&&(this.sysID=this.stringify.dtdSysID(s.sysID)),null!=s.nData&&(this.nData=this.stringify.dtdNData(s.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(o))}else this.value=this.stringify.dtdEntityValue(s),this.internal=!0}return function(e,t){for(var n in t)o.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(n,e),Object.defineProperty(n.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(n.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(n.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(n.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(n.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(n.prototype,"xmlVersion",{get:function(){return null}}),n.prototype.toString=function(e){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(e))},n}(r)}).call(this)},function(e,t,n){(function(){var t,r,i={}.hasOwnProperty;r=n(2),t=n(0),e.exports=function(e){function n(e,r,i){if(n.__super__.constructor.call(this,e),null==r)throw new Error("Missing DTD element name. "+this.debugInfo());i||(i="(#PCDATA)"),Array.isArray(i)&&(i="("+i.join(",")+")"),this.name=this.stringify.name(r),this.type=t.ElementDeclaration,this.value=this.stringify.dtdElementValue(i)}return function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(n,e),n.prototype.toString=function(e){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(e))},n}(r)}).call(this)},function(e,t,n){(function(){var t,r,i={}.hasOwnProperty;r=n(2),t=n(0),e.exports=function(e){function n(e,r,i){if(n.__super__.constructor.call(this,e),null==r)throw new Error("Missing DTD notation name. "+this.debugInfo(r));if(!i.pubID&&!i.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(r));this.name=this.stringify.name(r),this.type=t.NotationDeclaration,null!=i.pubID&&(this.pubID=this.stringify.dtdPubID(i.pubID)),null!=i.sysID&&(this.sysID=this.stringify.dtdSysID(i.sysID))}return function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(n,e),Object.defineProperty(n.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(n.prototype,"systemId",{get:function(){return this.sysID}}),n.prototype.toString=function(e){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(e))},n}(r)}).call(this)},function(e,t,n){(function(){var t,r,i={}.hasOwnProperty;t=n(0),r=n(2),e.exports=function(e){function n(e,r){if(n.__super__.constructor.call(this,e),null==r)throw new Error("Missing raw text. "+this.debugInfo());this.type=t.Raw,this.value=this.stringify.raw(r)}return function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(n,e),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(e){return this.options.writer.raw(this,this.options.writer.filterOptions(e))},n}(r)}).call(this)},function(e,t,n){(function(){var t,r,i={}.hasOwnProperty;t=n(0),r=n(13),e.exports=function(e){function n(e,r){if(n.__super__.constructor.call(this,e),null==r)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=t.Text,this.value=this.stringify.text(r)}return function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(n,e),Object.defineProperty(n.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(n.prototype,"wholeText",{get:function(){var e,t,n;for(n="",t=this.previousSibling;t;)n=t.data+n,t=t.previousSibling;for(n+=this.data,e=this.nextSibling;e;)n+=e.data,e=e.nextSibling;return n}}),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(e){return this.options.writer.text(this,this.options.writer.filterOptions(e))},n.prototype.splitText=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},n.prototype.replaceWholeText=function(e){throw new Error("This DOM method is not implemented."+this.debugInfo())},n}(r)}).call(this)},function(e,t,n){(function(){var t,r,i={}.hasOwnProperty;t=n(0),r=n(13),e.exports=function(e){function n(e,r,i){if(n.__super__.constructor.call(this,e),null==r)throw new Error("Missing instruction target. "+this.debugInfo());this.type=t.ProcessingInstruction,this.target=this.stringify.insTarget(r),this.name=this.target,i&&(this.value=this.stringify.insValue(i))}return function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}(n,e),n.prototype.clone=function(){return Object.create(this)},n.prototype.toString=function(e){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(e))},n.prototype.isEqualNode=function(e){return!!n.__super__.isEqualNode.apply(this,arguments).isEqualNode(e)&&e.target===this.target},n}(r)}).call(this)},function(e,t,n){(function(){var t,r={}.hasOwnProperty;t=n(54),e.exports=function(e){function t(e){t.__super__.constructor.call(this,e)}return function(e,t){for(var n in t)r.call(t,n)&&(e[n]=t[n]);function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype}(t,e),t.prototype.document=function(e,t){var n,r,i,o,s;for(t=this.filterOptions(t),o="",r=0,i=(s=e.children).length;r<i;r++)n=s[r],o+=this.writeChildNode(n,t,0);return t.pretty&&o.slice(-t.newline.length)===t.newline&&(o=o.slice(0,-t.newline.length)),o},t}(t)}).call(this)},function(e,t){(function(){"use strict";var e;e=new RegExp(/(?!xmlns)^.*:/),t.normalize=function(e){return e.toLowerCase()},t.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},t.stripPrefix=function(t){return t.replace(e,"")},t.parseNumbers=function(e){return isNaN(e)||(e=e%1==0?parseInt(e,10):parseFloat(e)),e},t.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e="true"===e.toLowerCase()),e}}).call(this)},function(e,t,n){"use strict";var r=n(1);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").re