@werk/cli
Version:
werk-cli 脚手架
1 lines • 328 kB
JavaScript
import{c as e,m as t,a as n,f as i,u as o,b as a,d as c,e as f,V as d,g as u,i as h,h as l,j as p,k as b,l as m,n as y,S as g,o as v,p as w,q as _}from"./index.js";export{r as input,s as select}from"./index.js";import{AsyncResource as S}from"node:async_hooks";import x from"node:fs";import E from"node:util";import B from"node:child_process";import C from"node:buffer";import k from"node:string_decoder";import O from"node:stream";import I from"node:path";import A from"node:crypto";import"commander";import"node:os";import"node:tty";import"node:constants";import"node:assert";import"node:events";import"node:process";import"node:readline";import"node:http";import"node:https";import"node:url";import"node:zlib";const T={icon:{checked:n.green(i.circleFilled),unchecked:i.circle,cursor:i.pointer},style:{disabledChoice:e=>n.dim(`- ${e}`),renderSelectedChoices:e=>e.map((e=>e.short)).join(", "),description:e=>n.cyan(e)},helpMode:"auto"};function j(e){return!g.isSeparator(e)&&!e.disabled}function $(e){return j(e)&&Boolean(e.checked)}function M(e){return j(e)?{...e,checked:!e.checked}:e}var L,N,F,R,U=e(((e,n)=>{const{instructions:r,pageSize:i=7,loop:s=!0,required:w,validate:_=()=>!0}=e,S={all:"a",invert:"i",...e.shortcuts},x=t(T,e.theme),E=o(!0),[B,C]=a("idle"),k=c({status:B,theme:x}),[O,I]=a(e.choices.map((e=>{if(g.isSeparator(e))return e;if("string"==typeof e)return{value:e,name:e,short:e,disabled:!1,checked:!1};const t=e.name??String(e.value),n={value:e.value,name:t,short:e.short??t,disabled:e.disabled??!1,checked:e.checked??!1};return e.description&&(n.description=e.description),n})));const A=f((()=>{const e=O.findIndex(j),t=O.findLastIndex(j);if(-1===e)throw new d("[checkbox prompt] No selectable choices. All choices are disabled.");return{first:e,last:t}}),[O]),[L,N]=a(A.first),[F,R]=a(!0),[U,P]=a();u((async e=>{if(h(e)){const e=O.filter($),t=await _([...e]);w&&!O.some($)?P("At least one choice must be selected"):!0===t?(C("done"),n(e.map((e=>e.value)))):P(t||"You must select a valid value")}else if(l(e)||p(e)){if(s||l(e)&&L!==A.first||p(e)&&L!==A.last){const t=l(e)?-1:1;let n=L;do{n=(n+t+O.length)%O.length}while(!j(O[n]));N(n)}}else if(b(e))P(void 0),R(!1),I(O.map(((e,t)=>t===L?M(e):e)));else if(e.name===S.all){const e=O.some((e=>j(e)&&!e.checked));I(O.map((t=e,function(e){return j(e)?{...e,checked:t}:e})))}else if(e.name===S.invert)I(O.map(M));else if(m(e)){const t=Number(e.name)-1,n=O[t];null!=n&&j(n)&&(N(t),I(O.map(((e,n)=>n===t?M(e):e))))}var t}));const D=x.style.message(e.message,B);let q;const V=y({items:O,active:L,renderItem({item:e,isActive:t}){if(g.isSeparator(e))return` ${e.separator}`;if(e.disabled){const t="string"==typeof e.disabled?e.disabled:"(disabled)";return x.style.disabledChoice(`${e.name} ${t}`)}t&&(q=e.description);const n=e.checked?x.icon.checked:x.icon.unchecked;return(t?x.style.highlight:e=>e)(`${t?x.icon.cursor:" "}${n} ${e.name}`)},pageSize:i,loop:s});if("done"===B){const e=O.filter($);return`${k} ${D} ${x.style.answer(x.style.renderSelectedChoices(e,O))}`}let z="",W="";if("always"===x.helpMode||"auto"===x.helpMode&&F&&(void 0===r||r)){if("string"==typeof r)z=r;else{z=` (Press ${[`${x.style.key("space")} to select`,S.all?`${x.style.key(S.all)} to toggle all`:"",S.invert?`${x.style.key(S.invert)} to invert selection`:"",`and ${x.style.key("enter")} to proceed`].filter((e=>""!==e)).join(", ")})`}O.length>i&&("always"===x.helpMode||"auto"===x.helpMode&&E.current)&&(W=`\n${x.style.help("(Use arrow keys to reveal more choices)")}`,E.current=!1)}const X=q?`\n${x.style.description(q)}`:"";let K="";return U&&(K=`\n${x.style.error(U)}`),`${k} ${D}${z}\n${V}${W}${X}${K}${v.cursorHide}`})),P={},D={};function q(){return N?L:(N=1,L=function(e,t,n,r,i){this.confidence=n,this.name=r||t.name(e),this.lang=i})}function V(){if(R)return F;R=1;var e=q();return F=function(){this.name=function(){return"UTF-8"},this.match=function(t){var n,r=!1,i=0,o=0,a=t.fRawInput,s=0;t.fRawLength>=3&&239==(255&a[0])&&187==(255&a[1])&&191==(255&a[2])&&(r=!0);for(var c=0;c<t.fRawLength;c++){var f=a[c];if(128&f){if(192==(224&f))s=1;else if(224==(240&f))s=2;else if(240==(248&f))s=3;else{if(++o>5)break;s=0}for(;!(++c>=t.fRawLength);){if(128!=(192&a[c])){o++;break}if(0==--s){i++;break}}}}if(n=0,r&&0==o)n=100;else if(r&&i>10*o)n=80;else if(i>3&&0==o)n=100;else if(i>0&&0==o)n=80;else if(0==i&&0==o)n=10;else{if(!(i>10*o))return null;n=25}return new e(t,this,n)}}}var z,W={exports:{}};function X(){return z||(z=1,function(e){var t=E,n=q();function r(){}e.exports.UTF_16BE=function(){this.name=function(){return"UTF-16BE"},this.match=function(e){var t=e.fRawInput;return t.length>=2&&254==(255&t[0])&&!(255&~t[1])?new n(e,this,100):null}},e.exports.UTF_16LE=function(){this.name=function(){return"UTF-16LE"},this.match=function(e){var t=e.fRawInput;return t.length>=2&&!(255&~t[0])&&254==(255&t[1])?t.length>=4&&0==t[2]&&0==t[3]?null:new n(e,this,100):null}},r.prototype.match=function(e){var t=e.fRawInput,r=e.fRawLength/4*4,i=0,o=0,a=!1,s=0;if(0==r)return null;65279==this.getChar(t,0)&&(a=!0);for(var c=0;c<r;c+=4){var f=this.getChar(t,c);f<0||f>=1114111||f>=55296&&f<=57343?o+=1:i+=1}return a&&0==o?s=100:a&&i>10*o?s=80:i>3&&0==o?s=100:i>0&&0==o?s=80:i>10*o&&(s=25),0==s?null:new n(e,this,s)},e.exports.UTF_32BE=function(){this.name=function(){return"UTF-32BE"},this.getChar=function(e,t){return(255&e[t+0])<<24|(255&e[t+1])<<16|(255&e[t+2])<<8|255&e[t+3]}},t.inherits(e.exports.UTF_32BE,r),e.exports.UTF_32LE=function(){this.name=function(){return"UTF-32LE"},this.getChar=function(e,t){return(255&e[t+3])<<24|(255&e[t+2])<<16|(255&e[t+1])<<8|255&e[t+0]}},t.inherits(e.exports.UTF_32LE,r)}(W)),W.exports}var K,G={exports:{}};function Y(){return K||(K=1,function(e){var t=E,n=q();function r(){this.charValue=0,this.index=0,this.nextIndex=0,this.error=!1,this.done=!1,this.reset=function(){this.charValue=0,this.index=-1,this.nextIndex=0,this.error=!1,this.done=!1},this.nextByte=function(e){return this.nextIndex>=e.fRawLength?(this.done=!0,-1):255&e.fRawInput[this.nextIndex++]}}function i(){}function o(e,t){e.index=e.nextIndex,e.error=!1;var n=0,r=0,i=0;return(n=e.charValue=e.nextByte(t))<0?e.done=!0:n<=141||(r=e.nextByte(t),e.charValue=e.charValue<<8|r,n>=161&&n<=254?r<161&&(e.error=!0):142!=n?143==n&&(i=e.nextByte(t),e.charValue=e.charValue<<8|i,i<161&&(e.error=!0)):r<161&&(e.error=!0)),0==e.done}i.prototype.match=function(e){var t,i=0,o=0,a=0,s=0,c=0,f=new r;e:{for(f.reset();this.nextChar(f,e);){if(s++,f.error)a++;else{var d=4294967295&f.charValue;d<=255||(i++,null!=this.commonChars&&function e(t,n,r,i){if(i<r)return-1;var o=Math.floor(r+i>>>1);return n>t[o]?e(t,n,o+1,i):n<t[o]?e(t,n,r,o-1):o}(t=this.commonChars,d,0,t.length-1)>=0&&o++)}if(a>=2&&5*a>=i)break e}if(i<=10&&0==a)c=0==i&&s<10?0:10;else if(i<20*a)c=0;else if(null==this.commonChars)(c=30+i-20*a)>100&&(c=100);else{var u=90/Math.log(parseFloat(i)/4);c=Math.floor(Math.log(o+1)*u+10),c=Math.min(c,100)}}return 0==c?null:new n(e,this,c)},i.prototype.nextChar=function(e,t){},e.exports.sjis=function(){this.name=function(){return"Shift-JIS"},this.language=function(){return"ja"},this.commonChars=[33088,33089,33090,33093,33115,33129,33130,33141,33142,33440,33442,33444,33449,33450,33451,33453,33455,33457,33459,33461,33463,33469,33470,33473,33476,33477,33478,33480,33481,33484,33485,33500,33504,33511,33512,33513,33514,33520,33521,33601,33603,33614,33615,33624,33630,33634,33639,33653,33654,33673,33674,33675,33677,33683,36502,37882,38314],this.nextChar=function(e,t){var n;if(e.index=e.nextIndex,e.error=!1,(n=e.charValue=e.nextByte(t))<0)return!1;if(n<=127||n>160&&n<=223)return!0;var r=e.nextByte(t);return!(r<0)&&(e.charValue=n<<8|r,r>=64&&r<=127||r>=128&&r<=255||(e.error=!0),!0)}},t.inherits(e.exports.sjis,i),e.exports.big5=function(){this.name=function(){return"Big5"},this.language=function(){return"zh"},this.commonChars=[41280,41281,41282,41283,41287,41289,41333,41334,42048,42054,42055,42056,42065,42068,42071,42084,42090,42092,42103,42147,42148,42151,42177,42190,42193,42207,42216,42237,42304,42312,42328,42345,42445,42471,42583,42593,42594,42600,42608,42664,42675,42681,42707,42715,42726,42738,42816,42833,42841,42970,43171,43173,43181,43217,43219,43236,43260,43456,43474,43507,43627,43706,43710,43724,43772,44103,44111,44208,44242,44377,44745,45024,45290,45423,45747,45764,45935,46156,46158,46412,46501,46525,46544,46552,46705,47085,47207,47428,47832,47940,48033,48593,49860,50105,50240,50271],this.nextChar=function(e,t){e.index=e.nextIndex,e.error=!1;var n=e.charValue=e.nextByte(t);if(n<0)return!1;if(n<=127||255==n)return!0;var r=e.nextByte(t);return!(r<0)&&(e.charValue=e.charValue<<8|r,(r<64||127==r||255==r)&&(e.error=!0),!0)}},t.inherits(e.exports.big5,i),e.exports.euc_jp=function(){this.name=function(){return"EUC-JP"},this.language=function(){return"ja"},this.commonChars=[41377,41378,41379,41382,41404,41418,41419,41430,41431,42146,42148,42150,42152,42154,42155,42156,42157,42159,42161,42163,42165,42167,42169,42171,42173,42175,42176,42177,42179,42180,42182,42183,42184,42185,42186,42187,42190,42191,42192,42206,42207,42209,42210,42212,42216,42217,42218,42219,42220,42223,42226,42227,42402,42403,42404,42406,42407,42410,42413,42415,42416,42419,42421,42423,42424,42425,42431,42435,42438,42439,42440,42441,42443,42448,42453,42454,42455,42462,42464,42465,42469,42473,42474,42475,42476,42477,42483,47273,47572,47854,48072,48880,49079,50410,50940,51133,51896,51955,52188,52689],this.nextChar=o},t.inherits(e.exports.euc_jp,i),e.exports.euc_kr=function(){this.name=function(){return"EUC-KR"},this.language=function(){return"ko"},this.commonChars=[45217,45235,45253,45261,45268,45286,45293,45304,45306,45308,45496,45497,45511,45527,45538,45994,46011,46274,46287,46297,46315,46501,46517,46527,46535,46569,46835,47023,47042,47054,47270,47278,47286,47288,47291,47337,47531,47534,47564,47566,47613,47800,47822,47824,47857,48103,48115,48125,48301,48314,48338,48374,48570,48576,48579,48581,48838,48840,48863,48878,48888,48890,49057,49065,49088,49124,49131,49132,49144,49319,49327,49336,49338,49339,49341,49351,49356,49358,49359,49366,49370,49381,49403,49404,49572,49574,49590,49622,49631,49654,49656,50337,50637,50862,51151,51153,51154,51160,51173,51373],this.nextChar=o},t.inherits(e.exports.euc_kr,i),e.exports.gb_18030=function(){this.name=function(){return"GB18030"},this.language=function(){return"zh"},this.nextChar=function(e,t){e.index=e.nextIndex,e.error=!1;var n=0,r=0,i=0,o=0;e:if((n=e.charValue=e.nextByte(t))<0)e.done=!0;else if(!(n<=128))if(r=e.nextByte(t),e.charValue=e.charValue<<8|r,n>=129&&n<=254){if(r>=64&&r<=126||r>=80&&r<=254)break e;if(r>=48&&r<=57&&(i=e.nextByte(t))>=129&&i<=254&&(o=e.nextByte(t))>=48&&o<=57){e.charValue=e.charValue<<16|i<<8|o;break e}e.error=!0}else;return 0==e.done},this.commonChars=[41377,41378,41379,41380,41392,41393,41457,41459,41889,41900,41914,45480,45496,45502,45755,46025,46070,46323,46525,46532,46563,46767,46804,46816,47010,47016,47037,47062,47069,47284,47327,47350,47531,47561,47576,47610,47613,47821,48039,48086,48097,48122,48316,48347,48382,48588,48845,48861,49076,49094,49097,49332,49389,49611,49883,50119,50396,50410,50636,50935,51192,51371,51403,51413,51431,51663,51706,51889,51893,51911,51920,51926,51957,51965,52460,52728,52906,52932,52946,52965,53173,53186,53206,53442,53445,53456,53460,53671,53930,53938,53941,53947,53972,54211,54224,54269,54466,54490,54754,54992]},t.inherits(e.exports.gb_18030,i)}(G)),G.exports}var J,H={exports:{}};function Z(){return J||(J=1,function(e){var t=E,n=q();function r(e,t){this.byteIndex=0,this.ngram=0,this.ngramList=e,this.byteMap=t,this.ngramCount=0,this.hitCount=0,this.spaceChar,this.search=function(e,t){var n=0;return e[n+32]<=t&&(n+=32),e[n+16]<=t&&(n+=16),e[n+8]<=t&&(n+=8),e[n+4]<=t&&(n+=4),e[n+2]<=t&&(n+=2),e[n+1]<=t&&(n+=1),e[n]>t&&(n-=1),n<0||e[n]!=t?-1:n},this.lookup=function(e){this.ngramCount+=1,this.search(this.ngramList,e)>=0&&(this.hitCount+=1)},this.addByte=function(e){this.ngram=(this.ngram<<8)+(255&e)&16777215,this.lookup(this.ngram)},this.nextByte=function(e){return this.byteIndex>=e.fInputLen?-1:255&e.fInputBytes[this.byteIndex++]},this.parse=function(e,t){var n,r=!1;for(this.spaceChar=t;(n=this.nextByte(e))>=0;){var i=this.byteMap[n];0!=i&&(i==this.spaceChar&&r||this.addByte(i),r=i==this.spaceChar)}this.addByte(this.spaceChar);var o=this.hitCount/this.ngramCount;return o>.33?98:Math.floor(300*o)}}function i(e,t){this.fLang=e,this.fNGrams=t}function o(){}o.prototype.spaceChar=32,o.prototype.ngrams=function(){},o.prototype.byteMap=function(){},o.prototype.match=function(e){var t=this.ngrams();if(!(Array.isArray(t)&&t[0]instanceof i))return(c=new r(t,this.byteMap()).parse(e,this.spaceChar))<=0?null:new n(e,this,c);for(var o=-1,a=null,s=t.length-1;s>=0;s--){var c,f=t[s];(c=new r(f.fNGrams,this.byteMap()).parse(e,this.spaceChar))>o&&(o=c,a=f.fLang)}var d=this.name(e);return o<=0?null:new n(e,this,o,d,a)},e.exports.ISO_8859_1=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,170,32,32,32,32,32,32,32,32,32,32,181,32,32,32,32,186,32,32,32,32,32,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,253,254,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,253,254,255]},this.ngrams=function(){return[new i("da",[2122086,2122100,2122853,2123118,2123122,2123375,2123873,2124064,2125157,2125671,2126053,2126697,2126708,2126953,2127465,6383136,6385184,6385252,6386208,6386720,6579488,6579566,6579570,6579572,6627443,6644768,6644837,6647328,6647396,6648352,6648421,6648608,6648864,6713202,6776096,6776174,6776178,6907749,6908960,6909543,7038240,7039845,7103858,7104871,7105637,7169380,7234661,7234848,7235360,7235429,7300896,7302432,7303712,7398688,7479396,7479397,7479411,7496992,7566437,7610483,7628064,7628146,7629164,7759218]),new i("de",[2122094,2122101,2122341,2122849,2122853,2122857,2123113,2123621,2123873,2124142,2125161,2126691,2126693,2127214,2127461,2127471,2127717,2128501,6448498,6514720,6514789,6514804,6578547,6579566,6579570,6580581,6627428,6627443,6646126,6646132,6647328,6648352,6648608,6776174,6841710,6845472,6906728,6907168,6909472,6909541,6911008,7104867,7105637,7217249,7217252,7217267,7234592,7234661,7234848,7235360,7235429,7238757,7479396,7496805,7497065,7562088,7566437,7610468,7628064,7628142,7628146,7695972,7695975,7759218]),new i("en",[2122016,2122094,2122341,2122607,2123375,2123873,2123877,2124142,2125153,2125670,2125938,2126437,2126689,2126708,2126952,2126959,2127720,6383972,6384672,6385184,6385252,6386464,6386720,6386789,6386793,6561889,6561908,6627425,6627443,6627444,6644768,6647412,6648352,6648608,6713202,6840692,6841632,6841714,6906912,6909472,6909543,6909806,6910752,7217249,7217268,7234592,7235360,7238688,7300640,7302688,7303712,7496992,7500576,7544929,7544948,7561577,7566368,7610484,7628146,7628897,7628901,7629167,7630624,7631648]),new i("es",[2122016,2122593,2122607,2122853,2123116,2123118,2123123,2124142,2124897,2124911,2125921,2125935,2125938,2126197,2126437,2126693,2127214,2128160,6365283,6365284,6365285,6365292,6365296,6382441,6382703,6384672,6386208,6386464,6515187,6516590,6579488,6579564,6582048,6627428,6627429,6627436,6646816,6647328,6647412,6648608,6648692,6907246,6943598,7102752,7106419,7217253,7238757,7282788,7282789,7302688,7303712,7303968,7364978,7435621,7495968,7497075,7544932,7544933,7544944,7562528,7628064,7630624,7693600,15953440]),new i("fr",[2122101,2122607,2122849,2122853,2122869,2123118,2123124,2124897,2124901,2125921,2125935,2125938,2126197,2126693,2126703,2127214,2154528,6385268,6386793,6513952,6516590,6579488,6579571,6583584,6627425,6627427,6627428,6627429,6627436,6627440,6627443,6647328,6647412,6648352,6648608,6648864,6649202,6909806,6910752,6911008,7102752,7103776,7103859,7169390,7217252,7234848,7238432,7238688,7302688,7302772,7304562,7435621,7479404,7496992,7544929,7544932,7544933,7544940,7544944,7610468,7628064,7629167,7693600,7696928]),new i("it",[2122092,2122600,2122607,2122853,2122857,2123040,2124140,2124142,2124897,2125925,2125938,2127214,6365283,6365284,6365296,6365299,6386799,6514789,6516590,6579564,6580512,6627425,6627427,6627428,6627433,6627436,6627440,6627443,6646816,6646892,6647412,6648352,6841632,6889569,6889571,6889572,6889587,6906144,6908960,6909472,6909806,7102752,7103776,7104800,7105633,7234848,7235872,7237408,7238757,7282785,7282788,7282793,7282803,7302688,7302757,7366002,7495968,7496992,7563552,7627040,7628064,7629088,7630624,8022383]),new i("nl",[2122092,2122341,2122849,2122853,2122857,2123109,2123118,2123621,2123877,2124142,2125153,2125157,2125680,2126949,2127457,2127461,2127471,2127717,2128489,6381934,6381938,6385184,6385252,6386208,6386720,6514804,6579488,6579566,6579570,6627426,6627446,6645102,6645106,6647328,6648352,6648435,6648864,6776174,6841716,6907168,6909472,6909543,6910752,7217250,7217252,7217253,7217256,7217263,7217270,7234661,7235360,7302756,7303026,7303200,7303712,7562088,7566437,7610468,7628064,7628142,7628146,7758190,7759218,7761775]),new i("no",[2122100,2122102,2122853,2123118,2123122,2123375,2123873,2124064,2125157,2125671,2126053,2126693,2126699,2126703,2126708,2126953,2127465,2155808,6385252,6386208,6386720,6579488,6579566,6579572,6627443,6644768,6647328,6647397,6648352,6648421,6648864,6648948,6713202,6776174,6908779,6908960,6909543,7038240,7039845,7103776,7105637,7169380,7169390,7217267,7234848,7235360,7235429,7237221,7300896,7302432,7303712,7398688,7479411,7496992,7565165,7566437,7610483,7628064,7628142,7628146,7629164,7631904,7631973,7759218]),new i("pt",[2122016,2122607,2122849,2122853,2122863,2123040,2123123,2125153,2125423,2125600,2125921,2125935,2125938,2126197,2126437,2126693,2127213,6365281,6365283,6365284,6365296,6382693,6382703,6384672,6386208,6386273,6386464,6516589,6516590,6578464,6579488,6582048,6582131,6627425,6627428,6647072,6647412,6648608,6648692,6906144,6906721,7169390,7238757,7238767,7282785,7282787,7282788,7282789,7282800,7303968,7364978,7435621,7495968,7497075,7544929,7544932,7544933,7544944,7566433,7628064,7630624,7693600,14905120,15197039]),new i("sv",[2122100,2122102,2122853,2123118,2123510,2123873,2124064,2124142,2124655,2125157,2125667,2126053,2126699,2126703,2126708,2126953,2127457,2127465,2155634,6382693,6385184,6385252,6386208,6386804,6514720,6579488,6579566,6579570,6579572,6644768,6647328,6648352,6648864,6747762,6776174,6909036,6909543,7037216,7105568,7169380,7217267,7233824,7234661,7235360,7235429,7235950,7299944,7302432,7302688,7398688,7479393,7479411,7495968,7564129,7565165,7610483,7627040,7628064,7628146,7629164,7631904,7758194,14971424,16151072])]},this.name=function(e){return e&&e.fC1Bytes?"windows-1252":"ISO-8859-1"}},t.inherits(e.exports.ISO_8859_1,o),e.exports.ISO_8859_2=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,177,32,179,32,181,182,32,32,185,186,187,188,32,190,191,32,177,32,179,32,181,182,183,32,185,186,187,188,32,190,191,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,253,254,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,253,254,32]},this.ngrams=function(){return[new i("cs",[2122016,2122361,2122863,2124389,2125409,2125413,2125600,2125668,2125935,2125938,2126072,2126447,2126693,2126703,2126708,2126959,2127392,2127481,2128481,6365296,6513952,6514720,6627440,6627443,6627446,6647072,6647533,6844192,6844260,6910836,6972704,7042149,7103776,7104800,7233824,7268640,7269408,7269664,7282800,7300206,7301737,7304052,7304480,7304801,7368548,7368554,7369327,7403621,7562528,7565173,7566433,7566441,7566446,7628146,7630573,7630624,7676016,12477728,14773997,15296623,15540336,15540339,15559968,16278884]),new i("hu",[2122016,2122106,2122341,2123111,2123116,2123365,2123873,2123887,2124147,2124645,2124649,2124790,2124901,2125153,2125157,2125161,2125413,2126714,2126949,2156915,6365281,6365291,6365293,6365299,6384416,6385184,6388256,6447470,6448494,6645625,6646560,6646816,6646885,6647072,6647328,6648421,6648864,6648933,6648948,6781216,6844263,6909556,6910752,7020641,7075450,7169383,7170414,7217249,7233899,7234923,7234925,7238688,7300985,7544929,7567973,7567988,7568097,7596391,7610465,7631904,7659891,8021362,14773792,15299360]),new i("pl",[2122618,2122863,2124064,2124389,2124655,2125153,2125161,2125409,2125417,2125668,2125935,2125938,2126697,2127648,2127721,2127737,2128416,2128481,6365296,6365303,6385257,6514720,6519397,6519417,6582048,6584937,6627440,6627443,6627447,6627450,6645615,6646304,6647072,6647401,6778656,6906144,6907168,6907242,7037216,7039264,7039333,7170405,7233824,7235937,7235941,7282800,7305057,7305065,7368556,7369313,7369327,7369338,7502437,7502457,7563754,7564137,7566433,7825765,7955304,7957792,8021280,8022373,8026400,15955744]),new i("ro",[2122016,2122083,2122593,2122597,2122607,2122613,2122853,2122857,2124897,2125153,2125925,2125938,2126693,2126819,2127214,2144873,2158190,6365283,6365284,6386277,6386720,6386789,6386976,6513010,6516590,6518048,6546208,6579488,6627425,6627427,6627428,6627440,6627443,6644e3,6646048,6646885,6647412,6648692,6889569,6889571,6889572,6889584,6907168,6908192,6909472,7102752,7103776,7106418,7107945,7234848,7238770,7303712,7365998,7496992,7497057,7501088,7594784,7628064,7631477,7660320,7694624,7695392,12216608,15625760])]},this.name=function(e){return e&&e.fC1Bytes?"windows-1250":"ISO-8859-2"}},t.inherits(e.exports.ISO_8859_2,o),e.exports.ISO_8859_5=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,241,242,243,244,245,246,247,248,249,250,251,252,32,254,255,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,32,241,242,243,244,245,246,247,248,249,250,251,252,32,254,255]},this.ngrams=function(){return[2150944,2151134,2151646,2152400,2152480,2153168,2153182,2153936,2153941,2154193,2154462,2154464,2154704,2154974,2154978,2155230,2156514,2158050,13688280,13689580,13884960,14015468,14015960,14016994,14017056,14164191,14210336,14211104,14216992,14407133,14407712,14413021,14536736,14538016,14538965,14538991,14540320,14540498,14557394,14557407,14557409,14602784,14602960,14603230,14604576,14605292,14605344,14606818,14671579,14672085,14672088,14672094,14733522,14734804,14803664,14803666,14803672,14806816,14865883,14868e3,14868192,14871584,15196894,15459616]},this.name=function(e){return"ISO-8859-5"},this.language=function(){return"ru"}},t.inherits(e.exports.ISO_8859_5,o),e.exports.ISO_8859_6=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,32,32,32,32,32,224,225,226,227,228,229,230,231,232,233,234,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32]},this.ngrams=function(){return[2148324,2148326,2148551,2152932,2154986,2155748,2156006,2156743,13050055,13091104,13093408,13095200,13100064,13100227,13100231,13100232,13100234,13100236,13100237,13100239,13100243,13100249,13100258,13100261,13100264,13100266,13100320,13100576,13100746,13115591,13181127,13181153,13181156,13181157,13181160,13246663,13574343,13617440,13705415,13748512,13836487,14229703,14279913,14805536,14950599,14993696,15001888,15002144,15016135,15058720,15059232,15066656,15081671,15147207,15189792,15255524,15263264,15278279,15343815,15343845,15343848,15386912,15388960,15394336]},this.name=function(e){return"ISO-8859-6"},this.language=function(){return"ar"}},t.inherits(e.exports.ISO_8859_6,o),e.exports.ISO_8859_7=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,161,162,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,220,32,221,222,223,32,252,32,253,254,192,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,32,243,244,245,246,247,248,249,250,251,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,32]},this.ngrams=function(){return[2154989,2154992,2155497,2155753,2156016,2156320,2157281,2157797,2158049,2158368,2158817,2158831,2158833,2159604,2159605,2159847,2159855,14672160,14754017,14754036,14805280,14806304,14807292,14807584,14936545,15067424,15069728,15147252,15199520,15200800,15278324,15327520,15330014,15331872,15393257,15393268,15525152,15540449,15540453,15540464,15589664,15725088,15725856,15790069,15790575,15793184,15868129,15868133,15868138,15868144,15868148,15983904,15984416,15987951,16048416,16048617,16050157,16050162,16050666,16052e3,16052213,16054765,16379168,16706848]},this.name=function(e){return e&&e.fC1Bytes?"windows-1253":"ISO-8859-7"},this.language=function(){return"el"}},t.inherits(e.exports.ISO_8859_7,o),e.exports.ISO_8859_8=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,181,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,32,32,32,32,32]},this.ngrams=function(){return[new i("he",[2154725,2154727,2154729,2154746,2154985,2154990,2155744,2155749,2155753,2155758,2155762,2155769,2155770,2157792,2157796,2158304,2159340,2161132,14744096,14950624,14950625,14950628,14950636,14950638,14950649,15001056,15065120,15068448,15068960,15071264,15071776,15278308,15328288,15328762,15329773,15330592,15331104,15333408,15333920,15474912,15474916,15523872,15524896,15540448,15540449,15540452,15540460,15540462,15540473,15655968,15671524,15787040,15788320,15788525,15920160,16261348,16312813,16378912,16392416,16392417,16392420,16392428,16392430,16392441]),new i("he",[2154725,2154732,2155753,2155756,2155758,2155760,2157040,2157810,2157817,2158053,2158057,2158565,2158569,2160869,2160873,2161376,2161381,2161385,14688484,14688492,14688493,14688506,14738464,14738916,14740512,14741024,14754020,14754029,14754042,14950628,14950633,14950636,14950637,14950639,14950648,14950650,15002656,15065120,15066144,15196192,15327264,15327520,15328288,15474916,15474925,15474938,15528480,15530272,15591913,15591920,15591928,15605988,15605997,15606010,15655200,15655968,15918112,16326884,16326893,16326906,16376864,16441376,16442400,16442857])]},this.name=function(e){return e&&e.fC1Bytes?"windows-1255":"ISO-8859-8"},this.language=function(){return"he"}},t.inherits(e.exports.ISO_8859_8,o),e.exports.ISO_8859_9=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,170,32,32,32,32,32,32,32,32,32,32,181,32,32,32,32,186,32,32,32,32,32,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,105,254,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,32,248,249,250,251,252,253,254,255]},this.ngrams=function(){return[2122337,2122345,2122357,2122849,2122853,2123621,2123873,2124140,2124641,2124655,2125153,2125676,2126689,2126945,2127461,2128225,6365282,6384416,6384737,6384993,6385184,6385405,6386208,6386273,6386429,6386685,6388065,6449522,6578464,6579488,6580512,6627426,6627435,6644841,6647328,6648352,6648425,6648681,6909029,6909472,6909545,6910496,7102830,7102834,7103776,7103858,7217249,7217250,7217259,7234657,7234661,7234848,7235872,7235950,7273760,7498094,7535982,7759136,7954720,7958386,16608800,16608868,16609021,16642301]},this.name=function(e){return e&&e.fC1Bytes?"windows-1254":"ISO-8859-9"},this.language=function(){return"tr"}},t.inherits(e.exports.ISO_8859_9,o),e.exports.windows_1251=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,144,131,32,131,32,32,32,32,32,32,154,32,156,157,158,159,144,32,32,32,32,32,32,32,32,32,154,32,156,157,158,159,32,162,162,188,32,180,32,32,184,32,186,32,32,32,32,191,32,32,179,179,180,181,32,32,184,32,186,32,188,190,190,191,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},this.ngrams=function(){return[2155040,2155246,2155758,2156512,2156576,2157280,2157294,2158048,2158053,2158305,2158574,2158576,2158816,2159086,2159090,2159342,2160626,2162162,14740968,14742268,14937632,15068156,15068648,15069682,15069728,15212783,15263008,15263776,15269664,15459821,15460384,15465709,15589408,15590688,15591653,15591679,15592992,15593186,15605986,15605999,15606001,15655456,15655648,15655918,15657248,15657980,15658016,15659506,15724267,15724773,15724776,15724782,15786210,15787492,15856352,15856354,15856360,15859488,15918571,15920672,15920880,15924256,16249582,16512288]},this.name=function(e){return"windows-1251"},this.language=function(){return"ru"}},t.inherits(e.exports.windows_1251,o),e.exports.windows_1256=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,129,32,131,32,32,32,32,136,32,138,32,156,141,142,143,144,32,32,32,32,32,32,32,152,32,154,32,156,32,32,159,32,32,32,32,32,32,32,32,32,32,170,32,32,32,32,32,32,32,32,32,32,181,32,32,32,32,32,32,32,32,32,32,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,32,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,32,32,32,32,244,32,32,32,32,249,32,251,252,32,32,255]},this.ngrams=function(){return[2148321,2148324,2148551,2153185,2153965,2154977,2155492,2156231,13050055,13091104,13093408,13095200,13099296,13099459,13099463,13099464,13099466,13099468,13099469,13099471,13099475,13099482,13099486,13099491,13099494,13099501,13099808,13100064,13100234,13115591,13181127,13181149,13181153,13181155,13181158,13246663,13574343,13617440,13705415,13748512,13836487,14295239,14344684,14544160,14753991,14797088,14806048,14806304,14885063,14927648,14928160,14935072,14950599,15016135,15058720,15124449,15131680,15474887,15540423,15540451,15540454,15583520,15585568,15590432]},this.name=function(e){return"windows-1256"},this.language=function(){return"ar"}},t.inherits(e.exports.windows_1256,o),e.exports.KOI8_R=function(){this.byteMap=function(){return[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,163,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,163,32,32,32,32,32,32,32,32,32,32,32,32,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223]},this.ngrams=function(){return[2147535,2148640,2149313,2149327,2150081,2150085,2150338,2150607,2150610,2151105,2151375,2151380,2151631,2152224,2152399,2153153,2153684,2154196,12701385,12702936,12963032,12963529,12964820,12964896,13094688,13181136,13223200,13224224,13226272,13419982,13420832,13424846,13549856,13550880,13552069,13552081,13553440,13553623,13574352,13574355,13574359,13617103,13617696,13618392,13618464,13620180,13621024,13621185,13684684,13685445,13685449,13685455,13812183,13813188,13881632,13882561,13882569,13882583,13944268,13946656,13946834,13948960,14272544,14603471]},this.name=function(e){return"KOI8-R"},this.language=function(){return"ru"}},t.inherits(e.exports.KOI8_R,o)}(H)),H.exports}var Q,ee,te={exports:{}};function ne(){return Q||(Q=1,function(e){var t=E,n=q();function r(){}r.prototype.match=function(e){var t,r,i,o,a=0,s=0,c=0,f=e.fInputBytes,d=e.fInputLen;e:for(t=0;t<d;t++){if(27==f[t]){t:for(i=0;i<this.escapeSequences.length;i++){var u=this.escapeSequences[i];if(!(d-t<u.length)){for(r=1;r<u.length;r++)if(u[r]!=f[t+r])continue t;a++,t+=u.length-1;continue e}}s++}14!=f[t]&&15!=f[t]||c++}return 0==a?null:(o=(100*a-100*s)/(a+s),a+c<5&&(o-=10*(5-(a+c))),o<=0?null:new n(e,this,o))},e.exports.ISO_2022_JP=function(){this.name=function(){return"ISO-2022-JP"},this.escapeSequences=[[27,36,40,67],[27,36,40,68],[27,36,64],[27,36,65],[27,36,66],[27,38,64],[27,40,66],[27,40,72],[27,40,73],[27,40,74],[27,46,65],[27,46,70]]},t.inherits(e.exports.ISO_2022_JP,r),e.exports.ISO_2022_KR=function(){this.name=function(){return"ISO-2022-KR"},this.escapeSequences=[[27,36,41,67]]},t.inherits(e.exports.ISO_2022_KR,r),e.exports.ISO_2022_CN=function(){this.name=function(){return"ISO-2022-CN"},this.escapeSequences=[[27,36,41,65],[27,36,41,71],[27,36,42,72],[27,36,41,69],[27,36,43,73],[27,36,43,74],[27,36,43,75],[27,36,43,76],[27,36,43,77],[27,78],[27,79]]},t.inherits(e.exports.ISO_2022_CN,r)}(te)),te.exports}var re,ie,oe={exports:{}};function ae(){if(ie)return re;ie=1;var e,t=C,n=t.Buffer,r={};for(e in t)t.hasOwnProperty(e)&&"SlowBuffer"!==e&&"Buffer"!==e&&(r[e]=t[e]);var i=r.Buffer={};for(e in n)n.hasOwnProperty(e)&&"allocUnsafe"!==e&&"allocUnsafeSlow"!==e&&(i[e]=n[e]);if(r.Buffer.prototype=n.prototype,i.from&&i.from!==Uint8Array.from||(i.from=function(e,t,r){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return n(e,t,r)}),i.alloc||(i.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var i=n(e);return t&&0!==t.length?"string"==typeof r?i.fill(t,r):i.fill(t):i.fill(0),i}),!r.kStringMaxLength)try{r.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch(e){}return r.constants||(r.constants={MAX_LENGTH:r.kMaxLength},r.kStringMaxLength&&(r.constants.MAX_STRING_LENGTH=r.kStringMaxLength)),re=r}var se,ce={};function fe(){if(se)return ce;se=1;function e(e,t){this.encoder=e,this.addBOM=!0}function t(e,t){this.decoder=e,this.pass=!1,this.options=t||{}}return ce.PrependBOM=e,e.prototype.write=function(e){return this.addBOM&&(e="\ufeff"+e,this.addBOM=!1),this.encoder.write(e)},e.prototype.end=function(){return this.encoder.end()},ce.StripBOM=t,t.prototype.write=function(e){var t=this.decoder.write(e);return this.pass||!t||("\ufeff"===t[0]&&(t=t.slice(1),"function"==typeof this.options.stripBOM&&this.options.stripBOM()),this.pass=!0),t},t.prototype.end=function(){return this.decoder.end()},ce}var de,ue,he={};function le(){if(ue)return de;ue=1;var e=ae().Buffer;function t(t,n){this.enc=t.encodingName,this.bomAware=t.bomAware,"base64"===this.enc?this.encoder=o:"cesu8"===this.enc&&(this.enc="utf8",this.encoder=a,"💩"!==e.from("eda0bdedb2a9","hex").toString()&&(this.decoder=s,this.defaultCharUnicode=n.defaultCharUnicode))}de={utf8:{type:"_internal",bomAware:!0},cesu8:{type:"_internal",bomAware:!0},unicode11utf8:"utf8",ucs2:{type:"_internal",bomAware:!0},utf16le:"ucs2",binary:{type:"_internal"},base64:{type:"_internal"},hex:{type:"_internal"},_internal:t},t.prototype.encoder=i,t.prototype.decoder=r;var n=k.StringDecoder;function r(e,t){n.call(this,t.enc)}function i(e,t){this.enc=t.enc}function o(e,t){this.prevStr=""}function a(e,t){}function s(e,t){this.acc=0,this.contBytes=0,this.accBytes=0,this.defaultCharUnicode=t.defaultCharUnicode}return n.prototype.end||(n.prototype.end=function(){}),r.prototype=n.prototype,i.prototype.write=function(t){return e.from(t,this.enc)},i.prototype.end=function(){},o.prototype.write=function(t){var n=(t=this.prevStr+t).length-t.length%4;return this.prevStr=t.slice(n),t=t.slice(0,n),e.from(t,"base64")},o.prototype.end=function(){return e.from(this.prevStr,"base64")},a.prototype.write=function(t){for(var n=e.alloc(3*t.length),r=0,i=0;i<t.length;i++){var o=t.charCodeAt(i);o<128?n[r++]=o:o<2048?(n[r++]=192+(o>>>6),n[r++]=128+(63&o)):(n[r++]=224+(o>>>12),n[r++]=128+(o>>>6&63),n[r++]=128+(63&o))}return n.slice(0,r)},a.prototype.end=function(){},s.prototype.write=function(e){for(var t=this.acc,n=this.contBytes,r=this.accBytes,i="",o=0;o<e.length;o++){var a=e[o];128!=(192&a)?(n>0&&(i+=this.defaultCharUnicode,n=0),a<128?i+=String.fromCharCode(a):a<224?(t=31&a,n=1,r=1):a<240?(t=15&a,n=2,r=1):i+=this.defaultCharUnicode):n>0?(t=t<<6|63&a,r++,0===--n&&(i+=2===r&&t<128&&t>0||3===r&&t<2048?this.defaultCharUnicode:String.fromCharCode(t))):i+=this.defaultCharUnicode}return this.acc=t,this.contBytes=n,this.accBytes=r,i},s.prototype.end=function(){var e=0;return this.contBytes>0&&(e+=this.defaultCharUnicode),e},de}var pe,be={};function me(){if(pe)return be;pe=1;var e=ae().Buffer;function t(){}function n(){}function r(){this.overflowByte=-1}function i(e,t){this.iconv=t}function o(e,t){void 0===(e=e||{}).addBOM&&(e.addBOM=!0),this.encoder=t.iconv.getEncoder("utf-16le",e)}function a(e,t){this.decoder=null,this.initialBytes=[],this.initialBytesLen=0,this.options=e||{},this.iconv=t.iconv}function s(e,t){var n=t||"utf-16le";if(e.length>=2)if(254==e[0]&&255==e[1])n="utf-16be";else if(255==e[0]&&254==e[1])n="utf-16le";else{for(var r=0,i=0,o=Math.min(e.length-e.length%2,64),a=0;a<o;a+=2)0===e[a]&&0!==e[a+1]&&i++,0!==e[a]&&0===e[a+1]&&r++;i>r?n="utf-16be":i<r&&(n="utf-16le")}return n}return be.utf16be=t,t.prototype.encoder=n,t.prototype.decoder=r,t.prototype.bomAware=!0,n.prototype.write=function(t){for(var n=e.from(t,"ucs2"),r=0;r<n.length;r+=2){var i=n[r];n[r]=n[r+1],n[r+1]=i}return n},n.prototype.end=function(){},r.prototype.write=function(t){if(0==t.length)return"";var n=e.alloc(t.length+1),r=0,i=0;for(-1!==this.overflowByte&&(n[0]=t[0],n[1]=this.overflowByte,r=1,i=2);r<t.length-1;r+=2,i+=2)n[i]=t[r+1],n[i+1]=t[r];return this.overflowByte=r==t.length-1?t[t.length-1]:-1,n.slice(0,i).toString("ucs2")},r.prototype.end=function(){},be.utf16=i,i.prototype.encoder=o,i.prototype.decoder=a,o.prototype.write=function(e){return this.encoder.write(e)},o.prototype.end=function(){return this.encoder.end()},a.prototype.write=function(t){if(!this.decoder){if(this.initialBytes.push(t),this.initialBytesLen+=t.length,this.initialBytesLen<16)return"";var n=s(t=e.concat(this.initialBytes),this.options.defaultEncoding);this.decoder=this.iconv.getDecoder(n,this.options),this.initialBytes.length=this.initialBytesLen=0}return this.decoder.write(t)},a.prototype.end=function(){if(!this.decoder){var t=e.concat(this.initialBytes),n=s(t,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder(n,this.options);var r=this.decoder.write(t),i=this.decoder.end();return i?r+i:r}return this.decoder.end()},be}var ye,ge={};function ve(){if(ye)return ge;ye=1;var e=ae().Buffer;function t(e,t){this.iconv=t}ge.utf7=t,ge.unicode11utf7="utf7",t.prototype.encoder=r,t.prototype.decoder=i,t.prototype.bomAware=!0;var n=/[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g;function r(e,t){this.iconv=t.iconv}function i(e,t){this.iconv=t.iconv,this.inBase64=!1,this.base64Accum=""}r.prototype.write=function(t){return e.from(t.replace(n,function(e){return"+"+("+"===e?"":this.iconv.encode(e,"utf16-be").toString("base64").replace(/=+$/,""))+"-"}.bind(this)))},r.prototype.end=function(){};for(var o=/[A-Za-z0-9\/+]/,a=[],s=0;s<256;s++)a[s]=o.test(String.fromCharCode(s));var c="+".charCodeAt(0),f="-".charCodeAt(0),d="&".charCodeAt(0);function u(e,t){this.iconv=t}function h(t,n){this.iconv=n.iconv,this.inBase64=!1,this.base64Accum=e.alloc(6),this.base64AccumIdx=0}function l(e,t){this.iconv=t.iconv,this.inBase64=!1,this.base64Accum=""}i.prototype.write=function(t){for(var n="",r=0,i=this.inBase64,o=this.base64Accum,s=0;s<t.length;s++)if(i){if(!a[t[s]]){if(s==r&&t[s]==f)n+="+";else{var d=o+t.slice(r,s).toString();n+=this.iconv.decode(e.from(d,"base64"),"utf16-be")}t[s]!=f&&s--,r=s+1,i=!1,o=""}}else t[s]==c&&(n+=this.iconv.decode(t.slice(r,s),"ascii"),r=s+1,i=!0);if(i){var u=(d=o+t.slice(r).toString()).length-d.length%8;o=d.slice(u),d=d.slice(0,u),n+=this.iconv.decode(e.from(d,"base64"),"utf16-be")}else n+=this.iconv.decode(t.slice(r),"ascii");return this.inBase64=i,this.base64Accum=o,n},i.prototype.end=function(){var t="";return this.inBase64&&this.base64Accum.length>0&&(t=this.iconv.decode(e.from(this.base64Accum,"base64"),"utf16-be")),this.inBase64=!1,this.base64Accum="",t},ge.utf7imap=u,u.prototype.encoder=h,u.prototype.decoder=l,u.prototype.bomAware=!0,h.prototype.write=function(t){for(var n=this.inBase64,r=this.base64Accum,i=this.base64AccumIdx,o=e.alloc(5*t.length+10),a=0,s=0;s<t.length;s++){var c=t.charCodeAt(s);32<=c&&c<=126?(n&&(i>0&&(a+=o.write(r.slice(0,i).toString("base64").replace(/\//g,",").replace(/=+$/,""),a),i=0),o[a++]=f,n=!1),n||(o[a++]=c,c===d&&(o[a++]=f))):(n||(o[a++]=d,n=!0),n&&(r[i++]=c>>8,r[i++]=255&c,i==r.length&&(a+=o.write(r.toString("base64").replace(/\//g,","),a),i=0)))}return this.inBase64=n,this.base64AccumIdx=i,o.slice(0,a)},h.prototype.end=function(){var t=e.alloc(10),n=0;return this.inBase64&&(this.base64AccumIdx>0&&(n+=t.write(this.base64Accum.slice(0,this.base64AccumIdx).toString("base64").replace(/\//g,",").replace(/=+$/,""),n),this.base64AccumIdx=0),t[n++]=f,this.inBase64=!1),t.slice(0,n)};var p=a.slice();return p[",".charCodeAt(0)]=!0,l.prototype.write=function(t){for(var n="",r=0,i=this.inBase64,o=this.base64Accum,a=0;a<t.length;a++)if(i){if(!p[t[a]]){if(a==r&&t[a]==f)n+="&";else{var s=o+t.slice(r,a).toString().replace(/,/g,"/");n+=this.iconv.decode(e.from(s,"base64"),"utf16-be")}t[a]!=f&&a--,r=a+1,i=!1,o=""}}else t[a]==d&&(n+=this.iconv.decode(t.slice(r,a),"ascii"),r=a+1,i=!0);if(i){var c=(s=o+t.slice(r).toString().replace(/,/g,"/")).length-s.length%8;o=s.slice(c),s=s.slice(0,c),n+=this.iconv.decode(e.from(s,"base64"),"utf16-be")}else n+=this.iconv.decode(t.slice(r),"ascii");return this.inBase64=i,this.base64Accum=o,n},l.prototype.end=function(){var t="";return this.inBase64&&this.base64Accum.length>0&&(t=this.iconv.decode(e.from(this.base64Accum,"base64"),"utf16-be")),this.inBase64=!1,this.base64Accum="",t},ge}var we,_e,Se,xe,Ee,Be={};function Ce(){if(we)return Be;we=1;var e=ae().Buffer;function t(t,n){if(!t)throw new Error("SBCS codec is called without the data.");if(!t.chars||128!==t.chars.length&&256!==t.chars.length)throw new Error("Encoding '"+t.type+"' has incorrect 'chars' (must be of len 128 or 256)");if(128===t.chars.length){for(var r="",i=0;i<128;i++)r+=String.fromCharCode(i);t.chars=r+t.chars}this.decodeBuf=e.from(t.chars,"ucs2");var o=e.alloc(65536,n.defaultCharSingleByte.charCodeAt(0));for(i=0;i<t.chars.length;i++)o[t.chars.charCodeAt(i)]=i;this.encodeBuf=o}function n(e,t){this.encodeBuf=t.encodeBuf}function r(e,t){this.decodeBuf=t.decodeBuf}return Be._sbcs=t,t.prototype.encoder=n,t.prototype.decoder=r,n.prototype.write=function(t){for(var n=e.alloc(t.length),r=0;r<t.length;r++)n[r]=this.encodeBuf[t.charCodeAt(r)];return n},n.prototype.end=function(){},r.prototype.write=function(t){for(var n=this.decodeBuf,r=e.alloc(2*t.length),i=0,o=0,a=0;a<t.length;a++)i=2*t[a],r[o=2*a]=n[i],r[o+1]=n[i+1];return r.toString("ucs2")},r.prototype.end=function(){},Be}var ke,Oe={};function Ie(){if(ke)return Oe;ke=1;var e=ae().Buffer;Oe._dbcs=s;for(var t=-1,n=-2,r=-10,i=-1e3,o=new Array(256),a=0;a<256;a++)o[a]=t;function s(e,r){if(this.encodingName=e.encodingName,!e)throw new Error("DBCS codec is called without the data.");if(!e.table)throw new Error("Encoding '"+this.encodingName+"' has no data.");var a=e.table();this.decodeTables=[],this.decodeTables[0]=o.slice(0),this.decodeTableSeq=[];for(var s=0;s<a.length;s++)this._addDecodeChunk(a[s]);this.defaultCharUnicode=r.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var c={};if(e.encodeSkipVals)for(s=0;s<e.encodeSkipVals.length;s++){var f=e.encodeSkipVals[s];if("number"==typeof f)c[f]=!0;else for(var d=f.from;d<=f.to;d++)c[d]=!0}if(this._fillEncodeTable(0,0,c),e.encodeAdd)for(var u in e.encodeAdd)Object.prototype.hasOwnProperty.call(e.encodeAdd,u)&&this._setEncodeChar(u.charCodeAt(0),e.encodeAdd[u]);if(this.defCharSB=this.encodeTable[0][r.defaultCharSingleByte.charCodeAt(0)],this.defCharSB===t&&(this.defCharSB=this.encodeTable[0]["?"]),this.defCharSB===t&&(this.defCharSB="?".charCodeAt(0)),"function"==typeof e.gb18030){this.gb18030=e.gb18030();var h=this.decodeTables.length,l=this.decodeTables[h]=o.slice(0),p=this.decodeTables.length,b=this.decodeTables[p]=o.slice(0);for(s=129;s<=254;s++){var m=i-this.decodeTables[0][s],y=this.decodeTables[m];for(d=48;d<=57;d++)y[d]=i-h}for(s=129;s<=254;s++)l[s]=i-p;for(s=48;s<=57;s++)b[s]=n}}function c(e,t){this.leadSurrogate=-1,this.seqObj=void 0,this.encodeTable=t.encodeTable,this.encodeTableSeq=t.encodeTableSeq,this.defaultCharSingleByte=t.defCharSB,this.gb18030=t.gb18030}function f(t,n){this.nodeIdx=0,this.prevBuf=e.alloc(0),this.decodeTables=n.decodeTables,this.decodeTableSeq=n.decodeTableSeq,this.defaultCharUnicode=n.defaultCharUnicode,this.gb18030=n.gb18030}function d(e,t){if(e[0]>t)return-1;for(var n=0,r=e.length;n<r-1;){var i=n+Math.floor((r-n+1)/2);e[i]<=t?n=i:r=i}return n}return s.prototype.encoder=c,s.prototype.decoder=f,s.prototype._getDecodeTrieNode=function(e){for(var n=[];e>0;e>>=8)n.push(255&e);0==n.length&&n.push(0);for(var r=this.decodeTables[0],a=n