/*! * kml与geojson互转工具类 * 版本信息:v1.1.0, hash值: 951f6da9a162fa66458b * 编译日期:2021-08-11 18:07:28 * 版权所有:Copyright by 木遥 https://github.com/muyao1987/kml-geojson * */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("kgUtil",[],e):"object"==typeof exports?exports.kgUtil=e():t.kgUtil=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=16)}([function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return v}));var n,i=r(2),o=r.n(i),a=/\s*/g,s=/^\s*|\s*$/g,u=/\s+/;function f(t){if(!t||!t.length)return 0;for(var e=0,r=0;e1)for(var r=1;r=0))throw x(_,new Error(t.tagName+"@"+r));for(var i=e.length-1;n"==t&&">")||"&"==t&&"&"||'"'==t&&"""||"&#"+t.charCodeAt()+";"}function R(t,e){if(e(t))return!0;if(t=t.firstChild)do{if(R(t,e))return!0}while(t=t.nextSibling)}function z(){}function B(t,e,r,n){t&&t._inc++,"http://www.w3.org/2000/xmlns/"==r.namespaceURI&&delete e._nsMap[r.prefix?r.localName:""]}function U(t,e,r){if(t&&t._inc){t._inc++;var n=e.childNodes;if(r)n[n.length++]=r;else{for(var i=e.firstChild,o=0;i;)n[o++]=i,i=i.nextSibling;n.length=o}}}function P(t,e){var r=e.previousSibling,n=e.nextSibling;return r?r.nextSibling=n:t.firstChild=n,n?n.previousSibling=r:t.lastChild=r,U(t.ownerDocument,t),e}function F(t,e,r){var n=e.parentNode;if(n&&n.removeChild(e),e.nodeType===m){var i=e.firstChild;if(null==i)return e;var o=e.lastChild}else i=o=e;var a=r?r.previousSibling:t.lastChild;i.previousSibling=a,o.nextSibling=r,a?a.nextSibling=i:t.firstChild=i,null==r?t.lastChild=o:r.previousSibling=o;do{i.parentNode=t}while(i!==o&&(i=i.nextSibling));return U(t.ownerDocument||t,t),e.nodeType==m&&(e.firstChild=e.lastChild=null),e}function L(){this._nsMap={}}function M(){}function j(){}function Z(){}function W(){}function Y(){}function H(){}function G(){}function X(){}function q(){}function V(){}function J(){}function K(){}function $(t,e){var r=[],n=9==this.nodeType&&this.documentElement||this,i=n.prefix,o=n.namespaceURI;if(o&&null==i&&null==(i=n.lookupPrefix(o)))var a=[{namespace:o,prefix:null}];return tt(this,r,t,e,a),r.join("")}function Q(t,e,r){var n=t.prefix||"",i=t.namespaceURI;if(!n&&!i)return!1;if("xml"===n&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var o=r.length;o--;){var a=r[o];if(a.prefix==n)return a.namespace!=i}return!0}function tt(t,e,r,n,i){if(n){if(!(t=n(t)))return;if("string"==typeof t)return void e.push(t)}switch(t.nodeType){case o:i||(i=[]);i.length;var c=t.attributes,g=c.length,y=t.firstChild,v=t.tagName;r="http://www.w3.org/1999/xhtml"===t.namespaceURI||r,e.push("<",v);for(var w=0;w"),r&&/^script$/i.test(v))for(;y;)y.data?e.push(y.data):tt(y,e,r,n,i),y=y.nextSibling;else for(;y;)tt(y,e,r,n,i),y=y.nextSibling;e.push("")}else e.push("/>");return;case d:case m:for(y=t.firstChild;y;)tt(y,e,r,n,i),y=y.nextSibling;return;case a:return e.push(" ",t.name,'="',t.value.replace(/[<&"]/g,D),'"');case s:return e.push(t.data.replace(/[<&]/g,D).replace(/]]>/g,"]]>"));case u:return e.push("");case h:return e.push("\x3c!--",t.data,"--\x3e");case p:var E=t.publicId,S=t.systemId;if(e.push("");else if(S&&"."!=S)e.push(" SYSTEM ",S,">");else{var A=t.internalSubset;A&&e.push(" [",A,"]"),e.push(">")}return;case l:return e.push("");case f:return e.push("&",t.nodeName,";");default:e.push("??",t.nodeName)}}function et(t,e,r){t[e]=r}x.prototype=Error.prototype,r(y,x),k.prototype={length:0,item:function(t){return this[t]||null},toString:function(t,e){for(var r=[],n=0;n0},lookupPrefix:function(t){for(var e=this;e;){var r=e._nsMap;if(r)for(var n in r)if(r[n]==t)return n;e=e.nodeType==a?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var r=e._nsMap;if(r&&t in r)return r[t];e=e.nodeType==a?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){return null==this.lookupPrefix(t)}},r(i,I),r(i,I.prototype),z.prototype={nodeName:"#document",nodeType:d,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType==m){for(var r=t.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,e),r=n}return t}return null==this.documentElement&&t.nodeType==o&&(this.documentElement=t),F(this,t,e),t.ownerDocument=this,t},removeChild:function(t){return this.documentElement==t&&(this.documentElement=null),P(this,t)},importNode:function(t,e){return function t(e,r,n){var i;switch(r.nodeType){case o:(i=r.cloneNode(!1)).ownerDocument=e;case m:break;case a:n=!0}i||(i=r.cloneNode(!1));if(i.ownerDocument=e,i.parentNode=null,n)for(var s=r.firstChild;s;)i.appendChild(t(e,s,n)),s=s.nextSibling;return i}(this,t,e)},getElementById:function(t){var e=null;return R(this.documentElement,(function(r){if(r.nodeType==o&&r.getAttribute("id")==t)return e=r,!0})),e},getElementsByClassName:function(t){var e=new RegExp("(^|\\s)"+t+"(\\s|$)");return new E(this,(function(t){var r=[];return R(t.documentElement,(function(n){n!==t&&n.nodeType==o&&e.test(n.getAttribute("class"))&&r.push(n)})),r}))},createElement:function(t){var e=new L;return e.ownerDocument=this,e.nodeName=t,e.tagName=t,e.childNodes=new k,(e.attributes=new A)._ownerElement=e,e},createDocumentFragment:function(){var t=new V;return t.ownerDocument=this,t.childNodes=new k,t},createTextNode:function(t){var e=new Z;return e.ownerDocument=this,e.appendData(t),e},createComment:function(t){var e=new W;return e.ownerDocument=this,e.appendData(t),e},createCDATASection:function(t){var e=new Y;return e.ownerDocument=this,e.appendData(t),e},createProcessingInstruction:function(t,e){var r=new J;return r.ownerDocument=this,r.tagName=r.target=t,r.nodeValue=r.data=e,r},createAttribute:function(t){var e=new M;return e.ownerDocument=this,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){var e=new q;return e.ownerDocument=this,e.nodeName=t,e},createElementNS:function(t,e){var r=new L,n=e.split(":"),i=r.attributes=new A;return r.childNodes=new k,r.ownerDocument=this,r.nodeName=e,r.tagName=e,r.namespaceURI=t,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=e,i._ownerElement=r,r},createAttributeNS:function(t,e){var r=new M,n=e.split(":");return r.ownerDocument=this,r.nodeName=e,r.name=e,r.namespaceURI=t,r.specified=!0,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=e,r}},n(z,I),L.prototype={nodeType:o,hasAttribute:function(t){return null!=this.getAttributeNode(t)},getAttribute:function(t){var e=this.getAttributeNode(t);return e&&e.value||""},getAttributeNode:function(t){return this.attributes.getNamedItem(t)},setAttribute:function(t,e){var r=this.ownerDocument.createAttribute(t);r.value=r.nodeValue=""+e,this.setAttributeNode(r)},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},appendChild:function(t){return t.nodeType===m?this.insertBefore(t,null):function(t,e){var r=e.parentNode;if(r){var n=t.lastChild;r.removeChild(e);n=t.lastChild}return n=t.lastChild,e.parentNode=t,e.previousSibling=n,e.nextSibling=null,n?n.nextSibling=e:t.firstChild=e,t.lastChild=e,U(t.ownerDocument,t,e),e}(this,t)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var r=this.getAttributeNodeNS(t,e);r&&this.removeAttributeNode(r)},hasAttributeNS:function(t,e){return null!=this.getAttributeNodeNS(t,e)},getAttributeNS:function(t,e){var r=this.getAttributeNodeNS(t,e);return r&&r.value||""},setAttributeNS:function(t,e,r){var n=this.ownerDocument.createAttributeNS(t,e);n.value=n.nodeValue=""+r,this.setAttributeNode(n)},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByTagName:function(t){return new E(this,(function(e){var r=[];return R(e,(function(n){n===e||n.nodeType!=o||"*"!==t&&n.tagName!=t||r.push(n)})),r}))},getElementsByTagNameNS:function(t,e){return new E(this,(function(r){var n=[];return R(r,(function(i){i===r||i.nodeType!==o||"*"!==t&&i.namespaceURI!==t||"*"!==e&&i.localName!=e||n.push(i)})),n}))}},z.prototype.getElementsByTagName=L.prototype.getElementsByTagName,z.prototype.getElementsByTagNameNS=L.prototype.getElementsByTagNameNS,n(L,I),M.prototype.nodeType=a,n(M,I),j.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},appendChild:function(t){throw new Error(v[w])},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,r){r=this.data.substring(0,t)+r+this.data.substring(t+e),this.nodeValue=this.data=r,this.length=r.length}},n(j,I),Z.prototype={nodeName:"#text",nodeType:s,splitText:function(t){var e=this.data,r=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},n(Z,j),W.prototype={nodeName:"#comment",nodeType:h},n(W,j),Y.prototype={nodeName:"#cdata-section",nodeType:u},n(Y,j),H.prototype.nodeType=p,n(H,I),G.prototype.nodeType=g,n(G,I),X.prototype.nodeType=c,n(X,I),q.prototype.nodeType=f,n(q,I),V.prototype.nodeName="#document-fragment",V.prototype.nodeType=m,n(V,I),J.prototype.nodeType=l,n(J,I),K.prototype.serializeToString=function(t,e,r){return $.call(t,e,r)},I.prototype.toString=$;try{if(Object.defineProperty){Object.defineProperty(E.prototype,"length",{get:function(){return S(this),this.$$length}}),Object.defineProperty(I.prototype,"textContent",{get:function(){return function t(e){switch(e.nodeType){case o:case m:var r=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&r.push(t(e)),e=e.nextSibling;return r.join("");default:return e.nodeValue}}(this)},set:function(t){switch(this.nodeType){case o:case m:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),et=function(t,e,r){t["$$"+e]=r}}}catch(t){}e.Node=I,e.DOMException=x,e.DOMImplementation=O,e.XMLSerializer=K},function(t,e,r){(function(e,n,i){t.exports=function t(e,n,i){function o(s,u){if(!n[s]){if(!e[s]){if(!u&&r(12))return(void 0)(s,!0);if(a)return a(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var c=n[s]={exports:{}};e[s][0].call(c.exports,(function(t){return o(e[s][1][t]||t)}),c,c.exports,t,e,n,i)}return n[s].exports}for(var a=!1,s=0;s>2,s=(3&e)<<4|r>>4,u=1>6:64,f=2>4,r=(15&a)<<4|(s=o.indexOf(t.charAt(f++)))>>2,n=(3&s)<<6|(u=o.indexOf(t.charAt(f++))),l[c++]=e,64!==s&&(l[c++]=r),64!==u&&(l[c++]=n);return l}},{"./support":30,"./utils":32}],2:[function(t,e,r){"use strict";var n=t("./external"),i=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),a=t("./stream/DataLengthProbe");function s(t,e,r,n,i){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=n,this.compressedContent=i}s.prototype={getContentWorker:function(){var t=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),e=this;return t.on("end",(function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),t},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(t,e,r){return t.pipe(new o).pipe(new a("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",e)},e.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,r){"use strict";var n=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(t){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,r){"use strict";var n=t("./utils"),i=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==n.getTypeOf(t)?function(t,e,r){var n=i,o=0+r;t^=-1;for(var a=0;a>>8^n[255&(t^e[a])];return-1^t}(0|e,t,t.length):function(t,e,r){var n=i,o=0+r;t^=-1;for(var a=0;a>>8^n[255&(t^e.charCodeAt(a))];return-1^t}(0|e,t,t.length):0}},{"./utils":32}],5:[function(t,e,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,e,r){"use strict";var n;n="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:n}},{lie:37}],7:[function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=t("pako"),o=t("./utils"),a=t("./stream/GenericWorker"),s=n?"uint8array":"array";function u(t,e){a.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}r.magic="\b\0",o.inherits(u,a),u.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(s,t.data),!1)},u.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},r.compressWorker=function(t){return new u("Deflate",t)},r.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,r){"use strict";function n(t,e){var r,n="";for(r=0;r>>=8;return n}function i(t,e,r,i,a,c){var l,h,d=t.file,p=t.compression,m=c!==s.utf8encode,g=o.transformTo("string",c(d.name)),y=o.transformTo("string",s.utf8encode(d.name)),v=d.comment,w=o.transformTo("string",c(v)),_=o.transformTo("string",s.utf8encode(v)),b=y.length!==d.name.length,x=_.length!==v.length,k="",E="",S="",A=d.dir,N=d.date,T={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(T.crc32=t.crc32,T.compressedSize=t.compressedSize,T.uncompressedSize=t.uncompressedSize);var C=0;e&&(C|=8),m||!b&&!x||(C|=2048);var O,I=0,D=0;A&&(I|=16),"UNIX"===a?(D=798,I|=((O=d.unixPermissions)||(O=A?16893:33204),(65535&O)<<16)):(D=20,I|=63&(d.dosPermissions||0)),l=N.getUTCHours(),l<<=6,l|=N.getUTCMinutes(),l<<=5,l|=N.getUTCSeconds()/2,h=N.getUTCFullYear()-1980,h<<=4,h|=N.getUTCMonth()+1,h<<=5,h|=N.getUTCDate(),b&&(k+="up"+n((E=n(1,1)+n(u(g),4)+y).length,2)+E),x&&(k+="uc"+n((S=n(1,1)+n(u(w),4)+_).length,2)+S);var R="";return R+="\n\0",R+=n(C,2),R+=p.magic,R+=n(l,2),R+=n(h,2),R+=n(T.crc32,4),R+=n(T.compressedSize,4),R+=n(T.uncompressedSize,4),R+=n(g.length,2),R+=n(k.length,2),{fileRecord:f.LOCAL_FILE_HEADER+R+g+k,dirRecord:f.CENTRAL_FILE_HEADER+n(D,2)+R+n(w.length,2)+"\0\0\0\0"+n(I,4)+n(i,4)+g+k+w}}var o=t("../utils"),a=t("../stream/GenericWorker"),s=t("../utf8"),u=t("../crc32"),f=t("../signature");function c(t,e,r,n){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(c,a),c.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,a.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-n-1))/r:100}}))},c.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var r=i(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},c.prototype.closedSource=function(t){this.accumulate=!1;var e,r=this.streamFiles&&!t.file.dir,o=i(t,r,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(o.dirRecord),r)this.push({data:(e=t,f.DATA_DESCRIPTOR+n(e.crc32,4)+n(e.compressedSize,4)+n(e.uncompressedSize,4)),meta:{percent:100}});else for(this.push({data:o.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},c.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return n.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=i},{"../utils":32}],19:[function(t,e,r){"use strict";var n=t("./Uint8ArrayReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,r){"use strict";var n=t("./DataReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},i.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},i.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./DataReader":18}],21:[function(t,e,r){"use strict";var n=t("./ArrayReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,r){"use strict";var n=t("../utils"),i=t("../support"),o=t("./ArrayReader"),a=t("./StringReader"),s=t("./NodeBufferReader"),u=t("./Uint8ArrayReader");e.exports=function(t){var e=n.getTypeOf(t);return n.checkSupport(e),"string"!==e||i.uint8array?"nodebuffer"===e?new s(t):i.uint8array?new u(n.transformTo("uint8array",t)):new o(n.transformTo("array",t)):new a(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,e,r){"use strict";var n=t("./GenericWorker"),i=t("../utils");function o(t){n.call(this,"ConvertWorker to "+t),this.destType=t}i.inherits(o,n),o.prototype.processChunk=function(t){this.push({data:i.transformTo(this.destType,t.data),meta:t.meta})},e.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,r){"use strict";var n=t("./GenericWorker"),i=t("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,n),o.prototype.processChunk=function(t){this.streamInfo.crc32=i(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./GenericWorker");function o(t){i.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}n.inherits(o,i),o.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}i.prototype.processChunk.call(this,t)},e.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./GenericWorker");function o(t){i.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then((function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=n.getTypeOf(t),e.isPaused||e._tickAndRepeat()}),(function(t){e.error(t)}))}n.inherits(o,i),o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,r){"use strict";function n(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var r=0;r "+t:t}},e.exports=n},{}],29:[function(t,e,r){"use strict";var i=t("../utils"),o=t("./ConvertWorker"),a=t("./GenericWorker"),s=t("../base64"),u=t("../support"),f=t("../external"),c=null;if(u.nodestream)try{c=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function l(t,e,r){var n=e;switch(e){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string"}try{this._internalType=n,this._outputType=e,this._mimeType=r,i.checkSupport(n),this._worker=t.pipe(new o(n)),t.lock()}catch(t){this._worker=new a("error"),this._worker.error(t)}}l.prototype={accumulate:function(t){return e=this,r=t,new f.Promise((function(t,o){var a=[],u=e._internalType,f=e._outputType,c=e._mimeType;e.on("data",(function(t,e){a.push(t),r&&r(e)})).on("error",(function(t){a=[],o(t)})).on("end",(function(){try{var e=function(t,e,r){switch(t){case"blob":return i.newBlob(i.transformTo("arraybuffer",e),r);case"base64":return s.encode(e);default:return i.transformTo(t,e)}}(f,function(t,e){var r,i=0,o=null,a=0;for(r=0;r>>6:(r<65536?e[a++]=224|r>>>12:(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63),e[a++]=128|r>>>6&63),e[a++]=128|63&r);return e}(t)},r.utf8decode=function(t){return i.nodebuffer?n.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,r,i,o,a=t.length,u=new Array(2*a);for(e=r=0;e>10&1023,u[r++]=56320|1023&i)}return u.length!==r&&(u.subarray?u=u.subarray(0,r):u.length=r),n.applyFromCharCode(u)}(t=n.transformTo(i.uint8array?"uint8array":"array",t))},n.inherits(f,a),f.prototype.processChunk=function(t){var e=n.transformTo(i.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var o=e;(e=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),e.set(o,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var a=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0||0===r?e:r+s[t[r]]>e?r:e}(e),u=e;a!==e.length&&(i.uint8array?(u=e.subarray(0,a),this.leftOver=e.subarray(a,e.length)):(u=e.slice(0,a),this.leftOver=e.slice(a,e.length))),this.push({data:r.utf8decode(u),meta:t.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=f,n.inherits(c,a),c.prototype.processChunk=function(t){this.push({data:r.utf8encode(t.data),meta:t.meta})},r.Utf8EncodeWorker=c},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,r){"use strict";var n=t("./support"),i=t("./base64"),o=t("./nodejsUtils"),a=t("set-immediate-shim"),s=t("./external");function u(t){return t}function f(t,e){for(var r=0;r>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,r,n,i=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4>>6:(r<65536?e[a++]=224|r>>>12:(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63),e[a++]=128|r>>>6&63),e[a++]=128|63&r);return e},r.buf2binstring=function(t){return u(t,t.length)},r.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r>10&1023,f[n++]=56320|1023&i)}return u(f,n)},r.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0||0===r?e:r+a[t[r]]>e?r:e}},{"./common":41}],43:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){for(var i=65535&t|0,o=t>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e,r,i){var o=n,a=i+r;t^=-1;for(var s=i;s>>8^o[255&(t^e[s])];return-1^t}},{}],46:[function(t,e,r){"use strict";var n,i=t("../utils/common"),o=t("./trees"),a=t("./adler32"),s=t("./crc32"),u=t("./messages"),f=-2,c=258,l=262,h=113;function d(t,e){return t.msg=u[e],e}function p(t){return(t<<1)-(4t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function y(t,e){o._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,g(t.strm)}function v(t,e){t.pending_buf[t.pending++]=e}function w(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function _(t,e){var r,n,i=t.max_chain_length,o=t.strstart,a=t.prev_length,s=t.nice_match,u=t.strstart>t.w_size-l?t.strstart-(t.w_size-l):0,f=t.window,h=t.w_mask,d=t.prev,p=t.strstart+c,m=f[o+a-1],g=f[o+a];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(f[(r=e)+a]===g&&f[r+a-1]===m&&f[r]===f[o]&&f[++r]===f[o+1]){o+=2,r++;do{}while(f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&f[++o]===f[++r]&&ou&&0!=--i);return a<=t.lookahead?a:t.lookahead}function b(t){var e,r,n,o,u,f,c,h,d,p,m=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=m+(m-l)){for(i.arraySet(t.window,t.window,m,m,0),t.match_start-=m,t.strstart-=m,t.block_start-=m,e=r=t.hash_size;n=t.head[--e],t.head[e]=m<=n?n-m:0,--r;);for(e=r=m;n=t.prev[--e],t.prev[e]=m<=n?n-m:0,--r;);o+=m}if(0===t.strm.avail_in)break;if(f=t.strm,c=t.window,h=t.strstart+t.lookahead,p=void 0,(d=o)<(p=f.avail_in)&&(p=d),r=0===p?0:(f.avail_in-=p,i.arraySet(c,f.input,f.next_in,p,h),1===f.state.wrap?f.adler=a(f.adler,c,p,h):2===f.state.wrap&&(f.adler=s(f.adler,c,p,h)),f.next_in+=p,f.total_in+=p,p),t.lookahead+=r,t.lookahead+t.insert>=3)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3&&t.match_length<=t.prev_length){for(i=t.strstart+t.lookahead-3,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=i&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(b(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-l&&(y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(y(t,!1),t.strm.avail_out),1)})),new E(4,4,8,4,x),new E(4,5,16,8,x),new E(4,6,32,32,x),new E(4,4,16,16,k),new E(8,16,32,32,k),new E(8,16,128,128,k),new E(8,32,128,256,k),new E(32,128,258,1024,k),new E(32,258,258,4096,k)],r.deflateInit=function(t,e){return T(t,e,8,15,8,0)},r.deflateInit2=T,r.deflateReset=N,r.deflateResetKeep=A,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?f:(t.state.gzhead=e,0):f},r.deflate=function(t,e){var r,i,a,u;if(!t||!t.state||5>8&255),v(i,i.gzhead.time>>16&255),v(i,i.gzhead.time>>24&255),v(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),v(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(v(i,255&i.gzhead.extra.length),v(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=s(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(v(i,0),v(i,0),v(i,0),v(i,0),v(i,0),v(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),v(i,3),i.status=h);else{var l=8+(i.w_bits-8<<4)<<8;l|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(l|=32),l+=31-l%31,i.status=h,w(i,l),0!==i.strstart&&(w(i,t.adler>>>16),w(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),g(t),a=i.pending,i.pending!==i.pending_buf_size));)v(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),g(t),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexa&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),g(t),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexa&&(t.adler=s(t.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&g(t),i.pending+2<=i.pending_buf_size&&(v(i,255&t.adler),v(i,t.adler>>8&255),t.adler=0,i.status=h)):i.status=h),0!==i.pending){if(g(t),0===t.avail_out)return i.last_flush=-1,0}else if(0===t.avail_in&&p(e)<=p(r)&&4!==e)return d(t,-5);if(666===i.status&&0!==t.avail_in)return d(t,-5);if(0!==t.avail_in||0!==i.lookahead||0!==e&&666!==i.status){var _=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(b(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(y(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,a,s=t.window;;){if(t.lookahead<=c){if(b(t),t.lookahead<=c&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(y(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==_&&4!==_||(i.status=666),1===_||3===_)return 0===t.avail_out&&(i.last_flush=-1),0;if(2===_&&(1===e?o._tr_align(i):5!==e&&(o._tr_stored_block(i,0,0,!1),3===e&&(m(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),g(t),0===t.avail_out))return i.last_flush=-1,0}return 4!==e?0:i.wrap<=0?1:(2===i.wrap?(v(i,255&t.adler),v(i,t.adler>>8&255),v(i,t.adler>>16&255),v(i,t.adler>>24&255),v(i,255&t.total_in),v(i,t.total_in>>8&255),v(i,t.total_in>>16&255),v(i,t.total_in>>24&255)):(w(i,t.adler>>>16),w(i,65535&t.adler)),g(t),0=r.w_size&&(0===s&&(m(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new i.Buf8(r.w_size),i.arraySet(h,e,d-r.w_size,r.w_size,0),e=h,d=r.w_size),u=t.avail_in,c=t.next_in,l=t.input,t.avail_in=d,t.next_in=0,t.input=e,b(r);r.lookahead>=3;){for(n=r.strstart,o=r.lookahead-2;r.ins_h=(r.ins_h<>>=_=w>>>24,p-=_,0==(_=w>>>16&255))A[o++]=65535&w;else{if(!(16&_)){if(0==(64&_)){w=m[(65535&w)+(d&(1<<_)-1)];continue e}if(32&_){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}b=65535&w,(_&=15)&&(p<_&&(d+=S[n++]<>>=_,p-=_),p<15&&(d+=S[n++]<>>=_=w>>>24,p-=_,!(16&(_=w>>>16&255))){if(0==(64&_)){w=g[(65535&w)+(d&(1<<_)-1)];continue r}t.msg="invalid distance code",r.mode=30;break t}if(x=65535&w,p<(_&=15)&&(d+=S[n++]<>>=_,p-=_,(_=o-a)>3,d&=(1<<(p-=b<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function c(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function l(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):u}function h(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,l(t)):u}function d(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=a.wsize?(n.arraySet(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i<(o=a.wsize-a.wnext)&&(o=i),n.arraySet(a.window,e,r-i,o,a.wnext),(i-=o)?(n.arraySet(a.window,e,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=o(r.check,U,2,0),y=g=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&g)<<8)+(g>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&g)){t.msg="unknown compression method",r.mode=30;break}if(y-=4,I=8+(15&(g>>>=4)),0===r.wbits)r.wbits=I;else if(I>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(U[0]=255&g,U[1]=g>>>8&255,r.check=o(r.check,U,2,0)),y=g=0,r.mode=3;case 3:for(;y<32;){if(0===p)break t;p--,g+=c[h++]<>>8&255,U[2]=g>>>16&255,U[3]=g>>>24&255,r.check=o(r.check,U,4,0)),y=g=0,r.mode=4;case 4:for(;y<16;){if(0===p)break t;p--,g+=c[h++]<>8),512&r.flags&&(U[0]=255&g,U[1]=g>>>8&255,r.check=o(r.check,U,2,0)),y=g=0,r.mode=5;case 5:if(1024&r.flags){for(;y<16;){if(0===p)break t;p--,g+=c[h++]<>>8&255,r.check=o(r.check,U,2,0)),y=g=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(p<(x=r.length)&&(x=p),x&&(r.head&&(I=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,c,h,x,I)),512&r.flags&&(r.check=o(r.check,c,x,h)),p-=x,h+=x,r.length-=x),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===p)break t;for(x=0;I=c[h+x++],r.head&&I&&r.length<65536&&(r.head.name+=String.fromCharCode(I)),I&&x>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;y<32;){if(0===p)break t;p--,g+=c[h++]<>>=7&y,y-=7&y,r.mode=27;break}for(;y<3;){if(0===p)break t;p--,g+=c[h++]<>>=1)){case 0:r.mode=14;break;case 1:if(v(r),r.mode=20,6!==e)break;g>>>=2,y-=2;break t;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}g>>>=2,y-=2;break;case 14:for(g>>>=7&y,y-=7&y;y<32;){if(0===p)break t;p--,g+=c[h++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&g,y=g=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(x=r.length){if(p>>=5,y-=5,r.ndist=1+(31&g),g>>>=5,y-=5,r.ncode=4+(15&g),g>>>=4,y-=4,286>>=3,y-=3}for(;r.have<19;)r.lens[P[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,R={bits:r.lenbits},D=s(0,r.lens,0,19,r.lencode,0,r.work,R),r.lenbits=R.bits,D){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,N=65535&B,!((S=B>>>24)<=y);){if(0===p)break t;p--,g+=c[h++]<>>=S,y-=S,r.lens[r.have++]=N;else{if(16===N){for(z=S+2;y>>=S,y-=S,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}I=r.lens[r.have-1],x=3+(3&g),g>>>=2,y-=2}else if(17===N){for(z=S+3;y>>=S)),g>>>=3,y-=3}else{for(z=S+7;y>>=S)),g>>>=7,y-=7}if(r.have+x>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;x--;)r.lens[r.have++]=I}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,R={bits:r.lenbits},D=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,R),r.lenbits=R.bits,D){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,R={bits:r.distbits},D=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,R),r.distbits=R.bits,D){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(6<=p&&258<=m){t.next_out=d,t.avail_out=m,t.next_in=h,t.avail_in=p,r.hold=g,r.bits=y,a(t,b),d=t.next_out,l=t.output,m=t.avail_out,h=t.next_in,c=t.input,p=t.avail_in,g=r.hold,y=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;A=(B=r.lencode[g&(1<>>16&255,N=65535&B,!((S=B>>>24)<=y);){if(0===p)break t;p--,g+=c[h++]<>T)])>>>16&255,N=65535&B,!(T+(S=B>>>24)<=y);){if(0===p)break t;p--,g+=c[h++]<>>=T,y-=T,r.back+=T}if(g>>>=S,y-=S,r.back+=S,r.length=N,0===A){r.mode=26;break}if(32&A){r.back=-1,r.mode=12;break}if(64&A){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&A,r.mode=22;case 22:if(r.extra){for(z=r.extra;y>>=r.extra,y-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;A=(B=r.distcode[g&(1<>>16&255,N=65535&B,!((S=B>>>24)<=y);){if(0===p)break t;p--,g+=c[h++]<>T)])>>>16&255,N=65535&B,!(T+(S=B>>>24)<=y);){if(0===p)break t;p--,g+=c[h++]<>>=T,y-=T,r.back+=T}if(g>>>=S,y-=S,r.back+=S,64&A){t.msg="invalid distance code",r.mode=30;break}r.offset=N,r.extra=15&A,r.mode=24;case 24:if(r.extra){for(z=r.extra;y>>=r.extra,y-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===m)break t;if(x=b-m,r.offset>x){if((x=r.offset-x)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}k=x>r.wnext?(x-=r.wnext,r.wsize-x):r.wnext-x,x>r.length&&(x=r.length),E=r.window}else E=l,k=d-r.offset,x=r.length;for(mv?(_=P[F+l[E]],R[z+l[E]]):(_=96,0),d=1<>C)+(p-=d)]=w<<24|_<<16|b|0,0!==p;);for(d=1<>=1;if(0!==d?(D&=d-1,D+=d):D=0,E++,0==--B[k]){if(k===A)break;k=e[r+l[E]]}if(N>>7)]}function x(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function k(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<>>=1,r<<=1,0<--e;);return r>>>1}function A(t,e,r){var n,i,a=new Array(16),s=0;for(n=1;n<=o;n++)a[n]=s=s+r[n-1]<<1;for(i=0;i<=e;i++){var u=t[2*i+1];0!==u&&(t[2*i]=S(a[u]++,u))}}function N(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function T(t){8>1;1<=r;r--)O(t,a,r);for(i=f;r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],O(t,a,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,a[2*i]=a[2*r]+a[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,a[2*r+1]=a[2*n+1]=i,t.heap[1]=i++,O(t,a,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,a,s,u,f=e.dyn_tree,c=e.max_code,l=e.stat_desc.static_tree,h=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,m=e.stat_desc.max_length,g=0;for(a=0;a<=o;a++)t.bl_count[a]=0;for(f[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)m<(a=f[2*f[2*(n=t.heap[r])+1]+1]+1)&&(a=m,g++),f[2*n+1]=a,c>=7;n<30;n++)for(v[n]=i<<7,t=0;t<1<>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),D(t,t.l_desc),D(t,t.d_desc),a=function(t){var e;for(R(t,t.dyn_ltree,t.l_desc.max_code),R(t,t.dyn_dtree,t.d_desc.max_code),D(t,t.bl_desc),e=18;3<=e&&0===t.bl_tree[2*f[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?U(t,e,r,n):4===t.strategy||o===i?(k(t,2+(n?1:0),3),I(t,c,l)):(k(t,4+(n?1:0),3),function(t,e,r,n){var i;for(k(t,e-257,5),k(t,r-1,5),k(t,n-4,4),i=0;i>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(d[r]+256+1)]++,t.dyn_dtree[2*b(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){var e;k(t,2,3),E(t,256,c),16===(e=t).bi_valid?(x(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}},{"../utils/common":41}],53:[function(t,e,r){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,r){"use strict";e.exports="function"==typeof i?i:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}},{}]},{},[10])(10)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}).call(this,r(1),r(6).Buffer,r(10).setImmediate)},function(t,e,r){"use strict";(function(t){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var n=r(7),i=r(8),o=r(9);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return M(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return j(t).length;default:if(n)return M(t).length;e=(""+e).toLowerCase(),n=!0}}function m(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return C(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return N(this,e,r);case"latin1":case"binary":return T(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){var o,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function f(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var c=-1;for(o=r;os&&(r=s-u),o=r;o>=0;o--){for(var l=!0,h=0;hi&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function S(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:f>223?3:f>191?2:1;if(i+l<=r)switch(l){case 1:f<128&&(c=f);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&f)<<6|63&o)>127&&(c=u);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(u=(15&f)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:o=t[i+1],a=t[i+2],s=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&f)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,l=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=l}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(o,a),f=this.slice(n,i),c=t.slice(e,r),l=0;li)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":return b(this,t,e,r);case"latin1":case"binary":return x(this,t,e,r);case"base64":return k(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function N(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function D(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function R(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function z(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function B(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(t,e,r,n,o){return o||B(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function P(t,e,r,n,o){return o||B(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||I(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||I(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||I(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||I(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||I(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||I(t,e,this.length);for(var n=this[t],i=1,o=0;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||I(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||I(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||I(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||I(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||I(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||I(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||I(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||I(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||D(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||D(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||D(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||D(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||D(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):z(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||D(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):z(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);D(this,t,e,r,i-1,-i)}var o=0,a=1,s=0;for(this[e]=255&t;++o>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);D(this,t,e,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===s&&0!==this[e+o+1]&&(s=1),this[e+o]=(t/a>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||D(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||D(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):R(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||D(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):R(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||D(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):z(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||D(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):z(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return P(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function j(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(F,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Z(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(1))},function(t,e,r){"use strict";e.byteLength=function(t){var e=f(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=f(t),a=n[0],s=n[1],u=new o(function(t,e,r){return 3*(e+r)/4-r}(0,a,s)),c=0,l=s>0?a-4:a;for(r=0;r>16&255,u[c++]=e>>8&255,u[c++]=255&e;2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[c++]=255&e);1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],a=0,s=r-i;as?s:a+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,r){for(var i,o,a=[],s=e;s>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ e.read=function(t,e,r,n,i){var o,a,s=8*i-n-1,u=(1<>1,c=-7,l=r?i-1:0,h=r?-1:1,d=t[e+l];for(l+=h,o=d&(1<<-c)-1,d>>=-c,c+=s;c>0;o=256*o+t[e+l],l+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=n;c>0;a=256*a+t[e+l],l+=h,c-=8);if(0===o)o=1-f;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=f}return(d?-1:1)*a*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var a,s,u,f=8*o-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=c?(s=0,a=c):a+l>=1?(s=(e*u-1)*Math.pow(2,i),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<0;t[r+d]=255&a,d+=p,a/=256,f-=8);t[r+d-p]|=128*m}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){(function(t){var n=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r(11),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(1))},function(t,e,r){(function(t,e){!function(t,r){"use strict";if(!t.setImmediate){var n,i,o,a,s,u=1,f={},c=!1,l=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){p(t.data)},n=function(t){o.port2.postMessage(t)}):l&&"onreadystatechange"in l.createElement("script")?(i=l.documentElement,n=function(t){var e=l.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):n=function(t){setTimeout(p,0,t)}:(a="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&p(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),n=function(e){t.postMessage(a+e,"*")}),h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r=e+r||e?new java.lang.String(t,e,r)+"":t}function u(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}n.prototype.parseFromString=function(t,e){var r=this.options,n=new l,o=r.domBuilder||new i,s=r.errorHandler,u=r.locator,c=r.xmlns||{},h=/\/x?html?$/.test(e),d=h?f.entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return u&&o.setDocumentLocator(u),n.errorHandler=function(t,e,r){if(!t){if(e instanceof i)return e;t=e}var n={},o=t instanceof Function;function s(e){var i=t[e];!i&&o&&(i=2==t.length?function(r){t(e,r)}:t),n[e]=i&&function(t){i("[xmldom "+e+"]\t"+t+a(r))}||function(){}}return r=r||{},s("warning"),s("error"),s("fatalError"),n}(s,o,u),n.domBuilder=r.domBuilder||o,h&&(c[""]="http://www.w3.org/1999/xhtml"),c.xml=c.xml||"http://www.w3.org/XML/1998/namespace",t&&"string"==typeof t?n.parse(t,c,d):n.errorHandler.error("invalid doc source"),o.doc},i.prototype={startDocument:function(){this.doc=(new d).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(t,e,r,n){var i=this.doc,a=i.createElementNS(t,r||e),s=n.length;u(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var f=0;f",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}},function(t,e){var r=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,n=new RegExp("[\\-\\.0-9"+r.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),i=new RegExp("^"+r.source+n.source+"*(?::"+r.source+n.source+"*)?$");function o(t,e){this.message=t,this.locator=e,Error.captureStackTrace&&Error.captureStackTrace(this,o)}function a(){}function s(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function u(t,e,r,n,i,o){function a(t,e,n){t in r.attributeNames&&o.fatalError("Attribute "+t+" redefined"),r.addValue(t,e,n)}for(var s,u=++e,f=0;;){var c=t.charAt(u);switch(c){case"=":if(1===f)s=t.slice(e,u),f=3;else{if(2!==f)throw new Error("attribute equal must after attrName");f=3}break;case"'":case'"':if(3===f||1===f){if(1===f&&(o.warning('attribute value must after "="'),s=t.slice(e,u)),e=u+1,!((u=t.indexOf(c,e))>0))throw new Error("attribute value no end '"+c+"' match");a(s,l=t.slice(e,u).replace(/&#?\w+;/g,i),e-1),f=5}else{if(4!=f)throw new Error('attribute value must after "="');a(s,l=t.slice(e,u).replace(/&#?\w+;/g,i),e),o.warning('attribute "'+s+'" missed start quot('+c+")!!"),e=u+1,f=5}break;case"/":switch(f){case 0:r.setTagName(t.slice(e,u));case 5:case 6:case 7:f=7,r.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),0==f&&r.setTagName(t.slice(e,u)),u;case">":switch(f){case 0:r.setTagName(t.slice(e,u));case 5:case 6:case 7:break;case 4:case 1:"/"===(l=t.slice(e,u)).slice(-1)&&(r.closed=!0,l=l.slice(0,-1));case 2:2===f&&(l=s),4==f?(o.warning('attribute "'+l+'" missed quot(")!'),a(s,l.replace(/&#?\w+;/g,i),e)):("http://www.w3.org/1999/xhtml"===n[""]&&l.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+l+'" missed value!! "'+l+'" instead!!'),a(l,l,e));break;case 3:throw new Error("attribute value missed!!")}return u;case"€":c=" ";default:if(c<=" ")switch(f){case 0:r.setTagName(t.slice(e,u)),f=6;break;case 1:s=t.slice(e,u),f=2;break;case 4:var l=t.slice(e,u).replace(/&#?\w+;/g,i);o.warning('attribute "'+l+'" missed quot(")!!'),a(s,l,e);case 5:f=6}else switch(f){case 2:r.tagName;"http://www.w3.org/1999/xhtml"===n[""]&&s.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+s+'" missed value!! "'+s+'" instead2!!'),a(s,s,e),e=u,f=1;break;case 5:o.warning('attribute space is required"'+s+'"!!');case 6:f=1,e=u;break;case 3:f=4,e=u;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}u++}}function f(t,e,r){for(var n=t.tagName,i=null,o=t.length;o--;){var a=t[o],s=a.qName,u=a.value;if((d=s.indexOf(":"))>0)var f=a.prefix=s.slice(0,d),c=s.slice(d+1),l="xmlns"===f&&c;else c=s,f=null,l="xmlns"===s&&"";a.localName=c,!1!==l&&(null==i&&(i={},h(r,r={})),r[l]=i[l]=u,a.uri="http://www.w3.org/2000/xmlns/",e.startPrefixMapping(l,u))}for(o=t.length;o--;){(f=(a=t[o]).prefix)&&("xml"===f&&(a.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==f&&(a.uri=r[f||""]))}var d;(d=n.indexOf(":"))>0?(f=t.prefix=n.slice(0,d),c=t.localName=n.slice(d+1)):(f=null,c=t.localName=n);var p=t.uri=r[f||""];if(e.startElement(p,c,n,t),!t.closed)return t.currentNSMap=r,t.localNSMap=i,!0;if(e.endElement(p,c,n),i)for(f in i)e.endPrefixMapping(f)}function c(t,e,r,n,i){if(/^(?:script|textarea)$/i.test(r)){var o=t.indexOf("",e),a=t.substring(e+1,o);if(/[&<]/.test(a))return/^script$/i.test(r)?(i.characters(a,0,a.length),o):(a=a.replace(/&#?\w+;/g,n),i.characters(a,0,a.length),o)}return e+1}function l(t,e,r,n){var i=n[r];return null==i&&((i=t.lastIndexOf(""))e?(r.comment(t,e+4,i-e-4),i+3):(n.error("Unclosed comment"),-1):-1;default:if("CDATA["==t.substr(e+3,6)){var i=t.indexOf("]]>",e+9);return r.startCDATA(),r.characters(t,e+9,i-e-9),r.endCDATA(),i+3}var o=function(t,e){var r,n=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;i.lastIndex=e,i.exec(t);for(;r=i.exec(t);)if(n.push(r),r[1])return n}(t,e),a=o.length;if(a>1&&/!doctype/i.test(o[0][0])){var s=o[1][0],u=!1,f=!1;a>3&&(/^public$/i.test(o[2][0])?(u=o[3][0],f=a>4&&o[4][0]):/^system$/i.test(o[2][0])&&(f=o[3][0]));var c=o[a-1];return r.startDTD(s,u,f),r.endDTD(),c.index+c[0].length}}return-1}function p(t,e,r){var n=t.indexOf("?>",e);if(n){var i=t.substring(e,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return r.processingInstruction(i[1],i[2]),n+2}return-1}return-1}function m(){this.attributeNames={}}o.prototype=new Error,o.prototype.name=o.name,a.prototype={parse:function(t,e,r){var n=this.domBuilder;n.startDocument(),h(e,e={}),function(t,e,r,n,i){function a(t){var e=t.slice(1,-1);return e in r?r[e]:"#"===e.charAt(0)?function(t){if(t>65535){var e=55296+((t-=65536)>>10),r=56320+(1023&t);return String.fromCharCode(e,r)}return String.fromCharCode(t)}(parseInt(e.substr(1).replace("x","0x"))):(i.error("entity not found:"+t),t)}function h(e){if(e>k){var r=t.substring(k,e).replace(/&#?\w+;/g,a);_&&g(k),n.characters(r,0,e-k),k=e}}function g(e,r){for(;e>=v&&(r=w.exec(t));)y=r.index,v=y+r[0].length,_.lineNumber++;_.columnNumber=e-y+1}var y=0,v=0,w=/.*(?:\r\n?|\n)|.*$/g,_=n.locator,b=[{currentNSMap:e}],x={},k=0;for(;;){try{var E=t.indexOf("<",k);if(E<0){if(!t.substr(k).match(/^\s*$/)){var S=n.doc,A=S.createTextNode(t.substr(k));S.appendChild(A),n.currentElement=A}return}switch(E>k&&h(E),t.charAt(E+1)){case"/":var N=t.indexOf(">",E+3),T=t.substring(E+2,N),C=b.pop();N<0?(T=t.substring(E+2).replace(/[\s<].*/,""),i.error("end tag name: "+T+" is not complete:"+C.tagName),N=E+1+T.length):T.match(/\sk?k=N:h(Math.max(E,k)+1)}}(t,e,r,n,this.errorHandler),n.endDocument()}},m.prototype={setTagName:function(t){if(!i.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},addValue:function(t,e,r){if(!i.test(t))throw new Error("invalid attribute:"+t);this.attributeNames[t]=this.length,this[this.length++]={qName:t,value:e,offset:r}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}},e.XMLReader=a,e.ParseError=o},function(t,e,r){"use strict";r.r(e),r.d(e,"toKml",(function(){return p})),r.d(e,"toGeoJSON",(function(){return v}));var n=r(5),i=r(0);function o(t,e){return''+d("kml",d("Document",function(t){return void 0!==t.documentName?d("name",t.documentName):""}(e=e||{documentName:void 0,documentDescription:void 0,name:"name",description:"description",simplestyle:!1,timestamp:"timestamp"})+function(t){return void 0!==t.documentDescription?d("description",t.documentDescription):""}(e)+function(t,e){if(!t.type)return"";var r=[];switch(t.type){case"FeatureCollection":return t.features?t.features.map(a(e,r)).join(""):"";case"Feature":return a(e,r)(t);default:return a(e,r)({type:"Feature",geometry:t,properties:{}})}}(t,e)),[["xmlns","http://www.opengis.net/kml/2.2"]])}function a(t,e){return function(r){if(!r.properties||!s.valid(r.geometry))return"";var n=s.any(r.geometry);if(!n)return"";var i="",o="";if(t.simplestyle){var a=function(t){var e="";t["marker-symbol"]&&(e=e+"ms"+t["marker-symbol"]);t["marker-color"]&&(e=e+"mc"+t["marker-color"].replace("#",""));t["marker-size"]&&(e=e+"ms"+t["marker-size"]);t.stroke&&(e=e+"s"+t.stroke.replace("#",""));t["stroke-width"]&&(e=e+"sw"+t["stroke-width"].toString().replace(".",""));t["stroke-opacity"]&&(e=e+"mo"+t["stroke-opacity"].toString().replace(".",""));t.fill&&(e=e+"f"+t.fill.replace("#",""));t["fill-opacity"]&&(e=e+"fo"+t["fill-opacity"].toString().replace(".",""));return e}(r.properties);a&&(s.isPoint(r.geometry)&&function(t){return!!(t["marker-size"]||t["marker-symbol"]||t["marker-color"])}(r.properties)?(-1===e.indexOf(a)&&(i=function(t,e){return d("Style",d("IconStyle",d("Icon",d("href",function(t){return t["marker-symbol"]}(t))))+d("hotSpot","",[["xunits","fraction"],["yunits","fraction"],["x",.5],["y",.5]]),[["id",e]])}(r.properties,a),e.push(a)),o=d("styleUrl","#"+a)):(s.isPolygon(r.geometry)||s.isLine(r.geometry))&&function(t){for(var e in t)if({stroke:!0,"stroke-opacity":!0,"stroke-width":!0,fill:!0,"fill-opacity":!0}[e])return!0}(r.properties)&&(-1===e.indexOf(a)&&(i=function(t,e){var r=d("LineStyle",[d("color",f(t.stroke,t["stroke-opacity"])||"ff555555")+d("width",void 0===t["stroke-width"]?2:t["stroke-width"])]),n="";(t.fill||t["fill-opacity"])&&(n=d("PolyStyle",[d("color",f(t.fill,t["fill-opacity"])||"88555555")]));return d("Style",r+n,[["id",e]])}(r.properties,a),e.push(a)),o=d("styleUrl","#"+a)))}return i+d("Placemark",function(t,e){return t[e.name]?d("name",c(t[e.name])):""}(r.properties,t)+function(t,e){return t[e.description]?d("description",c(t[e.description])):""}(r.properties,t)+function(t){var e=[];for(var r in t){var n=t[r];i=n,"[object Object]"===Object.prototype.toString.call(i)?e.push('').concat(JSON.stringify(n),"")):e.push('').concat(n,""))}var i;return d("ExtendedData",e.join(""))}(r.properties)+function(t,e){return t[e.timestamp]?d("TimeStamp",d("when",c(t[e.timestamp]))):""}(r.properties,t)+n+o)}}var s={Point:function(t){return d("Point",d("coordinates",t.coordinates.join(",")))},LineString:function(t){return d("LineString",d("coordinates",u(t.coordinates)))},Polygon:function(t){if(!t.coordinates.length)return"";var e=t.coordinates[0],r=t.coordinates.slice(1),n=d("outerBoundaryIs",d("LinearRing",d("coordinates",u(e)))),i=r.map((function(t){return d("innerBoundaryIs",d("LinearRing",d("coordinates",u(t))))})).join("");return d("Polygon",n+i)},MultiPoint:function(t){return t.coordinates.length?d("MultiGeometry",t.coordinates.map((function(t){return s.Point({coordinates:t})})).join("")):""},MultiPolygon:function(t){return t.coordinates.length?d("MultiGeometry",t.coordinates.map((function(t){return s.Polygon({coordinates:t})})).join("")):""},MultiLineString:function(t){return t.coordinates.length?d("MultiGeometry",t.coordinates.map((function(t){return s.LineString({coordinates:t})})).join("")):""},GeometryCollection:function(t){return d("MultiGeometry",t.geometries.map(s.any).join(""))},valid:function(t){return t&&t.type&&(t.coordinates||"GeometryCollection"===t.type&&t.geometries&&t.geometries.every(s.valid))},any:function(t){return s[t.type]?s[t.type](t):""},isPoint:function(t){return"Point"===t.type||"MultiPoint"===t.type},isPolygon:function(t){return"Polygon"===t.type||"MultiPolygon"===t.type},isLine:function(t){return"LineString"===t.type||"MultiLineString"===t.type}};function u(t){return t.map((function(t){return t.join(",")})).join(" ")}function f(t,e){if("string"!=typeof t)return"";if(3===(t=t.replace("#","").toLowerCase()).length)t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2];else if(6!==t.length)return"";var r=t[0]+t[1],n=t[2]+t[3],i=t[4]+t[5],o="ff";return"number"==typeof e&&e>=0&&e<=1&&((o=(255*e).toString(16)).indexOf(".")>-1&&(o=o.substr(0,o.indexOf("."))),o.length<2&&(o="0"+o)),o+i+n+r}function c(t){return t?t.toString().replace(/&/g,"&").replace(//g,">").replace(/"/g,"""):""}function l(t){return Object.keys(t).length?" "+Object.keys(t).map((function(e){return e+'="'+function(t,e){var r;if(null==t)return;return e=(e||"").replace(/[^&"<>\']/g,""),r="([&\"<>'])".replace(new RegExp("["+e+"]","g"),""),t.replace(new RegExp(r,"g"),(function(t,e){return h[e]}))}(t[e])+'"'})).join(" "):""}var h={">":">","<":"<","'":"'",'"':""","&":"&"};function d(t,e,r){return(Array.isArray(e)||"string"==typeof e)&&(r=e,e={}),Array.isArray(r)&&(r="\n"+r.map((function(t){return" "+t})).join("\n")+"\n"),"<"+t+l(e)+">"+r+""}function p(t,e){return t.features&&t.features.forEach((function(t){if(t.properties){var e=t.properties.style;if(e){if(e.image)return t.properties["marker-symbol"]=e.image,void(e.outlineColor&&(t.properties["marker-color"]=e.outlineColor));var r,n,i;if(e.color&&(t.properties.fill=e.color,e.opacity&&(t.properties["fill-opacity"]=e.opacity)),e.outlineColor)t.properties.stroke=e.outlineColor,t.properties["stroke-width"]=null!==(r=e.outlineWidth)&&void 0!==r?r:1,t.properties["stroke-opacity"]=null!==(n=null!==(i=e.outlineOpacity)&&void 0!==i?i:e.opacity)&&void 0!==n?n:1}}})),o(t,e)}var m=function(t){return(new DOMParser).parseFromString(t,"text/xml")},g=function(t){return t.split(".").pop()},y=function(t){return(new n).loadAsync(t).then((function(t){var e=null;return t.forEach((function(t,r){"kml"===g(t)&&null===e&&(e=r.async("string").then(m))})),e||Promise.reject("No kml file found")}))};function v(t){if(!t)return Promise.reject("参数不能为空");if("string"==typeof(o=t)&&o.constructor==String){var e=g(t);if("kml"===e)return Cesium.Resource.fetchXML(t).then((function(t){return Object(i.a)(t)}));if("kmz"===e)return Cesium.Resource.fetchBlob(t).then((function(t){return y(t)})).then((function(t){return Object(i.a)(t)}));var r=Object(i.a)(m(t));return Promise.resolve(r)}if(t.getRootNode){var n=Object(i.a)(t);return Promise.resolve(n)}return y(t).then((function(t){return Object(i.a)(t)}));var o}}])}));