@atomicservice/ascf-toolkit 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ascf-base/index.js +1 -1
- package/lib/ascf-common/index.js +1 -1
- package/lib/ascf-compiler/appjson-loader.js +1 -1
- package/lib/ascf-compiler/common/appjson-validator.js +1 -1
- package/lib/ascf-compiler/common/ascf-define.js +1 -1
- package/lib/ascf-compiler/common/ascf-file-cache.js +1 -0
- package/lib/ascf-compiler/common/beforeLoaderProcess.js +1 -1
- package/lib/ascf-compiler/common/css-runtime-api.js +1 -1
- package/lib/ascf-compiler/common/eventHappenHjs.js +1 -1
- package/lib/ascf-compiler/common/exp-utils.js +1 -1
- package/lib/ascf-compiler/common/hash-sum.js +1 -1
- package/lib/ascf-compiler/common/hdc-executor.js +1 -1
- package/lib/ascf-compiler/common/hjs-utils.js +1 -1
- package/lib/ascf-compiler/common/hxml-validator.js +1 -1
- package/lib/ascf-compiler/common/logUndefined.js +1 -1
- package/lib/ascf-compiler/common/manifest-handler.js +1 -1
- package/lib/ascf-compiler/common/manifest-manager.js +1 -1
- package/lib/ascf-compiler/common/merge-tpl-cmps.js +1 -1
- package/lib/ascf-compiler/common/packoptions-utils.js +1 -1
- package/lib/ascf-compiler/common/quick-generate-subpackage.js +1 -1
- package/lib/ascf-compiler/common/utils.js +1 -1
- package/lib/ascf-compiler/css-process-loader.js +1 -1
- package/lib/ascf-compiler/extract-loader.js +1 -1
- package/lib/ascf-compiler/hcss-loader.js +1 -1
- package/lib/ascf-compiler/hjs-loader.js +1 -1
- package/lib/ascf-compiler/hxml-loader.js +1 -1
- package/lib/ascf-compiler/js-parser/parser-babel.js +1 -1
- package/lib/ascf-compiler/js-parser/parser-swc.js +1 -1
- package/lib/ascf-compiler/js-parser/parser.js +1 -1
- package/lib/ascf-compiler/loader-utils.js +1 -1
- package/lib/ascf-compiler/path-process-loader.js +1 -1
- package/lib/ascf-compiler/plugin/before-loader-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/copy-bundle-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/dynamic-entry-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/extConfig-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/html-generator-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/i18n-transform-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/manifest-generator-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/quick-service-build-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/replace-module-id-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/resource-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/webpack-target/index.js +1 -1
- package/lib/ascf-compiler/plugin/webpack-target/jsonpChunkLoadingRuntimeModule.js +1 -1
- package/lib/ascf-compiler/plugin/webpack-target/jsonpHelpers.js +1 -1
- package/lib/ascf-compiler/plugin/webpack-target/jsonpTemplatePlugin.js +1 -1
- package/lib/ascf-compiler/require-loader.js +1 -1
- package/lib/ascf-compiler/server/dev-server.js +1 -1
- package/lib/ascf-compiler/server/port-manager.js +1 -1
- package/lib/ascf-compiler/swc-loader.js +1 -1
- package/lib/ascf-compiler/template/attr-utils.js +1 -1
- package/lib/ascf-compiler/template/implicit-model-config.js +1 -1
- package/lib/ascf-compiler/template/node-name-utils.js +1 -1
- package/lib/ascf-compiler/template-compiler/index.js +1 -0
- package/lib/ascf-compiler/trustlist-hxml-verify-loader.js +1 -1
- package/lib/ascf-compiler/trustlist-js-verify-loader.js +1 -1
- package/lib/ascf-compiler/trustlist-verify/config.js +1 -1
- package/lib/ascf-compiler/trustlist-verify/utils.js +1 -1
- package/lib/ascf-compiler/trustlist-verify/verify-ignore-files.js +1 -1
- package/lib/ascf-compiler/vue-compiler/vue-compiler.d.ts +8 -0
- package/lib/ascf-compiler/vue-compiler/vue-compiler.js +1 -0
- package/lib/ascf-compiler/vue-compiler/vue.bundle.js +1 -1
- package/lib/ascf-compiler/web.webpack.config.js +1 -1
- package/lib/ascf-converter/ascfApisDiff.json +1 -1
- package/lib/ascf-converter/common/commonConfig.js +1 -1
- package/lib/ascf-converter/common/commonUtils.js +1 -1
- package/lib/ascf-converter/common/path-validator.js +1 -1
- package/lib/ascf-converter/common/textDocument.js +1 -1
- package/lib/ascf-converter/compiler-utils/parse5.bundle.js +1 -1
- package/lib/ascf-converter/convertManager.js +1 -1
- package/lib/ascf-converter/features/converter.js +1 -1
- package/lib/ascf-converter/features/fileHandle.js +1 -1
- package/lib/ascf-converter/features/transformReport.js +1 -1
- package/lib/ascf-converter/lib/apiadapter4alipay.js +1 -1
- package/lib/ascf-converter/parse/babelParser.js +1 -1
- package/lib/ascf-converter/parse/importVisitor.js +1 -1
- package/lib/ascf-converter/parse/wxssParser.js +1 -1
- package/lib/ascf-converter/report/js/index.js +1 -1
- package/lib/ascf-sign-tools/cli.js +1 -1
- package/lib/ascf-sign-tools/index.js +1 -1
- package/lib/bin/ascf.js +1 -1
- package/lib/commands/ascfbuild/index.js +1 -1
- package/lib/commands/build-npm/index.js +1 -1
- package/lib/commands/compile.js +1 -1
- package/lib/commands/convert.js +1 -1
- package/lib/commands/debugger/index.js +1 -1
- package/lib/commands/quickservice/index.js +1 -1
- package/lib/common/config.js +1 -1
- package/lib/common/constants.js +1 -1
- package/lib/common/log4js.js +1 -1
- package/lib/common/logger-plugin.js +1 -1
- package/lib/common/remove-strict-mode-plugin.js +1 -1
- package/lib/common/string-utils.js +1 -1
- package/lib/common/utils.js +1 -1
- package/lib/common/version-check.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +7 -2
- package/lib/ascf-base/index.d.ts +0 -79
- package/lib/tools/release_64/SSL/ct_log_list.cnf +0 -9
- package/lib/tools/release_64/SSL/ct_log_list.cnf.dist +0 -9
- package/lib/tools/release_64/SSL/misc/CA.pl +0 -215
- package/lib/tools/release_64/SSL/misc/tsget.pl +0 -200
- package/lib/tools/release_64/SSL/openssl.cnf +0 -350
- package/lib/tools/release_64/SSL/openssl.cnf.dist +0 -350
- package/lib/tools/release_64/bin/c_rehash.pl +0 -251
- package/lib/tools/release_64/bin/libcrypto-1_1-x64.dll +0 -0
- package/lib/tools/release_64/bin/libssl-1_1-x64.dll +0 -0
- package/lib/tools/release_64/bin/openssl.exe +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
var _0x24ee6a=_0xa05d;function ownKeys(r,e){var t,n=_0xa05d,i=Object[n(1109)](r);return Object[n(1729)]&&(t=Object[n(1729)](r),e&&(t=t.filter(function(e){var t=n;return Object.getOwnPropertyDescriptor(r,e)[t(1992)]})),i[n(1181)][n(1189)](i,t)),i}function _objectSpread(r){for(var n=_0xa05d,e=1;e<arguments[n(1468)];e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(i),!0)[n(768)](function(e){_defineProperty(r,e,i[e])}):Object[n(1047)]?Object.defineProperties(r,Object[n(1047)](i)):ownKeys(Object(i))[n(768)](function(e){var t=n;Object[t(1453)](r,e,Object[t(1780)](i,e))})}return r}function _defineProperty(e,t,r){var n=_0xa05d;return(t=_toPropertyKey(t))in e?Object[n(1453)](e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){var t=_0xa05d;if("undefined"!=typeof Symbol&&null!=e[Symbol[t(446)]]||null!=e[t(691)])return Array.from(e)}function _arrayWithoutHoles(e){if(Array[_0xa05d(1462)](e))return _arrayLikeToArray(e)}function _regenerator(){var _,g=_0xa05d,e=g(1976)==typeof Symbol?Symbol:{},t=e[g(446)]||g(691),r=e[g(1902)]||g(714);function n(e,t,r,n){var i,a,o,s,u,c,f,h,l,d,v=g,t=t&&t[v(1111)]instanceof y?t:y,t=Object[v(1536)](t[v(1111)]);return _regeneratorDefine2(t,v(1147),(i=e,a=r,h=n||[],l=!1,d={p:f=0,n:0,v:_,a:p,f:p[(c=v)(426)](_,4),d:function(e,t){return o=e,s=0,u=_,d.n=t,m}},function(e,t,r){var n=c;if(1<f)throw TypeError("Generator is already running");for(l&&1===t&&p(t,r),s=t,u=r;(b=s<2?_:u)||!l;){o||(s?s<3?(1<s&&(d.n=-1),p(s,u)):d.n=u:d.v=u);try{if(f=2,o){if(s||(e=n(1387)),b=o[e]){if(!(b=b.call(o,u)))throw TypeError(n(816));if(!b[n(1594)])return b;u=b.value,s<2&&(s=0)}else 1===s&&(b=o[n(1458)])&&b.call(o),s<2&&(u=TypeError(n(1977)+e+n(679)),s=1);o=_}else if((b=(l=d.n<0)?u:i[n(971)](a,d))!==m)break}catch(e){o=_,s=1,u=e}finally{f=1}}return{value:b,done:l}}),!0),t;function p(e,t){var r=c;for(s=e,u=t,b=0;!l&&f&&!n&&b<h[r(1468)];b++){var n,i=h[b],a=d.p,o=i[2];3<e?(n=o===t)&&(u=i[(s=i[4])?5:s=3],i[4]=i[5]=_):i[0]<=a&&((n=e<2&&a<i[1])?(s=0,d.v=t,d.n=i[1]):a<o&&(n=e<3||i[0]>t||o<t)&&(i[4]=e,i[5]=t,d.n=o,s=0))}if(n||1<e)return m;throw l=!0,t}}var m={};function y(){}function i(){}function a(){}var b=Object[g(636)],e=[][t]?b(b([][t]())):(_regeneratorDefine2(b={},t,function(){return this}),b),o=a[g(1111)]=y[g(1111)]=Object[g(1536)](e);function s(e){var t=g;return Object[t(1172)]?Object[t(1172)](e,a):(e[t(1785)]=a,_regeneratorDefine2(e,r,t(1217))),e[t(1111)]=Object.create(o),e}return i[g(1111)]=a,_regeneratorDefine2(o,g(630),a),_regeneratorDefine2(a,"constructor",i),i.displayName=g(1217),_regeneratorDefine2(a,r,"GeneratorFunction"),_regeneratorDefine2(o),_regeneratorDefine2(o,r,g(1866)),_regeneratorDefine2(o,t,function(){return this}),_regeneratorDefine2(o,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:n,m:s}})()}function _regeneratorDefine2(e,t,r,n){var a=_0xa05d,o=Object[a(1453)];try{o({},"",{})}catch(e){o=0}(_regeneratorDefine2=function(e,t,r,n){var i=a;t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:((n=function(t,r){_regeneratorDefine2(e,t,function(e){return this[_0xa05d(1147)](t,r,e)})})("next",0),n(i(1356),1),n(i(1458),2))})(e,t,r,n)}function asyncGeneratorStep(e,t,r,n,i,a,o){var s=_0xa05d;try{var u=e[a](o),c=u[s(1407)]}catch(e){return void r(e)}u[s(1594)]?t(c):Promise[s(595)](c)[s(2009)](n,i)}function _asyncToGenerator(s){return function(){var e=this,o=arguments;return new Promise(function(t,r){var n=s.apply(e,o);function i(e){asyncGeneratorStep(n,t,r,i,a,_0xa05d(1387),e)}function a(e){asyncGeneratorStep(n,t,r,i,a,_0xa05d(1356),e)}i(void 0)})}}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(_0xa05d(1039))}function _iterableToArrayLimit(e,t){var r=_0xa05d,n=null==e?null:r(1896)!=typeof Symbol&&e[Symbol[r(446)]]||e[r(691)];if(null!=n){var i,a,o,s,u=[],c=!0,f=!1;try{if(o=(n=n[r(971)](e))[r(1387)],0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(i=o.call(n))[r(1594)])&&(u[r(1181)](i.value),u[r(1468)]!==t);c=!0);}catch(e){f=!0,a=e}finally{try{if(!c&&null!=n[r(1458)]&&(s=n[r(1458)](),Object(s)!==s))return}finally{if(f)throw a}}return u}}function _arrayWithHoles(e){if(Array[_0xa05d(1462)](e))return e}function _defineProperties(e,t){for(var r=_0xa05d,n=0;n<t[r(1468)];n++){var i=t[n];i[r(1992)]=i.enumerable||!1,i[r(736)]=!0,r(1407)in i&&(i[r(1830)]=!0),Object.defineProperty(e,_toPropertyKey(i.key),i)}}function _createClass(e,t,r){var n=_0xa05d;return t&&_defineProperties(e[n(1111)],t),r&&_defineProperties(e,r),Object[n(1453)](e,n(1111),{writable:!1}),e}function _toPropertyKey(e){var t=_0xa05d,e=_toPrimitive(e,t(1265));return t(1369)==_typeof(e)?e:e+""}function _toPrimitive(e,t){var r=_0xa05d;if(r(1355)!=_typeof(e)||!e)return e;var n=e[Symbol[r(1366)]];if(void 0===n)return(r(1265)===t?String:Number)(e);n=n[r(971)](e,t||r(830));if(r(1355)!=_typeof(n))return n;throw new TypeError(r(1668))}function _classCallCheck(e,t){var r=_0xa05d;if(!(e instanceof t))throw new TypeError(r(848))}function _callSuper(e,t,r){var n=_0xa05d;return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?Reflect.construct(t,r||[],_getPrototypeOf(e)[n(630)]):t[n(1189)](e,r))}function _possibleConstructorReturn(e,t){var r=_0xa05d;if(t&&(r(1355)==_typeof(t)||r(1976)==typeof t))return t;if(void 0!==t)throw new TypeError(r(469));return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _inherits(e,t){var r=_0xa05d;if(r(1976)!=typeof t&&null!==t)throw new TypeError(r(1368));e[r(1111)]=Object[r(1536)](t&&t[r(1111)],{constructor:{value:e,writable:!0,configurable:!0}}),Object[r(1453)](e,r(1111),{writable:!1}),t&&_setPrototypeOf(e,t)}function _0xa05d(e,t){var r=_0x1ecd();return(_0xa05d=function(e,t){return r[e-=412]})(e,t)}function _0x1ecd(){var e=["pemBuffer","error: unknown option '","nice_match","loadOptions","defaultValueDescription","additional","' not specified","_stream","rmdirSync","negativeOptions","_helpCommandnameAndArgs","start assembleHap under ","unlinkSync","argumentDescription","[options]","onmessage","work","extra","hold","isObject","Invalid JSON","READABLE_STREAM","inflateInit2","makeOptionMandatory","longestSubcommandTermLength","gzhead","ncode","executableDir","Generator","BlobBuilder"," is not supported by this method","reading or ended","_hasImplicitHelpCommand","help [command]","--sign-pwd ***","wnext","hash_bits","unknown","privateKeyPath","inflateInfo","choices: ","_pako","pending_buf","sign files, use remote sign",', signature="',"zip64ExtensibleData","[object Error]","POST","transformTo","ascii","disableSubpackages","error: too many arguments","action"," is not found","mkdirsSync","invalid distance code","cacheDir removed successfully","findExtraFieldUnicodePath","undefined","fileCommentLength","argv"," is not supported","trim","genCert","toStringTag","v0.",".mjs","inflate","list","pipe","match_length","installDeps err","dirRecord","pending_out","ascf","runCmd exited.","lendyn","Bug : uncompressed data size mismatch","visibleCommands","[object Array]","binstring2buf"," -check -out ","windir"," -nokeys -clcerts -passin pass:*** | ","getSignChunk","toISOString","closedSource","isDefault","optional","onwrite","last","_checkNumberOfArguments","compressWorker","--inspect","subcommandDescription","digests","Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.","copyInheritedSettings","Z_NEED_DICT","signProfilePath","generatedError","SIGN_TYPE_FILE_LIST","Buffer","getUTCMonth","pending_buf_size","name","repeat","FlateWorker/","Utf8DecodeWorker","getCertBuffer","dmax","cancelled","-EncodedCommand","utf8border","_optionValues","DebugPortManager","msg","posix","addHelpText","runCmd stdout","len","--incremental","lock","boolean","_executeSubCommand","document","setCurrent","beforeAll","rpk","signDataBufList","heap_max","SIGN_MAGIC_APK","help","MAX_VALUE_16BITS","_tr_align","deflateRaw","distdyn","CommanderError","function","The iterator does not provide a '","openedSource","longestArgumentTermLength","fport ls error: ","prepareContent","corked","Please check the following: 1.The device is connected to the computer. 2. The screen is on. 3. Check whether the debugging port is occupied.","inherit","validatePassword","invalid subCmd, should be ","isSignature","-config ","unshift","load","createTextNode","enumerable","writeInt32LE","Argument must not be a number","Failed to verify the signature","cert","fileNameStr","disksCount","' }","max_lazy_match","wrapped end","hcrc","getDevices","must be non-object","centralDirSize","ports:\n","target","oh_modules","then","setDefaultEncoding","dataIsReady","SIGN_TYPE_FULL_PACKAGE_APK","rimraf","max_lazy","utf8decode","isLocked","Obtain the private key using the p12 file path specified by the parameter","lastChar","instance","reverse","processedArgs","MAX_SIZE_SSPK","_data","isPrimitive","commander.conflictingOption","too many length or distance symbols","Transform","chrome","option","xflags","Invalid non-string/buffer chunk","freebsd","bind","stream.unshift() after end event","getCompressedWorker","Nodejs stream input adapter for ","DataLengthProbe for ","invalid literal/lengths set","ins_h","onfinish","bits","getSignDigestOnline","ERROR: Rpk sign failed!","Can not resolve certificate file: ","mkdirSync err : ","util","sort","drain","encode","PK","port1","get device name error","iterator","FULFILLED","getBuffer","publicKeyPath","signZipResource"," -in ","_name","_parseOptionsEnv","startView","setImmediate","valueFromOption","SIGTERM","inflateEnd","long","mainPkg","_storeOptionsAsProperties","Calling transform done when ws.length != 0","ASCF unhandled rejection at:","bitFlag","defaultValue","isPaused","Request timed out","combineFlagAndOptionalValue","Derived constructors may only return object or undefined","addListener","prepareReader","callFulfilled","1343jvYBCV","allowExcessArguments","fileRecord","Readable","getDssKey","start ability error","bin","ohpmClean err","kill","sign","transforming","_fromList","withStreamInfo","EACCES","lastIndexOf","'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?","install hap error","reader","getOwnPropertyNames","_combineFlagAndOptionalValue","RAWFILE_DIR","extraFields","/Applications/DevEco-Studio.app/Contents/tools","prepareNextSource","Z_FINISH","localPort","Obtain the private key from the ascf.config.json profilePath","handle","read: emitReadable","endEmitted","parseOptions","usingTmpDir error","readAndCheckSignature","implies","readCertPEM","total_out","pause","Signature verification succeeded.","apk","getUTCFullYear","Corrupted zip : CRC32 mismatch","the loaded zip file","hvigor","_chainOrCall","allBuffers","isApkSign","' argument '",".ts","v0.10","info","DEP0003","externalFileAttributes","fileName","fportRmV8","mkdirSync","internalFileAttributes","_excessArguments","No rpk file : ","Corrupted zip: can't find end of central directory","Object","centralDirRecords","sane","_writableState","first parameter to parse must be array or undefined","has","parent","build/quick_service_build","arguments","init AscfDebugger with options","_checkForConflictingOptions","optionTerm","static_len","positiveOptions","Buf16","Allowed choices are ","splice","exit","_outputConfiguration","preSubcommand","crossAtomicService","hash_size","ReadableState","bi_valid","_allowExcessArguments","ASCF_SIGN_PWD","Worker ","writeInt16LE","writeErr","destroyed","readFile","1472095bLCyIG","stopping","getDssKeyId","extractspk","errorEmitted","inherits","isError","cork","ERROR: The signature configuration file is incorrect, the hostvalue is empty.","Help","__esModule","json5","default: ","No sign block!","Corrupted zip: missing ","npm.cmd","err","application/json","_exit","must be an array","pubkey","_optionValueSources"," is used","charAt","ascf-cache","fport error: ","isFile","uncork","Stream","keyId","encoding","deflateSetDictionary","resolve","allocUnsafe","Cannot pipe, not readable","last_lit","createElement","pipes","signPwd is null, please configure through cli options, ascf.config.json or env ASCF_SIGN_PWD","Unexpected value for position to addHelpText.\nExpecting one of '","clone","_worker","finish","length less than watermark","_hasHelpOption","commandUsage","tcp:9225","CENTRAL_FILE_HEADER","deflateResetKeep","hsp","readable","terminal","handled","needTransform","deflateEnd","[object File]","application/zip","deprecate","EntryAbility","w_size","header","depth","_showSuggestionAfterError","outputHelp callback must return a string or a Buffer","getTime","ERROR: Your certificate is Invalid.","skip","constructor","unpipe","versionName","error: unknown command '","checkBundleName","_aliases","getPrototypeOf","SYSTEMROOT","createCommand","allowHalfOpen","passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)","port ","implied","lastTotal","entry","d_buf","_destroy","base.sspk","UNIX","writev","_conflictingOption","Deflate"," req -new -x509 -key ","sections","insert","No output type specified.","bytesWritten","execSync","assembleHap error","prefinish","v8LocalPort","createOption","missingMandatoryOptionValue","get","\n(Did you mean one of ","fportV8","_description","Base64 encoding incomplete: at least 2 bits missing","_final"," pkcs12 -in ","trimRight","lens","_pakoAction","applyCanBeUsed","localeCompare","subcommandTerm","hex","conflictsWith","alloc","' method","setTimeout","data_length","getBlob","invalid bit length repeat","modules","browser","subarray","l_buf","Unknown encoding: ","com.atomicservice.","generateCertificate","@@iterator","inflateReset2","stdout","Commands:","The package in the app.json file cannot be empty and must start with com.atomicservice.","prev_match","was","getDebugees error: ","postAction","setOptionValue","func","quick-service-build","padEnd","X509","--help","leftOver","start ohpm clean under ","msedge","dictionary","pathname","l_desc","Start ability error","stream","@@toStringTag","zero","removeChild","accumulate","tcp:","js-base64","WritableState","prependListener","versionType","humanReadableArgName","configure",", browser url: ","bl_count","padWidth","generate-spk","This method has been removed in JSZip 3.0, please check the upgrade guide.","showSuggestionAfterError","runCmdAsync","getSignInfo","invalid distances set","createArgument"," -inkey ","configurable","set","next_in","utils","assembleHsp","writecb","usingTmpDir","Hex encoding incomplete: 4 bits missing","microsoft edge","rawArgs","config","_parseCommand","linux","option:","srcPath","deflateInit2","JOINT_TAG","readingMore","central","sortSubcommands","defaultEncoding","http","process","checkSupport","window_size","extraFieldsLength","RegExp out of sync","getBufferSha256","dist","dss","chromium","createHmac","forEach","state","shrinkBuf","Unknown","_executableHandler","net","gzip","index","attributeName","JSZip can't accept a stream when loading a zip file.","afterAll","bufferedRequestCount","reduce","Multi-volumes zip are not supported","resume","argumentTerm","pid","cli","Obtaining the public Key Using the .p12 File","beforeHelp","_decompressWorker","createHash","options","optimizedBinaryString"," ecparam -name secp256r1 -genkey -noout -out ","addArgument","pop","hvigorw","copy","×tamp=","-V, --version"," for '","bufferProcessing","unref","fileContentDigest","sign request error: ","ERROR: Failed to obtain the signature configuration information.","match_start","blob","stop","SIGUSR1","del","compression","check","helpOption","after","avail_out","DEVECO_SDK_HOME","iterator result is not an object","error: ","invalid code lengths set","write","Z_STREAM_END","signPkgs","_chainOrCallSubCommandHook","parseZIP64ExtraField","incompatible version","exitOverride"," is not supported by this platform","outputHelp","_optionEx","dualOptions","default","raw","compressionMethod","stat_desc","deflateInfo","head","unixPermissions","usage","sensitive","SIGHUP","readdirSync","map","conflicts","cpList","v1.","versionMadeBy","dirname","= \f\n\r\t \u2028\u2029","Cannot call a class as a function","installHap","readInt32LE","parse","false","variadic","Reached max. number of files","chunkSize","negate","shell","level","host",'`""',"method","basename","toLowerCase","writing"," -> ","otherCallFulfilled","getSignatureValueHex","skipAscfCompile=true",", timestamp=","_parseOptionsImplied","buffer","google-chrome-stable","queue","parse json file error at ","checkSignature","pending","_processArguments","missingArgument","getLogger","isFinished","sortOptions","size","isTTY","_events","asText","-----BEGIN CERTIFICATE-----\n","bl_tree","clean","inspect","\\System32\\WindowsPowerShell\\v1.0\\powershell",". Expected ","getContentWorker","node","deflate","summary","fromCharCode","Command alias can't be the same as its name","offset","decompressed","transform","' does not exist\n - if '","' from env '","writableHighWaterMark","flags","SIGUSR2","cleanUp","_findCommand","deflateInit","encodeFileName","_helpCommandDescription","wsize","bin/node","flattenChunks","release","currentFile","getUTCDate","signPrivateKeyPath","getDssHost","Failed to remove cacheDir:","wrapped _read","Get Certificate error!","statSync","addOption","Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()","AscfDebugger","Obtain the private key from the ascf.config.json privateKeyPath","asUint8Array","gzindex","success","emit readable","flow","commander.help","invalid window size","mkdir error","Your certificate is Invalid.","Arguments:","Total package is exceed limit ","back","isBuf","hdc.exe","noHelp","inflateResetKeep","9229","_helper","total","BEGIN_TAG","Argument","commander.excessArguments","_tickScheduled","awaitDrain","all","_helpCommandName","setOptionValueWithSource","Encrypted zip are not supported","getUTCSeconds","zipComment","incorrect length check","signdata","setDssKey","max_length","good_match","Rsagen","nlen","_argsDescription","Z_OK","resume read 0"," -passout pass:","envVar","_transform() is not implemented","insufficient memory","call","utf8encode"," | ","preset: ","Option","base64","whave","LOCAL_FILE_HEADER","base.spk","diskNumberStart",".spk","construct","_lifeCycleHooks","registerPrevious","StringDecoder","includes","Can not resolve spk file: ","start","utf8","postMessage","hasUnpiped","getSignData","substr","', '"," -passin pass:***","charCodeAt","isRegExp","signConfig","indexOf","start exec print fingerprints","error: required option '","abs","ENOENT","lit_bufsize","corkedRequestsFree","wbits","ndist","AscfBuilder","round","optionMissingArgument","_addImplicitHelpCommand","_helpLongFlag","unknownOption","The stream '","build/default/outputs/default/","start hap error","copyDirectory","00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D","ascf/ascf_src/ascf.config.json","code","--allow-file-access-from-files","getCurrent","unarmor","afterHelp","visibleArguments","_passThroughOptions","tail","SIGINT","win32","suggestSimilar","decoder","onreadystatechange","dir","callRejected","nice_length","[object ArrayBuffer]","Bug : can't construct the Blob.","problem with request: ","Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.","entriesCount","prev_length","64KzJrqE","cert-utils","addHelpCommand","chunks","support","getOwnPropertyDescriptors","Writable","w_bits","false write response, pause","substring","last_flush","../tools/release_64/SSL/openssl.cnf","elems","toUint8Array","processChunk","newBlob","uncompressWorker",'"`"',"_findOption","0123456789ABCDEF","_helpShortFlag","flowing","readData","lastNeed","InvalidArgumentError","helpInformation","pako inflate (from Nodeca project)","May not write null values to stream","_write","NODE_ENV","executableFile","allocBuffer","DEVECO_SDK_HOME=","_versionOptionName","execArgv","invalid distance too far back","file error","isEncrypted","getSignedZipCertFp","allocUnsafeSlow","centralDirOffset","No devices found, please connet to phone","tag","pako deflate (from Nodeca project)","configureOutput","--ps launchMode forceUpdate","759Jposus","3.7.1","certs","preAction","_checkForConflictingLocalOptions","_helpDescription","from","_helpFlags","strm","WebKitMutationObserver","isNullOrUndefined","date","message","onunpipe","propName","writeOut","_executableDir","strategy","match_available","dyn_dtree","darwin","keys","Obtaining a public Key using a Path","prototype","file","getPEM"," x509 -out ","d_desc","toString","CRYPT_TYPE_RSA_SHA256","dssHost","longestOptionTermLength","verify","emitReadable","sha256","Promise","_tr_init","found devices: ","start startAbility under ","reading","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","pretty","allowUnknownOption","ZipFileWorker","stream error","ASCF_CONFIG_JSON","PK","fileCommentStr","DOS","> ascf-toolkit %p %c %[%m%]","asNodeBuffer","/../tools/","hap"," exists","sync"," -passin pass:","captureStackTrace","(error)","handle success","_invoke","startService","shortFlag","killProcess error","exitCode","readableObjectMode","deviceId","super_","_summary","start exec resign spk","race","window","' has already been used.","magic","error: option '","doLog","dyn_tree","signchunk","warn","EventEmitter","loadAsync","_checkForMissingMandatoryOptions","currentSourceOffset","asBinary","exec print fingerprints success, fingerprints info: ","setPrototypeOf","resumeScheduled","[command]","dirRecords",".pack_cache","command:","array","Obtaining the private Key Using the p12 File","14470zjPQPx","push","hidden","Arguments","/json","hash_shift","SIGN_MAGIC","--parallel","471601upDygO","apply","manifest.json","isEncoding","configureHelp","ucs2","-t ","realpathSync","projectRoot","listeners","profilePath","addResourceToPkg","_tr_tally","zipPlatform","emittedReadable","debug","_mimeType","--sync","fatal","wrapped data","_flush","_sources","readFileSync","afterAllHelp","strstart","Corrupted zip : compression ","getNotAfter","input","MAX_VALUE_32BITS","GeneratorFunction","verifySignHandler","max","has_stree","crypto","columns","REJECTED","assign","assembleAndInstallHap","short","spawn","WebKitBlobBuilder","emit","Invalid base64 input, it looks like a data url.","error : certificate.pem is not exist!","_args","lencode","writechunk","SIGN_TYPE_FULL_PACKAGE","previous","log","incorrect data check","remotePort","program","fileNameLength","_tr_flush_block","Usage: ","MessageChannel","' is invalid for argument '","uninstall","_concatValue","UTC","getNotBefore","read","hdc","_dispatchSubcommand","end","chrome://inspect#devices","jszip","lstatSync","append","buf2binstring","openBrowser","isUndefined","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"," -out ","data:","argChoices","string","utf-16le","send hap error","Uint8Array","isStream","time","Start","writableObjectMode","nodestream","concat","listenerCount","spk-sign-utils","bufferedRequest","data","choices","PK","utf-8","getErrHelpWidth","readExtraFields","clearResource","getOptionValue","onRejected","w_mask","extraStreamInfo","clear","Buf32","delay","deflateReset","path","open","platform","src/main/resources/rawfile","internalStream","arraySet","checkOffset","deflateSetHeader","generateInternalStream","connect"," -passout pass:***","max_chain_length","close","startIndex","extra_bits","error","pipesCount","handle ","sign/ascf-build.p12"," error","_allowUnknownOption","generatePkgDef","start installDeps under ","visibleOptions","subpackages","update","CERT_HEAD","deleteDirectory","_bindStream","memLevel",", expected ","Normal","unknown compression method",' | grep -v render | grep -v grep"',"add","adler","start install pkg under ","decompress","bl_desc","hash","columnNumber","writeFileSync","opt_len","cachedir","min","PassThrough","match","stopView","Z_NO_FLUSH","contentBuffer","preset","parseArg","fport web error: ","readEndOfCentral","onData","string2buf","Socket","async","ending","dssKey","build.log","Corrupted zip: can't find the ZIP64 end of central directory","object","throw","30165oJThXg","_internalType","_readableState","stopService","@default","dispose","diskNumber","signData","Obtaining the private key using ","toPrimitive","readable nexttick read 0","Super expression must either be null or a function","symbol","signPwd","isInvalid","getOptionValueSource","cur","next_out","output","crc32","cwd","windowBits","module=","lineNumber","setTyped","DATA_DESCRIPTOR","Duplex","getTypeOf","binary","needRm","next","X-Request-ID","extname","getManifestData"," errors:\n","env"," ec -in ","hasOwnProperty","--no-","force-stop","commandDescription","failed to obtain the public key, please ensure certificate.pem or ascf-build.p12 under sign","command","const.product.name"," MB.","dyn_ltree","Build spk ","DataWorker","isNumber","executeCommand","value","helpWidth","decodeFileName","Signed successfully.","start uninstall pkg under ","openssl","bundleName","_scriptPath","_listeners","pkgName","_showHelpAfterError","killed","_pakoOptions","v0.9.","Calling transform done when still transforming","UNHANDLED","objectMode",".js","compressedSize","script","abc","test","execPath","getPublicKey","fportWeb get pid error: "," -nocerts -nodes -out ","_dict_set","_writev","description",", asked index = ","google chrome","bi_buf","unexpected parse option { from: '","STORE","data error","repack failed: ","zipCommentLength",'"callback" argument must be a function',"longFlag","SlowBuffer","fportRm","installDeps","(outputHelp)","KEYUTIL","getOutHelpWidth","need dictionary","defineProperty","type","encodeURL","_tickAndRepeat","byteLength","return","optsWithGlobals","outputError","../sdk","isArray","isBuffer","ungzip","flush","unknownCommand","generateAsync","length","MozBlobBuilder","_compressWorker","runningCommand","(close)","127.0.0.1","extend","output the version number","ZIP64_CENTRAL_DIRECTORY_END","fileBuildPath","commander.helpDisplayed","readableHighWaterMark","_exitCallback","google-chrome","signOnline","write callback called multiple times","_read() is not implemented","data_type","filter","handle error","ASCF_DEVECO_SDK_HOME","text","rpksBuffer","pendingcb","MutationObserver","' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ","final","mode","timeout","streamFiles","find","hash_mask","jsrsasign","stream.push() after EOF","PENDING","ohpm","formatHelp","PK\b",".cjs","catch","uncompressedSize","please open url in browser: ","Launched within ","Obtain the public key from the ascf.config.json profilePath","afterTransform","_enablePositionalOptions","fileComment","heap","argRequired","v1.8.","fileList","splitOptionFlags","centralDirRecordsOnThisDisk","_version","_actionHandler","max_code","signSpk","onend","ended","wrap","startsWith","getUTCHours","argParser","operands","_read","-h, --help","footer","undestroy","create","matches"," pkcs12 -export -out ","http://localhost:","randomBytes","optionEnv:","static_tree","63TNcaYY","[object Blob]","MSBlobBuilder","&appid=","createSign","buf2string","parserZip","byteAt","isRelease","'. ","webLocalPort","openBrowser error, please try later","app","ConvertWorker to ","required","nodebuffer","signPublicKeyPath","fport v8 error: ","' is invalid.","指纹格式错误","onlineConfig","atomicservice","compressionOptions","prefinished","Z_SYNC_FLUSH","runHdcCmdAsync","NONEWITHRSA","files","_createPako","CLOUDSOA-HMAC-SHA256 appid=","version","commands","hideHelp","appendChild","destroy","****","onFulfilled","DIST_PATH","begin runCmd","hapPath is not exists","exports","root","utf16le","extra_len","findExtraFieldUnicodeComment","zip64","param","====","versionCode","%d{yyyy-MM-dd hh:mm:ss.SSS} > ascf-toolkit %p %c %m","invalid literal/length code","done","digest","signature","MAX_SIZE_SPK","service","Failed to generate cert","getResources","cache","distcode","utf-8 encode","fportRmWeb","_undestroy","readString","finally","max_chain","buffer error","cleanup","_usage","before","have","ascf/ascf_build","custom","diskWithCentralDirStart","parentNode","fileContentBuffer","readableListening","6TlwYiQ"," records in central dir, got ","request","_transform","start hvigor clean under ","unknown header flags set","uninstall hap error","). Corrupted zip ?","Authorization","readJsonFile","fill","uncaughtException","copyFileSync","asArrayBuffer","view","zip64EndOfCentralSize","streamInfo"," [options]","Failed to verify the signature: ","argument","prev","comment","nextTick","highWaterMark","shift","addCommand","...","ondata","unhandledRejection","inflateSetDictionary","Package is exceed limit ","_defaultCommandName","POST&","Can't read the data of '","_prepareUserArgs","ZIP64_CENTRAL_DIRECTORY_LOCATOR","_tr_stored_block","readCentralPart","getDeviceId","compressedContent","split","newBufferFrom","Crc32Probe","/AppScope/app.json5","spawnSync","checkValidity","diskWithZip64CentralDirStart","searched for local subcommand relative to directory '","@@toPrimitive must return a primitive value.","340744HfEfAy","finished","events","meta","inflateReset","DEFLATE","decode","versions","lastIndexOfSignature","_upstreamEnded","formatHexString","isString","join","isBoolean","Obtaining the public key using ","assembleHap within ","sunos","existsSync","CENTRAL_DIRECTORY_END","Get File Certificate Error!","Z_BUF_ERROR","onEnd","PK","lenbits","obj","environment variable '","84ACSjCt","createFolders"," cannot be used with ","pkcs12","_dataBinary","_getHelpContext","display help for command","mandatory","Utf8EncodeWorker","otherCallRejected","promise","arraybuffer","command:*","setEncoding","listTargets error or no devices found","onerror","finalCalled","createWorkerFrom","toNodejsStream","fport","disable","inflateGetHeader","localabstract:webview_devtools_remote_","fportWeb","needDrain","pipe count=%d opts=%j","Invalid Password.\nThe password must contain at least 8 characters and include any two of the following:\n1. Lowercase letters: a-z\n2. Uppercase letters : A-Z\n3. Digits : 0-9\n4. Special characters : `~!@#$%^&*()-_=+\\|[{}];:'\",<.>/?","Can not resolve base.sspk file.","binarystring","start ability under ","toUpperCase","[object Date]","pipe resume","fillLast","getOwnPropertySymbols","pattern","DevEco Studio","lookahead","sign/certificate.pem","Start to obtain the private key","_hidden","_outputType","setIndex","outcome","subPkgs","slice","hash.json","chrome://inspect/#devices","stringifyByChar","applyFromCharCode","error: missing required argument '","isDirectory","once","latin1","opts","localHeaderOffset","reject","META-INF","presetArg","DualOptions","optionDescription","option '","child_process","Base64","ASCF uncaught error","removeListener","decodeStrings","The packed file is empty.","signatures","distbits","Set","total_in","args","getOpensslPath"," or ","Command","assembleHap","commander.missingMandatoryOptionValue","number","Obtaining a private Key using a Path","init","alias","writelen","Argument must be a number","result","getOwnPropertyDescriptor","build/dist","resource","dosPermissions","uint8array","__proto__","block_start","microsoft-edge","extra_base","ucs-2","readInt","onload","status","havedict","needReadable","relativeOffsetEndOfZip64CentralDir","heap_len","avail_in","callback","package","no directory for search for local subcommand, use .executableDir() to supply a custom directory","hvigorClean err","sign/private.pem","AscfToolkit","hostname","Illegal character at offset ","aliases",".tsx","stderr","End of data reached (data length = ","electron","The versionName and versionCode fields in the app.json file cannot be empty.","CRC32","send","_executableFile","hookedCommand","_transformState","fileSync","hasInstance","genP12","commander.invalidArgument","Buf8","readBlockZip64EndOfCentralLocator","exec","_helpConfiguration","_chainOrCallHooks","stringifyByChunk","Map","stringify","2FuSXMN","writable","2365608NgLfpA","checkZipBuffer","lastBufferedRequest","replace","getInstance","floor","InvalidOptionArgumentError"];return(_0x1ecd=function(){return e})()}function _wrapNativeSuper(e){var n="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(t){var r=_0xa05d;if(null===t||!_isNativeFunction(t))return t;if(r(1976)!=typeof t)throw new TypeError(r(1368));if(void 0!==n){if(n[r(537)](t))return n.get(t);n.set(t,e)}function e(){var e=r;return _construct(t,arguments,_getPrototypeOf(this)[e(630)])}return e[r(1111)]=Object[r(1536)](t[r(1111)],{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(e,t)})(e)}function _construct(e,t,r){var n,i=_0xa05d;return _isNativeReflectConstruct()?Reflect[i(982)].apply(null,arguments):((n=[null]).push[i(1189)](n,t),t=new(e[i(426)][i(1189)](e,n)),r&&_setPrototypeOf(t,r[i(1111)]),t)}function _isNativeReflectConstruct(){var e=_0xa05d;try{var t=!Boolean[e(1111)].valueOf.call(Reflect[e(982)](Boolean,[],function(){}))}catch(e){}return(_isNativeReflectConstruct=function(){return!!t})()}function _isNativeFunction(t){var r=_0xa05d;try{return-1!==Function[r(1116)][r(971)](t)[r(999)]("[native code]")}catch(e){return r(1976)==typeof t}}function _setPrototypeOf(e,t){var r=_0xa05d;return(_setPrototypeOf=Object.setPrototypeOf?Object[r(1172)].bind():function(e,t){return e[r(1785)]=t,e})(e,t)}function _getPrototypeOf(e){var r=_0xa05d;return(_getPrototypeOf=Object.setPrototypeOf?Object[r(636)][r(426)]():function(e){var t=r;return e.__proto__||Object[t(636)](e)})(e)}function _createForOfIteratorHelper(e,t){var r,n,i,a,o=_0xa05d,s=o(1896)!=typeof Symbol&&e[Symbol.iterator]||e[o(691)];if(s)return i=!(n=!0),{s:function(){s=s[o(971)](e)},n:function(){var e=o,t=s[e(1387)]();return n=t[e(1594)],t},e:function(e){i=!0,r=e},f:function(){var e=o;try{n||null==s[e(1458)]||s[e(1458)]()}finally{if(i)throw r}}};if(Array[o(1462)](e)||(s=_unsupportedIterableToArray(e))||t&&e&&o(1773)==typeof e[o(1468)])return s&&(e=s),a=0,{s:t=function(){},n:function(){return a>=e[o(1468)]?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:t};throw new TypeError(o(1934))}function _unsupportedIterableToArray(e,t){var r,n=_0xa05d;if(e)return n(1265)==typeof e?_arrayLikeToArray(e,t):(r={}[n(1116)][n(971)](e)[n(1740)](8,-1),n(532)===r&&e.constructor&&(r=e[n(630)].name),n(1827)===r||n(1765)===r?Array[n(1094)](e):n(1183)===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/[n(1428)](r)?_arrayLikeToArray(e,t):void 0)}function _arrayLikeToArray(e,t){var r=_0xa05d;(null==t||t>e[r(1468)])&&(t=e[r(1468)]);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function _typeof(e){var r=_0xa05d;return(_typeof=r(1976)==typeof Symbol&&r(1369)==typeof Symbol[r(446)]?function(e){return typeof e}:function(e){var t=r;return e&&"function"==typeof Symbol&&e[t(630)]===Symbol&&e!==Symbol[t(1111)]?t(1369):typeof e})(e)}(()=>{for(var e=_0xa05d,t=_0x1ecd();;)try{if(181793==-parseInt(e(473))*(-parseInt(e(1829))/2)+parseInt(e(1357))/3*(parseInt(e(1042))/4)+-parseInt(e(563))/5*(parseInt(e(1620))/6)+-parseInt(e(1831))/7+-parseInt(e(1669))/8*(-parseInt(e(1543))/9)+-parseInt(e(1180))/10*(-parseInt(e(1088))/11)+parseInt(e(1695))/12*(parseInt(e(1188))/13))break;t.push(t.shift())}catch(e){t.push(t.shift())}})();var zt=function(t,r){return function(){var e=_0xa05d;return r||t((r={exports:{}}).exports,r),r[e(1583)]}},Ye=zt(function(c,e){function t(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}}function i(r,n,i,a){var o=X;if(n&&_typeof(n)==o(1355)||"function"==typeof n){var s,t=_createForOfIteratorHelper(m(n));try{for(t.s();!(s=t.n()).done;)(()=>{var e=o,t=s[e(1407)];B[e(971)](r,t)||t===i||u(r,t,{get:function(){return n[t]},enumerable:!(a=l(n,t))||a[e(1992)]})})()}catch(e){t.e(e)}finally{t.f()}}return r}function r(e,t,r){var n=X;return r=null!=e?f(y(e)):{},i(!t&&e&&e[n(573)]?r:u(r,n(830),{value:e,enumerable:!0}),e)}var n,X=_0xa05d,f=Object[X(1536)],u=Object.defineProperty,l=Object[X(1780)],m=Object[X(491)],y=Object.getPrototypeOf,B=Object[X(1111)][X(1394)],k=t(function(e){var t=X,r=(_inherits(a,_wrapNativeSuper(Error)),_createClass(a)),n=(_inherits(i,r),_createClass(i));function i(e){var t=_0xa05d;return _classCallCheck(this,i),e=_callSuper(this,i,[1,t(1820),e]),Error[t(1144)](_assertThisInitialized(e),e.constructor),e[t(1943)]=e[t(630)][t(1943)],e}function a(e,t,r){var n=_0xa05d;return _classCallCheck(this,a),r=_callSuper(this,a,[r]),Error[n(1144)](_assertThisInitialized(r),r[n(630)]),r[n(1943)]=r[n(630)][n(1943)],r[n(1020)]=t,r.exitCode=e,r.nestedError=void 0,r}e[t(1975)]=r,e.InvalidArgumentError=n}),x=t(function(e){var a,r=X,o=k()[r(1066)],t=_createClass(function e(t,r){var n=_0xa05d;switch(_classCallCheck(this,e),this.description=r||"",this[n(853)]=!1,this[n(1344)]=void 0,this[n(465)]=void 0,this.defaultValueDescription=void 0,this[n(1264)]=void 0,t[0]){case"<":this[n(1557)]=!0,this[n(452)]=t[n(1740)](1,-1);break;case"[":this[n(1557)]=!1,this[n(452)]=t.slice(1,-1);break;default:this.required=!0,this[n(452)]=t}3<this[n(452)].length&&"..."===this._name[n(1740)](-3)&&(this[n(853)]=!0,this[n(452)]=this[n(452)][n(1740)](0,-3))},[{key:(a=r)(1943),value:function(){return this[a(452)]}},{key:a(1247),value:function(e,t){var r=a;return t!==this[r(465)]&&Array.isArray(t)?t[r(1274)](e):[e]}},{key:a(830),value:function(e,t){var r=a;return this.defaultValue=e,this[r(1842)]=t,this}},{key:a(1530),value:function(e){return this[a(1344)]=e,this}},{key:a(1279),value:function(e){var n=a,i=this;return this[n(1264)]=e.slice(),this[n(1344)]=function(e,t){var r=n;if(i.argChoices.includes(e))return i[r(853)]?i._concatValue(e,t):e;throw new o(r(547).concat(i[r(1264)].join(", "),"."))},this}},{key:a(1516),value:function(){return this[a(1557)]=!0,this}},{key:"argOptional",value:function(){return this.required=!1,this}}]);e[r(947)]=t,e[r(723)]=function(e){var t=e[(t=r)(1943)]()+(!0===e[t(853)]?t(1646):"");return e.required?"<"+t+">":"["+t+"]"}}),E=t(function(e){var c,t=X,n=x()[t(723)],r=_createClass(function e(){var t=_0xa05d;_classCallCheck(this,e),this[t(1408)]=void 0,this.sortSubcommands=!1,this[t(881)]=!1},[{key:(c=t)(1916),value:function(e){var t,r,n=c,i=e.commands[n(1486)](function(e){return!e._hidden});return e._hasImplicitHelpCommand()&&(r=(t=_slicedToArray(e[n(1848)][n(1339)](/([^ ]+) *(.*)/),3))[1],t=t[2],(r=e[n(638)](r).helpOption(!1))[n(1435)](e._helpCommandDescription),t&&r[n(540)](t),i[n(1181)](r)),this[n(755)]&&i[n(440)](function(e,t){var r=n;return e.name()[r(674)](t[r(1943)]())}),i}},{key:c(1316),value:function(e){var n,i=c,t=e[i(790)][i(1486)](function(e){return!e[i(1182)]}),r=e[i(607)]&&e._helpShortFlag&&!e[i(1060)](e[i(1062)]),a=e[i(607)]&&!e._findOption(e[i(1012)]);return(r||a)&&(r=r?a?e[i(661)](e[i(1095)],e[i(1093)]):e[i(661)](e._helpShortFlag,e[i(1093)]):e.createOption(e[i(1012)],e[i(1093)]),t[i(1181)](r)),this[i(881)]&&(n=function(e){var t=i;return e[t(1226)]?e[t(1226)][t(1834)](/^-/,""):e[t(459)].replace(/^--/,"")},t[i(440)](function(e,t){var r=i;return n(e)[r(674)](n(t))})),t}},{key:c(1025),value:function(r){var n=c;return r[n(964)]&&r[n(1232)][n(768)](function(e){var t=n;e[t(1435)]=e[t(1435)]||r[t(964)][e[t(1943)]()]||""}),r[n(1232)].find(function(e){return e[n(1435)]})?r._args:[]}},{key:"subcommandTerm",value:function(e){var t=c,r=e[t(1232)].map(function(e){return n(e)})[t(1681)](" ");return e._name+(e[t(635)][0]?"|"+e[t(635)][0]:"")+(e[t(790)][t(1468)]?t(1637):"")+(r?" "+r:"")}},{key:"optionTerm",value:function(e){return e[c(904)]}},{key:c(783),value:function(e){return e[c(1943)]()}},{key:c(1862),value:function(e,n){return n.visibleCommands(e).reduce(function(e,t){var r=_0xa05d;return Math[r(1219)](e,n.subcommandTerm(t)[r(1468)])},0)}},{key:c(1119),value:function(e,n){var i=c;return n[i(1316)](e)[i(780)](function(e,t){var r=i;return Math[r(1219)](e,n[r(543)](t)[r(1468)])},0)}},{key:c(1979),value:function(e,n){var i=c;return n[i(1025)](e)[i(780)](function(e,t){var r=i;return Math[r(1219)](e,n[r(783)](t).length)},0)}},{key:c(608),value:function(e){for(var t=c,r=e._name,n=(e[t(635)][0]&&(r=r+"|"+e[t(635)][0]),""),i=e[t(538)];i;i=i[t(538)])n=i[t(1943)]()+" "+n;return n+r+" "+e[t(837)]()}},{key:c(1397),value:function(e){return e[c(1435)]()}},{key:"subcommandDescription",value:function(e){return e[c(895)]()||e.description()}},{key:c(1755),value:function(e){var t=c,r=[];return e.argChoices&&r[t(1181)](t(1878)[t(1274)](e[t(1264)][t(841)](function(e){return JSON.stringify(e)})[t(1681)](", "))),void 0!==e[t(465)]&&(e.required||e[t(1926)]||e.isBoolean()&&typeof e[t(465)]==t(1961))&&r[t(1181)](t(575)[t(1274)](e[t(1842)]||JSON[t(1828)](e[t(465)]))),void 0!==e[t(1753)]&&e[t(1926)]&&r[t(1181)](t(974)[t(1274)](JSON.stringify(e[t(1753)]))),void 0!==e[t(968)]&&r[t(1181)]("env: "[t(1274)](e[t(968)])),0<r[t(1468)]?""[t(1274)](e[t(1435)]," (")[t(1274)](r[t(1681)](", "),")"):e[t(1435)]}},{key:"argumentDescription",value:function(e){var t=c,r=[];return e[t(1264)]&&r[t(1181)]("choices: "[t(1274)](e[t(1264)].map(function(e){return JSON[t(1828)](e)})[t(1681)](", "))),void 0!==e[t(465)]&&r[t(1181)](t(575)[t(1274)](e[t(1842)]||JSON[t(1828)](e.defaultValue))),0<r.length?(r="(".concat(r[t(1681)](", "),")"),e[t(1435)]?""[t(1274)](e[t(1435)]," ").concat(r):r):e[t(1435)]}},{key:c(1504),value:function(e,n){var i=c,a=n[i(727)](e,n),o=n[i(1408)]||80;function r(e,t){var r=i;return t?(t=""[r(1274)](e[r(703)](a+2))[r(1274)](t),n[r(1527)](t,o-2,a+2)):e}function t(e){var t=i;return e[t(1681)]("\n")[t(1834)](/^/gm," "[t(1944)](2))}var s=[i(1243).concat(n[i(608)](e)),""],u=n.commandDescription(e),u=(0<u.length&&(s=s.concat([u,""])),n[i(1025)](e)[i(841)](function(e){var t=i;return r(n[t(783)](e),n[t(1851)](e))})),u=(0<u[i(1468)]&&(s=s[i(1274)]([i(936),t(u),""])),n[i(1316)](e)[i(841)](function(e){var t=i;return r(n[t(543)](e),n[t(1755)](e))})),u=(0<u[i(1468)]&&(s=s[i(1274)](["Options:",t(u),""])),n.visibleCommands(e)[i(841)](function(e){var t=i;return r(n[t(675)](e),n[t(1932)](e))}));return(s=0<u[i(1468)]?s[i(1274)]([i(694),t(u),""]):s)[i(1681)]("\n")}},{key:c(727),value:function(e,t){var r=c;return Math[r(1219)](t[r(1119)](e,t),t[r(1862)](e,t),t.longestArgumentTermLength(e,t))}},{key:c(1527),value:function(e,t,r){var n,i=c,a=3<arguments.length&&void 0!==arguments[3]?arguments[3]:40;return e[i(1339)](/[\n]\s+/)||(t=t-r)<a?e:(a=e.slice(0,r),e=e.slice(r),n=" "[i(1944)](r),r=new RegExp(".{1,"+(t-1)+"}([\\s]|$)|[^\\s]+?([\\s]|$)","g"),a+(e[i(1339)](r)||[])[i(841)](function(e,t){var r=i;return"\n"===e[r(1740)](-1)&&(e=e[r(1740)](0,e.length-1)),(0<t?n:"")+e[r(670)]()})[i(1681)]("\n"))}}]);e[t(572)]=r}),C=t(function(e){var i,a,o=X,s=k()[o(1066)],t=_createClass(function e(t,r){var n=_0xa05d,r=(_classCallCheck(this,e),this[n(904)]=t,this.description=r||"",this[n(1557)]=t[n(986)]("<"),this[n(1926)]=t[n(986)]("["),this[n(853)]=/\w\.\.\.[>\]]$/.test(t),this[n(1702)]=!1,u(t));this[n(1226)]=r[n(1149)],this.long=r[n(1445)],this[n(856)]=!1,this[n(459)]&&(this[n(856)]=this[n(459)].startsWith(n(1395))),this[n(465)]=void 0,this[n(1842)]=void 0,this.presetArg=void 0,this[n(968)]=void 0,this.parseArg=void 0,this[n(1182)]=!1,this[n(1264)]=void 0,this[n(677)]=[],this[n(642)]=void 0},[{key:(a=o)(830),value:function(e,t){var r=a;return this[r(465)]=e,this[r(1842)]=t,this}},{key:a(1343),value:function(e){return this[a(1753)]=e,this}},{key:a(842),value:function(e){var t=a;return this[t(677)]=this[t(677)][t(1274)](e),this}},{key:a(506),value:function(e){var t=a;return this[t(642)]=Object.assign(this[t(642)]||{},e),this}},{key:"env",value:function(e){return this[a(968)]=e,this}},{key:a(1530),value:function(e){return this[a(1344)]=e,this}},{key:a(1861),value:function(){var e=a,t=!(0<arguments[e(1468)]&&void 0!==arguments[0])||arguments[0];return this[e(1702)]=!!t,this}},{key:a(1575),value:function(){var e=a,t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];return this[e(1182)]=!!t,this}},{key:a(1247),value:function(e,t){var r=a;return t!==this[r(465)]&&Array[r(1462)](t)?t.concat(e):[e]}},{key:a(1279),value:function(e){var n=a,i=this;return this[n(1264)]=e[n(1740)](),this[n(1344)]=function(e,t){var r=n;if(i[r(1264)][r(986)](e))return i[r(853)]?i[r(1247)](e,t):e;throw new s(r(547)[r(1274)](i[r(1264)].join(", "),"."))},this}},{key:a(1943),value:function(){var e=a;return this[e(459)]?this[e(459)][e(1834)](/^--/,""):this[e(1226)][e(1834)](/^-/,"")}},{key:a(776),value:function(){var n,e=a;return this[e(1943)]()[e(1834)](/^no-/,"")[(n=o)(1660)]("-")[n(780)](function(e,t){var r=n;return e+t[0][r(1725)]()+t[r(1740)](1)})}},{key:"is",value:function(e){var t=a;return this[t(1226)]===e||this[t(459)]===e}},{key:a(1682),value:function(){var e=a;return!this[e(1557)]&&!this[e(1926)]&&!this[e(856)]}}]),r=_createClass(function e(t){var n=_0xa05d,i=this;_classCallCheck(this,e),this.positiveOptions=new Map,this[n(1847)]=new Map,this.dualOptions=new Set,t[n(768)](function(e){var t=n;e[t(856)]?i.negativeOptions.set(e.attributeName(),e):i[t(545)].set(e[t(776)](),e)}),this[n(1847)][n(768)](function(e,t){var r=n;i.positiveOptions[r(537)](t)&&i.dualOptions[r(1327)](t)})},[{key:(i=o)(456),value:function(e,t){var r=i,n=t[r(776)]();return!this[r(829)][r(537)](n)||(n=void 0!==(n=this[r(1847)][r(663)](n).presetArg)&&n,t[r(856)]===(n===e))}}]);function u(e){var t,r=o,e=e[r(1660)](/[ |,]+/);return 1<e.length&&!/^[[<]/[r(1428)](e[1])&&(t=e.shift()),r=e.shift(),!t&&/^-[^-]$/.test(r)&&(t=r,r=void 0),{shortFlag:t,longFlag:r}}e[o(975)]=t,e[o(1519)]=u,e[o(1754)]=r}),T=t(function(e){e[X(1030)]=function(i,e){var a=_0xa05d;if(!e||0===e[a(1468)])return"";e=Array[a(1094)](new Set(e));var t=i[a(1528)]("--"),o=(t&&(i=i[a(1740)](2),e=e.map(function(e){return e[a(1740)](2)})),[]),s=3;return e.forEach(function(e){var t,r,n=a;e.length<=1||(t=((e,t)=>{var r=_0xa05d;if(3<Math[r(1002)](e[r(1468)]-t[r(1468)]))return Math[r(1219)](e[r(1468)],t[r(1468)]);for(var n=[],i=0;i<=e[r(1468)];i++)n[i]=[i];for(var a=0;a<=t[r(1468)];a++)n[0][a]=a;for(var o=1;o<=t[r(1468)];o++)for(var s=1;s<=e.length;s++){var u=1,u=e[s-1]===t[o-1]?0:1;n[s][o]=Math.min(n[s-1][o]+1,n[s][o-1]+1,n[s-1][o-1]+u),1<s&&1<o&&e[s-1]===t[o-2]&&e[s-2]===t[o-1]&&(n[s][o]=Math[r(1337)](n[s][o],n[s-2][o-2]+1))}return n[e[r(1468)]][t[r(1468)]]})(i,e),.4<((r=Math[n(1219)](i.length,e[n(1468)]))-t)/r&&(t<s?(s=t,o=[e]):t===s&&o[n(1181)](e)))}),o[a(440)](function(e,t){return e[a(674)](t)}),1<(o=t?o[a(841)](function(e){return"--"[a(1274)](e)}):o)[a(1468)]?a(664)[a(1274)](o.join(", "),"?)"):1===o[a(1468)]?"\n(Did you mean "[a(1274)](o[0],"?)"):""}}),G=t(function(e){var r,d,i=X,t=require(i(1671))[i(1166)],h=require(i(1757)),l=require(i(1293)),v=require("fs"),p=require(i(758)),n=x(),a=n[i(947)],o=n[i(723)],_=k()[i(1975)],s=E()[i(572)],n=C(),u=n[i(975)],c=n[i(1519)],f=n.DualOptions,g=T().suggestSimilar,n=(d=i,_inherits(m,t),_createClass(m,[{key:d(1935),value:function(e){var t=d;return this[t(550)]=e[t(550)],this[t(607)]=e._hasHelpOption,this[t(1095)]=e[t(1095)],this[t(1093)]=e[t(1093)],this[t(1062)]=e._helpShortFlag,this[t(1012)]=e[t(1012)],this[t(952)]=e[t(952)],this._helpCommandnameAndArgs=e[t(1848)],this[t(910)]=e[t(910)],this._helpConfiguration=e[t(1824)],this[t(1480)]=e[t(1480)],this._storeOptionsAsProperties=e[t(461)],this[t(492)]=e[t(492)],this[t(556)]=e[t(556)],this._enablePositionalOptions=e._enablePositionalOptions,this[t(1417)]=e._showHelpAfterError,this[t(625)]=e[t(625)],this}},{key:d(1399),value:function(e,t,r){var n=d,r=("object"==_typeof(t)&&null!==t&&(r=t,t=null),r||{}),e=_slicedToArray(e[n(1339)](/([^ ]+) *(.*)/),3),i=e[1],e=e[2],i=this[n(638)](i);return t&&(i.description(t),i[n(772)]=!0),r[n(1925)]&&(this._defaultCommandName=i[n(452)]),i[n(1735)]=!(!r[n(941)]&&!r[n(1182)]),i[n(1814)]=r[n(1072)]||null,e&&i[n(540)](e),this[n(1574)][n(1181)](i),i.parent=this,i.copyInheritedSettings(this),t?this:i}},{key:d(638),value:function(e){return new m(e)}},{key:"createHelp",value:function(){var e=d;return Object.assign(new s,this[e(1192)]())}},{key:d(1192),value:function(e){var t=d;return void 0===e?this._helpConfiguration:(this[t(1824)]=e,this)}},{key:d(1086),value:function(e){var t=d;return void 0===e?this._outputConfiguration:(Object[t(1224)](this[t(550)],e),this)}},{key:"showHelpAfterError",value:function(){var e=d,t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];return"string"!=typeof t&&(t=!!t),this[e(1417)]=t,this}},{key:d(730),value:function(){var e=!(0<arguments[d(1468)]&&void 0!==arguments[0])||arguments[0];return this._showSuggestionAfterError=!!e,this}},{key:d(1645),value:function(e,t){var r=d;if(e[r(452)])return(t=t||{}).isDefault&&(this[r(1651)]=e[r(452)]),(t[r(941)]||t[r(1182)])&&(e[r(1735)]=!0),this.commands[r(1181)](e),e[r(538)]=this;throw new Error(r(924))}},{key:d(734),value:function(e,t){return new a(e,t)}},{key:d(1639),value:function(e,t,r,n){var i=d,e=this[i(734)](e,t);return typeof r==i(1976)?e[i(830)](n)[i(1530)](r):e[i(830)](r),this.addArgument(e),this}},{key:"arguments",value:function(e){var t=d,r=this;return e[t(1660)](/ +/)[t(768)](function(e){r[t(1639)](e)}),this}},{key:d(793),value:function(e){var t=d,r=this[t(1232)][t(1740)](-1)[0];if(r&&r.variadic)throw new Error("only the last argument can be variadic '"[t(1274)](r[t(1943)](),"'"));if(e[t(1557)]&&void 0!==e.defaultValue&&void 0===e.parseArg)throw new Error("a default value for a required argument is never used: '"[t(1274)](e[t(1943)](),"'"));return this._args[t(1181)](e),this}},{key:d(1044),value:function(e,t){var r=d;return!1===e?this[r(1011)]=!1:(this[r(1011)]=!0,"string"==typeof e&&(this[r(952)]=e[r(1660)](" ")[0],this[r(1848)]=e),this[r(910)]=t||this[r(910)]),this}},{key:d(1870),value:function(){var e=d;return void 0===this[e(1011)]?this[e(1574)][e(1468)]&&!this._actionHandler&&!this[e(907)](e(1970)):this[e(1011)]}},{key:"hook",value:function(e,t){var r=d,n=[r(551),r(1091),r(699)];if(n.includes(e))return this[r(983)][e]?this[r(983)][e][r(1181)](t):this[r(983)][e]=[t],this;throw new Error("Unexpected value for event passed to hook : '"[r(1274)](e,"'.\nExpecting one of '").concat(n[r(1681)](r(994)),"'"))}},{key:d(825),value:function(e){return this._exitCallback=e||function(e){if("commander.executeSubCommandAsync"!==e.code)throw e},this}},{key:"_exit",value:function(e,t,r){var n=d;this._exitCallback&&this[n(1480)](new _(e,t,r)),p[n(549)](e)}},{key:d(1890),value:function(n){var i=this;return this[d(1522)]=function(e){var t=_0xa05d,r=i[t(1232)][t(1468)],e=e[t(1740)](0,r);return i[t(461)]?e[r]=i:e[r]=i[t(1749)](),e[t(1181)](i),n[t(1189)](i,e)},this}},{key:d(661),value:function(e,t){return new u(e,t)}},{key:d(923),value:function(a){function n(e,t,r){var n=o,i=(null==e&&void 0!==a[n(1753)]&&(e=a[n(1753)]),s[n(1285)](u));if(null!==e&&a[n(1344)])try{e=a.parseArg(e,i)}catch(e){throw e[n(1020)]===n(1820)&&(t=""[n(1274)](t," ")[n(1274)](e[n(1100)]),s[n(1308)](t,{exitCode:e.exitCode,code:e[n(1020)]})),e}else null!==e&&a.variadic&&(e=a[n(1247)](e,i));null==e&&(e=!a[n(856)]&&(!(!a[n(1682)]()&&!a[n(1926)])||"")),s.setOptionValueWithSource(u,e,r)}var e,o=d,s=this,t=a.name(),u=a[o(776)]();a[o(856)]?(e=a[o(459)][o(1834)](/^--no-/,"--"),this._findOption(e)||this.setOptionValueWithSource(u,void 0===a[o(465)]||a.defaultValue,o(830))):void 0!==a[o(465)]&&this[o(953)](u,a[o(465)],o(830)),this[o(790)][o(1181)](a);return this.on("option:"+t,function(e){var t=o,r=t(1161)[t(1274)](a[t(904)],t(519))[t(1274)](e,t(1561));n(e,r,t(785))}),a.envVar&&this.on("optionEnv:"+t,function(e){var t=o,r="error: option '".concat(a[t(904)],"' value '")[t(1274)](e,t(902))[t(1274)](a[t(968)],"' is invalid.");n(e,r,t(1392))}),this}},{key:"_optionEx",value:function(e,t,r,n,i){var a=d;if(_typeof(t)==a(1355)&&t instanceof u)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");var o,t=this[a(661)](t,r);return t[a(1861)](!!e.mandatory),"function"==typeof n?t[a(830)](i).argParser(n):n instanceof RegExp?(o=n,n=function(e,t){e=o[a(1823)](e);return e?e[0]:t},t[a(830)](i)[a(1530)](n)):t[a(830)](n),this[a(923)](t)}},{key:d(422),value:function(e,t,r,n){return this[d(828)]({},e,t,r,n)}},{key:"requiredOption",value:function(e,t,r,n){return this[d(828)]({mandatory:!0},e,t,r,n)}},{key:d(468),value:function(){var e=d,t=!(0<arguments[e(1468)]&&void 0!==arguments[0])||arguments[0];return this[e(492)]=!!t,this}},{key:d(1130),value:function(){var e=d,t=!(0<arguments[e(1468)]&&void 0!==arguments[0])||arguments[0];return this[e(1313)]=!!t,this}},{key:d(474),value:function(){var e=d,t=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];return this[e(556)]=!!t,this}},{key:"enablePositionalOptions",value:function(){var e=d,t=!(0<arguments[e(1468)]&&void 0!==arguments[0])||arguments[0];return this[e(1513)]=!!t,this}},{key:"passThroughOptions",value:function(){var e=d,t=!(0<arguments[e(1468)]&&void 0!==arguments[0])||arguments[0];if(this._passThroughOptions=!!t,this[e(538)]&&t&&!this.parent[e(1513)])throw new Error(e(640));return this}},{key:"storeOptionsAsProperties",value:function(){var e=d,t=!(0<arguments[e(1468)]&&void 0!==arguments[0])||arguments[0];if(this[e(461)]=!!t,this[e(790)][e(1468)])throw new Error("call .storeOptionsAsProperties() before adding options");return this}},{key:d(1285),value:function(e){var t=d;return(this[t(461)]?this:this[t(1952)])[e]}},{key:d(700),value:function(e,t){var r=d;return this[r(461)]?this[e]=t:this[r(1952)][e]=t,this}},{key:d(953),value:function(e,t,r){var n=d;return this.setOptionValue(e,t),this[n(584)][e]=r,this}},{key:"getOptionValueSource",value:function(e){return this[d(584)][e]}},{key:d(1654),value:function(e,t){var r,n=d;if(void 0!==e&&!Array.isArray(e))throw new Error(n(536));switch(t=t||{},void 0===e&&(e=p[n(1898)],p[n(1676)])&&p[n(1676)][n(1810)]&&(t.from=n(1810)),this[n(745)]=e[n(1740)](),t[n(1094)]){case void 0:case n(893):this[n(1414)]=e[1],r=e.slice(2);break;case n(1810):r=p.defaultApp?(this[n(1414)]=e[1],e.slice(2)):e.slice(1);break;case"user":r=e.slice(0);break;default:throw new Error(n(1439)[n(1274)](t[n(1094)],n(1999)))}return!this[n(452)]&&this[n(1414)]&&this.nameFromFilename(this[n(1414)]),this[n(452)]=this[n(452)]||n(1240),r}},{key:d(851),value:function(e,t){e=this[d(1654)](e,t);return this._parseCommand([],e),this}},{key:"parseAsync",value:(r=_asyncToGenerator(_regenerator().m(function e(r,n){var i;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return i=this[t(1654)](r,n),e.n=1,this[t(747)]([],i);case 1:return e.a(2,this)}},e,this)})),function(e,t){return r[_0xa05d(1189)](this,arguments)})},{key:d(1962),value:function(n,e){var i=d,a=(e=e[i(1740)](),[i(1424),i(520),i(1807),i(1904),i(1506)]);function t(e,t){var r=i,n=l[r(595)](e,t);return v[r(1686)](n)?n:!a.includes(l.extname(t))&&(e=a[r(1498)](function(e){var t=r;return v[t(1686)](""[t(1274)](n)[t(1274)](e))}))?""[r(1274)](n)[r(1274)](e):void 0}this[i(1168)](),this[i(542)]();var r,o,s,u=n[i(1814)]||""[i(1274)](this._name,"-")[i(1274)](n[i(452)]),c=this[i(1104)]||"";if(this._scriptPath){try{r=v[i(1195)](this[i(1414)])}catch(e){r=this[i(1414)]}c=l[i(595)](l[i(846)](r),c)}c&&((r=t(c,u))||n[i(1814)]||!this[i(1414)]||(o=l[i(862)](this[i(1414)],l[i(1389)](this._scriptPath)))!==this[i(452)]&&(r=t(c,""[i(1274)](o,"-")[i(1274)](n[i(452)]))),u=r||u),o=a[i(986)](l[i(1389)](u)),(s=p[i(1295)]!==i(1029)?o?(e[i(1989)](u),e=b(p[i(1076)]).concat(e),h[i(1227)](p.argv[0],e,{stdio:i(1984)})):h[i(1227)](u,e,{stdio:i(1984)}):(e.unshift(u),e=b(p.execArgv).concat(e),h[i(1227)](p[i(1429)],e,{stdio:"inherit"}))).killed||[i(808),i(905),i(457),i(1028),i(839)][i(768)](function(t){p.on(t,function(){var e=_0xa05d;!1===s[e(1418)]&&null===s.exitCode&&s[e(481)](t)})});var f=this[i(1480)];f?s.on("close",function(){var e=i;f(new _(p[e(1151)]||0,"commander.executeSubCommandAsync",e(1472)))}):s.on("close",p[i(549)].bind(p)),s.on(i(1308),function(e){var t,r=i;if(e[r(1020)]===r(1003))throw t=c?r(1667)[r(1274)](c,"'"):r(1800),t="'"[r(1274)](u,r(901))[r(1274)](n[r(452)],r(1493)).concat(t),new Error(t);if(e[r(1020)]===r(486))throw new Error("'".concat(u,"' not executable"));f?((t=new _(1,"commander.executeSubCommandAsync",r(1145))).nestedError=e,f(t)):p[r(549)](1)}),this[i(1471)]=s}},{key:d(1252),value:function(e,t,r){var n=d,i=this,a=this[n(907)](e);return a||this[n(1970)]({error:!0}),e=this[n(822)](void 0,a,n(551)),this[n(516)](e,function(){var e=n;if(!a[e(772)])return a[e(747)](t,r);i[e(1962)](a,t.concat(r))})}},{key:d(1929),value:function(){var n=d,i=this;this[n(1232)][n(768)](function(e,t){var r=n;e[r(1557)]&&null==i[r(1767)][t]&&i[r(878)](e[r(1943)]())}),!(0<this[n(1232)][n(1468)]&&this[n(1232)][this._args[n(1468)]-1][n(853)])&&this[n(1767)].length>this[n(1232)][n(1468)]&&this[n(529)](this.args)}},{key:"_processArguments",value:function(){function i(t,r,n){var i=_0xa05d,e=r;if(null!==r&&t[i(1344)])try{e=t[i(1344)](r,n)}catch(e){throw e[i(1020)]===i(1820)&&(n="error: command-argument value '"[i(1274)](r,i(1245))[i(1274)](t[i(1943)](),i(1552))[i(1274)](e[i(1100)]),o[i(1308)](n,{exitCode:e.exitCode,code:e[i(1020)]})),e}return e}var a=d,o=this,s=(this[a(1929)](),[]);this._args.forEach(function(r,e){var t=a,n=r.defaultValue;r.variadic?e<o.args[t(1468)]?(n=o[t(1767)][t(1740)](e),r.parseArg&&(n=n[t(780)](function(e,t){return i(r,t,e)},r[t(465)]))):void 0===n&&(n=[]):e<o[t(1767)].length&&(n=o[t(1767)][e],r[t(1344)])&&(n=i(r,n,r[t(465)])),s[e]=n}),this.processedArgs=s}},{key:d(516),value:function(e,t){var r=d;return e&&e[r(2009)]&&typeof e.then==r(1976)?e[r(2009)](function(){return t()}):t()}},{key:d(1825),value:function(e,r){var n=d,i=this,a=e,o=[];return w(this)[n(413)]().filter(function(e){return void 0!==e[n(983)][r]})[n(768)](function(t){t._lifeCycleHooks[r].forEach(function(e){o[_0xa05d(1181)]({hookedCommand:t,callback:e})})}),r===n(699)&&o[n(413)](),o[n(768)](function(t){var r=n;a=i[r(516)](a,function(){var e=r;return t.callback(t[e(1815)],i)})}),a}},{key:d(822),value:function(e,t,r){var n=d,i=this,a=e;return void 0!==this[n(983)][r]&&this[n(983)][r].forEach(function(e){a=i[n(516)](a,function(){return e(i,t)})}),a}},{key:"_parseCommand",value:function(t,r){var n=d,i=this,a=this.parseOptions(r);if(this[n(453)](),this[n(870)](),t=t[n(1274)](a[n(1531)]),r=a[n(1875)],this[n(1767)]=t[n(1274)](r),t&&this._findCommand(t[0]))return this[n(1252)](t[0],t[n(1740)](1),r);if(this[n(1870)]()&&t[0]===this[n(952)])return 1===t[n(1468)]&&this[n(1970)](),this[n(1252)](t[1],[],[this[n(1012)]]);if(this[n(1651)])return y(this,r),this._dispatchSubcommand(this._defaultCommandName,t,r);!this[n(1574)][n(1468)]||0!==this[n(1767)][n(1468)]||this._actionHandler||this[n(1651)]||this.help({error:!0}),y(this,a.unknown),this[n(1168)](),this[n(542)]();function e(){var e=n;0<a[e(1875)][e(1468)]&&i.unknownOption(a.unknown[0])}var o,s=n(1177).concat(this[n(1943)]());if(this._actionHandler)return e(),this[n(877)](),o=this[n(1825)](o,n(1091)),o=this[n(516)](o,function(){return i[n(1522)](i.processedArgs)}),this[n(538)]&&(o=this[n(516)](o,function(){var e=n;i[e(538)][e(1229)](s,t,r)})),o=this[n(1825)](o,"postAction");if(this[n(538)]&&this[n(538)][n(1275)](s))e(),this[n(877)](),this[n(538)].emit(s,t,r);else if(t[n(1468)]){if(this._findCommand("*"))return this[n(1252)]("*",t,r);this[n(1275)](n(1707))?this[n(1229)](n(1707),t,r):this[n(1574)].length?this[n(1466)]():(e(),this[n(877)]())}else this[n(1574)].length?(e(),this[n(1970)]({error:!0})):(e(),this[n(877)]())}},{key:d(907),value:function(r){var n=d;if(r)return this[n(1574)][n(1498)](function(e){var t=n;return e[t(452)]===r||e[t(635)].includes(r)})}},{key:d(1060),value:function(t){var e=d;return this[e(790)][e(1498)](function(e){return e.is(t)})}},{key:"_checkForMissingMandatoryOptions",value:function(){for(var e=d,t=this;t;t=t[e(538)])(r=>{var n=_0xa05d;r[n(790)][n(768)](function(e){var t=n;e.mandatory&&void 0===r.getOptionValue(e.attributeName())&&r[t(662)](e)})})(t)}},{key:d(1092),value:function(){var i=d,a=this,t=this[i(790)][i(1486)](function(e){var t=i,e=e[t(776)]();return void 0!==a[t(1285)](e)&&a[t(1372)](e)!==t(830)});t[i(1486)](function(e){var t=i;return 0<e[t(677)][t(1468)]})[i(768)](function(r){var n=i,e=t[n(1498)](function(e){var t=n;return r[t(677)][t(986)](e[t(776)]())});e&&a[n(650)](r,e)})}},{key:d(542),value:function(){for(var e=d,t=this;t;t=t[e(538)])t[e(1092)]()}},{key:d(503),value:function(e){var t=d,r=[],n=[],i=r,a=e[t(1740)]();function o(e){return 1<e[t(1468)]&&"-"===e[0]}for(var s=null;a[t(1468)];){var u=a[t(1644)]();if("--"===u){i===n&&i[t(1181)](u),(f=i)[t(1181)][t(1189)](f,_toConsumableArray(a));break}if(s&&!o(u))this[t(1229)](t(749)[t(1274)](s[t(1943)]()),u);else{if(s=null,o(u)){var c,f=this[t(1060)](u);if(f){f[t(1557)]?(void 0===(c=a.shift())&&this[t(1010)](f),this.emit(t(749)[t(1274)](f[t(1943)]()),c)):f[t(1926)]?(c=null,0<a[t(1468)]&&!o(a[0])&&(c=a[t(1644)]()),this.emit(t(749).concat(f[t(1943)]()),c)):this[t(1229)]("option:"[t(1274)](f[t(1943)]())),s=f[t(853)]?f:null;continue}}if(2<u[t(1468)]&&"-"===u[0]&&"-"!==u[1]){var h=this._findOption("-"[t(1274)](u[1]));if(h){h[t(1557)]||h[t(1926)]&&this[t(492)]?this[t(1229)]("option:"[t(1274)](h[t(1943)]()),u[t(1740)](2)):(this[t(1229)](t(749)[t(1274)](h[t(1943)]())),a.unshift("-"[t(1274)](u[t(1740)](2))));continue}}if(/^--[^=]+=/[t(1428)](u)){var h=u[t(999)]("="),l=this[t(1060)](u[t(1740)](0,h));if(l&&(l[t(1557)]||l[t(1926)])){this[t(1229)](t(749)[t(1274)](l[t(1943)]()),u[t(1740)](h+1));continue}}if(o(u)&&(i=n),(this[t(1513)]||this._passThroughOptions)&&0===r.length&&0===n.length){if(this[t(907)](u)){r[t(1181)](u),0<a[t(1468)]&&n[t(1181)].apply(n,_toConsumableArray(a));break}if(u===this._helpCommandName&&this[t(1870)]()){r[t(1181)](u),0<a[t(1468)]&&r[t(1181)][t(1189)](r,_toConsumableArray(a));break}if(this[t(1651)]){n[t(1181)](u),0<a[t(1468)]&&n[t(1181)].apply(n,_toConsumableArray(a));break}}if(this[t(1026)]){i[t(1181)](u),0<a[t(1468)]&&(l=i).push[t(1189)](l,_toConsumableArray(a));break}i[t(1181)](u)}}return{operands:r,unknown:n}}},{key:"opts",value:function(){var e=d;if(this[e(461)]){for(var t={},r=this.options[e(1468)],n=0;n<r;n++){var i=this.options[n].attributeName();t[i]=i===this[e(1075)]?this._version:this[i]}return t}return this[e(1952)]}},{key:d(1459),value:function(){var n=d;return w(this)[n(780)](function(e,t){var r=n;return Object[r(1224)](e,t[r(1749)]())},{})}},{key:d(1308),value:function(e,t){var r=d,t=(this[r(550)][r(1460)](""[r(1274)](e,"\n"),this[r(550)].writeErr),typeof this[r(1417)]==r(1265)?this[r(550)].writeErr(""[r(1274)](this[r(1417)],"\n")):this[r(1417)]&&(this[r(550)][r(560)]("\n"),this[r(827)]({error:!0})),t||{}),n=t[r(1151)]||1,t=t[r(1020)]||"commander.error";this[r(581)](n,t,e)}},{key:d(453),value:function(){var n=d,i=this;this[n(790)][n(768)](function(e){var t,r=n;e[r(968)]&&e[r(968)]in p[r(1392)]&&(t=e[r(776)](),void 0!==i[r(1285)](t)&&![r(830),r(746),r(1392)][r(986)](i[r(1372)](t))||(e[r(1557)]||e[r(1926)]?i[r(1229)](r(1541)[r(1274)](e[r(1943)]()),p[r(1392)][e[r(968)]]):i.emit(r(1541)[r(1274)](e[r(1943)]()))))})}},{key:d(870),value:function(){function i(e){var t=a;return void 0!==o[t(1285)](e)&&![t(830),t(642)][t(986)](o.getOptionValueSource(e))}var a=d,o=this,r=new f(this[a(790)]);this[a(790)][a(1486)](function(e){var t=a;return void 0!==e[t(642)]&&i(e.attributeName())&&r[t(456)](o.getOptionValue(e[t(776)]()),e)})[a(768)](function(r){var n=a;Object[n(1109)](r[n(642)])[n(1486)](function(e){return!i(e)}).forEach(function(e){var t=n;o.setOptionValueWithSource(e,r[t(642)][e],t(642))})})}},{key:d(878),value:function(e){var t=d,e=t(1745)[t(1274)](e,"'");this[t(1308)](e,{code:"commander.missingArgument"})}},{key:d(1010),value:function(e){var t=d,e=t(1161)[t(1274)](e[t(904)],"' argument missing");this[t(1308)](e,{code:"commander.optionMissingArgument"})}},{key:d(662),value:function(e){var t=d,e=t(1001)[t(1274)](e.flags,t(1844));this[t(1308)](e,{code:t(1772)})}},{key:d(650),value:function(e,t){function r(e){var t=_0xa05d,r=(e=i(e))[t(776)]();return o[t(1372)](r)===t(1392)?t(1694)[t(1274)](e[t(968)],"'"):t(1756)[t(1274)](e[t(904)],"'")}var n=d,o=this,i=function(e){var t=_0xa05d,r=e[t(776)](),n=o[t(1285)](r),i=o[t(790)][t(1498)](function(e){return e[t(856)]&&r===e.attributeName()}),a=o[t(790)][t(1498)](function(e){return!e.negate&&r===e.attributeName()});return i&&(void 0===i[t(1753)]&&!1===n||void 0!==i[t(1753)]&&n===i[t(1753)])?i:a||e},e=n(817).concat(r(e),n(1697))[n(1274)](r(t));this[n(1308)](e,{code:n(418)})}},{key:d(1013),value:function(e){var t=d;if(!this[t(1313)]){var r="";if(e[t(1528)]("--")&&this[t(625)]){var n=[],i=this;do{var a=i.createHelp().visibleOptions(i)[t(1486)](function(e){return e[t(459)]})[t(841)](function(e){return e[t(459)]}),n=n[t(1274)](a),i=i[t(538)]}while(i&&!i[t(1513)]);r=g(e,n)}e=t(1839)[t(1274)](e,"'")[t(1274)](r);this.error(e,{code:"commander.unknownOption"})}}},{key:d(529),value:function(e){var t,r,n=d;this._allowExcessArguments||(t=1===(r=this[n(1232)][n(1468)])?"":"s",r=n(1889)[n(1274)](this.parent?n(799)[n(1274)](this.name(),"'"):"",n(891))[n(1274)](r," argument")[n(1274)](t," but got ")[n(1274)](e[n(1468)],"."),this[n(1308)](r,{code:n(948)}))}},{key:d(1466),value:function(){var r,n=d,e=this[n(1767)][0],t="",e=(this._showSuggestionAfterError&&(r=[],this.createHelp()[n(1916)](this)[n(768)](function(e){var t=n;r[t(1181)](e.name()),e[t(1776)]()&&r.push(e.alias())}),t=g(e,r)),n(633).concat(e,"'")[n(1274)](t));this[n(1308)](e,{code:"commander.unknownCommand"})}},{key:"version",value:function(t,e,r){var n=d,i=this;if(void 0===t)return this[n(1521)];this[n(1521)]=t,e=e||n(798),r=r||n(1475);e=this.createOption(e,r);return this[n(1075)]=e[n(776)](),this[n(790)][n(1181)](e),this.on(n(749)+e.name(),function(){var e=n;i[e(550)][e(1103)]("".concat(t,"\n")),i[e(581)](0,"commander.version",t)}),this}},{key:d(1435),value:function(e,t){var r=d;return void 0===e&&void 0===t?this[r(666)]:(this[r(666)]=e,t&&(this._argsDescription=t),this)}},{key:d(895),value:function(e){var t=d;return void 0===e?this[t(1155)]:(this[t(1155)]=e,this)}},{key:"alias",value:function(e){var t=d;if(void 0===e)return this[t(635)][0];var r=this;if(e===(r=0!==this.commands[t(1468)]&&this.commands[this.commands[t(1468)]-1]._executableHandler?this[t(1574)][this[t(1574)][t(1468)]-1]:r)[t(452)])throw new Error(t(897));return r[t(635)][t(1181)](e),this}},{key:d(1806),value:function(e){var t=this;return void 0===e?this[d(635)]:(e.forEach(function(e){return t.alias(e)}),this)}},{key:d(837),value:function(e){var t,r=d;return void 0===e?this[r(1611)]?this._usage:(t=this[r(1232)][r(841)](function(e){return o(e)}),[][r(1274)](this.options[r(1468)]||this._hasHelpOption?r(1852):[],this.commands.length?r(1174):[],this._args[r(1468)]?t:[])[r(1681)](" ")):(this[r(1611)]=e,this)}},{key:d(1943),value:function(e){var t=d;return void 0===e?this[t(452)]:(this[t(452)]=e,this)}},{key:"nameFromFilename",value:function(e){var t=d;return this[t(452)]=l.basename(e,l[t(1389)](e)),this}},{key:d(1865),value:function(e){var t=d;return void 0===e?this[t(1104)]:(this[t(1104)]=e,this)}},{key:d(1067),value:function(e){var t=d,r=this.createHelp();return void 0===r[t(1408)]&&(r[t(1408)]=e&&e[t(1308)]?this[t(550)][t(1282)]():this[t(550)][t(1451)]()),r[t(1504)](this,r)}},{key:"_getHelpContext",value:function(e){var r=d,n=this,t={error:!!(e=e||{})[r(1308)]},i=t.error?function(e){var t=r;return n._outputConfiguration[t(560)](e)}:function(e){var t=r;return n[t(550)][t(1103)](e)};return t[r(819)]=e[r(819)]||i,t[r(1399)]=this,t}},{key:d(827),value:function(e){var t,r=d,n=("function"==typeof e&&(t=e,e=void 0),this[r(1700)](e)),e=(w(this)[r(413)]()[r(768)](function(e){return e[r(1229)]("beforeAllHelp",n)}),this.emit(r(787),n),this[r(1067)](n));if(t&&typeof(e=t(e))!=r(1265)&&!Buffer[r(1463)](e))throw new Error(r(626));n[r(819)](e),this[r(1229)](this[r(1012)]),this[r(1229)](r(1024),n),w(this).forEach(function(e){var t=r;return e[t(1229)](t(1211),n)})}},{key:d(812),value:function(e,t){var r=d;return"boolean"==typeof e?this[r(607)]=e:(this._helpFlags=e||this._helpFlags,this[r(1093)]=t||this[r(1093)],e=c(this[r(1095)]),this[r(1062)]=e[r(1149)],this._helpLongFlag=e[r(1445)]),this}},{key:d(1970),value:function(e){var t=d,r=(this[t(827)](e),p[t(1151)]||0);0===r&&e&&typeof e!=t(1976)&&e[t(1308)]&&(r=1),this[t(581)](r,t(932),"(outputHelp)")}},{key:d(1956),value:function(e,n){var i=d,t=[i(1965),i(1612),i(813),i(778)];if(t[i(986)](e))return e=""[i(1274)](e,i(572)),this.on(e,function(e){var t=i,r="function"==typeof n?n({error:e.error,command:e.command}):n;r&&e[t(819)](""[t(1274)](r,"\n"))}),this;throw new Error(i(602)[i(1274)](t[i(1681)]("', '"),"'"))}}]));function m(e){var t,r=_0xa05d;return _classCallCheck(this,m),(t=_callSuper(this,m))[r(1574)]=[],t[r(790)]=[],t[r(538)]=null,t._allowUnknownOption=!1,t._allowExcessArguments=!0,t[r(1232)]=[],t[r(1767)]=[],t[r(745)]=[],t[r(414)]=[],t[r(1414)]=null,t[r(452)]=e||"",t[r(1952)]={},t._optionValueSources={},t._storeOptionsAsProperties=!1,t[r(1522)]=null,t._executableHandler=!1,t._executableFile=null,t[r(1104)]=null,t[r(1651)]=null,t[r(1480)]=null,t._aliases=[],t[r(492)]=!0,t._description="",t[r(1155)]="",t._argsDescription=void 0,t[r(1513)]=!1,t[r(1026)]=!1,t[r(983)]={},t[r(1417)]=!1,t[r(625)]=!0,t[r(550)]={writeOut:function(e){var t=r;return p[t(693)][t(819)](e)},writeErr:function(e){var t=r;return p[t(1808)][t(819)](e)},getOutHelpWidth:function(){var e=r;return p[e(693)][e(883)]?p.stdout[e(1222)]:void 0},getErrHelpWidth:function(){var e=r;return p[e(1808)][e(883)]?p[e(1808)][e(1222)]:void 0},outputError:function(e,t){return t(e)}},t[r(1735)]=!1,t._hasHelpOption=!0,t[r(1095)]=r(1533),t._helpDescription=r(1701),t._helpShortFlag="-h",t[r(1012)]=r(705),t[r(1011)]=void 0,t._helpCommandName=r(1970),t[r(1848)]=r(1871),t[r(910)]=r(1701),t[r(1824)]={},t}function y(t,e){var r=i;t[r(607)]&&e[r(1498)](function(e){return e===t[r(1012)]||e===t._helpShortFlag})&&(t[r(827)](),t[r(581)](0,r(1478),r(1449)))}function b(e){var o=i;return e[o(841)](function(e){var t,r,n,i,a=o;return e[a(1528)](a(1931))&&(r=a(1473),n=a(943),null!==(i=e[a(1339)](/^(--inspect(-brk)?)$/))?t=i[1]:null!==(i=e[a(1339)](/^(--inspect(-brk|-port)?)=([^:]+)$/))?(t=i[1],/^\d+$/.test(i[3])?n=i[3]:r=i[3]):null!==(i=e[a(1339)](/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(t=i[1],r=i[3],n=i[4]),t)&&"0"!==n?"".concat(t,"=")[a(1274)](r,":")[a(1274)](parseInt(n)+1):e})}function w(e){for(var t=i,r=[],n=e;n;n=n.parent)r[t(1181)](n);return r}e[i(1770)]=n}),U=t(function(e,t){var r=X,n=x()[r(947)],i=G().Command,a=k(),o=a[r(1975)],a=a[r(1066)],s=E().Help,u=C()[r(975)];((e=t[r(1583)]=new i)[r(1240)]=e)[r(947)]=n,e.Command=i,e[r(1975)]=o,e[r(572)]=s,e.InvalidArgumentError=a,e[r(1837)]=a,e[r(975)]=u}),F=t(function(e,t){var u=X;"u"<(typeof process===u(1896)?"undefined":_typeof(process))||!process[u(1573)]||0===process[u(1573)].indexOf(u(1903))||0===process.version[u(999)](u(844))&&0!==process.version[u(999)](u(1517))?t.exports={nextTick:function(e,t,r,n){var i=u;if(typeof e!=i(1976))throw new TypeError(i(1444));var a,o,s=arguments[i(1468)];switch(s){case 0:case 1:return process[i(1642)](e);case 2:return process[i(1642)](function(){e[i(971)](null,t)});case 3:return process.nextTick(function(){e[i(971)](null,t,r)});case 4:return process[i(1642)](function(){e[i(971)](null,t,r,n)});default:for(a=new Array(s-1),o=0;o<a[i(1468)];)a[o++]=arguments[o];return process[i(1642)](function(){e[i(1189)](null,a)})}}}:t.exports=process}),H=t(function(e,t){var r=X,n={}[r(1116)];t.exports=Array[r(1462)]||function(e){var t=r;return n.call(e)==t(1917)}}),I=t(function(e,t){var r=X;t.exports=require(r(713))}),P=t(function(e,t){var i=X,r=require(i(871)),a=r.Buffer;function n(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return a(e,t,r)}a[i(1094)]&&a.alloc&&a[i(596)]&&a.allocUnsafeSlow?t[i(1583)]=r:(n(r,e),e[i(1940)]=o),n(a,o),o[i(1094)]=function(e,t,r){if("number"==typeof e)throw new TypeError(i(1994));return a(e,t,r)},o[i(678)]=function(e,t,r){var n=i;if(typeof e!=n(1773))throw new TypeError(n(1778));e=a(e);return void 0!==t?"string"==typeof r?e[n(1630)](t,r):e[n(1630)](t):e[n(1630)](0),e},o.allocUnsafe=function(e){if(typeof e!=i(1773))throw new TypeError("Argument must be a number");return a(e)},o[i(1081)]=function(e){var t=i;if(typeof e!=t(1773))throw new TypeError(t(1778));return r[t(1446)](e)}}),R=t(function(e){var r=X;function n(e){return Object[r(1111)].toString.call(e)}e[r(1462)]=function(e){var t=_0xa05d;return Array[t(1462)]?Array[t(1462)](e):n(e)===t(1917)},e[r(1682)]=function(e){return typeof e==r(1961)},e.isNull=function(e){return null===e},e[r(1098)]=function(e){return null==e},e[r(1405)]=function(e){return typeof e==r(1773)},e[r(1680)]=function(e){return"string"==typeof e},e.isSymbol=function(e){var t=r;return _typeof(e)==t(1369)},e[r(1260)]=function(e){return void 0===e},e[r(997)]=function(e){return"[object RegExp]"===n(e)},e[r(1857)]=function(e){return"object"==_typeof(e)&&null!==e},e.isDate=function(e){var t=r;return n(e)===t(1726)},e[r(569)]=function(e){var t=r;return n(e)===t(1884)||e instanceof Error},e.isFunction=function(e){return typeof e==r(1976)},e[r(417)]=function(e){var t=r;return null===e||"boolean"==typeof e||typeof e==t(1773)||typeof e==t(1265)||_typeof(e)==t(1369)||"u"<_typeof(e)},e[r(1463)]=require(r(871))[r(1940)].isBuffer}),M=t(function(e,t){var i=X;"function"==typeof Object.create?t[i(1583)]=function(e,t){var r=i;t&&(e[r(1154)]=t,e[r(1111)]=Object.create(t[r(1111)],{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){var r,n=i;t&&(e.super_=t,(r=function(){}).prototype=t[n(1111)],e[n(1111)]=new r,e.prototype[n(630)]=e)}}),j=t(function(e,t){var r,n=X;try{if(typeof(r=require(n(439))).inherits!=n(1976))throw"";t[n(1583)]=r[n(568)]}catch(e){t[n(1583)]=M()}}),Z=t(function(e,t){var u=X;var c,f=P()[u(1940)],r=require(u(439));function n(){var e=_0xa05d,t=_0xa05d;if(!(this instanceof n))throw new TypeError(t(848));this[e(835)]=null,this[e(1027)]=null,this[e(1468)]=0}t[u(1583)]=(n[(c=u)(1111)].push=function(e){var t=c,e={data:e,next:null};0<this[t(1468)]?this.tail[t(1387)]=e:this[t(835)]=e,this[t(1027)]=e,++this[t(1468)]},n.prototype[c(1989)]=function(e){var t=c,e={data:e,next:this[t(835)]};0===this[t(1468)]&&(this[t(1027)]=e),this[t(835)]=e,++this[t(1468)]},n[c(1111)][c(1644)]=function(){var e,t=c;if(0!==this[t(1468)])return e=this[t(835)][t(1278)],1===this.length?this[t(835)]=this[t(1027)]=null:this.head=this[t(835)][t(1387)],--this.length,e},n.prototype[c(1289)]=function(){var e=c;this[e(835)]=this[e(1027)]=null,this[e(1468)]=0},n[c(1111)][c(1681)]=function(e){var t=c;if(0===this[t(1468)])return"";for(var r=this.head,n=""+r[t(1278)];r=r[t(1387)];)n+=e+r[t(1278)];return n},n[c(1111)][c(1274)]=function(e){var t=c;if(0===this.length)return f[t(678)](0);for(var r,n,i,a=f[t(596)](e>>>0),o=this[t(835)],s=0;o;)r=o[t(1278)],n=a,i=s,r[u(796)](n,i),s+=o[t(1278)][t(1468)],o=o.next;return a},n),r&&r[u(889)]&&r[u(889)][u(1615)]&&(t[u(1583)].prototype[r[u(889)][u(1615)]]=function(){var e=u,t=r.inspect({length:this[e(1468)]});return this[e(630)][e(1943)]+" "+t})}),N=t(function(e,t){var r=X,o=F();function s(e,t){e.emit("error",t)}t[r(1583)]={destroy:function(e,r){var n=_0xa05d,i=this,t=this[n(1359)]&&this._readableState[n(561)],a=this[n(535)]&&this[n(535)][n(561)];return t||a?r?r(e):e&&(this[n(535)]?this[n(535)][n(567)]||(this[n(535)].errorEmitted=!0,o[n(1642)](s,this,e)):o.nextTick(s,this,e)):(this[n(1359)]&&(this[n(1359)].destroyed=!0),this._writableState&&(this[n(535)][n(561)]=!0),this[n(646)](e||null,function(e){var t=n;!r&&e?i[t(535)]?i[t(535)][t(567)]||(i._writableState.errorEmitted=!0,o.nextTick(s,i,e)):o.nextTick(s,i,e):r&&r(e)})),this},undestroy:function(){var e=_0xa05d;this[e(1359)]&&(this[e(1359)][e(561)]=!1,this[e(1359)][e(1127)]=!1,this[e(1359)][e(1526)]=!1,this[e(1359)][e(502)]=!1),this[e(535)]&&(this[e(535)][e(561)]=!1,this[e(535)].ended=!1,this[e(535)][e(1351)]=!1,this[e(535)][e(1711)]=!1,this[e(535)][e(1566)]=!1,this[e(535)].finished=!1,this[e(535)][e(567)]=!1)}}}),q=t(function(e,t){var r=X;t[r(1583)]=require("util")[r(620)]}),d=t(function(e,t){var p=X,_=F();function h(o){var e=p,s=this;this.next=null,this[e(644)]=null,this[e(605)]=function(){var e=s,t=o,r=void 0,n=p,i=e[n(644)];for(e[n(644)]=null;i;){var a=i[n(1798)];t.pendingcb--,a(r),i=i[n(1387)]}t[n(1005)][n(1387)]=e}}t[p(1583)]=c;var o,d=!process[p(685)]&&-1<[p(521),p(1420)][p(999)](process[p(1573)][p(1740)](0,5))?setImmediate:_.nextTick,t=(c[p(720)]=s,Object[p(1536)](R())),r=(t[p(568)]=j(),{deprecate:q()}),n=I(),g=P()[p(1940)],m=(("undefined"==typeof global?p(1896):_typeof(global))<"u"?global:(typeof window===p(1896)?"undefined":_typeof(window))<"u"?window:(typeof self===p(1896)?"undefined":_typeof(self))<"u"?self:{})[p(1268)]||function(){};var i,a=N();function y(){}function s(e,l){var t=p,r=(o=o||L(),e=e||{},l instanceof o),n=(this[t(1423)]=!!e[t(1423)],r&&(this[t(1423)]=this[t(1423)]||!!e[t(1272)]),e[t(1643)]),i=e[t(903)],a=this[t(1423)]?16:16384,n=(n||0===n?this[t(1643)]=n:r&&(i||0===i)?this[t(1643)]=i:this.highWaterMark=a,this[t(1643)]=Math.floor(this[t(1643)]),this.finalCalled=!1,this[t(1719)]=!1,this.ending=!1,this[t(1526)]=!1,this.finished=!1,(this[t(561)]=!1)===e.decodeStrings);this[t(1761)]=!n,this[t(756)]=e[t(756)]||t(989),this[t(1468)]=0,this.writing=!1,this[t(1982)]=0,this[t(1142)]=!0,this[t(800)]=!1,this[t(1927)]=function(e){e=e,n=(t=l)[(r=p)(535)],i=n[r(1142)],a=n[r(741)];var t,r,n,i,a,o=n,s=p;{var u,c,f,h;(o[s(864)]=!1,o[s(741)]=null,o[s(1468)]-=o[s(1777)],o[s(1777)]=0,e)?(o=t,u=i,c=e,f=a,--(s=n)[(h=p)(1491)],u?(_.nextTick(f,c),_[h(1642)](x,o,s),o[h(535)][h(567)]=!0,o[h(1229)]("error",c)):(f(c),o[h(535)][h(567)]=!0,o.emit(h(1308),c),x(o,s))):((e=k(n))||n[r(1982)]||n[r(800)]||!n[r(1277)]||w(t,n),i?d(v,t,n,e,a):v(t,n,e,a))}},this[t(741)]=null,this.writelen=0,this[t(1277)]=null,this[t(1833)]=null,this[t(1491)]=0,this[t(1566)]=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this[t(1005)]=new h(this)}t[p(568)](c,n),s.prototype[p(448)]=function(){for(var e=p,t=this[e(1277)],r=[];t;)r[e(1181)](t),t=t[e(1387)];return r};var u=p;try{Object[u(1453)](s[u(1111)],u(871),{get:r[u(620)](function(){return this[u(448)]()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.",u(523))})}catch(e){}function c(e){var t=p;if(o=o||L(),!(i[t(971)](c,this)||this instanceof o))return new c(e);this[t(535)]=new s(e,this),this[t(1830)]=!0,e&&(typeof e[t(819)]==t(1976)&&(this[t(1070)]=e.write),typeof e.writev==t(1976)&&(this._writev=e[t(649)]),typeof e[t(1577)]==t(1976)&&(this[t(646)]=e[t(1577)]),typeof e.final==t(1976))&&(this[t(668)]=e[t(1494)]),n[t(971)](this)}function b(e,t,r,n,i,a,o){var s=p;t.writelen=n,t[s(741)]=o,t.writing=!0,t.sync=!0,r?e._writev(i,t[s(1927)]):e[s(1070)](i,a,t[s(1927)]),t[s(1142)]=!1}function v(e,t,r,n){var i,a,o=p;r||(r=e,a=p,0===(i=t).length&&i[a(1719)]&&(i[a(1719)]=!1,r[a(1229)](a(441)))),t[o(1491)]--,n(),x(e,t)}function w(e,t){var r=p,n=(t[r(800)]=!0,t[r(1277)]);if(e[r(1434)]&&n&&n[r(1387)]){var i=t.bufferedRequestCount,a=new Array(i),i=t[r(1005)];i.entry=n;for(var o=0,s=!0;n;)(a[o]=n)[r(939)]||(s=!1),n=n[r(1387)],o+=1;a[r(517)]=s,b(e,t,!0,t[r(1468)],a,"",i.finish),t.pendingcb++,t[r(1833)]=null,i.next?(t.corkedRequestsFree=i[r(1387)],i[r(1387)]=null):t[r(1005)]=new h(t),t[r(779)]=0}else{for(;n;){var u=n.chunk,c=n[r(593)],f=n[r(1798)];if(b(e,t,!1,t.objectMode?1:u[r(1468)],u,c,f),n=n[r(1387)],t[r(779)]--,t[r(864)])break}null===n&&(t[r(1833)]=null)}t.bufferedRequest=n,t[r(800)]=!1}function k(e){var t=p;return e[t(1351)]&&0===e.length&&null===e[t(1277)]&&!e[t(1670)]&&!e.writing}function f(r,n){r._final(function(e){var t=_0xa05d;n[t(1491)]--,e&&r[t(1229)](t(1308),e),n[t(1566)]=!0,r[t(1229)](t(659)),x(r,n)})}function x(e,t){var r,n,i,a=p,o=k(t);return o&&(r=e,(n=t)[(i=p)(1566)]||n[i(1711)]||(typeof r[i(668)]==i(1976)?(n[i(1491)]++,n[i(1711)]=!0,_[i(1642)](f,r,n)):(n[i(1566)]=!0,r[i(1229)](i(659)))),0===t[a(1491)])&&(t[a(1670)]=!0,e[a(1229)]("finish")),o}typeof Symbol==p(1976)&&Symbol.hasInstance&&typeof Function[p(1111)][Symbol[p(1818)]]==p(1976)?(i=Function[p(1111)][Symbol[p(1818)]],Object[p(1453)](c,Symbol[p(1818)],{value:function(e){var t=p;return!!i[t(971)](this,e)||this===c&&e&&e[t(535)]instanceof s}})):i=function(e){return e instanceof this},c[p(1111)][p(1907)]=function(){var e=p;this[e(1229)](e(1308),new Error(e(597)))},c[p(1111)].write=function(e,t,r){var n,i,a,o,s,u,c,f,h=p,l=this[h(535)],d=!1,v=!l[h(1423)]&&(v=e,g[p(1463)](v)||v instanceof m);return v&&!g[h(1463)](e)&&(f=e,e=g.from(f)),typeof t==h(1976)&&(r=t,t=null),t=v?h(871):t||l[h(756)],typeof r!=h(1976)&&(r=y),l.ended?(f=this,s=r,u=p,c=new Error("write after end"),f[u(1229)](u(1308),c),_[u(1642)](s,c)):(v||(u=this,s=l,c=r,i=p,o=!(a=!0),null===(n=e)?o=new TypeError(i(1069)):typeof n==i(1265)||void 0===n||s[i(1423)]||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(u[i(1229)]("error",o),_[i(1642)](c,o),a=!1),a))&&(l[h(1491)]++,d=((e,t,r,n,i,a)=>{var o,s=p,u=(r||(u=((e,t,r)=>{var n=p;return t=e[n(1423)]||!1===e[n(1761)]||"string"!=typeof t?t:g[n(1094)](t,r)})(t,n,i),n!==u&&(r=!0,i=s(871),n=u)),t[s(1423)]?1:n[s(1468)]),c=(t[s(1468)]+=u,t[s(1468)]<t[s(1643)]);return c||(t[s(1719)]=!0),t[s(864)]||t[s(1982)]?(o=t[s(1833)],t[s(1833)]={chunk:n,encoding:i,isBuf:r,callback:a,next:null},o?o[s(1387)]=t[s(1833)]:t[s(1277)]=t[s(1833)],t.bufferedRequestCount+=1):b(e,t,!1,u,n,i,a),c})(this,l,v,e,t,r)),d},c[p(1111)][p(570)]=function(){var e=p;this[e(535)][e(1982)]++},c[p(1111)].uncork=function(){var e=p,t=this[e(535)];!t[e(1982)]||(t[e(1982)]--,t[e(864)])||t[e(1982)]||t[e(800)]||!t[e(1277)]||w(this,t)},c[p(1111)][p(2010)]=function(e){var t=p;if("string"==typeof e&&(e=e[t(863)]()),-1<[t(676),t(989),t(1281),t(1887),"binary",t(976),t(1193),t(1789),t(1585),t(1266),"raw"].indexOf((e+"").toLowerCase()))return this[t(535)].defaultEncoding=e,this;throw new TypeError(t(688)+e)},Object[p(1453)](c[p(1111)],p(903),{enumerable:!1,get:function(){var e=p;return this[e(535)][e(1643)]}}),c.prototype[p(1070)]=function(e,t,r){r(new Error("_write() is not implemented"))},c[p(1111)][p(1434)]=null,c[p(1111)].end=function(e,t,r){var n=p,i=this._writableState;typeof e==n(1976)?(r=e,t=e=null):typeof t==n(1976)&&(r=t,t=null),null!=e&&this.write(e,t),i[n(1982)]&&(i[n(1982)]=1,this[n(590)]()),i[n(1351)]||(e=this,t=r,n=p,(r=i).ending=!0,x(e,r),t&&(r[n(1670)]?_[n(1642)](t):e.once("finish",t)),r[n(1526)]=!0,e[n(1830)]=!1)},Object[p(1453)](c[p(1111)],p(561),{get:function(){var e=p;return void 0!==this[e(535)]&&this[e(535)][e(561)]},set:function(e){var t=p;this._writableState&&(this[t(535)][t(561)]=e)}}),c[p(1111)][p(1577)]=a[p(1577)],c[p(1111)][p(1605)]=a[p(1535)],c[p(1111)][p(646)]=function(e,t){this[p(1253)](),t(e)}}),L=t(function(e,t){var r,n,i,a=X,o=F(),s=Object[a(1109)]||function(e){var t,r=[];for(t in e)r.push(t);return r},t=(t.exports=f,Object[a(1536)](R())),u=(t[a(568)]=j(),v()),c=d();for(t.inherits(f,u),r=s(c.prototype),i=0;i<r[a(1468)];i++)n=r[i],f[a(1111)][n]||(f[a(1111)][n]=c[a(1111)][n]);function f(e){var t=a;if(!(this instanceof f))return new f(e);u[t(971)](this,e),c[t(971)](this,e),e&&!1===e.readable&&(this[t(613)]=!1),e&&!1===e[t(1830)]&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e[t(639)]&&(this[t(639)]=!1),this[t(1747)](t(1253),h)}function h(){var e=a;this[e(639)]||this[e(535)][e(1526)]||o[e(1642)](l,this)}function l(e){e[a(1253)]()}Object[a(1453)](f[a(1111)],a(903),{enumerable:!1,get:function(){var e=a;return this[e(535)][e(1643)]}}),Object[a(1453)](f[a(1111)],a(561),{get:function(){var e=a;return void 0!==this[e(1359)]&&void 0!==this[e(535)]&&this[e(1359)][e(561)]&&this[e(535)].destroyed},set:function(e){var t=a;void 0!==this._readableState&&void 0!==this[t(535)]&&(this._readableState.destroyed=e,this[t(535)][t(561)]=e)}}),f.prototype[a(646)]=function(e,t){var r=a;this[r(1181)](null),this.end(),o[r(1642)](t,e)}}),z=t(function(e){var o=X,n=P()[o(1940)],i=n[o(1191)]||function(e){var t=o;switch((e=""+e)&&e[t(863)]()){case t(676):case t(989):case"utf-8":case"ascii":case"binary":case t(976):case t(1193):case t(1789):case t(1585):case t(1266):case t(831):return!0;default:return!1}};function a(e){var t=o,r=(e=>{var t,r=o;if(!e)return r(989);for(;;)switch(e){case r(989):case"utf-8":return r(989);case"ucs2":case r(1789):case r(1585):case r(1266):return"utf16le";case r(1748):case r(1385):return r(1748);case r(976):case r(1887):case r(676):return e;default:if(t)return;e=(""+e)[r(863)](),t=!0}})(e);if(typeof r==t(1265)||n[t(1191)]!==i&&i(e))return r||e;throw new Error("Unknown encoding: "+e)}function t(e){var t,r=o;switch(this[r(593)]=a(e),this[r(593)]){case r(1585):this[r(1489)]=c,this[r(1253)]=f,t=4;break;case r(989):this[r(1728)]=u,t=4;break;case"base64":this[r(1489)]=h,this.end=l,t=3;break;default:return this[r(819)]=d,void(this.end=v)}this[r(1065)]=0,this[r(643)]=0,this[r(2018)]=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function u(e){var t,r,n=o,i=this[n(643)]-this[n(1065)],a=(t=this,r=o,128!=(192&(a=e)[0])?(t[r(1065)]=0,"�"):1<t[r(1065)]&&1<a[r(1468)]?128!=(192&a[1])?(t[r(1065)]=1,"�"):2<t[r(1065)]&&2<a[r(1468)]&&128!=(192&a[2])?(t[r(1065)]=2,"�"):void 0:void 0);return void 0!==a?a:this[n(1065)]<=e[n(1468)]?(e[n(796)](this[n(2018)],i,0,this[n(1065)]),this.lastChar[n(1116)](this[n(593)],0,this.lastTotal)):(e[n(796)](this.lastChar,i,0,e[n(1468)]),void(this[n(1065)]-=e[n(1468)]))}function c(e,t){var r=o;if((e[r(1468)]-t)%2!=0)return this.lastNeed=1,this.lastTotal=2,this[r(2018)][0]=e[e.length-1],e[r(1116)](r(1585),t,e[r(1468)]-1);t=e.toString(r(1585),t);if(t){var n=t[r(996)](t[r(1468)]-1);if(55296<=n&&n<=56319)return this[r(1065)]=2,this[r(643)]=4,this[r(2018)][0]=e[e[r(1468)]-2],this[r(2018)][1]=e[e.length-1],t.slice(0,-1)}return t}function f(e){var t,r=o,e=e&&e[r(1468)]?this[r(819)](e):"";return this[r(1065)]?(t=this[r(643)]-this[r(1065)],e+this[r(2018)][r(1116)](r(1585),0,t)):e}function h(e,t){var r=o,n=(e[r(1468)]-t)%3;return 0==n?e[r(1116)](r(976),t):(this[r(1065)]=3-n,this.lastTotal=3,1==n?this[r(2018)][0]=e[e[r(1468)]-1]:(this[r(2018)][0]=e[e.length-2],this[r(2018)][1]=e[e[r(1468)]-1]),e[r(1116)](r(976),t,e[r(1468)]-n))}function l(e){var t=o,e=e&&e[t(1468)]?this[t(819)](e):"";return this.lastNeed?e+this[t(2018)][t(1116)]("base64",0,3-this.lastNeed):e}function d(e){var t=o;return e[t(1116)](this[t(593)])}function v(e){var t=o;return e&&e[t(1468)]?this[t(819)](e):""}(e[o(985)]=t)[o(1111)].write=function(e){var t,r,n=o;if(0===e[n(1468)])return"";if(this[n(1065)]){if(void 0===(t=this[n(1728)](e)))return"";r=this[n(1065)],this[n(1065)]=0}else r=0;return r<e[n(1468)]?t?t+this[n(1489)](e,r):this[n(1489)](e,r):t||""},t[o(1111)][o(1253)]=function(e){var t=o,t=e&&e[t(1468)]?this.write(e):"";return this.lastNeed?t+"�":t},t.prototype[o(1489)]=function(e,t){var r=o,n=((e,t,r)=>{var n,i=o,a=t[i(1468)]-1;return a<r?0:0<=(n=s(t[a]))?(0<n&&(e[i(1065)]=n-1),n):--a<r||-2===n?0:0<=(n=s(t[a]))?(0<n&&(e[i(1065)]=n-2),n):!(--a<r||-2===n)&&0<=(n=s(t[a]))?(0<n&&(2===n?n=0:e.lastNeed=n-3),n):0})(this,e,t);if(!this[r(1065)])return e.toString(r(989),t);this.lastTotal=n;n=e.length-(n-this[r(1065)]);return e[r(796)](this.lastChar,0,n),e[r(1116)](r(989),t,n)},t[o(1111)][o(1728)]=function(e){var t=o;if(this[t(1065)]<=e.length)return e[t(796)](this[t(2018)],this[t(643)]-this[t(1065)],0,this.lastNeed),this[t(2018)][t(1116)](this.encoding,0,this[t(643)]);e[t(796)](this[t(2018)],this[t(643)]-this.lastNeed,0,e[t(1468)]),this[t(1065)]-=e[t(1468)]}}),v=t(function(e,t){function g(e,t){var r=m;return e[r(1197)](t)[r(1468)]}var o,m=X,y=F(),b=(t.exports=a,H()),n=(a[m(554)]=i,require(m(1671))[m(1166)],I()),d=P().Buffer,v=(("undefined"==typeof global?"undefined":_typeof(global))<"u"?global:(typeof window===m(1896)?m(1896):_typeof(window))<"u"?window:(typeof self===m(1896)?m(1896):_typeof(self))<"u"?self:{})[m(1268)]||function(){};var s,t=Object.create(R()),r=(t[m(568)]=j(),require(m(439))),w=void 0,w=r&&r.debuglog?r.debuglog(m(713)):function(){},u=Z(),r=N(),c=(t[m(568)](a,n),["error",m(1305),"destroy",m(509),m(782)]);function i(e,t){var r=m,t=(e=e||{},t instanceof(o=o||L())),n=(this[r(1423)]=!!e.objectMode,t&&(this[r(1423)]=this[r(1423)]||!!e[r(1152)]),e.highWaterMark),i=e[r(1479)],a=this[r(1423)]?16:16384;n||0===n?this[r(1643)]=n:t&&(i||0===i)?this[r(1643)]=i:this.highWaterMark=a,this[r(1643)]=Math[r(1836)](this[r(1643)]),this.buffer=new u,this.length=0,this[r(600)]=null,this.pipesCount=0,this[r(1063)]=null,this[r(1526)]=!1,this.endEmitted=!1,this.reading=!1,this[r(1142)]=!0,this[r(1794)]=!1,this[r(1202)]=!1,this.readableListening=!1,this[r(1173)]=!1,this[r(561)]=!1,this[r(756)]=e.defaultEncoding||"utf8",this[r(950)]=0,this[r(753)]=!1,this.decoder=null,this[r(593)]=null,e.encoding&&(s=s||z()[r(985)],this[r(1031)]=new s(e[r(593)]),this.encoding=e[r(593)])}function a(e){var t=m;if(o=o||L(),!(this instanceof a))return new a(e);this._readableState=new i(e,this),this[t(613)]=!0,e&&(typeof e[t(1250)]==t(1976)&&(this[t(1532)]=e.read),"function"==typeof e[t(1577)])&&(this[t(646)]=e.destroy),n.call(this)}function f(e,t,r,n,i){var a,o,s,u,c,f,h=m,l=e._readableState;return null===t?(l[h(1127)]=!1,o=e,(c=l)[(u=m)(1526)]||(c[u(1031)]&&(s=c[u(1031)].end())&&s.length&&(c[u(871)][u(1181)](s),c.length+=c[u(1423)]?1:s.length),c[u(1526)]=!0,_(o))):(i||(s=l,c=m,a=f=(e=>d[m(1463)](e)||e instanceof v)(u=t)||typeof u==c(1265)||void 0===u||s.objectMode?f:new TypeError(c(424))),a?e[h(1229)](h(1308),a):l[h(1423)]||t&&0<t.length?(typeof t==h(1265)||l[h(1423)]||Object[h(636)](t)===d[h(1111)]||(o=t,t=d[m(1094)](o)),n?l[h(502)]?e[h(1229)](h(1308),new Error(h(427))):p(e,l,t,!0):l[h(1526)]?e[h(1229)](h(1308),new Error(h(1501))):(l.reading=!1,!l[h(1031)]||r||(t=l[h(1031)][h(819)](t),l[h(1423)])||0!==t.length?p(e,l,t,!1):x(e,l))):n||(l[h(1127)]=!1)),!(i=l)[(f=m)(1526)]&&(i.needReadable||i[f(1468)]<i[f(1643)]||0===i[f(1468)])}function p(e,t,r,n){var i=m;t[i(1063)]&&0===t[i(1468)]&&!t[i(1142)]?(e[i(1229)](i(1278),r),e.read(0)):(t.length+=t.objectMode?1:r[i(1468)],n?t[i(871)][i(1989)](r):t.buffer[i(1181)](r),t.needReadable&&_(e)),x(e,t)}Object.defineProperty(a.prototype,"destroyed",{get:function(){var e=m;return void 0!==this[e(1359)]&&this._readableState[e(561)]},set:function(e){var t=m;this[t(1359)]&&(this._readableState[t(561)]=e)}}),a[m(1111)].destroy=r[m(1577)],a[m(1111)][m(1605)]=r[m(1535)],a[m(1111)][m(646)]=function(e,t){this.push(null),t(e)},a[m(1111)].push=function(e,t){var r,n=m,i=this[n(1359)];return i[n(1423)]?r=!0:typeof e==n(1265)&&((t=t||i.defaultEncoding)!==i[n(593)]&&(e=d[n(1094)](e,t),t=""),r=!0),f(this,e,t,!1,r)},a.prototype.unshift=function(e){return f(this,e,null,!0,!1)},a[m(1111)].isPaused=function(){var e=m;return!1===this[e(1359)][e(1063)]},a[m(1111)][m(1708)]=function(e){var t=m;return s=s||z()[t(985)],this[t(1359)][t(1031)]=new s(e),this[t(1359)][t(593)]=e,this};var h=8388608;function l(e,t){var r,n=m;return e<=0||0===t[n(1468)]&&t[n(1526)]?0:t[n(1423)]?1:e!=e?t[n(1063)]&&t[n(1468)]?t[n(871)].head[n(1278)].length:t[n(1468)]:(e>t.highWaterMark&&(t.highWaterMark=(h<=(r=e)?r=h:(r--,r=(r=(r=(r=(r|=r>>>1)|r>>>2)|r>>>4)|r>>>8)|r>>>16,r++),r)),e<=t.length?e:t.ended?t[n(1468)]:(t[n(1794)]=!0,0))}function _(e){var t=m,r=e[t(1359)];r[t(1794)]=!1,r.emittedReadable||(w(t(1121),r[t(1063)]),r[t(1202)]=!0,r[t(1142)]?y[t(1642)](k,e):k(e))}function k(e){var t=m;w(t(930)),e[t(1229)](t(613)),S(e)}function x(e,t){var r=m;t.readingMore||(t.readingMore=!0,y[r(1642)](E,e,t))}function E(e,t){for(var r=m,n=t[r(1468)];!t.reading&&!t[r(1063)]&&!t[r(1526)]&&t[r(1468)]<t[r(1643)]&&(w("maybeReadMore read 0"),e[r(1250)](0),n!==t[r(1468)]);)n=t.length;t[r(753)]=!1}function C(e){w(m(1367)),e.read(0)}function A(e,t){var r=m;t[r(1127)]||(w(r(966)),e[r(1250)](0)),t[r(1173)]=!1,t[r(950)]=0,e.emit(r(782)),S(e),t.flowing&&!t[r(1127)]&&e[r(1250)](0)}function S(e){var t=m,r=e[t(1359)];for(w(t(931),r[t(1063)]);r.flowing&&null!==e.read(););}function D(e,t){var r,n,i,a=m;return 0===t.length?null:(t[a(1423)]?r=t[a(871)].shift():!e||e>=t[a(1468)]?(r=t[a(1031)]?t[a(871)][a(1681)](""):1===t[a(871)][a(1468)]?t[a(871)].head[a(1278)]:t[a(871)].concat(t[a(1468)]),t.buffer.clear()):(e=e,n=t[a(871)],t=t[a(1031)],e<n[(a=m)(835)][a(1278)][a(1468)]?(i=n[a(835)][a(1278)][a(1740)](0,e),n.head[a(1278)]=n[a(835)][a(1278)][a(1740)](e)):i=e===n[a(835)][a(1278)][a(1468)]?n[a(1644)]():(t?(e,t)=>{var r=m,n=t[r(835)],i=1,a=n[r(1278)];for(e-=a[r(1468)];n=n[r(1387)];){var o=n[r(1278)],s=e>o.length?o[r(1468)]:e;if(s===o[r(1468)]?a+=o:a+=o.slice(0,e),0===(e-=s)){s===o[r(1468)]?(++i,n.next?t[r(835)]=n[r(1387)]:t[r(835)]=t.tail=null):(t[r(835)]=n)[r(1278)]=o[r(1740)](s);break}++i}return t[r(1468)]-=i,a}:(e,t)=>{var r=m,n=d.allocUnsafe(e),i=t.head,a=1;for(i[r(1278)][r(796)](n),e-=i[r(1278)][r(1468)];i=i[r(1387)];){var o=i[r(1278)],s=e>o[r(1468)]?o[r(1468)]:e;if(o[r(796)](n,n[r(1468)]-e,0,s),0===(e-=s)){s===o[r(1468)]?(++a,i.next?t.head=i[r(1387)]:t[r(835)]=t[r(1027)]=null):(t[r(835)]=i)[r(1278)]=o.slice(s);break}++a}return t[r(1468)]-=a,n})(e,n),r=i),r)}function O(e){var t=m,r=e[t(1359)];if(0<r[t(1468)])throw new Error('"endReadable()" called on non-empty stream');r[t(502)]||(r.ended=!0,y[t(1642)](B,r,e))}function B(e,t){var r=m;e[r(502)]||0!==e.length||(e[r(502)]=!0,t.readable=!1,t[r(1229)](r(1253)))}function T(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}a[m(1111)][m(1250)]=function(e){var t,r=m,n=(w("read",e),e=parseInt(e,10),this[r(1359)]),i=e;return 0!==e&&(n.emittedReadable=!1),0===e&&n.needReadable&&(n[r(1468)]>=n[r(1643)]||n[r(1526)])?(w(r(501),n.length,n[r(1526)]),(0===n[r(1468)]&&n[r(1526)]?O:_)(this),null):0===(e=l(e,n))&&n[r(1526)]?(0===n[r(1468)]&&O(this),null):(t=n[r(1794)],w("need readable",t),(0===n[r(1468)]||n[r(1468)]-e<n[r(1643)])&&(t=!0,w(r(606),t)),n[r(1526)]||n.reading?(t=!1,w(r(1869),t)):t&&(w("do read"),n.reading=!0,n[r(1142)]=!0,0===n[r(1468)]&&(n[r(1794)]=!0),this[r(1532)](n[r(1643)]),n[r(1142)]=!1,n.reading||(e=l(i,n))),null===(t=0<e?D(e,n):null)?(n[r(1794)]=!0,e=0):n.length-=e,0===n[r(1468)]&&(n[r(1526)]||(n[r(1794)]=!0),i!==e)&&n[r(1526)]&&O(this),null!==t&&this[r(1229)](r(1278),t),t)},a.prototype._read=function(e){var t=m;this.emit(t(1308),new Error(t(1484)))},a.prototype[m(1907)]=function(n,e){var i=m,a=this,o=this[i(1359)];switch(o.pipesCount){case 0:o[i(600)]=n;break;case 1:o[i(600)]=[o[i(600)],n];break;default:o[i(600)][i(1181)](n)}o.pipesCount+=1,w(i(1720),o[i(1309)],e);e=(!e||!1!==e[i(1253)])&&n!==process[i(693)]&&n!==process[i(1808)]?u:_;function s(e,t){var r=i;w(r(1101)),e===a&&t&&!1===t[r(991)]&&(t[r(991)]=!0,w((e=i)(1610)),n[e(1760)]("close",v),n[e(1760)](e(605),p),n.removeListener(e(441),c),n[e(1760)](e(1308),d),n[e(1760)](e(631),s),a.removeListener(e(1253),u),a[e(1760)](e(1253),_),a.removeListener(e(1278),l),f=!0,!o[e(950)]||n._writableState&&!n[e(535)].needDrain||c())}function u(){var e=i;w(e(1525)),n[e(1253)]()}o[i(502)]?y[i(1642)](e):a[i(1747)](i(1253),e),n.on(i(631),s);r=a;var r,c=function(){var e=_0xa05d,t=r[e(1359)];w("pipeOnDrain",t[e(950)]),t.awaitDrain&&t[e(950)]--,0===t[e(950)]&&g(r,e(1278))&&(t[e(1063)]=!0,S(r))},f=(n.on(i(441),c),!1);var h=!1;function l(e){var t=i;w(t(1647)),(h=!1)!==n[t(819)](e)||h||((1===o[t(1309)]&&o[t(600)]===n||1<o[t(1309)]&&-1!==T(o[t(600)],n))&&!f&&(w(t(1050),o[t(950)]),o[t(950)]++,h=!0),a.pause())}function d(e){var t=i;w(t(1710),e),_(),n.removeListener(t(1308),d),0===g(n,t(1308))&&n[t(1229)](t(1308),e)}function v(){n.removeListener("finish",p),_()}function p(){var e=i;w(e(433)),n[e(1760)](e(1305),v),_()}function _(){var e=i;w(e(631)),a[e(631)](n)}return a.on("data",l),((e,t,r)=>{var n=m;if(typeof e.prependListener==n(1976))return e[n(721)](t,r);e[n(884)]&&e[n(884)][t]?b(e._events[t])?e[n(884)][t].unshift(r):e[n(884)][t]=[r,e[n(884)][t]]:e.on(t,r)})(n,i(1308),d),n[i(1747)](i(1305),v),n[i(1747)]("finish",p),n[i(1229)]("pipe",a),o.flowing||(w(i(1727)),a.resume()),n},a[m(1111)].unpipe=function(e){var t=m,r=this[t(1359)],n={hasUnpiped:!1};if(0!==r[t(1309)])if(1===r[t(1309)])e&&e!==r[t(600)]||(e=e||r.pipes,r.pipes=null,r.pipesCount=0,r[t(1063)]=!1,e&&e[t(1229)](t(631),this,n));else if(e){var i=T(r.pipes,e);-1!==i&&(r[t(600)].splice(i,1),--r[t(1309)],1===r[t(1309)]&&(r[t(600)]=r[t(600)][0]),e[t(1229)](t(631),this,n))}else{var a=r[t(600)],o=r[t(1309)];r[t(600)]=null,r[t(1309)]=0,r.flowing=!1;for(var s=0;s<o;s++)a[s][t(1229)](t(631),this,{hasUnpiped:!1})}return this},a[m(1111)].on=function(e,t){var r=m,t=n[r(1111)].on[r(971)](this,e,t);return"data"===e?!1!==this._readableState[r(1063)]&&this[r(782)]():e!==r(613)||(e=this[r(1359)])[r(502)]||e[r(1619)]||(e.readableListening=e[r(1794)]=!0,e[r(1202)]=!1,e[r(1127)]?e.length&&_(this):y.nextTick(C,this)),t},a[m(1111)][m(470)]=a[m(1111)].on,a[m(1111)][m(782)]=function(){var e=m,t=this._readableState;return t[e(1063)]||(w("resume"),t[e(1063)]=!0,e=this,(t=t)[m(1173)]||(t.resumeScheduled=!0,y.nextTick(A,e,t))),this},a.prototype[m(509)]=function(){var e=m;return w("call pause flowing=%j",this._readableState[e(1063)]),!1!==this._readableState.flowing&&(w(e(509)),this[e(1359)][e(1063)]=!1,this[e(1229)](e(509))),this},a[m(1111)][m(1527)]=function(r){var e,n=m,i=this,a=this[n(1359)],o=!1;for(e in r.on("end",function(){var e,t=n;w(t(2001)),a.decoder&&!a.ended&&(e=a[t(1031)][t(1253)]())&&e.length&&i[t(1181)](e),i[t(1181)](null)}),r.on("data",function(e){var t=n;w(t(1207)),a[t(1031)]&&(e=a[t(1031)][t(819)](e)),a[t(1423)]&&null==e||!(a[t(1423)]||e&&e[t(1468)])||i[t(1181)](e)||(o=!0,r.pause())}),r)void 0===this[e]&&"function"==typeof r[e]&&(this[e]=(t=>function(){var e=_0xa05d;return r[t][e(1189)](r,arguments)})(e));for(var t=0;t<c[n(1468)];t++)r.on(c[t],this[n(1229)][n(426)](this,c[t]));return this[n(1532)]=function(e){var t=n;w(t(920),e),o&&(o=!1,r[t(782)]())},this},Object[m(1453)](a[m(1111)],m(1479),{enumerable:!1,get:function(){var e=m;return this[e(1359)][e(1643)]}}),a[m(484)]=D}),a=t(function(e,t){var a=X,o=(t[a(1583)]=r,L()),t=Object[a(1536)](R());function r(e){var t=a;if(!(this instanceof r))return new r(e);o[t(971)](this,e),this._transformState={afterTransform:function(e,t){var r=a,n=this[r(1816)],i=(n.transforming=!1,n[r(741)]);if(!i)return this.emit("error",new Error(r(1483)));n[r(1234)]=null,(n.writecb=null)!=t&&this[r(1181)](t),i(e),(n=this[r(1359)])[r(1127)]=!1,(n[r(1794)]||n[r(1468)]<n[r(1643)])&&this[r(1532)](n[r(1643)])}[t(426)](this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this[t(1359)][t(1794)]=!0,this._readableState.sync=!1,e&&(typeof e.transform==t(1976)&&(this[t(1623)]=e[t(900)]),typeof e.flush==t(1976))&&(this[t(1208)]=e[t(1465)]),this.on("prefinish",n)}function n(){var e=a,r=this;typeof this[e(1208)]==e(1976)?this[e(1208)](function(e,t){i(r,e,t)}):i(this,null,null)}function i(e,t,r){var n=a;if(t)return e.emit("error",t);if(null!=r&&e.push(r),e[n(535)][n(1468)])throw new Error(n(462));if(e._transformState[n(483)])throw new Error(n(1421));e[n(1181)](null)}t[a(568)]=j(),t.inherits(r,o),r[a(1111)].push=function(e,t){var r=a;return this[r(1816)][r(616)]=!1,o[r(1111)][r(1181)][r(971)](this,e,t)},r.prototype[a(1623)]=function(e,t,r){throw new Error(a(969))},r[a(1111)][a(1070)]=function(e,t,r){var n=a,i=this[n(1816)];i.writecb=r,i[n(1234)]=e,i.writeencoding=t,!i.transforming&&(r=this[n(1359)],i[n(616)]||r[n(1794)]||r[n(1468)]<r.highWaterMark)&&this[n(1532)](r[n(1643)])},r[a(1111)][a(1532)]=function(e){var t=a,r=this[t(1816)];null!==r[t(1234)]&&r.writecb&&!r[t(483)]?(r.transforming=!0,this[t(1623)](r[t(1234)],r.writeencoding,r[t(1512)])):r[t(616)]=!0},r[a(1111)][a(646)]=function(e,r){var n=a,i=this;o[n(1111)][n(646)][n(971)](this,e,function(e){var t=n;r(e),i[t(1229)](t(1305))})}}),K=t(function(e,t){var r=X,n=(t[r(1583)]=i,a()),t=Object[r(1536)](R());function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}t[r(568)]=j(),t[r(568)](i,n),i[r(1111)][r(1623)]=function(e,t,r){r(null,e)}}),s=t(function(e,t){var r=X,n=require(r(713));process[r(1392)][r(1859)]===r(1715)&&n?(t[r(1583)]=n,(e=t[r(1583)]=n[r(476)])[r(476)]=n[r(476)],e.Writable=n[r(1048)],e[r(1383)]=n[r(1383)],e.Transform=n[r(420)],e[r(1338)]=n[r(1338)],e[r(591)]=n):((e=t.exports=v())[r(591)]=n||e,(e[r(476)]=e)[r(1048)]=d(),e[r(1383)]=L(),e.Transform=a(),e[r(1338)]=K())}),_=t(function(t){var r,n,i=X;if(t[i(976)]=!0,t[i(1178)]=!0,t[i(1265)]=!0,t.arraybuffer=(typeof ArrayBuffer===i(1896)?i(1896):_typeof(ArrayBuffer))<"u"&&(typeof Uint8Array===i(1896)?i(1896):_typeof(Uint8Array))<"u",t[i(1558)]=(typeof Buffer===i(1896)?"undefined":_typeof(Buffer))<"u",t[i(1784)]=(typeof Uint8Array===i(1896)?i(1896):_typeof(Uint8Array))<"u","u"<("undefined"==typeof ArrayBuffer?i(1896):_typeof(ArrayBuffer)))t[i(806)]=!1;else{r=new ArrayBuffer(0);try{t[i(806)]=0===new Blob([r],{type:i(619)})[i(882)]}catch(e){try{(n=new(self[i(1867)]||self[i(1228)]||self[i(1469)]||self[i(1545)]))[i(1257)](r),t[i(806)]=0===n[i(682)](i(619)).size}catch(e){t.blob=!1}}}try{t.nodestream=!!s()[i(476)]}catch(e){t[i(1273)]=!1}}),p=t(function(e){var d=X,v=A(),l=_(),p=d(1128);e.encode=function(e){for(var t,r,n,i,a,o,s,u=d,c=[],f=0,h=e[u(1468)],l=v[u(1384)](e)!==u(1265);f<e.length;)s=h-f,n=l?(t=e[f++],r=f<h?e[f++]:0,f<h?e[f++]:0):(t=e[u(996)](f++),r=f<h?e[u(996)](f++):0,f<h?e[u(996)](f++):0),i=t>>2,a=(3&t)<<4|r>>4,o=1<s?(15&r)<<2|n>>6:64,s=2<s?63&n:64,c[u(1181)](p.charAt(i)+p[u(586)](a)+p[u(586)](o)+p.charAt(s));return c[u(1681)]("")},e[d(1675)]=function(e){var t,r,n,i,a,o,s=d,u=0,c=0,f=s(1263);if(e[s(993)](0,f[s(1468)])===f)throw new Error(s(1230));var h,f=3*(e=e[s(1834)](/[^A-Za-z0-9\+\/\=]/g,""))[s(1468)]/4;if(e[s(586)](e[s(1468)]-1)===p.charAt(64)&&f--,e[s(586)](e[s(1468)]-2)===p.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=new(l[s(1784)]?Uint8Array:Array)(0|f);u<e[s(1468)];)n=p.indexOf(e[s(586)](u++)),t=(15&(i=p[s(999)](e.charAt(u++))))<<4|(a=p[s(999)](e.charAt(u++)))>>2,r=(3&a)<<6|(o=p[s(999)](e[s(586)](u++))),h[c++]=n<<2|i>>4,64!==a&&(h[c++]=t),64!==o&&(h[c++]=r);return h}}),b=t(function(e,t){var n=X;t.exports={isNode:(typeof Buffer===n(1896)?n(1896):_typeof(Buffer))<"u",newBufferFrom:function(e,t){var r=n;if(Buffer[r(1094)]&&Buffer[r(1094)]!==Uint8Array[r(1094)])return Buffer[r(1094)](e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){var t=n;return Buffer[t(678)]?Buffer[t(678)](e):((e=new Buffer(e))[t(1630)](0),e)},isBuffer:function(e){return Buffer[n(1463)](e)},isStream:function(e){var t=n;return e&&"function"==typeof e.on&&typeof e[t(509)]==t(1976)&&typeof e[t(782)]==t(1976)}}}),V=t(function(e,t){var r=X;t[r(1583)]=typeof setImmediate==r(1976)?setImmediate:function(){var e=r,t=[][e(1740)][e(1189)](arguments);t[e(548)](1,0,0),setTimeout[e(1189)](null,t)}}),Y=t(function(e,t){var r,n,i,a,o=X,s=global[o(1492)]||global[o(1097)],u=process[o(685)]?s?(r=0,s=new s(f),n=global[o(1963)][o(1991)](""),s.observe(n,{characterData:!0}),function(){n[o(1278)]=r=++r%2}):!global[o(455)]&&_typeof(global[o(1244)])<"u"?((i=new global[o(1244)])[o(444)][o(1853)]=f,function(){var e=o;i.port2[e(990)](0)}):o(1963)in global&&o(1032)in global.document[o(599)](o(1426))?function(){var t=o,r=global[t(1963)][t(599)]("script");r[t(1032)]=function(){var e=t;f(),r[e(1032)]=null,r[e(1617)][e(716)](r),r=null},global[t(1963)].documentElement[t(1576)](r)}:function(){setTimeout(f,0)}:function(){process[o(1642)](f)},c=[];function f(){a=!0;for(var e,t,r=c[o(1468)];r;){for(t=c,c=[],e=-1;++e<r;)t[e]();r=c.length}a=!1}t[o(1583)]=function(e){1!==c[o(1181)](e)||a||u()}}),J=t(function(e,t){var f=X,a=Y();function h(){}var o,l={},s=[f(1223)],u=[f(447)],i=[f(1502)];function r(e){var t=f;if(typeof e!=t(1976))throw new TypeError("resolver must be a function");this[t(769)]=i,this[t(873)]=[],this[t(1738)]=void 0,process[t(685)]||(this[t(615)]=o),e!==h&&p(this,e)}function c(e,t,r){var n=f;this[n(1705)]=e,"function"==typeof t&&(this[n(1579)]=t,this[n(472)]=this[n(866)]),typeof r==n(1976)&&(this[n(1286)]=r,this[n(1034)]=this[n(1704)])}function d(r,n,i){a(function(){var e,t=_0xa05d;try{e=n(i)}catch(e){return l.reject(r,e)}e===r?l[t(1751)](r,new TypeError("Cannot resolve promise with itself")):l[t(595)](r,e)})}function v(e){var t=f,r=e&&e[t(2009)];if(e&&(_typeof(e)==t(1355)||typeof e==t(1976))&&typeof r==t(1976))return function(){r.apply(e,arguments)}}function p(t,e){var r=f,n=!1;function i(e){n||(n=!0,l[_0xa05d(1751)](t,e))}function a(e){n||(n=!0,l[_0xa05d(595)](t,e))}var o=_(function(){e(a,i)});o[r(1792)]===r(1308)&&i(o[r(1407)])}function _(e,t){var r=f,n={};try{n[r(1407)]=e(t),n.status=r(929)}catch(e){n[r(1792)]=r(1308),n[r(1407)]=e}return n}process.browser||(o=[f(1422)]),(t[f(1583)]=r).prototype[f(1607)]=function(r){var n,i=f;return typeof r!=i(1976)?this:(n=this[i(630)],this[i(2009)](function(e){var t=i;return n[t(595)](r())[t(2009)](function(){return e})},function(e){var t=i;return n[t(595)](r())[t(2009)](function(){throw e})}))},r[f(1111)].catch=function(e){return this[f(2009)](null,e)},r[f(1111)].then=function(e,t){var r,n=f;return typeof e!=n(1976)&&this[n(769)]===u||typeof t!=n(1976)&&this.state===s?this:(r=new this[n(630)](h),process[n(685)]||this.handled===o&&(this[n(615)]=null),this[n(769)]!==i?d(r,this[n(769)]===u?e:t,this.outcome):this[n(873)][n(1181)](new c(r,e,t)),r)},c[f(1111)][f(472)]=function(e){l[f(595)](this.promise,e)},c[f(1111)].otherCallFulfilled=function(e){var t=f;d(this.promise,this[t(1579)],e)},c.prototype[f(1034)]=function(e){var t=f;l[t(1751)](this[t(1705)],e)},c[f(1111)][f(1704)]=function(e){var t=f;d(this.promise,this[t(1286)],e)},l[f(595)]=function(e,t){var r=f,n=_(v,t);if(n.status===r(1308))return l[r(1751)](e,n[r(1407)]);n=n.value;if(n)p(e,n);else{e[r(769)]=u,e.outcome=t;for(var i=-1,a=e[r(873)].length;++i<a;)e.queue[i].callFulfilled(t)}return e},l.reject=function(t,r){var n=f;t[n(769)]=s,t[n(1738)]=r,process.browser||t[n(615)]===o&&a(function(){var e=n;t[e(615)]===o&&process[e(1229)](e(1648),r,t)});for(var e=-1,i=t[n(873)][n(1468)];++e<i;)t[n(873)][e].callRejected(r);return t},r[f(595)]=function(e){var t=f;return e instanceof this?e:l[t(595)](new this(h),e)},r[f(1751)]=function(e){var t=f,r=new this(h);return l[t(1751)](r,e)},r.all=function(e){var n=f,i=this;if(Object.prototype[n(1116)][n(971)](e)!==n(1917))return this[n(1751)](new TypeError(n(582)));var a=e[n(1468)],o=!1;if(!a)return this[n(595)]([]);for(var s=new Array(a),u=0,t=-1,c=new this(h);++t<a;)((e,t)=>{var r=n;i[r(595)](e).then(function(e){s[t]=e,++u!==a||o||(o=!0,l.resolve(c,s))},function(e){o||(o=!0,l[r(1751)](c,e))})})(e[t],t);return c},r[f(1157)]=function(e){var r=f,n=this;if("[object Array]"!==Object[r(1111)][r(1116)][r(971)](e))return this[r(1751)](new TypeError("must be an array"));var t=e.length,i=!1;if(!t)return this.resolve([]);for(var a=-1,o=new this(h);++a<t;)(e=>{var t=r;n[t(595)](e)[t(2009)](function(e){i||(i=!0,l.resolve(o,e))},function(e){i||(i=!0,l[t(1751)](o,e))})})(e[a]);return o}}),g=t(function(e,t){var r=X,n=null,n=("undefined"==typeof Promise?r(1896):_typeof(Promise))<"u"?Promise:J();t[r(1583)]={Promise:n}}),A=t(function(c){var f=X,h=_(),l=p(),r=b(),n=V(),d=g();function e(e){return e}function v(e,t){for(var r=f,n=0;n<e[r(1468)];++n)t[n]=255&e[r(996)](n);return t}c[f(1057)]=function(t,r){var n=f;c.checkSupport(n(806));try{return new Blob([t],{type:r})}catch(e){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self[n(1469)]||self.MSBlobBuilder);return i.append(t),i.getBlob(r)}catch(e){throw new Error(n(1037))}}};var a={stringifyByChunk:function(e,t,r){var n=f,i=[],a=0,o=e.length;if(o<=r)return String[n(896)].apply(null,e);for(;a<o;)t===n(1178)||t===n(1558)?i[n(1181)](String[n(896)][n(1189)](null,e[n(1740)](a,Math.min(a+r,o)))):i[n(1181)](String[n(896)][n(1189)](null,e[n(686)](a,Math[n(1337)](a+r,o)))),a+=r;return i[n(1681)]("")},stringifyByChar:function(e){for(var t=f,r="",n=0;n<e[t(1468)];n++)r+=String[t(896)](e[n]);return r},applyCanBeUsed:{uint8array:(()=>{var e=f;try{return h[e(1784)]&&1===String[e(896)].apply(null,new Uint8Array(1)).length}catch(e){return!1}})(),nodebuffer:(()=>{var e=f;try{return h[e(1558)]&&1===String[e(896)][e(1189)](null,r[e(1073)](1))[e(1468)]}catch(e){return!1}})()}};function t(e){var t=f,r=65536,n=c.getTypeOf(e),i=!0;if(n===t(1784)?i=a[t(673)][t(1784)]:n===t(1558)&&(i=a[t(673)][t(1558)]),i)for(;1<r;)try{return a[t(1826)](e,n,r)}catch(e){r=Math[t(1836)](r/2)}return a[t(1743)](e)}function i(e,t){for(var r=f,n=0;n<e[r(1468)];n++)t[n]=e[n];return t}c[f(1744)]=t;var o={};o[f(1265)]={string:e,array:function(e){return v(e,new Array(e[f(1468)]))},arraybuffer:function(e){var t=f;return o[t(1265)].uint8array(e)[t(871)]},uint8array:function(e){return v(e,new Uint8Array(e[f(1468)]))},nodebuffer:function(e){var t=f;return v(e,r[t(1073)](e[t(1468)]))}},o[f(1178)]={string:t,array:e,arraybuffer:function(e){var t=f;return new Uint8Array(e)[t(871)]},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return r[f(1661)](e)}},o.arraybuffer={string:function(e){return t(new Uint8Array(e))},array:function(e){var t=f;return i(new Uint8Array(e),new Array(e[t(1457)]))},arraybuffer:e,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return r[f(1661)](new Uint8Array(e))}},o[f(1784)]={string:t,array:function(e){return i(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:e,nodebuffer:function(e){return r[f(1661)](e)}},o[f(1558)]={string:t,array:function(e){return i(e,new Array(e[f(1468)]))},arraybuffer:function(e){return o[f(1558)].uint8array(e).buffer},uint8array:function(e){return i(e,new Uint8Array(e.length))},nodebuffer:e},c.transformTo=function(e,t){var r=f;if(t=t||"",!e)return t;c.checkSupport(e);r=c[r(1384)](t);return o[r][e](t)},c[f(1384)]=function(e){var t=f;return typeof e==t(1265)?"string":Object[t(1111)][t(1116)][t(971)](e)===t(1917)?t(1178):h[t(1558)]&&r[t(1463)](e)?t(1558):h.uint8array&&e instanceof Uint8Array?t(1784):h[t(1706)]&&e instanceof ArrayBuffer?t(1706):void 0},c[f(759)]=function(e){var t=f;if(!h[e[t(863)]()])throw new Error(e+t(826))},c[f(1971)]=65535,c[f(1216)]=-1,c[f(1129)]=function(e){for(var t,r=f,n="",i=0;i<(e||"").length;i++)n+="\\x"+((t=e[r(996)](i))<16?"0":"")+t[r(1116)](16)[r(1725)]();return n},c[f(1291)]=function(e,t,r){n(function(){e.apply(r||null,t||[])})},c[f(568)]=function(e,t){function r(){}var n=f;r[n(1111)]=t[n(1111)],e[n(1111)]=new r},c[f(1474)]=function(){for(var e,t=f,r={},n=0;n<arguments.length;n++)for(e in arguments[n])arguments[n][t(1394)](e)&&"u"<_typeof(r[e])&&(r[e]=arguments[n][e]);return r},c[f(1981)]=function(i,e,a,o,s){var u=f;return d[u(1123)][u(595)](e)[u(2009)](function(t){var a=u;return h[a(806)]&&(t instanceof Blob||-1!==[a(618),a(1544)][a(999)](Object[a(1111)].toString.call(t)))&&(typeof FileReader===a(1896)?a(1896):_typeof(FileReader))<"u"?new d[a(1123)](function(r,n){var i=a,e=new FileReader;e[i(1791)]=function(e){var t=i;r(e[t(2007)][t(1779)])},e.onerror=function(e){var t=i;n(e.target[t(1308)])},e.readAsArrayBuffer(t)}):t})[u(2009)](function(e){var t,r=u,n=c[r(1384)](e);return n?(n===r(1706)?e=c[r(1886)]("uint8array",e):n===r(1265)&&(s?e=l[r(1675)](e):a&&!0!==o&&(e=v(n=e,new(h[(t=_0xa05d)(1784)]?Uint8Array:Array)(n[t(1468)])))),e):d[r(1123)][r(1751)](new Error(r(1653)+i+r(488)))})}}),S=t(function(e,t){var i=X;function r(e){var t=_0xa05d;this[t(1943)]=e||t(830),this[t(1636)]={},this.generatedError=null,this[t(1288)]={},this.isPaused=!0,this[t(880)]=!1,this.isLocked=!1,this[t(1415)]={data:[],end:[],error:[]},this[t(1236)]=null}r[i(1111)]={push:function(e){var t=i;this[t(1229)](t(1278),e)},end:function(){var t=i;if(this.isFinished)return!1;this.flush();try{this[t(1229)](t(1253)),this.cleanUp(),this.isFinished=!0}catch(e){this[t(1229)](t(1308),e)}return!0},error:function(e){var t=i;return!this[t(880)]&&(this[t(466)]?this.generatedError=e:(this.isFinished=!0,this.emit(t(1308),e),this[t(1236)]&&this[t(1236)].error(e),this[t(906)]()),!0)},on:function(e,t){var r=i;return this[r(1415)][e][r(1181)](t),this},cleanUp:function(){var e=i;this.streamInfo=this[e(1938)]=this[e(1288)]=null,this[e(1415)]=[]},emit:function(e,t){var r=i;if(this[r(1415)][e])for(var n=0;n<this[r(1415)][e][r(1468)];n++)this._listeners[e][n][r(971)](this,t)},pipe:function(e){return e[i(984)](this)},registerPrevious:function(e){var t=i;if(this[t(2016)])throw new Error(t(1014)+this+t(1159));this.streamInfo=e[t(1636)],this.mergeStreamInfo(),this[t(1236)]=e;var r=this;return e.on("data",function(e){r.processChunk(e)}),e.on("end",function(){r[t(1253)]()}),e.on("error",function(e){r.error(e)}),this},pause:function(){var e=i;return!this.isPaused&&!this.isFinished&&(this[e(466)]=!0,this[e(1236)]&&this[e(1236)][e(509)](),!0)},resume:function(){var e,t=i;return!(!this[t(466)]||this[t(880)]||(e=this[t(466)]=!1,this[t(1938)]&&(this[t(1308)](this[t(1938)]),e=!0),this[t(1236)]&&this[t(1236)][t(782)](),e))},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this[i(1288)][e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){var e,t=i;for(e in this[t(1288)])this[t(1288)][t(1394)](e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){var e=i;if(this[e(2016)])throw new Error(e(1014)+this+"' has already been used.");this.isLocked=!0,this.previous&&this[e(1236)].lock()},toString:function(){var e=i,t=e(558)+this.name;return this[e(1236)]?this[e(1236)]+e(865)+t:t}},t[i(1583)]=r}),D=t(function(a){for(var e,h=X,c=A(),l=_(),d=b(),t=S(),f=new Array(256),e=0;e<256;e++)f[e]=252<=e?6:248<=e?5:240<=e?4:224<=e?3:192<=e?2:1;f[254]=f[254]=1;function r(){t[h(971)](this,"utf-8 decode"),this.leftOver=null}function n(){var e=h;t.call(this,e(1603))}a[h(972)]=function(e){var t=h;if(l[t(1558)])return d[t(1661)](e,t(1281));for(var r,n,i,a,o=e,s=_0xa05d,u=o[s(1468)],c=0,f=0;f<u;f++)55296==(64512&(n=o.charCodeAt(f)))&&f+1<u&&56320==(64512&(i=o[s(996)](f+1)))&&(n=65536+(n-55296<<10)+(i-56320),f++),c+=n<128?1:n<2048?2:n<65536?3:4;for(r=new(l[s(1784)]?Uint8Array:Array)(c),f=a=0;a<c;f++)55296==(64512&(n=o[s(996)](f)))&&f+1<u&&56320==(64512&(i=o[s(996)](f+1)))&&(n=65536+(n-55296<<10)+(i-56320),f++),n<128?r[a++]=n:(n<2048?r[a++]=192|n>>>6:(n<65536?r[a++]=224|n>>>12:(r[a++]=240|n>>>18,r[a++]=128|n>>>12&63),r[a++]=128|n>>>6&63),r[a++]=128|63&n);return r},a[h(2015)]=function(e){var t=h;if(l[t(1558)])return c[t(1886)](t(1558),e).toString(t(1281));for(var r,n,i=e=c[t(1886)](l[t(1784)]?"uint8array":t(1178),e),t=_0xa05d,a=i[t(1468)],o=new Array(2*a),s=0,u=0;u<a;)if((r=i[u++])<128)o[s++]=r;else if(4<(n=f[r]))o[s++]=65533,u+=n-1;else{for(r&=2===n?31:3===n?15:7;1<n&&u<a;)r=r<<6|63&i[u++],n--;1<n?o[s++]=65533:r<65536?o[s++]=r:(r-=65536,o[s++]=55296|r>>10&1023,o[s++]=56320|1023&r)}return o[t(1468)]!==s&&(o.subarray?o=o[t(686)](0,s):o[t(1468)]=s),c[t(1744)](o)},c[h(568)](r,t),r[h(1111)].processChunk=function(e){var t=h,r=c[t(1886)](l[t(1784)]?"uint8array":t(1178),e.data),n=(this[t(706)]&&this[t(706)].length&&(l.uint8array?(n=r,(r=new Uint8Array(n.length+this.leftOver.length))[t(737)](this.leftOver,0),r.set(n,this[t(706)][t(1468)])):r=this.leftOver.concat(r),this.leftOver=null),((e,t)=>{for(var r=_0xa05d,n=(t=(t=t||e[r(1468)])>e[r(1468)]?e[r(1468)]:t)-1;0<=n&&128==(192&e[n]);)n--;return!(n<0||0===n)&&n+f[e[n]]>t?n:t})(r)),i=r;n!==r.length&&(l.uint8array?(i=r[t(686)](0,n),this[t(706)]=r.subarray(n,r.length)):(i=r.slice(0,n),this.leftOver=r[t(1740)](n,r.length))),this[t(1181)]({data:a.utf8decode(i),meta:e.meta})},r[h(1111)].flush=function(){var e=h;this.leftOver&&this[e(706)][e(1468)]&&(this.push({data:a.utf8decode(this[e(706)]),meta:{}}),this[e(706)]=null)},a[h(1946)]=r,c[h(568)](n,t),n[h(1111)][h(1056)]=function(e){var t=h;this[t(1181)]({data:a.utf8encode(e.data),meta:e[t(1672)]})},a.Utf8EncodeWorker=n}),Q=t(function(e,t){var r=X,n=S(),i=A();function a(e){var t=_0xa05d;n[t(971)](this,t(1556)+e),this.destType=e}i[r(568)](a,n),a[r(1111)][r(1056)]=function(e){var t=r;this[t(1181)]({data:i[t(1886)](this.destType,e[t(1278)]),meta:e[t(1672)]})},t.exports=a}),ee=t(function(e,t){var r=X,o=s()[r(476)];function n(e,t,n){var i=r,a=(o[i(971)](this,t),this._helper=e,this);e.on("data",function(e,t){var r=i;a[r(1181)](e)||a._helper[r(509)](),n&&n(t)}).on(i(1308),function(e){var t=i;a.emit(t(1308),e)}).on(i(1253),function(){a[i(1181)](null)})}A()[r(568)](n,o),n[r(1111)][r(1532)]=function(){this[r(944)].resume()},t.exports=n}),w=t(function(e,t){var f=X,h=A(),a=Q(),o=S(),l=p(),r=_(),n=g(),i=null;if(r[f(1273)])try{i=ee()}catch(e){}function s(e,u){var c=f;return new n[c(1123)](function(t,r){var n=c,i=[],a=e[n(1358)],o=e[n(1736)],s=e[n(1204)];e.on("data",function(e,t){i[n(1181)](e),u&&u(t)}).on(n(1308),function(e){i=[],r(e)}).on(n(1253),function(){try{var e=((e,t,r)=>{var n=f;switch(e){case n(806):return h.newBlob(h.transformTo("arraybuffer",t),r);case"base64":return l[n(442)](t);default:return h[n(1886)](e,t)}})(o,((e,t)=>{for(var r=f,n=0,i=null,a=0,o=0;o<t[r(1468)];o++)a+=t[o][r(1468)];switch(e){case r(1265):return t[r(1681)]("");case r(1178):return Array.prototype[r(1274)][r(1189)]([],t);case r(1784):for(i=new Uint8Array(a),o=0;o<t[r(1468)];o++)i[r(737)](t[o],n),n+=t[o][r(1468)];return i;case r(1558):return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}})(a,i),s);t(e)}catch(e){r(e)}i=[]})[n(782)]()})}function u(e,t,r){var n=f,i=t;switch(t){case"blob":case n(1706):i=n(1784);break;case"base64":i=n(1265)}try{this[n(1358)]=i,this[n(1736)]=t,this[n(1204)]=r,h.checkSupport(i),this._worker=e.pipe(new a(i)),e[n(1960)]()}catch(e){this[n(604)]=new o(n(1308)),this[n(604)][n(1308)](e)}}u[f(1111)]={accumulate:function(e){return s(this,e)},on:function(e,r){var n=f,i=this;return e===n(1278)?this[n(604)].on(e,function(e){var t=n;r[t(971)](i,e.data,e[t(1672)])}):this[n(604)].on(e,function(){h[n(1291)](r,arguments,i)}),this},resume:function(){var e=f;return h.delay(this[e(604)].resume,[],this[e(604)]),this},pause:function(){var e=f;return this._worker[e(509)](),this},toNodejsStream:function(e){var t=f;if(h[t(759)]("nodestream"),"nodebuffer"!==this[t(1736)])throw new Error(this[t(1736)]+t(1868));return new i(this,{objectMode:this._outputType!==t(1558)},e)}},t.exports=u}),te=t(function(e){var t=X;e[t(976)]=!1,e[t(1385)]=!1,e[t(1033)]=!1,e[t(1696)]=!0,e[t(1099)]=null,e[t(810)]=null,e[t(1565)]=null,e[t(1641)]=null,e.unixPermissions=null,e[t(1783)]=null}),re=t(function(e,t){var n=X,i=A(),a=S();function r(e){var r=_0xa05d,n=(a[r(971)](this,r(1404)),this);this[r(2011)]=!1,this[r(775)]=0,this.max=0,this[r(1278)]=null,this[r(1454)]="",this._tickScheduled=!1,e.then(function(e){var t=r;n[t(2011)]=!0,n[t(1278)]=e,n[t(1219)]=e&&e[t(1468)]||0,n[t(1454)]=i[t(1384)](e),n[t(466)]||n[t(1456)]()},function(e){n.error(e)})}i[n(568)](r,a),r[n(1111)][n(906)]=function(){var e=n;a[e(1111)][e(906)].call(this),this[e(1278)]=null},r.prototype[n(782)]=function(){var e=n;return!!a[e(1111)][e(782)].call(this)&&(!this[e(949)]&&this.dataIsReady&&(this[e(949)]=!0,i.delay(this._tickAndRepeat,[],this)),!0)},r[n(1111)][n(1456)]=function(){var e=n;this[e(949)]=!1,this[e(466)]||this.isFinished||(this._tick(),this[e(880)])||(i.delay(this[e(1456)],[],this),this[e(949)]=!0)},r[n(1111)]._tick=function(){var e=n;if(this.isPaused||this[e(880)])return!1;var t=null,r=Math[e(1337)](this[e(1219)],this[e(775)]+16384);if(this.index>=this.max)return this[e(1253)]();switch(this[e(1454)]){case e(1265):t=this[e(1278)][e(1051)](this[e(775)],r);break;case e(1784):t=this[e(1278)][e(686)](this[e(775)],r);break;case e(1178):case e(1558):t=this.data[e(1740)](this[e(775)],r)}return this[e(775)]=r,this[e(1181)]({data:t,meta:{percent:this[e(1219)]?this[e(775)]/this[e(1219)]*100:0}})},t[n(1583)]=r}),h=t(function(e,t){var _=X,g=A();var m=(()=>{for(var e=[],t=0;t<256;t++){for(var r=t,n=0;n<8;n++)r=1&r?3988292384^r>>>1:r>>>1;e[t]=r}return e})();t[_(1583)]=function(e,t){var r=_;if("u"<_typeof(e)||!e[r(1468)])return 0;var n="string"!==g[r(1384)](e);if(n){var i=0|t,a=e,n=e.length,o=0,s=m,u=o+n;i^=-1;for(var c=o;c<u;c++)i=i>>>8^s[255&(i^a[c])];return-1^i}var f=0|t,h=e,n=e[r(1468)],o=0,l=_0xa05d,d=m,v=o+n;f^=-1;for(var p=o;p<v;p++)f=f>>>8^d[255&(f^h[l(996)](p))];return-1^f}}),ne=t(function(e,t){var r=X,n=S(),i=h();function a(){var e=_0xa05d;n.call(this,e(1662)),this[e(485)](e(1376),0)}A()[r(568)](a,n),a[r(1111)][r(1056)]=function(e){var t=r;this[t(1636)][t(1376)]=i(e[t(1278)],this[t(1636)].crc32||0),this.push(e)},t[r(1583)]=a}),ie=t(function(e,t){var n=X,r=A(),i=S();function a(e){var t=_0xa05d;i[t(971)](this,t(430)+e),this[t(1102)]=e,this[t(485)](e,0)}r[n(568)](a,i),a.prototype[n(1056)]=function(e){var t,r=n;e&&(t=this[r(1636)][this[r(1102)]]||0,this[r(1636)][this[r(1102)]]=t+e.data[r(1468)]),i[r(1111)][r(1056)].call(this,e)},t[n(1583)]=a}),O=t(function(e,t){var i=X,n=g(),a=re(),o=ne(),s=ie();function r(e,t,r,n,i){var a=_0xa05d;this[a(1425)]=e,this.uncompressedSize=t,this[a(1376)]=r,this[a(810)]=n,this[a(1659)]=i}r.prototype={getContentWorker:function(){var t=_0xa05d,e=new a(n[t(1123)].resolve(this[t(1659)])).pipe(this.compression[t(1058)]())[t(1907)](new s("data_length")),r=this;return e.on(t(1253),function(){var e=t;if(this.streamInfo[e(681)]!==r[e(1508)])throw new Error(e(1915))}),e},getCompressedWorker:function(){var e=_0xa05d;return new a(n.Promise[e(595)](this[e(1659)])).withStreamInfo(e(1425),this[e(1425)])[e(485)](e(1508),this.uncompressedSize)[e(485)](e(1376),this.crc32)[e(485)](e(810),this[e(810)])}},r[i(1712)]=function(e,t,r){var n=i;return e[n(1907)](new o)[n(1907)](new s(n(1508)))[n(1907)](t[n(1930)](r)).pipe(new s(n(1425)))[n(485)](n(810),t)},t.exports=r}),ae=t(function(e,t){for(var r,o=X,s=w(),n=re(),u=D(),i=O(),c=S(),a=function(e,t,r){var n=_0xa05d;this[n(1943)]=e,this.dir=r.dir,this[n(1099)]=r.date,this.comment=r[n(1641)],this[n(836)]=r[n(836)],this[n(1783)]=r[n(1783)],this._data=t,this._dataBinary=r.binary,this[n(790)]={compression:r.compression,compressionOptions:r[n(1565)]}},f=(a[o(1111)]={internalStream:function(e){var t=o,r=null,n=t(1265);try{if(!e)throw new Error(t(655));var i=(n=e[t(863)]())===t(1265)||n===t(1489),a=(n!==t(1723)&&"text"!==n||(n="string"),r=this._decompressWorker(),!this[t(1699)]);a&&!i&&(r=r[t(1907)](new u[t(1703)])),!a&&i&&(r=r[t(1907)](new u.Utf8DecodeWorker))}catch(e){(r=new c(t(1308)))[t(1308)](e)}return new s(r,n,"")},async:function(e,t){return this[o(1297)](e).accumulate(t)},nodeStream:function(e,t){var r=o;return this[r(1297)](e||r(1558))[r(1713)](t)},_compressWorker:function(e,t){var r,n=o;return this._data instanceof i&&this[n(416)][n(810)][n(1160)]===e.magic?this[n(416)][n(428)]():(r=this[n(788)](),this[n(1699)]||(r=r[n(1907)](new u[n(1703)])),i[n(1712)](r,e,t))},_decompressWorker:function(){var e=o;return this._data instanceof i?this[e(416)][e(892)]():this._data instanceof c?this[e(416)]:new n(this[e(416)])}},[o(885),o(1170),o(1138),o(927),o(1633)]),h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},r=0;r<f[o(1468)];r++)a.prototype[f[r]]=h;t[o(1583)]=a}),$=t(function(r){var u=X,e=(typeof Uint8Array===u(1896)?u(1896):_typeof(Uint8Array))<"u"&&("undefined"==typeof Uint16Array?u(1896):_typeof(Uint16Array))<"u"&&(typeof Int32Array===u(1896)?u(1896):_typeof(Int32Array))<"u";r[u(1224)]=function(e){for(var t,r,n,i=u,a=Array[i(1111)][i(1740)].call(arguments,1);a[i(1468)];){var o=a[i(1644)]();if(o){if(_typeof(o)!=i(1355))throw new TypeError(o+i(2004));for(var s in o)t=o,r=s,n=void 0,n=u,Object.prototype[n(1394)][n(971)](t,r)&&(e[s]=o[s])}}return e},r[u(770)]=function(e,t){var r=u;return e[r(1468)]===t?e:e.subarray?e[r(686)](0,t):(e.length=t,e)};var n={arraySet:function(e,t,r,n,i){var a=u;if(t[a(686)]&&e[a(686)])e[a(737)](t[a(686)](r,r+n),i);else for(var o=0;o<n;o++)e[i+o]=t[r+o]},flattenChunks:function(e){for(var t,r,n,i=u,a=0,o=0,s=e[i(1468)];o<s;o++)a+=e[o].length;for(n=new Uint8Array(a),o=t=0,s=e[i(1468)];o<s;o++)r=e[o],n[i(737)](r,t),t+=r.length;return n}},i={arraySet:function(e,t,r,n,i){for(var a=0;a<n;a++)e[i+a]=t[r+a]},flattenChunks:function(e){var t=u;return[][t(1274)][t(1189)]([],e)}};r.setTyped=function(e){var t=u;e?(r.Buf8=Uint8Array,r[t(546)]=Uint16Array,r[t(1290)]=Int32Array,r[t(1224)](r,n)):(r[t(1821)]=Array,r.Buf16=Array,r[t(1290)]=Array,r[t(1224)](r,i))},r[u(1381)](e)}),oe=t(function(e){var t=X,o=$(),l=0,d=1;function r(e){for(var t=e[_0xa05d(1468)];0<=--t;)e[t]=0}var u,c,f,h=29,v=256,p=v+1+h,_=30,g=19,S=2*p+1,D=15,i=16,z=7,m=256,y=16,b=17,w=18,k=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],x=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],G=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],E=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],C=new Array(2*(p+2)),A=(r(C),new Array(2*_)),O=(r(A),new Array(512)),B=(r(O),new Array(256)),T=(r(B),new Array(h)),F=(r(T),new Array(_));function I(e,t,r,n,i){var a=_0xa05d;this[a(1542)]=e,this[a(1307)]=t,this[a(1788)]=r,this[a(1054)]=n,this.max_length=i,this[a(1220)]=e&&e[a(1468)]}function P(e,t){var r=_0xa05d;this[r(1163)]=e,this[r(1523)]=0,this.stat_desc=t}function U(e){return e<256?O[e]:O[256+(e>>>7)]}function a(e,t){var r=_0xa05d;e.pending_buf[e[r(876)]++]=255&t,e[r(1880)][e[r(876)]++]=t>>>8&255}function R(e,t,r){var n=_0xa05d;e.bi_valid>i-r?(e[n(1438)]|=t<<e.bi_valid&65535,a(e,e.bi_buf),e[n(1438)]=t>>i-e.bi_valid,e[n(555)]+=r-i):(e.bi_buf|=t<<e[n(555)]&65535,e[n(555)]+=r)}function j(e,t,r){R(e,r[2*t],r[2*t+1])}function H(e,t){for(var r=0;r|=1&e,e>>>=1,r<<=1,0<--t;);return r>>>1}function M(e,t,r){for(var n,i=new Array(D+1),a=0,o=1;o<=D;o++)i[o]=a=a+r[o-1]<<1;for(n=0;n<=t;n++){var s=e[2*n+1];0!==s&&(e[2*n]=H(i[s]++,s))}}function Z(e){for(var t=_0xa05d,r=0;r<p;r++)e[t(1402)][2*r]=0;for(r=0;r<_;r++)e.dyn_dtree[2*r]=0;for(r=0;r<g;r++)e.bl_tree[2*r]=0;e[t(1402)][2*m]=1,e[t(1335)]=e[t(544)]=0,e.last_lit=e[t(1537)]=0}function q(e){var t=_0xa05d;8<e.bi_valid?a(e,e.bi_buf):0<e[t(555)]&&(e[t(1880)][e[t(876)]++]=e[t(1438)]),e[t(1438)]=0,e[t(555)]=0}function s(e,t,r,n){var i=2*t,a=2*r;return e[i]<e[a]||e[i]===e[a]&&n[t]<=n[r]}function N(e,t,r){for(var n=_0xa05d,i=e[n(1515)][r],a=r<<1;a<=e[n(1796)]&&(a<e.heap_len&&s(t,e[n(1515)][a+1],e[n(1515)][a],e[n(624)])&&a++,!s(t,i,e[n(1515)][a],e[n(624)]));)e[n(1515)][r]=e.heap[a],r=a,a<<=1;e[n(1515)][r]=i}function K(e,t,r){var n,i,a,o,s=_0xa05d,u=0;if(0!==e[s(598)])for(;n=e.pending_buf[e[s(645)]+2*u]<<8|e[s(1880)][e.d_buf+2*u+1],i=e.pending_buf[e[s(687)]+u],u++,0==n?j(e,i,t):(j(e,(a=B[i])+v+1,t),0!==(o=k[a])&&R(e,i-=T[a],o),j(e,a=U(--n),r),0!==(o=x[a])&&R(e,n-=F[a],o)),u<e[s(598)];);j(e,m,t)}function L(e,t){var r,n,i,a=_0xa05d,o=t[a(1163)],s=t[a(833)][a(1542)],u=t[a(833)].has_stree,c=t[a(833)].elems,f=-1;for(e.heap_len=0,e[a(1968)]=S,r=0;r<c;r++)0!==o[2*r]?(e.heap[++e[a(1796)]]=f=r,e[a(624)][r]=0):o[2*r+1]=0;for(;e[a(1796)]<2;)o[2*(i=e[a(1515)][++e[a(1796)]]=f<2?++f:0)]=1,e[a(624)][i]=0,e[a(1335)]--,u&&(e.static_len-=s[2*i+1]);for(t[a(1523)]=f,r=e[a(1796)]>>1;1<=r;r--)N(e,o,r);for(i=c;r=e[a(1515)][1],e[a(1515)][1]=e[a(1515)][e.heap_len--],N(e,o,1),n=e[a(1515)][1],e[a(1515)][--e[a(1968)]]=r,e.heap[--e[a(1968)]]=n,o[2*i]=o[2*r]+o[2*n],e[a(624)][i]=(e.depth[r]>=e[a(624)][n]?e[a(624)][r]:e[a(624)][n])+1,o[2*r+1]=o[2*n+1]=i,e[a(1515)][1]=i++,N(e,o,1),2<=e[a(1796)];);e[a(1515)][--e[a(1968)]]=e.heap[1];for(var h,l,d,v,p,_=e,g=_0xa05d,m=t[g(1163)],y=t.max_code,b=t.stat_desc.static_tree,w=t[g(833)][g(1220)],k=t.stat_desc[g(1307)],x=t[g(833)][g(1788)],E=t[g(833)][g(960)],C=0,A=0;A<=D;A++)_[g(726)][A]=0;for(m[2*_[g(1515)][_.heap_max]+1]=0,h=_[g(1968)]+1;h<S;h++)E<(A=m[2*m[2*(l=_.heap[h])+1]+1]+1)&&(A=E,C++),m[2*l+1]=A,y<l||(_.bl_count[A]++,v=0,x<=l&&(v=k[l-x]),p=m[2*l],_[g(1335)]+=p*(A+v),!w)||(_.static_len+=p*(b[2*l+1]+v));if(0!==C){do{for(A=E-1;0===_[g(726)][A];)A--}while(_[g(726)][A]--,_.bl_count[A+1]+=2,_[g(726)][E]--,0<(C-=2));for(A=E;0!==A;A--)for(l=_[g(726)][A];0!==l;)y<(d=_[g(1515)][--h])||(m[2*d+1]!==A&&(_[g(1335)]+=(A-m[2*d+1])*m[2*d],m[2*d+1]=A),l--)}M(o,f,e[a(726)])}function W(e,t,r){var n,i,a=_0xa05d,o=-1,s=t[1],u=0,c=7,f=4;for(0===s&&(c=138,f=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=t[2*(n+1)+1],++u<c&&i===s||(u<f?e.bl_tree[2*i]+=u:0!==i?(i!==o&&e[a(887)][2*i]++,e[a(887)][2*y]++):u<=10?e[a(887)][2*b]++:e[a(887)][2*w]++,o=i,f=(u=0)===s?(c=138,3):i===s?(c=6,3):(c=7,4))}function V(e,t,r){var n,i,a=_0xa05d,o=-1,s=t[1],u=0,c=7,f=4;for(0===s&&(c=138,f=3),n=0;n<=r;n++)if(i=s,s=t[2*(n+1)+1],!(++u<c&&i===s)){if(u<f)for(;j(e,i,e[a(887)]),0!=--u;);else 0!==i?(i!==o&&(j(e,i,e.bl_tree),u--),j(e,y,e[a(887)]),R(e,u-3,2)):u<=10?(j(e,b,e[a(887)]),R(e,u-3,3)):(j(e,w,e[a(887)]),R(e,u-11,7));o=i,f=(u=0)===s?(c=138,3):i===s?(c=6,3):(c=7,4)}}r(F);var Y=!1;function J(e,t,r,n){var i;R(e,0+(n?1:0),3),n=t,t=r,r=!0,i=_0xa05d,q(e=e),r&&(a(e,t),a(e,~t)),o[i(1298)](e[i(1880)],e[i(1158)],n,t,e.pending),e.pending+=t}e[t(1124)]=function(e){var t=_0xa05d;if(!Y){for(var r,n,i,a=new Array(D+1),o=0,s=0;s<h-1;s++)for(T[s]=o,r=0;r<1<<k[s];r++)B[o++]=s;for(B[o-1]=s,s=i=0;s<16;s++)for(F[s]=i,r=0;r<1<<x[s];r++)O[i++]=s;for(i>>=7;s<_;s++)for(F[s]=i<<7,r=0;r<1<<x[s]-7;r++)O[256+i++]=s;for(n=0;n<=D;n++)a[n]=0;for(r=0;r<=143;)C[2*r+1]=8,r++,a[8]++;for(;r<=255;)C[2*r+1]=9,r++,a[9]++;for(;r<=279;)C[2*r+1]=7,r++,a[7]++;for(;r<=287;)C[2*r+1]=8,r++,a[8]++;for(M(C,p+1,a),r=0;r<_;r++)A[2*r+1]=5,A[2*r]=H(r,5);u=new I(C,k,v+1,p,D),c=new I(A,x,0,_,D),f=new I(new Array(0),G,0,g,z),Y=!0}e.l_desc=new P(e[t(1402)],u),e[t(1115)]=new P(e.dyn_dtree,c),e.bl_desc=new P(e[t(887)],f),e.bi_buf=0,e[t(555)]=0,Z(e)},e._tr_stored_block=J,e[t(1242)]=function(e,t,r,n){var i,a,o=_0xa05d,s=0;if(0<e[o(858)]?(2===e.strm[o(1485)]&&(e.strm[o(1485)]=(e=>{for(var t=_0xa05d,r=4093624447,n=0;n<=31;n++,r>>>=1)if(1&r&&0!==e[t(1402)][2*n])return l;if(0!==e.dyn_ltree[18]||0!==e[t(1402)][20]||0!==e[t(1402)][26])return d;for(n=32;n<v;n++)if(0!==e[t(1402)][2*n])return d;return l})(e)),L(e,e.l_desc),L(e,e[o(1115)]),s=(e=>{var t,r=_0xa05d;for(W(e,e[r(1402)],e[r(711)][r(1523)]),W(e,e[r(1107)],e[r(1115)][r(1523)]),L(e,e.bl_desc),t=g-1;3<=t&&0===e[r(887)][2*E[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),i=e[o(1335)]+3+7>>>3,(a=e[o(544)]+3+7>>>3)<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==t)J(e,t,r,n);else if(4===e[o(1105)]||a===i)R(e,2+(n?1:0),3),K(e,C,A);else{R(e,4+(n?1:0),3);var u,c=e,f=(t=e[o(711)][o(1523)]+1,r=e[o(1115)][o(1523)]+1,s+1),h=_0xa05d;for(R(c,t-257,5),R(c,r-1,5),R(c,f-4,4),u=0;u<f;u++)R(c,c[h(887)][2*E[u]+1],3);V(c,c[h(1402)],t-1),V(c,c[h(1107)],r-1),K(e,e[o(1402)],e[o(1107)])}Z(e),n&&q(e)},e[t(1200)]=function(e,t,r){var n=_0xa05d;return e.pending_buf[e[n(645)]+2*e.last_lit]=t>>>8&255,e[n(1880)][e[n(645)]+2*e[n(598)]+1]=255&t,e.pending_buf[e[n(687)]+e[n(598)]]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e[n(1537)]++,t--,e.dyn_ltree[2*(B[r]+v+1)]++,e[n(1107)][2*U(t)]++),e[n(598)]===e[n(1004)]-1},e[t(1972)]=function(e){var t;R(e,2,3),j(e,m,C),16===(e=e)[(t=_0xa05d)(555)]?(a(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e[t(1880)][e[t(876)]++]=255&e[t(1438)],e.bi_buf>>=8,e[t(555)]-=8)}}),se=t(function(e,t){t[X(1583)]=function(e,t,r,n){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;0!==r;){for(r-=o=2e3<r?2e3:r;a=a+(i=i+t[n++]|0)|0,--o;);i%=65521,a%=65521}return i|a<<16|0}}),ue=t(function(e,t){var r=X;var s=(()=>{for(var e=[],t=0;t<256;t++){for(var r=t,n=0;n<8;n++)r=1&r?3988292384^r>>>1:r>>>1;e[t]=r}return e})();t[r(1583)]=function(e,t,r,n){var i=s,a=n+r;e^=-1;for(var o=n;o<a;o++)e=e>>>8^i[255&(e^t[o])];return-1^e}}),W=t(function(e,t){var r=X;t[r(1583)]={2:r(1452),1:"stream end",0:"","-1":r(1078),"-2":r(1132),"-3":r(1441),"-4":r(970),"-5":r(1609),"-6":r(824)}}),ce=t(function(e){var u,t=X,d=$(),c=oe(),v=se(),p=ue(),j=W(),f=0,h=4,l=0,_=-2,N=-1,L=4,z=2,g=8,G=9,r=286,U=30,H=19,M=2*r+1,Z=15,m=3,y=258,b=y+m+1,w=42,k=113,x=1,E=2,C=3,A=4;function S(e,t){return e.msg=j[t],t}function D(e){return(e<<1)-(4<e?9:0)}function O(e){for(var t=e[_0xa05d(1468)];0<=--t;)e[t]=0}function B(e){var t=_0xa05d,r=e.state,n=r[t(876)];0!==(n=n>e[t(814)]?e.avail_out:n)&&(d[t(1298)](e.output,r[t(1880)],r.pending_out,n,e[t(1374)]),e.next_out+=n,r.pending_out+=n,e[t(508)]+=n,e[t(814)]-=n,r.pending-=n,0===r[t(876)])&&(r[t(1911)]=0)}function T(e,t){var r=_0xa05d;c._tr_flush_block(e,0<=e[r(1786)]?e.block_start:-1,e.strstart-e[r(1786)],t),e.block_start=e.strstart,B(e[r(1096)])}function F(e,t){var r=_0xa05d;e.pending_buf[e[r(876)]++]=t}function I(e,t){var r=_0xa05d;e.pending_buf[e[r(876)]++]=t>>>8&255,e[r(1880)][e.pending++]=255&t}function o(e,t){var r,n,i=_0xa05d,a=e[i(1304)],o=e[i(1212)],s=e[i(1041)],u=e[i(1840)],c=e.strstart>e[i(622)]-b?e[i(1212)]-(e.w_size-b):0,f=e[i(1158)],h=e[i(1287)],l=e.prev,d=e[i(1212)]+y,v=f[o+s-1],p=f[o+s];e.good_match<=e.prev_length&&(a>>=2),u>e[i(1732)]&&(u=e[i(1732)]);do{if(f[(r=t)+s]===p&&f[r+s-1]===v&&f[r]===f[o]&&f[++r]===f[o+1]){for(o+=2,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]&&f[++o]===f[++r]&&o<d;);if(n=y-(d-o),o=d-y,s<n){if(e[i(805)]=t,u<=(s=n))break;v=f[o+s-1],p=f[o+s]}}}while((t=l[t&h])>c&&0!=--a);return s<=e[i(1732)]?s:e[i(1732)]}function P(e){var t,r,n,i,a,o,s,u,c,f,h=_0xa05d,l=e[h(622)];do{if(u=e[h(760)]-e.lookahead-e[h(1212)],l+(l-b)<=e.strstart){for(d.arraySet(e[h(1158)],e[h(1158)],l,l,0),e[h(805)]-=l,e[h(1212)]-=l,e[h(1786)]-=l,t=r=e[h(553)];n=e[h(835)][--t],e[h(835)][t]=l<=n?n-l:0,--r;);for(t=r=l;n=e[h(1640)][--t],e[h(1640)][t]=l<=n?n-l:0,--r;);u+=l}if(0===e.strm.avail_in)break;if(a=e[h(1096)],o=e[h(1158)],s=e[h(1212)]+e[h(1732)],u=u,f=c=void 0,c=_0xa05d,f=a.avail_in,r=0===(f=u<f?u:f)?0:(a[c(1797)]-=f,d[c(1298)](o,a.input,a[c(738)],f,s),1===a[c(769)][c(1527)]?a[c(1328)]=v(a[c(1328)],o,f,s):2===a[c(769)][c(1527)]&&(a[c(1328)]=p(a[c(1328)],o,f,s)),a[c(738)]+=f,a.total_in+=f,f),e[h(1732)]+=r,e[h(1732)]+e.insert>=m)for(i=e[h(1212)]-e.insert,e[h(432)]=e[h(1158)][i],e[h(432)]=(e.ins_h<<e[h(1185)]^e[h(1158)][i+1])&e[h(1499)];e[h(654)]&&(e[h(432)]=(e[h(432)]<<e[h(1185)]^e[h(1158)][i+m-1])&e[h(1499)],e[h(1640)][i&e.w_mask]=e[h(835)][e[h(432)]],e[h(835)][e[h(432)]]=i,i++,e[h(654)]--,!(e[h(1732)]+e.insert<m)););}while(e[h(1732)]<b&&0!==e[h(1096)].avail_in)}function n(e,t){for(var r,n,i=_0xa05d;;){if(e[i(1732)]<b){if(P(e),e[i(1732)]<b&&t===f)return x;if(0===e[i(1732)])break}if(r=0,m<=e.lookahead&&(e[i(432)]=(e[i(432)]<<e[i(1185)]^e[i(1158)][e[i(1212)]+m-1])&e[i(1499)],r=e[i(1640)][e[i(1212)]&e.w_mask]=e[i(835)][e[i(432)]],e[i(835)][e[i(432)]]=e[i(1212)]),0!==r&&e[i(1212)]-r<=e.w_size-b&&(e.match_length=o(e,r)),e[i(1908)]>=m)if(n=c[i(1200)](e,e[i(1212)]-e.match_start,e[i(1908)]-m),e[i(1732)]-=e[i(1908)],e.match_length<=e[i(2e3)]&&e[i(1732)]>=m){for(e[i(1908)]--;e[i(1212)]++,e.ins_h=(e.ins_h<<e.hash_shift^e[i(1158)][e.strstart+m-1])&e[i(1499)],r=e[i(1640)][e[i(1212)]&e[i(1287)]]=e.head[e[i(432)]],e[i(835)][e.ins_h]=e[i(1212)],0!=--e[i(1908)];);e.strstart++}else e.strstart+=e.match_length,e[i(1908)]=0,e.ins_h=e[i(1158)][e[i(1212)]],e[i(432)]=(e.ins_h<<e[i(1185)]^e.window[e[i(1212)]+1])&e.hash_mask;else n=c[i(1200)](e,0,e[i(1158)][e[i(1212)]]),e[i(1732)]--,e[i(1212)]++;if(n&&(T(e,!1),0===e.strm[i(814)]))return x}return e[i(654)]=e.strstart<m-1?e[i(1212)]:m-1,t===h?(T(e,!0),0===e[i(1096)][i(814)]?C:A):e[i(598)]&&(T(e,!1),0===e[i(1096)].avail_out)?x:E}function i(e,t){for(var r,n,i,a=_0xa05d;;){if(e.lookahead<b){if(P(e),e[a(1732)]<b&&t===f)return x;if(0===e.lookahead)break}if(r=0,e[a(1732)]>=m&&(e.ins_h=(e[a(432)]<<e[a(1185)]^e[a(1158)][e[a(1212)]+m-1])&e[a(1499)],r=e[a(1640)][e[a(1212)]&e[a(1287)]]=e.head[e[a(432)]],e[a(835)][e[a(432)]]=e[a(1212)]),e.prev_length=e[a(1908)],e.prev_match=e[a(805)],e[a(1908)]=m-1,0!==r&&e.prev_length<e[a(2e3)]&&e.strstart-r<=e.w_size-b&&(e[a(1908)]=o(e,r),e[a(1908)]<=5)&&(1===e.strategy||e[a(1908)]===m&&4096<e[a(1212)]-e[a(805)])&&(e[a(1908)]=m-1),m<=e.prev_length&&e[a(1908)]<=e.prev_length){for(i=e[a(1212)]+e[a(1732)]-m,n=c._tr_tally(e,e[a(1212)]-1-e[a(696)],e[a(1041)]-m),e.lookahead-=e[a(1041)]-1,e.prev_length-=2;++e[a(1212)]<=i&&(e.ins_h=(e.ins_h<<e[a(1185)]^e[a(1158)][e[a(1212)]+m-1])&e.hash_mask,r=e[a(1640)][e[a(1212)]&e[a(1287)]]=e[a(835)][e[a(432)]],e[a(835)][e[a(432)]]=e[a(1212)]),0!=--e.prev_length;);if(e[a(1106)]=0,e[a(1908)]=m-1,e[a(1212)]++,n&&(T(e,!1),0===e[a(1096)][a(814)]))return x}else if(e[a(1106)]){if((n=c._tr_tally(e,0,e[a(1158)][e[a(1212)]-1]))&&T(e,!1),e.strstart++,e[a(1732)]--,0===e[a(1096)].avail_out)return x}else e[a(1106)]=1,e[a(1212)]++,e.lookahead--}return e[a(1106)]&&(n=c[a(1200)](e,0,e[a(1158)][e[a(1212)]-1]),e[a(1106)]=0),e.insert=e[a(1212)]<m-1?e.strstart:m-1,t===h?(T(e,!0),0===e[a(1096)][a(814)]?C:A):e[a(598)]&&(T(e,!1),0===e[a(1096)].avail_out)?x:E}function a(e,t,r,n,i){var a=_0xa05d;this.good_length=e,this[a(2014)]=t,this.nice_length=r,this.max_chain=n,this[a(701)]=i}function q(){var e=_0xa05d;this[e(1096)]=null,this[e(1792)]=0,this.pending_buf=null,this[e(1942)]=0,this[e(1911)]=0,this[e(876)]=0,this[e(1527)]=0,this[e(1863)]=null,this[e(928)]=0,this.method=g,this[e(1052)]=-1,this[e(622)]=0,this[e(1049)]=0,this[e(1287)]=0,this[e(1158)]=null,this[e(760)]=0,this.prev=null,this[e(835)]=null,this.ins_h=0,this[e(553)]=0,this[e(1874)]=0,this.hash_mask=0,this[e(1185)]=0,this[e(1786)]=0,this[e(1908)]=0,this[e(696)]=0,this.match_available=0,this.strstart=0,this.match_start=0,this[e(1732)]=0,this[e(1041)]=0,this.max_chain_length=0,this[e(2e3)]=0,this[e(858)]=0,this[e(1105)]=0,this[e(961)]=0,this[e(1840)]=0,this[e(1402)]=new d[e(546)](2*M),this[e(1107)]=new d[e(546)](2*(2*U+1)),this[e(887)]=new d.Buf16(2*(2*H+1)),O(this[e(1402)]),O(this[e(1107)]),O(this[e(887)]),this.l_desc=null,this[e(1115)]=null,this[e(1331)]=null,this[e(726)]=new d[e(546)](Z+1),this[e(1515)]=new d.Buf16(2*r+1),O(this[e(1515)]),this[e(1796)]=0,this[e(1968)]=0,this[e(624)]=new d.Buf16(2*r+1),O(this[e(624)]),this[e(687)]=0,this[e(1004)]=0,this[e(598)]=0,this[e(645)]=0,this[e(1335)]=0,this[e(544)]=0,this[e(1537)]=0,this.insert=0,this[e(1438)]=0,this[e(555)]=0}function s(e){var t,r=_0xa05d;return e&&e[r(769)]?(e[r(1766)]=e[r(508)]=0,e.data_type=z,(t=e.state)[r(876)]=0,t[r(1911)]=0,t[r(1527)]<0&&(t[r(1527)]=-t[r(1527)]),t.status=t[r(1527)]?w:k,e[r(1328)]=2===t.wrap?0:1,t[r(1052)]=f,c._tr_init(t),l):S(e,_)}function R(e){var t=_0xa05d,r=s(e);return r===l&&((e=e[t(769)])[(t=_0xa05d)(760)]=2*e[t(622)],O(e[t(835)]),e.max_lazy_match=u[e[t(858)]][t(2014)],e[t(961)]=u[e[t(858)]].good_length,e[t(1840)]=u[e[t(858)]][t(1035)],e[t(1304)]=u[e.level][t(1608)],e.strstart=0,e[t(1786)]=0,e[t(1732)]=0,e[t(654)]=0,e[t(1908)]=e[t(1041)]=m-1,e[t(1106)]=0,e.ins_h=0),r}function K(e,t,r,n,i,a){var o=_0xa05d;if(!e)return _;var s=1;if(t===N&&(t=6),n<0?(s=0,n=-n):15<n&&(s=2,n-=16),i<1||G<i||r!==g||n<8||15<n||t<0||9<t||a<0||L<a)return S(e,_);8===n&&(n=9);var u=new q;return(e[o(769)]=u)[o(1096)]=e,u[o(1527)]=s,u[o(1863)]=null,u[o(1049)]=n,u[o(622)]=1<<u[o(1049)],u.w_mask=u.w_size-1,u.hash_bits=i+7,u.hash_size=1<<u[o(1874)],u[o(1499)]=u.hash_size-1,u.hash_shift=~~((u[o(1874)]+m-1)/m),u[o(1158)]=new d[o(1821)](2*u[o(622)]),u.head=new d[o(546)](u[o(553)]),u[o(1640)]=new d[o(546)](u[o(622)]),u[o(1004)]=1<<i+6,u[o(1942)]=4*u[o(1004)],u[o(1880)]=new d[o(1821)](u.pending_buf_size),u.d_buf=+u[o(1004)],u.l_buf=3*u[o(1004)],u[o(858)]=t,u[o(1105)]=a,u[o(861)]=r,R(e)}u=[new a(0,0,0,0,function(e,t){var r=_0xa05d,n=65535;for(n>e[r(1942)]-5&&(n=e[r(1942)]-5);;){if(e[r(1732)]<=1){if(P(e),0===e[r(1732)]&&t===f)return x;if(0===e.lookahead)break}e[r(1212)]+=e.lookahead,e[r(1732)]=0;var i=e[r(1786)]+n;if((0===e[r(1212)]||e[r(1212)]>=i)&&(e[r(1732)]=e[r(1212)]-i,e.strstart=i,T(e,!1),0===e[r(1096)].avail_out)||e[r(1212)]-e[r(1786)]>=e.w_size-b&&(T(e,!1),0===e[r(1096)].avail_out))return x}return e[r(654)]=0,t===h?(T(e,!0),0===e[r(1096)].avail_out?C:A):(e[r(1212)]>e[r(1786)]&&(T(e,!1),e.strm[r(814)]),x)}),new a(4,4,8,4,n),new a(4,5,16,8,n),new a(4,6,32,32,n),new a(4,4,16,16,i),new a(8,16,32,32,i),new a(8,16,128,128,i),new a(8,32,128,256,i),new a(32,128,258,1024,i),new a(32,258,258,4096,i)],e[t(908)]=function(e,t){return K(e,t,g,15,8,0)},e[t(751)]=K,e[t(1292)]=R,e[t(611)]=s,e[t(1300)]=function(e,t){var r=_0xa05d;return e&&e[r(769)]&&2===e[r(769)][r(1527)]?(e[r(769)][r(1863)]=t,l):_},e[t(894)]=function(e,t){var r,n,i,a,o=_0xa05d;if(!e||!e[o(769)]||5<t||t<0)return e?S(e,_):_;if(n=e[o(769)],!e[o(1375)]||!e[o(1215)]&&0!==e[o(1797)]||666===n[o(1792)]&&t!==h)return S(e,0===e.avail_out?-5:_);if(n[o(1096)]=e,r=n[o(1052)],n[o(1052)]=t,n[o(1792)]===w&&(2===n[o(1527)]?(e[o(1328)]=0,F(n,31),F(n,139),F(n,8),n[o(1863)]?(F(n,(n[o(1863)][o(1489)]?1:0)+(n[o(1863)].hcrc?2:0)+(n[o(1863)][o(1855)]?4:0)+(n[o(1863)][o(1943)]?8:0)+(n.gzhead[o(1641)]?16:0)),F(n,255&n[o(1863)][o(1270)]),F(n,n[o(1863)][o(1270)]>>8&255),F(n,n[o(1863)][o(1270)]>>16&255),F(n,n[o(1863)][o(1270)]>>24&255),F(n,9===n[o(858)]?2:2<=n.strategy||n[o(858)]<2?4:0),F(n,255&n.gzhead.os),n[o(1863)][o(1855)]&&n.gzhead[o(1855)][o(1468)]&&(F(n,255&n.gzhead[o(1855)][o(1468)]),F(n,n.gzhead[o(1855)].length>>8&255)),n[o(1863)][o(2002)]&&(e.adler=p(e[o(1328)],n[o(1880)],n[o(876)],0)),n[o(928)]=0,n[o(1792)]=69):(F(n,0),F(n,0),F(n,0),F(n,0),F(n,0),F(n,9===n[o(858)]?2:2<=n[o(1105)]||n[o(858)]<2?4:0),F(n,3),n[o(1792)]=k)):(s=g+(n[o(1049)]-8<<4)<<8,s|=(2<=n[o(1105)]||n[o(858)]<2?0:n[o(858)]<6?1:6===n[o(858)]?2:3)<<6,0!==n[o(1212)]&&(s|=32),s+=31-s%31,n[o(1792)]=k,I(n,s),0!==n[o(1212)]&&(I(n,e.adler>>>16),I(n,65535&e[o(1328)])),e[o(1328)]=1)),69===n.status)if(n[o(1863)][o(1855)]){for(i=n[o(876)];n[o(928)]<(65535&n[o(1863)][o(1855)][o(1468)])&&(n[o(876)]!==n[o(1942)]||(n[o(1863)][o(2002)]&&n[o(876)]>i&&(e[o(1328)]=p(e[o(1328)],n.pending_buf,n.pending-i,i)),B(e),i=n[o(876)],n[o(876)]!==n[o(1942)]));)F(n,255&n[o(1863)][o(1855)][n[o(928)]]),n.gzindex++;n.gzhead[o(2002)]&&n[o(876)]>i&&(e[o(1328)]=p(e[o(1328)],n[o(1880)],n[o(876)]-i,i)),n.gzindex===n[o(1863)][o(1855)][o(1468)]&&(n.gzindex=0,n.status=73)}else n[o(1792)]=73;if(73===n.status)if(n[o(1863)][o(1943)]){i=n[o(876)];do{if(n[o(876)]===n.pending_buf_size&&(n.gzhead[o(2002)]&&n[o(876)]>i&&(e[o(1328)]=p(e[o(1328)],n[o(1880)],n[o(876)]-i,i)),B(e),i=n.pending,n[o(876)]===n.pending_buf_size)){a=1;break}}while(a=n[o(928)]<n[o(1863)].name[o(1468)]?255&n[o(1863)][o(1943)][o(996)](n[o(928)]++):0,F(n,a),0!==a);n[o(1863)][o(2002)]&&n[o(876)]>i&&(e[o(1328)]=p(e.adler,n[o(1880)],n[o(876)]-i,i)),0===a&&(n.gzindex=0,n[o(1792)]=91)}else n[o(1792)]=91;if(91===n[o(1792)])if(n[o(1863)][o(1641)]){i=n[o(876)];do{if(n[o(876)]===n.pending_buf_size&&(n[o(1863)][o(2002)]&&n[o(876)]>i&&(e[o(1328)]=p(e.adler,n.pending_buf,n[o(876)]-i,i)),B(e),i=n[o(876)],n.pending===n[o(1942)])){a=1;break}}while(a=n[o(928)]<n[o(1863)][o(1641)][o(1468)]?255&n[o(1863)][o(1641)][o(996)](n[o(928)]++):0,F(n,a),0!==a);n[o(1863)][o(2002)]&&n[o(876)]>i&&(e.adler=p(e.adler,n[o(1880)],n[o(876)]-i,i)),0===a&&(n.status=103)}else n[o(1792)]=103;if(103===n.status&&(n.gzhead.hcrc?(n[o(876)]+2>n[o(1942)]&&B(e),n[o(876)]+2<=n[o(1942)]&&(F(n,255&e[o(1328)]),F(n,e[o(1328)]>>8&255),e.adler=0,n.status=k)):n[o(1792)]=k),0!==n[o(876)]){if(B(e),0===e[o(814)])return n[o(1052)]=-1,l}else if(0===e[o(1797)]&&D(t)<=D(r)&&t!==h)return S(e,-5);if(666===n.status&&0!==e[o(1797)])return S(e,-5);if(0!==e[o(1797)]||0!==n[o(1732)]||t!==f&&666!==n[o(1792)]){var s=2===n[o(1105)]?((e,t)=>{for(var r,n=_0xa05d;;){if(0===e[n(1732)]&&(P(e),0===e[n(1732)])){if(t===f)return x;break}if(e[n(1908)]=0,r=c._tr_tally(e,0,e[n(1158)][e[n(1212)]]),e[n(1732)]--,e.strstart++,r&&(T(e,!1),0===e[n(1096)].avail_out))return x}return e[n(654)]=0,t===h?(T(e,!0),0===e[n(1096)][n(814)]?C:A):e[n(598)]&&(T(e,!1),0===e[n(1096)][n(814)])?x:E})(n,t):3===n.strategy?((e,t)=>{for(var r,n,i,a,o=_0xa05d,s=e.window;;){if(e[o(1732)]<=y){if(P(e),e.lookahead<=y&&t===f)return x;if(0===e.lookahead)break}if(e[o(1908)]=0,e[o(1732)]>=m&&0<e[o(1212)]&&(n=s[i=e.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){for(a=e[o(1212)]+y;n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i<a;);e[o(1908)]=y-(a-i),e[o(1908)]>e[o(1732)]&&(e[o(1908)]=e.lookahead)}if(e[o(1908)]>=m?(r=c[o(1200)](e,1,e[o(1908)]-m),e[o(1732)]-=e[o(1908)],e[o(1212)]+=e[o(1908)],e[o(1908)]=0):(r=c[o(1200)](e,0,e[o(1158)][e.strstart]),e[o(1732)]--,e[o(1212)]++),r&&(T(e,!1),0===e[o(1096)].avail_out))return x}return e.insert=0,t===h?(T(e,!0),0===e[o(1096)][o(814)]?C:A):e[o(598)]&&(T(e,!1),0===e.strm.avail_out)?x:E})(n,t):u[n[o(858)]][o(701)](n,t);if(s!==C&&s!==A||(n[o(1792)]=666),s===x||s===C)return 0===e[o(814)]&&(n.last_flush=-1),l;if(s===E&&(1===t?c[o(1972)](n):5!==t&&(c[o(1656)](n,0,0,!1),3===t)&&(O(n.head),0===n[o(1732)])&&(n.strstart=0,n[o(1786)]=0,n[o(654)]=0),B(e),0===e[o(814)]))return n[o(1052)]=-1,l}return t!==h||!(n[o(1527)]<=0)&&(2===n[o(1527)]?(F(n,255&e[o(1328)]),F(n,e[o(1328)]>>8&255),F(n,e[o(1328)]>>16&255),F(n,e[o(1328)]>>24&255),F(n,255&e[o(1766)]),F(n,e[o(1766)]>>8&255),F(n,e[o(1766)]>>16&255),F(n,e.total_in>>24&255)):(I(n,e[o(1328)]>>>16),I(n,65535&e[o(1328)])),B(e),0<n[o(1527)]&&(n[o(1527)]=-n.wrap),0!==n.pending)?l:1},e[t(617)]=function(e){var t,r=_0xa05d;return e&&e[r(769)]?(t=e[r(769)][r(1792)])!==w&&69!==t&&73!==t&&91!==t&&103!==t&&t!==k&&666!==t?S(e,_):(e[r(769)]=null,t===k?S(e,-3):l):_},e[t(594)]=function(e,t){var r,n,i,a,o,s,u,c=_0xa05d,f=t[c(1468)];if(!e||!e.state||2===(a=(r=e[c(769)])[c(1527)])||1===a&&r[c(1792)]!==w||r.lookahead)return _;for(1===a&&(e.adler=v(e[c(1328)],t,f,0)),r.wrap=0,f>=r[c(622)]&&(0===a&&(O(r[c(835)]),r[c(1212)]=0,r[c(1786)]=0,r[c(654)]=0),u=new d.Buf8(r[c(622)]),d.arraySet(u,t,f-r[c(622)],r[c(622)],0),t=u,f=r.w_size),u=e[c(1797)],o=e[c(738)],s=e[c(1215)],e[c(1797)]=f,e.next_in=0,e[c(1215)]=t,P(r);r[c(1732)]>=m;){for(n=r.strstart,i=r.lookahead-(m-1);r[c(432)]=(r[c(432)]<<r.hash_shift^r.window[n+m-1])&r[c(1499)],r[c(1640)][n&r.w_mask]=r[c(835)][r[c(432)]],r[c(835)][r[c(432)]]=n,n++,--i;);r[c(1212)]=n,r.lookahead=m-1,P(r)}return r[c(1212)]+=r[c(1732)],r[c(1786)]=r[c(1212)],r[c(654)]=r.lookahead,r[c(1732)]=0,r[c(1908)]=r[c(1041)]=m-1,r[c(1106)]=0,e[c(738)]=o,e[c(1215)]=s,e[c(1797)]=u,r[c(1527)]=a,l},e[t(834)]=t(1085)}),fe=t(function(e){var c=X,f=$(),a=!0,o=!0;try{String.fromCharCode[c(1189)](null,[0])}catch(e){a=!1}try{String[c(896)][c(1189)](null,new Uint8Array(1))}catch(e){o=!1}for(var t,u=new f.Buf8(256),t=0;t<256;t++)u[t]=252<=t?6:248<=t?5:240<=t?4:224<=t?3:192<=t?2:1;function h(e,t){var r=c;if(t<65534&&(e.subarray&&o||!e[r(686)]&&a))return String[r(896)][r(1189)](null,f.shrinkBuf(e,t));for(var n="",i=0;i<t;i++)n+=String.fromCharCode(e[i]);return n}u[254]=u[254]=1,e.string2buf=function(e){for(var t,r,n,i,a=c,o=e[a(1468)],s=0,u=0;u<o;u++)55296==(64512&(r=e[a(996)](u)))&&u+1<o&&56320==(64512&(n=e[a(996)](u+1)))&&(r=65536+(r-55296<<10)+(n-56320),u++),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new f.Buf8(s),u=i=0;i<s;u++)55296==(64512&(r=e.charCodeAt(u)))&&u+1<o&&56320==(64512&(n=e[a(996)](u+1)))&&(r=65536+(r-55296<<10)+(n-56320),u++),r<128?t[i++]=r:(r<2048?t[i++]=192|r>>>6:(r<65536?t[i++]=224|r>>>12:(t[i++]=240|r>>>18,t[i++]=128|r>>>12&63),t[i++]=128|r>>>6&63),t[i++]=128|63&r);return t},e[c(1258)]=function(e){return h(e,e[c(1468)])},e[c(1918)]=function(e){for(var t=c,r=new f[t(1821)](e.length),n=0,i=r[t(1468)];n<i;n++)r[n]=e.charCodeAt(n);return r},e[c(1548)]=function(e,t){for(var r,n,i=t||e[c(1468)],a=new Array(2*i),o=0,s=0;s<i;)if((r=e[s++])<128)a[o++]=r;else if(4<(n=u[r]))a[o++]=65533,s+=n-1;else{for(r&=2===n?31:3===n?15:7;1<n&&s<i;)r=r<<6|63&e[s++],n--;1<n?a[o++]=65533:r<65536?a[o++]=r:(r-=65536,a[o++]=55296|r>>10&1023,a[o++]=56320|1023&r)}return h(a,o)},e[c(1951)]=function(e,t){for(var r=c,n=(t=(t=t||e[r(1468)])>e.length?e[r(1468)]:t)-1;0<=n&&128==(192&e[n]);)n--;return!(n<0||0===n)&&n+u[e[n]]>t?n:t}}),he=t(function(e,t){t.exports=function(){var e=_0xa05d;this[e(1215)]=null,this.next_in=0,this.avail_in=0,this[e(1766)]=0,this[e(1375)]=null,this[e(1374)]=0,this[e(814)]=0,this[e(508)]=0,this.msg="",this[e(769)]=null,this[e(1485)]=2,this.adler=0}}),le=t(function(e){var s=X,u=ce(),c=$(),f=fe(),n=W(),i=he(),h=Object[s(1111)].toString;function a(e){var t=s;if(!(this instanceof a))return new a(e);this[t(790)]=c[t(1224)]({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});e=this.options;if(e[t(831)]&&0<e[t(1378)]?e[t(1378)]=-e.windowBits:e[t(774)]&&0<e[t(1378)]&&e.windowBits<16&&(e[t(1378)]+=16),this.err=0,this[t(1954)]="",this.ended=!1,this[t(1045)]=[],this[t(1096)]=new i,(this[t(1096)].avail_out=0)!==(r=u[t(751)](this.strm,e[t(858)],e[t(861)],e.windowBits,e[t(1322)],e[t(1105)])))throw new Error(n[r]);if(e[t(623)]&&u[t(1300)](this.strm,e[t(623)]),e[t(709)]){var r,e=typeof e[t(709)]==t(1265)?f[t(1348)](e.dictionary):h[t(971)](e[t(709)])===t(1036)?new Uint8Array(e[t(709)]):e[t(709)];if(0!==(r=u.deflateSetDictionary(this[t(1096)],e)))throw new Error(n[r]);this[t(1433)]=!0}}function r(e,t){var r=s,t=new a(t);if(t.push(e,!0),t[r(579)])throw t[r(1954)]||n[t[r(579)]];return t.result}a.prototype[s(1181)]=function(e,t){var r,n,i=s,a=this.strm,o=this[i(790)].chunkSize;if(this[i(1526)])return!1;n=t===~~t?t:!0===t?4:0,typeof e==i(1265)?a[i(1215)]=f.string2buf(e):"[object ArrayBuffer]"===h[i(971)](e)?a[i(1215)]=new Uint8Array(e):a[i(1215)]=e,a[i(738)]=0,a[i(1797)]=a[i(1215)][i(1468)];do{if(0===a[i(814)]&&(a[i(1375)]=new c[i(1821)](o),a[i(1374)]=0,a[i(814)]=o),1!==(r=u.deflate(a,n))&&0!==r)return this[i(1690)](r),!(this[i(1526)]=!0)}while(0!==a[i(814)]&&(0!==a.avail_in||4!==n&&2!==n)||("string"===this[i(790)].to?this[i(1347)](f[i(1258)](c[i(770)](a[i(1375)],a[i(1374)]))):this[i(1347)](c.shrinkBuf(a.output,a[i(1374)]))),(0<a[i(1797)]||0===a[i(814)])&&1!==r);return 4===n?(r=u[i(617)](this[i(1096)]),this[i(1690)](r),this.ended=!0,0===r):(2===n&&(this.onEnd(0),a[i(814)]=0),!0)},a[s(1111)][s(1347)]=function(e){var t=s;this.chunks[t(1181)](e)},a.prototype[s(1690)]=function(e){var t=s;0===e&&(this[t(790)].to===t(1265)?this[t(1779)]=this.chunks[t(1681)](""):this.result=c[t(913)](this[t(1045)])),this[t(1045)]=[],this[t(579)]=e,this[t(1954)]=this[t(1096)].msg},e[s(651)]=a,e[s(894)]=r,e[s(1973)]=function(e,t){return(t=t||{})[s(831)]=!0,r(e,t)},e[s(774)]=function(e,t){return(t=t||{}).gzip=!0,r(e,t)}}),de=t(function(e,t){var D=X;t[D(1583)]=function(e,t){var r,n,i,a,o,s,u=D,c=e[u(769)],f=e[u(738)],h=e[u(1215)],l=f+(e[u(1797)]-5),d=e[u(1374)],v=e.output,p=d-(t-e[u(814)]),_=d+(e[u(814)]-257),g=c[u(1948)],m=c[u(911)],y=c[u(977)],b=c.wnext,w=c[u(1158)],k=c[u(1856)],x=c.bits,E=c.lencode,C=c[u(1602)],A=(1<<c[u(1692)])-1,S=(1<<c[u(1764)])-1;e:do{for(x<15&&(k+=h[f++]<<x,x+=8,k+=h[f++]<<x,x+=8),r=E[k&A];;){if(k>>>=n=r>>>24,x-=n,0===(n=r>>>16&255))v[d++]=65535&r;else{if(!(16&n)){if(0==(64&n)){r=E[(65535&r)+(k&(1<<n)-1)];continue}if(32&n){c[u(1495)]=12;break e}e[u(1954)]=u(1593),c[u(1495)]=30;break e}for(i=65535&r,(n&=15)&&(x<n&&(k+=h[f++]<<x,x+=8),i+=k&(1<<n)-1,k>>>=n,x-=n),x<15&&(k+=h[f++]<<x,x+=8,k+=h[f++]<<x,x+=8),r=C[k&S];;){if(k>>>=n=r>>>24,x-=n,!(16&(n=r>>>16&255))){if(0==(64&n)){r=C[(65535&r)+(k&(1<<n)-1)];continue}e[u(1954)]=u(1893),c[u(1495)]=30;break e}if(a=65535&r,x<(n&=15)&&(k+=h[f++]<<x,(x+=8)<n)&&(k+=h[f++]<<x,x+=8),g<(a+=k&(1<<n)-1)){e.msg=u(1077),c[u(1495)]=30;break e}if(k>>>=n,x-=n,(n=d-p)<a){if(y<(n=a-n)&&c[u(534)]){e[u(1954)]=u(1077),c[u(1495)]=30;break e}if(s=w,(o=0)===b){if(o+=m-n,n<i){for(i-=n;v[d++]=w[o++],--n;);o=d-a,s=v}}else if(b<n){if(o+=m+b-n,(n-=b)<i){for(i-=n;v[d++]=w[o++],--n;);if(o=0,b<i){for(i-=n=b;v[d++]=w[o++],--n;);o=d-a,s=v}}}else if(o+=b-n,n<i){for(i-=n;v[d++]=w[o++],--n;);o=d-a,s=v}for(;2<i;)v[d++]=s[o++],v[d++]=s[o++],v[d++]=s[o++],i-=3;i&&(v[d++]=s[o++],1<i)&&(v[d++]=s[o++])}else{for(o=d-a;v[d++]=v[o++],v[d++]=v[o++],v[d++]=v[o++],2<(i-=3););i&&(v[d++]=v[o++],1<i)&&(v[d++]=v[o++])}break}}break}}while(f<l&&d<_);f-=i=x>>3,k&=(1<<(x-=i<<3))-1,e[u(738)]=f,e[u(1374)]=d,e[u(1797)]=f<l?l-f+5:5-(f-l),e[u(814)]=d<_?_-d+257:257-(d-_),c[u(1856)]=k,c.bits=x}}),ve=t(function(e,t){var R=X,j=$(),N=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],L=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],z=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],G=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t[R(1583)]=function(e,t,r,n,i,a,o,s){for(var u,c,f,h,l,d,v,p,_,g=R,m=s[g(434)],y=0,b=0,w=0,k=0,x=0,E=0,C=0,A=0,S=0,D=0,O=null,B=0,T=new j[g(546)](16),F=new j[g(546)](16),I=null,P=0,y=0;y<=15;y++)T[y]=0;for(b=0;b<n;b++)T[t[r+b]]++;for(x=m,k=15;1<=k&&0===T[k];k--);if(k<x&&(x=k),0===k)i[a++]=20971520,i[a++]=20971520,s[g(434)]=1;else{for(w=1;w<k&&0===T[w];w++);for(x<w&&(x=w),y=A=1;y<=15;y++)if((A=(A<<1)-T[y])<0)return-1;if(0<A&&(0===e||1!==k))return-1;for(F[1]=0,y=1;y<15;y++)F[y+1]=F[y]+T[y];for(b=0;b<n;b++)0!==t[r+b]&&(o[F[t[r+b]]++]=b);if(d=0===e?(O=I=o,19):1===e?(O=N,B-=257,I=L,P-=257,256):(O=z,I=G,-1),y=w,l=a,C=b=D=0,f=-1,h=(S=1<<(E=x))-1,1===e&&852<S||2===e&&592<S)return 1;for(;;){for(_=o[b]<d?(p=0,o[b]):o[b]>d?(p=I[P+o[b]],O[B+o[b]]):(p=96,0),u=1<<(v=y-C),w=c=1<<E;i[l+(D>>C)+(c-=u)]=v<<24|p<<16|_|0,0!==c;);for(u=1<<y-1;D&u;)u>>=1;if(0!==u?D=(D&u-1)+u:D=0,b++,0==--T[y]){if(y===k)break;y=t[r+o[b]]}if(x<y&&(D&h)!==f){for(l+=w,A=1<<(E=y-(C=0===C?x:C));E+C<k&&!((A-=T[E+C])<=0);)E++,A<<=1;if(S+=1<<E,1===e&&852<S||2===e&&592<S)return 1;i[f=D&h]=x<<24|E<<16|l-a|0}}0!==D&&(i[l+D]=y-C<<24|64<<16|0),s[g(434)]=x}return 0}}),pe=t(function(e){var t=X,I=$(),P=se(),R=ue(),j=de(),N=ve(),L=1,z=2,G=0,U=-2,H=1,n=852,i=592;function M(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function a(){var e=_0xa05d;this[e(1495)]=0,this[e(1928)]=!1,this[e(1527)]=0,this.havedict=!1,this.flags=0,this[e(1948)]=0,this[e(811)]=0,this[e(945)]=0,this[e(835)]=null,this[e(1006)]=0,this[e(911)]=0,this[e(977)]=0,this.wnext=0,this[e(1158)]=null,this.hold=0,this[e(434)]=0,this.length=0,this[e(898)]=0,this.extra=0,this[e(1233)]=null,this[e(1602)]=null,this[e(1692)]=0,this[e(1764)]=0,this.ncode=0,this.nlen=0,this[e(1007)]=0,this.have=0,this.next=null,this.lens=new I.Buf16(320),this[e(1854)]=new I[e(546)](288),this[e(1914)]=null,this.distdyn=null,this[e(534)]=0,this.back=0,this.was=0}function o(e){var t,r=_0xa05d;return e&&e[r(769)]?(t=e[r(769)],e[r(1766)]=e[r(508)]=t[r(945)]=0,e[r(1954)]="",t[r(1527)]&&(e.adler=1&t.wrap),t.mode=H,t[r(1928)]=0,t[r(1793)]=0,t[r(1948)]=32768,t[r(835)]=null,t.hold=0,t[r(434)]=0,t[r(1233)]=t.lendyn=new I[r(1290)](n),t[r(1602)]=t[r(1974)]=new I.Buf32(i),t[r(534)]=1,t[r(938)]=-1,G):U}function s(e){var t,r=_0xa05d;return e&&e[r(769)]?((t=e[r(769)]).wsize=0,t[r(977)]=0,t.wnext=0,o(e)):U}function u(e,t){var r,n,i=_0xa05d;return!e||!e[i(769)]||(n=e[i(769)],t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t))?U:(null!==n[i(1158)]&&n[i(1006)]!==t&&(n[i(1158)]=null),n[i(1527)]=r,n[i(1006)]=t,s(e))}function r(e,t){var r,n=_0xa05d;return e?(r=new a,(e[n(769)]=r)[n(1158)]=null,(r=u(e,t))!==G&&(e.state=null),r):U}var Z,q,K=!0;function W(e,t,r,n){var i,a=_0xa05d,e=e[a(769)];return null===e.window&&(e[a(911)]=1<<e.wbits,e[a(1873)]=0,e[a(977)]=0,e[a(1158)]=new I[a(1821)](e[a(911)])),n>=e[a(911)]?(I[a(1298)](e[a(1158)],t,r-e[a(911)],e[a(911)],0),e.wnext=0,e[a(977)]=e[a(911)]):(n<(i=e[a(911)]-e[a(1873)])&&(i=n),I[a(1298)](e[a(1158)],t,r-n,i,e.wnext),(n-=i)?(I[a(1298)](e[a(1158)],t,r-n,n,0),e[a(1873)]=n,e[a(977)]=e.wsize):(e[a(1873)]+=i,e[a(1873)]===e.wsize&&(e[a(1873)]=0),e[a(977)]<e[a(911)]&&(e[a(977)]+=i))),0}e[t(1673)]=s,e[t(692)]=u,e[t(942)]=o,e.inflateInit=function(e){return r(e,15)},e.inflateInit2=r,e[t(1905)]=function(e,t){var r,n,i,a,o,s,u,c,f,h,l,d,v,p,_,g,m,y,b,w,k,x,E,C,A=_0xa05d,S=0,D=new I[A(1821)](4),O=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e[A(769)]||!e[A(1375)]||!e[A(1215)]&&0!==e[A(1797)])return U;12===(r=e[A(769)])[A(1495)]&&(r[A(1495)]=13),o=e[A(1374)],i=e[A(1375)],u=e.avail_out,a=e[A(738)],n=e[A(1215)],s=e[A(1797)],c=r.hold,f=r[A(434)],h=s,l=u,x=G;e:for(;;)switch(r[A(1495)]){case H:if(0===r[A(1527)])r[A(1495)]=13;else{for(;f<16;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}if(2&r[A(1527)]&&35615===c)D[r[A(811)]=0]=255&c,D[1]=c>>>8&255,r[A(811)]=R(r[A(811)],D,2,0),f=c=0,r[A(1495)]=2;else if(r[A(904)]=0,r.head&&(r[A(835)][A(1594)]=!1),!(1&r[A(1527)])||(((255&c)<<8)+(c>>8))%31)e.msg="incorrect header check",r[A(1495)]=30;else if(8!=(15&c))e[A(1954)]=A(1325),r[A(1495)]=30;else{if(f-=4,k=8+(15&(c>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){e[A(1954)]=A(933),r[A(1495)]=30;break}r[A(1948)]=1<<k,e[A(1328)]=r.check=1,r.mode=512&c?10:12,f=c=0}}break;case 2:for(;f<16;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}if(r.flags=c,8!=(255&r[A(904)])){e[A(1954)]=A(1325),r[A(1495)]=30;break}if(57344&r[A(904)]){e[A(1954)]=A(1625),r[A(1495)]=30;break}r[A(835)]&&(r.head[A(1489)]=c>>8&1),512&r[A(904)]&&(D[0]=255&c,D[1]=c>>>8&255,r[A(811)]=R(r[A(811)],D,2,0)),f=c=0,r[A(1495)]=3;case 3:for(;f<32;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}r[A(835)]&&(r[A(835)].time=c),512&r[A(904)]&&(D[0]=255&c,D[1]=c>>>8&255,D[2]=c>>>16&255,D[3]=c>>>24&255,r.check=R(r[A(811)],D,4,0)),f=c=0,r[A(1495)]=4;case 4:for(;f<16;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}r.head&&(r.head.xflags=255&c,r[A(835)].os=c>>8),512&r[A(904)]&&(D[0]=255&c,D[1]=c>>>8&255,r[A(811)]=R(r[A(811)],D,2,0)),f=c=0,r[A(1495)]=5;case 5:if(1024&r[A(904)]){for(;f<16;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}r.length=c,r[A(835)]&&(r.head[A(1586)]=c),512&r.flags&&(D[0]=255&c,D[1]=c>>>8&255,r[A(811)]=R(r.check,D,2,0)),f=c=0}else r[A(835)]&&(r[A(835)].extra=null);r[A(1495)]=6;case 6:if(1024&r[A(904)]&&((d=s<(d=r[A(1468)])?s:d)&&(r.head&&(k=r[A(835)].extra_len-r[A(1468)],r[A(835)][A(1855)]||(r[A(835)][A(1855)]=new Array(r[A(835)][A(1586)])),I.arraySet(r[A(835)][A(1855)],n,a,d,k)),512&r[A(904)]&&(r[A(811)]=R(r[A(811)],n,d,a)),s-=d,a+=d,r[A(1468)]-=d),r.length))break e;r[A(1468)]=0,r[A(1495)]=7;case 7:if(2048&r[A(904)]){if(0===s)break e;for(d=0;k=n[a+d++],r[A(835)]&&k&&r.length<65536&&(r.head[A(1943)]+=String[A(896)](k)),k&&d<s;);if(512&r[A(904)]&&(r[A(811)]=R(r[A(811)],n,d,a)),s-=d,a+=d,k)break e}else r[A(835)]&&(r[A(835)][A(1943)]=null);r[A(1468)]=0,r[A(1495)]=8;case 8:if(4096&r[A(904)]){if(0===s)break e;for(d=0;k=n[a+d++],r[A(835)]&&k&&r[A(1468)]<65536&&(r[A(835)][A(1641)]+=String[A(896)](k)),k&&d<s;);if(512&r[A(904)]&&(r.check=R(r[A(811)],n,d,a)),s-=d,a+=d,k)break e}else r.head&&(r[A(835)][A(1641)]=null);r[A(1495)]=9;case 9:if(512&r[A(904)]){for(;f<16;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}if(c!==(65535&r[A(811)])){e.msg="header crc mismatch",r[A(1495)]=30;break}f=c=0}r.head&&(r[A(835)][A(2002)]=r.flags>>9&1,r[A(835)][A(1594)]=!0),e[A(1328)]=r.check=0,r[A(1495)]=12;break;case 10:for(;f<32;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}e.adler=r[A(811)]=M(c),f=c=0,r[A(1495)]=11;case 11:if(0===r[A(1793)])return e[A(1374)]=o,e[A(814)]=u,e[A(738)]=a,e[A(1797)]=s,r[A(1856)]=c,r[A(434)]=f,2;e[A(1328)]=r[A(811)]=1,r[A(1495)]=12;case 12:if(5===t||6===t)break e;case 13:if(r[A(1928)])c>>>=7&f,f-=7&f,r[A(1495)]=27;else{for(;f<3;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}switch(r.last=1&c,--f,3&(c>>>=1)){case 0:r.mode=14;break;case 1:B=F=T=void 0;var B,T=r,F=_0xa05d;if(K){for(Z=new I[F(1290)](512),q=new I[F(1290)](32),B=0;B<144;)T.lens[B++]=8;for(;B<256;)T[F(671)][B++]=9;for(;B<280;)T.lens[B++]=7;for(;B<288;)T[F(671)][B++]=8;for(N(L,T[F(671)],0,288,Z,0,T.work,{bits:9}),B=0;B<32;)T.lens[B++]=5;N(z,T.lens,0,32,q,0,T.work,{bits:5}),K=!1}if(T[F(1233)]=Z,T[F(1692)]=9,T.distcode=q,T[F(1764)]=5,r[A(1495)]=20,6!==t)break;c>>>=2,f-=2;break e;case 2:r[A(1495)]=17;break;case 3:e[A(1954)]="invalid block type",r[A(1495)]=30}c>>>=2,f-=2}break;case 14:for(c>>>=7&f,f-=7&f;f<32;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}if((65535&c)!=(c>>>16^65535)){e[A(1954)]="invalid stored block lengths",r[A(1495)]=30;break}if(r[A(1468)]=65535&c,f=c=0,r[A(1495)]=15,6===t)break e;case 15:r[A(1495)]=16;case 16:if(d=r[A(1468)]){if(0===(d=u<(d=s<d?s:d)?u:d))break e;I[A(1298)](i,n,a,d,o),s-=d,a+=d,u-=d,o+=d,r[A(1468)]-=d}else r[A(1495)]=12;break;case 17:for(;f<14;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}if(r[A(963)]=257+(31&c),c>>>=5,f-=5,r[A(1007)]=1+(31&c),c>>>=5,f-=5,r[A(1864)]=4+(15&c),c>>>=4,f-=4,286<r[A(963)]||30<r[A(1007)]){e.msg=A(419),r.mode=30;break}r[A(1613)]=0,r[A(1495)]=18;case 18:for(;r.have<r.ncode;){for(;f<3;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}r.lens[O[r[A(1613)]++]]=7&c,c>>>=3,f-=3}for(;r[A(1613)]<19;)r[A(671)][O[r[A(1613)]++]]=0;if(r[A(1233)]=r[A(1914)],r[A(1692)]=7,E={bits:r[A(1692)]},x=N(0,r[A(671)],0,19,r[A(1233)],0,r[A(1854)],E),r[A(1692)]=E[A(434)],x){e[A(1954)]=A(818),r.mode=30;break}r[A(1613)]=0,r[A(1495)]=19;case 19:for(;r.have<r[A(963)]+r.ndist;){for(;g=(S=r[A(1233)][c&(1<<r[A(1692)])-1])>>>16&255,m=65535&S,!((_=S>>>24)<=f);){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}if(m<16)c>>>=_,f-=_,r.lens[r[A(1613)]++]=m;else{if(16===m){for(C=_+2;f<C;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}if(c>>>=_,f-=_,0===r[A(1613)]){e[A(1954)]=A(683),r[A(1495)]=30;break}k=r[A(671)][r.have-1],d=3+(3&c),c>>>=2,f-=2}else if(17===m){for(C=_+3;f<C;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}k=0,d=3+(7&(c>>>=_)),c>>>=3,f=f-_-3}else{for(C=_+7;f<C;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}k=0,d=11+(127&(c>>>=_)),c>>>=7,f=f-_-7}if(r[A(1613)]+d>r.nlen+r[A(1007)]){e[A(1954)]=A(683),r[A(1495)]=30;break}for(;d--;)r.lens[r[A(1613)]++]=k}}if(30===r[A(1495)])break;if(0===r.lens[256]){e[A(1954)]="invalid code -- missing end-of-block",r[A(1495)]=30;break}if(r[A(1692)]=9,E={bits:r[A(1692)]},x=N(L,r[A(671)],0,r.nlen,r[A(1233)],0,r[A(1854)],E),r[A(1692)]=E[A(434)],x){e.msg=A(431),r.mode=30;break}if(r[A(1764)]=6,r[A(1602)]=r.distdyn,E={bits:r[A(1764)]},x=N(z,r[A(671)],r[A(963)],r[A(1007)],r.distcode,0,r[A(1854)],E),r.distbits=E.bits,x){e[A(1954)]=A(733),r[A(1495)]=30;break}if(r.mode=20,6===t)break e;case 20:r[A(1495)]=21;case 21:if(6<=s&&258<=u){e[A(1374)]=o,e[A(814)]=u,e[A(738)]=a,e[A(1797)]=s,r[A(1856)]=c,r[A(434)]=f,j(e,l),o=e[A(1374)],i=e.output,u=e[A(814)],a=e[A(738)],n=e[A(1215)],s=e.avail_in,c=r[A(1856)],f=r[A(434)],12===r[A(1495)]&&(r[A(938)]=-1);break}for(r[A(938)]=0;g=(S=r[A(1233)][c&(1<<r[A(1692)])-1])>>>16&255,m=65535&S,!((_=S>>>24)<=f);){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}if(g&&0==(240&g)){for(y=_,b=g,w=m;g=(S=r[A(1233)][w+((c&(1<<y+b)-1)>>y)])>>>16&255,m=65535&S,!(y+(_=S>>>24)<=f);){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}c>>>=y,f-=y,r[A(938)]+=y}if(c>>>=_,f-=_,r.back+=_,r[A(1468)]=m,0===g){r[A(1495)]=26;break}if(32&g){r[A(938)]=-1,r.mode=12;break}if(64&g){e[A(1954)]=A(1593),r[A(1495)]=30;break}r[A(1855)]=15&g,r.mode=22;case 22:if(r.extra){for(C=r[A(1855)];f<C;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}r[A(1468)]+=c&(1<<r[A(1855)])-1,c>>>=r[A(1855)],f-=r[A(1855)],r[A(938)]+=r.extra}r[A(697)]=r[A(1468)],r[A(1495)]=23;case 23:for(;g=(S=r[A(1602)][c&(1<<r.distbits)-1])>>>16&255,m=65535&S,!((_=S>>>24)<=f);){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}if(0==(240&g)){for(y=_,b=g,w=m;g=(S=r[A(1602)][w+((c&(1<<y+b)-1)>>y)])>>>16&255,m=65535&S,!(y+(_=S>>>24)<=f);){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}c>>>=y,f-=y,r[A(938)]+=y}if(c>>>=_,f-=_,r.back+=_,64&g){e[A(1954)]="invalid distance code",r[A(1495)]=30;break}r.offset=m,r[A(1855)]=15&g,r[A(1495)]=24;case 24:if(r.extra){for(C=r[A(1855)];f<C;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}r[A(898)]+=c&(1<<r[A(1855)])-1,c>>>=r[A(1855)],f-=r[A(1855)],r[A(938)]+=r.extra}if(r[A(898)]>r[A(1948)]){e[A(1954)]=A(1077),r[A(1495)]=30;break}r.mode=25;case 25:if(0===u)break e;if(d=l-u,r[A(898)]>d){if((d=r.offset-d)>r[A(977)]&&r[A(534)]){e[A(1954)]=A(1077),r[A(1495)]=30;break}v=d>r[A(1873)]?(d-=r.wnext,r[A(911)]-d):r[A(1873)]-d,d>r[A(1468)]&&(d=r[A(1468)]),p=r[A(1158)]}else p=i,v=o-r.offset,d=r[A(1468)];for(u-=d=u<d?u:d,r[A(1468)]-=d;i[o++]=p[v++],--d;);0===r.length&&(r.mode=21);break;case 26:if(0===u)break e;i[o++]=r[A(1468)],u--,r[A(1495)]=21;break;case 27:if(r.wrap){for(;f<32;){if(0===s)break e;s--,c|=n[a++]<<f,f+=8}if(l-=u,e[A(508)]+=l,r[A(945)]+=l,l&&(e[A(1328)]=r.check=r.flags?R(r[A(811)],i,l,o-l):P(r.check,i,l,o-l)),l=u,(r[A(904)]?c:M(c))!==r[A(811)]){e[A(1954)]=A(1238),r.mode=30;break}f=c=0}r[A(1495)]=28;case 28:if(r.wrap&&r.flags){for(;f<32;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}if(c!==(4294967295&r[A(945)])){e[A(1954)]=A(957),r[A(1495)]=30;break}f=c=0}r[A(1495)]=29;case 29:x=1;break e;case 30:x=-3;break e;case 31:return-4;default:return U}return e[A(1374)]=o,e[A(814)]=u,e[A(738)]=a,e.avail_in=s,r.hold=c,r[A(434)]=f,(r.wsize||l!==e[A(814)]&&r[A(1495)]<30&&(r.mode<27||4!==t))&&W(e,e[A(1375)],e[A(1374)],l-e.avail_out)?(r.mode=31,-4):(h-=e.avail_in,l-=e[A(814)],e[A(1766)]+=h,e[A(508)]+=l,r.total+=l,r[A(1527)]&&l&&(e[A(1328)]=r[A(811)]=(r.flags?R:P)(r[A(811)],i,l,e[A(1374)]-l)),e[A(1485)]=r[A(434)]+(r.last?64:0)+(12===r[A(1495)]?128:0)+(20===r.mode||15===r[A(1495)]?256:0),x=(0==h&&0===l||4===t)&&x===G?-5:x)},e[t(458)]=function(e){var t,r=_0xa05d;return e&&e[r(769)]?((t=e.state)[r(1158)]&&(t.window=null),e.state=null,G):U},e[t(1716)]=function(e,t){var r=_0xa05d;return e&&e.state&&0!=(2&(e=e[r(769)]).wrap)?((e.head=t)[r(1594)]=!1,G):U},e.inflateSetDictionary=function(e,t){var r,n=_0xa05d,i=t.length;return e&&e[n(769)]&&(0===(r=e[n(769)])[n(1527)]||11===r.mode)?11===r[n(1495)]&&P(1,t,i,0)!==r.check?-3:W(e,t,i,i)?(r[n(1495)]=31,-4):(r[n(1793)]=1,G):U},e[t(1877)]=t(1068)}),_e=t(function(e,t){t[X(1583)]={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}}),ge=t(function(e,t){t[X(1583)]=function(){var e=_0xa05d;this.text=0,this.time=0,this[e(423)]=0,this.os=0,this[e(1855)]=null,this.extra_len=0,this.name="",this[e(1641)]="",this[e(2002)]=0,this[e(1594)]=!1}}),me=t(function(e){var l=X,d=pe(),v=$(),p=fe(),_=_e(),n=W(),i=he(),a=ge(),g=Object.prototype.toString;function o(e){var t=_0xa05d;if(!(this instanceof o))return new o(e);this.options=v[t(1224)]({chunkSize:16384,windowBits:0,to:""},e||{});var r=this[t(790)],e=(r[t(831)]&&0<=r.windowBits&&r.windowBits<16&&(r.windowBits=-r[t(1378)],0===r[t(1378)])&&(r[t(1378)]=-15),!(0<=r[t(1378)]&&r[t(1378)]<16)||e&&e[t(1378)]||(r[t(1378)]+=32),15<r[t(1378)]&&r.windowBits<48&&0==(15&r[t(1378)])&&(r.windowBits|=15),this[t(579)]=0,this.msg="",this[t(1526)]=!1,this[t(1045)]=[],this[t(1096)]=new i,this[t(1096)].avail_out=0,d[t(1860)](this.strm,r[t(1378)]));if(e!==_[t(965)])throw new Error(n[e]);if(this[t(623)]=new a,d.inflateGetHeader(this[t(1096)],this[t(623)]),r[t(709)]&&("string"==typeof r[t(709)]?r.dictionary=p.string2buf(r[t(709)]):g.call(r.dictionary)===t(1036)&&(r[t(709)]=new Uint8Array(r.dictionary)),r[t(831)])&&(e=d[t(1649)](this[t(1096)],r[t(709)]))!==_[t(965)])throw new Error(n[e])}function r(e,t){var r=l,t=new o(t);if(t[r(1181)](e,!0),t[r(579)])throw t[r(1954)]||n[t.err];return t[r(1779)]}o[l(1111)][l(1181)]=function(e,t){var r,n,i,a,o,s=l,u=this[s(1096)],c=this[s(790)][s(855)],f=this[s(790)][s(709)],h=!1;if(this.ended)return!1;n=t===~~t?t:!0===t?_[s(497)]:_.Z_NO_FLUSH,typeof e==s(1265)?u[s(1215)]=p.binstring2buf(e):g[s(971)](e)===s(1036)?u[s(1215)]=new Uint8Array(e):u[s(1215)]=e,u[s(738)]=0,u[s(1797)]=u[s(1215)][s(1468)];do{if(0===u.avail_out&&(u[s(1375)]=new v[s(1821)](c),u[s(1374)]=0,u[s(814)]=c),(r=(r=d[s(1905)](u,_[s(1341)]))===_[s(1936)]&&f?d[s(1649)](this.strm,f):r)===_[s(1689)]&&!0===h&&(r=_.Z_OK,h=!1),r!==_[s(820)]&&r!==_[s(965)])return this.onEnd(r),!(this[s(1526)]=!0)}while(!u[s(1374)]||0!==u[s(814)]&&r!==_[s(820)]&&(0!==u[s(1797)]||n!==_.Z_FINISH&&n!==_[s(1567)])||(this.options.to===s(1265)?(i=p.utf8border(u[s(1375)],u[s(1374)]),a=u[s(1374)]-i,o=p.buf2string(u[s(1375)],i),u[s(1374)]=a,u[s(814)]=c-a,a&&v[s(1298)](u.output,u.output,i,a,0),this.onData(o)):this[s(1347)](v[s(770)](u[s(1375)],u[s(1374)]))),0===u.avail_in&&0===u[s(814)]&&(h=!0),(0<u.avail_in||0===u.avail_out)&&r!==_.Z_STREAM_END);return(n=r===_[s(820)]?_[s(497)]:n)===_[s(497)]?(r=d.inflateEnd(this[s(1096)]),this[s(1690)](r),this.ended=!0,r===_.Z_OK):(n===_[s(1567)]&&(this[s(1690)](_[s(965)]),u[s(814)]=0),!0)},o[l(1111)].onData=function(e){var t=l;this[t(1045)][t(1181)](e)},o[l(1111)][l(1690)]=function(e){var t=l;e===_.Z_OK&&(this[t(790)].to===t(1265)?this[t(1779)]=this[t(1045)].join(""):this.result=v[t(913)](this.chunks)),this[t(1045)]=[],this[t(579)]=e,this[t(1954)]=this[t(1096)].msg},e.Inflate=o,e[l(1905)]=r,e.inflateRaw=function(e,t){return(t=t||{}).raw=!0,r(e,t)},e[l(1464)]=r}),ye=t(function(e,t){var r={};(0,$().assign)(r,le(),me(),_e()),t.exports=r}),be=t(function(e){var i=X,t=(typeof Uint8Array===i(1896)?i(1896):_typeof(Uint8Array))<"u"&&("undefined"==typeof Uint16Array?i(1896):_typeof(Uint16Array))<"u"&&("undefined"==typeof Uint32Array?i(1896):_typeof(Uint32Array))<"u",a=ye(),r=A(),n=S(),o=i(t?1784:1178);function s(e,t){var r=i;n[r(971)](this,r(1945)+e),this[r(1879)]=null,this[r(672)]=e,this[r(1419)]=t,this[r(1672)]={}}e[i(1160)]="\b\0",r[i(568)](s,n),s.prototype[i(1056)]=function(e){var t=i;this.meta=e[t(1672)],null===this[t(1879)]&&this[t(1571)](),this._pako[t(1181)](r[t(1886)](o,e[t(1278)]),!1)},s[i(1111)][i(1465)]=function(){var e=i;n[e(1111)][e(1465)][e(971)](this),null===this._pako&&this[e(1571)](),this._pako.push([],!0)},s.prototype[i(906)]=function(){var e=i;n[e(1111)][e(906)][e(971)](this),this[e(1879)]=null},s[i(1111)][i(1571)]=function(){var r=i,n=(this[r(1879)]=new a[this[r(672)]]({raw:!0,level:this[r(1419)][r(858)]||-1}),this);this[r(1879)][r(1347)]=function(e){var t=r;n[t(1181)]({data:e,meta:n[t(1672)]})}},e[i(1930)]=function(e){return new s(i(651),e)},e[i(1058)]=function(){return new s("Inflate",{})}}),we=t(function(e){var t=X,r=S();e[t(1440)]={magic:"\0\0",compressWorker:function(e){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},e[t(1674)]=be()}),ke=t(function(e){var t=X;e.LOCAL_FILE_HEADER=t(1134),e[t(610)]=t(1280),e[t(1687)]=t(1691),e.ZIP64_CENTRAL_DIRECTORY_LOCATOR=t(443),e[t(1476)]="PK",e[t(1382)]=t(1505)}),xe=t(function(e,t){function y(e,t){for(var r=_0xa05d,n="",i=0;i<t;i++)n+=String[r(896)](255&e),e>>>=8;return n}function i(e,t,r,n,i,a){var o=_0xa05d,s=e[o(1112)],u=e[o(810)],c=a!==w[o(972)],f=b.transformTo(o(1265),a(s.name)),h=b[o(1886)](o(1265),w[o(972)](s[o(1943)])),l=s[o(1641)],a=b[o(1886)]("string",a(l)),d=b[o(1886)](o(1265),w[o(972)](l)),v=h[o(1468)]!==s.name[o(1468)],l=d[o(1468)]!==l.length,p="",_=s[o(1033)],g=s[o(1099)],m={crc32:0,compressedSize:0,uncompressedSize:0},r=(t&&!r||(m[o(1376)]=e[o(1376)],m.compressedSize=e[o(1425)],m[o(1508)]=e[o(1508)]),0),e=(t&&(r|=8),c||!v&&!l||(r|=2048),0),t=0,g=(_&&(e|=16),i===o(648)?(t=798,e|=(c=s[o(836)],i=_,(65535&(c?c:i?16893:33204))<<16)):(t=20,e|=63&(s.dosPermissions||0)),_=g[o(1529)](),_<<=6,_=(_=(_|g.getUTCMinutes())<<5)|g[o(955)]()/2,c=g[o(512)]()-1980,c=(c=((c<<=4)|g[o(1941)]()+1)<<5)|g[o(916)](),v&&(i=y(1,1)+y(k(f),4)+h,p+="up"+y(i[o(1468)],2)+i),l&&(s=y(1,1)+y(k(a),4)+d,p+="uc"+y(s[o(1468)],2)+s),""),g=(g=(g=(g=(g=(g=(g=(g=(g=(g+="\n\0")+y(r,2))+u[o(1160)])+y(_,2))+y(c,2))+y(m[o(1376)],4))+y(m[o(1425)],4))+y(m[o(1508)],4))+y(f[o(1468)],2))+y(p.length,2);return{fileRecord:x[o(978)]+g+f+p,dirRecord:x[o(610)]+y(t,2)+g+y(a[o(1468)],2)+"\0\0\0\0"+y(e,4)+y(n,4)+f+p+a}}var u=X,b=A(),a=S(),w=D(),k=h(),x=ke();function r(e,t,r,n){var i=_0xa05d;a[i(971)](this,i(1131)),this[i(656)]=0,this[i(956)]=t,this[i(1201)]=r,this[i(909)]=n,this[i(1497)]=e,this[i(717)]=!1,this[i(1342)]=[],this[i(1175)]=[],this[i(1169)]=0,this.entriesCount=0,this[i(915)]=null,this._sources=[]}b[u(568)](r,a),r[u(1111)][u(1181)]=function(e){var t=u,r=e[t(1672)].percent||0,n=this[t(1040)],i=this[t(1209)][t(1468)];this[t(717)]?this[t(1342)][t(1181)](e):(this[t(656)]+=e[t(1278)][t(1468)],a.prototype[t(1181)].call(this,{data:e[t(1278)],meta:{currentFile:this[t(915)],percent:n?(r+100*(n-i-1))/n:100}}))},r.prototype.openedSource=function(e){var t=u,r=(this.currentSourceOffset=this[t(656)],this[t(915)]=e.file[t(1943)],this.streamFiles&&!e[t(1112)][t(1033)]);r?(e=i(e,r,!1,this[t(1169)],this[t(1201)],this.encodeFileName),this[t(1181)]({data:e[t(475)],meta:{percent:0}})):this[t(717)]=!0},r[u(1111)][u(1924)]=function(e){var t=u,r=(this[t(717)]=!1,this[t(1497)]&&!e.file[t(1033)]),n=i(e,r,!0,this.currentSourceOffset,this[t(1201)],this[t(909)]);if(this[t(1175)][t(1181)](n[t(1910)]),r)this[t(1181)]({data:(r=e,x[(e=_0xa05d)(1382)]+y(r[e(1376)],4)+y(r[e(1425)],4)+y(r[e(1508)],4)),meta:{percent:100}});else for(this[t(1181)]({data:n[t(475)],meta:{percent:0}});this[t(1342)][t(1468)];)this[t(1181)](this[t(1342)][t(1644)]());this.currentFile=null},r.prototype.flush=function(){for(var e=u,t=this[e(656)],r=0;r<this.dirRecords[e(1468)];r++)this[e(1181)]({data:this.dirRecords[r],meta:{percent:100}});var n,i,a,o=this.bytesWritten-t,s=(n=this[e(1175)][e(1468)],o=o,t=t,s=this.zipComment,i=this.encodeFileName,a=_0xa05d,i=b.transformTo(a(1265),i(s)),x[a(1687)]+"\0\0\0\0"+y(n,2)+y(n,2)+y(o,4)+y(t,4)+y(i[a(1468)],2)+i);this.push({data:s,meta:{percent:100}})},r[u(1111)].prepareNextSource=function(){var e=u;this.previous=this[e(1209)][e(1644)](),this[e(1978)](this.previous.streamInfo),this[e(466)]?this[e(1236)][e(509)]():this.previous.resume()},r[u(1111)].registerPrevious=function(e){var t=u,r=(this._sources[t(1181)](e),this);return e.on("data",function(e){r.processChunk(e)}),e.on(t(1253),function(){var e=t;r.closedSource(r[e(1236)].streamInfo),r._sources.length?r[e(496)]():r[e(1253)]()}),e.on(t(1308),function(e){r.error(e)}),this},r[u(1111)].resume=function(){var e=u;return!!a[e(1111)][e(782)].call(this)&&(!this.previous&&this._sources[e(1468)]?(this[e(496)](),!0):this[e(1236)]||this[e(1209)].length||this[e(1938)]?void 0:(this[e(1253)](),!0))},r[u(1111)][u(1308)]=function(e){var t=u,r=this[t(1209)];if(!a[t(1111)].error[t(971)](this,e))return!1;for(var n=0;n<r.length;n++)try{r[n][t(1308)](e)}catch(e){}return!0},r.prototype[u(1960)]=function(){var e=u;a.prototype[e(1960)][e(971)](this);for(var t=this._sources,r=0;r<t[e(1468)];r++)t[r].lock()},t[u(1583)]=r}),Ee=t(function(e){var h=we(),r=xe();e.generateWorker=function(e,s,t){var u=_0xa05d,c=new r(s[u(1497)],t,s[u(1295)],s.encodeFileName),f=0;try{e[u(768)](function(e,t){var r=u,n=(f++,((e,t)=>{if(t=h[e=e||t])return t;throw new Error(e+" is not a valid compression method !")})(t[r(790)][r(810)],s.compression)),i=t[r(790)][r(1565)]||s[r(1565)]||{},a=t[r(1033)],o=t[r(1099)];t[r(1470)](n,i)[r(485)](r(1112),{name:e,dir:a,date:o,comment:t[r(1641)]||"",unixPermissions:t[r(836)],dosPermissions:t[r(1783)]})[r(1907)](c)}),c[u(1040)]=f}catch(e){c[u(1308)](e)}return c}}),Ce=t(function(e,t){var i=X,r=A(),n=S();function a(e,t){var r=_0xa05d;n[r(971)](this,r(429)+e),this[r(1678)]=!1,this[r(1321)](t)}r[i(568)](a,n),a.prototype[i(1321)]=function(e){var r=i,n=this;(this._stream=e).pause(),e.on(r(1278),function(e){n[r(1181)]({data:e,meta:{percent:0}})}).on("error",function(e){var t=r;n[t(466)]?this[t(1938)]=e:n[t(1308)](e)}).on(r(1253),function(){var e=r;n[e(466)]?n[e(1678)]=!0:n[e(1253)]()})},a[i(1111)][i(509)]=function(){var e=i;return!!n.prototype[e(509)][e(971)](this)&&(this[e(1845)].pause(),!0)},a[i(1111)][i(782)]=function(){var e=i;return!!n[e(1111)][e(782)].call(this)&&(this[e(1678)]?this[e(1253)]():this[e(1845)][e(782)](),!0)},t[i(1583)]=a}),Ae=t(function(e,t){function s(e){var t=_0xa05d,r=(e="/"===e[t(1740)](-1)?e.substring(0,e[t(1468)]-1):e)[t(487)]("/");return 0<r?e[t(1051)](0,r):""}function u(e,t){var r=_0xa05d;return t=_typeof(t)<"u"?t:h[r(1696)],e=m(e),this[r(1570)][e]||g.call(this,e,null,{dir:!0,createFolders:t}),this[r(1570)][e]}var r=X,a=D(),c=A(),f=S(),o=w(),h=te(),l=O(),d=ae(),v=Ee(),p=b(),_=Ce(),g=function(e,t,r){var n=_0xa05d,i=c.getTypeOf(t),a=c[n(1474)](r||{},h),o=(a.date=a.date||new Date,null!==a[n(810)]&&(a[n(810)]=a[n(810)][n(1725)]()),typeof a[n(836)]==n(1265)&&(a[n(836)]=parseInt(a[n(836)],8)),a[n(836)]&&16384&a[n(836)]&&(a.dir=!0),a[n(1783)]&&16&a[n(1783)]&&(a[n(1033)]=!0),a.dir&&(e=m(e)),a[n(1696)]&&(o=s(e))&&u[n(971)](this,o,!0),i===n(1265)&&!1===a[n(1385)]&&!1===a[n(976)]);(!r||"u"<_typeof(r[n(1385)]))&&(a[n(1385)]=!o);(t instanceof l&&0===t[n(1508)]||a[n(1033)]||!t||0===t[n(1468)])&&(a[n(976)]=!1,a[n(1385)]=!0,t="",a[n(810)]=n(1440),n(1265));i=null,i=t instanceof l||t instanceof f?t:p.isNode&&p[n(1269)](t)?new _(e,t):c.prepareContent(e,t,a[n(1385)],a[n(791)],a.base64),r=new d(e,i,a);this.files[e]=r},m=function(e){return"/"!==e[_0xa05d(1740)](-1)&&(e+="/"),e};function y(e){var t=_0xa05d;return"[object RegExp]"===Object[t(1111)].toString[t(971)](e)}var n={load:function(){throw new Error(_0xa05d(729))},forEach:function(e){var t,r,n,i=_0xa05d;for(t in this.files)n=this[i(1570)][t],r=t.slice(this[i(1584)][i(1468)],t[i(1468)]),r&&t.slice(0,this[i(1584)].length)===this.root&&e(r,n)},filter:function(n){var i=_0xa05d,a=[];return this[i(768)](function(e,t){var r=i;n(e,t)&&a[r(1181)](t)}),a},file:function(e,t,r){var n,i,a=_0xa05d;return 1===arguments.length?y(e)?(n=e,this[a(1486)](function(e,t){var r=a;return!t.dir&&n[r(1428)](e)})):(i=this[a(1570)][this[a(1584)]+e])&&!i[a(1033)]?i:null:(e=this[a(1584)]+e,g[a(971)](this,e,t,r),this)},folder:function(n){var e,t,i=_0xa05d;return n?y(n)?this[i(1486)](function(e,t){var r=i;return t[r(1033)]&&n[r(1428)](e)}):(e=this[i(1584)]+n,e=u[i(971)](this,e),(t=this[i(603)]()).root=e[i(1943)],t):this},remove:function(n){var i=_0xa05d,e=(n=this[i(1584)]+n,this[i(1570)][n]);if(e||("/"!==n[i(1740)](-1)&&(n+="/"),e=this.files[n]),e&&!e[i(1033)])delete this[i(1570)][n];else for(var t=this[i(1486)](function(e,t){var r=i;return t[r(1943)][r(1740)](0,n[r(1468)])===n}),r=0;r<t[i(1468)];r++)delete this.files[t[r][i(1943)]];return this},generate:function(e){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t=_0xa05d,r={};try{if((r=c[t(1474)](e||{},{streamFiles:!1,compression:t(1440),compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:t(619),encodeFileName:a[t(972)]}))[t(1454)]=r[t(1454)][t(863)](),r[t(810)]=r[t(810)][t(1725)](),r[t(1454)]===t(1723)&&(r[t(1454)]="string"),!r[t(1454)])throw new Error(t(655));c[t(759)](r[t(1454)]),r[t(1295)]!==t(1108)&&r[t(1295)]!==t(425)&&r[t(1295)]!==t(748)&&r[t(1295)]!==t(1685)||(r[t(1295)]=t(648)),r[t(1295)]===t(1029)&&(r[t(1295)]=t(1136));var n=r[t(1641)]||this[t(1641)]||"",i=v.generateWorker(this,r,n)}catch(e){(i=new f(t(1308)))[t(1308)](e)}return new o(i,r[t(1454)]||t(1265),r.mimeType)},generateAsync:function(e,t){var r=_0xa05d;return this[r(1301)](e)[r(717)](t)},generateNodeStream:function(e,t){var r=_0xa05d;return(e=e||{})[r(1454)]||(e[r(1454)]=r(1558)),this[r(1301)](e)[r(1713)](t)}};t[r(1583)]=n}),Se=t(function(e,t){var r=X,n=A();function i(e){var t=_0xa05d;this[t(1278)]=e,this.length=e[t(1468)],this[t(775)]=0,this.zero=0}i.prototype={checkOffset:function(e){var t=_0xa05d;this.checkIndex(this[t(775)]+e)},checkIndex:function(e){var t=_0xa05d;if(this[t(1468)]<this[t(715)]+e||e<0)throw new Error(t(1809)+this[t(1468)]+t(1436)+e+t(1627))},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(e){},readInt:function(e){var t,r=_0xa05d,n=0;for(this.checkOffset(e),t=this[r(775)]+e-1;t>=this[r(775)];t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){var t=_0xa05d;return n[t(1886)](t(1265),this[t(1064)](e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=_0xa05d,t=this[e(1790)](4);return new Date(Date[e(1248)](1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},t[r(1583)]=i}),De=t(function(e,t){var s=X,n=Se();function r(e){var t=_0xa05d;n[t(971)](this,e);for(var r=0;r<this[t(1278)][t(1468)];r++)e[r]=255&e[r]}A()[s(568)](r,n),r[s(1111)][s(1550)]=function(e){return this[s(1278)][this.zero+e]},r[s(1111)].lastIndexOfSignature=function(e){for(var t=s,r=e[t(996)](0),n=e.charCodeAt(1),i=e.charCodeAt(2),a=e[t(996)](3),o=this[t(1468)]-4;0<=o;--o)if(this[t(1278)][o]===r&&this.data[o+1]===n&&this[t(1278)][o+2]===i&&this[t(1278)][o+3]===a)return o-this[t(715)];return-1},r[s(1111)][s(505)]=function(e){var t=s,r=e.charCodeAt(0),n=e[t(996)](1),i=e[t(996)](2),e=e[t(996)](3),t=this.readData(4);return r===t[0]&&n===t[1]&&i===t[2]&&e===t[3]},r[s(1111)][s(1064)]=function(e){var t,r=s;return this[r(1299)](e),0===e?[]:(t=this[r(1278)][r(1740)](this[r(715)]+this[r(775)],this[r(715)]+this[r(775)]+e),this[r(775)]+=e,t)},t[s(1583)]=r}),Oe=t(function(e,t){var n=X,r=Se();function i(e){r[_0xa05d(971)](this,e)}A().inherits(i,r),i.prototype[n(1550)]=function(e){var t=n;return this[t(1278)].charCodeAt(this[t(715)]+e)},i.prototype.lastIndexOfSignature=function(e){var t=n;return this[t(1278)][t(487)](e)-this[t(715)]},i[n(1111)][n(505)]=function(e){return e===this[n(1064)](4)},i.prototype.readData=function(e){var t=n,r=(this[t(1299)](e),this[t(1278)][t(1740)](this[t(715)]+this[t(775)],this[t(715)]+this[t(775)]+e));return this[t(775)]+=e,r},t[n(1583)]=i}),Be=t(function(e,t){var n=X,r=De();function i(e){r.call(this,e)}A()[n(568)](i,r),i.prototype[n(1064)]=function(e){var t,r=n;return this[r(1299)](e),0===e?new Uint8Array(0):(t=this[r(1278)][r(686)](this.zero+this[r(775)],this[r(715)]+this[r(775)]+e),this[r(775)]+=e,t)},t[n(1583)]=i}),Te=t(function(e,t){var n=X,r=Be();function i(e){r.call(this,e)}A()[n(568)](i,r),i[n(1111)].readData=function(e){var t=n,r=(this[t(1299)](e),this[t(1278)][t(1740)](this.zero+this.index,this[t(715)]+this[t(775)]+e));return this[t(775)]+=e,r},t[n(1583)]=i}),Fe=t(function(e,t){var n=X,i=A(),a=_(),o=De(),s=Oe(),u=Te(),c=Be();t[n(1583)]=function(e){var t=n,r=i[t(1384)](e);return i[t(759)](r),r!==t(1265)||a.uint8array?"nodebuffer"===r?new u(e):a[t(1784)]?new c(i[t(1886)](t(1784),e)):new o(i.transformTo(t(1178),e)):new s(e)}}),Ie=t(function(e,t){var o=X,n=Fe(),i=A(),a=O(),s=h(),u=D(),c=we(),f=_();function r(e,t){var r=_0xa05d;this[r(790)]=e,this[r(1841)]=t}r[o(1111)]={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this[o(464)])},readLocalPart:function(e){var t,r=o;if(e.skip(22),this.fileNameLength=e[r(1790)](2),t=e[r(1790)](2),this[r(525)]=e[r(1064)](this[r(1241)]),e.skip(t),-1===this[r(1425)]||-1===this[r(1508)])throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=(e=>{var t,r=_0xa05d;for(t in c)if(c.hasOwnProperty(t)&&c[t][r(1160)]===e)return c[t];return null})(this[r(832)])))throw new Error(r(1213)+i[r(1129)](this[r(832)])+" unknown (inner file : "+i.transformTo(r(1265),this[r(525)])+")");this[r(899)]=new a(this[r(1425)],this.uncompressedSize,this[r(1376)],t,e[r(1064)](this[r(1425)]))},readCentralPart:function(e){var t=o,r=(this[t(845)]=e[t(1790)](2),e[t(629)](2),this[t(464)]=e[t(1790)](2),this.compressionMethod=e.readString(2),this[t(1099)]=e.readDate(),this[t(1376)]=e[t(1790)](4),this.compressedSize=e[t(1790)](4),this[t(1508)]=e.readInt(4),e.readInt(2));if(this[t(761)]=e[t(1790)](2),this[t(1897)]=e[t(1790)](2),this[t(980)]=e[t(1790)](2),this[t(528)]=e.readInt(2),this[t(524)]=e[t(1790)](4),this[t(1750)]=e.readInt(4),this[t(1079)]())throw new Error(t(954));e[t(629)](r),this[t(1283)](e),this[t(823)](e),this[t(1514)]=e.readData(this[t(1897)])},processAttributes:function(){var e=o,t=(this[e(836)]=null,this[e(1783)]=null,this[e(845)]>>8);this[e(1033)]=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this[e(524)]),3==t&&(this[e(836)]=this[e(524)]>>16&65535),this[e(1033)]||"/"!==this[e(1997)][e(1740)](-1)||(this[e(1033)]=!0)},parseZIP64ExtraField:function(e){var t,r=o;this[r(494)][1]&&(t=n(this[r(494)][1][r(1407)]),this[r(1508)]===i.MAX_VALUE_32BITS&&(this[r(1508)]=t.readInt(8)),this[r(1425)]===i.MAX_VALUE_32BITS&&(this[r(1425)]=t[r(1790)](8)),this.localHeaderOffset===i[r(1216)]&&(this[r(1750)]=t[r(1790)](8)),this[r(980)]===i[r(1216)])&&(this.diskNumberStart=t.readInt(4))},readExtraFields:function(e){var t,r,n,i=o,a=e[i(775)]+this.extraFieldsLength;for(this[i(494)]||(this[i(494)]={});e[i(775)]+4<a;)t=e[i(1790)](2),r=e[i(1790)](2),n=e[i(1064)](r),this.extraFields[t]={id:t,length:r,value:n};e.setIndex(a)},handleUTF8:function(){var e,t=o,r=f.uint8array?t(1784):t(1178);this.useUTF8()?(this.fileNameStr=u[t(2015)](this[t(525)]),this[t(1135)]=u.utf8decode(this[t(1514)])):(null!==(e=this[t(1895)]())?this[t(1997)]=e:(e=i[t(1886)](r,this.fileName),this.fileNameStr=this[t(1841)][t(1409)](e)),null!==(e=this[t(1587)]())?this[t(1135)]=e:(e=i[t(1886)](r,this.fileComment),this.fileCommentStr=this[t(1841)][t(1409)](e)))},findExtraFieldUnicodePath:function(){var e,t=o,r=this[t(494)][28789];return!r||1!==(e=n(r[t(1407)]))[t(1790)](1)||s(this[t(525)])!==e[t(1790)](4)?null:u[t(2015)](e[t(1064)](r[t(1468)]-5))},findExtraFieldUnicodeComment:function(){var e,t=o,r=this[t(494)][25461];return!r||1!==(e=n(r[t(1407)]))[t(1790)](1)||s(this[t(1514)])!==e[t(1790)](4)?null:u[t(2015)](e[t(1064)](r[t(1468)]-5))}},t[o(1583)]=r}),Pe=t(function(e,t){var a=X,r=Fe(),n=A(),i=ke(),o=Ie(),s=(D(),_());function u(e){this[_0xa05d(1570)]=[],this.loadOptions=e}u[a(1111)]={checkSignature:function(e){var t,r=a;if(!this[r(490)][r(505)](e))throw this[r(490)][r(775)]-=4,t=this[r(490)].readString(4),new Error("Corrupted zip or bug: unexpected signature ("+n[r(1129)](t)+r(1323)+n[r(1129)](e)+")")},isSignature:function(e,t){var r=a,n=this[r(490)][r(775)];this[r(490)][r(1737)](e);e=this[r(490)][r(1606)](4)===t;return this[r(490)][r(1737)](n),e},readBlockEndOfCentral:function(){var e=a,t=(this.diskNumber=this.reader[e(1790)](2),this[e(1616)]=this[e(490)][e(1790)](2),this[e(1520)]=this[e(490)][e(1790)](2),this.centralDirRecords=this[e(490)][e(1790)](2),this.centralDirSize=this[e(490)][e(1790)](4),this[e(1082)]=this.reader[e(1790)](4),this.zipCommentLength=this.reader[e(1790)](2),this[e(490)][e(1064)](this[e(1443)])),r=s.uint8array?e(1784):e(1178),r=n[e(1886)](r,t);this.zipComment=this.loadOptions[e(1409)](r)},readBlockZip64EndOfCentral:function(){var e=a;this[e(1635)]=this[e(490)].readInt(8),this[e(490)].skip(4),this[e(1363)]=this[e(490)].readInt(4),this[e(1616)]=this.reader.readInt(4),this[e(1520)]=this.reader.readInt(8),this[e(533)]=this[e(490)][e(1790)](8),this.centralDirSize=this[e(490)][e(1790)](8),this[e(1082)]=this.reader[e(1790)](8),this[e(1883)]={};for(var t,r,n,i=this[e(1635)]-44;0<i;)t=this.reader[e(1790)](2),r=this[e(490)][e(1790)](4),n=this[e(490)].readData(r),this[e(1883)][t]={id:t,length:r,value:n}},readBlockZip64EndOfCentralLocator:function(){var e=a;if(this[e(1666)]=this.reader[e(1790)](4),this[e(1795)]=this.reader[e(1790)](8),this.disksCount=this.reader[e(1790)](4),1<this[e(1998)])throw new Error(e(781))},readLocalFiles:function(){for(var e,t=a,r=0;r<this[t(1570)][t(1468)];r++)e=this[t(1570)][r],this[t(490)][t(1737)](e[t(1750)]),this[t(875)](i[t(978)]),e.readLocalPart(this[t(490)]),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var e,t=a;for(this[t(490)][t(1737)](this[t(1082)]);this[t(490)][t(505)](i[t(610)]);)(e=new o({zip64:this[t(1588)]},this[t(1841)]))[t(1657)](this[t(490)]),this[t(1570)][t(1181)](e);if(this[t(533)]!==this[t(1570)].length&&0!==this[t(533)]&&0===this[t(1570)][t(1468)])throw new Error("Corrupted zip or bug: expected "+this[t(533)]+t(1621)+this[t(1570)][t(1468)])},readEndOfCentral:function(){var e=a,t=this[e(490)][e(1677)](i[e(1687)]);if(t<0)throw!this[e(1987)](0,i.LOCAL_FILE_HEADER)?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error(e(531));this[e(490)][e(1737)](t);var r=t;if(this[e(875)](i[e(1687)]),this.readBlockEndOfCentral(),this.diskNumber===n[e(1971)]||this[e(1616)]===n.MAX_VALUE_16BITS||this[e(1520)]===n[e(1971)]||this[e(533)]===n[e(1971)]||this[e(2005)]===n[e(1216)]||this[e(1082)]===n[e(1216)]){if(this[e(1588)]=!0,(t=this[e(490)].lastIndexOfSignature(i[e(1655)]))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this[e(490)][e(1737)](t),this.checkSignature(i[e(1655)]),this[e(1822)](),!this[e(1987)](this.relativeOffsetEndOfZip64CentralDir,i.ZIP64_CENTRAL_DIRECTORY_END)&&(this[e(1795)]=this[e(490)][e(1677)](i[e(1476)]),this[e(1795)]<0))throw new Error(e(1354));this[e(490)][e(1737)](this[e(1795)]),this[e(875)](i[e(1476)]),this.readBlockZip64EndOfCentral()}t=this.centralDirOffset+this.centralDirSize,t=r-(t=this.zip64?t+20+(12+this.zip64EndOfCentralSize):t);if(0<t)this[e(1987)](r,i[e(610)])||(this[e(490)][e(715)]=t);else if(t<0)throw new Error(e(577)+Math[e(1002)](t)+" bytes.")},prepareReader:function(e){this[a(490)]=r(e)},load:function(e){var t=a;this[t(471)](e),this[t(1346)](),this.readCentralDir(),this.readLocalFiles()}},t[a(1583)]=u}),Re=t(function(e,t){var r=X,n=A(),u=g(),i=D(),c=Pe(),f=ne(),h=b();t[r(1583)]=function(e,a){var o=r,s=this;return a=n.extend(a||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:i[o(2015)]}),h.isNode&&h[o(1269)](e)?u[o(1123)].reject(new Error(o(777))):n.prepareContent(o(514),e,!0,a[o(791)],a[o(976)])[o(2009)](function(e){var t=o,r=new c(a);return r[t(1990)](e),r})[o(2009)](function(e){var t=o,r=[u[t(1123)][t(595)](e)],n=e[t(1570)];if(a.checkCRC32)for(var i=0;i<n.length;i++)r.push((a=>new u.Promise(function(t,r){var n=_0xa05d,i=a[n(899)][n(892)]()[n(1907)](new f);i.on(n(1308),function(e){r(e)}).on(n(1253),function(){var e=n;i.streamInfo.crc32!==a[e(899)][e(1376)]?r(new Error(e(513))):t()}).resume()}))(n[i]));return u[t(1123)][t(951)](r)}).then(function(e){for(var t=o,e=e[t(1644)](),r=e.files,n=0;n<r[t(1468)];n++){var i=r[n];s[t(1112)](i[t(1997)],i[t(899)],{binary:!0,optimizedBinaryString:!0,date:i.date,dir:i[t(1033)],comment:i[t(1135)][t(1468)]?i.fileCommentStr:null,unixPermissions:i[t(836)],dosPermissions:i.dosPermissions,createFolders:a.createFolders})}return e.zipComment[t(1468)]&&(s[t(1641)]=e[t(956)]),s})}}),je=t(function(e,t){var n=X;function i(){var n=_0xa05d;if(!(this instanceof i))return new i;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this[n(1570)]=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e,t=n,r=new i;for(e in this)typeof this[e]!=t(1976)&&(r[e]=this[e]);return r}}i[n(1111)]=Ae(),i[n(1111)][n(1167)]=Re(),i[n(1046)]=_(),i.defaults=te(),i[n(1573)]=n(1089),i[n(1167)]=function(e,t){var r=n;return(new i)[r(1167)](e,t)},i.external=g(),t[n(1583)]=i}),o={},Ne=o,Le={Command:function(){return ze},jszip:function(){return Ge[X(830)]}};for(n in Le)u(Ne,n,{get:Le[n],enumerable:!0});e.exports=(e=o,i(u({},"__esModule",{value:!0}),e));var o=r(U(),1)[X(830)],ze=(o.program,X(638),o[X(734)],o.createOption,o[X(1975)],o[X(1066)],o.InvalidOptionArgumentError,o.Command),Ge=(o[X(947)],o.Option,o[X(572)],r(je()))}),Te=zt(function(e,t){var r,n,i=_0xa05d,a=i(1966),o=i(552);t.exports={MAX_SIZE_SSPK:2097152,MAX_SIZE_SPK:20971520,SIGN_MAGIC:"RPK Sig Block 42",SIGN_MAGIC_APK:"APK Sig Block 42",SIGN_TYPE_FULL_PACKAGE:16777473,SIGN_TYPE_FULL_PACKAGE_APK:1896449818,SIGN_TYPE_FILE_LIST:16777729,CRYPT_TYPE_RSA_SHA256:259,SIGN_HEADER:[48,49,48,13,6,9,96,134,72,1,101,3,4,2,1,5,0,4,32],BEGIN_TAG:165,JOINT_TAG:90,CERT_HEAD:i(886),CERT_END:"\n-----END CERTIFICATE-----",setSignType:function(e){return a=e},isApkSign:function(){return a===i(511)},setDssHost:function(e){return r=e},setDssKey:function(e){return n=e},setDssKeyId:function(e){return o=e},getDssHost:function(){return r},getDssKey:function(){return n},getDssKeyId:function(){return o},setDssConfig:function(e){var t=i;r=e[t(1118)],n=e[t(1352)]}}}),mr=zt(function(e,t){var r=_0xa05d,h=Te(),l=22,d=67324752,v=33639248,p=101010256,_=16;t[r(1583)]={parserZip:function(e,t){var r,n,i,a,o,s,u,c=_0xa05d,f={tag:!1,length:e[c(1468)],sections:{header:null,central:null,footer:null}};return f[c(653)][c(1534)]=(e=>{var t=_0xa05d,r={tag:!1};if(e&&!(e.length<l))for(var n=e[t(1468)]-l;0<=n;n--)if(p===e[t(850)](n)){r[t(1084)]=!0,r[t(1306)]=n,r[t(1958)]=e[t(1468)]-n,r[t(1236)]=e.readInt32LE(n+_);break}return r})(e),f.sections[c(1534)][c(1084)]&&(f[c(653)].central=(i=e,a=f[c(653)][c(1534)][c(1236)],o=f[c(653)][c(1534)][c(1306)]-f.sections[c(1534)][c(1236)],s=_0xa05d,u={tag:!1},!i||i[s(1468)]<a||v===i[s(850)](a)&&(u.tag=!0,u[s(1306)]=a,u[s(1958)]=o,u.previous=i[s(850)](a+42)),u),f[c(653)][c(754)][c(1084)])&&(o=f[c(653)][c(754)].previous,i=f[c(653)][c(754)][c(1306)]-f[c(653)][c(754)][c(1236)],t&&(f.sections.sign=(s=o,a=_0xa05d,u={tag:!1},!(t=e)||t[a(1468)]<s||(s=h[a(518)]()?h[a(1969)]:h[a(1186)],0<(s=t[a(999)](s))&&(r=t[a(850)](s-8),n=s+16-r-8,t[a(850)](n)===r)&&(u[a(1084)]=!0,u[a(1958)]=r,u[a(1306)]=s+16,u[a(1236)]=n)),u),o=0,i=f[c(653)][c(482)].startIndex-f[c(653)][c(482)].len-8),f[c(653)][c(623)]=(t=o,r=i,s=_0xa05d,a={tag:!1},!(n=e)||n[s(1468)]<t||d===n[s(850)](t)&&(a[s(1084)]=!0,a[s(1306)]=t,a[s(1958)]=r,a[s(1236)]=-1),a),f[c(653)].header.tag&&(f[c(1084)]=!0)),f},checkZipBuffer:function(e,t){var r=_0xa05d;return!e||e[r(1468)]<=4?(console[r(1237)]("### Sign Failed, cannot open file: ",t),!1):d===e.readInt32LE(0)||(console[r(1237)]("### Sign Failed, zip file error: ",t),!1)}}}),In=zt(function(e,t){var u,c=_0xa05d,n={};n[c(1675)]=function(e){var t=c;if(void 0===u){var r=t(847);for(u=[],o=0;o<64;++o)u[t(1261)[t(586)](o)]=o;for(o=0;o<r[t(1468)];++o)u[r[t(586)](o)]=-1}for(var n=[],i=0,a=0,o=0;o<e[t(1468)];++o){var s=e[t(586)](o);if("="===s)break;if(-1!==(s=u[s])){if(void 0===s)throw t(1805)+o;i|=s,4<=++a?(n[n[t(1468)]]=i>>16,n[n.length]=i>>8&255,n[n[t(1468)]]=255&i,a=i=0):i<<=6}}switch(a){case 1:throw t(667);case 2:n[n[t(1468)]]=i>>10;break;case 3:n[n.length]=i>>16,n[n[t(1468)]]=i>>8&255}return n},n.re=/-----BEGIN [^-]+-----([A-Za-z\d+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z\d+\/=\s]+)====/,n[c(1023)]=function(e){var t=c,r=n.re.exec(e);if(r)if(r[1])e=r[1];else{if(!r[2])throw t(762);e=r[2]}return n[t(1675)](e)},t.exports=n}),Pn=zt(function(e,t){var c,r={decode:function(e){var t=_0xa05d;if(void 0===c){var r=t(1061),n=" \f\n\r\t \u2028\u2029";for(c=[],s=0;s<16;++s)c[r[t(586)](s)]=s;for(r=r[t(863)](),s=10;s<16;++s)c[r[t(586)](s)]=s;for(s=0;s<n[t(1468)];++s)c[n[t(586)](s)]=-1}for(var i=[],a=0,o=0,s=0;s<e[t(1468)];++s){var u=e[t(586)](s);if("="===u)break;if(-1!==(u=c[u])){if(void 0===u)throw t(1805)+s;a|=u,2<=++o?(i[i[t(1468)]]=a,o=a=0):a<<=4}}if(o)throw t(743);return i}};t[_0xa05d(1583)]=r}),Ln=zt(function(e,t){var o=_0xa05d,r={},s=o(1018);r[o(1595)]=function(e,t){var r,n=o;void 0===t&&(t=0);t^=-1;for(var i=0,a=e[n(1468)];i<a;i++)r=255&(t^e[n(996)](i)),t=t>>>8^"0x"+s.substr(9*r,8);return-1^t},t[o(1583)]=r}),_r=zt(function(e,t){var r=_0xa05d,n=In(),i=Pn(),a=Ln();t[r(1583)]={Base64:n,Hex:i,CRC32:a}}),yr=zt(function(e,t){var c=_0xa05d,f=require(c(1221)),h=require("http"),l=Te(),d=require("js-base64")[c(1455)];var v={"Content-Type":c(580)};function a(e){var t,r,n,a=c,o={version:"1",payload:d(e),paddingMode:"1"},e=(new Date)[a(627)](),i=a(1628),s=(v[i]=(i=o,t=c,r=(new Date).getTime(),i=t(1652)+new URL(l[t(918)]())[t(710)]+"&&"+JSON[t(1828)](i)+t(1546)+l[t(565)]()+t(797)+r,n=l[t(477)](),n=f[t(767)](t(1122),n).update(i)[t(1595)](t(976)),t(1572)[t(1274)](l[t(565)](),t(869))[t(1274)](r,t(1882))[t(1274)](n,'"')),v[a(1388)]=e,new URL(l.getDssHost())),u=s.pathname;return new Promise(function(n){var i=a,e=h[i(1622)]({host:s[i(1804)],port:8108,method:i(1885),path:u,headers:v},function(e){var t=i,r="";e.on(t(1278),function(e){r+=e}),e.on("end",function(){n(JSON[t(851)](r))})});e.on(i(1308),function(e){var t=i;console[t(1308)](t(803)[t(1274)](e.message))}),e.write(JSON.stringify(o)),e[i(1253)]()})}function i(e){return r[c(1189)](this,arguments)}function r(){var e=c;return(r=_asyncToGenerator(_regenerator().m(function e(r){var n,i;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return e.n=1,a(r);case 1:return n=e.v,console[t(1237)](n),i={},e.a(2,(n&&0===n[t(1792)]?(i[t(1996)]=n[t(1779)][t(1996)],i.signature=n[t(1779)][t(1596)]):console[t(1308)]("sign request error:"+(n?n.result.errMsg:"")),i))}},e)})))[e(1189)](this,arguments)}function o(e){var t,r=c;if(e)return t=(e=e[r(1834)](/-/g,"+").replace(/_/g,"/"))[r(1468)]%4,e+r(1590)[r(1051)](0,t)}function n(){var e=c;return(n=_asyncToGenerator(_regenerator().m(function e(r){var n;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return l.setDssConfig(r),e.n=1,i(t(1427));case 1:return n=e.v,n=o(n[t(1996)]).replace(/(.{64})/g,"$1\n"),e.a(2,l[t(1319)]+n+l.CERT_END)}},e)})))[e(1189)](this,arguments)}t[c(1583)]={getSignDigestOnline:i,Base64UrlToBase64:o,setOnlineParam:function(e,t){l[c(959)](e),l.setDssHost(t)},generateCertificate:function(e){return n.apply(this,arguments)}}}),kr=zt(function(e,t){var w=_0xa05d,k=Te(),v=mr(),r=require(w(719)),n=r[w(442)],p=r[w(1758)],u=require(w(757)),i=require("fs"),_=require(w(1221)),s=_r(),g=yr(),c=w(962),f="Rsagen-V3.0.1.20190615",h=w(1324),l=w(1569),d=w(1364);function m(e,t){var r=w,n=t[r(1306)],i=t[r(1306)]+t[r(1958)],e=e.slice(n,i),n=Buffer.alloc(5+t[r(1958)]);n[0]=k[r(946)],n[r(1993)](e[r(1468)],1),e[r(796)](n,5),t[r(482)]=T(n)}function y(e){var t=w;function r(e){var t=_0xa05d;e[t(796)](i,a),a+=e[t(1468)]}var e=e[t(653)],n=e[t(623)].sign.length+e[t(754)][t(482)][t(1468)]+e[t(1534)].sign.length+5,i=Buffer.alloc(n),a=0;return i.writeInt8(k[t(752)],0),i[t(1993)](3,1),a+=5,r(e.header[t(482)]),r(e[t(754)].sign),r(e.footer.sign),T(i)}function b(e,t){var r=w,a={keyId:t[r(592)],clientType:c,clientVersion:f,algorithmType:h,userName:t.userName,unSignData:n(e),passwordDigest:t.passwordDigest,algorithm:l,outFileNameArray:[d],encryptPassword:t.encryptPassword},o=new URL(t[r(859)]),s=o.pathname;return new Promise(function(n){var i=r,e=u[i(1622)]({host:o[i(1804)],method:i(1885),path:s,headers:{"Content-Type":i(580)}},function(e){var t=i,r="";e.on(t(1278),function(e){r+=e}),e.on(t(1253),function(){n(JSON.parse(r))})});e.on(i(1308),function(e){var t=i;console[t(1308)](t(1038)[t(1274)](e[t(1100)]))}),e[i(819)](JSON[i(1828)](a)),e.end()})}function x(e){var t=w,r=Buffer[t(1094)](k.SIGN_HEADER),e=T(e),t=Buffer[t(678)](e[t(1468)]+r[t(1468)]),n=0;return r.copy(t,0),n+=r.length,e.copy(t,n),t}function E(e){var t=w,r=Buffer[t(678)](e[t(1468)]+12);return r[t(1993)](e[t(1468)]+8,0),r[t(1993)](k[t(1117)],4),r.writeInt32LE(e[t(1468)],8),e[t(796)](r,12),{len:r[t(1468)],buffer:r}}function C(e,t){var r=w,n={len:12,digests:{size:0,data:[]},certs:{size:0,data:[]},additional:0};return n.digests[r(1278)][r(1181)](e),n.digests[r(882)]+=e[r(1958)],n.len+=e[r(1958)],n.certs[r(1278)][r(1181)](t),n.certs[r(882)]+=t[r(1958)],n.len+=t[r(1958)],n}function A(){var e=w;return(A=_asyncToGenerator(_regenerator().m(function e(r,n){var i,a,o,s,u;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:if((i={len:16+n.cert[t(1838)].length,size:12+n[t(1996)][t(1838)].length,signdata:{size:0,buffer:null},signatures:{size:0,data:[]},pubkey:{size:n[t(1996)][t(1838)][t(1468)],buffer:n[t(1996)].pemBuffer}})[t(958)][t(871)]=D(r),i[t(958)][t(882)]=r[t(1958)],i[t(882)]+=r.len,i[t(1958)]+=r.len,k[t(518)]())return e.n=1,g[t(435)](i[t(958)][t(871)]);e.n=2;break;case 1:a=e.v,a=Buffer[t(1094)](p[t(1055)](a.signature)),e.n=8;break;case 2:if(n[t(1454)]===t(765))return e.n=3,g.getSignDigestOnline(i[t(958)][t(871)]);e.n=4;break;case 3:o=e.v,a=Buffer[t(1094)](p[t(1055)](o[t(1596)])),e.n=8;break;case 4:if(n[t(1482)])return o=x(i.signdata[t(871)]),e.n=5,b(o,n[t(1563)]);e.n=7;break;case 5:if((s=e.v)[t(929)]){e.n=6;break}throw new Error(s[t(1100)]);case 6:a=Buffer[t(1094)](p[t(1055)](s.data[t(1364)])),e.n=8;break;case 7:(u=_.createSign("RSA-SHA256"))[t(1318)](i[t(958)][t(871)]),a=u[t(482)](n.privateKey);case 8:return u={len:a.length+12,size:a[t(1468)]+8,id:k[t(1117)],buffer:a},e.a(2,(i[t(1763)].data[t(1181)](u),i[t(1763)].size+=u.len,i[t(882)]+=u[t(1958)],i[t(1958)]+=u.len,i))}},e)})))[e(1189)](this,arguments)}function S(){var e=w;return(S=_asyncToGenerator(_regenerator().m(function e(r,n,i){var a,o,s;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:if((a={len:4+n[t(1958)],size:n[t(1958)],data:[]})[t(1278)][t(1181)](n),o=k[t(518)]()?k[t(2012)]:k[t(1235)],o={len:a.len+12,size:a[t(1958)]+4,id:o,value:a},(a={len:32+o.len,size:24+o[t(1958)],data:[]})[t(1278)][t(1181)](o),r.files&&!k[t(518)]())return e.n=1,function(){return B[w(1189)](this,arguments)}(r[t(1570)],i);e.n=2;break;case 1:(o=e.v)&&((s={len:4+o.length,size:o.length,data:[]}).data[t(1181)](o),s={len:s[t(1958)]+12,size:s[t(1958)]+4,id:k[t(1939)],value:s},a[t(1278)][t(1181)](s),a[t(882)]+=s[t(1958)],a[t(1958)]+=s[t(1958)]);case 2:return e.a(2,a)}},e)})))[e(1189)](this,arguments)}function D(e){var r=w,n=Buffer.alloc(e.len),i=0;return n[r(1993)](e[r(1933)][r(882)],i),i+=4,e[r(1933)][r(1278)].forEach(function(e){e[r(871)].copy(n,i),i+=e.len}),n[r(1993)](e[r(1090)][r(882)],i),i+=4,e[r(1090)][r(1278)][r(768)](function(e){var t=r;e.buffer[t(796)](n,i),i+=e[t(1958)]}),n[r(1993)](e[r(1843)],i),n}function O(e){var a=w,o={len:8,size:4,digests:[],sign:null};return e[a(768)](function(e){var t=a,r=s[t(1812)][t(1595)](e[t(1943)][t(1116)]()),n=6+e[t(1332)][t(1468)],i=Buffer[t(678)](n);i[t(1993)](r,0),i[t(559)](e.hash[t(1468)],4),e[t(1332)][t(796)](i,6),o[t(1933)][t(1181)](i),o.size+=n,o[t(1958)]+=n}),o}function B(){var e=w;return(B=_asyncToGenerator(_regenerator().m(function e(o,s){var u,c,f,h,l,d,v;return _regenerator().w(function(e){for(var t,r,n,i,a=_0xa05d;;)switch(e.n){case 0:u=O(o),c=Buffer[a(678)](u[a(882)]),f=0,u[a(1933)].forEach(function(e){var t=a;e[t(796)](c,f),f+=e[t(1468)]}),s.sign?(console.log(a(1881)),h=s[a(482)],e.n=7):e.n=1;break;case 1:if(s[a(1454)]===a(765))return e.n=2,g[a(435)](c);e.n=3;break;case 2:l=e.v,h=Buffer[a(1094)](p[a(1055)](l[a(1596)])),e.n=7;break;case 3:if(s[a(1482)])return l=x(c),e.n=4,b(l,s[a(1563)]);e.n=6;break;case 4:if((d=e.v)[a(929)]){e.n=5;break}throw new Error(d[a(1100)]);case 5:h=Buffer[a(1094)](p[a(1055)](d.data[a(1364)])),e.n=7;break;case 6:(v=_[a(1547)]("RSA-SHA256")).update(c),h=v[a(482)](s.privateKey);case 7:return e.a(2,(u.digests=c[a(1740)](),u[a(482)]={len:12+h[a(1468)],size:8+h[a(1468)],id:k[a(1117)],data:h},u[a(1958)]+=u.sign.len,t=u,i=n=r=void 0,r=w,n=Buffer.alloc(t.len),i=0,n[r(1993)](t.size,0),i+=4,t.digests.copy(n,4),i+=t[r(1933)].length,n[r(1993)](t[r(482)][r(882)],i),i+=4,n[r(1993)](t.sign.id,i),i+=4,n[r(1993)](t[r(482)].data[r(1468)],i),i+=4,t[r(482)][r(1278)][r(796)](n,i),n))}},e)})))[e(1189)](this,arguments)}function a(){var e=w;return(a=_asyncToGenerator(_regenerator().m(function e(u,c,f){var h,l,d;return _regenerator().w(function(e){for(var t,r,n,i,a,o,s=_0xa05d;;)switch(e.n){case 0:if(v.checkZipBuffer(u)){e.n=1;break}return e.a(2,null);case 1:if((h=v[s(1549)](u))[s(790)]={files:c},h[s(1084)]){e.n=2;break}return e.a(2,null);case 2:return Object[s(1109)](h.sections)[s(768)](function(e){e=h[s(653)][e];m(u,e)}),l=y(h),l=E(l),l=C(l,f[s(1996)][s(1693)]),e.n=3,function(){return A[w(1189)](this,arguments)}(l,f);case 3:return l=e.v,e.n=4,function(){return S[w(1189)](this,arguments)}(h.options,l,f);case 4:return d=e.v,e.a(2,(h.signchunk=(e=>{var t=w,i=Buffer.alloc(e.len),a=0,r=(i[t(1993)](e.size,a),a+=4,i[t(1993)](0,a),a+=4,k.isApkSign()?k[t(2012)]:k.SIGN_TYPE_FULL_PACKAGE),e=(e[t(1278)][t(768)](function(e){var n=t;i[n(1993)](e[n(882)],a),a+=4,i.writeInt32LE(0,a),a+=4,i.writeInt32LE(e.id,a),a+=4,i[n(1993)](e[n(1407)][n(882)],a),a+=4,r===e.id?e[n(1407)][n(1278)][n(768)](function(e){var r=n;i[r(1993)](e[r(882)],a),a+=4,i.writeInt32LE(e[r(958)][r(882)],a),a+=4,e.signdata.buffer[r(796)](i,a),a+=e[r(958)].buffer.length,i[r(1993)](e[r(1763)][r(882)],a),a+=4,e[r(1763)][r(1278)][r(768)](function(e){var t=r;i[t(1993)](e[t(882)],a),a+=4,i[t(1993)](e.id,a),a+=4,i[t(1993)](e[t(871)][t(1468)],a),a+=4,e[t(871)][t(796)](i,a),a+=e[t(871)].length}),i[r(1993)](e.pubkey[r(882)],a),a+=4,e[r(583)][r(871)].copy(i,a),a+=e[r(583)][r(871)][r(1468)]}):k[n(1939)]===e.id&&e.value[n(1278)][n(768)](function(e){var t=n;e[t(796)](i,a),a+=e[t(1468)]})}),i.writeInt32LE(e[t(882)],a),a+=4,i[t(1993)](0,a),a+=4,k[t(518)]()?k[t(1969)]:k[t(1186)]);return Buffer[t(1094)](e)[t(796)](i,a),i})(d),t=u,r=h,o=a=i=n=void 0,n=w,i=Buffer.alloc(t[n(1468)]+r[n(1164)][n(1468)]),a=0,o=r.sections,t[n(796)](i,0,o[n(623)][n(1306)],o[n(623)].startIndex+o.header.len),a+=o.header[n(1958)],r[n(1164)][n(796)](i,a),a+=r.signchunk[n(1468)],t[n(796)](i,a,o[n(754)][n(1306)],o.central.startIndex+o[n(754)][n(1958)]),a+=o.central[n(1958)],t.writeInt32LE(o[n(754)][n(1306)]+r[n(1164)][n(1468)],o[n(1534)][n(1306)]+16),t.copy(i,a,o[n(1534)].startIndex,o[n(1534)][n(1306)]+o[n(1534)][n(1958)]),i))}},e)})))[e(1189)](this,arguments)}function o(){var e=w;return(o=_asyncToGenerator(_regenerator().m(function e(r,n,i){var a,o;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:if(v.checkZipBuffer(r)){e.n=1;break}return e.a(2,null);case 1:if((a=v.parserZip(r))[t(790)]={files:n},a[t(1084)]){e.n=2;break}return e.a(2,null);case 2:return Object.keys(a[t(653)]).forEach(function(e){e=a.sections[e];m(r,e)}),o=y(a),o=E(o),o=C(o,i[t(1996)][t(1693)]),e.a(2,D(o))}},e)})))[e(1189)](this,arguments)}function T(e){var t=w,r=_[t(789)]("SHA256");return r[t(1318)](e),r[t(1595)]()}function F(e,t){var r=w,n={};return n[r(882)]=e[r(850)](t),t+=4,n[r(871)]=e[r(1740)](t,t+n.size),{obj:n,i:t+=n[r(882)]}}t[w(1583)]={hashFile:function(e){return T(i[w(1210)](e))},signZipResource:function(e,t,r){return a[w(1189)](this,arguments)},getBufferSha256:T,getSignChunk:function(e,t){for(var r,n,i,a,o,s,u=w,c=(b=t[u(1236)]+8)+t[u(1958)],f=[],h={},l=(h[u(1967)]=[],k[u(518)]()?k.SIGN_TYPE_FULL_PACKAGE_APK:k.SIGN_TYPE_FULL_PACKAGE);b<c;){d=e,a=b,s=o=void 0,(s={})[(o=w)(882)]=d.readInt32LE(a),a+=8,s.id=d[o(850)](a),a+=4,s.value={},s[o(1407)][o(882)]=d.readInt32LE(a),s[o(1407)].data=[];var d={data:s,index:a+=4},v=d[u(1278)],p=(b=d[u(775)])+v.value[u(882)],_={};if(l===v.id)for(;b<p;){_[u(882)]=e[u(850)](b);var g=F(e,b+=4),m=(_[u(958)]=g[u(1693)],b=g.i,h[u(1967)][u(1181)](_[u(958)][u(871)]),_[u(1763)]={},_[u(1763)][u(882)]=e[u(850)](b),(b+=4)+_[u(1763)][u(882)]);for(_[u(1763)][u(1278)]=[];b<m;){y=e,r=b,i=n=void 0,(n={})[(i=w)(882)]=y[i(850)](r),r+=4,n.id=y[i(850)](r),i=y.readInt32LE(r+=4),n.buffer=y.slice(r+=4,r+i);var y={sData:n,index:r+=i},b=y[u(775)];_[u(1763)][u(1278)][u(1181)](y.sData)}g=F(e,b);_[u(583)]=g[u(1693)],b=g.i,v[u(1407)][u(1278)].push(_)}else k.SIGN_TYPE_FILE_LIST===v.id&&(_=e[u(1740)](b,b+v[u(1407)][u(882)]),v[u(1407)].data[u(1181)](_));f[u(1181)](v)}return h.data=f,h[u(882)]=t.size,h},getCertBuffer:function(e){var t,r,n=w;if(e)return e.signDataBufList&&0<e[n(1967)][n(1468)]?(t=(t=0)+(4+e[n(1967)][0].readInt32LE(0))+4,r=e[n(1967)][0][n(850)](t),t+=4,e=e[n(1967)][0][n(1740)](t,t+r),k[n(1319)]+e[n(1116)](n(976))+k.CERT_END):void 0;console[n(1308)]("no sign chunk!")},getSignFilesObject:O,getSignData:function(e,t,r){return o[w(1189)](this,arguments)}}}),ye=zt(function(j,e){function i(r,n,i,a){var o=u;if(n&&_typeof(n)==o(1355)||typeof n==o(1976)){var s,t=_createForOfIteratorHelper(z(n));try{for(t.s();!(s=t.n())[o(1594)];)(()=>{var e=o,t=s[e(1407)];U[e(971)](r,t)||t===i||c(r,t,{get:function(){return n[t]},enumerable:!(a=L(n,t))||a.enumerable})})()}catch(e){t.e(e)}finally{t.f()}}return r}function t(e,t,r){var n=u;return r=null!=e?N(G(e)):{},i(!t&&e&&e[n(573)]?r:c(r,n(830),{value:e,enumerable:!0}),e)}var r,u=_0xa05d,N=Object.create,c=Object.defineProperty,L=Object[u(1780)],z=Object.getOwnPropertyNames,G=Object[u(636)],U=Object[u(1111)][u(1394)],n={},H=n,a={ASCF_LOG_FILE:function(){return V},AscfBuilder:function(){return nt},AscfDebugger:function(){return rt},getDevEcoSdkHome:function(){return ae},getHdcPath:function(){return g},getHvigorwPath:function(){return _},getLogger:function(){return o},getNodePath:function(){return ne},getNpmPath:function(){return ie},getOhpmPath:function(){return p},getPath:function(){return v},openInBrowser:function(){return ut},setLoggerConfig:function(){return Y}};for(r in a)c(H,r,{get:a[r],enumerable:!0});e[u(1583)]=(e=n,i(c({},u(573),{value:!0}),e));var f=t(require("log4js")),M=t(require(u(1293))),Z=t(require(u(1336))),q={isRelease:!0},K=[u(1203),u(522),"warn",u(1308),u(1206)],W=u(1803),V=M.resolve((0,Z[u(830)])(u(587)),"build.log");function Y(e){var t,r=u,e=(t=u,(e=e)&&K[t(986)](e[t(863)]())?e[t(863)]():t(522));f[r(724)]({appenders:{default:{type:r(693),layout:{type:r(1730),pattern:r(1137)}},"debug-log-file":{type:r(1817),filename:M.resolve((0,Z[r(830)])(r(587)),r(1353)),maxLogSize:10485760,backups:9,layout:{type:r(1730),pattern:r(1592)}}},categories:{default:{appenders:[r(830)],level:e},AscfToolkit:{appenders:["debug-log-file"],level:r(1203)}}})}var h,J=_createClass(function e(t){_classCallCheck(this,e),this.categories=t},[{key:(h=u)(1162),value:function(e,t,r){var n=h,i=3<arguments.length&&void 0!==arguments[3]&&arguments[3],a="",o=("info"!==e&&(a=function(e){var t=u,r="";if(q[t(1551)]){for(var n=arguments[t(1468)],i=new Array(1<n?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];i.unshift(e);for(var o=0;o<i.length;o++){var s="";"string"==typeof i[o]&&(s=i[o]),(s=i[o]instanceof Error?i[o].message:s)[t(1528)]("\n")?r+=String(s)[t(1660)]("\n")[1]:r+=String(s)[t(1660)]("\n")[0]}}return r}.apply(void 0,[t][n(1274)](_toConsumableArray(r)))),f.getLogger(this.categories)),s=f[n(879)](W);""!==a?(o[e](a),s[e](a)):(o[e][n(1189)](o,[t][n(1274)](_toConsumableArray(r))),s[e][n(1189)](s,[t][n(1274)](_toConsumableArray(r)))),i&&process[n(549)](1)}},{key:h(522),value:function(e){for(var t=h,r=arguments[t(1468)],n=new Array(1<r?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return this[t(1162)](t(522),e,n)}},{key:"warn",value:function(e){for(var t=h,r=arguments[t(1468)],n=new Array(1<r?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return this[t(1162)](t(1165),e,n)}},{key:h(1203),value:function(e){for(var t=h,r=arguments[t(1468)],n=new Array(1<r?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return this[t(1162)]("debug",e,n)}},{key:h(1308),value:function(e){for(var t=h,r=arguments[t(1468)],n=new Array(1<r?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return this[t(1162)]("error",e,n)}},{key:h(1206),value:function(e){for(var t=arguments[h(1468)],r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return this.doLog("fatal",e,r,!0)}}]);function o(e){return new J(e)}function l(){return X[u(1189)](this,arguments)}function X(){var e=u;return(X=_asyncToGenerator(_regenerator().m(function e(t){var r;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,t;case 1:return r=e.v,e.a(2,{data:r});case 2:return e.p=2,e.a(2,{err:e.v})}},e,null,[[0,2]])})))[e(1189)](this,arguments)}var $=t(require("http"));var Q=require(u(1757)),s=t(require("fs")),ee=t(require(u(574))),te=t(require(u(1293))),d=process[u(1295)]===u(1029),n=u(495),re=d?"C:\\Program Files\\Huawei\\DevEco Studio\\tools":n;function v(){for(var e=u,t=arguments[e(1468)],r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=process[e(1392)][e(1731)]||process[e(1392)][e(815)]||process[e(1392)][e(1488)],i=i?i[e(1660)](";")[0][e(1900)]()+e(1139):re,i=te[e(1681)][e(1189)](te,[i][e(1274)](r));return d&&i[e(986)](" ")?'"'.concat(i,'"'):i}function ne(){var e=u;return v(e(893),d?"node.exe":e(912))}function ie(){var e=u;return v(e(893),d?e(578):"bin/npm")}function p(){var e=u;return v(e(1503),e(479),e(1503))}function _(){var e=u;return v(e(515),e(479),e(795))}function ae(){return v(u(1461)).replace(/"/g,"")}function g(){var e=u;return v("../sdk/default/openharmony/toolchains",e(d?940:1251))}function oe(e){var t=u;return e&&(e.length<4?"*"[t(1944)](e[t(1468)]):e[t(1740)](0,-4)+t(1578))}var m=o(u(1251));function se(e){var n=u;return null==e?void 0:e[n(1834)](/--sign-pwd\s+\S+/g,n(1872))[n(1834)](/-t\s+(\S+)/g,function(e,t){var r=n;return r(1194)[r(1274)](oe(t))})}function ue(e,t,r,n){var i=u,a=(m[i(522)](i(1581),e,se(null==t?void 0:t[i(1681)](" "))),ae()),a=(m[i(1203)](i(1074)+a),Object[i(1224)]({shell:!0,env:_objectSpread(_objectSpread({},process[i(1392)]||{}),{},{DEVECO_SDK_HOME:a})},n)),e=(0,Q[i(1227)])(e,t,a),o=[],s=[];return e[i(693)].on(i(1278),function(e){var t=i,e=e[t(1116)]()[t(1900)]();null!=n&&n[t(838)]||m.debug(t(1957),se(e)),o[t(1181)](e)}),e[i(1808)].on(i(1278),function(e){var t=i,e=e[t(1116)]()[t(1900)]();m.error("runCmd stderr",e),s[t(1181)](e)}),e.on(i(1305),function(e){var t=i;0!==e?(e="runCmd exited with code ".concat(e,"."),m[t(1308)](e),null!=r&&r(e+t(1391)+s[t(1681)]("\n"))):(e=o[t(1681)]("\n"),/failed to start ability/.test(e)?null!=r&&r(t(478)):(null!=r&&r(null,e),m[t(1203)](t(1913))))}),e}function y(){return ce[u(1189)](this,arguments)}function ce(){var e=u;return(ce=_asyncToGenerator(_regenerator().m(function e(t,i,a,o){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(r,n){var e=ue(t,i,function(e,t){if(e)return n(e);r(t)},a);null!=o&&o(e)}))},e)})))[e(1189)](this,arguments)}function b(){return fe[u(1189)](this,arguments)}function fe(){var e=u;return(fe=_asyncToGenerator(_regenerator().m(function e(t,r){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,y(g(),t,r))},e)})))[e(1189)](this,arguments)}function he(){var e=u;return(he=_asyncToGenerator(_regenerator().m(function e(){var r;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return e.n=1,l(b([t(1906),"targets"],{sensitive:!0}));case 1:return r=e.v,e.a(2,r[t(579)]?(m[t(1308)]("list targets error: "+r[t(579)]),[]):null==(r=r[t(1278)])||null==(r=r.trim())||null==(r=r[t(1660)]("\n"))?void 0:r[t(841)](function(e){return e[t(1900)]()}))}},e)})))[e(1189)](this,arguments)}function le(){var e=u;return(le=_asyncToGenerator(_regenerator().m(function e(r){var n;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return e.n=1,l(b(["-t",r,"shell",t(1589),t(663),t(1400)]));case 1:return n=e.v,e.a(2,n.err||/(\[Fail\])/[t(1428)](n[t(1278)])?(m[t(1308)](t(445),n[t(579)]),t(771)):null==(n=n[t(1278)])?void 0:n[t(1900)]())}},e)})))[e(1189)](this,arguments)}function w(e){var t,r=u,e=""[r(1274)](e,r(1663));if(s.existsSync(e))return t=s.readFileSync(e,"utf-8"),null==(t=ee[r(851)](t))||null==(t=t[r(1555)])?void 0:t[r(1413)];throw m[r(1308)](""[r(1274)](e,r(1891))),new Error("".concat(e,r(1891)))}function de(e){var t,r=u,e="".concat(e,"/build-profile.json5");if(s[r(1686)](e))return t=s[r(1210)](e,r(1281)),ee.parse(t);throw m[r(1308)](""[r(1274)](e,r(1891))),new Error(""[r(1274)](e," is not found"))}function ve(){return pe.apply(this,arguments)}function pe(){var e=u;return(pe=_asyncToGenerator(_regenerator().m(function e(r,n){var i,a;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return m[t(522)](t(1126).concat(r)),i=w(r),e.n=1,l(b(["-t",n,t(857),"aa",t(1396),i]));case 1:return e.n=2,l(b(["-t",n,t(857),"aa","start","-a",t(621),"-b",i,t(1087)]));case 2:if((a=e.v)[t(579)])return m.error(t(1016),a[t(579)]),m[t(1308)](t(712)),e.a(2);e.n=3;break;case 3:return e.a(2)}},e)})))[e(1189)](this,arguments)}function _e(){var e=u;return(_e=_asyncToGenerator(_regenerator().m(function e(r){var n;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return m[t(522)](t(1315).concat(r)),e.n=1,l(y(p(),[t(1318)],{chdir:!0,cwd:r}));case 1:(n=e.v)[t(579)]&&m[t(1308)](t(1909),n[t(579)]);case 2:return e.a(2)}},e)})))[e(1189)](this,arguments)}function ge(){return(ge=_asyncToGenerator(_regenerator().m(function e(r){var n;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return m[t(522)](t(707)[t(1274)](r)),e.n=1,l(y(p(),[t(888)],{chdir:!0,cwd:r}));case 1:(n=e.v)[t(579)]&&m[t(1308)](t(480),n[t(579)]);case 2:return e.a(2)}},e)}))).apply(this,arguments)}function me(){var e=u;return(me=_asyncToGenerator(_regenerator().m(function e(r){var n;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return m.info(t(1624)[t(1274)](r)),e.n=1,l(y(_(),[t(888),t(1187)],{chdir:!0,cwd:r}));case 1:(n=e.v).err&&m[t(1308)](t(1801),n[t(579)]);case 2:return e.a(2)}},e)})))[e(1189)](this,arguments)}var ye,be,k,we=_createClass(function e(){_classCallCheck(this,e)}),e=_createClass(x,[{key:(k=u)(2003),value:(be=_asyncToGenerator(_regenerator().m(function e(){var r,n,a,i,o=this;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return e.n=1,l(function(){return he[u(1189)](this,arguments)}());case 1:if((n=e.v)[t(579)]||null==n||null==(r=n[t(1278)])||!r[t(1468)]||/(\[Empty\])|(\[Fail\])/[t(1428)](null==(r=n[t(1278)])?void 0:r.join("\n")))return e.a(2,(m[t(1308)](t(1709)),[]));e.n=2;break;case 2:return m[t(1203)](t(1125),null==(r=n.data)?void 0:r[t(841)](oe).join("\n")),a=!1,e.n=3,Promise.all(n[t(1278)].map((()=>{var t=_asyncToGenerator(_regenerator().m(function e(r){var n,i;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:if(o[t(1373)]&&o.cur.sn===r&&(a=!0),o[t(1601)].has(r))return e.a(2,o[t(1601)][t(663)](r));e.n=1;break;case 1:return(n=new we).sn=r,e.n=2,function(){return le[u(1189)](this,arguments)}(r);case 2:return i=e.v,e.a(2,(n[t(1943)]=i,o.cache[t(737)](r,n),n))}},e)}));return function(e){return t[_0xa05d(1189)](this,arguments)}})()));case 3:return i=e.v,e.a(2,(a||(this.cur=i[t(1468)]?i[0]:null),i))}},e,this)})),function(){return be[_0xa05d(1189)](this,arguments)})},{key:k(1022),value:function(){return this[k(1373)]}},{key:k(1964),value:function(e){var t=k;e&&this.cache[t(537)](e)&&(e=this.cache[t(663)](e),this[t(1373)]=e)}},{key:"getDeviceId",value:(ye=_asyncToGenerator(_regenerator().m(function e(){var r;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return e.n=1,this[t(2003)]();case 1:if(r=null==(r=this[t(1022)]())?void 0:r.sn){e.n=2;break}return m.error(t(1083)),e.a(2);case 2:return e.a(2,r)}},e,this)})),function(){return ye[_0xa05d(1189)](this,arguments)})}],[{key:"getInstance",value:function(){return x.instance}}]);function x(){var e=_0xa05d;_classCallCheck(this,x),this.cache=new Map,this[e(1373)]=null}e.instance=new e;var E=e,ke=t(require(u(773)));function xe(){var e=u;return(xe=_asyncToGenerator(_regenerator().m(function e(o){var s,t,u,r,n=arguments;return _regenerator().w(function(e){for(var a=_0xa05d;;)switch(e.p=e.n){case 0:return t=(r=1<n.length&&void 0!==n[1]?n[1]:{}).host,s=void 0===t?a(1473):t,t=r[a(1496)],u=void 0===t?1e3:t,r=new Promise(function(e,t){function r(){i.destroy(),t()}var n=a,i=new ke[n(1349)];i.once(n(1308),r),i[n(1747)](n(1496),r),i[n(680)](u),i[n(1302)](o,s,function(){i[n(1253)](),e(o)})}),e.p=1,e.n=2,r;case 2:return e.a(2,!0);case 3:return e.p=3,e.a(2,!1)}},e,null,[[1,3]])})))[e(1189)](this,arguments)}var C=o(u(1953)),A=u(1983);function S(){return Ee[u(1189)](this,arguments)}function Ee(){var e=u;return(Ee=_asyncToGenerator(_regenerator().m(function e(o){var t,s,u,n,i,a=arguments;return _regenerator().w(function(e){for(var r=_0xa05d;;)switch(e.n){case 0:return s=1<a[r(1468)]&&void 0!==a[1]&&a[1],u=2<a[r(1468)]&&void 0!==a[2]?a[2]:"",e.n=1,l(b(["-t",o,"fport","ls"]));case 1:(n=e.v)[r(579)]?(C[r(1308)](r(1980),A),i=[],e.n=4):e.n=2;break;case 2:return e.n=3,Promise.all(null==(t=n.data)?void 0:t[r(1900)]()[r(1660)]("\n")[r(841)]((()=>{var t=_asyncToGenerator(_regenerator().m(function e(r){var n,i,a;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:if(i=r[t(1660)](/\s+/),n=null==(n=i[1])?void 0:n[t(1900)](),i=null==(i=i[2])?void 0:i[t(1900)](),a=s&&n==="tcp:"[t(1274)](u))return e.n=1,l(b(["-t",o,t(1714),"rm",n,i]));e.n=1;break;case 1:return e.a(2,{localPort:n,remotePort:i,needRm:a})}},e)}));return function(e){return t[_0xa05d(1189)](this,arguments)}})()));case 3:i=e.v.filter(function(e){var t=r;return e[t(498)]&&!e[t(1386)]});case 4:return e.a(2,i)}},e)})))[e(1189)](this,arguments)}function Ce(){return Ae[u(1189)](this,arguments)}function Ae(){var e=u;return(Ae=_asyncToGenerator(_regenerator().m(function e(i,a,o){var r,s,n;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return e.n=1,S(i);case 1:return r=e.v,s=!1,n=a[t(1900)]().replace("tcp:",""),e.n=2,Promise[t(951)](r[t(841)]((()=>{var t=_asyncToGenerator(_regenerator().m(function e(r){var n;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:if(r.localPort&&r[t(1239)]){e.n=1;break}return e.a(2);case 1:if(n=!1,r[t(498)]===a&&r[t(1239)]===o?s=!0:r[t(498)]!==a&&r.remotePort!==o||(n=!0),n)return e.n=2,l(b(["-t",i,t(1714),"rm",r[t(498)],r.remotePort]));e.n=2;break;case 2:return e.a(2)}},e)}));return function(e){return t[_0xa05d(1189)](this,arguments)}})()));case 2:if(s)return C[t(1165)]("already has forward"),e.a(2);e.n=3;break;case 3:return e.n=4,function(){return xe.apply(this,arguments)}(n);case 4:if(e.v)return C[t(1308)](t(641).concat(n,t(585))),e.a(2);e.n=5;break;case 5:return e.n=6,l(b(["-t",i,t(1714),a,o]));case 6:if(e.v[t(579)])return C.error(t(588),A),e.a(2);e.n=7;break;case 7:return e.a(2)}},e)})))[e(1189)](this,arguments)}function Se(){var e=u;return(Se=_asyncToGenerator(_regenerator().m(function e(t,r){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,S(t,!0,r);case 1:return e.a(2,e.v)}},e)})))[e(1189)](this,arguments)}var De,Oe,Be,Te,Fe,Ie,D,n=_createClass(function e(){var t=_0xa05d;_classCallCheck(this,e),this[t(1553)]=9222,this.v8LocalPort=9229},[{key:(D=u)(1718),value:(Ie=_asyncToGenerator(_regenerator().m(function e(r,n){var i,a,o,s;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:if(s=!r)return e.n=1,E[t(1835)]()[t(1658)]();e.n=2;break;case 1:r=e.v,s=!r;case 2:if(s)return e.a(2);e.n=3;break;case 3:return e.n=4,l(b(["-t",r,t(857),'"ps -ef | grep '[t(1274)](n,t(1326))]));case 4:if((a=e.v)[t(579)]||null==(i=a[t(1278)])||!i[t(1468)])return C[t(1308)](t(1431),A),e.a(2);e.n=5;break;case 5:return o=null==(i=a[t(1278)])||null==(i=i[t(1900)]()[t(1660)]("\n"))?void 0:i[0][t(1900)]()[t(1660)](/\s+/)[1][t(1900)](),e.n=6,l(Ce(r,t(718)+this[t(1553)],t(1717)[t(1274)](o)));case 6:if(e.v[t(579)])return C[t(1308)](t(1345),A),e.a(2);e.n=7;break;case 7:return e.a(2)}},e,this)})),function(e,t){return Ie[_0xa05d(1189)](this,arguments)})},{key:D(665),value:(Fe=_asyncToGenerator(_regenerator().m(function e(r){var n,i;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:if(i=!r)return e.n=1,E[t(1835)]()[t(1658)]();e.n=2;break;case 1:r=e.v,i=!r;case 2:if(n=!i)return e.n=3,l(Ce(r,t(718)+this[t(660)],t(609)));e.n=4;break;case 3:n=e.v[t(579)];case 4:if(n)return C[t(1308)](t(1560),A),e.a(2);e.n=5;break;case 5:return e.a(2)}},e,this)})),function(e){return Fe.apply(this,arguments)})},{key:"fportRmV8",value:(Te=_asyncToGenerator(_regenerator().m(function e(r){return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return e.n=1,this[t(1447)](r,String(this[t(660)]));case 1:return e.a(2)}},e,this)})),function(e){return Te[_0xa05d(1189)](this,arguments)})},{key:D(1604),value:(Be=_asyncToGenerator(_regenerator().m(function e(r){return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return e.n=1,this.fportRm(r,String(this[t(1553)]));case 1:return e.a(2)}},e,this)})),function(e){return Be[_0xa05d(1189)](this,arguments)})},{key:D(1447),value:(Oe=_asyncToGenerator(_regenerator().m(function e(r,n){var i;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:if(i=!r)return e.n=1,E[t(1835)]()[t(1658)]();e.n=2;break;case 1:r=e.v,i=!r;case 2:if(i){e.n=3;break}return e.n=3,function(){return Se[u(1189)](this,arguments)}(r,n);case 3:return e.a(2)}},e)})),function(e,t){return Oe.apply(this,arguments)})},{key:D(1792),value:(De=_asyncToGenerator(_regenerator().m(function e(r){var n,i;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:if(n=!r)return e.n=1,E[t(1835)]()[t(1658)]();e.n=2;break;case 1:r=e.v,n=!r;case 2:n?(i=[],e.n=5):e.n=3;break;case 3:return e.n=4,S(r);case 4:i=e.v;case 5:return e.a(2,i)}},e)})),function(e){return De[_0xa05d(1189)](this,arguments)})}],[{key:D(1835),value:function(){return this[D(412)]}}]),O=(n[u(412)]=new n,n),B=o(u(925));function Pe(){return(Pe=_asyncToGenerator(_regenerator().m(function e(r){var i;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.p=e.n){case 0:i=[],e.p=1,e.n=2;var n=t(1539)[t(1274)](r,t(1184)),o={timeout:3e3};return new Promise(function(i,a){var t=_0xa05d,e=Object[t(1224)]({timeout:6e3},o),r=$[t(830)][t(663)](n,function(e){var r=t,n="";e.on(r(1278),function(e){n+=e}),e.on(r(1253),function(){var t=r;try{i(JSON[t(851)](n))}catch(e){a(new Error(t(1858)))}})});r.setTimeout(e[t(1496)],function(){var e=t;r.abort(),a(new Error(e(467)))}),r.on(t(1308),a),r[t(1253)]()});case 2:i=e.v,e.n=4;break;case 3:e.p=3,B[t(1308)](t(698),A);case 4:return e.a(2,i)}},e,null,[[1,3]])}))).apply(this,arguments)}function Re(){return je[u(1189)](this,arguments)}function je(){var e=u;return(je=_asyncToGenerator(_regenerator().m(function e(r){var n,i,a,o,s;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.p=e.n){case 0:if(r){e.n=1;break}return e.a(2,"");case 1:return e.p=1,e.n=2,function(){return Pe[u(1189)](this,arguments)}(r);case 2:if(n=e.v,a=null===n){e.n=3;break}a=void 0===n;case 3:if(i=a){e.n=4;break}i=null==(n=n[0]);case 4:i?(o=void 0,e.n=6):e.n=5;break;case 5:o=n.devtoolsFrontendUrl;case 6:return e.a(2,o);case 7:return e.p=7,s=e.v,B[t(1308)]("getDebugUrl ".concat(r,t(1312)),s),e.a(2,"")}},e,null,[[1,7]])})))[e(1189)](this,arguments)}var Ne,Le,ze,Ge,Ue,He,Me,Ze,qe,Ke,T,We,Ve,Ye,Je,Xe,$e,Qe,et,tt,rt=_createClass(function e(t){var r=_0xa05d;_classCallCheck(this,e),B[r(522)](r(541),t),this[r(790)]=Object[r(1224)]({open:""},t)},[{key:"handle",value:function(e){var t=_0xa05d,r=this,n=(B[t(522)]("handle "[t(1274)](e)),{status:function(){return r[t(1792)]()},start:function(){return r.start()},stop:function(){return r[t(807)]()},"start-view":function(){return r[t(454)]()},"start-service":function(){return r.startService()},"stop-view":function(){return r[t(1340)]()},"stop-service":function(){return r[t(1360)]()}});n[e]?n[e]()[t(2009)](function(){return B.info("handle end")})[t(1507)](function(e){return B[t(1308)]("handle error",e)}):B.error("invalid subCmd, should be "+Object[t(1109)](n)[t(1681)](","))}},{key:(e=u)(1792),value:(tt=_asyncToGenerator(_regenerator().m(function e(){var r,n;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return B[t(522)]("status"),r=(r=this[t(790)][t(1413)])||w(process.cwd()),e.n=1,this[t(634)](r);case 1:if(e.v){e.n=2;break}return e.a(2);case 2:return e.n=3,O[t(1835)]()[t(1792)](this.options.deviceId);case 3:return r=e.v,e.n=4,Promise.all(null==r?void 0:r.map((()=>{var t=_asyncToGenerator(_regenerator().m(function e(r){var n,i;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:r[t(498)]!==t(718)[t(1274)](O[t(1835)]().webLocalPort)?e.n=1:(n=t(1634),e.n=3);break;case 1:r[t(498)]!==t(718)[t(1274)](O[t(1835)]()[t(660)])?e.n=2:(n=t(1598),e.n=3);break;case 2:return e.a(2);case 3:return e.n=4,Re(r[t(498)][t(1834)](t(718),""));case 4:return i=e.v,e.a(2,i?("view"===n&&(i=t(1254)),""[t(1274)](n," ")[t(1274)](r[t(498)]," ")[t(1274)](r[t(1239)],t(725))[t(1274)](i)):"")}},e)}));return function(e){return t.apply(this,arguments)}})()));case 4:0!==(n=(n=e.v).filter(Boolean))[t(1468)]&&B[t(522)](t(2006)+n[t(1681)]("\n"));case 5:return e.a(2)}},e,this)})),function(){return tt[_0xa05d(1189)](this,arguments)})},{key:"start",value:(et=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return B[t(522)](t(988)),e.n=1,this.startView();case 1:return e.n=2,this[t(1148)]();case 2:return e.a(2)}},e,this)})),function(){return et[_0xa05d(1189)](this,arguments)})},{key:e(807),value:(Qe=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return B[t(522)]("stop"),e.n=1,this[t(1340)]();case 1:return e.n=2,this.stopService();case 2:return e.a(2)}},e,this)})),function(){return Qe[_0xa05d(1189)](this,arguments)})},{key:e(454),value:($e=_asyncToGenerator(_regenerator().m(function e(){var r;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return B[t(522)](t(454)),r=(r=this.options.bundleName)||w(process[t(1377)]()),e.n=1,this[t(634)](r);case 1:if(e.v)return e.n=2,O[t(1835)]().fportWeb(this[t(790)][t(1153)],r);e.n=3;break;case 2:return e.n=3,this.openBrowser(O[t(1835)]().webLocalPort,t(1742));case 3:return e.a(2)}},e,this)})),function(){return $e.apply(this,arguments)})},{key:e(1148),value:(Xe=_asyncToGenerator(_regenerator().m(function e(){var r;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return B[t(522)](t(1148)),r=(r=this[t(790)][t(1413)])||w(process[t(1377)]()),e.n=1,this[t(634)](r);case 1:if(e.v)return e.n=2,O.getInstance()[t(665)](this[t(790)][t(1153)]);e.n=3;break;case 2:return e.n=3,this[t(1259)](O[t(1835)]().v8LocalPort);case 3:return e.a(2)}},e,this)})),function(){return Xe[_0xa05d(1189)](this,arguments)})},{key:"stopView",value:(Je=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return B[t(522)]("stopView"),e.n=1,O.getInstance()[t(1604)](this[t(790)].deviceId);case 1:return e.a(2)}},e,this)})),function(){return Je[_0xa05d(1189)](this,arguments)})},{key:e(1360),value:(Ye=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return B[t(522)](t(1360)),e.n=1,O[t(1835)]()[t(526)](this[t(790)][t(1153)]);case 1:return e.a(2)}},e,this)})),function(){return Ye[_0xa05d(1189)](this,arguments)})},{key:e(634),value:(Ve=_asyncToGenerator(_regenerator().m(function e(r){var n,i,a,o,s,u;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:if(i=this[t(790)].deviceId,o=!i)return e.n=1,E[t(1835)]()[t(1658)]();e.n=2;break;case 1:i=e.v,o=!i;case 2:if(o)return e.a(2,!1);e.n=3;break;case 3:return e.n=4,l(b(["-t",i,t(857),"pidof",r]));case 4:if(n=e.v[t(1278)],s=null===n){e.n=5;break}s=void 0===n;case 5:s?(u=void 0,e.n=7):e.n=6;break;case 6:u=n[t(1900)]();case 7:return a=u,e.a(2,(a||B[t(1308)]("The selected Atomic Service is not running properly. Please start the Atomic Service first."),a))}},e,this)})),function(e){return Ve[_0xa05d(1189)](this,arguments)})},{key:e(1259),value:(We=_asyncToGenerator(_regenerator().m(function e(r){var n,i,a=arguments;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:if(n=1<a[t(1468)]&&void 0!==a[1]?a[1]:"",B[t(522)]("openBrowser"),this[t(790)].open)return e.n=1,Re(r);e.n=3;break;case 1:if(i=e.v){e.n=2;break}return B[t(522)](t(1554)),e.a(2);case 2:n&&(i=n),B.info(t(1509),i);case 3:return e.a(2)}},e,this)})),function(e){return We[_0xa05d(1189)](this,arguments)})}]),F=t(require("fs")),I=t(require(u(1293))),P=o(u(1008)),nt=_createClass(function e(t){var r=_0xa05d;_classCallCheck(this,e),this.cpList=[],this[r(614)]=null,this[r(564)]=!1,this[r(790)]=Object[r(1224)]({buildMode:r(1203),buildTarget:r(1564)},t)},[{key:(T=u)(500),value:function(e){var r=T,t=this,n=(P.info(r(1310).concat(e)),{start:function(){return t.start()},installDeps:function(){return t[r(1448)]()},assembleHap:function(){return t[r(1771)]()},installHap:function(){return t[r(849)]()},assembleAndInstallHap:function(){return t[r(1225)]()},uninstall:function(){return t[r(1246)]()},clean:function(){return t[r(888)]()},stop:function(){return t[r(807)]()}});n[e]?n[e]()[r(2009)](function(){var e=r;return P.info(e(1146))})[r(1507)](function(e){var t=r;return P[t(1308)](t(1487),e)}):P.error(r(1986)+Object.keys(n)[r(1681)](","))}},{key:T(1327),value:function(e){var t=T;this[t(843)][t(1181)](e)}},{key:T(809),value:function(e){var t=T,e=this[t(843)].indexOf(e);-1!==e&&this[t(843)][t(548)](e,1)}},{key:T(807),value:function(){var e=T;this[e(564)]=!0,this[e(1362)]()}},{key:T(1362),value:function(){for(var e=T;this[e(843)][e(1468)];){var t=this.cpList[e(794)](),r=(i=n=r=void 0,t),n=u;if(r){var i=process[n(1295)];try{i===n(1029)?(0,Q[n(657)])("taskkill /pid "[n(1274)](r[n(784)]," /T /F")):i===n(1108)&&r[n(784)]?process[n(481)](r[n(784)]):r[n(481)]()}catch(e){m[n(1308)](n(1150),e)}}}}},{key:T(1775),value:function(){}},{key:T(731),value:(Ke=_asyncToGenerator(_regenerator().m(function e(t,o,s){var u=this;return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(r,n){var i,a=_0xa05d;u.stopping?n(a(1949)):(i=ue(t,o,function(e,t){if(u[a(809)](i),e)return n(e);r(t)},s),u[a(1327)](i))}))},e)})),function(e,t,r){return Ke[_0xa05d(1189)](this,arguments)})},{key:T(1568),value:(qe=_asyncToGenerator(_regenerator().m(function e(t,r){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,this.runCmdAsync(g(),t,r))},e,this)})),function(e,t){return qe[_0xa05d(1189)](this,arguments)})},{key:T(988),value:(Ze=_asyncToGenerator(_regenerator().m(function e(){var r,n;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:if(r=this[t(790)][t(1196)],P[t(522)](t(1724)[t(1274)](r)),n=this[t(790)][t(1153)]){e.n=2;break}return e.n=1,E[t(1835)]()[t(1658)]();case 1:n=e.v;case 2:return e.n=3,l(ve(r,n));case 3:return e.a(2)}},e,this)})),function(){return Ze[_0xa05d(1189)](this,arguments)})},{key:T(1448),value:(Me=_asyncToGenerator(_regenerator().m(function e(){var r;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return r=this[t(790)][t(1196)],P.info("start installDeps under "[t(1274)](r)),e.n=1,l(function(){return _e[u(1189)](this,arguments)}(r));case 1:return e.a(2)}},e,this)})),function(){return Me[_0xa05d(1189)](this,arguments)})},{key:T(1771),value:(He=_asyncToGenerator(_regenerator().m(function e(){var t,n,i,a;return _regenerator().w(function(e){for(var r=_0xa05d;;)switch(e.n){case 0:return t=this[r(790)].projectRoot,P[r(522)](r(1849).concat(t)),n=(new Date).getTime(),F.existsSync(I.resolve(t,r(2008)))||this.installDeps(),e.n=1,l(this[r(731)](_(),[r(1205)],{cwd:t}));case 1:return i=null==(i=de(t))||null==(i=i[r(684)])?void 0:i[r(841)](function(e){var t=r;return"".concat(e[t(1943)],t(1361))}),e.n=2,l(this.runCmdAsync(_(),["-m","module","-p",r(1379)[r(1274)](null==i?void 0:i[r(1681)](",")),r(1771),1<i.length?r(740):"",r(1187),r(1959),"--daemon","-p",r(868)],{chdir:!0,cwd:t}));case 2:(i=e.v)[r(579)]&&P.error("assembleHap err",i[r(579)]),a=Math[r(1009)](((new Date)[r(627)]()-n)/1e3),P[r(522)](r(1684)[r(1274)](a," s"));case 3:return e.a(2)}},e,this)})),function(){return He.apply(this,arguments)})},{key:"usingTmpDir",value:(Ue=_asyncToGenerator(_regenerator().m(function e(r,n){var i,a;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return i="/data/local/tmp/"+((new Date).getTime()+Math[t(1009)](1e3*Math.random())),e.n=1,l(this[t(1568)](["-t",r,t(857),"mkdir",i]));case 1:if((a=e.v)[t(579)])return P.error(t(934),a.err),e.a(2);e.n=2;break;case 2:return e.n=3,l(n(i));case 3:return(a=e.v)[t(579)]&&P.error(t(504),a[t(579)]),e.n=4,l(this[t(1568)](["-t",r,"shell","rm","-rf",i]));case 4:return e.a(2)}},e,this)})),function(e,t){return Ue.apply(this,arguments)})},{key:"installHap",value:(Ge=_asyncToGenerator(_regenerator().m(function e(){var n,r,o,i,s=this;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:if(n=this[t(790)][t(1196)],P[t(522)](t(1329)[t(1274)](n)),r=(new Date).getTime(),o=this[t(790)].deviceId){e.n=2;break}return e.n=1,E[t(1835)]()[t(1658)]();case 1:o=e.v;case 2:return e.n=3,l(this[t(742)](o,(()=>{var t=_asyncToGenerator(_regenerator().m(function e(i){var a,t;return _regenerator().w(function(e){for(var r=_0xa05d;;)switch(e.n){case 0:return t=null==(t=de(n))||null==(t=t[r(684)])?void 0:t[r(841)](function(e){var t=r;return I[t(595)](n,e[t(750)],t(1015)[t(1274)](e[t(1943)],"-default-signed.").concat(e[t(1943)]===t(644)?t(1140):t(612)))}),a=!1,e.n=1,Promise.all(null==t?void 0:t[r(841)]((()=>{var t=_asyncToGenerator(_regenerator().m(function e(r){var n;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:if(F[t(1686)](r)){e.n=1;break}return P.error(t(1582),r),a=!0,e.a(2);case 1:return e.n=2,l(s[t(1568)](["-t",o,t(1112),t(1813),r,i]));case 2:(n=e.v)[t(579)]&&(P[t(1308)](t(1267),n[t(579)]),a=!0);case 3:return e.a(2)}},e)}));return function(e){return t[_0xa05d(1189)](this,arguments)}})()));case 1:if(a)return e.a(2);e.n=2;break;case 2:return e.n=3,l(s.runHdcCmdAsync(["-t",o,r(857),"bm","install","-p",i]));case 3:if((t=e.v)[r(579)])return P[r(1308)](r(489),t[r(579)]),e.a(2);e.n=4;break;case 4:ve(n,o);case 5:return e.a(2)}},e)}));return function(e){return t[_0xa05d(1189)](this,arguments)}})()));case 3:i=Math[t(1009)](((new Date)[t(627)]()-r)/1e3),P[t(522)](t(1510)[t(1274)](i," s"));case 4:return e.a(2)}},e,this)})),function(){return Ge[_0xa05d(1189)](this,arguments)})},{key:"assembleAndInstallHap",value:(ze=_asyncToGenerator(_regenerator().m(function e(){var r;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return this[t(564)]=!1,e.n=1,E[t(1835)]().getDeviceId();case 1:if(e.v){e.n=2;break}return e.a(2);case 2:return e.n=3,l(this[t(1771)]());case 3:if((r=e.v).err)return P[t(1308)](t(658),r[t(579)]),e.a(2);e.n=4;break;case 4:return e.n=5,l(this[t(849)]());case 5:return e.a(2)}},e,this)})),function(){return ze[_0xa05d(1189)](this,arguments)})},{key:T(1246),value:(Le=_asyncToGenerator(_regenerator().m(function e(){var r,n,i;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:if(r=this[t(790)].projectRoot,P[t(522)](t(1411)[t(1274)](r)),n=this.options[t(1153)]){e.n=2;break}return e.n=1,E[t(1835)]()[t(1658)]();case 1:n=e.v;case 2:return i=w(r),e.n=3,l(this[t(1568)](["-t",n,"uninstall",i]));case 3:if((i=e.v)[t(579)])return P[t(1308)](t(1626),i[t(579)]),e.a(2);e.n=4;break;case 4:return e.a(2)}},e,this)})),function(){return Le[_0xa05d(1189)](this,arguments)})},{key:T(888),value:(Ne=_asyncToGenerator(_regenerator().m(function e(){var t,n;return _regenerator().w(function(e){for(var r=_0xa05d;;)switch(e.n){case 0:if(void 0===(t=this[r(790)][r(1196)]))return e.a(2);e.n=1;break;case 1:return e.n=2,function(){return ge[u(1189)](this,arguments)}(t);case 2:return e.n=3,function(){return me.apply(this,arguments)}(t);case 3:n=I.resolve(t,r(1912),"build",r(1176)),F.rm(n,{recursive:!0,force:!0},function(e){var t=r;e?console[t(1308)](t(919),e):console[t(1237)](t(1894))});case 4:return e.a(2)}},e,this)})),function(){return Ne.apply(this,arguments)})}]),R=t(require("process")),it=require(u(871)),at=t(require(u(1757))),ot={chrome:{darwin:u(1437),win32:u(421),linux:[u(1481),u(872),u(766)]},edge:{darwin:u(744),win32:u(708),linux:[u(1787),"microsoft-edge-dev"]}};function st(e,t){var r=u,n=R[r(1295)],i=null==(i=ot[e])?void 0:i[n];if(!i)throw new Error(""[r(1274)](e,r(1899)));var e=r(1294),a=[],o=[];n===r(1108)?(e=r(1294),o[r(1181)]("-a",i),/^(chrome|edge):/i[r(1428)](t)&&o[r(1181)](r(1021))):n===r(1029)&&(e="".concat(R.env[r(637)]||R[r(1392)][r(1920)]||"C:\\Windows",r(890)),o[r(1181)]("-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass",r(1950)),n=[r(1271)],i?(n[r(1181)](r(1059)[r(1274)](i,r(860))),t&&(a.push("--disable-web-security",r(1021)),a[r(1181)](t))):t&&n[r(1181)]('"'[r(1274)](t,'"')),0<a[r(1468)]&&(a=a[r(841)](function(e){return r(1059).concat(e,'`""')}),n[r(1181)]("-ArgumentList",a.join(","))),t=it.Buffer[r(1094)](n[r(1681)](" "),r(1585))[r(1116)]("base64")),t&&o[r(1181)](t),at[r(1227)](e,o)[r(801)]()}function ut(t){var r=u,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:r(421);try{st(n,t)}catch(e){st("chrome"===n?"edge":r(421),t)}}}),$e=zt(function(e,t){var _=_0xa05d,c=require(_(1293)),g=require("fs"),m=require("crypto"),y=Ye().jszip,b=kr(),h=require(_(1500)),l=_r(),w=mr(),k=kr(),d=yr(),x=(0,ye()[_(879)])(_(1276)),u="META-INF/CERT",s=_(1741),E={type:_(1558),compression:"DEFLATE",compressionOptions:{level:9}};function f(){var e=_;return(f=_asyncToGenerator(_regenerator().m(function e(t,r){var i,a,o;return _regenerator().w(function(e){for(var n=_0xa05d;;)switch(e.n){case 0:return i={},t[n(768)](function(e){var t=n,r=e.fileBuildPath,e=e.fileContentDigest;return i[r]=e[t(1116)](t(676))}),(a=new y)[n(1112)](s,JSON.stringify({algorithm:"SHA-256",digests:i})),e.n=1,a[n(1467)](E);case 1:return a=e.v,o={name:s,hash:b[n(763)](a)},e.n=2,b.signZipResource(a,[o],r);case 2:return e.a(2,e.v)}},e)})))[e(1189)](this,arguments)}function C(){return r[_(1189)](this,arguments)}function r(){var e=_;return(r=_asyncToGenerator(_regenerator().m(function e(t,r){var i,a,o,s;return _regenerator().w(function(e){for(var n=_0xa05d;;)switch(e.n){case 0:return i=t.fileList,a=new y,o=i[n(841)](function(e){var t=n;return{name:e[t(1477)],hash:e[t(802)]}}),e.n=1,function(){return f[_(1189)](this,arguments)}(i,r);case 1:return s=e.v,a[n(1112)](u,s),o.unshift({name:u,hash:b[n(763)](s)}),s=Object[n(1224)]({},E),i[n(768)](function(e){var t=n,r=e.fileBuildPath,e=e[t(1618)];a[t(1112)](r,e)}),e.n=2,a[n(1467)](s);case 2:return s=e.v,e.n=3,b[n(450)](s,o,r);case 3:return e.a(2,e.v)}},e)})))[e(1189)](this,arguments)}function a(){var e=_;return(a=_asyncToGenerator(_regenerator().m(function e(t,r,i,a,o){var s,u,c,f,h,l,d,v,p;return _regenerator().w(function(e){for(var n=_0xa05d;;)switch(e.n){case 0:return e.n=1,C(i,r);case 1:if(s=e.v,a[n(1468)]){e.n=2;break}return e.a(2,{rpkBuffer:s});case 2:if(u=new y,c=[],f=Object.assign({},E),o.disableSubpackages&&o[n(1888)]!==n(852)){e.n=4;break}return l=a[n(841)](function(e){return C(e,r)}),e.n=3,Promise[n(951)](l).catch(function(){new Error("ERROR: Rpk sign failed!")});case 3:e.v[n(768)](function(e,t){var r=n,t=""[r(1274)](a[t][r(1416)]);e[r(1468)],u.file(t,e),c.push({name:t,hash:b[r(763)](e)})}),e.n=6;break;case 4:return h=a[0],e.n=5,C(h,r)[n(1507)](function(){new Error(n(436))});case 5:l=e.v,d=""[n(1274)](h[n(1416)]),l.length,u[n(1112)](d,l),c[n(1181)]({name:d,hash:b[n(763)](l)});case 6:return e.n=7,u.generateAsync(f);case 7:return d=e.v,e.n=8,b[n(450)](d,c,r);case 8:return v=e.v,p=s,e.a(2,{rpksBuffer:v,rpkBuffer:p})}},e)})))[e(1189)](this,arguments)}function n(){return(n=_asyncToGenerator(_regenerator().m(function e(r,n){var i;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return i=g[t(1210)](n),e.n=1,b[t(450)](i,[],r);case 1:return i=e.v,e.a(2,{apkBuffer:i})}},e)}))).apply(this,arguments)}function v(e,t,r,n){var i=_;e[i(1518)][i(1181)]({fileBuildPath:t,fileContentBuffer:r,fileContentDigest:n})}function i(e){var t,r,n,i,a,o,s,u=_,e=e[u(1339)](/^(\d{2}|\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(|\.\d+)Z$/);if(e)return o=e[1],s=parseInt(o),2===o[u(1468)]&&(50<=s&&s<100?s=1900+s:0<=s&&s<50&&(s=2e3+s)),o=parseInt(e[2])-1,t=parseInt(e[3]),r=parseInt(e[4]),n=parseInt(e[5]),i=parseInt(e[6]),a=0,""!==(e=e[7])&&(e=(e[u(993)](1)+"00").substr(0,3),a=parseInt(e)),Date[u(1248)](s,o,t,r,n,i,a);throw new Error(u(935))}function A(e,t,r){return o[_(1189)](this,arguments)}function o(){var e=_;return(o=_asyncToGenerator(_regenerator().m(function e(r,n,i){var a,o,s,u,c,f=arguments;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:if(o=3<f[t(1468)]&&void 0!==f[3]?f[3]:{},a={signOnline:null!=i,privateKey:n,onlineConfig:i},o&&o[t(1118)]&&o[t(1352)])return e.n=1,d[t(690)](o);e.n=2;break;case 1:r=e.v,a.type="dss";case 2:return(o=new h[t(704)])[t(507)](r[t(1116)]()),s=h[t(1450)][t(1113)](o[t(1430)]()),u=Buffer[t(1094)](l[t(1758)][t(1023)](r)),c=Buffer.alloc(u.length+4),e.a(2,(c[t(1993)](u.length,0),u[t(796)](c,4),a[t(1996)]={content:r,obj:{len:c[t(1468)],buffer:c},pemBuffer:Buffer[t(1094)](l[t(1758)][t(1023)](s))},a))}},e)})))[e(1189)](this,arguments)}function p(e){var t=_,r=new h.X509,e=(r[t(507)](e),r[t(867)]()),r=Buffer.from(e,t(676))[t(1116)]("base64"),e=k[t(763)](r);return Buffer[t(1094)](e)[t(1116)](t(676))}function S(){var e=_;return(S=_asyncToGenerator(_regenerator().m(function e(s){var u,c,f,h,l,d,v,p;return _regenerator().w(function(e){for(var t,r,n,i,a,o=_0xa05d;;)switch(e.n){case 0:if(s&&g[o(1686)](s)){e.n=1;break}throw new Error(o(530)+s);case 1:if(u=g[o(1210)](s),w.checkZipBuffer(u)){e.n=2;break}throw new Error(o(1688));case 2:if((c=w.parserZip(u,!0))[o(653)][o(482)].tag){e.n=3;break}throw new Error(o(576));case 3:if(f=k[o(1922)](u,c[o(653)][o(482)]),h=k[o(1947)](f)){e.n=4;break}throw new Error(o(921));case 4:return l=f.data[0][o(1407)][o(1278)][0][o(1763)][o(1278)][0][o(871)],d=[],t=u,a=i=n=void 0,r=(r=c)[(n=_)(653)],i=Buffer.alloc(r[n(623)][n(1958)]+r[n(754)].len+r[n(1534)][n(1958)]),a=0,t[n(796)](i,0,r.header[n(1306)],r[n(623)][n(1306)]+r[n(623)].len),a+=r[n(623)][n(1958)],t[n(796)](i,a,r[n(754)][n(1306)],r[n(754)][n(1306)]+r.central.len),a+=r[n(754)][n(1958)],t.copy(i,a,r.footer[n(1306)],r.footer[n(1306)]+r[n(1534)].len),i[n(1993)](r[n(623)][n(1958)],i.length-6),v=i,e.n=5,A(h);case 5:return p=e.v,e.n=6,b[o(992)](v,d,p);case 6:p=e.v,m.createVerify("RSA-SHA256")[o(1318)](p)[o(1120)](h,l)||(x.error(o(1995)),process[o(549)](-1));case 7:return e.a(2)}},e)})))[e(1189)](this,arguments)}t[_(1583)]={generatePkgDef:function(){var t=_,e=0<arguments[t(1468)]&&void 0!==arguments[0]?arguments[0]:[],r=[],n={pkgName:t(979),fileList:[]},i={pkgName:t(647),fileList:[]};return e.forEach(function(e){e=e[t(1782)];r.push({pkgName:"".concat(e,".sspk"),fileList:[],root:e})}),{mainPkg:n,subPkgs:e.length?[i].concat(r):[i]}},addResourceToPkg:function(e,t,r,s){var u=_;e[u(768)](function(n){var i,a=u,e=g[a(1210)](c[a(1681)](t,n)),o=[n,e,b.getBufferSha256(e)];v[a(1189)](void 0,[r][a(1274)](o)),s[a(1468)]&&(i=!0,s[a(1740)](1)[a(768)](function(e){var t=a,r=n[t(1660)]("/");r[0]===e[t(1584)]&&(o[0]=r[t(1740)](1)[t(1681)]("/"),v[t(1189)](void 0,[e][t(1274)](o)),i=!1)}),i)&&v[a(1189)](void 0,[s[0]].concat(o))})},signPkgs:function(e,t,r,n,i){return a[_(1189)](this,arguments)},DIGEST_PATH:u,getResources:function(e){var t=_;return function n(i,a){var o=_0xa05d,s=[],u=c.posix[o(1681)](i,a);return g[o(840)](u)[o(768)](function(e){var t=o,r=c[t(1955)][t(1681)](u,e),e=c.posix[t(1681)](a,e);g[t(922)](r)[t(589)]()?s[t(1181)](e):s=s.concat(n(i,e))}),s}(e,".")[t(1486)](function(e){return e!==u})},checkValidity:function(e){(t=new h[(r=_)(704)]).readCertPEM(String(e));var e=i(t[r(1214)]()),t=i(t[r(1249)]()),r=Number(new Date);return{validityDays:Number(e-r)/864e5,isInvalid:0<Number(t)-r}},getSignInfo:A,getApkSignInfo:function(e){var t=_,r={signOnline:!1,onlineConfig:null},n=((n=new h[t(704)]).readCertPEM(e.toString()),h.KEYUTIL[t(1113)](n[t(1430)]())),i=Buffer.from(l[t(1758)][t(1023)](e)),a=Buffer[t(678)](i[t(1468)]+4);return a.writeInt32LE(i[t(1468)],0),i[t(796)](a,4),r[t(1996)]={content:e,obj:{len:a.length,buffer:a},pemBuffer:Buffer.from(l.Base64[t(1023)](n))},r},getSignedZipCertFp:function(e){return S[_(1189)](this,arguments)},getCertFp:function(e){var t=_;if(g[t(1686)](e))return p(g[t(1210)](e).toString());console.error(t(1231))},signFullApk:function(e,t){return n.apply(this,arguments)},getCertString:function(e){var t=_;if(!e||!g.existsSync(e))throw new Error("No srpk file : "+e);if(e=g[t(1210)](e),!w[t(1832)](e))throw new Error(t(1688));var r=w[t(1549)](e,!0);if(!r[t(653)][t(482)][t(1084)])throw new Error(t(576));if(e=k[t(1922)](e,r[t(653)][t(482)]),r=k[t(1947)](e))return p(r);throw new Error(t(921))}}}),be=zt(function(e,t){var f=_0xa05d,h=require("path"),l=require("fs"),n=require(f(574)),i=require(f(2013)),d=require("decompress"),r=f(1296),a=f(1614),o=f(1019),s=f(1311),u=f(539),c=f(1781),v=(0,ye()[f(879)])(f(739)),p=require("child_process"),_=p[f(1823)],g=p[f(1664)];function m(e){var t,r=f,n=h[r(595)](e,"build-profile.json5");if(!l[r(1686)](n))return h.join(e,"entry");n=y(n);if(0<(null==n||null==(t=n[r(684)])?void 0:t.length))return h[r(1681)](e,n[r(684)][0].srcPath);throw new Error("getEntryPkgPath error, build-profile.json5 file modules is null")}function y(t){var r=f;if(!l[r(1686)](t))return{};var e={};try{e=n[r(851)](l[r(1210)](t,r(1281))[r(1116)]()||"{}")}catch(e){throw new Error(r(874).concat(t,":")[r(1274)](e[r(1380)],":")[r(1274)](e[r(1333)]," "))}return e}var b=function(e){var r=f;return Promise[r(951)](e.map(function(t){if(l[r(1686)](t))return new Promise(function(e){i.sync(t),e()})}))};function w(){var e=f;return(w=_asyncToGenerator(_regenerator().m(function e(r,n){var i,a,o,s,u,c,f;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,d(r,n);case 1:a=l[t(840)](n,{withFileTypes:!0}),i=[],a=_createForOfIteratorHelper(a),e.p=2,a.s();case 3:if((f=a.n())[t(1594)])e.n=9;else{if(o=f[t(1407)],s=h[t(595)](h[t(1681)](n,o.name)),u="",o[t(1943)]===t(647))return e.n=4,d(s,n);e.n=5}break;case 4:u=h[t(595)](h[t(1681)](n,t(1752))),e.n=7;break;case 5:return c=o[t(1943)].split(".")[0],e.n=6,d(s,h[t(595)](n,c));case 6:u=h.resolve(h.resolve(n,c,t(1752)));case 7:i.push(u),l[t(1850)](s);case 8:e.n=3;break;case 9:e.n=11;break;case 10:e.p=10,f=e.v,a.e(f);case 11:return e.p=11,a.f(),e.f(11);case 12:return e.n=13,b(i);case 13:e.n=15;break;case 14:throw e.p=14,e.v;case 15:return e.a(2)}},e,null,[[2,10,11,12],[0,14]])})))[e(1189)](this,arguments)}t[f(1583)]={RAWFILE_DIR:r,ASCF_BUILD:a,ASCF_CONFIG_JSON:o,P12_PATH:s,QUICK_SERVICE_BUILD:u,DIST_PATH:c,getManifestData:function(e){var t=f;return y(h[t(595)](m(e),r,t(1190)))},getEntryPkgPath:m,readJsonFile:y,clearResource:b,copyDirectory:function e(t,r){var n,i=f;if(l[i(527)](r,{recursive:!0}),l[i(922)](t)[i(589)]())n=h[i(1681)](r,h[i(862)](t)),l.copyFileSync(t,n);else{var a,o=_createForOfIteratorHelper(l[i(840)](t,{withFileTypes:!0}));try{for(o.s();!(a=o.n())[i(1594)];){var s=a[i(1407)],u=h[i(595)](h[i(1681)](t,s[i(1943)])),c=h[i(1681)](r,s[i(1943)]);s[i(1746)]()?e(u,c):l[i(1632)](u,c)}}catch(e){o.e(e)}finally{o.f()}}},mkdirsSync:function e(t){var r=f;if(!l[r(1686)](t)){if(l[r(1686)](h.dirname(t))||!e(h[r(846)](t)))return l[r(527)](t);print(r(438).concat(t))}},formatHexString:function(e){var t=f;if(64!==e[t(1468)])throw new Error(t(1562));for(var r="",n=0;n<e[t(1468)];n+=2)r+=e[t(993)](n,2)+":";return r[t(1740)](0,-1)[t(1725)]()},extractspk:function(e,t){return w[f(1189)](this,arguments)},deleteDirectory:function r(n){var i=f;l[i(1686)](n)&&(l[i(840)](n)[i(768)](function(e){var t=i,e=h[t(1681)](n,e);l[t(1256)](e)[t(1746)]()?r(e):l[t(1850)](e)}),l[i(1846)](n))},executeCommand:function(a){var o=/^mac verified ok/i;return new Promise(function(t,r){var e,n=_0xa05d,i=_(a);null!=(e=i[n(693)])&&e.on("data",function(e){v[n(1203)](e)}),null!=(e=i[n(1808)])&&e.on(n(1278),function(e){var t=n;!e[t(1339)](o)&&a[t(986)](t(1698))&&r(e)}),null!=(e=i.stderr)&&e.on("error",function(e){r(e)}),i.on(n(1305),function(e){t(e)})})},checkOpenSSL:function(e){var t=f;if(0===(e=g(e,["version"],{encoding:t(1281)}))[t(1792)])return v.debug(e.stdout),!0;throw new Error("Please install openssl or configure PATH."+e.stderr)},validatePassword:function(){var e,t=f,r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";return!(r[t(1468)]<8)&&(e=0,/[a-z]/[t(1428)](r)&&e++,/[A-Z]/.test(r)&&e++,/[0-9]/[t(1428)](r)&&e++,/[`~!@#$%^&*()\-_=+\\|[{}];:'",<.>\/?]/[t(1428)](r)&&e++,2<=e)}}}),zr=zt(function(e,t){var r=_0xa05d,n=require(r(1293)),i=require("os"),a=be().checkOpenSSL,o=i[r(1295)](),s=(0,ye().getLogger)(r(1412)),u=!1;t.exports={getOpensslPath:function(){var e=r,t=e(1412);return o===e(1029)&&(t=n[e(1681)](__dirname,"../tools/release_64/bin/openssl.exe")),u||(s.debug(t),u=a(t)),t},getOpensslConfig:function(){var e=r,t="";return t=o===e(1029)?e(1988)[e(1274)](n.join(__dirname,e(1053))):t}}}),Ui=zt(function(j,e){var d,h=_0xa05d,f=require(h(1221)),v=require(h(1293)),p=require("fs"),s=Ye()[h(1255)],_=$e(),t=ye()[h(879)],r=be(),g=r[h(493)],m=r.ASCF_BUILD,y=r.clearResource,b=r[h(1017)],w=r.getEntryPkgPath,k=r[h(1390)],N=r[h(1629)],x=r[h(1133)],l=r.P12_PATH,L=r.QUICK_SERVICE_BUILD,z=r[h(1580)],E=r[h(1406)],C=zr()[h(1768)],A=t(h(728)),c=100,G=1e4,U=0;function S(){return n[h(1189)](this,arguments)}function n(){return(n=_asyncToGenerator(_regenerator().m(function e(r,n){var i,a,o;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return i=v[t(595)](r,x),e.n=1,function(){return D[h(1189)](this,arguments)}(n,r,i);case 1:return a=e.v,e.n=2,function(){return u[h(1189)](this,arguments)}(n,r,i);case 2:return o=e.v,e.a(2,_[t(732)](o,a,d))}},e)}))).apply(this,arguments)}function u(){return(u=_asyncToGenerator(_regenerator().m(function e(a,o,s){var u,c,f;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:if(u="",p[t(1686)](a.signPublicKeyPath)&&(A[t(1203)](t(1110)),u=p[t(1210)](a[t(1559)])),!u&&p[t(1686)](a[t(1937)]))return A[t(1203)](t(2017)),e.n=1,R(a[t(1937)],I(a[t(1370)]));e.n=2;break;case 1:u=e.v;case 2:u||!p[t(1686)](s)?e.n=5:(c=null==(c=JSON[t(851)](p[t(1210)](s)[t(1116)]()))?void 0:c[t(998)],p.existsSync(null==c?void 0:c.publicKeyPath)?(A[t(1203)]("Obtain the public key from the ascf.config.json publicKeyPath"),u=p[t(1210)](c[t(449)]),e.n=5):e.n=3);break;case 3:if(p[t(1686)](null==c?void 0:c[t(1198)]))return A.debug(t(1511)),e.n=4,R(c.profilePath,I(a.signPwd));e.n=5;break;case 4:u=e.v;case 5:if(f=v[t(595)](o,t(1733)),!u&&p[t(1686)](f)&&(A[t(1203)](t(1683)[t(1274)](f)),u=p[t(1210)](f)),f=v[t(595)](o,l),!u&&p[t(1686)](f))return A[t(1203)](t(786)),e.n=6,R(f,I(a[t(1370)]));e.n=7;break;case 6:u=e.v;case 7:u||(A[t(1308)](t(1398)),process[t(549)](-1)),i=n=r=void 0;var r=u,n=h,i=(r=_[n(1665)](r)).validityDays,r=r[n(1371)];if(i<0||r)throw new Error(n(628));return i<180&&A[n(1165)]("WARNING: Your certificate is valid for less than 180 days. Please update it in time."),e.a(2,u)}},e)}))).apply(this,arguments)}function D(){var e=h;return(D=_asyncToGenerator(_regenerator().m(function e(r,n,i){var a,o,s;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:if(a="",p[t(1686)](r[t(917)])&&(A.debug(t(1774)),a=p.readFileSync(r.signPrivateKeyPath)),!a&&p[t(1686)](r[t(1937)]))return A[t(1203)]("Obtain the private key using the p12 file path specified by the parameter"),e.n=1,P(r[t(1937)],I(r.signPwd));e.n=2;break;case 1:a=e.v;case 2:a||!p[t(1686)](i)?e.n=5:(o=null==(o=JSON[t(851)](p[t(1210)](i)[t(1116)]()))?void 0:o.signConfig,p[t(1686)](null==o?void 0:o.privateKeyPath)?(A.debug(t(926)),a=p[t(1210)](o[t(1876)]),e.n=5):e.n=3);break;case 3:if(p[t(1686)](null==o?void 0:o[t(1198)]))return A.debug(t(499)),e.n=4,P(o[t(1198)],I(r[t(1370)]));e.n=5;break;case 4:a=e.v;case 5:if(s=v[t(595)](n,t(1802)),!a&&p[t(1686)](s)&&(A[t(1203)](t(1365).concat(s)),a=p[t(1210)](s)),s=v[t(595)](n,l),!a&&p.existsSync(s))return A[t(1203)](t(1179)),e.n=6,P(s,I(r[t(1370)]));e.n=7;break;case 6:a=e.v;case 7:return a||(A[t(1308)]("failed to obtain the private key, please ensure private.pem or ascf-build.p12 under sign"),process[t(549)](-1)),e.a(2,a)}},e)})))[e(1189)](this,arguments)}function O(){return i.apply(this,arguments)}function i(){var e=h;return(i=_asyncToGenerator(_regenerator().m(function e(o,t,s,u){return _regenerator().w(function(e){for(var t,r,n,i,a=_0xa05d;;)if(0===e.n)return e.a(2,(p.existsSync(o)||p[a(527)](o),t=s[a(1490)],r=o,i=void 0,(n=u)[(i=h)(1468)]>c&&(n=n[i(1740)](0,c)),r=v.join(r,n),p.writeFileSync(r,t),A[i(522)](i(1403).concat(r)),r))},e)})))[e(1189)](this,arguments)}function B(e){var t=h;if(!e[t(1799)]||!e[t(1799)][t(1528)](t(689)))throw new Error(t(695));if(!e[t(632)]||!e[t(1591)])throw new Error(t(1811))}function T(e){var t=h,r=(new Date)[t(1923)]()[t(1660)]("T")[0][t(1660)]("-").join(""),n="production"===process[t(1392)][t(1071)]?t(914):t(1203);return""[t(1274)](e[t(1799)],"-")[t(1274)](e[t(1591)],"-")[t(1274)](n,"-")[t(1274)](r,".spk")}function a(){var e=h;return(a=_asyncToGenerator(_regenerator().m(function e(i,t){var r,a,o,s,u,c,f,h,l;return _regenerator().w(function(e){for(var n=_0xa05d;;)switch(e.n){case 0:if(r=v[n(1681)](i,x),(d=(p.existsSync(r)?require(r):{})[n(482)])&&!d[n(859)])throw new Error(n(571));e.n=1;break;case 1:return e.n=2,S(i,t);case 2:if(a=e.v){e.n=3;break}throw new Error(n(804));case 3:return o=v.resolve(i,z),s=v[n(595)](i,L),e.n=4,y([s]);case 4:if(B(u=k(i)),c=T(u),null!=(r=u[n(1317)])&&r[n(768)](function(e){var t=n,r=v[t(595)](i,m,e[t(1782)],g);b(r,v[t(595)](s,e[t(1782)]))}),b(v[n(595)](w(i),g),s),h=_[n(1314)](u.subpackages),f=h.mainPkg,h=h[n(1739)],(l=0<(l=[]).length?l:_[n(1600)](s))[n(1468)]){e.n=5;break}throw new Error(n(1762));case 5:return e.a(2,(_.addResourceToPkg(l,s,f,h),_.signPkgs("",a,f,h,t)[n(2009)]((()=>{var t=_asyncToGenerator(_regenerator().m(function e(t){var r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,O(o,u.subpackages,t,c);case 1:if(r=e.v,"release"===u.versionType)return e.n=2,F(r);e.n=2;break;case 2:return e.a(2,r)}},e)}));return function(e){return t[_0xa05d(1189)](this,arguments)}})())))}},e)})))[e(1189)](this,arguments)}function o(){var e=h;return(o=_asyncToGenerator(_regenerator().m(function e(r,n,i,a){var o,s,u,c,f,h,l;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return o={signPrivateKeyPath:i,signPublicKeyPath:n,disableSubpackages:!1},e.n=1,S("",o);case 1:if(s=e.v,h=v.resolve(r,"manifest.json"),u=N(h),c=T(u),B(u),h=_[t(1314)](u.subpackages),f=h[t(460)],h=h[t(1739)],(l=0<(l=[])[t(1468)]?l:_.getResources(r)).length){e.n=2;break}throw new Error(t(1762));case 2:_[t(1199)](l,r,f,h),a=null!=a?a:v[t(595)](r,t(764)),_[t(821)]("",s,f,h,o)[t(2009)]((()=>{var t=_asyncToGenerator(_regenerator().m(function e(r){var n;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return e.n=1,O(a,u[t(1317)],r,c);case 1:if(n=e.v,u.versionType===t(914))return e.n=2,F(n);e.n=2;break;case 2:return e.a(2,n)}},e)}));return function(e){return t[_0xa05d(1189)](this,arguments)}})());case 3:return e.a(2)}},e)})))[e(1189)](this,arguments)}function F(e){var t=h,r=Te(),o=r[t(415)],r=r[t(1597)];if(p[t(922)](e).size>r)throw new Error(t(937)[t(1274)](r/1024/1024,t(1401)));return new Promise(function(i,a){var n=t;p[n(562)](e,function(e,t){var r=n;if(e)return a(e);s[r(1167)](t)[r(2009)](function(e){var n=null;if(e.forEach(function(e,t){var r=_0xa05d;if(G<++U)throw r(854);!n&&t[r(416)][r(1425)]>o&&(n=new Error(r(1650)[r(1274)](o/1024/1024,r(1401))))}),n)return a(n);i()})})})}function I(e){var t=h,e=null!=e?e:process[t(1392)][t(557)];return e||(A[t(1308)](t(601)),process[t(549)](-1)),e}function P(u,c){return new Promise((r=_asyncToGenerator(_regenerator().m(function e(r,n){var i,a,o,s;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.p=e.n){case 0:return A[t(1203)](t(1734)),i=f[t(1540)](16)[t(1116)](t(676)),a=f[t(1540)](16)[t(1116)](t(676)),e.p=1,o=""[t(1274)](C(),t(669)).concat(u,t(1432))[t(1274)](i,t(1143)).concat(c),A[t(1203)]("".concat(C(),t(669)).concat(u," -nocerts -nodes -out ").concat(i,t(995))),e.n=2,E(o);case 2:return o="".concat(C(),t(1393))[t(1274)](i,t(1919))[t(1274)](a),A[t(1203)]("".concat(C()," ec -in ")[t(1274)](i," -check -out ")[t(1274)](a)),e.n=3,E(o);case 3:return p[t(1686)](i)&&p[t(1850)](i),s="",e.a(2,(p[t(1686)](a)&&(s=p[t(1210)](a),p[t(1850)](a)),A.debug("Obtaining the private key is complete."),r(s)));case 4:e.p=4,s=e.v,p[t(1686)](i)&&p.unlinkSync(i),p.existsSync(a)&&p[t(1850)](a),n("Failed to obtain the private key: "[t(1274)](s));case 5:return e.a(2)}},e,null,[[1,4]])})),function(e,t){return r[_0xa05d(1189)](this,arguments)}));var r}function R(s,u){return new Promise((r=_asyncToGenerator(_regenerator().m(function e(r,n){var i,a,o;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.p=e.n){case 0:return i=f[t(1540)](16)[t(1116)]("hex"),e.p=1,a=""[t(1274)](C(),t(669))[t(1274)](s," -nokeys -clcerts -passin pass:")[t(1274)](u,t(973))[t(1274)](C(),t(1114))[t(1274)](i),A.debug(""[t(1274)](C(),t(669)).concat(s,t(1921))[t(1274)](C()," x509 -out ").concat(i)),e.n=2,E(a);case 2:if(p[t(1686)](i))return a=p[t(1210)](i),e.a(2,(p[t(1850)](i),r(a)));e.n=3;break;case 3:e.n=5;break;case 4:e.p=4,o=e.v,p[t(1686)](i)&&p[t(1850)](i),n("Failed to obtain the cert key: ".concat(o));case 5:return e.a(2)}},e,null,[[1,4]])})),function(e,t){return r.apply(this,arguments)}));var r}e[h(1583)]={signSpk:function(e,t){return a[h(1189)](this,arguments)},resignSpk:function(e,t,r,n){return o.apply(this,arguments)}}}),Wi=zt(function(e,t){var r=_0xa05d,s=(require("path"),require("fs")),n=ye()[r(879)],i=be(),u=i[r(1406)],c=i[r(1985)],i=zr(),f=i[r(1768)],o=i.getOpensslConfig,h=n(r(1043));function a(){return(a=_asyncToGenerator(_regenerator().m(function e(r,n){var i,a;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.p=e.n){case 0:if(s[t(1686)](r)||s.existsSync(n))throw new Error("".concat(r,t(1769))[t(1274)](n,t(1141)));e.n=1;break;case 1:return e.p=1,i=""[t(1274)](f(),t(792))[t(1274)](r),h[t(1203)](i),e.n=2,u(i);case 2:return i=""[t(1274)](f(),t(652))[t(1274)](r,t(1262))[t(1274)](n,' -days 3650 -sha256 -subj "/CN=ASCF/OU=/O=/L=/ST=/C=CN" ')[t(1274)](o()),h[t(1203)](i),e.n=3,u(i);case 3:e.n=5;break;case 4:e.p=4,a=e.v,h[t(1308)](t(1599),a),s[t(1686)](tempKeyPath)&&s[t(1850)](tempKeyPath),s.existsSync(tempCertPath)&&s[t(1850)](tempCertPath);case 5:return e.a(2)}},e,null,[[1,4]])}))).apply(this,arguments)}function l(){var e=r;return(l=_asyncToGenerator(_regenerator().m(function e(r,n,i,a){var o;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.p=e.n){case 0:if(c(a)){e.n=1;break}throw new Error(t(1721));case 1:if(s.existsSync(r))throw new Error(""[t(1274)](r,t(1141)));e.n=2;break;case 2:return e.p=2,o=""[t(1274)](f()," pkcs12 -export -out ").concat(r,t(735))[t(1274)](n," -in ").concat(i,t(967))[t(1274)](a),h[t(1203)](""[t(1274)](f(),t(1538)).concat(r," -inkey ")[t(1274)](n,t(451)).concat(i,t(1303))),e.n=3,u(o);case 3:e.n=5;break;case 4:e.p=4,o=e.v,h[t(1308)]("Failed to generate p12",o),s.existsSync(r)&&s[t(1850)](r);case 5:return e.a(2)}},e,null,[[2,4]])})))[e(1189)](this,arguments)}t[r(1583)]={genCert:function(e,t){return a[r(1189)](this,arguments)},genP12:function(e,t,r,n){return l.apply(this,arguments)}}}),Zi=zt(function(e){var r=_0xa05d,i=require(r(1293)),a=require(r(1330)),o=$e()[r(1080)],t=be(),s=t[r(1284)],u=t[r(1320)];function n(){var e=r;return(n=_asyncToGenerator(_regenerator().m(function e(r,n){return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return n=null!=n?n:i[t(595)](i.dirname(r),t(764)),e.n=1,o(r);case 1:return e.n=2,s([n]);case 2:return e.n=3,a(r,n);case 3:u(i[t(595)](n,t(1752)));case 4:return e.a(2)}},e)})))[e(1189)](this,arguments)}e[r(1218)]=function(e,t){return n[r(1189)](this,arguments)}}),Xi=zt(function(e,t){var v=_0xa05d,g=require("fs"),m=require(v(1293)),a=Ye()[v(1255)],r=be(),y=r[v(1892)],p=r[v(566)],_=r[v(1284)],b=$e(),o="manifest.json",w="";function k(){var e=v;return(k=_asyncToGenerator(_regenerator().m(function e(r,n,i,a){var o,s,u,c,f,h,l,d,v,p,_;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return y(n),o=r[t(1799)],s=r[t(722)],u=r[t(1591)],v=a.privateKeyFilePath,f=a.certFilePath,f=g[t(1210)](f),v=g.readFileSync(v),e.n=1,b.getSignInfo(f,v);case 1:if(c=e.v,f=b[t(1314)](r[t(1317)]),h=f[t(460)],l=f[t(1739)],(d=0<(d=[]).length?d:b[t(1600)](i))[t(1468)]){e.n=2;break}throw new Error(t(1762));case 2:return b[t(1199)](d,i,h,l),e.n=3,b[t(821)](o,c,h,l,{disableSubpackages:!1});case 3:v=e.v,p=v.rpksBuffer,_=(new Date).toISOString()[t(1660)]("T")[0][t(1660)]("-").join(""),w=m[t(1681)](n,""[t(1274)](o,"-")[t(1274)](u,"-")[t(1274)](s,"-")[t(1274)](_,t(981))),g[t(1334)](w,p);case 4:return e.a(2)}},e)})))[e(1189)](this,arguments)}function x(){return(x=_asyncToGenerator(_regenerator().m(function e(r){var n,i;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.n){case 0:return e.n=1,(new a)[t(1167)](g[t(1210)](r));case 1:if((n=e.v)[t(1570)][t(647)]){e.n=2;break}throw new Error(t(1722));case 2:return e.n=3,n[t(1570)][t(647)][t(1350)](t(1558));case 3:return i=e.v,e.n=4,(new a).loadAsync(i);case 4:return e.n=5,e.v[t(1112)](o)[t(1350)](t(1265));case 5:return i=e.v,e.a(2,JSON[t(851)](i)||{})}},e)}))).apply(this,arguments)}t[v(1583)]={spkHandler:function(c,f,h,l,d){return new Promise((r=_asyncToGenerator(_regenerator().m(function e(i,a){var o,s,u;return _regenerator().w(function(e){for(var t,r,n=_0xa05d;;)switch(e.n){case 0:if(g[n(1686)](c)){e.n=1;break}return e.a(2,a(new Error(n(987).concat(c))));case 1:if(g[n(1686)](f)){e.n=2;break}return e.a(2,a(new Error(n(437)[n(1274)](f))));case 2:if(g[n(1686)](h)){e.n=3;break}return e.a(2,a(new Error("Can not resolve private key file: "[n(1274)](h))));case 3:return e.n=4,function(){return x[v(1189)](this,arguments)}(c);case 4:if(o=e.v,t=o,r=void 0,r=v,0===Object.keys(t)[r(1468)])return e.a(2,a(new Error("Invalid spk file.")));e.n=5;break;case 5:return s=o[n(1799)],u=m.dirname(c),u=m.join(u,s),s=m.join(null!=l?l:u,n(702)),u=m[n(1681)](null!=l?l:u,n(764)),e.n=6,_([s,u]);case 6:return y(s),e.n=7,p(c,s);case 7:return o.versionType=null!=d?d:o[n(722)],g[n(1334)](m[n(595)](s,n(1190)),JSON.stringify(o,null,2)),e.n=8,function(){return k[v(1189)](this,arguments)}(o,u,s,{privateKeyFilePath:h,certFilePath:f});case 8:return e.a(2,i(w))}},e)})),function(e,t){return r[_0xa05d(1189)](this,arguments)}));var r}}}),_Ui=Ui(),jl=_Ui[_0x24ee6a(1524)],Hl=_Ui.resignSpk,_Wi=Wi(),$l=_Wi[_0x24ee6a(1901)],Ml=_Wi[_0x24ee6a(1819)],_be6=be(),ql=_be6[_0x24ee6a(1679)],_Zi=Zi(),Ul=_Zi.verifySignHandler,_ye6=ye(),Vl=_ye6.getLogger,_Xi=Xi(),Wl=_Xi.spkHandler,_$e2=$e(),Kl=_$e2.getCertString,jt=Vl("index");function Zl(e,t){return _Zl[_0x24ee6a(1189)](this,arguments)}function _Zl(){var e=_0x24ee6a;return(_Zl=_asyncToGenerator(_regenerator().m(function e(r,n){var i;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.p=e.n){case 0:return e.p=0,jt[t(522)]("start exec sign spk"),e.n=1,jl(r,n);case 1:return i=e.v,e.a(2,(jt[t(522)](t(1410)),i));case 2:e.p=2,i=e.v,jt[t(1206)]("Signing failed: "+i),process[t(549)](-1);case 3:return e.a(2)}},e,null,[[0,2]])})))[e(1189)](this,arguments)}function Gl(e,t,r,n){return _Gl[_0x24ee6a(1189)](this,arguments)}function _Gl(){var e=_0x24ee6a;return(_Gl=_asyncToGenerator(_regenerator().m(function e(r,n,i,a){var o;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.p=e.n){case 0:return e.p=0,jt[t(522)](t(1156)),e.n=1,Hl(r,n,i,a);case 1:jt[t(522)]("Signed successfully."),e.n=3;break;case 2:e.p=2,o=e.v,jt.fatal("Signing failed: "+o),process[t(549)](-1);case 3:return e.a(2)}},e,null,[[0,2]])})))[e(1189)](this,arguments)}function Jl(e,t){return _Jl[_0x24ee6a(1189)](this,arguments)}function _Jl(){var e=_0x24ee6a;return(_Jl=_asyncToGenerator(_regenerator().m(function e(r,n){var i;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.p=e.n){case 0:return e.p=0,jt[t(522)]("start exec verify sign"),e.n=1,Ul(r,n);case 1:jt.info(t(510)),e.n=3;break;case 2:e.p=2,i=e.v,jt.info(t(1638),i),process[t(549)](-1);case 3:return e.a(2)}},e,null,[[0,2]])})))[e(1189)](this,arguments)}function Yl(e,t,r,n,i){return _Yl[_0x24ee6a(1189)](this,arguments)}function _Yl(){var e=_0x24ee6a;return(_Yl=_asyncToGenerator(_regenerator().m(function e(r,n,i,a,o){var s;return _regenerator().w(function(e){for(var t=_0xa05d;;)switch(e.p=e.n){case 0:return e.p=0,jt[t(522)]("start exec repack"),e.n=1,Wl(r,n,i,a,o);case 1:s=e.v,jt.info("exec repack success, repack package path: "+s),e.n=3;break;case 2:e.p=2,s=e.v,jt[t(1206)](t(1442)+s),process[t(549)](-1);case 3:return e.a(2)}},e,null,[[0,2]])})))[e(1189)](this,arguments)}function Xl(e){var t=_0x24ee6a;try{jt[t(522)](t(1e3));var r=Kl(e),n=ql(r);jt.info(t(1171)+n)}catch(e){jt.fatal("failed to obtain the fingerprint: "+e),process[t(549)](-1)}}process.on(_0x24ee6a(1631),function(e){var t=_0x24ee6a;jt[t(1308)](t(1759),e)}),process.on(_0x24ee6a(1648),function(e,t){var r=_0x24ee6a;jt.error(r(463),t,"reason:",e)}),module[_0x24ee6a(1583)]={signPkg:Zl,resignPkg:Gl,verifySign:Jl,repackHandler:Yl,printFp:Xl,genCert:$l,genP12:Ml};
|
|
1
|
+
function ownKeys(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _regenerator(){var p,e="function"==typeof Symbol?Symbol:{},t=e.iterator||"@@iterator",r=e.toStringTag||"@@toStringTag";function n(e,t,r,n){var i,a,o,s,c,u,l,f,h,t=t&&t.prototype instanceof m?t:m,t=Object.create(t.prototype);return _regeneratorDefine2(t,"_invoke",(i=e,a=r,l=n||[],f=!1,h={p:u=0,n:0,v:p,a:d,f:d.bind(p,4),d:function(e,t){return o=e,s=0,c=p,h.n=t,g}},function(e,t,r){if(1<u)throw TypeError("Generator is already running");for(f&&1===t&&d(t,r),s=t,c=r;(_=s<2?p:c)||!f;){o||(s?s<3?(1<s&&(h.n=-1),d(s,c)):h.n=c:h.v=c);try{if(u=2,o){if(_=o[e=s?e:"next"]){if(!(_=_.call(o,c)))throw TypeError("iterator result is not an object");if(!_.done)return _;c=_.value,s<2&&(s=0)}else 1===s&&(_=o.return)&&_.call(o),s<2&&(c=TypeError("The iterator does not provide a '"+e+"' method"),s=1);o=p}else if((_=(f=h.n<0)?c:i.call(a,h))!==g)break}catch(e){o=p,s=1,c=e}finally{u=1}}return{value:_,done:f}}),!0),t;function d(e,t){for(s=e,c=t,_=0;!f&&u&&!r&&_<l.length;_++){var r,n=l[_],i=h.p,a=n[2];3<e?(r=a===t)&&(c=n[(s=n[4])?5:s=3],n[4]=n[5]=p):n[0]<=i&&((r=e<2&&i<n[1])?(s=0,h.v=t,h.n=n[1]):i<a&&(r=e<3||n[0]>t||a<t)&&(n[4]=e,n[5]=t,h.n=a,s=0))}if(r||1<e)return g;throw f=!0,t}}var g={};function m(){}function i(){}function a(){}var _=Object.getPrototypeOf,e=[][t]?_(_([][t]())):(_regeneratorDefine2(_={},t,function(){return this}),_),o=a.prototype=m.prototype=Object.create(e);function s(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,a):(e.__proto__=a,_regeneratorDefine2(e,r,"GeneratorFunction")),e.prototype=Object.create(o),e}return _regeneratorDefine2(o,"constructor",i.prototype=a),_regeneratorDefine2(a,"constructor",i),_regeneratorDefine2(a,r,i.displayName="GeneratorFunction"),_regeneratorDefine2(o),_regeneratorDefine2(o,r,"Generator"),_regeneratorDefine2(o,t,function(){return this}),_regeneratorDefine2(o,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:n,m:s}})()}function _regeneratorDefine2(e,t,r,n){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}(_regeneratorDefine2=function(e,t,r,n){function i(t,r){_regeneratorDefine2(e,t,function(e){return this._invoke(t,r,e)})}t?a?a(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))})(e,t,r,n)}function asyncGeneratorStep(e,t,r,n,i,a,o){try{var s=e[a](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function _asyncToGenerator(s){return function(){var e=this,o=arguments;return new Promise(function(t,r){var n=s.apply(e,o);function i(e){asyncGeneratorStep(n,t,r,i,a,"next",e)}function a(e){asyncGeneratorStep(n,t,r,i,a,"throw",e)}i(void 0)})}}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _callSuper(e,t,r){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?Reflect.construct(t,r||[],_getPrototypeOf(e).constructor):t.apply(e,r))}function _possibleConstructorReturn(e,t){if(t&&("object"==_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _wrapNativeSuper(e){var r="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(t,e)})(e)}function _construct(e,t,r){var n;return _isNativeReflectConstruct()?Reflect.construct.apply(null,arguments):((n=[null]).push.apply(n,t),t=new(e.bind.apply(e,n)),r&&_setPrototypeOf(t,r.prototype),t)}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_isNativeReflectConstruct=function(){return!!e})()}function _isNativeFunction(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _createForOfIteratorHelper(e,t){var r,n,i,a,o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(o)return i=!(n=!0),{s:function(){o=o.call(e)},n:function(){var e=o.next();return n=e.done,e},e:function(e){i=!0,r=e},f:function(){try{n||null==o.return||o.return()}finally{if(i)throw r}}};if(Array.isArray(e)||(o=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return o&&(e=o),a=0,{s:t=function(){},n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var r;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(r="Object"===(r={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var $e=function(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}},dr=$e(function(u,e){function t(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}}function n(t,r,n,i){if(r&&"object"==_typeof(r)||"function"==typeof r){var a,o=_createForOfIteratorHelper(v(r));try{for(o.s();!(a=o.n()).done;)(()=>{var e=a.value;z.call(t,e)||e===n||s(t,e,{get:function(){return r[e]},enumerable:!(i=_(r,e))||i.enumerable})})()}catch(e){o.e(e)}finally{o.f()}}return t}function r(e,t,r){return r=null!=e?f(T(e)):{},n(!t&&e&&e.__esModule?r:s(r,"default",{value:e,enumerable:!0}),e)}var i,f=Object.create,s=Object.defineProperty,_=Object.getOwnPropertyDescriptor,v=Object.getOwnPropertyNames,T=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty,b=t(function(e){_inherits(i,_wrapNativeSuper(Error));var t=_createClass(i),r=(_inherits(n,t),_createClass(n));function n(e){return _classCallCheck(this,n),e=_callSuper(this,n,[1,"commander.invalidArgument",e]),Error.captureStackTrace(_assertThisInitialized(e),e.constructor),e.name=e.constructor.name,e}function i(e,t,r){return _classCallCheck(this,i),r=_callSuper(this,i,[r]),Error.captureStackTrace(_assertThisInitialized(r),r.constructor),r.name=r.constructor.name,r.code=t,r.exitCode=e,r.nestedError=void 0,r}e.CommanderError=t,e.InvalidArgumentError=r}),w=t(function(e){var n=b().InvalidArgumentError,t=_createClass(function e(t,r){switch(_classCallCheck(this,e),this.description=r||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,t[0]){case"<":this.required=!0,this._name=t.slice(1,-1);break;case"[":this.required=!1,this._name=t.slice(1,-1);break;default:this.required=!0,this._name=t}3<this._name.length&&"..."===this._name.slice(-3)&&(this.variadic=!0,this._name=this._name.slice(0,-3))},[{key:"name",value:function(){return this._name}},{key:"_concatValue",value:function(e,t){return t!==this.defaultValue&&Array.isArray(t)?t.concat(e):[e]}},{key:"default",value:function(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}},{key:"argParser",value:function(e){return this.parseArg=e,this}},{key:"choices",value:function(e){var r=this;return this.argChoices=e.slice(),this.parseArg=function(e,t){if(r.argChoices.includes(e))return r.variadic?r._concatValue(e,t):e;throw new n("Allowed choices are ".concat(r.argChoices.join(", "),"."))},this}},{key:"argRequired",value:function(){return this.required=!0,this}},{key:"argOptional",value:function(){return this.required=!1,this}}]);e.Argument=t,e.humanReadableArgName=function(e){var t=e.name()+(!0===e.variadic?"...":"");return e.required?"<"+t+">":"["+t+"]"}}),k=t(function(e){var r=w().humanReadableArgName,t=_createClass(function e(){_classCallCheck(this,e),this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1},[{key:"visibleCommands",value:function(e){var t,r,n=e.commands.filter(function(e){return!e._hidden});return e._hasImplicitHelpCommand()&&(r=(t=_slicedToArray(e._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),3))[1],t=t[2],(r=e.createCommand(r).helpOption(!1)).description(e._helpCommandDescription),t&&r.arguments(t),n.push(r)),this.sortSubcommands&&n.sort(function(e,t){return e.name().localeCompare(t.name())}),n}},{key:"visibleOptions",value:function(e){var r,t=e.options.filter(function(e){return!e.hidden}),n=e._hasHelpOption&&e._helpShortFlag&&!e._findOption(e._helpShortFlag),i=e._hasHelpOption&&!e._findOption(e._helpLongFlag);return(n||i)&&(n=n?i?e.createOption(e._helpFlags,e._helpDescription):e.createOption(e._helpShortFlag,e._helpDescription):e.createOption(e._helpLongFlag,e._helpDescription),t.push(n)),this.sortOptions&&(r=function(e){return e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"")},t.sort(function(e,t){return r(e).localeCompare(r(t))})),t}},{key:"visibleArguments",value:function(t){return t._argsDescription&&t._args.forEach(function(e){e.description=e.description||t._argsDescription[e.name()]||""}),t._args.find(function(e){return e.description})?t._args:[]}},{key:"subcommandTerm",value:function(e){var t=e._args.map(function(e){return r(e)}).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}},{key:"optionTerm",value:function(e){return e.flags}},{key:"argumentTerm",value:function(e){return e.name()}},{key:"longestSubcommandTermLength",value:function(e,r){return r.visibleCommands(e).reduce(function(e,t){return Math.max(e,r.subcommandTerm(t).length)},0)}},{key:"longestOptionTermLength",value:function(e,r){return r.visibleOptions(e).reduce(function(e,t){return Math.max(e,r.optionTerm(t).length)},0)}},{key:"longestArgumentTermLength",value:function(e,r){return r.visibleArguments(e).reduce(function(e,t){return Math.max(e,r.argumentTerm(t).length)},0)}},{key:"commandUsage",value:function(e){for(var t=e._name,r=(e._aliases[0]&&(t=t+"|"+e._aliases[0]),""),n=e.parent;n;n=n.parent)r=n.name()+" "+r;return r+t+" "+e.usage()}},{key:"commandDescription",value:function(e){return e.description()}},{key:"subcommandDescription",value:function(e){return e.summary()||e.description()}},{key:"optionDescription",value:function(e){var t=[];return e.argChoices&&t.push("choices: ".concat(e.argChoices.map(function(e){return JSON.stringify(e)}).join(", "))),void 0!==e.defaultValue&&(e.required||e.optional||e.isBoolean()&&"boolean"==typeof e.defaultValue)&&t.push("default: ".concat(e.defaultValueDescription||JSON.stringify(e.defaultValue))),void 0!==e.presetArg&&e.optional&&t.push("preset: ".concat(JSON.stringify(e.presetArg))),void 0!==e.envVar&&t.push("env: ".concat(e.envVar)),0<t.length?"".concat(e.description," (").concat(t.join(", "),")"):e.description}},{key:"argumentDescription",value:function(e){var t=[];return e.argChoices&&t.push("choices: ".concat(e.argChoices.map(function(e){return JSON.stringify(e)}).join(", "))),void 0!==e.defaultValue&&t.push("default: ".concat(e.defaultValueDescription||JSON.stringify(e.defaultValue))),0<t.length?(t="(".concat(t.join(", "),")"),e.description?"".concat(e.description," ").concat(t):t):e.description}},{key:"formatHelp",value:function(e,r){var n=r.padWidth(e,r),i=r.helpWidth||80;function t(e,t){return t?(t="".concat(e.padEnd(n+2)).concat(t),r.wrap(t,i-2,n+2)):e}function a(e){return e.join("\n").replace(/^/gm," ".repeat(2))}var o=["Usage: ".concat(r.commandUsage(e)),""],s=r.commandDescription(e),s=(0<s.length&&(o=o.concat([s,""])),r.visibleArguments(e).map(function(e){return t(r.argumentTerm(e),r.argumentDescription(e))})),s=(0<s.length&&(o=o.concat(["Arguments:",a(s),""])),r.visibleOptions(e).map(function(e){return t(r.optionTerm(e),r.optionDescription(e))})),s=(0<s.length&&(o=o.concat(["Options:",a(s),""])),r.visibleCommands(e).map(function(e){return t(r.subcommandTerm(e),r.subcommandDescription(e))}));return(o=0<s.length?o.concat(["Commands:",a(s),""]):o).join("\n")}},{key:"padWidth",value:function(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}},{key:"wrap",value:function(e,t,r){var n,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:40;return e.match(/[\n]\s+/)||(t=t-r)<i?e:(i=e.slice(0,r),e=e.slice(r),n=" ".repeat(r),r=new RegExp(".{1,"+(t-1)+"}([\\s]|$)|[^\\s]+?([\\s]|$)","g"),i+(e.match(r)||[]).map(function(e,t){return"\n"===e.slice(-1)&&(e=e.slice(0,e.length-1)),(0<t?n:"")+e.trimRight()}).join("\n"))}}]);e.Help=t}),S=t(function(e){var n=b().InvalidArgumentError,t=_createClass(function e(t,r){_classCallCheck(this,e),this.flags=t,this.description=r||"",this.required=t.includes("<"),this.optional=t.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(t),this.mandatory=!1;r=i(t);this.short=r.shortFlag,this.long=r.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0},[{key:"default",value:function(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}},{key:"preset",value:function(e){return this.presetArg=e,this}},{key:"conflicts",value:function(e){return this.conflictsWith=this.conflictsWith.concat(e),this}},{key:"implies",value:function(e){return this.implied=Object.assign(this.implied||{},e),this}},{key:"env",value:function(e){return this.envVar=e,this}},{key:"argParser",value:function(e){return this.parseArg=e,this}},{key:"makeOptionMandatory",value:function(){return this.mandatory=!!(!(0<arguments.length&&void 0!==arguments[0])||arguments[0]),this}},{key:"hideHelp",value:function(){return this.hidden=!!(!(0<arguments.length&&void 0!==arguments[0])||arguments[0]),this}},{key:"_concatValue",value:function(e,t){return t!==this.defaultValue&&Array.isArray(t)?t.concat(e):[e]}},{key:"choices",value:function(e){var r=this;return this.argChoices=e.slice(),this.parseArg=function(e,t){if(r.argChoices.includes(e))return r.variadic?r._concatValue(e,t):e;throw new n("Allowed choices are ".concat(r.argChoices.join(", "),"."))},this}},{key:"name",value:function(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}},{key:"attributeName",value:function(){return this.name().replace(/^no-/,"").split("-").reduce(function(e,t){return e+t[0].toUpperCase()+t.slice(1)})}},{key:"is",value:function(e){return this.short===e||this.long===e}},{key:"isBoolean",value:function(){return!this.required&&!this.optional&&!this.negate}}]),r=_createClass(function e(t){var r=this;_classCallCheck(this,e),this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,t.forEach(function(e){(e.negate?r.negativeOptions:r.positiveOptions).set(e.attributeName(),e)}),this.negativeOptions.forEach(function(e,t){r.positiveOptions.has(t)&&r.dualOptions.add(t)})},[{key:"valueFromOption",value:function(e,t){var r=t.attributeName();return!this.dualOptions.has(r)||(r=this.negativeOptions.get(r).presetArg,t.negate===((void 0!==r&&r)===e))}}]);function i(e){var t,e=e.split(/[ |,]+/);return 1<e.length&&!/^[[<]/.test(e[1])&&(t=e.shift()),e=e.shift(),!t&&/^-[^-]$/.test(e)&&(t=e,e=void 0),{shortFlag:t,longFlag:e}}e.Option=t,e.splitOptionFlags=i,e.DualOptions=r}),H=t(function(e){e.suggestSimilar=function(n,e){if(!e||0===e.length)return"";e=Array.from(new Set(e));var t=n.startsWith("--"),i=(t&&(n=n.slice(2),e=e.map(function(e){return e.slice(2)})),[]),a=3;return e.forEach(function(e){var t,r;e.length<=1||(t=((e,t)=>{if(3<Math.abs(e.length-t.length))return Math.max(e.length,t.length);for(var r=[],n=0;n<=e.length;n++)r[n]=[n];for(var i=0;i<=t.length;i++)r[0][i]=i;for(var a=1;a<=t.length;a++)for(var o=1;o<=e.length;o++){var s=1,s=e[o-1]===t[a-1]?0:1;r[o][a]=Math.min(r[o-1][a]+1,r[o][a-1]+1,r[o-1][a-1]+s),1<o&&1<a&&e[o-1]===t[a-2]&&e[o-2]===t[a-1]&&(r[o][a]=Math.min(r[o][a],r[o-2][a-2]+1))}return r[e.length][t.length]})(n,e),.4<((r=Math.max(n.length,e.length))-t)/r&&(t<a?(a=t,i=[e]):t===a&&i.push(e)))}),i.sort(function(e,t){return e.localeCompare(t)}),1<(i=t?i.map(function(e){return"--".concat(e)}):i).length?"\n(Did you mean one of ".concat(i.join(", "),"?)"):1===i.length?"\n(Did you mean ".concat(i[0],"?)"):""}}),M=t(function(e){var r,t=require("events").EventEmitter,l=require("child_process"),f=require("path"),h=require("fs"),d=require("process"),n=w(),i=n.Argument,a=n.humanReadableArgName,p=b().CommanderError,o=k().Help,n=S(),s=n.Option,c=n.splitOptionFlags,u=n.DualOptions,g=H().suggestSimilar,n=(_inherits(m,t),_createClass(m,[{key:"copyInheritedSettings",value:function(e){return this._outputConfiguration=e._outputConfiguration,this._hasHelpOption=e._hasHelpOption,this._helpFlags=e._helpFlags,this._helpDescription=e._helpDescription,this._helpShortFlag=e._helpShortFlag,this._helpLongFlag=e._helpLongFlag,this._helpCommandName=e._helpCommandName,this._helpCommandnameAndArgs=e._helpCommandnameAndArgs,this._helpCommandDescription=e._helpCommandDescription,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}},{key:"command",value:function(e,t,r){"object"==_typeof(t)&&null!==t&&(r=t,t=null);var r=r||{},e=_slicedToArray(e.match(/([^ ]+) *(.*)/),3),n=e[1],e=e[2],n=this.createCommand(n);return t&&(n.description(t),n._executableHandler=!0),r.isDefault&&(this._defaultCommandName=n._name),n._hidden=!(!r.noHelp&&!r.hidden),n._executableFile=r.executableFile||null,e&&n.arguments(e),this.commands.push(n),n.parent=this,n.copyInheritedSettings(this),t?this:n}},{key:"createCommand",value:function(e){return new m(e)}},{key:"createHelp",value:function(){return Object.assign(new o,this.configureHelp())}},{key:"configureHelp",value:function(e){return void 0===e?this._helpConfiguration:(this._helpConfiguration=e,this)}},{key:"configureOutput",value:function(e){return void 0===e?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}},{key:"showHelpAfterError",value:function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];return this._showHelpAfterError=e="string"!=typeof e?!!e:e,this}},{key:"showSuggestionAfterError",value:function(){return this._showSuggestionAfterError=!!(!(0<arguments.length&&void 0!==arguments[0])||arguments[0]),this}},{key:"addCommand",value:function(e,t){if(e._name)return(t=t||{}).isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this;throw new Error("Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()")}},{key:"createArgument",value:function(e,t){return new i(e,t)}},{key:"argument",value:function(e,t,r,n){e=this.createArgument(e,t);return"function"==typeof r?e.default(n).argParser(r):e.default(r),this.addArgument(e),this}},{key:"arguments",value:function(e){var t=this;return e.split(/ +/).forEach(function(e){t.argument(e)}),this}},{key:"addArgument",value:function(e){var t=this._args.slice(-1)[0];if(t&&t.variadic)throw new Error("only the last argument can be variadic '".concat(t.name(),"'"));if(e.required&&void 0!==e.defaultValue&&void 0===e.parseArg)throw new Error("a default value for a required argument is never used: '".concat(e.name(),"'"));return this._args.push(e),this}},{key:"addHelpCommand",value:function(e,t){return!1===e?this._addImplicitHelpCommand=!1:(this._addImplicitHelpCommand=!0,"string"==typeof e&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=t||this._helpCommandDescription),this}},{key:"_hasImplicitHelpCommand",value:function(){return void 0===this._addImplicitHelpCommand?this.commands.length&&!this._actionHandler&&!this._findCommand("help"):this._addImplicitHelpCommand}},{key:"hook",value:function(e,t){var r=["preSubcommand","preAction","postAction"];if(r.includes(e))return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this;throw new Error("Unexpected value for event passed to hook : '".concat(e,"'.\nExpecting one of '").concat(r.join("', '"),"'"))}},{key:"exitOverride",value:function(e){return this._exitCallback=e||function(e){if("commander.executeSubCommandAsync"!==e.code)throw e},this}},{key:"_exit",value:function(e,t,r){this._exitCallback&&this._exitCallback(new p(e,t,r)),d.exit(e)}},{key:"action",value:function(r){var n=this;return this._actionHandler=function(e){var t=n._args.length,e=e.slice(0,t);return n._storeOptionsAsProperties?e[t]=n:e[t]=n.opts(),e.push(n),r.apply(n,e)},this}},{key:"createOption",value:function(e,t){return new s(e,t)}},{key:"addOption",value:function(i){function r(e,t,r){null==e&&void 0!==i.presetArg&&(e=i.presetArg);var n=a.getOptionValue(o);if(null!==e&&i.parseArg)try{e=i.parseArg(e,n)}catch(e){throw"commander.invalidArgument"===e.code&&(t="".concat(t," ").concat(e.message),a.error(t,{exitCode:e.exitCode,code:e.code})),e}else null!==e&&i.variadic&&(e=i._concatValue(e,n));null==e&&(e=!i.negate&&(!(!i.isBoolean()&&!i.optional)||"")),a.setOptionValueWithSource(o,e,r)}var e,a=this,t=i.name(),o=i.attributeName();i.negate?(e=i.long.replace(/^--no-/,"--"),this._findOption(e)||this.setOptionValueWithSource(o,void 0===i.defaultValue||i.defaultValue,"default")):void 0!==i.defaultValue&&this.setOptionValueWithSource(o,i.defaultValue,"default"),this.options.push(i);return this.on("option:"+t,function(e){var t="error: option '".concat(i.flags,"' argument '").concat(e,"' is invalid.");r(e,t,"cli")}),i.envVar&&this.on("optionEnv:"+t,function(e){var t="error: option '".concat(i.flags,"' value '").concat(e,"' from env '").concat(i.envVar,"' is invalid.");r(e,t,"env")}),this}},{key:"_optionEx",value:function(e,t,r,n,i){if("object"==_typeof(t)&&t instanceof s)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");var a,t=this.createOption(t,r);return t.makeOptionMandatory(!!e.mandatory),"function"==typeof n?t.default(i).argParser(n):n instanceof RegExp?(a=n,n=function(e,t){e=a.exec(e);return e?e[0]:t},t.default(i).argParser(n)):t.default(n),this.addOption(t)}},{key:"option",value:function(e,t,r,n){return this._optionEx({},e,t,r,n)}},{key:"requiredOption",value:function(e,t,r,n){return this._optionEx({mandatory:!0},e,t,r,n)}},{key:"combineFlagAndOptionalValue",value:function(){return this._combineFlagAndOptionalValue=!!(!(0<arguments.length&&void 0!==arguments[0])||arguments[0]),this}},{key:"allowUnknownOption",value:function(){return this._allowUnknownOption=!!(!(0<arguments.length&&void 0!==arguments[0])||arguments[0]),this}},{key:"allowExcessArguments",value:function(){return this._allowExcessArguments=!!(!(0<arguments.length&&void 0!==arguments[0])||arguments[0]),this}},{key:"enablePositionalOptions",value:function(){return this._enablePositionalOptions=!!(!(0<arguments.length&&void 0!==arguments[0])||arguments[0]),this}},{key:"passThroughOptions",value:function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];if(this._passThroughOptions=!!e,this.parent&&e&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}},{key:"storeOptionsAsProperties",value:function(){if(this._storeOptionsAsProperties=!!(!(0<arguments.length&&void 0!==arguments[0])||arguments[0]),this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}},{key:"getOptionValue",value:function(e){return(this._storeOptionsAsProperties?this:this._optionValues)[e]}},{key:"setOptionValue",value:function(e,t){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this}},{key:"setOptionValueWithSource",value:function(e,t,r){return this.setOptionValue(e,t),this._optionValueSources[e]=r,this}},{key:"getOptionValueSource",value:function(e){return this._optionValueSources[e]}},{key:"_prepareUserArgs",value:function(e,t){if(void 0!==e&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");var r;switch(t=t||{},void 0===e&&(e=d.argv,d.versions)&&d.versions.electron&&(t.from="electron"),this.rawArgs=e.slice(),t.from){case void 0:case"node":this._scriptPath=e[1],r=e.slice(2);break;case"electron":r=d.defaultApp?(this._scriptPath=e[1],e.slice(2)):e.slice(1);break;case"user":r=e.slice(0);break;default:throw new Error("unexpected parse option { from: '".concat(t.from,"' }"))}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",r}},{key:"parse",value:function(e,t){e=this._prepareUserArgs(e,t);return this._parseCommand([],e),this}},{key:"parseAsync",value:(r=_asyncToGenerator(_regenerator().m(function e(t,r){var n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return n=this._prepareUserArgs(t,r),e.n=1,this._parseCommand([],n);case 1:return e.a(2,this)}},e,this)})),function(e,t){return r.apply(this,arguments)})},{key:"_executeSubCommand",value:function(r,e){e=e.slice();var n=[".js",".ts",".tsx",".mjs",".cjs"];function t(e,t){var r=f.resolve(e,t);return h.existsSync(r)?r:!n.includes(f.extname(t))&&(e=n.find(function(e){return h.existsSync("".concat(r).concat(e))}))?"".concat(r).concat(e):void 0}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();var i,a,o,s=r._executableFile||"".concat(this._name,"-").concat(r._name),c=this._executableDir||"";if(this._scriptPath){try{i=h.realpathSync(this._scriptPath)}catch(e){i=this._scriptPath}c=f.resolve(f.dirname(i),c)}c&&((i=t(c,s))||r._executableFile||!this._scriptPath||(a=f.basename(this._scriptPath,f.extname(this._scriptPath)))!==this._name&&(i=t(c,"".concat(a,"-").concat(r._name))),s=i||s),a=n.includes(f.extname(s)),(o="win32"!==d.platform?a?(e.unshift(s),e=v(d.execArgv).concat(e),l.spawn(d.argv[0],e,{stdio:"inherit"})):l.spawn(s,e,{stdio:"inherit"}):(e.unshift(s),e=v(d.execArgv).concat(e),l.spawn(d.execPath,e,{stdio:"inherit"}))).killed||["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach(function(e){d.on(e,function(){!1===o.killed&&null===o.exitCode&&o.kill(e)})});var u=this._exitCallback;u?o.on("close",function(){u(new p(d.exitCode||0,"commander.executeSubCommandAsync","(close)"))}):o.on("close",d.exit.bind(d)),o.on("error",function(e){var t;if("ENOENT"===e.code)throw t=c?"searched for local subcommand relative to directory '".concat(c,"'"):"no directory for search for local subcommand, use .executableDir() to supply a custom directory",t="'".concat(s,"' does not exist\n - if '").concat(r._name,"' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ").concat(t),new Error(t);if("EACCES"===e.code)throw new Error("'".concat(s,"' not executable"));u?((t=new p(1,"commander.executeSubCommandAsync","(error)")).nestedError=e,u(t)):d.exit(1)}),this.runningCommand=o}},{key:"_dispatchSubcommand",value:function(e,t,r){var n=this,i=this._findCommand(e);return i||this.help({error:!0}),e=this._chainOrCallSubCommandHook(void 0,i,"preSubcommand"),this._chainOrCall(e,function(){if(!i._executableHandler)return i._parseCommand(t,r);n._executeSubCommand(i,t.concat(r))})}},{key:"_checkNumberOfArguments",value:function(){var r=this;this._args.forEach(function(e,t){e.required&&null==r.args[t]&&r.missingArgument(e.name())}),!(0<this._args.length&&this._args[this._args.length-1].variadic)&&this.args.length>this._args.length&&this._excessArguments(this.args)}},{key:"_processArguments",value:function(){function n(t,r,n){var e=r;if(null!==r&&t.parseArg)try{e=t.parseArg(r,n)}catch(e){throw"commander.invalidArgument"===e.code&&(n="error: command-argument value '".concat(r,"' is invalid for argument '").concat(t.name(),"'. ").concat(e.message),i.error(n,{exitCode:e.exitCode,code:e.code})),e}return e}var i=this,a=(this._checkNumberOfArguments(),[]);this._args.forEach(function(r,e){var t=r.defaultValue;r.variadic?e<i.args.length?(t=i.args.slice(e),r.parseArg&&(t=t.reduce(function(e,t){return n(r,t,e)},r.defaultValue))):void 0===t&&(t=[]):e<i.args.length&&(t=i.args[e],r.parseArg)&&(t=n(r,t,r.defaultValue)),a[e]=t}),this.processedArgs=a}},{key:"_chainOrCall",value:function(e,t){return e&&e.then&&"function"==typeof e.then?e.then(function(){return t()}):t()}},{key:"_chainOrCallHooks",value:function(e,r){var t=this,n=e,i=[];return y(this).reverse().filter(function(e){return void 0!==e._lifeCycleHooks[r]}).forEach(function(t){t._lifeCycleHooks[r].forEach(function(e){i.push({hookedCommand:t,callback:e})})}),"postAction"===r&&i.reverse(),i.forEach(function(e){n=t._chainOrCall(n,function(){return e.callback(e.hookedCommand,t)})}),n}},{key:"_chainOrCallSubCommandHook",value:function(e,t,r){var n=this,i=e;return void 0!==this._lifeCycleHooks[r]&&this._lifeCycleHooks[r].forEach(function(e){i=n._chainOrCall(i,function(){return e(n,t)})}),i}},{key:"_parseCommand",value:function(e,t){var r=this,n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName)return 1===e.length&&this.help(),this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);if(this._defaultCommandName)return _(this,t),this._dispatchSubcommand(this._defaultCommandName,e,t);!this.commands.length||0!==this.args.length||this._actionHandler||this._defaultCommandName||this.help({error:!0}),_(this,n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();function i(){0<n.unknown.length&&r.unknownOption(n.unknown[0])}var a,o="command:".concat(this.name());if(this._actionHandler)return i(),this._processArguments(),a=this._chainOrCallHooks(a,"preAction"),a=this._chainOrCall(a,function(){return r._actionHandler(r.processedArgs)}),this.parent&&(a=this._chainOrCall(a,function(){r.parent.emit(o,e,t)})),a=this._chainOrCallHooks(a,"postAction");if(this.parent&&this.parent.listenerCount(o))i(),this._processArguments(),this.parent.emit(o,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(i(),this._processArguments())}else this.commands.length?(i(),this.help({error:!0})):(i(),this._processArguments())}},{key:"_findCommand",value:function(t){if(t)return this.commands.find(function(e){return e._name===t||e._aliases.includes(t)})}},{key:"_findOption",value:function(t){return this.options.find(function(e){return e.is(t)})}},{key:"_checkForMissingMandatoryOptions",value:function(){for(var e=this;e;e=e.parent)(t=>{t.options.forEach(function(e){e.mandatory&&void 0===t.getOptionValue(e.attributeName())&&t.missingMandatoryOptionValue(e)})})(e)}},{key:"_checkForConflictingLocalOptions",value:function(){var r=this,n=this.options.filter(function(e){e=e.attributeName();return void 0!==r.getOptionValue(e)&&"default"!==r.getOptionValueSource(e)});n.filter(function(e){return 0<e.conflictsWith.length}).forEach(function(t){var e=n.find(function(e){return t.conflictsWith.includes(e.attributeName())});e&&r._conflictingOption(t,e)})}},{key:"_checkForConflictingOptions",value:function(){for(var e=this;e;e=e.parent)e._checkForConflictingLocalOptions()}},{key:"parseOptions",value:function(e){var t=[],r=[],n=t,i=e.slice();function a(e){return 1<e.length&&"-"===e[0]}for(var o=null;i.length;){var s=i.shift();if("--"===s){n===r&&n.push(s),n.push.apply(n,_toConsumableArray(i));break}if(o&&!a(s))this.emit("option:".concat(o.name()),s);else{if(o=null,a(s)){var c,u=this._findOption(s);if(u){u.required?(void 0===(c=i.shift())&&this.optionMissingArgument(u),this.emit("option:".concat(u.name()),c)):u.optional?(c=null,0<i.length&&!a(i[0])&&(c=i.shift()),this.emit("option:".concat(u.name()),c)):this.emit("option:".concat(u.name())),o=u.variadic?u:null;continue}}if(2<s.length&&"-"===s[0]&&"-"!==s[1]){u=this._findOption("-".concat(s[1]));if(u){u.required||u.optional&&this._combineFlagAndOptionalValue?this.emit("option:".concat(u.name()),s.slice(2)):(this.emit("option:".concat(u.name())),i.unshift("-".concat(s.slice(2))));continue}}if(/^--[^=]+=/.test(s)){var l=s.indexOf("="),f=this._findOption(s.slice(0,l));if(f&&(f.required||f.optional)){this.emit("option:".concat(f.name()),s.slice(l+1));continue}}if(a(s)&&(n=r),(this._enablePositionalOptions||this._passThroughOptions)&&0===t.length&&0===r.length){if(this._findCommand(s)){t.push(s),0<i.length&&r.push.apply(r,_toConsumableArray(i));break}if(s===this._helpCommandName&&this._hasImplicitHelpCommand()){t.push(s),0<i.length&&t.push.apply(t,_toConsumableArray(i));break}if(this._defaultCommandName){r.push(s),0<i.length&&r.push.apply(r,_toConsumableArray(i));break}}if(this._passThroughOptions){n.push(s),0<i.length&&n.push.apply(n,_toConsumableArray(i));break}n.push(s)}}return{operands:t,unknown:r}}},{key:"opts",value:function(){if(this._storeOptionsAsProperties){for(var e={},t=this.options.length,r=0;r<t;r++){var n=this.options[r].attributeName();e[n]=n===this._versionOptionName?this._version:this[n]}return e}return this._optionValues}},{key:"optsWithGlobals",value:function(){return y(this).reduce(function(e,t){return Object.assign(e,t.opts())},{})}},{key:"error",value:function(e,t){this._outputConfiguration.outputError("".concat(e,"\n"),this._outputConfiguration.writeErr),"string"==typeof this._showHelpAfterError?this._outputConfiguration.writeErr("".concat(this._showHelpAfterError,"\n")):this._showHelpAfterError&&(this._outputConfiguration.writeErr("\n"),this.outputHelp({error:!0}));var t=t||{},r=t.exitCode||1;this._exit(r,t.code||"commander.error",e)}},{key:"_parseOptionsEnv",value:function(){var r=this;this.options.forEach(function(e){var t;e.envVar&&e.envVar in d.env&&(t=e.attributeName(),void 0!==r.getOptionValue(t)&&!["default","config","env"].includes(r.getOptionValueSource(t))||(e.required||e.optional?r.emit("optionEnv:".concat(e.name()),d.env[e.envVar]):r.emit("optionEnv:".concat(e.name()))))})}},{key:"_parseOptionsImplied",value:function(){function r(e){return void 0!==n.getOptionValue(e)&&!["default","implied"].includes(n.getOptionValueSource(e))}var n=this,t=new u(this.options);this.options.filter(function(e){return void 0!==e.implied&&r(e.attributeName())&&t.valueFromOption(n.getOptionValue(e.attributeName()),e)}).forEach(function(t){Object.keys(t.implied).filter(function(e){return!r(e)}).forEach(function(e){n.setOptionValueWithSource(e,t.implied[e],"implied")})})}},{key:"missingArgument",value:function(e){e="error: missing required argument '".concat(e,"'");this.error(e,{code:"commander.missingArgument"})}},{key:"optionMissingArgument",value:function(e){e="error: option '".concat(e.flags,"' argument missing");this.error(e,{code:"commander.optionMissingArgument"})}},{key:"missingMandatoryOptionValue",value:function(e){e="error: required option '".concat(e.flags,"' not specified");this.error(e,{code:"commander.missingMandatoryOptionValue"})}},{key:"_conflictingOption",value:function(e,t){function r(e){t=(e=e).attributeName(),n=a.getOptionValue(t),i=a.options.find(function(e){return e.negate&&t===e.attributeName()}),r=a.options.find(function(e){return!e.negate&&t===e.attributeName()});var t,r,n=i&&(void 0===i.presetArg&&!1===n||void 0!==i.presetArg&&n===i.presetArg)?i:r||e,i=n.attributeName();return"env"===a.getOptionValueSource(i)?"environment variable '".concat(n.envVar,"'"):"option '".concat(n.flags,"'")}var a=this,e="error: ".concat(r(e)," cannot be used with ").concat(r(t));this.error(e,{code:"commander.conflictingOption"})}},{key:"unknownOption",value:function(e){if(!this._allowUnknownOption){var t="";if(e.startsWith("--")&&this._showSuggestionAfterError){var r=[],n=this;do{var i=n.createHelp().visibleOptions(n).filter(function(e){return e.long}).map(function(e){return e.long}),r=r.concat(i),n=n.parent}while(n&&!n._enablePositionalOptions);t=g(e,r)}e="error: unknown option '".concat(e,"'").concat(t);this.error(e,{code:"commander.unknownOption"})}}},{key:"_excessArguments",value:function(e){var t,r;this._allowExcessArguments||(t=1===(r=this._args.length)?"":"s",r="error: too many arguments".concat(this.parent?" for '".concat(this.name(),"'"):"",". Expected ").concat(r," argument").concat(t," but got ").concat(e.length,"."),this.error(r,{code:"commander.excessArguments"}))}},{key:"unknownCommand",value:function(){var t,e=this.args[0],r="",e=(this._showSuggestionAfterError&&(t=[],this.createHelp().visibleCommands(this).forEach(function(e){t.push(e.name()),e.alias()&&t.push(e.alias())}),r=g(e,t)),"error: unknown command '".concat(e,"'").concat(r));this.error(e,{code:"commander.unknownCommand"})}},{key:"version",value:function(e,t,r){var n=this;if(void 0===e)return this._version;this._version=e;t=this.createOption(t=t||"-V, --version",r=r||"output the version number");return this._versionOptionName=t.attributeName(),this.options.push(t),this.on("option:"+t.name(),function(){n._outputConfiguration.writeOut("".concat(e,"\n")),n._exit(0,"commander.version",e)}),this}},{key:"description",value:function(e,t){return void 0===e&&void 0===t?this._description:(this._description=e,t&&(this._argsDescription=t),this)}},{key:"summary",value:function(e){return void 0===e?this._summary:(this._summary=e,this)}},{key:"alias",value:function(e){if(void 0===e)return this._aliases[0];var t=this;if(e===(t=0!==this.commands.length&&this.commands[this.commands.length-1]._executableHandler?this.commands[this.commands.length-1]:t)._name)throw new Error("Command alias can't be the same as its name");return t._aliases.push(e),this}},{key:"aliases",value:function(e){var t=this;return void 0===e?this._aliases:(e.forEach(function(e){return t.alias(e)}),this)}},{key:"usage",value:function(e){var t;return void 0===e?this._usage||(t=this._args.map(function(e){return a(e)}),[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?t:[]).join(" ")):(this._usage=e,this)}},{key:"name",value:function(e){return void 0===e?this._name:(this._name=e,this)}},{key:"nameFromFilename",value:function(e){return this._name=f.basename(e,f.extname(e)),this}},{key:"executableDir",value:function(e){return void 0===e?this._executableDir:(this._executableDir=e,this)}},{key:"helpInformation",value:function(e){var t=this.createHelp();return void 0===t.helpWidth&&(t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),t.formatHelp(this,t)}},{key:"_getHelpContext",value:function(e){var t=this,r={error:!!(e=e||{}).error},n=r.error?function(e){return t._outputConfiguration.writeErr(e)}:function(e){return t._outputConfiguration.writeOut(e)};return r.write=e.write||n,r.command=this,r}},{key:"outputHelp",value:function(e){"function"==typeof e&&(t=e,e=void 0);var t,r=this._getHelpContext(e),e=(y(this).reverse().forEach(function(e){return e.emit("beforeAllHelp",r)}),this.emit("beforeHelp",r),this.helpInformation(r));if(t&&"string"!=typeof(e=t(e))&&!Buffer.isBuffer(e))throw new Error("outputHelp callback must return a string or a Buffer");r.write(e),this.emit(this._helpLongFlag),this.emit("afterHelp",r),y(this).forEach(function(e){return e.emit("afterAllHelp",r)})}},{key:"helpOption",value:function(e,t){return"boolean"==typeof e?this._hasHelpOption=e:(this._helpFlags=e||this._helpFlags,this._helpDescription=t||this._helpDescription,e=c(this._helpFlags),this._helpShortFlag=e.shortFlag,this._helpLongFlag=e.longFlag),this}},{key:"help",value:function(e){this.outputHelp(e);var t=d.exitCode||0;0===t&&e&&"function"!=typeof e&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}},{key:"addHelpText",value:function(e,r){var t=["beforeAll","before","after","afterAll"];if(t.includes(e))return e="".concat(e,"Help"),this.on(e,function(e){var t="function"==typeof r?r({error:e.error,command:e.command}):r;t&&e.write("".concat(t,"\n"))}),this;throw new Error("Unexpected value for position to addHelpText.\nExpecting one of '".concat(t.join("', '"),"'"))}}]));function m(e){var t;return _classCallCheck(this,m),(t=_callSuper(this,m)).commands=[],t.options=[],t.parent=null,t._allowUnknownOption=!1,t._allowExcessArguments=!0,t._args=[],t.args=[],t.rawArgs=[],t.processedArgs=[],t._scriptPath=null,t._name=e||"",t._optionValues={},t._optionValueSources={},t._storeOptionsAsProperties=!1,t._actionHandler=null,t._executableHandler=!1,t._executableFile=null,t._executableDir=null,t._defaultCommandName=null,t._exitCallback=null,t._aliases=[],t._combineFlagAndOptionalValue=!0,t._description="",t._summary="",t._argsDescription=void 0,t._enablePositionalOptions=!1,t._passThroughOptions=!1,t._lifeCycleHooks={},t._showHelpAfterError=!1,t._showSuggestionAfterError=!0,t._outputConfiguration={writeOut:function(e){return d.stdout.write(e)},writeErr:function(e){return d.stderr.write(e)},getOutHelpWidth:function(){return d.stdout.isTTY?d.stdout.columns:void 0},getErrHelpWidth:function(){return d.stderr.isTTY?d.stderr.columns:void 0},outputError:function(e,t){return t(e)}},t._hidden=!1,t._hasHelpOption=!0,t._helpFlags="-h, --help",t._helpDescription="display help for command",t._helpShortFlag="-h",t._helpLongFlag="--help",t._addImplicitHelpCommand=void 0,t._helpCommandName="help",t._helpCommandnameAndArgs="help [command]",t._helpCommandDescription="display help for command",t._helpConfiguration={},t}function _(t,e){t._hasHelpOption&&e.find(function(e){return e===t._helpLongFlag||e===t._helpShortFlag})&&(t.outputHelp(),t._exit(0,"commander.helpDisplayed","(outputHelp)"))}function v(e){return e.map(function(e){var t,r,n,i;return e.startsWith("--inspect")&&(r="127.0.0.1",n="9229",null!==(i=e.match(/^(--inspect(-brk)?)$/))?t=i[1]:null!==(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))?(t=i[1],/^\d+$/.test(i[3])?n=i[3]:r=i[3]):null!==(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(t=i[1],r=i[3],n=i[4]),t)&&"0"!==n?"".concat(t,"=").concat(r,":").concat(parseInt(n)+1):e})}function y(e){for(var t=[],r=e;r;r=r.parent)t.push(r);return t}e.Command=n}),G=t(function(e,t){var r=w().Argument,n=M().Command,i=b(),a=i.CommanderError,i=i.InvalidArgumentError,o=k().Help,s=S().Option;((e=t.exports=new n).program=e).Argument=r,e.Command=n,e.CommanderError=a,e.Help=o,e.InvalidArgumentError=i,e.InvalidOptionArgumentError=i,e.Option=s}),I=t(function(e,t){"u"<("undefined"==typeof process?"undefined":_typeof(process))||!process.version||0===process.version.indexOf("v0.")||0===process.version.indexOf("v1.")&&0!==process.version.indexOf("v1.8.")?t.exports={nextTick:function(e,t,r,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var i,a,o=arguments.length;switch(o){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,t)});case 3:return process.nextTick(function(){e.call(null,t,r)});case 4:return process.nextTick(function(){e.call(null,t,r,n)});default:for(i=new Array(o-1),a=0;a<i.length;)i[a++]=arguments[a];return process.nextTick(function(){e.apply(null,i)})}}}:t.exports=process}),U=t(function(e,t){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}}),B=t(function(e,t){t.exports=require("stream")}),P=t(function(e,t){var r=require("buffer"),n=r.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(i(r,e),e.Buffer=a),i(n,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");e=n(e);return void 0!==t?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}),F=t(function(e){function t(e){return Object.prototype.toString.call(e)}e.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===t(e)},e.isBoolean=function(e){return"boolean"==typeof e},e.isNull=function(e){return null===e},e.isNullOrUndefined=function(e){return null==e},e.isNumber=function(e){return"number"==typeof e},e.isString=function(e){return"string"==typeof e},e.isSymbol=function(e){return"symbol"==_typeof(e)},e.isUndefined=function(e){return void 0===e},e.isRegExp=function(e){return"[object RegExp]"===t(e)},e.isObject=function(e){return"object"==_typeof(e)&&null!==e},e.isDate=function(e){return"[object Date]"===t(e)},e.isError=function(e){return"[object Error]"===t(e)||e instanceof Error},e.isFunction=function(e){return"function"==typeof e},e.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==_typeof(e)||"u"<_typeof(e)},e.isBuffer=require("buffer").Buffer.isBuffer}),q=t(function(e,t){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){var r;t&&(e.super_=t,(r=function(){}).prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e)}}),R=t(function(e,t){try{if("function"!=typeof(r=require("util")).inherits)throw"";t.exports=r.inherits}catch(e){t.exports=q()}var r}),V=t(function(e,t){var o=P().Buffer,r=require("util");function n(){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");this.head=null,this.tail=null,this.length=0}t.exports=(n.prototype.push=function(e){e={data:e,next:null};0<this.length?this.tail.next=e:this.head=e,this.tail=e,++this.length},n.prototype.unshift=function(e){e={data:e,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},n.prototype.shift=function(){var e;if(0!==this.length)return e=this.head.data,1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e},n.prototype.clear=function(){this.head=this.tail=null,this.length=0},n.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},n.prototype.concat=function(e){if(0===this.length)return o.alloc(0);for(var t,r,n=o.allocUnsafe(e>>>0),i=this.head,a=0;i;)t=i.data,r=a,t.copy(n,r),a+=i.data.length,i=i.next;return n},n),r&&r.inspect&&r.inspect.custom&&(t.exports.prototype[r.inspect.custom]=function(){var e=r.inspect({length:this.length});return this.constructor.name+" "+e})}),j=t(function(e,t){var a=I();function o(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,a.nextTick(o,this,e)):a.nextTick(o,this,e)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,a.nextTick(o,r,e)):a.nextTick(o,r,e):t&&t(e)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}),Z=t(function(e,t){t.exports=require("util").deprecate}),h=t(function(e,t){var d=I();function f(a){var o=this;this.next=null,this.entry=null,this.finish=function(){var e=o,t=a,r=void 0,n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}}t.exports=c;var a,h=!process.browser&&-1<["v0.10","v0.9."].indexOf(process.version.slice(0,5))?setImmediate:d.nextTick,t=(c.WritableState=s,Object.create(F())),r=(t.inherits=R(),{deprecate:Z()}),n=B(),p=P().Buffer,g=(("undefined"==typeof global?"undefined":_typeof(global))<"u"?global:("undefined"==typeof window?"undefined":_typeof(window))<"u"?window:("undefined"==typeof self?"undefined":_typeof(self))<"u"?self:{}).Uint8Array||function(){};var i,o=j();function m(){}function s(e,l){a=a||L(),e=e||{};var t=l instanceof a,r=(this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.writableObjectMode),e.highWaterMark),n=e.writableHighWaterMark,i=this.objectMode?16:16384,r=(this.highWaterMark=r||0===r?r:t&&(n||0===n)?n:i,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,(this.destroyed=!1)===e.decodeStrings);this.decodeStrings=!r,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){e=e,r=(t=l)._writableState,n=r.sync,i=r.writecb;var t,r,n,i,a=r;{var o,s,c,u;(a.writing=!1,a.writecb=null,a.length-=a.writelen,a.writelen=0,e)?(a=t,s=n,c=e,u=i,--(o=r).pendingcb,s?(d.nextTick(u,c),d.nextTick(w,a,o),a._writableState.errorEmitted=!0,a.emit("error",c)):(u(c),a._writableState.errorEmitted=!0,a.emit("error",c),w(a,o))):((e=b(r))||r.corked||r.bufferProcessing||!r.bufferedRequest||y(t,r),n?h(v,t,r,e,i):v(t,r,e,i))}},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new f(this)}t.inherits(c,n),s.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t};try{Object.defineProperty(s.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}function c(e){if(a=a||L(),!(i.call(c,this)||this instanceof a))return new c(e);this._writableState=new s(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final)&&(this._final=e.final),n.call(this)}function _(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function v(e,t,r,n){var i;r||(r=e,0===(i=t).length&&i.needDrain&&(i.needDrain=!1,r.emit("drain"))),t.pendingcb--,n(),w(e,t)}function y(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),n=t.corkedRequestsFree;n.entry=r;for(var a=0,o=!0;r;)(i[a]=r).isBuf||(o=!1),r=r.next,a+=1;i.allBuffers=o,_(e,t,!0,t.length,i,"",n.finish),t.pendingcb++,t.lastBufferedRequest=null,n.next?(t.corkedRequestsFree=n.next,n.next=null):t.corkedRequestsFree=new f(t),t.bufferedRequestCount=0}else{for(;r;){var s=r.chunk,c=r.encoding,u=r.callback;if(_(e,t,!1,t.objectMode?1:s.length,s,c,u),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function b(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function u(t,r){t._final(function(e){r.pendingcb--,e&&t.emit("error",e),r.prefinished=!0,t.emit("prefinish"),w(t,r)})}function w(e,t){var r,n,i=b(t);return i&&(r=e,(n=t).prefinished||n.finalCalled||("function"==typeof r._final?(n.pendingcb++,n.finalCalled=!0,d.nextTick(u,r,n)):(n.prefinished=!0,r.emit("prefinish"))),0===t.pendingcb)&&(t.finished=!0,e.emit("finish")),i}"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(i=Function.prototype[Symbol.hasInstance],Object.defineProperty(c,Symbol.hasInstance,{value:function(e){return!!i.call(this,e)||this===c&&e&&e._writableState instanceof s}})):i=function(e){return e instanceof this},c.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},c.prototype.write=function(e,t,r){var n,i,a,o,s,c,u,l=this._writableState,f=!1,h=!l.objectMode&&(h=e,p.isBuffer(h)||h instanceof g);return h&&!p.isBuffer(e)&&(u=e,e=p.from(u)),"function"==typeof t&&(r=t,t=null),t=h?"buffer":t||l.defaultEncoding,"function"!=typeof r&&(r=m),l.ended?(u=this,s=r,c=new Error("write after end"),u.emit("error",c),d.nextTick(s,c)):(h||(s=this,c=l,i=r,o=!(a=!0),null===(n=e)?o=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||c.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(s.emit("error",o),d.nextTick(i,o),a=!1),a))&&(l.pendingcb++,f=((e,t,r,n,i,a)=>{r||(s=((e,t,r)=>t=e.objectMode||!1===e.decodeStrings||"string"!=typeof t?t:p.from(t,r))(t,n,i),n!==s&&(r=!0,i="buffer",n=s));var o,s=t.objectMode?1:n.length,c=(t.length+=s,t.length<t.highWaterMark);return c||(t.needDrain=!0),t.writing||t.corked?(o=t.lastBufferedRequest,t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},o?o.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1):_(e,t,!1,s,n,i,a),c})(this,l,h,e,t,r)),f},c.prototype.cork=function(){this._writableState.corked++},c.prototype.uncork=function(){var e=this._writableState;!e.corked||(e.corked--,e.writing)||e.corked||e.bufferProcessing||!e.bufferedRequest||y(this,e)},c.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),-1<["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase()))return this._writableState.defaultEncoding=e,this;throw new TypeError("Unknown encoding: "+e)},Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),c.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},c.prototype._writev=null,c.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,t=e=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||(e=this,t=r,(r=n).ending=!0,w(e,r),t&&(r.finished?d.nextTick(t):e.once("finish",t)),r.ended=!0,e.writable=!1)},Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),c.prototype.destroy=o.destroy,c.prototype._undestroy=o.undestroy,c.prototype._destroy=function(e,t){this.end(),t(e)}}),L=t(function(e,t){var r,n,i,a=I(),o=Object.keys||function(e){var t,r=[];for(t in e)r.push(t);return r},t=(t.exports=u,Object.create(F())),s=(t.inherits=R(),d()),c=h();for(t.inherits(u,s),r=o(c.prototype),i=0;i<r.length;i++)n=r[i],u.prototype[n]||(u.prototype[n]=c.prototype[n]);function u(e){if(!(this instanceof u))return new u(e);s.call(this,e),c.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",l)}function l(){this.allowHalfOpen||this._writableState.ended||a.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),u.prototype._destroy=function(e,t){this.push(null),this.end(),a.nextTick(t,e)}}),N=t(function(e){var r=P().Buffer,n=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t=(e=>{if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}})(e);if("string"==typeof t||r.isEncoding!==n&&n(e))return t||e;throw new Error("Unknown encoding: "+e)}function t(e){var t;switch(this.encoding=i(e),this.encoding){case"utf16le":this.text=s,this.end=c,t=4;break;case"utf8":this.fillLast=o,t=4;break;case"base64":this.text=u,this.end=l,t=3;break;default:return this.write=f,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function o(e){var t,r=this.lastTotal-this.lastNeed,n=(t=this,128!=(192&(n=e)[0])?(t.lastNeed=0,"�"):1<t.lastNeed&&1<n.length?128!=(192&n[1])?(t.lastNeed=1,"�"):2<t.lastNeed&&2<n.length&&128!=(192&n[2])?(t.lastNeed=2,"�"):void 0:void 0);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,r,0,e.length),void(this.lastNeed-=e.length))}function s(e,t){if((e.length-t)%2!=0)return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1);t=e.toString("utf16le",t);if(t){var r=t.charCodeAt(t.length-1);if(55296<=r&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}function c(e){var t,e=e&&e.length?this.write(e):"";return this.lastNeed?(t=this.lastTotal-this.lastNeed,e+this.lastChar.toString("utf16le",0,t)):e}function u(e,t){var r=(e.length-t)%3;return 0==r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1==r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function l(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}(e.StringDecoder=t).prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},t.prototype.end=function(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+"�":e},t.prototype.text=function(e,t){var r=((e,t,r)=>{var n,i=t.length-1;return i<r?0:0<=(n=a(t[i]))?(0<n&&(e.lastNeed=n-1),n):--i<r||-2===n?0:0<=(n=a(t[i]))?(0<n&&(e.lastNeed=n-2),n):!(--i<r||-2===n)&&0<=(n=a(t[i]))?(0<n&&(2===n?n=0:e.lastNeed=n-3),n):0})(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;r=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},t.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}),d=t(function(e,t){function g(e,t){return e.listeners(t).length}var a,m=I(),_=(t.exports=u,U()),r=(u.ReadableState=i,require("events").EventEmitter,B()),f=P().Buffer,h=(("undefined"==typeof global?"undefined":_typeof(global))<"u"?global:("undefined"==typeof window?"undefined":_typeof(window))<"u"?window:("undefined"==typeof self?"undefined":_typeof(self))<"u"?self:{}).Uint8Array||function(){};var o,t=Object.create(F()),n=(t.inherits=R(),require("util")),v=void 0,v=n&&n.debuglog?n.debuglog("stream"):function(){},s=V(),n=j(),c=(t.inherits(u,r),["error","close","destroy","pause","resume"]);function i(e,t){e=e||{};var t=t instanceof(a=a||L()),r=(this.objectMode=!!e.objectMode,t&&(this.objectMode=this.objectMode||!!e.readableObjectMode),e.highWaterMark),n=e.readableHighWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:t&&(n||0===n)?n:i,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new s,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(o=o||N().StringDecoder,this.decoder=new o(e.encoding),this.encoding=e.encoding)}function u(e){if(a=a||L(),!(this instanceof u))return new u(e);this._readableState=new i(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy)&&(this._destroy=e.destroy),r.call(this)}function l(e,t,r,n,i){var a,o,s,c,u,l=e._readableState;return null===t?(l.reading=!1,o=e,(c=l).ended||(c.decoder&&(s=c.decoder.end())&&s.length&&(c.buffer.push(s),c.length+=c.objectMode?1:s.length),c.ended=!0,b(o))):(i||(s=l,a=u=(e=>f.isBuffer(e)||e instanceof h)(c=t)||"string"==typeof c||void 0===c||s.objectMode?u:new TypeError("Invalid non-string/buffer chunk")),a?e.emit("error",a):l.objectMode||t&&0<t.length?("string"==typeof t||l.objectMode||Object.getPrototypeOf(t)===f.prototype||(o=t,t=f.from(o)),n?l.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):d(e,l,t,!0):l.ended?e.emit("error",new Error("stream.push() after EOF")):(l.reading=!1,!l.decoder||r||(t=l.decoder.write(t),l.objectMode)||0!==t.length?d(e,l,t,!1):k(e,l))):n||(l.reading=!1)),!(i=l).ended&&(i.needReadable||i.length<i.highWaterMark||0===i.length)}function d(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&b(e)),k(e,t)}Object.defineProperty(u.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),u.prototype.destroy=n.destroy,u.prototype._undestroy=n.undestroy,u.prototype._destroy=function(e,t){this.push(null),t(e)},u.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=f.from(e,t),t=""),r=!0),l(this,e,t,!1,r)},u.prototype.unshift=function(e){return l(this,e,null,!0,!1)},u.prototype.isPaused=function(){return!1===this._readableState.flowing},u.prototype.setEncoding=function(e){return o=o||N().StringDecoder,this._readableState.decoder=new o(e),this._readableState.encoding=e,this};var p=8388608;function y(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?(t.flowing&&t.length?t.buffer.head.data:t).length:(e>t.highWaterMark&&(t.highWaterMark=(p<=(r=e)?r=p:(r--,r=(r=(r=(r=(r|=r>>>1)|r>>>2)|r>>>4)|r>>>8)|r>>>16,r++),r)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));var r}function b(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(v("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?m.nextTick(w,e):w(e))}function w(e){v("emit readable"),e.emit("readable"),A(e)}function k(e,t){t.readingMore||(t.readingMore=!0,m.nextTick(S,e,t))}function S(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(v("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function C(e){v("readable nexttick read 0"),e.read(0)}function E(e,t){t.reading||(v("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),A(e),t.flowing&&!t.reading&&e.read(0)}function A(e){var t=e._readableState;for(v("flow",t.flowing);t.flowing&&null!==e.read(););}function x(e,t){var r,n,i;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):(e=e,n=t.buffer,t=t.decoder,e<n.head.data.length?(i=n.head.data.slice(0,e),n.head.data=n.head.data.slice(e)):i=e===n.head.data.length?n.shift():(t?(e,t)=>{var r=t.head,n=1,i=r.data;for(e-=i.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(i+=o===a.length?a:a.slice(0,e),0===(e-=o)){o===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r).data=a.slice(o);break}++n}return t.length-=n,i}:(e,t)=>{var r=f.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),0===(e-=o)){o===a.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n).data=a.slice(o);break}++i}return t.length-=i,r})(e,n),r=i),r)}function D(e){var t=e._readableState;if(0<t.length)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,m.nextTick(O,t,e))}function O(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function T(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}u.prototype.read=function(e){v("read",e),e=parseInt(e,10);var t,r=this._readableState,n=e;return 0!==e&&(r.emittedReadable=!1),0===e&&r.needReadable&&(r.length>=r.highWaterMark||r.ended)?(v("read: emitReadable",r.length,r.ended),(0===r.length&&r.ended?D:b)(this),null):0===(e=y(e,r))&&r.ended?(0===r.length&&D(this),null):(t=r.needReadable,v("need readable",t),(0===r.length||r.length-e<r.highWaterMark)&&v("length less than watermark",t=!0),r.ended||r.reading?v("reading or ended",t=!1):t&&(v("do read"),r.reading=!0,r.sync=!0,0===r.length&&(r.needReadable=!0),this._read(r.highWaterMark),r.sync=!1,r.reading||(e=y(n,r))),null===(t=0<e?x(e,r):null)?(r.needReadable=!0,e=0):r.length-=e,0===r.length&&(r.ended||(r.needReadable=!0),n!==e)&&r.ended&&D(this),null!==t&&this.emit("data",t),t)},u.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},u.prototype.pipe=function(r,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=r;break;case 1:i.pipes=[i.pipes,r];break;default:i.pipes.push(r)}i.pipesCount+=1,v("pipe count=%d opts=%j",i.pipesCount,e);e=(!e||!1!==e.end)&&r!==process.stdout&&r!==process.stderr?o:p;function a(e,t){v("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,v("cleanup"),r.removeListener("close",h),r.removeListener("finish",d),r.removeListener("drain",s),r.removeListener("error",f),r.removeListener("unpipe",a),n.removeListener("end",o),n.removeListener("end",p),n.removeListener("data",l),c=!0,!i.awaitDrain||r._writableState&&!r._writableState.needDrain||s())}function o(){v("onend"),r.end()}i.endEmitted?m.nextTick(e):n.once("end",e),r.on("unpipe",a);t=n;var t,s=function(){var e=t._readableState;v("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&g(t,"data")&&(e.flowing=!0,A(t))},c=(r.on("drain",s),!1);var u=!1;function l(e){v("ondata"),(u=!1)!==r.write(e)||u||((1===i.pipesCount&&i.pipes===r||1<i.pipesCount&&-1!==T(i.pipes,r))&&!c&&(v("false write response, pause",i.awaitDrain),i.awaitDrain++,u=!0),n.pause())}function f(e){v("onerror",e),p(),r.removeListener("error",f),0===g(r,"error")&&r.emit("error",e)}function h(){r.removeListener("finish",d),p()}function d(){v("onfinish"),r.removeListener("close",h),p()}function p(){v("unpipe"),n.unpipe(r)}return n.on("data",l),((e,t,r)=>{if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?_(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)})(r,"error",f),r.once("close",h),r.once("finish",d),r.emit("pipe",n),i.flowing||(v("pipe resume"),n.resume()),r},u.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0!==t.pipesCount)if(1===t.pipesCount)e&&e!==t.pipes||(e=e||t.pipes,t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r));else if(e){var n=T(t.pipes,e);-1!==n&&(t.pipes.splice(n,1),--t.pipesCount,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r))}else{var i=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<a;o++)i[o].emit("unpipe",this,{hasUnpiped:!1})}return this},u.prototype.addListener=u.prototype.on=function(e,t){t=r.prototype.on.call(this,e,t);return"data"===e?!1!==this._readableState.flowing&&this.resume():"readable"!==e||(e=this._readableState).endEmitted||e.readableListening||(e.readableListening=e.needReadable=!0,e.emittedReadable=!1,e.reading?e.length&&b(this):m.nextTick(C,this)),t},u.prototype.resume=function(){var e,t=this._readableState;return t.flowing||(v("resume"),t.flowing=!0,e=this,(t=t).resumeScheduled||(t.resumeScheduled=!0,m.nextTick(E,e,t))),this},u.prototype.pause=function(){return v("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(v("pause"),this._readableState.flowing=!1,this.emit("pause")),this},u.prototype.wrap=function(t){var e,r=this,n=this._readableState,i=!1;for(e in t.on("end",function(){var e;v("wrapped end"),n.decoder&&!n.ended&&(e=n.decoder.end())&&e.length&&r.push(e),r.push(null)}),t.on("data",function(e){v("wrapped data"),n.decoder&&(e=n.decoder.write(e)),n.objectMode&&null==e||!(n.objectMode||e&&e.length)||r.push(e)||(i=!0,t.pause())}),t)void 0===this[e]&&"function"==typeof t[e]&&(this[e]=(e=>function(){return t[e].apply(t,arguments)})(e));for(var a=0;a<c.length;a++)t.on(c[a],this.emit.bind(this,c[a]));return this._read=function(e){v("wrapped _read",e),i&&(i=!1,t.resume())},this},Object.defineProperty(u.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),u._fromList=x}),a=t(function(e,t){t.exports=r;var n=L(),t=Object.create(F());function r(e){if(!(this instanceof r))return new r(e);n.call(this,e),this._transformState={afterTransform:function(e,t){var r=this._transformState,n=(r.transforming=!1,r.writecb);if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,(r.writecb=null)!=t&&this.push(t),n(e),(r=this._readableState).reading=!1,(r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush)&&(this._flush=e.flush),this.on("prefinish",i)}function i(){var r=this;"function"==typeof this._flush?this._flush(function(e,t){a(r,e,t)}):a(this,null,null)}function a(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");e.push(null)}t.inherits=R(),t.inherits(r,n),r.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},r.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},r.prototype._write=function(e,t,r){var n=this._transformState;n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming&&(r=this._readableState,n.needTransform||r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)},r.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},r.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,function(e){t(e),r.emit("close")})}}),K=t(function(e,t){t.exports=n;var r=a(),t=Object.create(F());function n(e){if(!(this instanceof n))return new n(e);r.call(this,e)}t.inherits=R(),t.inherits(n,r),n.prototype._transform=function(e,t,r){r(null,e)}}),o=t(function(e,t){var r=require("stream");"disable"===process.env.READABLE_STREAM&&r?(t.exports=r,(e=t.exports=r.Readable).Readable=r.Readable,e.Writable=r.Writable,e.Duplex=r.Duplex,e.Transform=r.Transform,e.PassThrough=r.PassThrough,e.Stream=r):((e=t.exports=d()).Stream=r||e,(e.Readable=e).Writable=h(),e.Duplex=L(),e.Transform=a(),e.PassThrough=K())}),p=t(function(t){if(t.base64=!0,t.array=!0,t.string=!0,t.arraybuffer=("undefined"==typeof ArrayBuffer?"undefined":_typeof(ArrayBuffer))<"u"&&("undefined"==typeof Uint8Array?"undefined":_typeof(Uint8Array))<"u",t.nodebuffer=("undefined"==typeof Buffer?"undefined":_typeof(Buffer))<"u",t.uint8array=("undefined"==typeof Uint8Array?"undefined":_typeof(Uint8Array))<"u","u"<("undefined"==typeof ArrayBuffer?"undefined":_typeof(ArrayBuffer)))t.blob=!1;else{r=new ArrayBuffer(0);try{t.blob=0===new Blob([r],{type:"application/zip"}).size}catch(e){try{(n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder)).append(r),t.blob=0===n.getBlob("application/zip").size}catch(e){t.blob=!1}}}var r,n;try{t.nodestream=!!o().Readable}catch(e){t.nodestream=!1}}),g=t(function(e){var f=C(),h=p(),d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e.encode=function(e){for(var t,r,n,i,a,o,s=[],c=0,u=e.length,l="string"!==f.getTypeOf(e);c<e.length;)o=u-c,n=l?(t=e[c++],r=c<u?e[c++]:0,c<u?e[c++]:0):(t=e.charCodeAt(c++),r=c<u?e.charCodeAt(c++):0,c<u?e.charCodeAt(c++):0),i=(3&t)<<4|r>>4,a=1<o?(15&r)<<2|n>>6:64,o=2<o?63&n:64,s.push(d.charAt(t>>2)+d.charAt(i)+d.charAt(a)+d.charAt(o));return s.join("")},e.decode=function(e){var t,r,n,i,a,o,s=0,c=0;if("data:"===e.substr(0,"data:".length))throw new Error("Invalid base64 input, it looks like a data url.");var u,l=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===d.charAt(64)&&l--,e.charAt(e.length-2)===d.charAt(64)&&l--,l%1!=0)throw new Error("Invalid base64 input, bad content length.");for(u=new(h.uint8array?Uint8Array:Array)(0|l);s<e.length;)n=d.indexOf(e.charAt(s++)),t=(15&(i=d.indexOf(e.charAt(s++))))<<4|(a=d.indexOf(e.charAt(s++)))>>2,r=(3&a)<<6|(o=d.indexOf(e.charAt(s++))),u[c++]=n<<2|i>>4,64!==a&&(u[c++]=t),64!==o&&(u[c++]=r);return u}}),y=t(function(e,t){t.exports={isNode:("undefined"==typeof Buffer?"undefined":_typeof(Buffer))<"u",newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){return Buffer.alloc?Buffer.alloc(e):((e=new Buffer(e)).fill(0),e)},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}}),Y=t(function(e,t){t.exports="function"==typeof setImmediate?setImmediate:function(){var e=[].slice.apply(arguments);e.splice(1,0,0),setTimeout.apply(null,e)}}),$=t(function(e,t){var r,n,i,a,o=global.MutationObserver||global.WebKitMutationObserver,s=process.browser?o?(r=0,o=new o(u),n=global.document.createTextNode(""),o.observe(n,{characterData:!0}),function(){n.data=r=++r%2}):!global.setImmediate&&_typeof(global.MessageChannel)<"u"?((i=new global.MessageChannel).port1.onmessage=u,function(){i.port2.postMessage(0)}):"document"in global&&"onreadystatechange"in global.document.createElement("script")?function(){var e=global.document.createElement("script");e.onreadystatechange=function(){u(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},global.document.documentElement.appendChild(e)}:function(){setTimeout(u,0)}:function(){process.nextTick(u)},c=[];function u(){a=!0;for(var e,t,r=c.length;r;){for(t=c,c=[],e=-1;++e<r;)t[e]();r=c.length}a=!1}t.exports=function(e){1!==c.push(e)||a||s()}}),X=t(function(e,t){var i=$();function c(){}var a,u={},o=["REJECTED"],s=["FULFILLED"],n=["PENDING"];function r(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=n,this.queue=[],this.outcome=void 0,process.browser||(this.handled=a),e!==c&&d(this,e)}function l(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function f(t,r,n){i(function(){var e;try{e=r(n)}catch(e){return u.reject(t,e)}e===t?u.reject(t,new TypeError("Cannot resolve promise with itself")):u.resolve(t,e)})}function h(e){var t=e&&e.then;if(e&&("object"==_typeof(e)||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function d(t,e){var r=!1;function n(e){r||(r=!0,u.reject(t,e))}function i(e){r||(r=!0,u.resolve(t,e))}var a=p(function(){e(i,n)});"error"===a.status&&n(a.value)}function p(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}process.browser||(a=["UNHANDLED"]),(t.exports=r).prototype.finally=function(t){var r;return"function"!=typeof t?this:(r=this.constructor,this.then(function(e){return r.resolve(t()).then(function(){return e})},function(e){return r.resolve(t()).then(function(){throw e})}))},r.prototype.catch=function(e){return this.then(null,e)},r.prototype.then=function(e,t){var r;return"function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===o?this:(r=new this.constructor(c),process.browser||this.handled===a&&(this.handled=null),this.state!==n?f(r,this.state===s?e:t,this.outcome):this.queue.push(new l(r,e,t)),r)},l.prototype.callFulfilled=function(e){u.resolve(this.promise,e)},l.prototype.otherCallFulfilled=function(e){f(this.promise,this.onFulfilled,e)},l.prototype.callRejected=function(e){u.reject(this.promise,e)},l.prototype.otherCallRejected=function(e){f(this.promise,this.onRejected,e)},u.resolve=function(e,t){var r=p(h,t);if("error"===r.status)return u.reject(e,r.value);r=r.value;if(r)d(e,r);else{e.state=s,e.outcome=t;for(var n=-1,i=e.queue.length;++n<i;)e.queue[n].callFulfilled(t)}return e},u.reject=function(e,t){e.state=o,e.outcome=t,process.browser||e.handled===a&&i(function(){e.handled===a&&process.emit("unhandledRejection",t,e)});for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},r.resolve=function(e){return e instanceof this?e:u.resolve(new this(c),e)},r.reject=function(e){var t=new this(c);return u.reject(t,e)},r.all=function(e){var r=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,i=!1;if(!n)return this.resolve([]);for(var a=new Array(n),o=0,t=-1,s=new this(c);++t<n;)((e,t)=>{r.resolve(e).then(function(e){a[t]=e,++o!==n||i||(i=!0,u.resolve(s,a))},function(e){i||(i=!0,u.reject(s,e))})})(e[t],t);return s},r.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var i=-1,a=new this(c);++i<r;)(e=>{t.resolve(e).then(function(e){n||(n=!0,u.resolve(a,e))},function(e){n||(n=!0,u.reject(a,e))})})(e[i]);return a}}),m=t(function(e,t){var r=null,r=("undefined"==typeof Promise?"undefined":_typeof(Promise))<"u"?Promise:X();t.exports={Promise:r}}),C=t(function(o){var s=p(),c=g(),t=y(),n=Y(),u=m();function e(e){return e}function l(e,t){for(var r=0;r<e.length;++r)t[r]=255&e.charCodeAt(r);return t}o.newBlob=function(t,r){o.checkSupport("blob");try{return new Blob([t],{type:r})}catch(e){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(t),n.getBlob(r)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var i={stringifyByChunk:function(e,t,r){var n=[],i=0,a=e.length;if(a<=r)return String.fromCharCode.apply(null,e);for(;i<a;)n.push("array"===t||"nodebuffer"===t?String.fromCharCode.apply(null,e.slice(i,Math.min(i+r,a))):String.fromCharCode.apply(null,e.subarray(i,Math.min(i+r,a)))),i+=r;return n.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:(()=>{try{return s.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}})(),nodebuffer:(()=>{try{return s.nodebuffer&&1===String.fromCharCode.apply(null,t.allocBuffer(1)).length}catch(e){return!1}})()}};function r(e){var t=65536,r=o.getTypeOf(e),n=!0;if("uint8array"===r?n=i.applyCanBeUsed.uint8array:"nodebuffer"===r&&(n=i.applyCanBeUsed.nodebuffer),n)for(;1<t;)try{return i.stringifyByChunk(e,r,t)}catch(e){t=Math.floor(t/2)}return i.stringifyByChar(e)}function a(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}o.applyFromCharCode=r;var f={};f.string={string:e,array:function(e){return l(e,new Array(e.length))},arraybuffer:function(e){return f.string.uint8array(e).buffer},uint8array:function(e){return l(e,new Uint8Array(e.length))},nodebuffer:function(e){return l(e,t.allocBuffer(e.length))}},f.array={string:r,array:e,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return t.newBufferFrom(e)}},f.arraybuffer={string:function(e){return r(new Uint8Array(e))},array:function(e){return a(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:e,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return t.newBufferFrom(new Uint8Array(e))}},f.uint8array={string:r,array:function(e){return a(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:e,nodebuffer:function(e){return t.newBufferFrom(e)}},f.nodebuffer={string:r,array:function(e){return a(e,new Array(e.length))},arraybuffer:function(e){return f.nodebuffer.uint8array(e).buffer},uint8array:function(e){return a(e,new Uint8Array(e.length))},nodebuffer:e},o.transformTo=function(e,t){if(t=t||"",!e)return t;o.checkSupport(e);var r=o.getTypeOf(t);return f[r][e](t)},o.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":s.nodebuffer&&t.isBuffer(e)?"nodebuffer":s.uint8array&&e instanceof Uint8Array?"uint8array":s.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},o.checkSupport=function(e){if(!s[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},o.MAX_VALUE_16BITS=65535,o.MAX_VALUE_32BITS=-1,o.pretty=function(e){for(var t,r="",n=0;n<(e||"").length;n++)r+="\\x"+((t=e.charCodeAt(n))<16?"0":"")+t.toString(16).toUpperCase();return r},o.delay=function(e,t,r){n(function(){e.apply(r||null,t||[])})},o.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r},o.extend=function(){for(var e,t={},r=0;r<arguments.length;r++)for(e in arguments[r])arguments[r].hasOwnProperty(e)&&"u"<_typeof(t[e])&&(t[e]=arguments[r][e]);return t},o.prepareContent=function(r,e,n,i,a){return u.Promise.resolve(e).then(function(n){return s.blob&&(n instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(n)))&&("undefined"==typeof FileReader?"undefined":_typeof(FileReader))<"u"?new u.Promise(function(t,r){var e=new FileReader;e.onload=function(e){t(e.target.result)},e.onerror=function(e){r(e.target.error)},e.readAsArrayBuffer(n)}):n}).then(function(e){var t=o.getTypeOf(e);return t?("arraybuffer"===t?e=o.transformTo("uint8array",e):"string"===t&&(a?e=c.decode(e):n&&!0!==i&&(e=l(t=e,new(s.uint8array?Uint8Array:Array)(t.length)))),e):u.Promise.reject(new Error("Can't read the data of '"+r+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}}),E=t(function(e,t){function r(e){this.name=e||"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}r.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.end()}),e.on("error",function(e){t.error(e)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){var e;return!(!this.isPaused||this.isFinished||(e=this.isPaused=!1,this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),e))},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=r}),A=t(function(i){for(var e,c=C(),u=p(),l=y(),t=E(),f=new Array(256),e=0;e<256;e++)f[e]=252<=e?6:248<=e?5:240<=e?4:224<=e?3:192<=e?2:1;f[254]=f[254]=1;function r(){t.call(this,"utf-8 decode"),this.leftOver=null}function n(){t.call(this,"utf-8 encode")}i.utf8encode=function(e){if(u.nodebuffer)return l.newBufferFrom(e,"utf-8");for(var t,r,n,i,a=e,o=a.length,s=0,c=0;c<o;c++)55296==(64512&(r=a.charCodeAt(c)))&&c+1<o&&56320==(64512&(n=a.charCodeAt(c+1)))&&(r=65536+(r-55296<<10)+(n-56320),c++),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new(u.uint8array?Uint8Array:Array)(s),c=i=0;i<s;c++)55296==(64512&(r=a.charCodeAt(c)))&&c+1<o&&56320==(64512&(n=a.charCodeAt(c+1)))&&(r=65536+(r-55296<<10)+(n-56320),c++),r<128?t[i++]=r:(r<2048?t[i++]=192|r>>>6:(r<65536?t[i++]=224|r>>>12:(t[i++]=240|r>>>18,t[i++]=128|r>>>12&63),t[i++]=128|r>>>6&63),t[i++]=128|63&r);return t},i.utf8decode=function(e){if(u.nodebuffer)return c.transformTo("nodebuffer",e).toString("utf-8");for(var t,r,n=e=c.transformTo(u.uint8array?"uint8array":"array",e),i=n.length,a=new Array(2*i),o=0,s=0;s<i;)if((t=n[s++])<128)a[o++]=t;else if(4<(r=f[t]))a[o++]=65533,s+=r-1;else{for(t&=2===r?31:3===r?15:7;1<r&&s<i;)t=t<<6|63&n[s++],r--;1<r?a[o++]=65533:t<65536?a[o++]=t:(t-=65536,a[o++]=55296|t>>10&1023,a[o++]=56320|1023&t)}return a.length!==o&&(a.subarray?a=a.subarray(0,o):a.length=o),c.applyFromCharCode(a)},c.inherits(r,t),r.prototype.processChunk=function(e){var t=c.transformTo(u.uint8array?"uint8array":"array",e.data),r=(this.leftOver&&this.leftOver.length&&(u.uint8array?(r=t,(t=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),t.set(r,this.leftOver.length)):t=this.leftOver.concat(t),this.leftOver=null),((e,t)=>{for(var r=(t=(t=t||e.length)>e.length?e.length:t)-1;0<=r&&128==(192&e[r]);)r--;return!(r<0||0===r)&&r+f[e[r]]>t?r:t})(t)),n=t;r!==t.length&&(u.uint8array?(n=t.subarray(0,r),this.leftOver=t.subarray(r,t.length)):(n=t.slice(0,r),this.leftOver=t.slice(r,t.length))),this.push({data:i.utf8decode(n),meta:e.meta})},r.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:i.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},i.Utf8DecodeWorker=r,c.inherits(n,t),n.prototype.processChunk=function(e){this.push({data:i.utf8encode(e.data),meta:e.meta})},i.Utf8EncodeWorker=n}),Q=t(function(e,t){var r=E(),n=C();function i(e){r.call(this,"ConvertWorker to "+e),this.destType=e}n.inherits(i,r),i.prototype.processChunk=function(e){this.push({data:n.transformTo(this.destType,e.data),meta:e.meta})},t.exports=i}),ee=t(function(e,t){var i=o().Readable;function r(e,t,r){i.call(this,t),this._helper=e;var n=this;e.on("data",function(e,t){n.push(e)||n._helper.pause(),r&&r(t)}).on("error",function(e){n.emit("error",e)}).on("end",function(){n.push(null)})}C().inherits(r,i),r.prototype._read=function(){this._helper.resume()},t.exports=r}),x=t(function(e,t){var c=C(),i=Q(),a=E(),u=g(),r=p(),n=m(),o=null;if(r.nodestream)try{o=ee()}catch(e){}function s(e,s){return new n.Promise(function(t,r){var n=[],i=e._internalType,a=e._outputType,o=e._mimeType;e.on("data",function(e,t){n.push(e),s&&s(t)}).on("error",function(e){n=[],r(e)}).on("end",function(){try{var e=((e,t,r)=>{switch(e){case"blob":return c.newBlob(c.transformTo("arraybuffer",t),r);case"base64":return u.encode(t);default:return c.transformTo(e,t)}})(a,((e,t)=>{for(var r=0,n=null,i=0,a=0;a<t.length;a++)i+=t[a].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(n=new Uint8Array(i),a=0;a<t.length;a++)n.set(t[a],r),r+=t[a].length;return n;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}})(i,n),o);t(e)}catch(e){r(e)}n=[]}).resume()})}function l(e,t,r){var n=t;switch(t){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string"}try{this._internalType=n,this._outputType=t,this._mimeType=r,c.checkSupport(n),this._worker=e.pipe(new i(n)),e.lock()}catch(e){this._worker=new a("error"),this._worker.error(e)}}l.prototype={accumulate:function(e){return s(this,e)},on:function(e,t){var r=this;return"data"===e?this._worker.on(e,function(e){t.call(r,e.data,e.meta)}):this._worker.on(e,function(){c.delay(t,arguments,r)}),this},resume:function(){return c.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(c.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new o(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=l}),D=t(function(e){e.base64=!1,e.binary=!1,e.dir=!1,e.createFolders=!0,e.date=null,e.compression=null,e.compressionOptions=null,e.comment=null,e.unixPermissions=null,e.dosPermissions=null}),te=t(function(e,t){var r=C(),n=E();function i(e){n.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}r.inherits(i,n),i.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this.data=null},i.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},i.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished)||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0)},i.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=i}),l=t(function(e,t){var r=C();var s=(()=>{for(var e=[],t=0;t<256;t++){for(var r=t,n=0;n<8;n++)r=1&r?3988292384^r>>>1:r>>>1;e[t]=r}return e})();t.exports=function(e,t){return"u"<_typeof(e)||!e.length?0:("string"!==r.getTypeOf(e)?(e,t,r,n)=>{var i=s,a=n+r;e^=-1;for(var o=n;o<a;o++)e=e>>>8^i[255&(e^t[o])];return-1^e}:(e,t,r,n)=>{var i=s,a=n+r;e^=-1;for(var o=n;o<a;o++)e=e>>>8^i[255&(e^t.charCodeAt(o))];return-1^e})(0|t,e,e.length,0)}}),re=t(function(e,t){var r=E(),n=l();function i(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}C().inherits(i,r),i.prototype.processChunk=function(e){this.streamInfo.crc32=n(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=i}),ne=t(function(e,t){var r=C(),n=E();function i(e){n.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(i,n),i.prototype.processChunk=function(e){var t;e&&(t=this.streamInfo[this.propName]||0,this.streamInfo[this.propName]=t+e.data.length),n.prototype.processChunk.call(this,e)},t.exports=i}),O=t(function(e,t){var r=m(),n=te(),i=re(),a=ne();function o(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i}o.prototype={getContentWorker:function(){var e=new n(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new n(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(e,t,r){return e.pipe(new i).pipe(new a("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=o}),ie=t(function(e,t){for(var r,a=x(),n=te(),o=A(),i=O(),s=E(),c=function(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}},u=(c.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var n="string"===(r=e.toLowerCase())||"text"===r,i=("binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker(),!this._dataBinary);i&&!n&&(t=t.pipe(new o.Utf8EncodeWorker)),!i&&n&&(t=t.pipe(new o.Utf8DecodeWorker))}catch(e){(t=new s("error")).error(e)}return new a(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){var r;return this._data instanceof i&&this._data.compression.magic===e.magic?this._data.getCompressedWorker():(r=this._decompressWorker(),this._dataBinary||(r=r.pipe(new o.Utf8EncodeWorker)),i.createWorkerFrom(r,e,t))},_decompressWorker:function(){return this._data instanceof i?this._data.getContentWorker():this._data instanceof s?this._data:new n(this._data)}},["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"]),l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},r=0;r<u.length;r++)c.prototype[u[r]]=l;t.exports=c}),J=t(function(t){var e=("undefined"==typeof Uint8Array?"undefined":_typeof(Uint8Array))<"u"&&("undefined"==typeof Uint16Array?"undefined":_typeof(Uint16Array))<"u"&&("undefined"==typeof Int32Array?"undefined":_typeof(Int32Array))<"u";t.assign=function(e){for(var t,r,n=Array.prototype.slice.call(arguments,1);n.length;){var i=n.shift();if(i){if("object"!=_typeof(i))throw new TypeError(i+"must be non-object");for(var a in i)t=i,r=a,Object.prototype.hasOwnProperty.call(t,r)&&(e[a]=i[a])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var a=0;a<n;a++)e[i+a]=t[r+a]},flattenChunks:function(e){for(var t,r,n,i=0,a=0,o=e.length;a<o;a++)i+=e[a].length;for(n=new Uint8Array(i),a=t=0,o=e.length;a<o;a++)r=e[a],n.set(r,t),t+=r.length;return n}},n={arraySet:function(e,t,r,n,i){for(var a=0;a<n;a++)e[i+a]=t[r+a]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,r)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,n))},t.setTyped(e)}),ae=t(function(e){var a=J(),l=0,f=1;function t(e){for(var t=e.length;0<=--t;)e[t]=0}var s,c,u,h=29,d=256,p=d+1+h,g=30,m=19,E=2*p+1,A=15,n=16,z=7,_=256,v=16,y=17,b=18,w=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],k=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],H=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],C=new Array(2*(p+2)),x=(t(C),new Array(2*g)),D=(t(x),new Array(512)),O=(t(D),new Array(256)),T=(t(O),new Array(h)),I=(t(T),new Array(g));function B(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function P(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function F(e){return e<256?D[e]:D[256+(e>>>7)]}function i(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function R(e,t,r){e.bi_valid>n-r?(e.bi_buf|=t<<e.bi_valid&65535,i(e,e.bi_buf),e.bi_buf=t>>n-e.bi_valid,e.bi_valid+=r-n):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function j(e,t,r){R(e,r[2*t],r[2*t+1])}function M(e,t){for(var r=0;r|=1&e,e>>>=1,r<<=1,0<--t;);return r>>>1}function G(e,t,r){for(var n,i=new Array(A+1),a=0,o=1;o<=A;o++)i[o]=a=a+r[o-1]<<1;for(n=0;n<=t;n++){var s=e[2*n+1];0!==s&&(e[2*n]=M(i[s]++,s))}}function U(e){for(var t=0;t<p;t++)e.dyn_ltree[2*t]=0;for(t=0;t<g;t++)e.dyn_dtree[2*t]=0;for(t=0;t<m;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*_]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function q(e){8<e.bi_valid?i(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function o(e,t,r,n){var i=2*t,a=2*r;return e[i]<e[a]||e[i]===e[a]&&n[t]<=n[r]}function L(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&o(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!o(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function V(e,t,r){var n,i,a,o,s=0;if(0!==e.last_lit)for(;n=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],i=e.pending_buf[e.l_buf+s],s++,0==n?j(e,i,t):(j(e,(a=O[i])+d+1,t),0!==(o=w[a])&&R(e,i-=T[a],o),j(e,a=F(--n),r),0!==(o=k[a])&&R(e,n-=I[a],o)),s<e.last_lit;);j(e,_,t)}function N(e,t){var r,n,i,a=t.dyn_tree,o=t.stat_desc.static_tree,s=t.stat_desc.has_stree,c=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=E,r=0;r<c;r++)0!==a[2*r]?(e.heap[++e.heap_len]=u=r,e.depth[r]=0):a[2*r+1]=0;for(;e.heap_len<2;)a[2*(i=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=o[2*i+1]);for(t.max_code=u,r=e.heap_len>>1;1<=r;r--)L(e,a,r);for(i=c;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],L(e,a,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,a[2*i]=a[2*r]+a[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,a[2*r+1]=a[2*n+1]=i,e.heap[1]=i++,L(e,a,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1];for(var l,f,h,d,p,g=e,m=t.dyn_tree,_=t.max_code,v=t.stat_desc.static_tree,y=t.stat_desc.has_stree,b=t.stat_desc.extra_bits,w=t.stat_desc.extra_base,k=t.stat_desc.max_length,S=0,C=0;C<=A;C++)g.bl_count[C]=0;for(m[2*g.heap[g.heap_max]+1]=0,l=g.heap_max+1;l<E;l++)k<(C=m[2*m[2*(f=g.heap[l])+1]+1]+1)&&(C=k,S++),m[2*f+1]=C,_<f||(g.bl_count[C]++,d=0,w<=f&&(d=b[f-w]),p=m[2*f],g.opt_len+=p*(C+d),!y)||(g.static_len+=p*(v[2*f+1]+d));if(0!==S){do{for(C=k-1;0===g.bl_count[C];)C--}while(g.bl_count[C]--,g.bl_count[C+1]+=2,g.bl_count[k]--,0<(S-=2));for(C=k;0!==C;C--)for(f=g.bl_count[C];0!==f;)_<(h=g.heap[--l])||(m[2*h+1]!==C&&(g.opt_len+=(C-m[2*h+1])*m[2*h],m[2*h+1]=C),f--)}G(a,u,e.bl_count)}function W(e,t,r){var n,i,a=-1,o=t[1],s=0,c=7,u=4;for(0===o&&(c=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=o,o=t[2*(n+1)+1],++s<c&&i===o||(s<u?e.bl_tree[2*i]+=s:0!==i?(i!==a&&e.bl_tree[2*i]++,e.bl_tree[2*v]++):s<=10?e.bl_tree[2*y]++:e.bl_tree[2*b]++,a=i,u=(s=0)===o?(c=138,3):i===o?(c=6,3):(c=7,4))}function Z(e,t,r){var n,i,a=-1,o=t[1],s=0,c=7,u=4;for(0===o&&(c=138,u=3),n=0;n<=r;n++)if(i=o,o=t[2*(n+1)+1],!(++s<c&&i===o)){if(s<u)for(;j(e,i,e.bl_tree),0!=--s;);else 0!==i?(i!==a&&(j(e,i,e.bl_tree),s--),j(e,v,e.bl_tree),R(e,s-3,2)):s<=10?(j(e,y,e.bl_tree),R(e,s-3,3)):(j(e,b,e.bl_tree),R(e,s-11,7));a=i,u=(s=0)===o?(c=138,3):i===o?(c=6,3):(c=7,4)}}t(I);var K=!1;function Y(e,t,r,n){R(e,0+(n?1:0),3),n=t,t=r,r=!0,q(e=e),r&&(i(e,t),i(e,~t)),a.arraySet(e.pending_buf,e.window,n,t,e.pending),e.pending+=t}e._tr_init=function(e){if(!K){for(var t,r,n,i=new Array(A+1),a=0,o=0;o<h-1;o++)for(T[o]=a,t=0;t<1<<w[o];t++)O[a++]=o;for(O[a-1]=o,o=n=0;o<16;o++)for(I[o]=n,t=0;t<1<<k[o];t++)D[n++]=o;for(n>>=7;o<g;o++)for(I[o]=n<<7,t=0;t<1<<k[o]-7;t++)D[256+n++]=o;for(r=0;r<=A;r++)i[r]=0;for(t=0;t<=143;)C[2*t+1]=8,t++,i[8]++;for(;t<=255;)C[2*t+1]=9,t++,i[9]++;for(;t<=279;)C[2*t+1]=7,t++,i[7]++;for(;t<=287;)C[2*t+1]=8,t++,i[8]++;for(G(C,p+1,i),t=0;t<g;t++)x[2*t+1]=5,x[2*t]=M(t,5);s=new B(C,w,d+1,p,A),c=new B(x,k,0,g,A),u=new B(new Array(0),H,0,m,z),K=!0}e.l_desc=new P(e.dyn_ltree,s),e.d_desc=new P(e.dyn_dtree,c),e.bl_desc=new P(e.bl_tree,u),e.bi_buf=0,e.bi_valid=0,U(e)},e._tr_stored_block=Y,e._tr_flush_block=function(e,t,r,n){var i,a,o,s=0;if(0<e.level?(2===e.strm.data_type&&(e.strm.data_type=(e=>{for(var t=4093624447,r=0;r<=31;r++,t>>>=1)if(1&t&&0!==e.dyn_ltree[2*r])return l;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return f;for(r=32;r<d;r++)if(0!==e.dyn_ltree[2*r])return f;return l})(e)),N(e,e.l_desc),N(e,e.d_desc),s=(e=>{var t;for(W(e,e.dyn_ltree,e.l_desc.max_code),W(e,e.dyn_dtree,e.d_desc.max_code),N(e,e.bl_desc),t=m-1;3<=t&&0===e.bl_tree[2*S[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),(a=e.static_len+3+7>>>3)<=(i=e.opt_len+3+7>>>3)&&(i=a)):i=a=r+5,r+4<=i&&-1!==t)Y(e,t,r,n);else if(4===e.strategy||a===i)R(e,2+(n?1:0),3),V(e,C,x);else{R(e,4+(n?1:0),3);var c=e,u=(t=e.l_desc.max_code+1,r=e.d_desc.max_code+1,s+1);for(R(c,t-257,5),R(c,r-1,5),R(c,u-4,4),o=0;o<u;o++)R(c,c.bl_tree[2*S[o]+1],3);Z(c,c.dyn_ltree,t-1),Z(c,c.dyn_dtree,r-1),V(e,e.dyn_ltree,e.dyn_dtree)}U(e),n&&q(e)},e._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(O[r]+d+1)]++,e.dyn_dtree[2*F(t)]++),e.last_lit===e.lit_bufsize-1},e._tr_align=function(e){R(e,2,3),j(e,_,C),16===(e=e).bi_valid?(i(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)}}),oe=t(function(e,t){t.exports=function(e,t,r,n){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;0!==r;){for(r-=o=2e3<r?2e3:r;a=a+(i=i+t[n++]|0)|0,--o;);i%=65521,a%=65521}return i|a<<16|0}}),se=t(function(e,t){var s=(()=>{for(var e=[],t=0;t<256;t++){for(var r=t,n=0;n<8;n++)r=1&r?3988292384^r>>>1:r>>>1;e[t]=r}return e})();t.exports=function(e,t,r,n){var i=s,a=n+r;e^=-1;for(var o=n;o<a;o++)e=e>>>8^i[255&(e^t[o])];return-1^e}}),W=t(function(e,t){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}}),ce=t(function(e){var s,f=J(),c=ae(),h=oe(),d=se(),j=W(),u=0,l=4,p=0,g=-2,L=-1,N=4,z=2,m=8,H=9,t=286,M=30,G=19,U=2*t+1,q=15,_=3,v=258,y=v+_+1,b=42,w=113,k=1,S=2,C=3,E=4;function A(e,t){return e.msg=j[t],t}function x(e){return(e<<1)-(4<e?9:0)}function D(e){for(var t=e.length;0<=--t;)e[t]=0}function O(e){var t=e.state,r=t.pending;0!==(r=e.avail_out<r?e.avail_out:r)&&(f.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending)&&(t.pending_out=0)}function T(e,t){c._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,O(e.strm)}function I(e,t){e.pending_buf[e.pending++]=t}function B(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function a(e,t){var r,n,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,c=e.w_size-y<e.strstart?e.strstart-(e.w_size-y):0,u=e.window,l=e.w_mask,f=e.prev,h=e.strstart+v,d=u[a+o-1],p=u[a+o];e.good_match<=e.prev_length&&(i>>=2),e.lookahead<s&&(s=e.lookahead);do{if(u[(r=t)+o]===p&&u[r+o-1]===d&&u[r]===u[a]&&u[++r]===u[a+1]){for(a+=2,r++;u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&a<h;);if(n=v-(h-a),a=h-v,o<n){if(e.match_start=t,s<=(o=n))break;d=u[a+o-1],p=u[a+o]}}}while((t=f[t&l])>c&&0!=--i);return o<=e.lookahead?o:e.lookahead}function P(e){var t,r,n,i,a,o,s,c,u,l=e.w_size;do{if(c=e.window_size-e.lookahead-e.strstart,l+(l-y)<=e.strstart){for(f.arraySet(e.window,e.window,l,l,0),e.match_start-=l,e.strstart-=l,e.block_start-=l,t=r=e.hash_size;n=e.head[--t],e.head[t]=l<=n?n-l:0,--r;);for(t=r=l;n=e.prev[--t],e.prev[t]=l<=n?n-l:0,--r;);c+=l}if(0===e.strm.avail_in)break;if(o=e.window,s=e.strstart+e.lookahead,c=c,u=void 0,u=(a=e.strm).avail_in,r=0===(u=c<u?c:u)?0:(a.avail_in-=u,f.arraySet(o,a.input,a.next_in,u,s),1===a.state.wrap?a.adler=h(a.adler,o,u,s):2===a.state.wrap&&(a.adler=d(a.adler,o,u,s)),a.next_in+=u,a.total_in+=u,u),e.lookahead+=r,_<=e.lookahead+e.insert)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=(e.ins_h<<e.hash_shift^e.window[i+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[i+_-1])&e.hash_mask,e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<_)););}while(e.lookahead<y&&0!==e.strm.avail_in)}function r(e,t){for(var r,n;;){if(e.lookahead<y){if(P(e),e.lookahead<y&&t===u)return k;if(0===e.lookahead)break}if(r=0,_<=e.lookahead&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+_-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-y&&(e.match_length=a(e,r)),_<=e.match_length)if(n=c._tr_tally(e,e.strstart-e.match_start,e.match_length-_),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=_){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+_-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=c._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(T(e,!1),0===e.strm.avail_out))return k}return e.insert=e.strstart<_-1?e.strstart:_-1,t===l?(T(e,!0),0===e.strm.avail_out?C:E):e.last_lit&&(T(e,!1),0===e.strm.avail_out)?k:S}function n(e,t){for(var r,n,i;;){if(e.lookahead<y){if(P(e),e.lookahead<y&&t===u)return k;if(0===e.lookahead)break}if(r=0,_<=e.lookahead&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+_-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=_-1,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-y&&(e.match_length=a(e,r),e.match_length<=5)&&(1===e.strategy||e.match_length===_&&4096<e.strstart-e.match_start)&&(e.match_length=_-1),_<=e.prev_length&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-_,n=c._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-_),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+_-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=_-1,e.strstart++,n&&(T(e,!1),0===e.strm.avail_out))return k}else if(e.match_available){if((n=c._tr_tally(e,0,e.window[e.strstart-1]))&&T(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return k}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=c._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<_-1?e.strstart:_-1,t===l?(T(e,!0),0===e.strm.avail_out?C:E):e.last_lit&&(T(e,!1),0===e.strm.avail_out)?k:S}function i(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function V(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=m,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new f.Buf16(2*U),this.dyn_dtree=new f.Buf16(2*(2*M+1)),this.bl_tree=new f.Buf16(2*(2*G+1)),D(this.dyn_ltree),D(this.dyn_dtree),D(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new f.Buf16(q+1),this.heap=new f.Buf16(2*t+1),D(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new f.Buf16(2*t+1),D(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function o(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=z,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?b:w,e.adler=2===t.wrap?0:1,t.last_flush=u,c._tr_init(t),p):A(e,g)}function F(e){var t=o(e);return t===p&&((e=e.state).window_size=2*e.w_size,D(e.head),e.max_lazy_match=s[e.level].max_lazy,e.good_match=s[e.level].good_length,e.nice_match=s[e.level].nice_length,e.max_chain_length=s[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=_-1,e.match_available=0,e.ins_h=0),t}function R(e,t,r,n,i,a){if(!e)return g;var o=1;if(t===L&&(t=6),n<0?(o=0,n=-n):15<n&&(o=2,n-=16),i<1||H<i||r!==m||n<8||15<n||t<0||9<t||a<0||N<a)return A(e,g);8===n&&(n=9);var s=new V;return(e.state=s).strm=e,s.wrap=o,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+_-1)/_),s.window=new f.Buf8(2*s.w_size),s.head=new f.Buf16(s.hash_size),s.prev=new f.Buf16(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new f.Buf8(s.pending_buf_size),s.d_buf=+s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=a,s.method=r,F(e)}s=[new i(0,0,0,0,function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(P(e),0===e.lookahead&&t===u)return k;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,T(e,!1),0===e.strm.avail_out)||e.strstart-e.block_start>=e.w_size-y&&(T(e,!1),0===e.strm.avail_out))return k}return e.insert=0,t===l?(T(e,!0),0===e.strm.avail_out?C:E):(e.strstart>e.block_start&&(T(e,!1),e.strm.avail_out),k)}),new i(4,4,8,4,r),new i(4,5,16,8,r),new i(4,6,32,32,r),new i(4,4,16,16,n),new i(8,16,32,32,n),new i(8,16,128,128,n),new i(8,32,128,256,n),new i(32,128,258,1024,n),new i(32,258,258,4096,n)],e.deflateInit=function(e,t){return R(e,t,m,15,8,0)},e.deflateInit2=R,e.deflateReset=F,e.deflateResetKeep=o,e.deflateSetHeader=function(e,t){return e&&e.state&&2===e.state.wrap?(e.state.gzhead=t,p):g},e.deflate=function(e,t){var r,n,i,a;if(!e||!e.state||5<t||t<0)return e?A(e,g):g;if(n=e.state,!e.output||!e.input&&0!==e.avail_in||666===n.status&&t!==l)return A(e,0===e.avail_out?-5:g);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===b&&(2===n.wrap?(e.adler=0,I(n,31),I(n,139),I(n,8),n.gzhead?(I(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),I(n,255&n.gzhead.time),I(n,n.gzhead.time>>8&255),I(n,n.gzhead.time>>16&255),I(n,n.gzhead.time>>24&255),I(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),I(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(I(n,255&n.gzhead.extra.length),I(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=d(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(I(n,0),I(n,0),I(n,0),I(n,0),I(n,0),I(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),I(n,3),n.status=w)):(o=m+(n.w_bits-8<<4)<<8,o|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(o|=32),o+=31-o%31,n.status=w,B(n,o),0!==n.strstart&&(B(n,e.adler>>>16),B(n,65535&e.adler)),e.adler=1)),69===n.status)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>i&&(e.adler=d(e.adler,n.pending_buf,n.pending-i,i)),O(e),i=n.pending,n.pending!==n.pending_buf_size));)I(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=d(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=d(e.adler,n.pending_buf,n.pending-i,i)),O(e),i=n.pending,n.pending===n.pending_buf_size)){a=1;break}}while(a=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,I(n,a),0!==a);n.gzhead.hcrc&&n.pending>i&&(e.adler=d(e.adler,n.pending_buf,n.pending-i,i)),0===a&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=d(e.adler,n.pending_buf,n.pending-i,i)),O(e),i=n.pending,n.pending===n.pending_buf_size)){a=1;break}}while(a=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,I(n,a),0!==a);n.gzhead.hcrc&&n.pending>i&&(e.adler=d(e.adler,n.pending_buf,n.pending-i,i)),0===a&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&O(e),n.pending+2<=n.pending_buf_size&&(I(n,255&e.adler),I(n,e.adler>>8&255),e.adler=0,n.status=w)):n.status=w),0!==n.pending){if(O(e),0===e.avail_out)return n.last_flush=-1,p}else if(0===e.avail_in&&x(t)<=x(r)&&t!==l)return A(e,-5);if(666===n.status&&0!==e.avail_in)return A(e,-5);if(0!==e.avail_in||0!==n.lookahead||t!==u&&666!==n.status){var o=2===n.strategy?((e,t)=>{for(var r;;){if(0===e.lookahead&&(P(e),0===e.lookahead)){if(t===u)return k;break}if(e.match_length=0,r=c._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(T(e,!1),0===e.strm.avail_out))return k}return e.insert=0,t===l?(T(e,!0),0===e.strm.avail_out?C:E):e.last_lit&&(T(e,!1),0===e.strm.avail_out)?k:S})(n,t):3===n.strategy?((e,t)=>{for(var r,n,i,a,o=e.window;;){if(e.lookahead<=v){if(P(e),e.lookahead<=v&&t===u)return k;if(0===e.lookahead)break}if(e.match_length=0,_<=e.lookahead&&0<e.strstart&&(n=o[i=e.strstart-1])===o[++i]&&n===o[++i]&&n===o[++i]){for(a=e.strstart+v;n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&i<a;);e.match_length=v-(a-i),e.lookahead<e.match_length&&(e.match_length=e.lookahead)}if(_<=e.match_length?(r=c._tr_tally(e,1,e.match_length-_),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=c._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(T(e,!1),0===e.strm.avail_out))return k}return e.insert=0,t===l?(T(e,!0),0===e.strm.avail_out?C:E):e.last_lit&&(T(e,!1),0===e.strm.avail_out)?k:S})(n,t):s[n.level].func(n,t);if(o!==C&&o!==E||(n.status=666),o===k||o===C)return 0===e.avail_out&&(n.last_flush=-1),p;if(o===S&&(1===t?c._tr_align(n):5!==t&&(c._tr_stored_block(n,0,0,!1),3===t)&&(D(n.head),0===n.lookahead)&&(n.strstart=0,n.block_start=0,n.insert=0),O(e),0===e.avail_out))return n.last_flush=-1,p}return t!==l||!(n.wrap<=0)&&(2===n.wrap?(I(n,255&e.adler),I(n,e.adler>>8&255),I(n,e.adler>>16&255),I(n,e.adler>>24&255),I(n,255&e.total_in),I(n,e.total_in>>8&255),I(n,e.total_in>>16&255),I(n,e.total_in>>24&255)):(B(n,e.adler>>>16),B(n,65535&e.adler)),O(e),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending)?p:1},e.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==b&&69!==t&&73!==t&&91!==t&&103!==t&&t!==w&&666!==t?A(e,g):(e.state=null,t===w?A(e,-3):p):g},e.deflateSetDictionary=function(e,t){var r,n,i,a,o,s,c,u=t.length;if(!e||!e.state||2===(a=(r=e.state).wrap)||1===a&&r.status!==b||r.lookahead)return g;for(1===a&&(e.adler=h(e.adler,t,u,0)),r.wrap=0,u>=r.w_size&&(0===a&&(D(r.head),r.strstart=0,r.block_start=0,r.insert=0),c=new f.Buf8(r.w_size),f.arraySet(c,t,u-r.w_size,r.w_size,0),t=c,u=r.w_size),c=e.avail_in,o=e.next_in,s=e.input,e.avail_in=u,e.next_in=0,e.input=t,P(r);r.lookahead>=_;){for(n=r.strstart,i=r.lookahead-(_-1);r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+_-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++,--i;);r.strstart=n,r.lookahead=_-1,P(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=_-1,r.match_available=0,e.next_in=o,e.input=s,e.avail_in=c,r.wrap=a,p},e.deflateInfo="pako deflate (from Nodeca project)"}),ue=t(function(e){var c=J(),i=!0,a=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){a=!1}for(var t,u=new c.Buf8(256),t=0;t<256;t++)u[t]=252<=t?6:248<=t?5:240<=t?4:224<=t?3:192<=t?2:1;function l(e,t){if(t<65534&&(e.subarray&&a||!e.subarray&&i))return String.fromCharCode.apply(null,c.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}u[254]=u[254]=1,e.string2buf=function(e){for(var t,r,n,i,a=e.length,o=0,s=0;s<a;s++)55296==(64512&(r=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(n=e.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(n-56320),s++),o+=r<128?1:r<2048?2:r<65536?3:4;for(t=new c.Buf8(o),s=i=0;i<o;s++)55296==(64512&(r=e.charCodeAt(s)))&&s+1<a&&56320==(64512&(n=e.charCodeAt(s+1)))&&(r=65536+(r-55296<<10)+(n-56320),s++),r<128?t[i++]=r:(r<2048?t[i++]=192|r>>>6:(r<65536?t[i++]=224|r>>>12:(t[i++]=240|r>>>18,t[i++]=128|r>>>12&63),t[i++]=128|r>>>6&63),t[i++]=128|63&r);return t},e.buf2binstring=function(e){return l(e,e.length)},e.binstring2buf=function(e){for(var t=new c.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t},e.buf2string=function(e,t){for(var r,n,i=t||e.length,a=new Array(2*i),o=0,s=0;s<i;)if((r=e[s++])<128)a[o++]=r;else if(4<(n=u[r]))a[o++]=65533,s+=n-1;else{for(r&=2===n?31:3===n?15:7;1<n&&s<i;)r=r<<6|63&e[s++],n--;1<n?a[o++]=65533:r<65536?a[o++]=r:(r-=65536,a[o++]=55296|r>>10&1023,a[o++]=56320|1023&r)}return l(a,o)},e.utf8border=function(e,t){for(var r=(t=(t=t||e.length)>e.length?e.length:t)-1;0<=r&&128==(192&e[r]);)r--;return!(r<0||0===r)&&r+u[e[r]]>t?r:t}}),le=t(function(e,t){t.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}}),fe=t(function(e){var o=ce(),s=J(),c=ue(),r=W(),n=le(),u=Object.prototype.toString;function i(e){if(!(this instanceof i))return new i(e);this.options=s.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});e=this.options;if(e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new n,(this.strm.avail_out=0)!==(t=o.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy)))throw new Error(r[t]);if(e.header&&o.deflateSetHeader(this.strm,e.header),e.dictionary){var t,e="string"==typeof e.dictionary?c.string2buf(e.dictionary):"[object ArrayBuffer]"===u.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary;if(0!==(t=o.deflateSetDictionary(this.strm,e)))throw new Error(r[t]);this._dict_set=!0}}function a(e,t){t=new i(t);if(t.push(e,!0),t.err)throw t.msg||r[t.err];return t.result}i.prototype.push=function(e,t){var r,n,i=this.strm,a=this.options.chunkSize;if(this.ended)return!1;n=t===~~t?t:!0===t?4:0,"string"==typeof e?i.input=c.string2buf(e):"[object ArrayBuffer]"===u.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new s.Buf8(a),i.next_out=0,i.avail_out=a),1!==(r=o.deflate(i,n))&&0!==r)return this.onEnd(r),!(this.ended=!0)}while(0!==i.avail_out&&(0!==i.avail_in||4!==n&&2!==n)||("string"===this.options.to?this.onData(c.buf2binstring(s.shrinkBuf(i.output,i.next_out))):this.onData(s.shrinkBuf(i.output,i.next_out))),(0<i.avail_in||0===i.avail_out)&&1!==r);return 4===n?(r=o.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):(2===n&&(this.onEnd(0),i.avail_out=0),!0)},i.prototype.onData=function(e){this.chunks.push(e)},i.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=s.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.Deflate=i,e.deflate=a,e.deflateRaw=function(e,t){return(t=t||{}).raw=!0,a(e,t)},e.gzip=function(e,t){return(t=t||{}).gzip=!0,a(e,t)}}),he=t(function(e,t){t.exports=function(e,t){var r,n,i,a,o,s,c=e.state,u=e.next_in,l=e.input,f=u+(e.avail_in-5),h=e.next_out,d=e.output,p=h-(t-e.avail_out),g=h+(e.avail_out-257),m=c.dmax,_=c.wsize,v=c.whave,y=c.wnext,b=c.window,w=c.hold,k=c.bits,S=c.lencode,C=c.distcode,E=(1<<c.lenbits)-1,A=(1<<c.distbits)-1;e:do{for(k<15&&(w+=l[u++]<<k,k+=8,w+=l[u++]<<k,k+=8),r=S[w&E];;){if(w>>>=n=r>>>24,k-=n,0===(n=r>>>16&255))d[h++]=65535&r;else{if(!(16&n)){if(0==(64&n)){r=S[(65535&r)+(w&(1<<n)-1)];continue}if(32&n){c.mode=12;break e}e.msg="invalid literal/length code",c.mode=30;break e}for(i=65535&r,(n&=15)&&(k<n&&(w+=l[u++]<<k,k+=8),i+=w&(1<<n)-1,w>>>=n,k-=n),k<15&&(w+=l[u++]<<k,k+=8,w+=l[u++]<<k,k+=8),r=C[w&A];;){if(w>>>=n=r>>>24,k-=n,!(16&(n=r>>>16&255))){if(0==(64&n)){r=C[(65535&r)+(w&(1<<n)-1)];continue}e.msg="invalid distance code",c.mode=30;break e}if(a=65535&r,k<(n&=15)&&(w+=l[u++]<<k,(k+=8)<n)&&(w+=l[u++]<<k,k+=8),m<(a+=w&(1<<n)-1)){e.msg="invalid distance too far back",c.mode=30;break e}if(w>>>=n,k-=n,(n=h-p)<a){if(v<(n=a-n)&&c.sane){e.msg="invalid distance too far back",c.mode=30;break e}if(s=b,(o=0)===y){if(o+=_-n,n<i){for(i-=n;d[h++]=b[o++],--n;);o=h-a,s=d}}else if(y<n){if(o+=_+y-n,(n-=y)<i){for(i-=n;d[h++]=b[o++],--n;);if(o=0,y<i){for(i-=n=y;d[h++]=b[o++],--n;);o=h-a,s=d}}}else if(o+=y-n,n<i){for(i-=n;d[h++]=b[o++],--n;);o=h-a,s=d}for(;2<i;)d[h++]=s[o++],d[h++]=s[o++],d[h++]=s[o++],i-=3;i&&(d[h++]=s[o++],1<i)&&(d[h++]=s[o++])}else{for(o=h-a;d[h++]=d[o++],d[h++]=d[o++],d[h++]=d[o++],2<(i-=3););i&&(d[h++]=d[o++],1<i)&&(d[h++]=d[o++])}break}}break}}while(u<f&&h<g);w&=(1<<(k-=(i=k>>3)<<3))-1,e.next_in=u-=i,e.next_out=h,e.avail_in=u<f?f-u+5:5-(u-f),e.avail_out=h<g?g-h+257:257-(h-g),c.hold=w,c.bits=k}}),de=t(function(e,t){var F=J(),R=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],j=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],L=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],N=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,n,i,a,o,s){for(var c,u,l,f,h,d,p,g,m,_=s.bits,v=0,y=0,b=0,w=0,k=0,S=0,C=0,E=0,A=0,x=0,D=null,O=0,T=new F.Buf16(16),I=new F.Buf16(16),B=null,P=0,v=0;v<=15;v++)T[v]=0;for(y=0;y<n;y++)T[t[r+y]]++;for(k=_,w=15;1<=w&&0===T[w];w--);if(w<k&&(k=w),0===w)i[a++]=20971520,i[a++]=20971520,s.bits=1;else{for(b=1;b<w&&0===T[b];b++);for(k<b&&(k=b),v=E=1;v<=15;v++)if((E=(E<<1)-T[v])<0)return-1;if(0<E&&(0===e||1!==w))return-1;for(I[1]=0,v=1;v<15;v++)I[v+1]=I[v]+T[v];for(y=0;y<n;y++)0!==t[r+y]&&(o[I[t[r+y]]++]=y);if(d=0===e?(D=B=o,19):1===e?(D=R,O-=257,B=j,P-=257,256):(D=L,B=N,-1),v=b,h=a,C=y=x=0,l=-1,f=(A=1<<(S=k))-1,1===e&&852<A||2===e&&592<A)return 1;for(;;){for(m=o[y]<d?(g=0,o[y]):o[y]>d?(g=B[P+o[y]],D[O+o[y]]):(g=96,0),c=1<<(p=v-C),b=u=1<<S;i[h+(x>>C)+(u-=c)]=p<<24|g<<16|m|0,0!==u;);for(c=1<<v-1;x&c;)c>>=1;if(0!==c?x=(x&c-1)+c:x=0,y++,0==--T[v]){if(v===w)break;v=t[r+o[y]]}if(k<v&&(x&f)!==l){for(h+=b,E=1<<(S=v-(C=0===C?k:C));S+C<w&&!((E-=T[S+C])<=0);)S++,E<<=1;if(A+=1<<S,1===e&&852<A||2===e&&592<A)return 1;i[l=x&f]=k<<24|S<<16|h-a|0}}0!==x&&(i[h+x]=v-C<<24|64<<16|0),s.bits=k}return 0}}),pe=t(function(e){var I=J(),B=oe(),P=se(),F=he(),R=de(),j=1,L=2,N=0,z=-2,H=1,r=852,n=592;function M(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function i(){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 I.Buf16(320),this.work=new I.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=H,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new I.Buf32(r),t.distcode=t.distdyn=new I.Buf32(n),t.sane=1,t.back=-1,N):z}function o(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,a(e)):z}function s(e,t){var r,n;return!e||!e.state||(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t))?z:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,o(e))}function t(e,t){var r;return e?(r=new i,(e.state=r).window=null,(r=s(e,t))!==N&&(e.state=null),r):z}var G,U,q=!0;function V(e,t,r,n){var i,e=e.state;return null===e.window&&(e.wsize=1<<e.wbits,e.wnext=0,e.whave=0,e.window=new I.Buf8(e.wsize)),e.wsize<=n?(I.arraySet(e.window,t,r-e.wsize,e.wsize,0),e.wnext=0,e.whave=e.wsize):(n<(i=e.wsize-e.wnext)&&(i=n),I.arraySet(e.window,t,r-n,i,e.wnext),(n-=i)?(I.arraySet(e.window,t,r-n,n,0),e.wnext=n,e.whave=e.wsize):(e.wnext+=i,e.wnext===e.wsize&&(e.wnext=0),e.whave<e.wsize&&(e.whave+=i))),0}e.inflateReset=o,e.inflateReset2=s,e.inflateResetKeep=a,e.inflateInit=function(e){return t(e,15)},e.inflateInit2=t,e.inflate=function(e,t){var r,n,i,a,o,s,c,u,l,f,h,d,p,g,m,_,v,y,b,w,k,S,C,E,A=0,x=new I.Buf8(4),D=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return z;12===(r=e.state).mode&&(r.mode=13),o=e.next_out,i=e.output,a=e.next_in,n=e.input,u=r.hold,l=r.bits,f=s=e.avail_in,h=c=e.avail_out,S=N;e:for(;;)switch(r.mode){case H:if(0===r.wrap)r.mode=13;else{for(;l<16;){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}if(2&r.wrap&&35615===u)x[r.check=0]=255&u,x[1]=u>>>8&255,r.check=P(r.check,x,2,0),l=u=0,r.mode=2;else if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31)e.msg="incorrect header check",r.mode=30;else if(8!=(15&u))e.msg="unknown compression method",r.mode=30;else{if(l-=4,k=8+(15&(u>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<k,e.adler=r.check=1,r.mode=512&u?10:12,l=u=0}}break;case 2:for(;l<16;){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}if(r.flags=u,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=u>>8&1),512&r.flags&&(x[0]=255&u,x[1]=u>>>8&255,r.check=P(r.check,x,2,0)),l=u=0,r.mode=3;case 3:for(;l<32;){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}r.head&&(r.head.time=u),512&r.flags&&(x[0]=255&u,x[1]=u>>>8&255,x[2]=u>>>16&255,x[3]=u>>>24&255,r.check=P(r.check,x,4,0)),l=u=0,r.mode=4;case 4:for(;l<16;){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}r.head&&(r.head.xflags=255&u,r.head.os=u>>8),512&r.flags&&(x[0]=255&u,x[1]=u>>>8&255,r.check=P(r.check,x,2,0)),l=u=0,r.mode=5;case 5:if(1024&r.flags){for(;l<16;){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}r.length=u,r.head&&(r.head.extra_len=u),512&r.flags&&(x[0]=255&u,x[1]=u>>>8&255,r.check=P(r.check,x,2,0)),l=u=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((d=s<(d=r.length)?s:d)&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),I.arraySet(r.head.extra,n,a,d,k)),512&r.flags&&(r.check=P(r.check,n,d,a)),s-=d,a+=d,r.length-=d),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===s)break e;for(d=0;k=n[a+d++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k)),k&&d<s;);if(512&r.flags&&(r.check=P(r.check,n,d,a)),s-=d,a+=d,k)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===s)break e;for(d=0;k=n[a+d++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k)),k&&d<s;);if(512&r.flags&&(r.check=P(r.check,n,d,a)),s-=d,a+=d,k)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;l<16;){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}if(u!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}l=u=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;l<32;){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}e.adler=r.check=M(u),l=u=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,r.hold=u,r.bits=l,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last)u>>>=7&l,l-=7&l,r.mode=27;else{for(;l<3;){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}switch(r.last=1&u,--l,3&(u>>>=1)){case 0:r.mode=14;break;case 1:O=T=void 0;var O,T=r;if(q){for(G=new I.Buf32(512),U=new I.Buf32(32),O=0;O<144;)T.lens[O++]=8;for(;O<256;)T.lens[O++]=9;for(;O<280;)T.lens[O++]=7;for(;O<288;)T.lens[O++]=8;for(R(j,T.lens,0,288,G,0,T.work,{bits:9}),O=0;O<32;)T.lens[O++]=5;R(L,T.lens,0,32,U,0,T.work,{bits:5}),q=!1}if(T.lencode=G,T.lenbits=9,T.distcode=U,T.distbits=5,r.mode=20,6!==t)break;u>>>=2,l-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}u>>>=2,l-=2}break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}if((65535&u)!=(u>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&u,l=u=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(d=r.length){if(0===(d=c<(d=s<d?s:d)?c:d))break e;I.arraySet(i,n,a,d,o),s-=d,a+=d,c-=d,o+=d,r.length-=d}else r.mode=12;break;case 17:for(;l<14;){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}if(r.nlen=257+(31&u),u>>>=5,l-=5,r.ndist=1+(31&u),u>>>=5,l-=5,r.ncode=4+(15&u),u>>>=4,l-=4,286<r.nlen||30<r.ndist){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;l<3;){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}r.lens[D[r.have++]]=7&u,u>>>=3,l-=3}for(;r.have<19;)r.lens[D[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,C={bits:r.lenbits},S=R(0,r.lens,0,19,r.lencode,0,r.work,C),r.lenbits=C.bits,S){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;_=(A=r.lencode[u&(1<<r.lenbits)-1])>>>16&255,v=65535&A,!((m=A>>>24)<=l);){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}if(v<16)u>>>=m,l-=m,r.lens[r.have++]=v;else{if(16===v){for(E=m+2;l<E;){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}if(u>>>=m,l-=m,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}k=r.lens[r.have-1],d=3+(3&u),u>>>=2,l-=2}else if(17===v){for(E=m+3;l<E;){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}k=0,d=3+(7&(u>>>=m)),u>>>=3,l=l-m-3}else{for(E=m+7;l<E;){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}k=0,d=11+(127&(u>>>=m)),u>>>=7,l=l-m-7}if(r.have+d>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;d--;)r.lens[r.have++]=k}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,C={bits:r.lenbits},S=R(j,r.lens,0,r.nlen,r.lencode,0,r.work,C),r.lenbits=C.bits,S){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,C={bits:r.distbits},S=R(L,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,C),r.distbits=C.bits,S){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=s&&258<=c){e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,r.hold=u,r.bits=l,F(e,h),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,n=e.input,s=e.avail_in,u=r.hold,l=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;_=(A=r.lencode[u&(1<<r.lenbits)-1])>>>16&255,v=65535&A,!((m=A>>>24)<=l);){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}if(_&&0==(240&_)){for(y=m,b=_,w=v;_=(A=r.lencode[w+((u&(1<<y+b)-1)>>y)])>>>16&255,v=65535&A,!(y+(m=A>>>24)<=l);){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}u>>>=y,l-=y,r.back+=y}if(u>>>=m,l-=m,r.back+=m,r.length=v,0===_){r.mode=26;break}if(32&_){r.back=-1,r.mode=12;break}if(64&_){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&_,r.mode=22;case 22:if(r.extra){for(E=r.extra;l<E;){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}r.length+=u&(1<<r.extra)-1,u>>>=r.extra,l-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;_=(A=r.distcode[u&(1<<r.distbits)-1])>>>16&255,v=65535&A,!((m=A>>>24)<=l);){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}if(0==(240&_)){for(y=m,b=_,w=v;_=(A=r.distcode[w+((u&(1<<y+b)-1)>>y)])>>>16&255,v=65535&A,!(y+(m=A>>>24)<=l);){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}u>>>=y,l-=y,r.back+=y}if(u>>>=m,l-=m,r.back+=m,64&_){e.msg="invalid distance code",r.mode=30;break}r.offset=v,r.extra=15&_,r.mode=24;case 24:if(r.extra){for(E=r.extra;l<E;){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}r.offset+=u&(1<<r.extra)-1,u>>>=r.extra,l-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===c)break e;if(r.offset>(d=h-c)){if((d=r.offset-d)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}p=d>r.wnext?(d-=r.wnext,r.wsize-d):r.wnext-d,d>r.length&&(d=r.length),g=r.window}else g=i,p=o-r.offset,d=r.length;for(c-=d=c<d?c:d,r.length-=d;i[o++]=g[p++],--d;);0===r.length&&(r.mode=21);break;case 26:if(0===c)break e;i[o++]=r.length,c--,r.mode=21;break;case 27:if(r.wrap){for(;l<32;){if(0===s)break e;s--,u|=n[a++]<<l,l+=8}if(h-=c,e.total_out+=h,r.total+=h,h&&(e.adler=r.check=(r.flags?P:B)(r.check,i,h,o-h)),h=c,(r.flags?u:M(u))!==r.check){e.msg="incorrect data check",r.mode=30;break}l=u=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;l<32;){if(0===s)break e;s--,u+=n[a++]<<l,l+=8}if(u!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}l=u=0}r.mode=29;case 29:S=1;break e;case 30:S=-3;break e;case 31:return-4;default:return z}return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,r.hold=u,r.bits=l,(r.wsize||h!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&V(e,e.output,e.next_out,h-e.avail_out)?(r.mode=31,-4):(f-=e.avail_in,h-=e.avail_out,e.total_in+=f,e.total_out+=h,r.total+=h,r.wrap&&h&&(e.adler=r.check=(r.flags?P:B)(r.check,i,h,e.next_out-h)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),S=(0==f&&0===h||4===t)&&S===N?-5:S)},e.inflateEnd=function(e){var t;return e&&e.state?((t=e.state).window&&(t.window=null),e.state=null,N):z},e.inflateGetHeader=function(e,t){return e&&e.state&&0!=(2&(e=e.state).wrap)?((e.head=t).done=!1,N):z},e.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state&&(0===(r=e.state).wrap||11===r.mode)?11===r.mode&&B(1,t,n,0)!==r.check?-3:V(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,N):z},e.inflateInfo="pako inflate (from Nodeca project)"}),ge=t(function(e,t){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}}),me=t(function(e,t){t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}}),_e=t(function(e){var f=pe(),h=J(),d=ue(),p=ge(),r=W(),n=le(),i=me(),g=Object.prototype.toString;function a(e){if(!(this instanceof a))return new a(e);this.options=h.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options,e=(t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits)&&(t.windowBits=-15),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new n,this.strm.avail_out=0,f.inflateInit2(this.strm,t.windowBits));if(e!==p.Z_OK)throw new Error(r[e]);if(this.header=new i,f.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=d.string2buf(t.dictionary):"[object ArrayBuffer]"===g.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw)&&(e=f.inflateSetDictionary(this.strm,t.dictionary))!==p.Z_OK)throw new Error(r[e])}function o(e,t){t=new a(t);if(t.push(e,!0),t.err)throw t.msg||r[t.err];return t.result}a.prototype.push=function(e,t){var r,n,i,a,o,s=this.strm,c=this.options.chunkSize,u=this.options.dictionary,l=!1;if(this.ended)return!1;n=t===~~t?t:!0===t?p.Z_FINISH:p.Z_NO_FLUSH,"string"==typeof e?s.input=d.binstring2buf(e):"[object ArrayBuffer]"===g.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new h.Buf8(c),s.next_out=0,s.avail_out=c),(r=(r=f.inflate(s,p.Z_NO_FLUSH))===p.Z_NEED_DICT&&u?f.inflateSetDictionary(this.strm,u):r)===p.Z_BUF_ERROR&&!0===l&&(r=p.Z_OK,l=!1),r!==p.Z_STREAM_END&&r!==p.Z_OK)return this.onEnd(r),!(this.ended=!0)}while(!s.next_out||0!==s.avail_out&&r!==p.Z_STREAM_END&&(0!==s.avail_in||n!==p.Z_FINISH&&n!==p.Z_SYNC_FLUSH)||("string"===this.options.to?(i=d.utf8border(s.output,s.next_out),a=s.next_out-i,o=d.buf2string(s.output,i),s.next_out=a,s.avail_out=c-a,a&&h.arraySet(s.output,s.output,i,a,0),this.onData(o)):this.onData(h.shrinkBuf(s.output,s.next_out))),0===s.avail_in&&0===s.avail_out&&(l=!0),(0<s.avail_in||0===s.avail_out)&&r!==p.Z_STREAM_END);return(n=r===p.Z_STREAM_END?p.Z_FINISH:n)===p.Z_FINISH?(r=f.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===p.Z_OK):(n===p.Z_SYNC_FLUSH&&(this.onEnd(p.Z_OK),s.avail_out=0),!0)},a.prototype.onData=function(e){this.chunks.push(e)},a.prototype.onEnd=function(e){e===p.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=h.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},e.Inflate=a,e.inflate=o,e.inflateRaw=function(e,t){return(t=t||{}).raw=!0,o(e,t)},e.ungzip=o}),ve=t(function(e,t){var r={};(0,J().assign)(r,fe(),_e(),ge()),t.exports=r}),ye=t(function(e){var t=("undefined"==typeof Uint8Array?"undefined":_typeof(Uint8Array))<"u"&&("undefined"==typeof Uint16Array?"undefined":_typeof(Uint16Array))<"u"&&("undefined"==typeof Uint32Array?"undefined":_typeof(Uint32Array))<"u",r=ve(),n=C(),i=E(),a=t?"uint8array":"array";function o(e,t){i.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}e.magic="\b\0",n.inherits(o,i),o.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(n.transformTo(a,e.data),!1)},o.prototype.flush=function(){i.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this._pako=null},o.prototype._createPako=function(){this._pako=new r[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},e.compressWorker=function(e){return new o("Deflate",e)},e.uncompressWorker=function(){return new o("Inflate",{})}}),be=t(function(e){var t=E();e.STORE={magic:"\0\0",compressWorker:function(e){return new t("STORE compression")},uncompressWorker:function(){return new t("STORE decompression")}},e.DEFLATE=ye()}),we=t(function(e){e.LOCAL_FILE_HEADER="PK",e.CENTRAL_FILE_HEADER="PK",e.CENTRAL_DIRECTORY_END="PK",e.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",e.ZIP64_CENTRAL_DIRECTORY_END="PK",e.DATA_DESCRIPTOR="PK\b"}),ke=t(function(e,t){function v(e,t){for(var r="",n=0;n<t;n++)r+=String.fromCharCode(255&e),e>>>=8;return r}function n(e,t,r,n,i,a){var o=e.file,s=e.compression,c=a!==b.utf8encode,u=y.transformTo("string",a(o.name)),l=y.transformTo("string",b.utf8encode(o.name)),f=o.comment,a=y.transformTo("string",a(f)),h=y.transformTo("string",b.utf8encode(f)),d=l.length!==o.name.length,f=h.length!==f.length,p="",g=o.dir,m=o.date,_={crc32:0,compressedSize:0,uncompressedSize:0},r=(t&&!r||(_.crc32=e.crc32,_.compressedSize=e.compressedSize,_.uncompressedSize=e.uncompressedSize),0),e=(t&&(r|=8),c||!d&&!f||(r|=2048),0),t=0,m=(g&&(e|=16),"UNIX"===i?(t=798,e|=(c=o.unixPermissions,i=g,(65535&(c?c:i?16893:33204))<<16)):(t=20,e|=63&(o.dosPermissions||0)),g=m.getUTCHours(),g<<=6,g=(g=(g|m.getUTCMinutes())<<5)|m.getUTCSeconds()/2,c=m.getUTCFullYear()-1980,c=(c=((c<<=4)|m.getUTCMonth()+1)<<5)|m.getUTCDate(),d&&(i=v(1,1)+v(w(u),4)+l,p+="up"+v(i.length,2)+i),f&&(o=v(1,1)+v(w(a),4)+h,p+="uc"+v(o.length,2)+o),""),m=(m=(m=(m=(m=(m=(m=(m=(m=(m+="\n\0")+v(r,2))+s.magic)+v(g,2))+v(c,2))+v(_.crc32,4))+v(_.compressedSize,4))+v(_.uncompressedSize,4))+v(u.length,2))+v(p.length,2);return{fileRecord:k.LOCAL_FILE_HEADER+m+u+p,dirRecord:k.CENTRAL_FILE_HEADER+v(t,2)+m+v(a.length,2)+"\0\0\0\0"+v(e,4)+v(n,4)+u+p+a}}var y=C(),i=E(),b=A(),w=l(),k=we();function r(e,t,r,n){i.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}y.inherits(r,i),r.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,i.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},r.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;t?(e=n(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName),this.push({data:e.fileRecord,meta:{percent:0}})):this.accumulate=!0},r.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=n(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:(t=e,k.DATA_DESCRIPTOR+v(t.crc32,4)+v(t.compressedSize,4)+v(t.uncompressedSize,4)),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},r.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,r=((e,t,r,n,i)=>(i=y.transformTo("string",i(n)),k.CENTRAL_DIRECTORY_END+"\0\0\0\0"+v(e,2)+v(e,2)+v(t,4)+v(r,4)+v(i.length,2)+i))(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:r,meta:{percent:100}})},r.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},r.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(e){t.error(e)}),this},r.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},r.prototype.error=function(e){var t=this._sources;if(!i.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch(e){}return!0},r.prototype.lock=function(){i.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=r}),Se=t(function(e){var u=be(),r=ke();e.generateWorker=function(e,o,t){var s=new r(o.streamFiles,t,o.platform,o.encodeFileName),c=0;try{e.forEach(function(e,t){c++;var r=((e,t)=>{if(t=u[e=e||t])return t;throw new Error(e+" is not a valid compression method !")})(t.options.compression,o.compression),n=t.options.compressionOptions||o.compressionOptions||{},i=t.dir,a=t.date;t._compressWorker(r,n).withStreamInfo("file",{name:e,dir:i,date:a,comment:t.comment||"",unixPermissions:t.unixPermissions,dosPermissions:t.dosPermissions}).pipe(s)}),s.entriesCount=c}catch(e){s.error(e)}return s}}),Ce=t(function(e,t){var r=C(),n=E();function i(e,t){n.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}r.inherits(i,n),i.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",function(e){t.push({data:e,meta:{percent:0}})}).on("error",function(e){t.isPaused?this.generatedError=e:t.error(e)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})},i.prototype.pause=function(){return!!n.prototype.pause.call(this)&&(this._stream.pause(),!0)},i.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=i}),Ee=t(function(e,t){function o(e){var t=(e="/"===e.slice(-1)?e.substring(0,e.length-1):e).lastIndexOf("/");return 0<t?e.substring(0,t):""}function s(e,t){return t=_typeof(t)<"u"?t:l.createFolders,e=_(e),this.files[e]||m.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]}var i=A(),c=C(),u=E(),a=x(),l=D(),f=O(),h=ie(),d=Se(),p=y(),g=Ce(),m=function(e,t,r){var n=c.getTypeOf(t),i=c.extend(r||{},l),a=(i.date=i.date||new Date,null!==i.compression&&(i.compression=i.compression.toUpperCase()),"string"==typeof i.unixPermissions&&(i.unixPermissions=parseInt(i.unixPermissions,8)),i.unixPermissions&&16384&i.unixPermissions&&(i.dir=!0),i.dosPermissions&&16&i.dosPermissions&&(i.dir=!0),i.dir&&(e=_(e)),i.createFolders&&(a=o(e))&&s.call(this,a,!0),"string"===n&&!1===i.binary&&!1===i.base64);(!r||"u"<_typeof(r.binary))&&(i.binary=!a);(t instanceof f&&0===t.uncompressedSize||i.dir||!t||0===t.length)&&(i.base64=!1,i.binary=!0,t="",i.compression="STORE");n=null,n=t instanceof f||t instanceof u?t:p.isNode&&p.isStream(t)?new g(e,t):c.prepareContent(e,t,i.binary,i.optimizedBinaryString,i.base64),r=new h(e,n,i);this.files[e]=r},_=function(e){return"/"!==e.slice(-1)&&(e+="/"),e};function v(e){return"[object RegExp]"===Object.prototype.toString.call(e)}t.exports={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)n=this.files[t],r=t.slice(this.root.length,t.length),r&&t.slice(0,this.root.length)===this.root&&e(r,n)},filter:function(r){var n=[];return this.forEach(function(e,t){r(e,t)&&n.push(t)}),n},file:function(e,t,r){var n,i;return 1===arguments.length?v(e)?(n=e,this.filter(function(e,t){return!t.dir&&n.test(e)})):(i=this.files[this.root+e])&&!i.dir?i:null:(e=this.root+e,m.call(this,e,t,r),this)},folder:function(r){var e,t;return r?v(r)?this.filter(function(e,t){return t.dir&&r.test(e)}):(e=this.root+r,e=s.call(this,e),(t=this.clone()).root=e.name,t):this},remove:function(r){r=this.root+r;var e=this.files[r];if(e||("/"!==r.slice(-1)&&(r+="/"),e=this.files[r]),e&&!e.dir)delete this.files[r];else for(var t=this.filter(function(e,t){return t.name.slice(0,r.length)===r}),n=0;n<t.length;n++)delete this.files[t[n].name];return this},generate:function(e){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t={};try{if((t=c.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=t.type.toLowerCase(),t.compression=t.compression.toUpperCase(),"binarystring"===t.type&&(t.type="string"),!t.type)throw new Error("No output type specified.");c.checkSupport(t.type),"darwin"!==t.platform&&"freebsd"!==t.platform&&"linux"!==t.platform&&"sunos"!==t.platform||(t.platform="UNIX"),"win32"===t.platform&&(t.platform="DOS");var r=t.comment||this.comment||"",n=d.generateWorker(this,t,r)}catch(e){(n=new u("error")).error(e)}return new a(n,t.type||"string",t.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}}}),Ae=t(function(e,t){var r=C();function n(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}n.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(e){},readInt:function(e){var t,r=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return r.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=n}),xe=t(function(e,t){var r=Ae();function n(e){r.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}C().inherits(n,r),n.prototype.byteAt=function(e){return this.data[this.zero+e]},n.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),a=this.length-4;0<=a;--a)if(this.data[a]===t&&this.data[a+1]===r&&this.data[a+2]===n&&this.data[a+3]===i)return a-this.zero;return-1},n.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),e=e.charCodeAt(3),i=this.readData(4);return t===i[0]&&r===i[1]&&n===i[2]&&e===i[3]},n.prototype.readData=function(e){var t;return this.checkOffset(e),0===e?[]:(t=this.data.slice(this.zero+this.index,this.zero+this.index+e),this.index+=e,t)},t.exports=n}),De=t(function(e,t){var r=Ae();function n(e){r.call(this,e)}C().inherits(n,r),n.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},n.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},n.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},n.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=n}),Oe=t(function(e,t){var r=xe();function n(e){r.call(this,e)}C().inherits(n,r),n.prototype.readData=function(e){var t;return this.checkOffset(e),0===e?new Uint8Array(0):(t=this.data.subarray(this.zero+this.index,this.zero+this.index+e),this.index+=e,t)},t.exports=n}),Te=t(function(e,t){var r=Oe();function n(e){r.call(this,e)}C().inherits(n,r),n.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=n}),Ie=t(function(e,t){var r=C(),n=p(),i=xe(),a=De(),o=Te(),s=Oe();t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),"string"!==t||n.uint8array?"nodebuffer"===t?new o(e):n.uint8array?new s(r.transformTo("uint8array",e)):new i(r.transformTo("array",e)):new a(e)}}),Be=t(function(e,t){var r=Ie(),n=C(),i=O(),a=l(),o=A(),s=be(),c=p();function u(e,t){this.options=e,this.loadOptions=t}u.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t;if(e.skip(22),this.fileNameLength=e.readInt(2),t=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(t),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=(e=>{for(var t in s)if(s.hasOwnProperty(t)&&s[t].magic===e)return s[t];return null})(this.compressionMethod)))throw new Error("Corrupted zip : compression "+n.pretty(this.compressionMethod)+" unknown (inner file : "+n.transformTo("string",this.fileName)+")");this.decompressed=new i(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){var t;this.extraFields[1]&&(t=r(this.extraFields[1].value),this.uncompressedSize===n.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===n.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===n.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===n.MAX_VALUE_32BITS)&&(this.diskNumberStart=t.readInt(4))},readExtraFields:function(e){var t,r,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<i;)t=e.readInt(2),r=e.readInt(2),n=e.readData(r),this.extraFields[t]={id:t,length:r,value:n};e.setIndex(i)},handleUTF8:function(){var e,t=c.uint8array?"uint8array":"array";this.useUTF8()?(this.fileNameStr=o.utf8decode(this.fileName),this.fileCommentStr=o.utf8decode(this.fileComment)):(null!==(e=this.findExtraFieldUnicodePath())?this.fileNameStr=e:(e=n.transformTo(t,this.fileName),this.fileNameStr=this.loadOptions.decodeFileName(e)),null!==(e=this.findExtraFieldUnicodeComment())?this.fileCommentStr=e:(e=n.transformTo(t,this.fileComment),this.fileCommentStr=this.loadOptions.decodeFileName(e)))},findExtraFieldUnicodePath:function(){var e,t=this.extraFields[28789];return!t||1!==(e=r(t.value)).readInt(1)||a(this.fileName)!==e.readInt(4)?null:o.utf8decode(e.readData(t.length-5))},findExtraFieldUnicodeComment:function(){var e,t=this.extraFields[25461];return!t||1!==(e=r(t.value)).readInt(1)||a(this.fileComment)!==e.readInt(4)?null:o.utf8decode(e.readData(t.length-5))}},t.exports=u}),Pe=t(function(e,t){var r=Ie(),n=C(),i=we(),a=Be(),o=(A(),p());function s(e){this.files=[],this.loadOptions=e}s.prototype={checkSignature:function(e){var t;if(!this.reader.readAndCheckSignature(e))throw this.reader.index-=4,t=this.reader.readString(4),new Error("Corrupted zip or bug: unexpected signature ("+n.pretty(t)+", expected "+n.pretty(e)+")")},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);e=this.reader.readString(4)===t;return this.reader.setIndex(r),e},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=o.uint8array?"uint8array":"array",t=n.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(t)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,r,n=this.zip64EndOfCentralSize-44;0<n;)e=this.reader.readInt(2),t=this.reader.readInt(4),r=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){for(var e,t=0;t<this.files.length;t++)e=this.files[t],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(i.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(i.CENTRAL_FILE_HEADER);)(e=new a({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(i.CENTRAL_DIRECTORY_END);if(e<0)throw!this.isSignature(0,i.LOCAL_FILE_HEADER)?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory");this.reader.setIndex(e);var t=e;if(this.checkSignature(i.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===n.MAX_VALUE_16BITS||this.diskWithCentralDirStart===n.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===n.MAX_VALUE_16BITS||this.centralDirRecords===n.MAX_VALUE_16BITS||this.centralDirSize===n.MAX_VALUE_32BITS||this.centralDirOffset===n.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,i.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}e=this.centralDirOffset+this.centralDirSize,e=t-(e=this.zip64?e+20+(12+this.zip64EndOfCentralSize):e);if(0<e)this.isSignature(t,i.CENTRAL_FILE_HEADER)||(this.reader.zero=e);else if(e<0)throw new Error("Corrupted zip: missing "+Math.abs(e)+" bytes.")},prepareReader:function(e){this.reader=r(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=s}),Fe=t(function(e,t){var r=C(),o=m(),n=A(),s=Pe(),c=re(),u=y();t.exports=function(e,i){var a=this;return i=r.extend(i||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:n.utf8decode}),u.isNode&&u.isStream(e)?o.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):r.prepareContent("the loaded zip file",e,!0,i.optimizedBinaryString,i.base64).then(function(e){var t=new s(i);return t.load(e),t}).then(function(e){var t=[o.Promise.resolve(e)],r=e.files;if(i.checkCRC32)for(var n=0;n<r.length;n++)t.push((n=>new o.Promise(function(e,t){var r=n.decompressed.getContentWorker().pipe(new c);r.on("error",function(e){t(e)}).on("end",function(){r.streamInfo.crc32!==n.decompressed.crc32?t(new Error("Corrupted zip : CRC32 mismatch")):e()}).resume()}))(r[n]));return o.Promise.all(t)}).then(function(e){for(var e=e.shift(),t=e.files,r=0;r<t.length;r++){var n=t[r];a.file(n.fileNameStr,n.decompressed,{binary:!0,optimizedBinaryString:!0,date:n.date,dir:n.dir,comment:n.fileCommentStr.length?n.fileCommentStr:null,unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions,createFolders:i.createFolders})}return e.zipComment.length&&(a.comment=e.zipComment),a})}}),Re=t(function(e,t){function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e,t=new r;for(e in this)"function"!=typeof this[e]&&(t[e]=this[e]);return t}}(r.prototype=Ee()).loadAsync=Fe(),r.support=p(),r.defaults=D(),r.version="3.7.1",r.loadAsync=function(e,t){return(new r).loadAsync(e,t)},r.external=m(),t.exports=r}),c={},je=c,Le={Command:function(){return Ne},jszip:function(){return ze.default}};for(i in Le)s(je,i,{get:Le[i],enumerable:!0});e.exports=(e=c,n(s({},"__esModule",{value:!0}),e));var c=r(G(),1).default,Ne=(c.program,c.Command),ze=r(Re())}),Mt=$e(function(e,t){var r,n,i="rpk",a="crossAtomicService";t.exports={MAX_SIZE_SSPK:2097152,MAX_SIZE_SPK:20971520,SIGN_MAGIC:"RPK Sig Block 42",SIGN_MAGIC_APK:"APK Sig Block 42",SIGN_TYPE_FULL_PACKAGE:16777473,SIGN_TYPE_FULL_PACKAGE_APK:1896449818,SIGN_TYPE_FILE_LIST:16777729,CRYPT_TYPE_RSA_SHA256:259,SIGN_HEADER:[48,49,48,13,6,9,96,134,72,1,101,3,4,2,1,5,0,4,32],BEGIN_TAG:165,JOINT_TAG:90,CERT_HEAD:"-----BEGIN CERTIFICATE-----\n",CERT_END:"\n-----END CERTIFICATE-----",setSignType:function(e){return i=e},isApkSign:function(){return"apk"===i},setDssHost:function(e){return r=e},setDssKey:function(e){return n=e},setDssKeyId:function(e){return a=e},getDssHost:function(){return r},getDssKey:function(){return n},getDssKeyId:function(){return a},setDssConfig:function(e){r=e.dssHost,n=e.dssKey}}}),Tr=$e(function(e,t){var u=Mt(),l=22,f=67324752,h=33639248,d=101010256,p=16;t.exports={parserZip:function(e,t){var r,n,i,a,o,s,c={tag:!1,length:e.length,sections:{header:null,central:null,footer:null}};return c.sections.footer=(e=>{var t={tag:!1};if(e&&!(e.length<l))for(var r=e.length-l;0<=r;r--)if(d===e.readInt32LE(r)){t.tag=!0,t.startIndex=r,t.len=e.length-r,t.previous=e.readInt32LE(r+p);break}return t})(e),c.sections.footer.tag&&(c.sections.central=(i=e,a=c.sections.footer.previous,o=c.sections.footer.startIndex-c.sections.footer.previous,s={tag:!1},!i||i.length<a||h===i.readInt32LE(a)&&(s.tag=!0,s.startIndex=a,s.len=o,s.previous=i.readInt32LE(a+42)),s),c.sections.central.tag)&&(o=c.sections.central.previous,i=c.sections.central.startIndex-c.sections.central.previous,t&&(c.sections.sign=(a=o,s={tag:!1},!(t=e)||t.length<a||(a=u.isApkSign()?u.SIGN_MAGIC_APK:u.SIGN_MAGIC,0<(a=t.indexOf(a))&&(r=t.readInt32LE(a-8),n=a+16-r-8,t.readInt32LE(n)===r)&&(s.tag=!0,s.len=r,s.startIndex=a+16,s.previous=n)),s),o=0,i=c.sections.sign.startIndex-c.sections.sign.len-8),c.sections.header=(t=o,r=i,a={tag:!1},!(n=e)||n.length<t||f===n.readInt32LE(t)&&(a.tag=!0,a.startIndex=t,a.len=r,a.previous=-1),a),c.sections.header.tag&&(c.tag=!0)),c},checkZipBuffer:function(e,t){return!e||e.length<=4?(console.log("### Sign Failed, cannot open file: ",t),!1):f===e.readInt32LE(0)||(console.log("### Sign Failed, zip file error: ",t),!1)}}}),ei=$e(function(e,t){var s,r={decode:function(e){if(void 0===s){var t="= \f\n\r\t \u2028\u2029";for(s=[],a=0;a<64;++a)s["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(a)]=a;for(a=0;a<t.length;++a)s[t.charAt(a)]=-1}for(var r=[],n=0,i=0,a=0;a<e.length;++a){var o=e.charAt(a);if("="===o)break;if(-1!==(o=s[o])){if(void 0===o)throw"Illegal character at offset "+a;n|=o,4<=++i?(r[r.length]=n>>16,r[r.length]=n>>8&255,r[r.length]=255&n,i=n=0):n<<=6}}switch(i){case 1:throw"Base64 encoding incomplete: at least 2 bits missing";case 2:r[r.length]=n>>10;break;case 3:r[r.length]=n>>16,r[r.length]=n>>8&255}return r},re:/-----BEGIN [^-]+-----([A-Za-z\d+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z\d+\/=\s]+)====/,unarmor:function(e){var t=r.re.exec(e);if(t)if(t[1])e=t[1];else{if(!t[2])throw"RegExp out of sync";e=t[2]}return r.decode(e)}};t.exports=r}),ni=$e(function(e,t){var c,r={decode:function(e){if(void 0===c){var t="0123456789ABCDEF",r=" \f\n\r\t \u2028\u2029";for(c=[],o=0;o<16;++o)c[t.charAt(o)]=o;for(t=t.toLowerCase(),o=10;o<16;++o)c[t.charAt(o)]=o;for(o=0;o<r.length;++o)c[r.charAt(o)]=-1}for(var n=[],i=0,a=0,o=0;o<e.length;++o){var s=e.charAt(o);if("="===s)break;if(-1!==(s=c[s])){if(void 0===s)throw"Illegal character at offset "+o;i|=s,2<=++a?(n[n.length]=i,a=i=0):i<<=4}}if(a)throw"Hex encoding incomplete: 4 bits missing";return n}};t.exports=r}),ai=$e(function(e,t){var r={};r.digest=function(e,t){void 0===t&&(t=0);var r;t^=-1;for(var n=0,i=e.length;n<i;n++)r=255&(t^e.charCodeAt(n)),t=t>>>8^"0x"+"00000000 77073096 EE0E612C 990951BA 076DC419 706AF48F E963A535 9E6495A3 0EDB8832 79DCB8A4 E0D5E91E 97D2D988 09B64C2B 7EB17CBD E7B82D07 90BF1D91 1DB71064 6AB020F2 F3B97148 84BE41DE 1ADAD47D 6DDDE4EB F4D4B551 83D385C7 136C9856 646BA8C0 FD62F97A 8A65C9EC 14015C4F 63066CD9 FA0F3D63 8D080DF5 3B6E20C8 4C69105E D56041E4 A2677172 3C03E4D1 4B04D447 D20D85FD A50AB56B 35B5A8FA 42B2986C DBBBC9D6 ACBCF940 32D86CE3 45DF5C75 DCD60DCF ABD13D59 26D930AC 51DE003A C8D75180 BFD06116 21B4F4B5 56B3C423 CFBA9599 B8BDA50F 2802B89E 5F058808 C60CD9B2 B10BE924 2F6F7C87 58684C11 C1611DAB B6662D3D 76DC4190 01DB7106 98D220BC EFD5102A 71B18589 06B6B51F 9FBFE4A5 E8B8D433 7807C9A2 0F00F934 9609A88E E10E9818 7F6A0DBB 086D3D2D 91646C97 E6635C01 6B6B51F4 1C6C6162 856530D8 F262004E 6C0695ED 1B01A57B 8208F4C1 F50FC457 65B0D9C6 12B7E950 8BBEB8EA FCB9887C 62DD1DDF 15DA2D49 8CD37CF3 FBD44C65 4DB26158 3AB551CE A3BC0074 D4BB30E2 4ADFA541 3DD895D7 A4D1C46D D3D6F4FB 4369E96A 346ED9FC AD678846 DA60B8D0 44042D73 33031DE5 AA0A4C5F DD0D7CC9 5005713C 270241AA BE0B1010 C90C2086 5768B525 206F85B3 B966D409 CE61E49F 5EDEF90E 29D9C998 B0D09822 C7D7A8B4 59B33D17 2EB40D81 B7BD5C3B C0BA6CAD EDB88320 9ABFB3B6 03B6E20C 74B1D29A EAD54739 9DD277AF 04DB2615 73DC1683 E3630B12 94643B84 0D6D6A3E 7A6A5AA8 E40ECF0B 9309FF9D 0A00AE27 7D079EB1 F00F9344 8708A3D2 1E01F268 6906C2FE F762575D 806567CB 196C3671 6E6B06E7 FED41B76 89D32BE0 10DA7A5A 67DD4ACC F9B9DF6F 8EBEEFF9 17B7BE43 60B08ED5 D6D6A3E8 A1D1937E 38D8C2C4 4FDFF252 D1BB67F1 A6BC5767 3FB506DD 48B2364B D80D2BDA AF0A1B4C 36034AF6 41047A60 DF60EFC3 A867DF55 316E8EEF 4669BE79 CB61B38C BC66831A 256FD2A0 5268E236 CC0C7795 BB0B4703 220216B9 5505262F C5BA3BBE B2BD0B28 2BB45A92 5CB36A04 C2D7FFA7 B5D0CF31 2CD99E8B 5BDEAE1D 9B64C2B0 EC63F226 756AA39C 026D930A 9C0906A9 EB0E363F 72076785 05005713 95BF4A82 E2B87A14 7BB12BAE 0CB61B38 92D28E9B E5D5BE0D 7CDCEFB7 0BDBDF21 86D3D2D4 F1D4E242 68DDB3F8 1FDA836E 81BE16CD F6B9265B 6FB077E1 18B74777 88085AE6 FF0F6A70 66063BCA 11010B5C 8F659EFF F862AE69 616BFFD3 166CCF45 A00AE278 D70DD2EE 4E048354 3903B3C2 A7672661 D06016F7 4969474D 3E6E77DB AED16A4A D9D65ADC 40DF0B66 37D83BF0 A9BCAE53 DEBB9EC5 47B2CF7F 30B5FFE9 BDBDF21C CABAC28A 53B39330 24B4A3A6 BAD03605 CDD70693 54DE5729 23D967BF B3667A2E C4614AB8 5D681B02 2A6F2B94 B40BBE37 C30C8EA1 5A05DF1B 2D02EF8D".substr(9*r,8);return-1^t},t.exports=r}),Rr=$e(function(e,t){var r=ei(),n=ni(),i=ai();t.exports={Base64:r,Hex:n,CRC32:i}}),Nr=$e(function(e,t){var s=require("crypto"),c=require("http"),u=Mt(),l=require("js-base64").encodeURL;var f={"Content-Type":"application/json"};function i(e){var t,r,n,i={version:"1",payload:l(e),paddingMode:"1"},e=(new Date).getTime(),a=(f.Authorization=(t=i,r=(new Date).getTime(),t="POST&"+new URL(u.getDssHost()).pathname+"&&"+JSON.stringify(t)+"&appid="+u.getDssKeyId()+"×tamp="+r,n=u.getDssKey(),n=s.createHmac("sha256",n).update(t).digest("base64"),"CLOUDSOA-HMAC-SHA256 appid=".concat(u.getDssKeyId(),", timestamp=").concat(r,', signature="').concat(n,'"')),f["X-Request-ID"]=e,new URL(u.getDssHost())),o=a.pathname;return new Promise(function(r){var e=c.request({host:a.hostname,port:8108,method:"POST",path:o,headers:f},function(e){var t="";e.on("data",function(e){t+=e}),e.on("end",function(){r(JSON.parse(t))})});e.on("error",function(e){console.error("sign request error: ".concat(e.message))}),e.write(JSON.stringify(i)),e.end()})}function n(e){return r.apply(this,arguments)}function r(){return(r=_asyncToGenerator(_regenerator().m(function e(t){var r,n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,i(t);case 1:return r=e.v,console.log(r),n={},e.a(2,(r&&0===r.status?(n.cert=r.result.cert,n.signature=r.result.signature):console.error("sign request error:"+(r?r.result.errMsg:"")),n))}},e)}))).apply(this,arguments)}function a(e){var t;if(e)return t=(e=e.replace(/-/g,"+").replace(/_/g,"/")).length%4,e+"====".substring(0,t)}function o(){return(o=_asyncToGenerator(_regenerator().m(function e(t){var r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return u.setDssConfig(t),e.n=1,n("abc");case 1:return r=e.v,r=a(r.cert).replace(/(.{64})/g,"$1\n"),e.a(2,u.CERT_HEAD+r+u.CERT_END)}},e)}))).apply(this,arguments)}t.exports={getSignDigestOnline:n,Base64UrlToBase64:a,setOnlineParam:function(e,t){u.setDssKey(e),u.setDssHost(t)},generateCertificate:function(e){return o.apply(this,arguments)}}}),zr=$e(function(e,t){var y=Mt(),h=Tr(),r=require("js-base64"),o=r.encode,d=r.Base64,s=require("http"),n=require("fs"),p=require("crypto"),a=Rr(),g=Nr(),c="Rsagen",u="Rsagen-V3.0.1.20190615",l="Normal",f="NONEWITHRSA",m="signData";function _(e,t){var r=t.startIndex,e=e.slice(r,t.startIndex+t.len),r=Buffer.alloc(5+t.len);r[0]=y.BEGIN_TAG,r.writeInt32LE(e.length,1),e.copy(r,5),t.sign=T(r)}function v(e){function t(e){e.copy(n,i),i+=e.length}var e=e.sections,r=e.header.sign.length+e.central.sign.length+e.footer.sign.length+5,n=Buffer.alloc(r),i=0;return n.writeInt8(y.JOINT_TAG,0),n.writeInt32LE(3,1),i+=5,t(e.header.sign),t(e.central.sign),t(e.footer.sign),T(n)}function b(e,t){var n={keyId:t.keyId,clientType:c,clientVersion:u,algorithmType:l,userName:t.userName,unSignData:o(e),passwordDigest:t.passwordDigest,algorithm:f,outFileNameArray:[m],encryptPassword:t.encryptPassword},i=new URL(t.host),a=i.pathname;return new Promise(function(r){var e=s.request({host:i.hostname,method:"POST",path:a,headers:{"Content-Type":"application/json"}},function(e){var t="";e.on("data",function(e){t+=e}),e.on("end",function(){r(JSON.parse(t))})});e.on("error",function(e){console.error("problem with request: ".concat(e.message))}),e.write(JSON.stringify(n)),e.end()})}function w(e){var t=Buffer.from(y.SIGN_HEADER),e=T(e),r=Buffer.alloc(e.length+t.length),n=0;return t.copy(r,0),n+=t.length,e.copy(r,n),r}function k(e){var t=Buffer.alloc(e.length+12);return t.writeInt32LE(e.length+8,0),t.writeInt32LE(y.CRYPT_TYPE_RSA_SHA256,4),t.writeInt32LE(e.length,8),e.copy(t,12),{len:t.length,buffer:t}}function S(e,t){var r={len:12,digests:{size:0,data:[]},certs:{size:0,data:[]},additional:0};return r.digests.data.push(e),r.digests.size+=e.len,r.len+=e.len,r.certs.data.push(t),r.certs.size+=t.len,r.len+=t.len,r}function C(){return(C=_asyncToGenerator(_regenerator().m(function e(t,r){var n,i,a,o,s;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if((n={len:16+r.cert.pemBuffer.length,size:12+r.cert.pemBuffer.length,signdata:{size:0,buffer:null},signatures:{size:0,data:[]},pubkey:{size:r.cert.pemBuffer.length,buffer:r.cert.pemBuffer}}).signdata.buffer=A(t),n.signdata.size=t.len,n.size+=t.len,n.len+=t.len,y.isApkSign())return e.n=1,g.getSignDigestOnline(n.signdata.buffer);e.n=2;break;case 1:i=e.v,i=Buffer.from(d.toUint8Array(i.signature)),e.n=8;break;case 2:if("dss"===r.type)return e.n=3,g.getSignDigestOnline(n.signdata.buffer);e.n=4;break;case 3:a=e.v,i=Buffer.from(d.toUint8Array(a.signature)),e.n=8;break;case 4:if(r.signOnline)return a=w(n.signdata.buffer),e.n=5,b(a,r.onlineConfig);e.n=7;break;case 5:if((o=e.v).success){e.n=6;break}throw new Error(o.message);case 6:i=Buffer.from(d.toUint8Array(o.data.signData)),e.n=8;break;case 7:(s=p.createSign("RSA-SHA256")).update(n.signdata.buffer),i=s.sign(r.privateKey);case 8:return s={len:i.length+12,size:i.length+8,id:y.CRYPT_TYPE_RSA_SHA256,buffer:i},e.a(2,(n.signatures.data.push(s),n.signatures.size+=s.len,n.size+=s.len,n.len+=s.len,n))}},e)}))).apply(this,arguments)}function E(){return(E=_asyncToGenerator(_regenerator().m(function e(t,r,n){var i,a,o;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if((i={len:4+r.len,size:r.len,data:[]}).data.push(r),a=y.isApkSign()?y.SIGN_TYPE_FULL_PACKAGE_APK:y.SIGN_TYPE_FULL_PACKAGE,(i={len:32+(a={len:i.len+12,size:i.len+4,id:a,value:i}).len,size:24+a.len,data:[]}).data.push(a),t.files&&!y.isApkSign())return e.n=1,function(){return D.apply(this,arguments)}(t.files,n);e.n=2;break;case 1:(a=e.v)&&((o={len:4+a.length,size:a.length,data:[]}).data.push(a),o={len:o.len+12,size:o.len+4,id:y.SIGN_TYPE_FILE_LIST,value:o},i.data.push(o),i.size+=o.len,i.len+=o.len);case 2:return e.a(2,i)}},e)}))).apply(this,arguments)}function A(e){var t=Buffer.alloc(e.len),r=0;return t.writeInt32LE(e.digests.size,r),r+=4,e.digests.data.forEach(function(e){e.buffer.copy(t,r),r+=e.len}),t.writeInt32LE(e.certs.size,r),r+=4,e.certs.data.forEach(function(e){e.buffer.copy(t,r),r+=e.len}),t.writeInt32LE(e.additional,r),t}function x(e){var i={len:8,size:4,digests:[],sign:null};return e.forEach(function(e){var t=a.CRC32.digest(e.name.toString()),r=6+e.hash.length,n=Buffer.alloc(r);n.writeInt32LE(t,0),n.writeInt16LE(e.hash.length,4),e.hash.copy(n,6),i.digests.push(n),i.size+=r,i.len+=r}),i}function D(){return(D=_asyncToGenerator(_regenerator().m(function e(i,a){var o,s,c,u,l,f,h;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:o=x(i),s=Buffer.alloc(o.size),c=0,o.digests.forEach(function(e){e.copy(s,c),c+=e.length}),a.sign?(console.log("sign files, use remote sign"),u=a.sign,e.n=7):e.n=1;break;case 1:if("dss"===a.type)return e.n=2,g.getSignDigestOnline(s);e.n=3;break;case 2:l=e.v,u=Buffer.from(d.toUint8Array(l.signature)),e.n=7;break;case 3:if(a.signOnline)return l=w(s),e.n=4,b(l,a.onlineConfig);e.n=6;break;case 4:if((f=e.v).success){e.n=5;break}throw new Error(f.message);case 5:u=Buffer.from(d.toUint8Array(f.data.signData)),e.n=7;break;case 6:(h=p.createSign("RSA-SHA256")).update(s),u=h.sign(a.privateKey);case 7:return e.a(2,(o.digests=s.slice(),o.sign={len:12+u.length,size:8+u.length,id:y.CRYPT_TYPE_RSA_SHA256,data:u},o.len+=o.sign.len,t=o,n=r=void 0,r=Buffer.alloc(t.len),n=0,r.writeInt32LE(t.size,0),n+=4,t.digests.copy(r,4),n+=t.digests.length,r.writeInt32LE(t.sign.size,n),n+=4,r.writeInt32LE(t.sign.id,n),n+=4,r.writeInt32LE(t.sign.data.length,n),n+=4,t.sign.data.copy(r,n),r))}var t,r,n},e)}))).apply(this,arguments)}function i(){return(i=_asyncToGenerator(_regenerator().m(function e(o,s,c){var u,l,f;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(h.checkZipBuffer(o)){e.n=1;break}return e.a(2,null);case 1:if((u=h.parserZip(o)).options={files:s},u.tag){e.n=2;break}return e.a(2,null);case 2:return Object.keys(u.sections).forEach(function(e){e=u.sections[e];_(o,e)}),l=v(u),l=k(l),l=S(l,c.cert.obj),e.n=3,function(){return C.apply(this,arguments)}(l,c);case 3:return l=e.v,e.n=4,function(){return E.apply(this,arguments)}(u.options,l,c);case 4:return f=e.v,e.a(2,(u.signchunk=(e=>{var t=Buffer.alloc(e.len),r=0,n=(t.writeInt32LE(e.size,r),r+=4,t.writeInt32LE(0,r),r+=4,y.isApkSign()?y.SIGN_TYPE_FULL_PACKAGE_APK:y.SIGN_TYPE_FULL_PACKAGE),e=(e.data.forEach(function(e){t.writeInt32LE(e.size,r),r+=4,t.writeInt32LE(0,r),r+=4,t.writeInt32LE(e.id,r),r+=4,t.writeInt32LE(e.value.size,r),r+=4,n===e.id?e.value.data.forEach(function(e){t.writeInt32LE(e.size,r),r+=4,t.writeInt32LE(e.signdata.size,r),r+=4,e.signdata.buffer.copy(t,r),r+=e.signdata.buffer.length,t.writeInt32LE(e.signatures.size,r),r+=4,e.signatures.data.forEach(function(e){t.writeInt32LE(e.size,r),r+=4,t.writeInt32LE(e.id,r),r+=4,t.writeInt32LE(e.buffer.length,r),r+=4,e.buffer.copy(t,r),r+=e.buffer.length}),t.writeInt32LE(e.pubkey.size,r),r+=4,e.pubkey.buffer.copy(t,r),r+=e.pubkey.buffer.length}):y.SIGN_TYPE_FILE_LIST===e.id&&e.value.data.forEach(function(e){e.copy(t,r),r+=e.length})}),t.writeInt32LE(e.size,r),r+=4,t.writeInt32LE(0,r),r+=4,y.isApkSign()?y.SIGN_MAGIC_APK:y.SIGN_MAGIC);return Buffer.from(e).copy(t,r),t})(f),t=o,r=u,a=i=n=void 0,n=Buffer.alloc(t.length+r.signchunk.length),i=0,a=r.sections,t.copy(n,0,a.header.startIndex,a.header.startIndex+a.header.len),i+=a.header.len,r.signchunk.copy(n,i),i+=r.signchunk.length,t.copy(n,i,a.central.startIndex,a.central.startIndex+a.central.len),i+=a.central.len,t.writeInt32LE(a.central.startIndex+r.signchunk.length,a.footer.startIndex+16),t.copy(n,i,a.footer.startIndex,a.footer.startIndex+a.footer.len),n))}var t,r,n,i,a},e)}))).apply(this,arguments)}function O(){return(O=_asyncToGenerator(_regenerator().m(function e(t,r,n){var i,a;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(h.checkZipBuffer(t)){e.n=1;break}return e.a(2,null);case 1:if((i=h.parserZip(t)).options={files:r},i.tag){e.n=2;break}return e.a(2,null);case 2:return Object.keys(i.sections).forEach(function(e){e=i.sections[e];_(t,e)}),a=v(i),a=k(a),a=S(a,n.cert.obj),e.a(2,A(a))}},e)}))).apply(this,arguments)}function T(e){var t=p.createHash("SHA256");return t.update(e),t.digest()}function I(e,t){var r={};return r.size=e.readInt32LE(t),r.buffer=e.slice(t+=4,t+r.size),{obj:r,i:t+=r.size}}t.exports={hashFile:function(e){return T(n.readFileSync(e))},signZipResource:function(e,t,r){return i.apply(this,arguments)},getBufferSha256:T,getSignChunk:function(e,t){for(var r,n,i,a,o,s=(v=t.previous+8)+t.len,c=[],u={signDataBufList:[]},l=y.isApkSign()?y.SIGN_TYPE_FULL_PACKAGE_APK:y.SIGN_TYPE_FULL_PACKAGE;v<s;){a=v,void 0,(o={}).size=(f=e).readInt32LE(a),o.id=f.readInt32LE(a+=8),a+=4,o.value={},o.value.size=f.readInt32LE(a),o.value.data=[];var f={data:o,index:a+=4},h=f.data,d=(v=f.index)+h.value.size,p={};if(l===h.id)for(;v<d;){p.size=e.readInt32LE(v);var g=I(e,v+=4),m=(p.signdata=g.obj,v=g.i,u.signDataBufList.push(p.signdata.buffer),p.signatures={},p.signatures.size=e.readInt32LE(v),(v+=4)+p.signatures.size);for(p.signatures.data=[];v<m;){r=v,i=n=void 0,(n={}).size=(_=e).readInt32LE(r),n.id=_.readInt32LE(r+=4),i=_.readInt32LE(r+=4),n.buffer=_.slice(r+=4,r+i);var _={sData:n,index:r+=i},v=_.index;p.signatures.data.push(_.sData)}g=I(e,v);p.pubkey=g.obj,v=g.i,h.value.data.push(p)}else y.SIGN_TYPE_FILE_LIST===h.id&&(p=e.slice(v,v+h.value.size),h.value.data.push(p));c.push(h)}return u.data=c,u.size=t.size,u},getCertBuffer:function(e){var t,r;if(e)return e.signDataBufList&&0<e.signDataBufList.length?(r=e.signDataBufList[t=0].readInt32LE(0),r=e.signDataBufList[0].readInt32LE(t=t+(4+r)+4),e=e.signDataBufList[0].slice(t+=4,t+r),y.CERT_HEAD+e.toString("base64")+y.CERT_END):void 0;console.error("no sign chunk!")},getSignFilesObject:x,getSignData:function(e,t,r){return O.apply(this,arguments)}}}),Ct=$e(function(j,e){function L(t,r,n,i){if(r&&"object"==_typeof(r)||"function"==typeof r){var a,o=_createForOfIteratorHelper(M(r));try{for(o.s();!(a=o.n()).done;)(()=>{var e=a.value;U.call(t,e)||e===n||s(t,e,{get:function(){return r[e]},enumerable:!(i=H(r,e))||i.enumerable})})()}catch(e){o.e(e)}finally{o.f()}}return t}function t(e,t,r){return r=null!=e?z(G(e)):{},L(!t&&e&&e.__esModule?r:s(r,"default",{value:e,enumerable:!0}),e)}var N,z=Object.create,s=Object.defineProperty,H=Object.getOwnPropertyDescriptor,M=Object.getOwnPropertyNames,G=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty,r={},q=r,V={$async:function(){return v},ASCF_LOG_FILE:function(){return X},AscfBuilder:function(){return In},AscfDebugger:function(){return Rr},AsyncResult:function(){return ie},BUILD_MODE_DEBUG:function(){return yn},BUILD_MODE_RELEASE:function(){return bn},BUILD_TARGET_AS:function(){return pt},BUILD_TARGET_QS:function(){return gt},BuildProcessFactory:function(){return ei},DebuggerProcessFactory:function(){return ti},ERROR_MSG:function(){return S},HOS_DEVICE:function(){return _},LEGACY_DEVICE:function(){return m},ascfCompile:function(){return an},ascfConvert:function(){return sn},ascfGenCert:function(){return un},ascfGenP12:function(){return fn},ascfRun:function(){return I},clearAscfDepDirCache:function(){return Zr},configureLogger:function(){return ee},devicesLegacyShared:function(){return be},execSafe:function(){return Mt},findAvailablePort:function(){return Vt},fixHvigorPath:function(){return Yr},fportCmd:function(){return $e},fportListCmd:function(){return Ye},fportRmCmd:function(){return Je},getAdbPath:function(){return Me},getAscfDebuggerPidFile:function(){return vn},getAscfDepDir:function(){return $r},getBundleInfo:function(){return Tt},getDebugServerInfo:function(){return mn},getDebugees:function(){return _r},getDevEcoSdkHome:function(){return _e},getDevEcoToolsDir:function(){return de},getDeviceName:function(){return Ve},getDevicesCmd:function(){return et},getHdcPath:function(){return u},getHvigorwPath:function(){return c},getLegacyDeviceName:function(){return tt},getLegacyPackInfo:function(){return nt},getLegacyProcess:function(){return rt},getLogLevelGetter:function(){return re},getLogger:function(){return i},getNodePath:function(){return pe},getNpmPath:function(){return ge},getOhpmPath:function(){return me},getPath:function(){return o},getPid:function(){return at},getProjectConfig:function(){return It},getSpkInfo:function(){return Ot},hasHvigor:function(){return Wr},hdcDeviceShared:function(){return At},hdcShared:function(){return mt},installAscfTools:function(){return ze},installSpkShared:function(){return zn},isPortReachable:function(){return Ut},listTargets:function(){return qe},maskLast4:function(){return g},mergeJson:function(){return Ie},normalizeBuildMode:function(){return wn},openInBrowser:function(){return pr},optArgIf:function(){return Tn},parseJsonFile:function(){return l},parseJsonSafe:function(){return Te},portManagerShared:function(){return Zt},rportCmd:function(){return Xe},rportRmCmd:function(){return Qe},runAdbCmdAsync:function(){return h},setLogLevelGetter:function(){return te},setLoggerConfig:function(){return Q},startDebugServerCmd:function(){return dn},startHostPkg:function(){return Ze},startHostPkgUrl:function(){return Ke},stopDebugServer:function(){return gn},tryAdbPortReversing:function(){return We},tryHdcPortReversing:function(){return ft}};for(N in V)s(q,N,{get:V[N],enumerable:!0});e.exports=(e=r,L(s({},"__esModule",{value:!0}),e));var n=t(require("log4js")),W=t(require("path")),Z=t(require("cachedir")),K=!1,Y=["debug","info","warn","error","fatal"],J="info",$=function(){return J||"info"},X=W.resolve((0,Z.default)("ascf-cache"),"build.log");function Q(e){e=(e=e)&&Y.includes(e.toLowerCase())?e.toLowerCase():"info";J=e,n.configure({appenders:{default:{type:"stdout",layout:{type:"pattern",pattern:"%d{hh:mm:ss.SSS} > %p %c %[%m%]"}},"debug-log-file":{type:"fileSync",filename:W.resolve((0,Z.default)("ascf-cache"),"build.log"),maxLogSize:10485760,backups:9,layout:{type:"pattern",pattern:"%d{yyyy-MM-dd hh:mm:ss.SSS} > %p %c %m"}}},categories:{default:{appenders:["default"],level:e},AscfToolkit:{appenders:["debug-log-file"],level:"debug"}}})}function ee(e){n.configure(e)}function te(e){$=e}function re(){return $}var ne=_createClass(function e(t){_classCallCheck(this,e),this.categories=t,this.logger=n.getLogger(t),global._ascfCliProgram&&(this.fileLogger=n.getLogger("AscfToolkit"))},[{key:"doLog",value:function(e,t,r){var n,i=3<arguments.length&&void 0!==arguments[3]&&arguments[3],a="";""!==(a="info"!==e?function(e){var t="";if(K){for(var r=arguments.length,n=new Array(1<r?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];n.unshift(e);for(var a=0;a<n.length;a++){var o="";"string"==typeof n[a]&&(o=n[a]),(o=n[a]instanceof Error?n[a].message:o).startsWith("\n")?t+=String(o).split("\n")[1]:t+=String(o).split("\n")[0]}}return t}.apply(void 0,[t].concat(_toConsumableArray(r))):a)?(this.logger[e](a),null!=(n=this.fileLogger)&&n[e](a)):((n=this.logger)[e].apply(n,[t].concat(_toConsumableArray(r))),null!=(a=this.fileLogger)&&a[e].apply(a,[t].concat(_toConsumableArray(r)))),i&&process.exit(1)}},{key:"info",value:function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return this.doLog("info",e,r)}},{key:"warn",value:function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return this.doLog("warn",e,r)}},{key:"debug",value:function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return this.doLog("debug",e,r)}},{key:"error",value:function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return this.doLog("error",e,r)}},{key:"fatal",value:function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return this.doLog("fatal",e,r,!0)}}]);function i(e){return new ne(e)}var ie=_createClass(function e(){_classCallCheck(this,e)});function v(e){return ae.apply(this,arguments)}function ae(){return(ae=_asyncToGenerator(_regenerator().m(function e(t){var r;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,t;case 1:return r=e.v,e.a(2,{data:r});case 2:return e.p=2,e.a(2,{err:e.v})}},e,null,[[0,2]])}))).apply(this,arguments)}var oe=require("child_process"),se=t(require("fs")),ce=t(require("fs")),ue=t(require("path")),le=i("deveco"),fe=!1,a="win32"===process.platform,he=a?"C:\\Program Files\\Huawei\\DevEco Studio\\tools":"/Applications/DevEco-Studio.app/Contents/tools";function de(){var e=process.env["DevEco Studio"]||process.env.DEVECO_SDK_HOME||process.env.ASCF_DEVECO_SDK_HOME,e=e?e.split(";")[0].trim()+"/../tools/":he;return fe||ce.existsSync(e)||(fe=!0,le.error("DEVECO_SDK_HOME is not found, please set environment DEVECO_SDK_HOME")),e}function o(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=de(),n=ue.join.apply(ue,[n].concat(t));return a&&n.includes(" ")?'"'.concat(n,'"'):n}function pe(){return o("node",a?"node.exe":"bin/node")}function ge(){return o("node",a?"npm.cmd":"bin/npm")}function me(){return o("ohpm","bin","ohpm")}function c(){return o("hvigor","bin","hvigorw")}function _e(){return o("../sdk").replace(/"/g,"")}function u(){return o("../sdk/default/openharmony/toolchains",a?"hdc.exe":"hdc")}var ve=t(require("path")),ye=require("os");function be(e){var c=e.logger,u=e.runAdbCmdAsync;function t(){return(t=_asyncToGenerator(_regenerator().m(function e(){var t;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,v(u(["devices","-l"]));case 1:return t=e.v,e.a(2,t.err?(c.error("list targets error: "+t.err),[]):null==(t=t.data)||null==(t=t.trim())||null==(t=t.split("\n"))?void 0:t.map(function(e){return e.trim()}))}},e)}))).apply(this,arguments)}function r(){return(r=_asyncToGenerator(_regenerator().m(function e(t){var r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,v(u(["-s",t,"shell","getprop","ro.product.name"]));case 1:return r=e.v,e.a(2,r.err||/(\[Fail\])/.test(r.data)?(c.error("get device name error",r.err),"Unknown"):null==(r=r.data)?void 0:r.trim())}},e)}))).apply(this,arguments)}function l(e,t){return n.apply(this,arguments)}function n(){return(n=_asyncToGenerator(_regenerator().m(function e(t,r){var n,i,a,o,s=arguments;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return i=2<s.length&&void 0!==s[2]?s[2]:0,a=Math.floor(64512*Math.random())+1024,e.n=1,v(u(["-s",t,"reverse","tcp:".concat(a),"tcp:".concat(r)]));case 1:if((o=e.v).err)return c.warn("Adb reverse tcp:".concat(a," tcp:").concat(r),o.err),e.a(2);e.n=2;break;case 2:return e.a(2,o.data&&10!==i?null!=(n=o.data)&&n.includes(String(a))?a:l(t,r,++i):0)}},e)}))).apply(this,arguments)}var i="com.huawei.ascf.sample/com.huawei.ascf.main.AscfActivity";function a(){return(a=_asyncToGenerator(_regenerator().m(function e(t,r){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,u(["-s",t,"shell","am","start","-n",i,"-S","--es","ascfPackageName",r]))},e)}))).apply(this,arguments)}function o(){return(o=_asyncToGenerator(_regenerator().m(function e(t,r,n){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,u(["-s",t,"shell","am","start","-n",i,"-S","--es","startMode","installAndRunDebugPkg","--es","pkgUrl",n,"--es","ascfPackageName",r,"--es","app_id",r.split("com.atomicservice.")[1]]))},e)}))).apply(this,arguments)}function s(){return(s=_asyncToGenerator(_regenerator().m(function e(t){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,u(["-s",t,"forward","--list"],{sensitive:!0}))},e)}))).apply(this,arguments)}function f(){return(f=_asyncToGenerator(_regenerator().m(function e(t,r){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,u(["-s",t,"forward","--remove",r]))},e)}))).apply(this,arguments)}function h(){return(h=_asyncToGenerator(_regenerator().m(function e(t,r,n){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,u(["-s",t,"forward",r,n]))},e)}))).apply(this,arguments)}function d(){return(d=_asyncToGenerator(_regenerator().m(function e(t,r,n){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,u(["-s",t,"reverse","tcp:".concat(n),"tcp".concat(r)]))},e)}))).apply(this,arguments)}function p(){return(p=_asyncToGenerator(_regenerator().m(function e(t,r){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,u(["-s",t,"reverse","--remove",r]))},e)}))).apply(this,arguments)}function g(){return(g=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,u(["devices","-l"],{sensitive:!0}))},e)}))).apply(this,arguments)}function m(){return(m=_asyncToGenerator(_regenerator().m(function e(t){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,u(["-s",t,"shell","getprop","ro.product.model"]))},e)}))).apply(this,arguments)}function _(){return(_=_asyncToGenerator(_regenerator().m(function e(t,r){var n,i;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return n=1,e.n=1,v(u(["-s",t,"shell",'"dumpsys activity activities | grep mResumedActivity"']));case 1:return i=e.v,e.a(2,(i.data&&(n=null!=(i=Number(null==(i=/AscfContainerActivity(\d+)/.exec(i.data))?void 0:i[1]))?i:1),u(["-s",t,"shell",'"ps -ef | grep '.concat(r,":ascf").concat(n,' | grep -v render | grep -v grep"')])))}},e)}))).apply(this,arguments)}return{listTargets:function(){return t.apply(this,arguments)},getDeviceName:function(e){return r.apply(this,arguments)},tryAdbPortReversing:l,startHostPkg:function(e,t){return a.apply(this,arguments)},startHostPkgUrl:function(e,t,r){return o.apply(this,arguments)},fportListCmd:function(e){return s.apply(this,arguments)},fportRmCmd:function(e,t){return f.apply(this,arguments)},fportCmd:function(e,t,r){return h.apply(this,arguments)},rportCmd:function(e,t,r){return d.apply(this,arguments)},rportRmCmd:function(e,t){return p.apply(this,arguments)},getDevicesCmd:function(){return g.apply(this,arguments)},getLegacyDeviceName:function(e){return m.apply(this,arguments)},getLegacyProcess:function(e,t){return _.apply(this,arguments)}}}var we=require("https"),d=require("fs"),ke=require("path"),Se=t(require("tar")),Ce=t(require("zlib")),Ee=t(require("stream")),Ae=require("crypto"),xe=t(require("fs")),De=require("json5"),Oe=i("json");function Te(e,t){try{var r;return(null!=(r=De.default)?r:De).parse(e)}catch(e){Oe.error("parse json error",e)}return t}function l(e,t){return xe.existsSync(e)?Te(xe.readFileSync(e,"utf-8"),t):t}function Ie(e,t){for(var r in t){var n;"object"==_typeof(t[r])?Array.isArray(t[r])?(Object.prototype.hasOwnProperty.call(e,r)||(e[r]=[]),(n=e[r]).push.apply(n,_toConsumableArray(t[r]))):(Object.prototype.hasOwnProperty.call(e,r)&&"object"==_typeof(e[r])||(e[r]={}),Ie(e[r],t[r])):e[r]=t[r]}return e}var r=t(require("cachedir")),e=t(require("path")),Be=t(require("fs")),r=(0,r.default)("ascf-cache"),f=e.join(r,"ascfTools"),p=i("npmUtils");function Pe(){return(Pe=_asyncToGenerator(_regenerator().m(function e(t,o,s){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(i,a){(0,we.get)(t,function(e){var r,n;200!==e.statusCode?a(new Error("Download failed: ".concat(e.statusCode))):(r=(0,Ae.createHash)("sha512"),n=[],e.on("data",function(e){r.update(e),n.push(e)}),e.on("end",function(){var e,t;"sha512-".concat(r.digest("base64"))!==s?a("Verify integrity failed"):(p.debug("Extracting to ".concat(o)),t=Buffer.concat(n),(e=new Ee.PassThrough).end(t),(t=Se.x({cwd:o,strip:1,noChmod:!0,noMtime:!0,preserveOwner:!1,onwarn:function(e,t,r){p.warn("extract entry error",e,t)}})).on("end",i),t.on("error",a),e.pipe(Ce.createGunzip()).pipe(t).on("error",function(e){return p.error("Extract error:",e)}).on("close",i))}),e.on("finish",i),e.on("error",a))}).on("error",a)}))},e)}))).apply(this,arguments)}var Fe={pkg:"@chrome-devtools/js-app",version:"1.20251708.0",baseFolder:"",existsFlag:"js_app.html"},Re={pkg:"@atomicservice/ascf-toolkit",version:"1.0.9",baseFolder:"",existsFlag:"lib/tools/platform-tools-windows/adb.exe"};function je(){return Le.apply(this,arguments)}function Le(){return(Le=_asyncToGenerator(_regenerator().m(function e(n,i){var a,o,s,c,u,l,f,h;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:if(a=i.pkg,o=i.version,c=i.baseFolder,u=i.existsFlag,s="".concat(a,"@").concat(o),p.info("begin to download ".concat(s)),c=(0,ke.join)(n,c),u=(0,ke.join)(c,u),(0,d.existsSync)(u))return e.a(2,(p.debug("".concat(u," is exists, skip download and extract")),c));e.n=1;break;case 1:if(t=a,r=o,f=(null==(t=Te(Mt("".concat(ge()," info --json ").concat(t,"@").concat(r)),{}))?void 0:t.dist)||{},l=f.tarball,f=f.integrity,l){e.n=2;break}return p.error("".concat(s," is not found")),e.a(2);case 2:return(0,d.mkdirSync)(n,{recursive:!0}),e.p=3,e.n=4,function(){return Pe.apply(this,arguments)}(l,n,f);case 4:e.n=6;break;case 5:return e.p=5,h=e.v,p.error("downloadAndExtract ".concat(l," error"),h),(0,d.existsSync)(n)&&(0,d.rmdirSync)(n,{recursive:!0}),e.a(2);case 6:if((0,d.existsSync)(u))return e.a(2,(p.info("download ".concat(s," to ").concat(n," success")),c));e.n=7;break;case 7:p.error("download ".concat(s," to ").concat(n," failed"));case 8:return e.a(2)}var t,r},e,null,[[3,5]])}))).apply(this,arguments)}function Ne(){return(Ne=_asyncToGenerator(_regenerator().m(function e(t){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,je(t,Fe);case 1:return e.a(2,e.v)}},e)}))).apply(this,arguments)}function ze(){return He.apply(this,arguments)}function He(){return(He=_asyncToGenerator(_regenerator().m(function e(){var t,r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:Be.existsSync(f)?(p.debug("ascfTools is aleady at ".concat(f)),t=f,e.n=4):e.n=1;break;case 1:return e.n=2,je(f,Re);case 2:if(r=e.v){e.n=3;break}r=f;case 3:t=r;case 4:return e.a(2,t)}},e)}))).apply(this,arguments)}function Me(){return Ge.apply(this,arguments)}function Ge(){return(Ge=_asyncToGenerator(_regenerator().m(function e(){var t;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,ze();case 1:return t=e.v,e.a(2,"win32"===(0,ye.platform)()?ve.default.join(t,"/lib/tools/platform-tools-windows/adb.exe"):"darwin"===(0,ye.platform)()?ve.default.join(t,"/lib/tools/platform-tools-darwin/adb"):ve.default.join(t,"/lib/tools/platform-tools-linux/adb"))}},e)}))).apply(this,arguments)}function h(e,t){return Ue.apply(this,arguments)}function Ue(){return(Ue=_asyncToGenerator(_regenerator().m(function e(t,r){var n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return n=b,e.n=1,Me();case 1:return e.a(2,n(e.v,t,r))}},e)}))).apply(this,arguments)}var e=be({logger:i("legacy"),runAdbCmdAsync:h}),qe=e.listTargets,Ve=e.getDeviceName,We=e.tryAdbPortReversing,Ze=e.startHostPkg,Ke=e.startHostPkgUrl,Ye=e.fportListCmd,Je=e.fportRmCmd,$e=e.fportCmd,Xe=e.rportCmd,Qe=e.rportRmCmd,et=e.getDevicesCmd,tt=e.getLegacyDeviceName,rt=e.getLegacyProcess;function nt(e,t){return it.apply(this,arguments)}function it(){return(it=_asyncToGenerator(_regenerator().m(function e(t,r){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,h(["-s",t,"shell",'"pm list packages -f | grep '.concat(r,'"')]))},e)}))).apply(this,arguments)}function at(e,t){return ot.apply(this,arguments)}function ot(){return(ot=_asyncToGenerator(_regenerator().m(function e(t,r){var n,i,a;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,v(h(["-s",t,"shell","pidof",r]));case 1:if(n=e.v.data,i=null===n){e.n=2;break}i=void 0===n;case 2:i?(a=void 0,e.n=4):e.n=3;break;case 3:a=n.trim();case 4:return e.a(2,a)}},e)}))).apply(this,arguments)}var st=i("hos");function ct(){return ut.apply(this,arguments)}function ut(){return(ut=_asyncToGenerator(_regenerator().m(function e(t,r){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,b(u(),t,r))},e)}))).apply(this,arguments)}function lt(){return(lt=_asyncToGenerator(_regenerator().m(function e(){var t;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,v(ct(["list","targets"],{sensitive:!0}));case 1:return t=e.v,e.a(2,t.err?(st.error("list targets error: "+t.err),[]):null==(t=t.data)||null==(t=t.trim())||null==(t=t.split("\n"))?void 0:t.map(function(e){return e.trim()}))}},e)}))).apply(this,arguments)}function ft(e,t){return ht.apply(this,arguments)}function ht(){return(ht=_asyncToGenerator(_regenerator().m(function e(t,r){var n,i,a,o,s=arguments;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return i=2<s.length&&void 0!==s[2]?s[2]:0,a=Math.floor(64512*Math.random())+1024,e.n=1,v(ct(["-t",t,"rport","tcp:".concat(a),"tcp:".concat(r)]));case 1:if((o=e.v).err)return st.warn("hdc rport tcp:".concat(a," tcp:").concat(r),o.err),e.a(2);e.n=2;break;case 2:return e.a(2,o.data&&10!==i?null!=(n=o.data)&&n.includes("Forwardport result:OK")?a:ft(t,r,++i):0)}},e)}))).apply(this,arguments)}var dt=require("child_process");function g(e){return e&&(e.length<4?"*".repeat(e.length):e.slice(0,-4)+"****")}var pt="atomicservice",gt="crossAtomicService";function mt(e){var l=e.logger,f=e.getDevEcoSdkHome,h=e.getPath,n=e.getHdcPath;function d(e){return null==e?void 0:e.replace(/--sign-pwd\s+\S+/g,"--sign-pwd ***").replace(/(--deviceId|-t|-s)\s+(\S+)/g,function(e,t,r){return"".concat(t," ").concat(g(r))})}function s(e,t,n,i,r){l.debug("begin runCmd: ",e," ",d(null==t?void 0:t.join(" "))),!1===(null==i?void 0:i.shell)&&(e=e.replace(/"/g,""));function a(e){null!=i&&i.sensitive||l.debug("runCmd stdout: ",d(e)),c.push(e)}var o,s=(0,dt.spawn)(e,t,(e=i,t=f(),s=h("node"),l.debug("DEVECO_SDK_HOME="+t),o=s+";"+(null!=(o=process.env.PATH)?o:""),Object.assign({shell:!0,env:_objectSpread(_objectSpread({},process.env||{}),{},{NODE_HOME:s,PATH:o,DEVECO_SDK_HOME:t})},e))),c=(null!=r&&r(s),[]),u=[];return s.stdout.on("data",function(e){e=e.toString().trim();a(e)}),s.stderr.on("data",function(e){var e=e.toString().trim();/<i> \[(webpack-dev-server)|(webpack-dev-middleware)\]/.test(e)?a(e):(/hvigor /.test(e=e)&&/WARN/.test(e)?(l.warn("runCmd stdout: ",e),c):(l.error("runCmd stderr: ",e),u)).push(e)}),s.on("close",function(e){var t,r=c.join("\n");0===e||null!=i&&null!=(t=i.ignoreError)&&t.call(i,e)?/failed to start ability/.test(r)?null!=n&&n("start ability error"):(null!=n&&n(null,r),l.debug("runCmd exited.")):(t="runCmd exited with code ".concat(e,"."),l.error(t),null!=n&&n(t+" errors:\n"+u.join("\n"),r))}),s}function i(e,t,r,n){return a.apply(this,arguments)}function a(){return(a=_asyncToGenerator(_regenerator().m(function e(t,i,a,o){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(r,n){s(t,i,function(e,t){if(e)return n(e);r(t)},a,o)}))},e)}))).apply(this,arguments)}function o(e,t){return r.apply(this,arguments)}function r(){return(r=_asyncToGenerator(_regenerator().m(function e(t,r){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,i(n(),t,r))},e)}))).apply(this,arguments)}function t(){return(t=_asyncToGenerator(_regenerator().m(function e(t){var r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,v(o(["-t",t,"shell","param","get","const.product.name"]));case 1:return r=e.v,e.a(2,r.err||/(\[Fail\])/.test(r.data)?(l.error("get device name error",r.err),"Unknown"):null==(r=r.data)?void 0:r.trim())}},e)}))).apply(this,arguments)}return{runCmd:s,runCmdAsync:i,runExecAsync:function(t,r,a){return new Promise(function(n,i){var e=[t].concat(_toConsumableArray(r||[])).join(" ");l.debug("begin runExecAsync",e),(0,dt.exec)(e,_objectSpread({encoding:"utf8"},a||{}),function(e,t,r){if(e)return l.error("runExecAsync stderr",r),i(r);l.debug("runExecAsync stdout",t),n(t)})})},runHdcCmd:function(e,t,r){return s(n(),e,t,r)},runHdcCmdAsync:o,getDeviceName:function(e){return t.apply(this,arguments)}}}var _t,vt,yt,bt,wt,kt,St,m="legacy",_="hos",Ct=_createClass(function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:_;_classCallCheck(this,e),this.type=t}),Et=_createClass(function e(t){_classCallCheck(this,e),this.cache=new Map,this.cur=null,this.isInit=!1,this.devices=[],this.adapter=t},[{key:"getDevices",value:(St=_asyncToGenerator(_regenerator().m(function e(){var t,r,n,i=arguments;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(r=1<i.length&&void 0!==i[1]&&i[1],!(0<i.length&&void 0!==i[0]&&i[0])&&this.isInit&&null!=(t=this.devices)&&t.length)return e.a(2,this.devices);e.n=1;break;case 1:return n=r?null:(null==(t=global._ascfCliOptions)?void 0:t.deviceType)||_,e.n=2,this.getDevicesInner(n);case 2:return n=e.v,e.a(2,(this.devices=n,this.isInit=!0,n))}},e,this)})),function(){return St.apply(this,arguments)})},{key:"getDevicesInner",value:(kt=_asyncToGenerator(_regenerator().m(function e(t){var r,n,i,a,o,s;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(r=[],t===_)return e.n=1,this.getHosDevices();e.n=2;break;case 1:r=e.v,e.n=4;break;case 2:if(t===m)return e.n=3,this.getLegacyDevices();e.n=4;break;case 3:r=e.v;case 4:if(r.length){e.n=8;break}return a=Promise,e.n=5,this.getHosDevices();case 5:return o=e.v,e.n=6,this.getLegacyDevices();case 6:return s=e.v,e.n=7,a.all.call(a,[o,s]);case 7:s=e.v,i=_slicedToArray(s,2),n=i[0],i=i[1],r=[].concat(_toConsumableArray(n),_toConsumableArray(i));case 8:return e.a(2,(r.length||this.adapter.logger.debug("listTargets error or no devices found"),r))}},e,this)})),function(e){return kt.apply(this,arguments)})},{key:"getHosDevices",value:(wt=_asyncToGenerator(_regenerator().m(function e(){var t,r,i,n,a=this;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,v(this.adapter.listTargets());case 1:if((r=e.v).err||null==r||null==(t=r.data)||!t.length||/(\[Empty\])|(\[Fail\])/.test(null==(t=r.data)?void 0:t.join("\n")))return e.a(2,(this.cur=null,this.adapter.logger.debug("hos listTargets error or no devices found",r.err),[]));e.n=2;break;case 2:return this.adapter.logger.debug("found devices: ",null==(t=r.data)?void 0:t.map(g).join("\n")),i=!1,e.n=3,Promise.all(r.data.map((()=>{var t=_asyncToGenerator(_regenerator().m(function e(t){var r,n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(a.cur&&a.cur.sn===t&&(i=!0),a.cache.has(t))return e.a(2,a.cache.get(t));e.n=1;break;case 1:return(r=new Ct(_)).sn=t,e.n=2,a.adapter.getDeviceName(t);case 2:return n=e.v,e.a(2,(r.name="[HOS] ".concat(n),a.cache.set(t,r),r))}},e)}));return function(e){return t.apply(this,arguments)}})()));case 3:return n=e.v,e.a(2,(i||(this.cur=n.length?n[0]:null),n))}},e,this)})),function(){return wt.apply(this,arguments)})},{key:"getLegacyDevices",value:(bt=_asyncToGenerator(_regenerator().m(function e(){var t,r,i,n,a=this;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,v(this.adapter.getDevicesCmd());case 1:if((t=e.v).err||null==t||null==(r=t.data)||!r.length||/^List of devices attached$/.test(t.data))return e.a(2,(this.adapter.logger.debug("legacy listTargets error or no devices found"),[]));e.n=2;break;case 2:return(r=t.data.split("\n")).shift(),r=r.map(function(e){return e.split(" ")[0]}),this.adapter.logger.debug("found devices: ",null==(n=r)?void 0:n.map(g).join("\n")),i=!1,e.n=3,Promise.all(r.map((()=>{var t=_asyncToGenerator(_regenerator().m(function e(t){var r,n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(a.cur&&a.cur.sn===t&&(i=!0),a.cache.has(t))return e.a(2,a.cache.get(t));e.n=1;break;case 1:return(r=new Ct(m)).sn=t,e.n=2,a.adapter.getLegacyDeviceName(t);case 2:return n=e.v,e.a(2,(r.name=n,a.cache.set(t,r),r))}},e)}));return function(e){return t.apply(this,arguments)}})()));case 3:return n=e.v,e.a(2,(i||(this.cur=n.length?n[0]:null),n))}},e,this)})),function(){return bt.apply(this,arguments)})},{key:"getCurrent",value:function(){return this.cur}},{key:"setCurrent",value:function(e){e&&this.cache.has(e)&&(e=this.cache.get(e),this.cur=e)}},{key:"checkAndGetCurrent",value:(yt=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getDevices();case 1:return e.a(2,this.getCurrent())}},e,this)})),function(){return yt.apply(this,arguments)})},{key:"getDeviceId",value:(vt=_asyncToGenerator(_regenerator().m(function e(){var t;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getDevices();case 1:if(t=null==(t=this.getCurrent())?void 0:t.sn){e.n=2;break}return this.adapter.onError(this.adapter.NO_DEVICE_ERROR),e.a(2);case 2:return e.a(2,t)}},e,this)})),function(){return vt.apply(this,arguments)})},{key:"getDeviceType",value:(_t=_asyncToGenerator(_regenerator().m(function e(t){var r,n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.getDevices();case 1:if(r=t?null==(r=this.devices)?void 0:r.find(function(e){return e.sn===t}):null)return e.a(2,r.type);e.n=2;break;case 2:if(n=null==(n=this.getCurrent())?void 0:n.type){e.n=3;break}return this.adapter.onError(this.adapter.NO_DEVICE_ERROR),e.a(2);case 3:return e.a(2,n)}},e,this)})),function(e){return _t.apply(this,arguments)})}]);function At(e){var t=_createClass(r,null,[{key:"getInstance",value:function(){return r.instance}}]);function r(){_classCallCheck(this,r)}return t.instance=new Et(e),{DeviceInfo:Ct,DeviceManager:t}}var xt=t(require("fs")),Dt=i("bundle");function Ot(e,t){var e=Tt(e,!0),r=e.bundleName,e=e.versionCode,n=(new Date).toISOString().split("T")[0].split("-").join("");return{bundleName:r,spkName:"".concat(r,"-").concat(e,"-").concat(t,"-").concat(n,".spk")}}function Tt(e){var t={bundleName:"",versionCode:""};if(1<arguments.length&&void 0!==arguments[1]&&arguments[1]){var r="".concat(e,"/ascf/ascf_src/app.json");if(xt.default.existsSync(r)){r=JSON.parse(xt.default.readFileSync(r,"utf8"));if(null!=r&&r.package)return t.bundleName=null==r?void 0:r.package,t.versionCode=null==r?void 0:r.versionCode,t}}var r="".concat(e,"/AppScope/app.json5");if(xt.default.existsSync(r))return e=l(r,{}),t.bundleName=null==e||null==(r=e.app)?void 0:r.bundleName,t.versionCode=null==e||null==(r=e.app)?void 0:r.versionCode,t;if(t.bundleName&&t.versionCode)return t;throw Dt.error(e="bundleName or versionCode is not configured"),new Error(e)}function It(e){return l("".concat(e,"/ascf/ascf_src/ascf.config.json"),{})}var y=i("hdc"),r=mt({logger:y,getDevEcoSdkHome:_e,getPath:o,getHdcPath:u}),Bt=r.runCmd,b=r.runCmdAsync,w=r.runHdcCmdAsync;function Pt(e){var t,e="".concat(e,"/AppScope/app.json5");if(se.existsSync(e))return null==(t=l(e,{}))||null==(t=t.app)?void 0:t.bundleName;throw y.error("".concat(e," is not found")),new Error("".concat(e," is not found"))}function Ft(e){e="".concat(e,"/build-profile.json5");if(se.existsSync(e))return l(e,{});throw y.error("".concat(e," is not found")),new Error("".concat(e," is not found"))}function Rt(){return jt.apply(this,arguments)}function jt(){return(jt=_asyncToGenerator(_regenerator().m(function e(t,r){var n,i,a;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return y.info("start startAbility under ".concat(t)),n=Pt(t),e.n=1,v(w(["-t",r,"shell","aa","force-stop",n]));case 1:return i=["-t",r,"shell","aa","start","-a","EntryAbility","-b",n,"--ps launchMode forceUpdate"],"brk"===(null==(a=It(t))?void 0:a.ascfDebugger)&&i.push("--ps ascfDebugger brk"),e.n=2,v(w(i));case 2:if((a=e.v).err)return y.error("start hap error",a.err),y.error("Start ability error"),e.a(2);e.n=3;break;case 3:return e.a(2)}},e)}))).apply(this,arguments)}function Lt(){return(Lt=_asyncToGenerator(_regenerator().m(function e(t){var r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return y.info("start installDeps under ".concat(t)),e.n=1,v(b(me(),["update"],{chdir:!0,cwd:t}));case 1:(r=e.v).err&&y.error("installDeps err",r.err);case 2:return e.a(2)}},e)}))).apply(this,arguments)}function Nt(){return(Nt=_asyncToGenerator(_regenerator().m(function e(t){var r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return y.info("start ohpm clean under ".concat(t)),e.n=1,v(b(me(),["clean"],{chdir:!0,cwd:t}));case 1:(r=e.v).err&&y.error("ohpmClean err",r.err);case 2:return e.a(2)}},e)}))).apply(this,arguments)}function zt(){return(zt=_asyncToGenerator(_regenerator().m(function e(t){var r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return y.info("start hvigor clean under ".concat(t)),e.n=1,v(b(c(),["clean","--parallel"],{chdir:!0,cwd:t}));case 1:(r=e.v).err&&y.error("hvigorClean err",r.err);case 2:return e.a(2)}},e)}))).apply(this,arguments)}function Ht(e){if(e){var t=process.platform;try{"win32"===t?(0,oe.execSync)("taskkill /pid ".concat(e.pid," /T /F")):"darwin"===t&&e.pid?process.kill(e.pid):e.kill()}catch(e){y.warn("killProcess error")}}}var e=At({logger:y,listTargets:function(){return lt.apply(this,arguments)},getDeviceName:r.getDeviceName,getDevicesCmd:et,getLegacyDeviceName:tt,NO_DEVICE_ERROR:"No devices found, please connect to phone",onError:function(e){throw new Error(e)}}),k=(e.DeviceInfo,e.DeviceManager);function Mt(e){var t,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};try{return null==(t=(0,oe.execSync)(e,r))?void 0:t.toString("utf8")}catch(e){y.warn("exec cmd error",e)}}var Gt=t(require("net"));function Ut(e){return qt.apply(this,arguments)}function qt(){return(qt=_asyncToGenerator(_regenerator().m(function e(i){var a,t,o,r,n=arguments;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return t=(r=1<n.length&&void 0!==n[1]?n[1]:{}).host,a=void 0===t?"127.0.0.1":t,o=void 0===(t=r.timeout)?1e3:t,r=new Promise(function(e,t){function r(){n.destroy(),t()}var n=new Gt.Socket;n.once("error",r),n.once("timeout",r),n.setTimeout(o),n.connect(i,a,function(){n.end(),e(i)})}),e.p=1,e.n=2,r;case 2:return e.a(2,!0);case 3:return e.p=3,e.a(2,!1)}},e,null,[[1,3]])}))).apply(this,arguments)}function Vt(){return Wt.apply(this,arguments)}function Wt(){return(Wt=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(r,n){var t,i;t=function(e,t){t?r(t):n(e)},(i=Gt.createServer()).listen(0,"127.0.0.1",function(){var e=null==(e=i.address())?void 0:e.port;i.close(),t(null,e)}),i.on("error",function(e){t(e)})}))},e)}))).apply(this,arguments)}var S="Please check the following: 1.The device is connected to the computer. 2. The screen is on. 3. Check whether the debugging port is occupied. Reference ".concat("https://developer.huawei.com/consumer/cn/doc/atomic-ascf/debug-ascf-code#section1738615814111"," for more details.");function Zt(e){var c=e.logger,u=e.fportListCmd,l=e.fportRmCmd,s=e.isPortReachable,f=e.fportCmd;function h(e){return t.apply(this,arguments)}function t(){return(t=_asyncToGenerator(_regenerator().m(function e(a){var t,o,s,r,n,i=arguments;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return o=1<i.length&&void 0!==i[1]&&i[1],s=2<i.length&&void 0!==i[2]?i[2]:"",e.n=1,v(u(a));case 1:!(r=e.v).err&&r.data?e.n=2:(c.error("fport ls error: ",S),n=[],e.n=4);break;case 2:return e.n=3,Promise.all(null==(t=r.data)?void 0:t.trim().split("\n").map((()=>{var t=_asyncToGenerator(_regenerator().m(function e(t){var r,n,i;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(n=t.split(/\s+/),r=null==(r=n[1])?void 0:r.trim(),n=null==(n=n[2])?void 0:n.trim(),i=o&&r==="tcp:".concat(s))return e.n=1,v(l(a,r,n));e.n=1;break;case 1:return e.a(2,{localPort:r,remotePort:n,needRm:i})}},e)}));return function(e){return t.apply(this,arguments)}})()));case 3:n=e.v.filter(function(e){return e.localPort&&!e.needRm});case 4:return e.a(2,n)}},e)}))).apply(this,arguments)}function n(){return(n=_asyncToGenerator(_regenerator().m(function e(n,i,a){var t,o,r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,h(n);case 1:return t=e.v,o=!1,r=i.trim().replace("tcp:",""),e.n=2,Promise.all(t.map((()=>{var t=_asyncToGenerator(_regenerator().m(function e(t){var r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(t.localPort&&t.remotePort){e.n=1;break}return e.a(2);case 1:if(r=!1,t.localPort===i&&t.remotePort===a?o=!0:t.localPort!==i&&t.remotePort!==a||(r=!0),r)return e.n=2,v(l(n,i,a));e.n=2;break;case 2:return e.a(2)}},e)}));return function(e){return t.apply(this,arguments)}})()));case 2:if(o)return c.warn("already has forward"),e.a(2);e.n=3;break;case 3:return e.n=4,s(r);case 4:if(e.v)return c.error("port ".concat(r," is used")),e.a(2);e.n=5;break;case 5:return e.n=6,v(f(n,i,a));case 6:if(e.v.err)return c.error("fport error: ",S),e.a(2);e.n=7;break;case 7:return e.a(2)}},e)}))).apply(this,arguments)}function r(){return(r=_asyncToGenerator(_regenerator().m(function e(t,r){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,h(t,!0,r);case 1:return e.a(2,e.v)}},e)}))).apply(this,arguments)}return{fportList:h,fport:function(e,t,r){return n.apply(this,arguments)},fportRm:function(e,t){return r.apply(this,arguments)}}}function Kt(e){var t,r,n,i,a,o,s=e.logger,c=e.DeviceManager,u=e.getPid,l=e.ERROR_MSG,f=e.fport,h=e.fportRm,d=e.fportList,e=e.remoteV8Port,p=void 0===e?9225:e,e=_createClass(function e(){_classCallCheck(this,e),this.webLocalPort=9222,this.v8LocalPort=9229},[{key:"fportWeb",value:(o=_asyncToGenerator(_regenerator().m(function e(t,r){var n,i,a,o;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(o=!t)return e.n=1,c.getInstance().getDeviceId();e.n=2;break;case 1:t=e.v,o=!t;case 2:if(o)return e.a(2);e.n=3;break;case 3:return e.n=4,v(u(t,r));case 4:if((i=e.v).err||null==(n=i.data)||!n.length)return s.error("fportWeb get pid error: ",l),e.a(2);e.n=5;break;case 5:return a=null==(n=i.data)||null==(n=n.trim().split("\n"))?void 0:n[0].trim().split(/\s+/)[1].trim(),e.n=6,v(f(t,"tcp:"+this.webLocalPort,"localabstract:webview_devtools_remote_".concat(a)));case 6:if(e.v.err)return s.error("fport web error: ",l),e.a(2);e.n=7;break;case 7:return e.a(2)}},e,this)})),function(e,t){return o.apply(this,arguments)})},{key:"fportV8",value:(a=_asyncToGenerator(_regenerator().m(function e(t){var r,n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(n=!t)return e.n=1,c.getInstance().getDeviceId();e.n=2;break;case 1:t=e.v,n=!t;case 2:if(r=!n)return e.n=3,v(f(t,"tcp:"+this.v8LocalPort,"tcp:".concat(p)));e.n=4;break;case 3:r=e.v.err;case 4:if(r)return s.error("fport v8 error: ",l),e.a(2);e.n=5;break;case 5:return e.a(2)}},e,this)})),function(e){return a.apply(this,arguments)})},{key:"fportRmV8",value:(i=_asyncToGenerator(_regenerator().m(function e(t){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.fportRm(t,String(this.v8LocalPort));case 1:return e.a(2)}},e,this)})),function(e){return i.apply(this,arguments)})},{key:"fportRmWeb",value:(n=_asyncToGenerator(_regenerator().m(function e(t){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this.fportRm(t,String(this.webLocalPort));case 1:return e.a(2)}},e,this)})),function(e){return n.apply(this,arguments)})},{key:"fportRm",value:(r=_asyncToGenerator(_regenerator().m(function e(t,r){var n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(n=!t)return e.n=1,c.getInstance().getDeviceId();e.n=2;break;case 1:t=e.v,n=!t;case 2:if(n){e.n=3;break}return e.n=3,h(t,r);case 3:return e.a(2)}},e)})),function(e,t){return r.apply(this,arguments)})},{key:"status",value:(t=_asyncToGenerator(_regenerator().m(function e(t){var r,n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(r=!t)return e.n=1,c.getInstance().getDeviceId();e.n=2;break;case 1:t=e.v,r=!t;case 2:r?(n=[],e.n=5):e.n=3;break;case 3:return e.n=4,d(t);case 4:n=e.v;case 5:return e.a(2,n)}},e)})),function(e){return t.apply(this,arguments)})}],[{key:"getInstance",value:function(){return this.instance}}]);return e.instance=new e,{DebugPortManager:e}}var r=i("DebugPortManager"),e=Zt({logger:r,isPortReachable:Ut,fportListCmd:function(e){return w(["-t",e,"fport","ls"])},fportRmCmd:function(e,t,r){return w(["-t",e,"fport","rm",t,r])},fportCmd:function(e,t,r){return w(["-t",e,"fport",t,r])}}),Yt=e.fportList,Jt=Kt({logger:r,DeviceManager:k,ERROR_MSG:S,fport:e.fport,fportRm:e.fportRm,fportList:Yt,getPid:function(e,t){return w(["-t",e,"shell",'"ps -ef | grep '.concat(t,' | grep -v render | grep -v grep"')])}}).DebugPortManager,$t="com.huawei.ascf.sample",Xt="legacy",C="service",r=i("LegacyDebugPortManager"),e=Zt({logger:r,fportListCmd:Ye,fportRmCmd:Je,isPortReachable:Ut,fportCmd:$e}),Yt=e.fportList,Qt=Kt({logger:r,DeviceManager:k,ERROR_MSG:S,fport:e.fport,fportRm:e.fportRm,fportList:Yt,getPid:function(e,t){return rt(e,$t)},remoteV8Port:9229}).DebugPortManager,r=t(require("path")),er=t(require("http"));function tr(i,a){return new Promise(function(r,n){var e=Object.assign({timeout:6e3},a),t=er.default.get(i,function(e){var t="";e.on("data",function(e){t+=e}),e.on("end",function(){try{r(JSON.parse(t))}catch(e){n(new Error("Invalid JSON"))}})});t.setTimeout(e.timeout,function(){t.abort(),n(new Error("Request timed out"))}),t.on("error",n),t.end()})}var rr=t(require("fs")),nr=t(require("path")),ir=t(require("express")),ar=t(require("cachedir")),or=i("DebugServer");function sr(){return nr.resolve((0,ar.default)("ascf-cache"),"ascf.debugger.".concat(process.pid,".json"))}function cr(){return(cr=_asyncToGenerator(_regenerator().m(function e(t,r){var n,i,a,o,s,c;return _regenerator().w(function(e){for(;;)if(0===e.n)return i=(n=!1,ir.default)(),a=nr.normalize(t),i.use(ir.default.static(a)),i.get("/debugServer/status",function(e,t){t.json({code:0,isStart:n,port:r})}),i.get("/debugServer/stop",function(e,t){c(),t.json({code:0})}),o=i.listen(r,"127.0.0.1",function(){or.info("Debug Server is running on http://127.0.0.1:".concat(r)),n=!0}),s=!1,c=function(){var e;s||(or.info("Debug Server stopping ..."),e=sr(),rr.existsSync(e)&&rr.unlink(e,function(e){return e&&or.warn("delete ascf debugger pid file error",e)}),o.close(function(){or.info("Debug Server has been stopped"),s=!0}))},e.a(2,{port:r,stop:c})},e)}))).apply(this,arguments)}var ur=t(require("process")),lr=require("buffer"),fr=t(require("child_process")),hr={chrome:{darwin:"google chrome",win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},edge:{darwin:"microsoft edge",win32:"msedge",linux:["microsoft-edge","microsoft-edge-dev"]}};function dr(e,t){var r=ur.platform,n=null==(n=hr[e])?void 0:n[r];if(!n)throw new Error("".concat(e," is not supported"));var e="open",i=[],a=[];"darwin"===r?(e="open",a.push("-a",n),/^(chrome|edge):/i.test(t)&&a.push("--allow-file-access-from-files")):"win32"===r&&(e="".concat(ur.env.SYSTEMROOT||ur.env.windir||"C:\\Windows","\\System32\\WindowsPowerShell\\v1.0\\powershell"),a.push("-NoProfile","-NonInteractive","-ExecutionPolicy","Bypass","-EncodedCommand"),r=["Start"],n?(r.push('"`"'.concat(n,'`""')),t&&(/^(chrome|edge):/i.test(t)&&i.push("--disable-web-security","--allow-file-access-from-files"),i.push(t))):t&&r.push('"'.concat(t,'"')),0<i.length&&(i=i.map(function(e){return'"`"'.concat(e,'`""')}),r.push("-ArgumentList",i.join(","))),t=lr.Buffer.from(r.join(" "),"utf16le").toString("base64")),t&&a.push(t),fr.spawn(e,a).unref()}function pr(t){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"chrome";try{dr(r,t)}catch(e){dr("chrome"===r?"edge":"chrome",t)}}var e=t(require("cachedir")),E=i("DebuggerProcess"),Yt=(0,e.default)("ascf-cache"),gr=r.join(Yt,"chrome-devtools-frontend"),mr=["exit","SIGINT","SIGTERM"];function _r(e){return vr.apply(this,arguments)}function vr(){return(vr=_asyncToGenerator(_regenerator().m(function e(t){var r;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return r=[],e.p=1,e.n=2,tr("http://127.0.0.1:".concat(t,"/json"),{timeout:3e3});case 2:r=e.v,e.n=4;break;case 3:e.p=3,E.error("getDebugees ".concat(t," error: "),S);case 4:return e.a(2,r)}},e,null,[[1,3]])}))).apply(this,arguments)}function yr(){return br.apply(this,arguments)}function br(){return(br=_asyncToGenerator(_regenerator().m(function e(t){var r,n,i,a,o;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t){e.n=1;break}return e.a(2,"");case 1:return e.p=1,e.n=2,_r(t);case 2:if(r=e.v,i=null===r){e.n=3;break}i=void 0===r;case 3:if(n=i){e.n=4;break}n=null==(r=r[0]);case 4:n?(a=void 0,e.n=6):e.n=5;break;case 5:a=r.devtoolsFrontendUrl;case 6:return e.a(2,a);case 7:return e.p=7,o=e.v,E.error("getDebugUrl ".concat(t," error"),o),e.a(2,"")}},e,null,[[1,7]])}))).apply(this,arguments)}var wr,kr,Sr,Cr,Er,Ar,xr,Dr,Or,Tr,Ir,Br,Pr,Fr,e=_createClass(function e(t){_classCallCheck(this,e),this.lastDebugServer=null,this.options=Object.assign({open:""},t)},[{key:"handle",value:function(e){var t=this,r=(E.info("handle ".concat(e)),{status:function(){return t.status()},start:function(){return t.start()},stop:function(){return t.stop()},"start-view":function(){return t.startView()},"start-service":function(){return t.startService()},"stop-view":function(){return t.stopView()},"stop-service":function(){return t.stopService()}});r[e]?r[e]().then(function(){return E.info("handle end")}).catch(function(e){return E.error("handle error",e)}):E.error("invalid subCmd, should be "+Object.keys(r).join(","))}},{key:"openBrowser",value:(Fr=_asyncToGenerator(_regenerator().m(function e(t,r){var n,i,a,o=arguments;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:i=2<o.length&&void 0!==o[2]?o[2]:"",E.info("openBrowser",t,r),t!==C||(null==(n=this.options)?void 0:n.deviceType)!==m?e.n=1:(a="devtools://devtools/bundled/js_app.html?v8only=true&ws=127.0.0.1:9229",e.n=3);break;case 1:return e.n=2,yr(r);case 2:a=e.v;case 3:if(a){e.n=4;break}return E.info("openBrowser error, please try later"),e.a(2);case 4:t===C?this.startDebugServer(a):(i&&(a=i),E.info("please open url in browser: ",a));case 5:return e.a(2)}},e,this)})),function(e,t){return Fr.apply(this,arguments)})},{key:"startDebugServer",value:(Pr=_asyncToGenerator(_regenerator().m(function e(r){var n,i,a,o,s;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return this.stopDebugServer(),e.p=1,e.n=2,function(){return Ne.apply(this,arguments)}(gr);case 2:if(n=e.v){e.n=3;break}return E.error("install devtools failed, please open chrome://inspect in browser(chrome/edge) to debug"),e.a(2);case 3:return e.n=4,Vt();case 4:return i=e.v,a=r.replace("devtools://devtools/bundled/js_app.html","http://127.0.0.1:".concat(i,"/js_app.html")),a+=(a.includes("?")?"&":"?")+"panel=sources",t={port:i,debugUrl:a},rr.writeFileSync(sr(),JSON.stringify(t),"utf8"),e.n=5,function(){return cr.apply(this,arguments)}(n,i);case 5:o=e.v,this.lastDebugServer=o,mr.forEach(function(e){process.on(e,o.stop)}),E.info("start debug server url: ".concat(a)),null!=(i=this.options)&&i.open&&pr(a,this.options.open),e.n=7;break;case 6:e.p=6,s=e.v,E.error("startDebugServer error",s),this.stopDebugServer();case 7:return e.a(2)}var t},e,this,[[1,6]])})),function(e){return Pr.apply(this,arguments)})},{key:"stopDebugServer",value:function(){var t=this;this.lastDebugServer&&(mr.forEach(function(e){process.removeListener(e,t.lastDebugServer.stop)}),this.lastDebugServer.stop(),this.lastDebugServer=null)}}]),A=i("AscfDebugger"),Rr=(_inherits(Vr,e),_createClass(Vr,[{key:"isLegacy",value:function(){return this.options.deviceType===Xt}},{key:"getPortManager",value:function(){return(this.isLegacy()?Qt:Jt).getInstance()}},{key:"status",value:(Br=_asyncToGenerator(_regenerator().m(function e(){var t,o=this;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return A.info("status"),e.n=1,this.checkAndGetBundleName();case 1:if(e.v){e.n=2;break}return e.a(2);case 2:return e.n=3,this.getPortManager().status(this.options.deviceId);case 3:return t=e.v,e.n=4,Promise.all(null==t?void 0:t.map((()=>{var t=_asyncToGenerator(_regenerator().m(function e(t){var r,n,i,a;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:t.localPort!=="tcp:".concat(o.getPortManager().webLocalPort)?e.n=1:(r="view",e.n=3);break;case 1:t.localPort!=="tcp:".concat(o.getPortManager().v8LocalPort)?e.n=2:(r=C,e.n=3);break;case 2:return e.a(2);case 3:if(n="",i=!(r===C&&o.isLegacy()))return e.n=4,yr(t.localPort.replace("tcp:",""));e.n=5;break;case 4:n=e.v,i=!n;case 5:i?(a="",e.n=7):e.n=6;break;case 6:"view"===r&&(n="chrome://inspect#devices"),a="".concat(r," ").concat(t.localPort," ").concat(t.remotePort,", browser url: ").concat(n);case 7:return e.a(2,a)}},e)}));return function(e){return t.apply(this,arguments)}})()));case 4:0!==(t=(t=e.v).filter(Boolean)).length&&A.info("ports:\n"+t.join("\n"));case 5:return e.a(2)}},e,this)})),function(){return Br.apply(this,arguments)})},{key:"start",value:(Ir=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return A.info("start"),e.n=1,this.startView();case 1:return e.n=2,this.startService();case 2:return e.a(2)}},e,this)})),function(){return Ir.apply(this,arguments)})},{key:"stop",value:(Tr=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return A.info("stop"),e.n=1,this.stopView();case 1:return e.n=2,this.stopService();case 2:return e.a(2)}},e,this)})),function(){return Tr.apply(this,arguments)})},{key:"startView",value:(Or=_asyncToGenerator(_regenerator().m(function e(){var t;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return A.info("startView"),e.n=1,this.checkAndGetBundleName();case 1:if(t=e.v)return e.n=2,this.getPortManager().fportWeb(this.options.deviceId,t);e.n=3;break;case 2:return e.n=3,this.openBrowser("view",this.getPortManager().webLocalPort,"chrome://inspect/#devices");case 3:return e.a(2)}},e,this)})),function(){return Or.apply(this,arguments)})},{key:"startService",value:(Dr=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return A.info("startService"),e.n=1,this.checkAndGetBundleName();case 1:if(e.v)return e.n=2,this.getPortManager().fportV8(this.options.deviceId);e.n=3;break;case 2:return e.n=3,this.openBrowser(C,this.getPortManager().v8LocalPort);case 3:return e.a(2)}},e,this)})),function(){return Dr.apply(this,arguments)})},{key:"stopView",value:(xr=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return A.info("stopView"),e.n=1,this.getPortManager().fportRmWeb(this.options.deviceId);case 1:return e.a(2)}},e,this)})),function(){return xr.apply(this,arguments)})},{key:"stopService",value:(Ar=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return A.info("stopService"),e.n=1,this.getPortManager().fportRmV8(this.options.deviceId);case 1:return e.a(2)}},e,this)})),function(){return Ar.apply(this,arguments)})},{key:"checkAndGetBundleName",value:(Er=_asyncToGenerator(_regenerator().m(function e(){var t,r,n,i,a,o,s,c,u;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(n=this.options,r=n.deviceType,n=n.targets===gt?"com.enjoy.now.hmos":this.options.bundleName,n=r===Xt?$t:n||Pt(process.cwd()),i=this.options.deviceId,s=!i)return e.n=1,k.getInstance().getDeviceId();e.n=2;break;case 1:i=e.v,s=!i;case 2:if(s)return e.a(2,!1);e.n=3;break;case 3:if(a="",r===Xt)return e.n=4,v(nt(i,n));e.n=5;break;case 4:o=e.v,a=!(o.err||!o.data),e.n=10;break;case 5:return e.n=6,v(w(["-t",i,"shell","pidof",n]));case 6:if(t=e.v.data,c=null===t){e.n=7;break}c=void 0===t;case 7:c?(u=void 0,e.n=9):e.n=8;break;case 8:u=t.trim();case 9:a=u;case 10:return e.a(2,(a||A.error("The selected Atomic Service is not running properly. Please start the Atomic Service first."),n))}},e,this)})),function(){return Er.apply(this,arguments)})}])),jr=t(require("fs")),Lr=t(require("path")),Nr=t(require("fs")),zr=t(require("path")),x=i("BuildProcess"),r=_createClass(function e(t){_classCallCheck(this,e),this.cpList=[],this.terminal=null,this.stopping=!1,this.options=Object.assign({buildMode:"debug"},t)},[{key:"handle",value:function(e){var t=this,r=(x.info("handle ".concat(e)),{start:function(){return t.start()},installDeps:function(){return t.installDeps()},assembleHap:function(){return t.assembleHap()},assembleApp:function(){return t.assembleApp()},installHap:function(){return t.installHap()},assembleAndInstallHap:function(){return t.assembleAndInstallHap()},uninstall:function(){return t.uninstall()},clean:function(){return t.clean()},stop:function(){return t.stop()}});r[e]?r[e]().then(function(){return x.info("handle success")}).catch(function(e){return x.error("handle error",e)}):x.error("invalid subCmd, should be "+Object.keys(r).join(","))}},{key:"installDeps",value:(Cr=_asyncToGenerator(_regenerator().m(function e(){var t;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return t=this.options.projectRoot,x.info("start installDeps under ".concat(t)),e.n=1,v(function(){return Lt.apply(this,arguments)}(t));case 1:return e.a(2)}},e,this)})),function(){return Cr.apply(this,arguments)})},{key:"prepareAssemble",value:(Sr=_asyncToGenerator(_regenerator().m(function e(t,r){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(Nr.existsSync(zr.resolve(t,"oh_modules"))){e.n=1;break}return e.n=1,this.installDeps();case 1:return x.info("start hvigorw --sync, please waiting ..."),e.n=2,v(this.runCmdAsync(c(),["--sync"].concat(_toConsumableArray(r||[])),{cwd:t}));case 2:return e.a(2)}},e,this)})),function(e,t){return Sr.apply(this,arguments)})},{key:"add",value:function(e){this.cpList.push(e)}},{key:"del",value:function(e){e=this.cpList.indexOf(e);-1!==e&&this.cpList.splice(e,1)}},{key:"stop",value:function(){this.stopping=!0,this.dispose()}},{key:"dispose",value:function(){for(;this.cpList.length;)Ht(this.cpList.pop())}},{key:"init",value:function(){}},{key:"runCmdAsync",value:(kr=_asyncToGenerator(_regenerator().m(function e(t,a,o){var s=this;return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(r,n){var i;s.stopping?n("cancelled"):(i=Bt(t,a,function(e,t){if(s.del(i),e)return n(e);r(t)},o),s.add(i))}))},e)})),function(e,t,r){return kr.apply(this,arguments)})},{key:"clean",value:(wr=_asyncToGenerator(_regenerator().m(function e(){var t,r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(void 0===(t=this.options.projectRoot))return e.a(2);e.n=1;break;case 1:return e.n=2,function(){return Nt.apply(this,arguments)}(t);case 2:return e.n=3,function(){return zt.apply(this,arguments)}(t);case 3:r=zr.resolve(t,"ascf","build",".pack_cache"),Nr.rm(r,{recursive:!0,force:!0},function(e){e?x.error("Failed to remove cacheDir:",e):x.info("cacheDir removed successfully")});case 4:return e.a(2)}},e,this)})),function(){return wr.apply(this,arguments)})}]),D=t(require("path")),O=t(require("fs")),Hr=t(require("os")),Mr=t(require("crypto")),Gr=t(require("semver")),Ur=t(require("cachedir")),T=i("toolkit"),qr=/ASCF_GET_HVIGOR_DEPS_CACHES_DIR=(.+)$/m;function Vr(e){return _classCallCheck(this,Vr),_callSuper(this,Vr,[e])}function Wr(e){e=D.join(e,"hvigor/hvigor-config.json5");return O.existsSync(e)}function Zr(e){}var Kr=function(e){return Mr.createHash("MD5").update(e).digest("hex")};function Yr(t){try{return O.realpathSync.native(t)}catch(e){return t}}function Jr(e){e="".concat(D.resolve(process.env.HVIGOR_USER_HOME||D.resolve(Hr.homedir(),".hvigor"),"project_caches",Kr(D.resolve(e)),"workspace"),"/node_modules/@atomicservice/ascf-toolkit/lib");return O.existsSync("".concat(e,"/bin/ascf.js"))?e:void 0}function $r(e){return Xr.apply(this,arguments)}function Xr(){return(Xr=_asyncToGenerator(_regenerator().m(function e(t){var r,n,i,a;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(T.info("getAscfDepDir under ".concat(t)),r="",Wr(t)){if(!process.env.ASCF_DISABLE_CACHE_DEP_DIR&&(r=Jr(t)))return e.a(2,r);e.n=1}else e.n=3;break;case 1:return e.n=2,v(b(c(),["GetHvigorDepsCachesDir","--no-daemon"],{chdir:!0,cwd:t}));case 2:(i=e.v).err&&T.error("getAscfDepDir err",i.err),i=null!=(i=i.data)?i:"",r=null==(i=qr.exec(i))?void 0:i[1],e.n=6;break;case 3:if(n=D.join(t,"ascf/ascf_src/package.json"),!O.existsSync(n)){e.n=5;break}if(r=D.join(t,"ascf/ascf_src/node_modules/@atomicservice/ascf-toolkit/lib"),O.existsSync("".concat(r,"/bin/ascf.js"))){e.n=4;break}throw i="".concat(r,"/bin/ascf.js is not found for project, please install using package manager first."),T.error(i),new Error(i);case 4:e.n=6;break;case 5:a="".concat(n," is not found for project, will use global ascf"),T.error(a);case 6:return e.a(2,(T.debug("getAscfDepDir",r),r))}},e)}))).apply(this,arguments)}function Qr(){return en.apply(this,arguments)}function en(){return(en=_asyncToGenerator(_regenerator().m(function e(t,r){var n,i,a,o;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,$r(t);case 1:return n=e.v,i="ascf",a=[],n?(i=pe(),a.push("".concat(n,"/bin/ascf.js"))):T.warn("get ascf dep dir failed, fallback to use global ascf"),o=null==(o=$)?void 0:o(),e.a(2,(o&&"info"!==o&&a.push("--logging",o),a.push.apply(a,_toConsumableArray((null==r?void 0:r.args)||[])),{cmd:i,args:a,ascfVerCmd:n?"".concat(i," ").concat(a[0]," -V"):"ascf -V"}))}},e)}))).apply(this,arguments)}var tn,rn=function(e,t,r){t=e.indexOf(t);return-1!==t&&(null==(e=e[t+1])?void 0:e.includes(r))};function I(e,t,r){return nn.apply(this,arguments)}function nn(){return(nn=_asyncToGenerator(_regenerator().m(function e(n,i,a){var o,s,c;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Qr(n,i);case 1:if(s=e.v,o=s.cmd,c=s.ascfVerCmd,rn(s=s.args,"--deviceType",m)){t=void 0;r=void 0;var t=c;var r=global.__ASCF_MIN_TOOLKIT_VERSION;if(r){t=Mt(t);if(t&&Gr.gt(r,t))throw new Error("ascf toolkit version is below ".concat(r,", please upgrade ascf toolkit or hvigor plugin"))}}return e.n=2,v(b(o,s,_objectSpread(_objectSpread({},(null==i?void 0:i.opts)||{}),{},{chdir:!0,cwd:n}),a));case 2:if((c=e.v).err)throw T.error("ascf run err",c.err),c.err;e.n=3;break;case 3:return e.a(2)}},e)}))).apply(this,arguments)}function an(e,t,r){return on.apply(this,arguments)}function on(){return(on=_asyncToGenerator(_regenerator().m(function e(t,r,n){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,I(t,Object.assign({args:["compile",t].concat(_toConsumableArray((null==r?void 0:r.extraArgs)||[]))},r),n))},e)}))).apply(this,arguments)}function sn(e,t,r){return cn.apply(this,arguments)}function cn(){return(cn=_asyncToGenerator(_regenerator().m(function e(t,r,n){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,I(r,Object.assign({args:["convert","-i",t,"-o",r].concat(_toConsumableArray((null==n?void 0:n.extraArgs)||[]))},n)))},e)}))).apply(this,arguments)}function un(e,t){return ln.apply(this,arguments)}function ln(){return(ln=_asyncToGenerator(_regenerator().m(function e(t,r){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,I(t,Object.assign({args:["signtools","generate-keypair","-r",t].concat(_toConsumableArray((null==r?void 0:r.extraArgs)||[]))},r)))},e)}))).apply(this,arguments)}function fn(e,t){return hn.apply(this,arguments)}function hn(){return(hn=_asyncToGenerator(_regenerator().m(function e(t,r){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,I(t,Object.assign({args:["signtools","generate-p12","-r",t].concat(_toConsumableArray((null==r?void 0:r.extraArgs)||[]))},r)))},e)}))).apply(this,arguments)}function dn(e,t){return pn.apply(this,arguments)}function pn(){return(pn=_asyncToGenerator(_regenerator().m(function e(t,r){var n,i,a,o;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return gn(),n=["debugger","start"],["deviceType","deviceId"].forEach(function(e){r[e]&&n.push("--".concat(e),r[e])}),e.n=1,Qr(t,{args:n});case 1:return i=e.v,a=i.cmd,o=i.args,e.a(2,new Promise(function(r,e){Bt(a,o,function(e,t){},{shell:!1,chdir:!0,cwd:t,ignoreError:function(e){return!0}},function(e){var t=vn(null==(e=tn=e)?void 0:e.pid);T.debug("trying to get ascf debugger server info: ".concat(t)),function(r,n){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:500,a=3<arguments.length&&void 0!==arguments[3]?arguments[3]:6e4,o=(B&&clearInterval(B),0);B=setInterval(function(){var e=a<o,t=O.existsSync(r);(e||t)&&(clearInterval(B),B=0,n(t)),o+=i},i)}(t,function(e){r(e?l(t,{}):{})})})}))}},e)}))).apply(this,arguments)}function gn(){tn&&(Ht(tn),tn=void 0)}function mn(e,t){return _n.apply(this,arguments)}function _n(){return(_n=_asyncToGenerator(_regenerator().m(function e(t,r){var n;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,tr("http://127.0.0.1:".concat(t,"/").concat(r),{timeout:3e3});case 1:return e.a(2,e.v);case 2:e.p=2,n=e.v,T.error("getDebugees error",n);case 3:return e.a(2)}},e,null,[[0,2]])}))).apply(this,arguments)}function vn(e){if(e)return D.resolve((0,Ur.default)("ascf-cache"),"ascf.debugger.".concat(e,".json"))}var B=0;var yn="debug",bn="release";function wn(e){return e&&(!0===e||/debug|development/i.test(e))?yn:bn}var kn,Sn,Cn,En,An,xn,Dn,On,Tn=function(e,t,r){return t===r?[]:[e,t]},P=i("AscfBuilder"),In=(_inherits(jn,r),_createClass(jn,[{key:"runHdcCmdAsync",value:(On=_asyncToGenerator(_regenerator().m(function e(t,r){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,this.runCmdAsync(u(),t,r))},e,this)})),function(e,t){return On.apply(this,arguments)})},{key:"start",value:(Dn=_asyncToGenerator(_regenerator().m(function e(){var t,r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(t=this.options.projectRoot,P.info("start ability under ".concat(t)),r=this.options.deviceId){e.n=2;break}return e.n=1,k.getInstance().getDeviceId();case 1:r=e.v;case 2:return e.n=3,v(Rt(t,r));case 3:return e.a(2)}},e,this)})),function(){return Dn.apply(this,arguments)})},{key:"assembleHap",value:(xn=_asyncToGenerator(_regenerator().m(function e(){var t,r,n,i,a;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return n=this.options,t=n.projectRoot,n=n.buildMode,P.info("start assembleHap under ".concat(t)),r=(new Date).getTime(),n=["-p","buildMode=".concat(wn(n)),"--parallel","--incremental"],e.n=1,this.prepareAssemble(t,n);case 1:return i=null==(i=Ft(t))||null==(i=i.modules)?void 0:i.map(function(e){return"".concat(e.name,"@default")}),e.n=2,v(this.runCmdAsync(c(),["-m","module","-p","module=".concat(null==i?void 0:i.join(","))].concat(n,["assembleHap",1<i.length?"assembleHsp":"","--daemon"]),{chdir:!0,cwd:t}));case 2:(i=e.v).err&&P.error("assembleHap err",i.err),a=Math.round(((new Date).getTime()-r)/1e3),P.info("assembleHap within ".concat(a," s"));case 3:return e.a(2)}},e,this)})),function(){return xn.apply(this,arguments)})},{key:"assembleApp",value:(An=_asyncToGenerator(_regenerator().m(function e(){var t,r,n,i;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return n=this.options,t=n.projectRoot,n=n.buildMode,P.info("start assembleApp under ".concat(t)),r=(new Date).getTime(),n=["-p","product=default","-p","buildMode=".concat(wn(n)),"--parallel","--incremental"],e.n=1,this.prepareAssemble(t,n);case 1:return P.info("start assembleApp, please waiting ..."),e.n=2,v(this.runCmdAsync(c(),["-m","project","assembleApp"].concat(n,["--daemon"]),{chdir:!0,cwd:t}));case 2:(i=e.v).err&&P.error("assembleApp err",i.err),i=Math.round(((new Date).getTime()-r)/1e3),P.info("assembleApp within ".concat(i," s"));case 3:return e.a(2)}},e,this)})),function(){return An.apply(this,arguments)})},{key:"usingTmpDir",value:(En=_asyncToGenerator(_regenerator().m(function e(t,r){var n,i;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return n="/data/local/tmp/"+((new Date).getTime()+Math.round(1e3*Math.random())),e.n=1,v(this.runHdcCmdAsync(["-t",t,"shell","mkdir",n]));case 1:if((i=e.v).err)return P.error("mkdir error",i.err),e.a(2);e.n=2;break;case 2:return e.n=3,v(r(n));case 3:return(i=e.v).err&&P.error("usingTmpDir error",i.err),e.n=4,v(this.runHdcCmdAsync(["-t",t,"shell","rm","-rf",n]));case 4:return e.a(2)}},e,this)})),function(e,t){return En.apply(this,arguments)})},{key:"installHap",value:(Cn=_asyncToGenerator(_regenerator().m(function e(){var r,t,a,n,o=this;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(r=this.options.projectRoot,P.info("start install pkg under ".concat(r)),t=(new Date).getTime(),a=this.options.deviceId){e.n=2;break}return e.n=1,k.getInstance().getDeviceId();case 1:a=e.v;case 2:return e.n=3,v(this.usingTmpDir(a,(()=>{var t=_asyncToGenerator(_regenerator().m(function e(n){var i,t;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return t=null==(t=Ft(r))||null==(t=t.modules)?void 0:t.map(function(e){return Lr.resolve(r,e.srcPath,"build/default/outputs/default/".concat(e.name,"-default-signed.").concat("entry"===e.name?"hap":"hsp"))}),i=!1,e.n=1,Promise.all(null==t?void 0:t.map((()=>{var t=_asyncToGenerator(_regenerator().m(function e(t){var r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(jr.existsSync(t)){e.n=1;break}return P.error("hapPath is not exists",t),i=!0,e.a(2);case 1:return e.n=2,v(o.runHdcCmdAsync(["-t",a,"file","send",t,n]));case 2:(r=e.v).err&&(P.error("send hap error",r.err),i=!0);case 3:return e.a(2)}},e)}));return function(e){return t.apply(this,arguments)}})()));case 1:if(i)return e.a(2);e.n=2;break;case 2:return e.n=3,v(o.runHdcCmdAsync(["-t",a,"shell","bm","install","-p",n]));case 3:if((t=e.v).err)return P.error("install hap error",t.err),e.a(2);e.n=4;break;case 4:Rt(r,a);case 5:return e.a(2)}},e)}));return function(e){return t.apply(this,arguments)}})()));case 3:n=Math.round(((new Date).getTime()-t)/1e3),P.info("Launched within ".concat(n," s"));case 4:return e.a(2)}},e,this)})),function(){return Cn.apply(this,arguments)})},{key:"assembleAndInstallHap",value:(Sn=_asyncToGenerator(_regenerator().m(function e(){var t;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return this.stopping=!1,e.n=1,k.getInstance().getDeviceId();case 1:if(e.v){e.n=2;break}return e.a(2);case 2:return e.n=3,v(this.assembleHap());case 3:if((t=e.v).err)return P.error("assembleHap error",t.err),e.a(2);e.n=4;break;case 4:return e.n=5,v(this.installHap());case 5:return e.a(2)}},e,this)})),function(){return Sn.apply(this,arguments)})},{key:"uninstall",value:(kn=_asyncToGenerator(_regenerator().m(function e(){var t,r,n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(t=this.options.projectRoot,P.info("start uninstall pkg under ".concat(t)),r=this.options.deviceId){e.n=2;break}return e.n=1,k.getInstance().getDeviceId();case 1:r=e.v;case 2:return n=Pt(t),e.n=3,v(this.runHdcCmdAsync(["-t",r,"uninstall",n]));case 3:if((n=e.v).err)return P.error("uninstall hap error",n.err),e.a(2);e.n=4;break;case 4:return e.a(2)}},e,this)})),function(){return kn.apply(this,arguments)})}])),Bn=t(require("path")),Pn=t(require("http")),Fn=t(require("fs")),Rn=t(require("path")),F=i("BuildProcess");function jn(e){return _classCallCheck(this,jn),_callSuper(this,jn,[e])}function Ln(e,t){return Nn.apply(this,arguments)}function Nn(){return(Nn=_asyncToGenerator(_regenerator().m(function e(t,r){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Ut(t);case 1:if(e.v){e.n=3;break}return F.warn("Port ".concat(t," is not available, try find available")),e.n=2,Vt();case 2:t=e.v;case 3:return e.a(2,((e,t)=>{var a=[],r=Pn.createServer(function(r,n){var e,i=(new Date).getTime();F.debug("request ".concat(r.url)),"GET"===r.method?(e=Rn.join(t,r.url),Fn.readFile(e,function(e,t){e?(n.writeHead(404,{"Content-Type":"text/plain"}),n.end("File not found")):(n.writeHead(200,{"Content-Type":"application/octet-stream"}),n.end(t),F.debug("request ".concat(r.url," elapsed ").concat((new Date).getTime()-i," ms")),a.push(r.url))})):(n.writeHead(405,{"Content-Type":"text/plain"}),n.end("Method not allowed"))});return r.listen(e,function(){F.debug("Server running at http://127.0.0.1:".concat(e,"/"))}),r.on("error",function(e){F.error("Server error:",e)}),{server:r,port:e,close:function(){r.close(function(){F.debug("Server has been closed.")})},hasReq:function(t){return t&&a.some(function(e){return e&&t.endsWith(e)})}}})(t,r))}},e)}))).apply(this,arguments)}var R=i("AdbBuilder");function zn(e){return Hn.apply(this,arguments)}function Hn(){return(Hn=_asyncToGenerator(_regenerator().m(function e(t){var r,n,i,a,o,s,c,u,l,f,h,d,p,g;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return r=t.logger,u=t.projectRoot,n=t.deviceId,c=t.getSpkInfo,s=t.buildMode,d=t.startServer,i=t.tryAdbPortReversing,a=t.startHostPkgUrl,o=t.rportRmCmd,r.info("start install start spk under ".concat(u)),c=c(u,s),s=c.bundleName,c=c.spkName,u=Bn.join(u,"build/dist"),e.n=1,d(3e3,u);case 1:return l=e.v,e.n=2,i(n,l.port,0);case 2:if(f=e.v){e.n=3;break}return r.error("hdc rport error, maybe find remote port error"),e.a(2);case 3:return h="http://127.0.0.1:".concat(f,"/").concat(c),e.n=4,v(a(n,s,h));case 4:if((d=e.v).err)return r.error("install spk error",d.err),e.a(2);e.n=5;break;case 5:r.info("waiting download and install package ..."),p=0,g=setInterval(function(){l.hasReq(h)||60<p?(o(n,"tcp:".concat(f)),l.close(),clearInterval(g)):p++},1e3);case 6:return e.a(2)}},e)}))).apply(this,arguments)}_inherits(Jn,r);var Mn,Gn,Un,qn,Vn,Wn,Zn,Kn=_createClass(Jn,[{key:"start",value:(Zn=_asyncToGenerator(_regenerator().m(function e(){var t,r,n,i;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return r=this.options,t=r.projectRoot,r=r.buildMode,R.info("start ability under ".concat(t)),e.n=1,this.getDeviceId();case 1:return n=e.v,i=Ot(t,r),i=i.bundleName,e.n=2,v(Ze(n,i));case 2:return e.a(2)}},e,this)})),function(){return Zn.apply(this,arguments)})},{key:"assembleHap",value:(Wn=_asyncToGenerator(_regenerator().m(function e(){var t,r,n,i;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return t=this.options.projectRoot,R.info("start assembleSpk under ".concat(t)),r=(new Date).getTime(),e.n=1,this.prepareAssemble(t);case 1:return e.n=2,v(an(t,{extraArgs:["-c","--targets",this.options.targets,"debug"===this.options.buildMode?"-m":""]}));case 2:if((n=e.v).err)throw R.error("generateSpk err",n.err),n.err;e.n=3;break;case 3:n.data&&R.info("generateSpk info",n.data),n.err&&R.error("assembleSpk err",n.err),i=Math.round(((new Date).getTime()-r)/1e3),R.info("assembleSpk within ".concat(i," s"));case 4:return e.a(2)}},e,this)})),function(){return Wn.apply(this,arguments)})},{key:"assembleApp",value:(Vn=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,this.assembleHap())},e,this)})),function(){return Vn.apply(this,arguments)})},{key:"installHap",value:(qn=_asyncToGenerator(_regenerator().m(function e(){var t,r,n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return r=this.options,t=r.projectRoot,r=r.buildMode,R.info("start install pkg under ".concat(t)),e.n=1,this.getDeviceId();case 1:return n=e.v,e.a(2,zn({logger:R,projectRoot:t,deviceId:n,getSpkInfo:Ot,buildMode:r,startServer:Ln,tryAdbPortReversing:We,startHostPkgUrl:Ke,rportRmCmd:Qe}))}},e,this)})),function(){return qn.apply(this,arguments)})},{key:"assembleAndInstallHap",value:(Un=_asyncToGenerator(_regenerator().m(function e(){var t;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return this.stopping=!1,e.n=1,v(this.assembleHap());case 1:if((t=e.v).err)return R.error("assembleSpk error",t.err),e.a(2);e.n=2;break;case 2:return e.n=3,v(this.installHap());case 3:return e.a(2)}},e,this)})),function(){return Un.apply(this,arguments)})},{key:"uninstall",value:(Gn=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:R.warn("Uninstall not supported.");case 1:return e.a(2)}},e)})),function(){return Gn.apply(this,arguments)})},{key:"getDeviceId",value:(Mn=_asyncToGenerator(_regenerator().m(function e(){var t,r,n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:null==(t=this.options.deviceId)?e.n=1:(n=t,e.n=3);break;case 1:return e.n=2,k.getInstance().getDeviceId();case 2:n=e.v;case 3:if(r=n){e.n=4;break}throw new Error("No device found.");case 4:return e.a(2,r)}},e,this)})),function(){return Mn.apply(this,arguments)})}]),Yn=_defineProperty(_defineProperty({},Xt,function(e){return new Kn(e)}),"hos",function(e){return new In(e)});function Jn(e){return _classCallCheck(this,Jn),_callSuper(this,Jn,[e])}function $n(){return($n=_asyncToGenerator(_regenerator().m(function e(t,r){var n,i,a,o;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(i=(i=t.deviceType)&&!r[i]?"hos":i){e.n=5;break}return e.n=1,v(k.getInstance().getDeviceType(t.deviceId));case 1:if(n=e.v.data,!(a=null!==n)){e.n=2;break}a=void 0!==n;case 2:a?(o=n,e.n=4):e.n=3;break;case 3:o="hos";case 4:i=o;case 5:return e.a(2,r[i](t))}},e)}))).apply(this,arguments)}var Xn,Qn,ei=_createClass(function e(){_classCallCheck(this,e)},null,[{key:"create",value:(Qn=_asyncToGenerator(_regenerator().m(function e(t){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,function(){return $n.apply(this,arguments)}(t,Yn))},e)})),function(e){return Qn.apply(this,arguments)})}]),ti=_createClass(function e(){_classCallCheck(this,e)},null,[{key:"create",value:(Xn=_asyncToGenerator(_regenerator().m(function e(t){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,new Rr(t))},e)})),function(e){return Xn.apply(this,arguments)})}])}),rr=$e(function(e,t){var s=require("path"),p=require("fs"),g=require("crypto"),m=dr().jszip,_=zr(),l=require("jsrsasign"),f=Rr(),v=Tr(),y=zr(),h=Nr(),b=(0,Ct().getLogger)("spk-sign-utils"),c="META-INF/CERT",o="hash.json",w={type:"nodebuffer",compression:"DEFLATE",compressionOptions:{level:9}};function u(){return(u=_asyncToGenerator(_regenerator().m(function e(t,r){var n,i,a;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return n={},t.forEach(function(e){var t=e.fileBuildPath,e=e.fileContentDigest;return n[t]=e.toString("hex")}),(i=new m).file(o,JSON.stringify({algorithm:"SHA-256",digests:n})),e.n=1,i.generateAsync(w);case 1:return i=e.v,a={name:o,hash:_.getBufferSha256(i)},e.n=2,_.signZipResource(i,[a],r);case 2:return e.a(2,e.v)}},e)}))).apply(this,arguments)}function k(){return r.apply(this,arguments)}function r(){return(r=_asyncToGenerator(_regenerator().m(function e(t,r){var n,i,a,o;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return n=t.fileList,i=new m,a=n.map(function(e){return{name:e.fileBuildPath,hash:e.fileContentDigest}}),e.n=1,function(){return u.apply(this,arguments)}(n,r);case 1:return o=e.v,i.file(c,o),a.unshift({name:c,hash:_.getBufferSha256(o)}),o=Object.assign({},w),n.forEach(function(e){var t=e.fileBuildPath;i.file(t,e.fileContentBuffer)}),e.n=2,i.generateAsync(o);case 2:return o=e.v,e.n=3,_.signZipResource(o,a,r);case 3:return e.a(2,e.v)}},e)}))).apply(this,arguments)}function a(){return(a=_asyncToGenerator(_regenerator().m(function e(t,r,n,i,a){var o,s,c,u,l,f,h,d,p;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,k(n,r);case 1:if(o=e.v,i.length){e.n=2;break}return e.a(2,{rpkBuffer:o});case 2:if(s=new m,c=[],u=Object.assign({},w),a.disableSubpackages&&"false"!==a.disableSubpackages){e.n=4;break}return f=i.map(function(e){return k(e,r)}),e.n=3,Promise.all(f).catch(function(){new Error("ERROR: Rpk sign failed!")});case 3:e.v.forEach(function(e,t){t="".concat(i[t].pkgName);e.length,s.file(t,e),c.push({name:t,hash:_.getBufferSha256(e)})}),e.n=6;break;case 4:return l=i[0],e.n=5,k(l,r).catch(function(){new Error("ERROR: Rpk sign failed!")});case 5:f=e.v,h="".concat(l.pkgName),f.length,s.file(h,f),c.push({name:h,hash:_.getBufferSha256(f)});case 6:return e.n=7,s.generateAsync(u);case 7:return h=e.v,e.n=8,_.signZipResource(h,c,r);case 8:return d=e.v,p=o,e.a(2,{rpksBuffer:d,rpkBuffer:p})}},e)}))).apply(this,arguments)}function n(){return(n=_asyncToGenerator(_regenerator().m(function e(t,r){var n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return n=p.readFileSync(r),e.n=1,_.signZipResource(n,[],t);case 1:return n=e.v,e.a(2,{apkBuffer:n})}},e)}))).apply(this,arguments)}function d(e,t,r,n){e.fileList.push({fileBuildPath:t,fileContentBuffer:r,fileContentDigest:n})}function i(e){var t,r,n,i,a,o,s,e=e.match(/^(\d{2}|\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)(|\.\d+)Z$/);if(e)return o=e[1],s=parseInt(o),2===o.length&&(50<=s&&s<100?s=1900+s:0<=s&&s<50&&(s=2e3+s)),o=parseInt(e[2])-1,t=parseInt(e[3]),r=parseInt(e[4]),n=parseInt(e[5]),i=parseInt(e[6]),a=0,""!==(e=e[7])&&(e=(e.substr(1)+"00").substr(0,3),a=parseInt(e)),Date.UTC(s,o,t,r,n,i,a);throw new Error("Your certificate is Invalid.")}function S(e,t,r){return C.apply(this,arguments)}function C(){return(C=_asyncToGenerator(_regenerator().m(function e(t,r,n){var i,a,o,s,c,u=arguments;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(i={signOnline:null!=n,privateKey:r,onlineConfig:n},(a=3<u.length&&void 0!==u[3]?u[3]:{})&&a.dssHost&&a.dssKey)return e.n=1,h.generateCertificate(a);e.n=2;break;case 1:t=e.v,i.type="dss";case 2:return(a=new l.X509).readCertPEM(t.toString()),o=l.KEYUTIL.getPEM(a.getPublicKey()),s=Buffer.from(f.Base64.unarmor(t)),c=Buffer.alloc(s.length+4),e.a(2,(c.writeInt32LE(s.length,0),s.copy(c,4),i.cert={content:t,obj:{len:c.length,buffer:c},pemBuffer:Buffer.from(f.Base64.unarmor(o))},i))}},e)}))).apply(this,arguments)}function E(e){var t=new l.X509,e=(t.readCertPEM(e),t.getSignatureValueHex()),t=Buffer.from(e,"hex").toString("base64"),e=y.getBufferSha256(t);return Buffer.from(e).toString("hex")}function A(){return(A=_asyncToGenerator(_regenerator().m(function e(a){var o,s,c,u,l,f,h,d;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(a&&p.existsSync(a)){e.n=1;break}throw new Error("No rpk file : "+a);case 1:if(o=p.readFileSync(a),v.checkZipBuffer(o)){e.n=2;break}throw new Error("Get File Certificate Error!");case 2:if((s=v.parserZip(o,!0)).sections.sign.tag){e.n=3;break}throw new Error("No sign block!");case 3:if(c=y.getSignChunk(o,s.sections.sign),u=y.getCertBuffer(c)){e.n=4;break}throw new Error("Get Certificate error!");case 4:return l=c.data[0].value.data[0].signatures.data[0].buffer,f=[],t=o,i=n=void 0,r=(r=s).sections,n=Buffer.alloc(r.header.len+r.central.len+r.footer.len),i=0,t.copy(n,0,r.header.startIndex,r.header.startIndex+r.header.len),i+=r.header.len,t.copy(n,i,r.central.startIndex,r.central.startIndex+r.central.len),i+=r.central.len,t.copy(n,i,r.footer.startIndex,r.footer.startIndex+r.footer.len),n.writeInt32LE(r.header.len,n.length-6),h=n,e.n=5,S(u);case 5:return d=e.v,e.n=6,_.getSignData(h,f,d);case 6:d=e.v,g.createVerify("RSA-SHA256").update(d).verify(u,l)||(b.error("Failed to verify the signature"),process.exit(-1));case 7:return e.a(2)}var t,r,n,i},e)}))).apply(this,arguments)}t.exports={generatePkgDef:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t=[],r={pkgName:"base.sspk",fileList:[]};return e.forEach(function(e){e=e.resource;t.push({pkgName:"".concat(e,".sspk"),fileList:[],root:e})}),{mainPkg:{pkgName:"base.spk",fileList:[]},subPkgs:e.length?[r].concat(t):[r]}},addResourceToPkg:function(e,t,a,o){e.forEach(function(r){var n,e=p.readFileSync(s.join(t,r)),i=[r,e,_.getBufferSha256(e)];d.apply(void 0,[a].concat(i)),o.length&&(n=!0,o.slice(1).forEach(function(e){var t=r.split("/");t[0]===e.root&&(i[0]=t.slice(1).join("/"),d.apply(void 0,[e].concat(i)),n=!1)}),n)&&d.apply(void 0,[o[0]].concat(i))})},signPkgs:function(e,t,r,n,i){return a.apply(this,arguments)},DIGEST_PATH:c,getResources:function(e){return function r(n,i){var a=[],o=s.posix.join(n,i);return p.readdirSync(o).forEach(function(e){var t=s.posix.join(o,e),e=s.posix.join(i,e);p.statSync(t).isFile()?a.push(e):a=a.concat(r(n,e))}),a}(e,".").filter(function(e){return e!==c})},checkValidity:function(e){(t=new l.X509).readCertPEM(String(e));var e=i(t.getNotAfter()),t=i(t.getNotBefore()),r=Number(new Date);return{validityDays:Number(e-r)/864e5,isInvalid:0<Number(t)-r}},getSignInfo:S,getApkSignInfo:function(e){var t={signOnline:!1,onlineConfig:null},r=((r=new l.X509).readCertPEM(e.toString()),l.KEYUTIL.getPEM(r.getPublicKey())),n=Buffer.from(f.Base64.unarmor(e)),i=Buffer.alloc(n.length+4);return i.writeInt32LE(n.length,0),n.copy(i,4),t.cert={content:e,obj:{len:i.length,buffer:i},pemBuffer:Buffer.from(f.Base64.unarmor(r))},t},getSignedZipCertFp:function(e){return A.apply(this,arguments)},getCertFp:function(e){if(p.existsSync(e))return E(p.readFileSync(e).toString());console.error("error : certificate.pem is not exist!")},signFullApk:function(e,t){return n.apply(this,arguments)},getCertString:function(e){if(!e||!p.existsSync(e))throw new Error("No srpk file : "+e);if(e=p.readFileSync(e),!v.checkZipBuffer(e))throw new Error("Get File Certificate Error!");var t=v.parserZip(e,!0);if(!t.sections.sign.tag)throw new Error("No sign block!");if(e=y.getSignChunk(e,t.sections.sign),t=y.getCertBuffer(e))return E(t);throw new Error("Get Certificate error!")}}}),Et=$e(function(e,t){var l=require("path"),f=require("fs"),r=require("json5"),n=require("rimraf"),h=require("decompress"),i="src/main/resources/rawfile",o=(0,Ct().getLogger)("utils"),a=require("child_process"),s=a.exec,c=a.spawnSync;function u(e){var t,r=l.resolve(e,"build-profile.json5");if(!f.existsSync(r))return l.join(e,"entry");r=d(r);if(0<(null==r||null==(t=r.modules)?void 0:t.length))return l.join(e,r.modules[0].srcPath);throw new Error("getEntryPkgPath error, build-profile.json5 file modules is null")}function d(t){if(!f.existsSync(t))return{};var e={};try{e=r.parse(f.readFileSync(t,"utf-8").toString()||"{}")}catch(e){throw new Error("parse json file error at ".concat(t,":").concat(e.lineNumber,":").concat(e.columnNumber," "))}return e}var p=function(e){return Promise.all(e.map(function(t){if(f.existsSync(t))return new Promise(function(e){n.sync(t),e()})}))};function g(){return(g=_asyncToGenerator(_regenerator().m(function e(t,r){var n,i,a,o,s,c,u;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,h(t,r);case 1:i=f.readdirSync(r,{withFileTypes:!0}),n=[],i=_createForOfIteratorHelper(i),e.p=2,i.s();case 3:if((u=i.n()).done)e.n=9;else{if(a=u.value,o=l.resolve(l.join(r,a.name)),s="","base.sspk"===a.name)return e.n=4,h(o,r);e.n=5}break;case 4:s=l.resolve(l.join(r,"META-INF")),e.n=7;break;case 5:return c=a.name.split(".")[0],e.n=6,h(o,l.resolve(r,c));case 6:s=l.resolve(l.resolve(r,c,"META-INF"));case 7:n.push(s),f.unlinkSync(o);case 8:e.n=3;break;case 9:e.n=11;break;case 10:e.p=10,u=e.v,i.e(u);case 11:return e.p=11,i.f(),e.f(11);case 12:return e.n=13,p(n);case 13:e.n=15;break;case 14:throw e.p=14,e.v;case 15:return e.a(2)}},e,null,[[2,10,11,12],[0,14]])}))).apply(this,arguments)}t.exports={RAWFILE_DIR:i,ASCF_BUILD:"ascf/ascf_build",ASCF_CONFIG_JSON:"ascf/ascf_src/ascf.config.json",P12_PATH:"sign/ascf-build.p12",QUICK_SERVICE_BUILD:"build/quick_service_build",DIST_PATH:"build/dist",getManifestData:function(e){return d(l.resolve(u(e),i,"manifest.json"))},getEntryPkgPath:u,readJsonFile:d,clearResource:p,copyDirectory:function e(t,r){var n;if(f.mkdirSync(r,{recursive:!0}),f.statSync(t).isFile())n=l.join(r,l.basename(t)),f.copyFileSync(t,n);else{var i,a=_createForOfIteratorHelper(f.readdirSync(t,{withFileTypes:!0}));try{for(a.s();!(i=a.n()).done;){var o=i.value,s=l.resolve(l.join(t,o.name)),c=l.join(r,o.name);o.isDirectory()?e(s,c):f.copyFileSync(s,c)}}catch(e){a.e(e)}finally{a.f()}}},mkdirsSync:function e(t){if(!f.existsSync(t)){if(f.existsSync(l.dirname(t))||!e(l.dirname(t)))return f.mkdirSync(t);print("mkdirSync err : ".concat(t))}},formatHexString:function(e){if(64!==e.length)throw new Error("指纹格式错误");for(var t="",r=0;r<e.length;r+=2)t+=e.substr(r,2)+":";return t.slice(0,-1).toUpperCase()},extractspk:function(e,t){return g.apply(this,arguments)},deleteDirectory:function t(r){f.existsSync(r)&&(f.readdirSync(r).forEach(function(e){e=l.join(r,e),f.lstatSync(e).isDirectory()?t(e):f.unlinkSync(e)}),f.rmdirSync(r))},executeCommand:function(i){var a=/^mac verified ok/i;return new Promise(function(t,r){var e,n=s(i);null!=(e=n.stdout)&&e.on("data",function(e){o.debug(e)}),null!=(e=n.stderr)&&e.on("data",function(e){!e.match(a)&&i.includes("pkcs12")&&r(e)}),null!=(e=n.stderr)&&e.on("error",function(e){r(e)}),n.on("close",function(e){t(e)})})},checkOpenSSL:function(e){if(0===(e=c(e,["version"],{encoding:"utf-8"})).status)return o.debug(e.stdout),!0;throw new Error("Please install openssl or configure PATH."+e.stderr)},validatePassword:function(){var e,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";return!(t.length<8)&&(e=0,/[a-z]/.test(t)&&e++,/[A-Z]/.test(t)&&e++,/[0-9]/.test(t)&&e++,/[`~!@#$%^&*()\-_=+\\|[{}];:'",<.>\/?]/.test(t)&&e++,2<=e)}}}),ln=$e(function(e,t){var n=require("path"),r=require("os"),i=Et().checkOpenSSL,a=r.platform(),r=Ct(),o=r.getLogger,s=r.installAscfTools,c=o("openssl"),u=!1;function l(){return(l=_asyncToGenerator(_regenerator().m(function e(){var t,r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(t="openssl","win32"===a)return e.n=1,s();e.n=2;break;case 1:r=e.v,t=n.join(r,"/lib/tools/release_64/bin/openssl.exe");case 2:return e.a(2,(u||(c.debug(t),u=i(t)),t))}},e)}))).apply(this,arguments)}function f(){return(f=_asyncToGenerator(_regenerator().m(function e(){var t,r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(t="","win32"===a)return e.n=1,s();e.n=2;break;case 1:r=e.v,t="-config ".concat(n.join(r,"/lib/tools/release_64/SSL/openssl.cnf"));case 2:return e.a(2,t)}},e)}))).apply(this,arguments)}t.exports={getOpensslPath:function(){return l.apply(this,arguments)},getOpensslConfig:function(){return f.apply(this,arguments)}}}),wa=$e(function(j,e){var h,l=require("crypto"),d=require("path"),p=require("fs"),r=dr().jszip,g=rr(),t=Ct().getLogger,n=Et(),m=n.RAWFILE_DIR,_=n.ASCF_BUILD,v=n.clearResource,y=n.copyDirectory,b=n.getEntryPkgPath,w=n.getManifestData,k=n.readJsonFile,S=n.ASCF_CONFIG_JSON,u=n.P12_PATH,L=n.QUICK_SERVICE_BUILD,N=n.DIST_PATH,f=n.executeCommand,C=ln().getOpensslPath,E=t("generate-spk"),s=100,z=1e4,H=0;function A(){return i.apply(this,arguments)}function i(){return(i=_asyncToGenerator(_regenerator().m(function e(t,r){var n,i,a;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return n=d.resolve(t,S),e.n=1,function(){return c.apply(this,arguments)}(r,t,n);case 1:return i=e.v,e.n=2,function(){return o.apply(this,arguments)}(r,t,n);case 2:return a=e.v,e.a(2,g.getSignInfo(a,i,h))}},e)}))).apply(this,arguments)}function o(){return(o=_asyncToGenerator(_regenerator().m(function e(n,i,a){var o,s,c;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(o="",p.existsSync(n.signPublicKeyPath)&&(E.debug("Obtaining a public Key using a Path"),o=p.readFileSync(n.signPublicKeyPath)),!o&&p.existsSync(n.signProfilePath))return E.debug("Obtain the private key using the p12 file path specified by the parameter"),e.n=1,R(n.signProfilePath,P(n.signPwd));e.n=2;break;case 1:o=e.v;case 2:o||!p.existsSync(a)?e.n=5:(s=null==(s=JSON.parse(p.readFileSync(a).toString()))?void 0:s.signConfig,p.existsSync(null==s?void 0:s.publicKeyPath)?(E.debug("Obtain the public key from the ascf.config.json publicKeyPath"),o=p.readFileSync(s.publicKeyPath),e.n=5):e.n=3);break;case 3:if(p.existsSync(null==s?void 0:s.profilePath))return E.debug("Obtain the public key from the ascf.config.json profilePath"),e.n=4,R(s.profilePath,P(n.signPwd));e.n=5;break;case 4:o=e.v;case 5:if(c=d.resolve(i,"sign/certificate.pem"),!o&&p.existsSync(c)&&(E.debug("Obtaining the public key using ".concat(c)),o=p.readFileSync(c)),c=d.resolve(i,u),!o&&p.existsSync(c))return E.debug("Obtaining the public Key Using the .p12 File"),e.n=6,R(c,P(n.signPwd));e.n=7;break;case 6:o=e.v;case 7:o||(E.error("failed to obtain the public key, please ensure certificate.pem or ascf-build.p12 under sign"),process.exit(-1)),r=t=void 0;var t=o,r=(t=g.checkValidity(t)).validityDays,t=t.isInvalid;if(r<0||t)throw new Error("ERROR: Your certificate is Invalid.");return r<180&&E.warn("WARNING: Your certificate is valid for less than 180 days. Please update it in time."),e.a(2,o)}},e)}))).apply(this,arguments)}function c(){return(c=_asyncToGenerator(_regenerator().m(function e(t,r,n){var i,a,o;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(i="",p.existsSync(t.signPrivateKeyPath)&&(E.debug("Obtaining a private Key using a Path"),i=p.readFileSync(t.signPrivateKeyPath)),!i&&p.existsSync(t.signProfilePath))return E.debug("Obtain the private key using the p12 file path specified by the parameter"),e.n=1,F(t.signProfilePath,P(t.signPwd));e.n=2;break;case 1:i=e.v;case 2:i||!p.existsSync(n)?e.n=5:(a=null==(a=JSON.parse(p.readFileSync(n).toString()))?void 0:a.signConfig,p.existsSync(null==a?void 0:a.privateKeyPath)?(E.debug("Obtain the private key from the ascf.config.json privateKeyPath"),i=p.readFileSync(a.privateKeyPath),e.n=5):e.n=3);break;case 3:if(p.existsSync(null==a?void 0:a.profilePath))return E.debug("Obtain the private key from the ascf.config.json profilePath"),e.n=4,F(a.profilePath,P(t.signPwd));e.n=5;break;case 4:i=e.v;case 5:if(o=d.resolve(r,"sign/private.pem"),!i&&p.existsSync(o)&&(E.debug("Obtaining the private key using ".concat(o)),i=p.readFileSync(o)),o=d.resolve(r,u),!i&&p.existsSync(o))return E.debug("Obtaining the private Key Using the p12 File"),e.n=6,F(o,P(t.signPwd));e.n=7;break;case 6:i=e.v;case 7:return i||(E.error("failed to obtain the private key, please ensure private.pem or ascf-build.p12 under sign"),process.exit(-1)),e.a(2,i)}},e)}))).apply(this,arguments)}function x(){return a.apply(this,arguments)}function a(){return(a=_asyncToGenerator(_regenerator().m(function e(i,t,a,o){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,(p.existsSync(i)||p.mkdirSync(i),t=a.rpksBuffer,r=i,(n=o).length>s&&(n=n.slice(0,s)),r=d.join(r,n),p.writeFileSync(r,t),E.info("Build spk ".concat(r)),r));var t,r,n},e)}))).apply(this,arguments)}function D(e){if(!e.package||!e.package.startsWith("com.atomicservice."))throw new Error("The package in the app.json file cannot be empty and must start with com.atomicservice.");if(!e.versionName||!e.versionCode)throw new Error("The versionName and versionCode fields in the app.json file cannot be empty.")}function O(e){var t=(new Date).toISOString().split("T")[0].split("-").join(""),r="production"===process.env.NODE_ENV?"release":"debug";return"".concat(e.package,"-").concat(e.versionCode,"-").concat(r,"-").concat(t,".spk")}function T(){return(T=_asyncToGenerator(_regenerator().m(function e(r,t){var n,i,a,o,s,c,u,l,f;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(n=d.join(r,S),(h=(p.existsSync(n)?require(n):{}).sign)&&!h.host)throw new Error("ERROR: The signature configuration file is incorrect, the hostvalue is empty.");e.n=1;break;case 1:return e.n=2,A(r,t);case 2:if(i=e.v){e.n=3;break}throw new Error("ERROR: Failed to obtain the signature configuration information.");case 3:return a=d.resolve(r,N),o=d.resolve(r,L),e.n=4,v([o]);case 4:if(D(s=w(r)),c=O(s),null!=(n=s.subpackages)&&n.forEach(function(e){var t=d.resolve(r,_,e.resource,m);y(t,d.resolve(o,e.resource))}),y(d.resolve(b(r),m),o),l=g.generatePkgDef(s.subpackages),u=l.mainPkg,l=l.subPkgs,(f=0<(f=[]).length?f:g.getResources(o)).length){e.n=5;break}throw new Error("The packed file is empty.");case 5:return e.a(2,(g.addResourceToPkg(f,o,u,l),g.signPkgs("",i,u,l,t).then((()=>{var t=_asyncToGenerator(_regenerator().m(function e(t){var r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,x(a,s.subpackages,t,c);case 1:if(r=e.v,"release"===s.versionType)return e.n=2,B(r);e.n=2;break;case 2:return e.a(2,r)}},e)}));return function(e){return t.apply(this,arguments)}})())))}},e)}))).apply(this,arguments)}function I(){return(I=_asyncToGenerator(_regenerator().m(function e(t,r,n,i){var a,o,s,c,u,l,f;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return a={signPrivateKeyPath:n,signPublicKeyPath:r,disableSubpackages:!1},e.n=1,A("",a);case 1:if(o=e.v,l=d.resolve(t,"manifest.json"),s=k(l),c=O(s),D(s),l=g.generatePkgDef(s.subpackages),u=l.mainPkg,l=l.subPkgs,(f=0<(f=[]).length?f:g.getResources(t)).length){e.n=2;break}throw new Error("The packed file is empty.");case 2:g.addResourceToPkg(f,t,u,l),i=null!=i?i:d.resolve(t,"dist"),g.signPkgs("",o,u,l,a).then((()=>{var t=_asyncToGenerator(_regenerator().m(function e(t){var r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,x(i,s.subpackages,t,c);case 1:if(r=e.v,"release"===s.versionType)return e.n=2,B(r);e.n=2;break;case 2:return e.a(2,r)}},e)}));return function(e){return t.apply(this,arguments)}})());case 3:return e.a(2)}},e)}))).apply(this,arguments)}function B(e){var t=Mt(),a=t.MAX_SIZE_SSPK,t=t.MAX_SIZE_SPK;if(p.statSync(e).size>t)throw new Error("Total package is exceed limit ".concat(t/1024/1024," MB."));return new Promise(function(n,i){p.readFile(e,function(e,t){if(e)return i(e);r.loadAsync(t).then(function(e){var r=null;if(e.forEach(function(e,t){if(z<++H)throw"Reached max. number of files";!r&&t._data.compressedSize>a&&(r=new Error("Package is exceed limit ".concat(a/1024/1024," MB.")))}),r)return i(r);n()})})})}function P(e){e=null!=e?e:process.env.ASCF_SIGN_PWD;return e||(E.error("signPwd is null, please configure through cli options, ascf.config.json or env ASCF_SIGN_PWD"),process.exit(-1)),e}function F(c,u){return new Promise((r=_asyncToGenerator(_regenerator().m(function e(t,r){var n,i,a,o,s;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return E.debug("Start to obtain the private key"),n=l.randomBytes(16).toString("hex"),i=l.randomBytes(16).toString("hex"),e.p=1,e.n=2,C();case 2:return a=e.v,o="".concat(a," pkcs12 -in ").concat(c," -nocerts -nodes -out ").concat(n," -passin pass:").concat(u),E.debug("".concat(a," pkcs12 -in ").concat(c," -nocerts -nodes -out ").concat(n," -passin pass:***")),e.n=3,f(o);case 3:return o="".concat(a," ec -in ").concat(n," -check -out ").concat(i),E.debug("".concat(a," ec -in ").concat(n," -check -out ").concat(i)),e.n=4,f(o);case 4:return p.existsSync(n)&&p.unlinkSync(n),s="",e.a(2,(p.existsSync(i)&&(s=p.readFileSync(i),p.unlinkSync(i)),E.debug("Obtaining the private key is complete."),t(s)));case 5:e.p=5,s=e.v,p.existsSync(n)&&p.unlinkSync(n),p.existsSync(i)&&p.unlinkSync(i),r("Failed to obtain the private key: ".concat(s));case 6:return e.a(2)}},e,null,[[1,5]])})),function(e,t){return r.apply(this,arguments)}));var r}function R(o,s){return new Promise((r=_asyncToGenerator(_regenerator().m(function e(t,r){var n,i,a;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return n=l.randomBytes(16).toString("hex"),e.p=1,e.n=2,C();case 2:return i=e.v,a="".concat(i," pkcs12 -in ").concat(o," -nokeys -clcerts -passin pass:").concat(s," | ").concat(i," x509 -out ").concat(n),E.debug("".concat(i," pkcs12 -in ").concat(o," -nokeys -clcerts -passin pass:*** | ").concat(i," x509 -out ").concat(n)),e.n=3,f(a);case 3:if(p.existsSync(n))return i=p.readFileSync(n),e.a(2,(p.unlinkSync(n),t(i)));e.n=4;break;case 4:e.n=6;break;case 5:e.p=5,a=e.v,p.existsSync(n)&&p.unlinkSync(n),r("Failed to obtain the cert key: ".concat(a));case 6:return e.a(2)}},e,null,[[1,5]])})),function(e,t){return r.apply(this,arguments)}));var r}e.exports={signSpk:function(e,t){return T.apply(this,arguments)},resignSpk:function(e,t,r,n){return I.apply(this,arguments)}}}),Ca=$e(function(e,t){require("path");var s=require("fs"),r=Ct().getLogger,n=Et(),c=n.executeCommand,u=n.validatePassword,n=ln(),l=n.getOpensslPath,f=n.getOpensslConfig,h=r("cert-utils");function i(){return(i=_asyncToGenerator(_regenerator().m(function e(t,r){var n,i,a,o;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:if(s.existsSync(t)||s.existsSync(r))throw new Error("".concat(t," or ").concat(r," exists"));e.n=1;break;case 1:return e.p=1,e.n=2,l();case 2:return n=e.v,e.n=3,f();case 3:return i=e.v,a="".concat(n," ecparam -name secp256r1 -genkey -noout -out ").concat(t),h.debug(a),e.n=4,c(a);case 4:return a="".concat(n," req -new -x509 -key ").concat(t," -out ").concat(r,' -days 3650 -sha256 -subj "/CN=ASCF/OU=/O=/L=/ST=/C=CN" ').concat(i),h.debug(a),e.n=5,c(a);case 5:e.n=7;break;case 6:e.p=6,o=e.v,h.error("Failed to generate cert",o),s.existsSync(t)&&s.unlinkSync(t),s.existsSync(r)&&s.unlinkSync(r);case 7:return e.a(2)}},e,null,[[1,6]])}))).apply(this,arguments)}function a(){return(a=_asyncToGenerator(_regenerator().m(function e(t,r,n,i){var a,o;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:if(u(i)){e.n=1;break}throw new Error("Invalid Password.\nThe password must contain at least 8 characters and include any two of the following:\n1. Lowercase letters: a-z\n2. Uppercase letters : A-Z\n3. Digits : 0-9\n4. Special characters : `~!@#$%^&*()-_=+\\|[{}];:'\",<.>/?");case 1:if(s.existsSync(t))throw new Error("".concat(t," exists"));e.n=2;break;case 2:return e.p=2,e.n=3,l();case 3:return o=e.v,a="".concat(o," pkcs12 -export -out ").concat(t," -inkey ").concat(r," -in ").concat(n," -passout pass:").concat(i),h.debug("".concat(o," pkcs12 -export -out ").concat(t," -inkey ").concat(r," -in ").concat(n," -passout pass:***")),e.n=4,c(a);case 4:e.n=6;break;case 5:e.p=5,o=e.v,h.error("Failed to generate p12",o),s.existsSync(t)&&s.unlinkSync(t);case 6:return e.a(2)}},e,null,[[2,5]])}))).apply(this,arguments)}t.exports={genCert:function(e,t){return i.apply(this,arguments)},genP12:function(e,t,r,n){return a.apply(this,arguments)}}}),Aa=$e(function(e){var n=require("path"),i=require("decompress"),a=rr().getSignedZipCertFp,t=Et(),o=t.clearResource,s=t.deleteDirectory;function r(){return(r=_asyncToGenerator(_regenerator().m(function e(t,r){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return r=null!=r?r:n.resolve(n.dirname(t),"dist"),e.n=1,a(t);case 1:return e.n=2,o([r]);case 2:return e.n=3,i(t,r);case 3:s(n.resolve(r,"META-INF"));case 4:return e.a(2)}},e)}))).apply(this,arguments)}e.verifySignHandler=function(e,t){return r.apply(this,arguments)}}),Ia=$e(function(e,t){var m=require("fs"),_=require("path"),i=dr().jszip,r=Et(),v=r.mkdirsSync,h=r.extractspk,d=r.clearResource,y=rr(),a="manifest.json",b="";function p(){return(p=_asyncToGenerator(_regenerator().m(function e(t,r,n,i){var a,o,s,c,u,l,f,h,d,p,g;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return v(r),a=t.package,o=t.versionType,s=t.versionCode,d=i.privateKeyFilePath,u=i.certFilePath,u=m.readFileSync(u),d=m.readFileSync(d),e.n=1,y.getSignInfo(u,d);case 1:if(c=e.v,u=y.generatePkgDef(t.subpackages),l=u.mainPkg,f=u.subPkgs,(h=0<(h=[]).length?h:y.getResources(n)).length){e.n=2;break}throw new Error("The packed file is empty.");case 2:return y.addResourceToPkg(h,n,l,f),e.n=3,y.signPkgs(a,c,l,f,{disableSubpackages:!1});case 3:d=e.v,p=d.rpksBuffer,g=(new Date).toISOString().split("T")[0].split("-").join(""),b=_.join(r,"".concat(a,"-").concat(s,"-").concat(o,"-").concat(g,".spk")),m.writeFileSync(b,p);case 4:return e.a(2)}},e)}))).apply(this,arguments)}function g(){return(g=_asyncToGenerator(_regenerator().m(function e(t){var r,n;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,(new i).loadAsync(m.readFileSync(t));case 1:if((r=e.v).files["base.sspk"]){e.n=2;break}throw new Error("Can not resolve base.sspk file.");case 2:return e.n=3,r.files["base.sspk"].async("nodebuffer");case 3:return n=e.v,e.n=4,(new i).loadAsync(n);case 4:return e.n=5,e.v.file(a).async("string");case 5:return n=e.v,e.a(2,JSON.parse(n)||{})}},e)}))).apply(this,arguments)}t.exports={spkHandler:function(s,c,u,l,f){return new Promise((r=_asyncToGenerator(_regenerator().m(function e(r,n){var i,a,o;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(m.existsSync(s)){e.n=1;break}return e.a(2,n(new Error("Can not resolve spk file: ".concat(s))));case 1:if(m.existsSync(c)){e.n=2;break}return e.a(2,n(new Error("Can not resolve certificate file: ".concat(c))));case 2:if(m.existsSync(u)){e.n=3;break}return e.a(2,n(new Error("Can not resolve private key file: ".concat(u))));case 3:return e.n=4,function(){return g.apply(this,arguments)}(s);case 4:if(i=e.v,t=i,0===Object.keys(t).length)return e.a(2,n(new Error("Invalid spk file.")));e.n=5;break;case 5:return a=i.package,o=_.dirname(s),o=_.join(o,a),a=_.join(null!=l?l:o,"quick-service-build"),o=_.join(null!=l?l:o,"dist"),e.n=6,d([a,o]);case 6:return v(a),e.n=7,h(s,a);case 7:return i.versionType=null!=f?f:i.versionType,m.writeFileSync(_.resolve(a,"manifest.json"),JSON.stringify(i,null,2)),e.n=8,function(){return p.apply(this,arguments)}(i,o,a,{privateKeyFilePath:u,certFilePath:c});case 8:return e.a(2,r(b))}var t},e)})),function(e,t){return r.apply(this,arguments)}));var r}}}),_wa=wa(),Ih=_wa.signSpk,Bh=_wa.resignSpk,_Ca=Ca(),Fh=_Ca.genCert,Ph=_Ca.genP12,_Et6=Et(),Th=_Et6.formatHexString,_Aa=Aa(),Rh=_Aa.verifySignHandler,_Ct6=Ct(),Lh=_Ct6.getLogger,_Ia=Ia(),Nh=_Ia.spkHandler,_rr2=rr(),$h=_rr2.getCertString,je=Lh("index");function jh(e,t){return _jh.apply(this,arguments)}function _jh(){return(_jh=_asyncToGenerator(_regenerator().m(function e(t,r){var n;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,je.info("start exec sign spk"),e.n=1,Ih(t,r);case 1:return n=e.v,e.a(2,(je.info("Signed successfully."),n));case 2:e.p=2,n=e.v,je.fatal("Signing failed: "+n),process.exit(-1);case 3:return e.a(2)}},e,null,[[0,2]])}))).apply(this,arguments)}function zh(e,t,r,n){return _zh.apply(this,arguments)}function _zh(){return(_zh=_asyncToGenerator(_regenerator().m(function e(t,r,n,i){var a;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,je.info("start exec resign spk"),e.n=1,Bh(t,r,n,i);case 1:je.info("Signed successfully."),e.n=3;break;case 2:e.p=2,a=e.v,je.fatal("Signing failed: "+a),process.exit(-1);case 3:return e.a(2)}},e,null,[[0,2]])}))).apply(this,arguments)}function Hh(e,t){return _Hh.apply(this,arguments)}function _Hh(){return(_Hh=_asyncToGenerator(_regenerator().m(function e(t,r){var n;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,je.info("start exec verify sign"),e.n=1,Rh(t,r);case 1:je.info("Signature verification succeeded."),e.n=3;break;case 2:e.p=2,n=e.v,je.info("Failed to verify the signature: ",n),process.exit(-1);case 3:return e.a(2)}},e,null,[[0,2]])}))).apply(this,arguments)}function Mh(e,t,r,n,i){return _Mh.apply(this,arguments)}function _Mh(){return(_Mh=_asyncToGenerator(_regenerator().m(function e(t,r,n,i,a){var o;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,je.info("start exec repack"),e.n=1,Nh(t,r,n,i,a);case 1:o=e.v,je.info("exec repack success, repack package path: "+o),e.n=3;break;case 2:e.p=2,o=e.v,je.fatal("repack failed: "+o),process.exit(-1);case 3:return e.a(2)}},e,null,[[0,2]])}))).apply(this,arguments)}function qh(e){try{je.info("start exec print fingerprints");var t=$h(e),r=Th(t);je.info("exec print fingerprints success, fingerprints info: "+r)}catch(e){je.fatal("failed to obtain the fingerprint: "+e),process.exit(-1)}}process.on("uncaughtException",function(e){je.error("ASCF uncaught error",e)}),process.on("unhandledRejection",function(e,t){je.error("ASCF unhandled rejection at:",t,"reason:",e)}),module.exports={signPkg:jh,resignPkg:zh,verifySign:Hh,repackHandler:Mh,printFp:qh,genCert:Fh,genP12:Ph};
|