@atomicservice/ascf-toolkit 1.0.9 → 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 -1
- 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.js +1 -1
- 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/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.js +1 -1
- package/package.json +1 -1
- package/lib/tools/platform-tools-darwin/adb +0 -0
- package/lib/tools/platform-tools-windows/AdbWinApi.dll +0 -0
- package/lib/tools/platform-tools-windows/AdbWinUsbApi.dll +0 -0
- package/lib/tools/platform-tools-windows/adb.exe +0 -0
- 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,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var _global$_ascfCliProgr,_0x186d50=_0x3d6c;function ownKeys(r,e){var t,n=_0x3d6c,i=Object[n(808)](r);return Object.getOwnPropertySymbols&&(t=Object[n(518)](r),e&&(t=t.filter(function(e){return Object[n(441)](r,e).enumerable})),i[n(1922)][n(475)](i,t)),i}function _objectSpread(t){for(var n=_0x3d6c,e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(i),!0)[n(1793)](function(e){_defineProperty(t,e,i[e])}):Object[n(849)]?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ownKeys(Object(i))[n(1793)](function(e){var r=n;Object[r(952)](t,e,Object[r(441)](i,e))})}return t}function _defineProperty(e,r,t){var n=_0x3d6c;return(r=_toPropertyKey(r))in e?Object[n(952)](e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError(_0x3d6c(1931))}function _iterableToArray(e){var r=_0x3d6c;if(r(1758)!=typeof Symbol&&null!=e[Symbol[r(959)]]||null!=e[r(1185)])return Array[r(1790)](e)}function _0x3d6c(e,r){var t=_0x236f();return(_0x3d6c=function(e,r){return t[e-=304]})(e,r)}function _arrayWithoutHoles(e){if(Array[_0x3d6c(1063)](e))return _arrayLikeToArray(e)}function _regenerator(){var _,g=_0x3d6c,e=g(2082)==typeof Symbol?Symbol:{},r=e[g(959)]||g(1185),t=e[g(1112)]||g(1165);function n(e,r,t,n){var i,a,o,s,u,c,f,h,l,d,v=g,r=r&&r[v(1809)]instanceof y?r:y,r=Object[v(1675)](r[v(1809)]);return _regeneratorDefine2(r,v(835),(i=e,a=t,h=n||[],l=!1,d={p:f=0,n:0,v:_,a:p,f:p[(c=v)(1733)](_,4),d:function(e,r){return o=e,s=0,u=_,d.n=r,m}},function(e,r,t){var n=c;if(1<f)throw TypeError(n(820));for(l&&1===r&&p(r,t),s=r,u=t;(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(b=o[e=s?e:"next"]){if(!(b=b[n(1360)](o,u)))throw TypeError("iterator result is not an object");if(!b[n(1616)])return b;u=b[n(696)],s<2&&(s=0)}else 1===s&&(b=o.return)&&b[n(1360)](o),s<2&&(u=TypeError("The iterator does not provide a '"+e+n(955)),s=1);o=_}else if((b=(l=d.n<0)?u:i[n(1360)](a,d))!==m)break}catch(e){o=_,s=1,u=e}finally{f=1}}return{value:b,done:l}}),!0),r;function p(e,r){var t=c;for(s=e,u=r,b=0;!l&&f&&!n&&b<h[t(847)];b++){var n,i=h[b],a=d.p,o=i[2];3<e?(n=o===r)&&(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=r,d.n=i[1]):a<o&&(n=e<3||i[0]>r||o<r)&&(i[4]=e,i[5]=r,d.n=o,s=0))}if(n||1<e)return m;throw l=!0,r}}var m={};function y(){}function i(){}function a(){}var b=Object.getPrototypeOf,e=[][r]?b(b([][r]())):(_regeneratorDefine2(b={},r,function(){return this}),b),o=a[g(1809)]=y[g(1809)]=Object[g(1675)](e);function s(e){var r=g;return Object[r(1024)]?Object[r(1024)](e,a):(e[r(1358)]=a,_regeneratorDefine2(e,t,r(1567))),e[r(1809)]=Object[r(1675)](o),e}return i[g(1809)]=a,_regeneratorDefine2(o,g(635),a),_regeneratorDefine2(a,g(635),i),i[g(756)]=g(1567),_regeneratorDefine2(a,t,g(1567)),_regeneratorDefine2(o),_regeneratorDefine2(o,t,"Generator"),_regeneratorDefine2(o,r,function(){return this}),_regeneratorDefine2(o,g(926),function(){return g(1836)}),(_regenerator=function(){return{w:n,m:s}})()}function _regeneratorDefine2(e,r,t,n){var o=_0x3d6c,s=Object[o(952)];try{s({},"",{})}catch(e){s=0}(_regeneratorDefine2=function(e,r,t,n){var i=o;function a(r,t){_regeneratorDefine2(e,r,function(e){return this._invoke(r,t,e)})}r?s?s(e,r,{value:t,enumerable:!n,configurable:!n,writable:!n}):e[r]=t:(a(i(348),0),a(i(899),1),a(i(433),2))})(e,r,t,n)}function _0x236f(){var e=["SIGN_HEADER","processChunk","header crc mismatch","createHash","commandDescription","). Corrupted zip ?","write after end","posix","_ascfCliOptions","hidden","needTransform","fportCmd","pause","runCmdAsync","getContentWorker","DEVECO_SDK_HOME","streamInfo","writeInt8","sign","readableObjectMode","getAscfDepDir under ","readInt","deflateResetKeep","bind","ascf.debugger.","heap_len","--ps launchMode forceUpdate","parse json error","legacy listTargets error or no devices found","writeInt32LE","ascfPackageName","__ASCF_MIN_TOOLKIT_VERSION","param","onlineConfig","output the version number","start hap error","profilePath","Debug Server has been stopped","_helpCommandName","clean","inflateReset2","gzip","optionMissingArgument","errorEmitted","hdc.exe","opts","forward","ending","undefined","open","help","blob","next_in","ncode","sort","configurable","send","extra","Map","/bin/ascf.js","error: required option '","-ArgumentList","len"," -inkey ","statusCode","--daemon","contentBuffer","CENTRAL_DIRECTORY_END","native","afterHelp","isEncrypted","error: missing required argument '","zipCommentLength","npmUtils","action","_checkForConflictingLocalOptions","_getHelpContext","getEntryPkgPath","--allow-file-access-from-files","compressedContent","from","-----BEGIN CERTIFICATE-----\n","start ohpm clean under ","forEach","install","[object RegExp]","documentElement","remotePort","STORE decompression","writev","package","createServer","sortOptions"," req -new -x509 -key ","defaults","copyDirectory","stat_desc","checkZipBuffer",":ascf","prototype","execPath","fport","allowExcessArguments","beforeHelp","http://localhost:","ascf-sign-tools","APK Sig Block 42","invalid literal/lengths set","finally","...","_ascfDebug","platform","pending","1733VgSDAw","sha512","hdc rport error, maybe find remote port error","_storeOptionsAsProperties","readDate","ungzip","invalid window size","listenerCount","****","sha256","installHap","getUTCMonth"," failed","[object Generator]","devtools://devtools/bundled/js_app.html","exitOverride","bin","inflateSetDictionary","total_out","unknownCommand","signdata","checkOffset","footer","Encrypted zip are not supported","handleUTF8","drain","node","hash_size"," /T /F","Buffer","state","JOINT_TAG","long","SIGN_TYPE_FULL_PACKAGE","isDirectory","close","getDebugees ","extraArgs","fileName","signZipResource"," is not supported by this platform","outputError","Start to obtain the private key","_mimeType","Reached max. number of files","asBinary","Corrupted zip: missing ","mainPkg","once","decode","dispose","message","getManifestData","crc32","\n(Did you mean one of ","addOption","bl_count","start assembleHap under ","min","symbol","add","[command]","has","formatHexString","getUTCHours","SIGHUP","last_flush","concat","generateAsync","status","reading","categories","Extracting to ","createCommand","startView","startHostPkg",", browser url: ","localeCompare","3.7.7","elems","valueFromOption","_bindStream","attributeName","modules","[object File]","final","assembleApp","Bypass","const.product.name","onreadystatechange","META-INF/CERT","getErrHelpWidth","diskNumberStart","splice","AdbBuilder","only the last argument can be variadic '","mkdir error","url","' value '","push","total_in","hvigor/hvigor-config.json5","bufferProcessing","zip64EndOfCentralSize","Option","commander.error","finalCalled"," success","Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.","The packed file is empty.","Obtaining the public Key Using the .p12 File"," \f\n\r\t \u2028\u2029","ignoreError","split","clear","assembleAndInstallHap","_upstreamEnded","project","promise","suggestSimilar","block_start","max_length","isDate"," pkcs12 -in ","assembleSpk error","generate-p12","pipe","installDeps","callback","getSignedZipCertFp","_dict_set","createFolders","unknown compression method","abc","ascf/ascf_src/package.json","' from env '","_optionEx","compression","_exitCallback","bi_valid","extend","_processArguments","reason:","base.sspk","_ascfCliProgram","stringifyByChar","list targets error: ","startHostPkgUrl","_chainOrCallHooks","fportWeb","getBufferSha256","processAttributes","Uninstall not supported.","PK","runningCommand","setOptionValue","Calling transform done when still transforming","usage","buffer error","clearResource","QUICK_SERVICE_BUILD","taskkill /pid ","Buf8","index","fillLast","RPK Sig Block 42","_optionValueSources","startDebugServer error","hvigorw","comment","setCurrent","Get File Certificate Error!","onmessage","false","integrity","bin/node","quick-service-build","Extract error:","incompatible version","noHelp","d_buf","Argument","port ","humanReadableArgName","end","util","The package in the app.json file cannot be empty and must start with com.atomicservice.","_data","disksCount",", timestamp=","negativeOptions","_listeners","inflateGetHeader","substring","Get Certificate error!","getLogger","dir","connect","sortSubcommands","\n-----END CERTIFICATE-----","gzindex","--targets","Illegal character at offset ","processedArgs","fportRmCmd","negate","../sdk","build-profile.json5","Quick service resignature","abs","exec","getAscfDepDir","PK","emit","net","No output type specified.","InvalidArgumentError","zip64","spkHandler","resume read 0","openBrowser","checkSignature","utf8decode","sync","install hap error","prev","l_buf","_chainOrCall","start ability under ","spawn","SIGN_MAGIC",".hvigor","windir","unknown"," is used","/AppScope/app.json5","max_lazy_match","visibleCommands","before","SIGINT","WritableState"," is not available, try find available","downloadAndExtract ","createOption","pendingcb"," -passin pass:***","strstart","strategy","isInit","postAction",". Expected ","defaultApp","No rpk file : ","string","--disable-subpackages [true or false]","text/plain","static_tree","readingMore","wbits","function","func","outputHelp"," for '","writecb","privateKeyPath","conflictsWith","chrome-devtools-frontend","inflateInit2","isEncoding","currentFile","ports:\n","positiveOptions","C:\\Program Files\\Huawei\\DevEco Studio\\tools","writeInt16LE","invalid subCmd, should be ","repack failed: ","127.0.0.1","&appid=","charAt","output","Server has been closed.","uint8array","parent","onerror","_aliases","GetHvigorDepsCachesDir","wsize","defaultValueDescription","private key path","total","support","MAX_SIZE_SPK","disableSubpackages","argumentDescription","(outputHelp)","--logging","Base64 encoding incomplete: at least 2 bits missing","Output path","floor","invalid code -- missing end-of-block","Nodejs stream input adapter for ","PK","applyFromCharCode","Your certificate is Invalid.","PATH","prev_match","external","wrapped data","result","@default","EntryAbility","date","match_start","validatePassword","usingTmpDir","Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()","addHelpCommand","argv","dyn_ltree","readInt32LE","build path","_flush","buf2string","commander.missingArgument",".spk","dss","_pakoAction","executableDir","flush","--parallel","pending_buf","[object Array]","isBuffer","user","setOptionValueWithSource","--help","Obtain the private key from the ascf.config.json privateKeyPath","RAWFILE_DIR","stopping","POST","commands","isApkSign","_events","checkAndGetBundleName","isError",'"`"',"fileRecord","ended","listen","debuglog","WebKitBlobBuilder","size","commander.executeSubCommandAsync","_helper","fportList","buildMode=","round","preAction","deflateInfo","files","start hvigorw --sync, please waiting ...","_args","fromCharCode","input","dirRecord","columns","--sign-pwd ***","WARNING: Your certificate is valid for less than 180 days. Please update it in time.","genP12","compressionMethod","removeListener","79009FiJrtL",".mjs"," pkcs12 -export -out ","Failed to remove cacheDir:","options","cur","next","last_lit","afterAll","GET","/debugServer/stop","PassThrough","conflicts","getOptionValue","writelen","data error","REJECTED","pipe resume","getTime","bits","dyn_tree","ascf-cache","--output [path]",", please upgrade ascf toolkit or hvigor plugin","have","darwin","stringifyByChunk","getDeviceName","Duplex","userName","CENTRAL_FILE_HEADER","getSignChunk","hvigorClean err","_read() is not implemented","flattenChunks","build.log","tar","callRejected"," -in ","-h, --help"," -V","data_length","extraStreamInfo","Z_STREAM_END","bundle","To add an Option object use addOption() instead of option() or requiredOption()","Corrupted zip : CRC32 mismatch","HVIGOR_USER_HOME","cacheDir removed successfully","runHdcCmd","stop","unlink","com.enjoy.now.hmos","isSymbol","rimraf","subpackages","getUTCFullYear","dictionary","_helpLongFlag","checkSupport","Argument must be a number","distbits","Corrupted zip or bug: expected ","ascii"," is exists, skip download and extract","isBoolean","runCmd exited.","_dispatchSubcommand","Invalid base64 input, it looks like a data url.","pidof","_tr_align","hash_mask","signOnline","uncompressWorker","getBuffer","isLocked","NONEWITHRSA","signPublicKeyPath","createArgument","tag","_findOption","lenbits","mkdirSync err : ","cert","bl_desc","has_stree","_hidden","Invalid JSON"," bytes."," ecparam -name secp256r1 -genkey -noout -out ",' -days 3650 -sha256 -subj "/CN=ASCF/OU=/O=/L=/ST=/C=CN" ',"return","otherCallFulfilled","start install start spk under ","hapPath is not exists","Signed successfully.","setIndex","--logging [level]","Method not allowed","getOwnPropertyDescriptor","stream error","_parseOptionsEnv","Calling transform done when ws.length != 0","sign/private.pem","hos","bytesWritten","hostname","_optionValues","DeviceManager","targets","extra_bits","do read","meta","Obtaining the private key using ","stream","Failed to generate cert","sunos","Unexpected value for position to addHelpText.\nExpecting one of '","_pako","CommanderError","allocBuffer","sha512-","404316jJaCwG","NO_DEVICE_ERROR","_outputType","installDeps err","DevEco Studio","Buf16","optionTerm","pemBuffer","statSync",'"pm list packages -f | grep ',"unknownOption","apply","fportRmV8","signtools","error: unknown option '"," -out ","getUTCSeconds","invalid code lengths set","nice_length","AscfDebugger","display help for command","fileCommentLength","/node_modules/@atomicservice/ascf-toolkit/lib","localabstract:webview_devtools_remote_","replace","hasInstance","searched for local subcommand relative to directory '","signchunk","formatHelp","hash_shift","assembleHap err","argumentTerm","deflateEnd","Writable",".pack_cache","commandUsage","Corrupted zip: can't find end of central directory","timeout",".json","_excessArguments","get","' not executable","' does not exist\n - if '","prependListener","remoteV8Port","getAscfDepDir err","--remove","app","onload","optional","ro.product.model","../tools/platform-tools-linux/adb","method","com.huawei.ascf.sample","getOwnPropertySymbols","File not found","Z_NEED_DICT","request","inflateInit","view","onError","pid","adler","_tick","getResources","ASCF_BUILD","_stream","crypto","getSpkInfo","subcommandDescription","centralDirSize","Socket","X509","havedict","operands","CRYPT_TYPE_RSA_SHA256","setTyped","The selected Atomic Service is not running properly. Please start the Atomic Service first.","then","__esModule","assembleSpk within ","allocUnsafe","incorrect header check","distcode","--inspect","xflags","pipesCount","subcommandTerm","Promise","tarball","chrome://inspect/#devices","help [command]","Invalid base64 input, bad content length.","was","hvigor","sData","start exec sign spk","_writableState","\\System32\\WindowsPowerShell\\v1.0\\powershell","Arguments","getSignInfo","showHelpAfterError","central","uncompressedSize","ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=","isTTY","toLowerCase","getUTCDate","Hex encoding incomplete: 4 bits missing","copy","inflateReset","stderr","start installDeps under ","inspect","outcome","Failed to verify the signature: ","rpksBuffer","encodeFileName","readableHighWaterMark","option:","-i, --input <input-directory>","warn","ASCF_DEVECO_SDK_HOME","StringDecoder","child_process","runExecAsync stderr","helpInformation","d_desc","Cannot call a class as a function","/ascf/ascf_src/ascf.config.json","startMode","hash.json","insufficient memory","wnext","back","log","reading or ended","onFulfilled","setLoggerConfig","pkg","addArgument","ASCF_CONFIG_JSON","unlinkSync","lencode","assembleHap","host","_versionOptionName","', '","X-Request-ID","dirname","fileLogger","DEVECO_SDK_HOME=","cmd","shortFlag","lastIndexOfSignature","lock","printFp","_compressWorker","lineNumber","corkedRequestsFree","v1.8.","data","toNodejsStream","addCommand","getBlob","Can not resolve spk file: ","previous","mkdirSync","opt_len","Debug Server stopping ...","parseOptions","constructor","JSZip can't accept a stream when loading a zip file.","' not specified","inherits","listTargets","-default-signed.","pkgName","assembleHap error","Base64"," ms","pending_out","centralDirRecords","uninstall hap error","path","production","browser","optionEnv:","match_length","Deflate","binary","load","buf2binstring","start install pkg under ","lstatSync","stream.unshift() after end event","_read","devtools://devtools/bundled/js_app.html?v8only=true&ws=localhost:9229","parentNode","runExecAsync stdout","error: command-argument value '","mode","cork","_helpDescription","w_size","writeErr","quick service signature packaging tool","enablePositionalOptions","checkCRC32","_summary","_readableState","base64","configureHelp","start assembleApp under ","error","inherit","del","SlowBuffer","Derived constructors may only return object or undefined","bundleName","onData","unshift","utf-8 decode","= \f\n\r\t \u2028\u2029"," is not found for project, will use global ascf","_defaultCommandName","parseArg","latin1","arraybuffer",".js","corked","application/zip","value","node.exe","find","writeFileSync","Help","### Sign Failed, cannot open file: ","Obtain the private key from the ascf.config.json profilePath","SIGN_MAGIC_APK","default: ","read: emitReadable","objectMode","getPrototypeOf","utf8border","MAX_VALUE_16BITS","534591NMYjJG","readdirSync","w_mask","toolkit","jsrsasign","stringify","tsup","DATA_DESCRIPTOR","bufferedRequest","_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","alias","_write() is not implemented"," -check -out ","nestedError","dssKey","start startAbility under ","indexOf",", expected ","spawnSync","begin runCmd: ","internalFileAttributes","subarray","ohpm","bundleName or versionCode is not configured","defaultValue","writeOut","currentSourceOffset",'"callback" argument must be a function',"UNIX","copyInheritedSettings","generateWorker","name","Forwardport result:OK","debug-log-file","incorrect length check","createHelp","data_type","executableFile","MozBlobBuilder","fportRm","utf8encode","skip","ASCF uncaught error","apk","nodestream","construct","displayName","SIGTERM","ascf/ascf_src/node_modules/@atomicservice/ascf-toolkit/lib","certFilePath","readString","lastTotal","WebKitMutationObserver","parse","utils"," to ","Utf8EncodeWorker","utf8","allowUnknownOption","shift","lastDebugServer","hcrc","linux","_passThroughOptions","3.7.1","exit","digest","Multi-volumes zip are not supported","DataLengthProbe for ","_outputConfiguration","zipComment","repackHandler"," -passout pass:","isFile","lendyn"," is not a valid compression method !","handled","isFunction","signPwd is null, please configure through cli options, ascf.config.json or env ASCF_SIGN_PWD","-EncodedCommand","-rf",".cjs","DeviceInfo","指纹格式错误","getOutHelpWidth","allowHalfOpen","UNHANDLED","signPkgs","logger","_sources","writeencoding","%d{yyyy-MM-dd hh:mm:ss.SSS} > %p %c %m","unknown header flags set","(close)","need readable","deflate","test","resume","keys"," -nocerts -nodes -out ","--deviceType","uncaughtException","basename","inflate","port","spk file path","isFinished","Normal","start ability error","CERT_HEAD","Generator is already running","commander.unknownOption","wrapped _read"," records in central dir, got ","module","missingMandatoryOptionValue","@chrome-devtools/js-app","killed","match_available","ascf toolkit version is below ","_executableFile","DEVECO_SDK_HOME is not found, please set environment DEVECO_SDK_HOME","dosPermissions","endsWith","binstring2buf","_invoke","Arguments:",' | grep -v render | grep -v grep"',"whave","match","_version","No srpk file : ","BEGIN_TAG","fileContentBuffer","logging","aliases","getDssKeyId","length","--es","getOwnPropertyDescriptors","repack","max","startDebugServer","_helpCommandDescription","maybeReadMore read 0","/debugServer/status","_addImplicitHelpCommand","Authorization","window","otherCallRejected","some","chrome","convert","reject","preset","good_match","fileBuildPath","utf-8 encode","_executeSubCommand","cleanUp","needRm","nextTick","P12_PATH","found devices: ","No devices found, please connect to phone","Super expression must either be null or a function","EACCES","zero","ucs2","extra_base","uninstall","7.5.4","getCertString","json5","catch"," info --json ","npm.cmd","application/json","extract entry error","_worker","ERROR: The signature configuration file is incorrect, the hostvalue is empty.","_tr_init","rawArgs","longestOptionTermLength","work","Quick service verify sign","flowing","Argument must not be a number","getInstance","throw","DOS","Usage: ","×tamp=","baseFolder","delay","8VgWdJL","sign request error: ","tryAdbPortReversing","loadOptions","decoder","_findCommand","asUint8Array","env","_name","get ascf dep dir failed, fallback to use global ascf","missingArgument",', signature="',"stream end","projectRoot","_allowExcessArguments","offset","fport web error: ","errMsg","/ascf/ascf_src/app.json","filter","transforming","toString","please open url in browser: ","lookahead","string2buf","readAndCheckSignature","Verify integrity failed","\n(Did you mean ","InvalidOptionArgumentError","shrinkBuf","handle","max_lazy","invalid distance too far back","asArrayBuffer","' is invalid.","nice_match","wrap"," error: ","readData","propName","exec cmd error","utf-8","extractspk","/json","META-INF","readEndOfCentral","_parseCommand","defineProperty","Please install openssl or configure PATH.","depth","' method","setDssHost","storeOptionsAsProperties","Inflate","iterator","_enablePositionalOptions","' has already been used.","version type","--sign-private-key-path [path]","address","pako inflate (from Nodeca project)","required","Can not resolve base.sspk file.","sections","onfinish","generatedError","resumeScheduled","Corrupted zip: can't find the ZIP64 end of central directory locator","validityDays","getprop","postMessage","error : certificate.pem is not exist!","[object Blob]","2.4.0","destroy","destType","_transform","MAX_SIZE_SSPK","signPrivateKeyPath","internalStream","concat : unsupported type '","cache","includes","assembleHsp","findExtraFieldUnicodeComment","DualOptions","_showHelpAfterError","init","begin runExecAsync","sign/ascf-build.p12","https","stdout","isRelease","ucs-2","deflateReset","hdc","_parseOptionsImplied",".ts","writableObjectMode","getEntryPkgPath error, build-profile.json5 file modules is null","KEYUTIL","header","tail","generateSpk info","DIST_PATH","passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)","fportWeb get pid error: ","dmax","Buf32","_scriptPath","array","commander.helpDisplayed","preSubcommand","CLOUDSOA-HMAC-SHA256 appid=","express","../tools/release_64/SSL/openssl.cnf","getDevicesCmd","call pause flowing=%j","cachedir","setPrototypeOf","commander.excessArguments","assembleSpk err","_showSuggestionAfterError","short","nodebuffer","success","random","_exit","set","_createPako","_undestroy","onunpipe","start assembleSpk under ","rpk","arguments","_executableHandler","failed to obtain the public key, please ensure certificate.pem or ascf-build.p12 under sign","zip64ExtensibleData","ascf","onRejected","max_code","ascfDebugger","tsup --watch ./src --sourcemap --no-minify","generate-spk","[object ArrayBuffer]","brk","Signature Packing","abort","install spk error","_usage","rmdirSync","_allowUnknownOption","Download failed: ","_write","ascf run err"," elapsed ","hdc rport tcp:","finished","isArray","parseAsync","hasUnpiped","_checkNumberOfArguments","lastIndexOf","inflateEnd","Z_OK","--version-type [type]","boolean","code","log4js","UTC","../tools/platform-tools-windows/adb.exe","commander.help","argOptional","transformTo","hex","charCodeAt","google chrome","decodeStrings","_hasImplicitHelpCommand","signProfilePath","config","-NonInteractive","parse json file error at ","configure","setTimeout","presetArg","requiredOption","pipes","isNumber","resource","_helpShortFlag","194BUnMuU","signatures","_tr_flush_block","base.spk","Request timed out","after","description","fportListCmd","_internalType","extraFieldsLength","-ExecutionPolicy","zipPlatform","listeners","reverse","PK","prepareAssemble","toStringTag","getPortManager","--debug","captureStackTrace","_fromList","createWorkerFrom","signPwd","commander.invalidArgument","_argsDescription","publicKeyPath","document","hook","kill","openBrowser error, please try later","Readable","pattern","pathname","info","prev_length","' argument missing","1.20251708.0","script","Signing failed: ","last","utf16le","centralDirOffset","text","deflateInit2","ERROR: Your certificate is Invalid.","getOpensslPath","awaitDrain","C:\\Windows","[object Error]","webLocalPort","no sign chunk!","Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.","doLog","_helpFlags","Can not resolve certificate file: ","The versionName and versionCode fields in the app.json file cannot be empty.","default","instance","undestroy","atomicservice","encoding","visibleOptions","beforeAll","No device found.","hasOwnProperty","_dataBinary","The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.","fileSync","lastChar","@@toStringTag","_tr_tally","false write response, pause","SIGN_TYPE_FILE_LIST","gzhead","getOpensslConfig","onEnd","bufferedRequestCount","compressedSize","fileNameStr","outputHelp callback must return a string or a Buffer","PK","privateKey","prefinished","isNullOrUndefined",".tsx","prefinish","MAX_VALUE_32BITS","v0.","append","@@iterator","hold","DebugPortManager","matches","argument","error: too many arguments","percent","custom","extra_len","getHosDevices","ohpmClean err","existsSync","start","args","afterAllHelp","usingTmpDir 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","enumerable","adapter","dyn_dtree","Obtaining the public key using ","assembleApp err","Invalid spk file.","Z_BUF_ERROR","Cannot resolve promise with itself","fileNameLength","_lifeCycleHooks","exec repack success, repack package path: ","static_len","addListener","disable subpackages","Utf8DecodeWorker","decodeFileName","getTypeOf","diskWithCentralDirStart","optimizedBinaryString","42FrhKmT","ndist","finish","signSpk","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.","_tr_stored_block","getPublicKey","request ","shell","mergeStreamInfo","w_bits","homedir","isNode"," argument","' argument '","fportRmWeb","Port ","reader","[HOS] ","listTargets error or no devices found","/js_app.html","program","this hasn't been initialised - super() hasn't been called","defaultEncoding","check","getDssHost","queue","fileContentDigest","Start","../tools/platform-tools-darwin/adb","max_chain","writableHighWaterMark","flow","BlobBuilder","getDevicesInner","generatePkgDef","incorrect data check"," is not found","readableListening","_destroy","buffer","CERT_END","_chainOrCallSubCommandHook","--sign-public-key-path [path]","toISOString","ZIP64_CENTRAL_DIRECTORY_END","externalFileAttributes","readable","unexpected parse option { from: '","toUpperCase","_tickAndRepeat","command:","getDeviceType","runAdbCmdAsync","start exec print fingerprints","471033sBRzok","readCertPEM","start exec verify sign","avail_out","stopDebugServer","endEmitted","newBufferFrom","hash","Adb reverse tcp:","Unknown encoding: ","stopView","Total package is exceed limit ","getSignData"," MB.","keyId","distdyn","obj","visibleArguments","encode","unixPermissions","compressWorker","dualOptions","installAndRunDebugPkg","diskNumber","super_","destroyed","ASCF_DISABLE_CACHE_DEP_DIR","hos listTargets error or no devices found","fatal","read","startIndex","STORE","isRegExp","Obtaining the private Key Using the p12 File","relativeOffsetEndOfZip64CentralDir","handle error","pending_buf_size","STORE compression","readJsonFile","readBlockZip64EndOfCentralLocator","randomBytes","exports","getOptionValueSource","chunkSize","signData","writechunk","needDrain","sane","readExtraFields","isLegacy","substr","ro.product.name","DebugServer",'"ps -ef | grep ',"_writev","leftOver","commander.conflictingOption","ascf/ascf_src/ascf.config.json","_concatValue","sign files, use remote sign","_transform() is not implemented","ondata","invalid literal/length code","tcp:","transform","subPkgs","copyFileSync","getCertBuffer","install devtools failed, please open chrome://inspect in browser(chrome/edge) to debug","bl_tree","app_id","update","max_chain_length","diskWithZip64CentralDirStart","verify","startService","Uint8Array","registerPrevious","newBlob","exitCode","This method has been removed in JSZip 3.0, please check the upgrade guide.","must be non-object","__proto__","argChoices","call","object","normalize","debug","helpWidth","Z_FINISH","slice","time","openssl","terminal","resolver must be a function","module=","crossAtomicService","highWaterMark","Worker ","getPEM","isBuf"," -> ","srcPath","ZIP64_CENTRAL_DIRECTORY_LOCATOR","Transform","unpipe","_tickScheduled","deflateRaw","public key path","PK\b","flags","target","splitOptionFlags","debugger","win32","_combineFlagAndOptionalValue","longFlag","dist","streamFiles","View Fingerprint","ascf -V","invalid block type","resignPkg","map","isPrimitive","RSA-SHA256","asText","manifest.json","events","workspace","_decompressWorker","setDssKey","call .storeOptionsAsProperties() before adding options","_prepareUserArgs","prepareContent","heap","fportV8","1942580gnEjgi","lit_bufsize","_helpConfiguration","onend","json","BuildProcess","repeat","buildMode","READABLE_STREAM","delete ascf debugger pid file error","bitFlag","level","runHdcCmdAsync","May not write null values to stream","startsWith","download ","11.0.0","getLegacyDevices"," | ","isPaused","msg","readFileSync","signature","edge","trim","isInvalid","http://127.0.0.1:","fileComment","getSignatureValueHex","EventEmitter","type","list","readBlockEndOfCentral"," tcp:","error: option '","alloc","deviceType","'.\nExpecting one of '","decompressed"," cannot be used with "," but got ","_conflictingOption","longestArgumentTermLength","/build-profile.json5","addResourceToPkg","getCurrent","memLevel","getCompressedWorker","createVerify","mkdirsSync","port2","Corrupted zip or bug: unexpected signature (","assign","http","hap","trying to get ascf debugger server info: ","Command","_pakoOptions","Obtain the private key using the p12 file path specified by the parameter","tsup --watch ./src -d ../ascf-toolkit/src/ascf-sign-tools","NODE_ENV","emittedReadable","ERROR_MSG","deflateSetHeader","localPort","implied","_executableDir","Obtain the public key from the ascf.config.json publicKeyPath","failed to obtain the private key, please ensure private.pem or ascf-build.p12 under sign","legacy","getDevices","electron","msedge","error: ","envVar","versionType","writeHead","SIGUSR1","file","static","accumulate","appendChild","execSync","send hap error","signDataBufList","Failed to obtain the cert key: ","withStreamInfo","jszip","unarmor","utf-16le","9229","mandatory","versions","Package is exceed limit ","setEncoding","SIGUSR2","0123456789ABCDEF","fport error: ","head","DEFLATE","padWidth","deprecate","resolve","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 : `~!@#$%^&*()-_=+\\|[{}];:'\",<.>/?","use","The stream '","Allowed choices are ","loadAsync","disable","--incremental","pretty","join","Debug Server is running on http://127.0.0.1:","deviceId","clone","_hasHelpOption","realpathSync","choices: ","ascf/ascf_build","writable","version","window_size","1242980HDwtdD","/../tools/","'. ","0.0.1","chrome://inspect#devices","option","Bug : can't construct the Blob.","ins_h","localHeaderOffset","DataWorker","hasReq","readLocalFiles","pubkey","get device name error","build/dist","\0\0\0\0","root","DebuggerProcess","variadic","Can't read the data of '","l_desc","commander.unknownCommand","sign/certificate.pem","magic","ERROR: Rpk sign failed!","invalid distances set","intermediate output path","raw","freebsd","generateInternalStream","startServer","reduce","GeneratorFunction","v8LocalPort","[object Date]","env: ","extraFields","_checkForConflictingOptions","invalid bit length repeat","arraySet","fileList","End of data reached (data length = ","getPid","lens","createElement","digests","fport ls error: ","decompress","signConfig","_description","parserZip","js-base64","pkgUrl","toUint8Array","dirRecords","encodeURL","getLegacyProcess","start exec repack","readBlockZip64EndOfCentral","2.2.3","avail_in","runCmd exited with code ","_transformState","versionCode","lastBufferedRequest","argParser","parseZIP64ExtraField","strm","}([\\s]|$)|[^\\s]+?([\\s]|$)","heap_max","prepareReader","nlen","Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.","versionMadeBy","closedSource","getOwnPropertyNames"," ec -in ","createSign","isUndefined","isDefault","a default value for a required argument is never used: '","done","makeOptionMandatory","getHdcPath","/Applications/DevEco-Studio.app/Contents/tools","write","Setting the log level","--sync","nameFromFilename","optsWithGlobals","insert","v1.","checkAndGetCurrent"," -passin pass:","cancelled","stopService","cpList",'The "data" argument must not be a number',"getSignDigestOnline","_helpCommandnameAndArgs","writing","--disable-web-security","port1","must be an array","$1\n","err","allBuffers","SIGN_TYPE_FULL_PACKAGE_APK","all","entry","panel=sources","isPortReachable","entriesCount","bi_buf","helpOption","_actionHandler","(error)"," errors:\n","number","applyCanBeUsed","No sign block!","centralDirRecordsOnThisDisk","Commands:","process","verifySign","MSBlobBuilder","next_out","devices"," or ","length less than watermark","LOCAL_FILE_HEADER","mkdir"," x509 -out ","generate-keypair","verifySignHandler","../sdk/default/openharmony/toolchains","isStream","_checkForMissingMandatoryOptions","executeCommand","handle ","create","dataIsReady","fileCommentStr","getDeviceId","Signature verification succeeded.","onwrite","getDebugUrl ","passwordDigest","microsoft-edge","com.atomicservice.","runCmd stderr: ","prepareNextSource"," [options]","_final","lastNeed","fill","createTextNode","chunks","runCmd stdout: ","exec print fingerprints success, fingerprints info: ","callFulfilled","--ps ascfDebugger brk","getLegacyDeviceName","4.2.1","certs","unhandledRejection","start debug server url: ","command","windowBits","optionDescription","extname","needReadable","microsoft-edge-dev","useUTF8",'`""'];return(_0x236f=function(){return e})()}function asyncGeneratorStep(e,r,t,n,i,a,o){var s=_0x3d6c;try{var u=e[a](o),c=u[s(696)]}catch(e){return void t(e)}u[s(1616)]?r(c):Promise[s(1515)](c)[s(542)](n,i)}function _asyncToGenerator(u){return function(){var e=this,s=arguments;return new Promise(function(r,t){var n=_0x3d6c,i=u[n(475)](e,s);function a(e){asyncGeneratorStep(i,r,t,a,o,n(348),e)}function o(e){asyncGeneratorStep(i,r,t,a,o,n(899),e)}a(void 0)})}}function _slicedToArray(e,r){return _arrayWithHoles(e)||_iterableToArrayLimit(e,r)||_unsupportedIterableToArray(e,r)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(_0x3d6c(1607))}function _iterableToArrayLimit(e,r){var t=_0x3d6c,n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol[t(959)]]||e[t(1185)];if(null!=n){var i,a,o,s,u=[],c=!0,f=!1;try{if(o=(n=n[t(1360)](e))[t(348)],0===r){if(Object(n)!==n)return;c=!1}else for(;!(c=(i=o[t(1360)](n)).done)&&(u[t(1922)](i[t(696)]),u[t(847)]!==r);c=!0);}catch(e){f=!0,a=e}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(f)throw a}}return u}}function _arrayWithHoles(e){if(Array[_0x3d6c(1063)](e))return e}function _defineProperties(e,r){for(var t=_0x3d6c,n=0;n<r[t(847)];n++){var i=r[n];i[t(1202)]=i.enumerable||!1,i[t(1765)]=!0,t(696)in i&&(i[t(1532)]=!0),Object[t(952)](e,_toPropertyKey(i.key),i)}}function _createClass(e,r,t){var n=_0x3d6c;return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object[n(952)](e,"prototype",{writable:!1}),e}function _toPropertyKey(e){var r=_0x3d6c,e=_toPrimitive(e,r(2076));return r(1882)==_typeof(e)?e:e+""}function _toPrimitive(e,r){var t=_0x3d6c;if(t(1361)!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return(t(2076)===r?String:Number)(e);n=n[t(1360)](e,r||t(1152));if(t(1361)!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function _classCallCheck(e,r){var t=_0x3d6c;if(!(e instanceof r))throw new TypeError(t(592))}function _callSuper(e,r,t){var n=_0x3d6c;return r=_getPrototypeOf(r),_possibleConstructorReturn(e,_isNativeReflectConstruct()?Reflect.construct(r,t||[],_getPrototypeOf(e)[n(635)]):r.apply(e,t))}function _possibleConstructorReturn(e,r){var t=_0x3d6c;if(r&&(t(1361)==_typeof(r)||t(2082)==typeof r))return r;if(void 0!==r)throw new TypeError(t(682));return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError(_0x3d6c(1243));return e}function _inherits(e,r){var t=_0x3d6c;if(t(2082)!=typeof r&&null!==r)throw new TypeError(t(875));e[t(1809)]=Object[t(1675)](r&&r[t(1809)],{constructor:{value:e,writable:!0,configurable:!0}}),Object[t(952)](e,t(1809),{writable:!1}),r&&_setPrototypeOf(e,r)}function _wrapNativeSuper(e){var n="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(r){var t=_0x3d6c;if(null===r||!_isNativeFunction(r))return r;if(t(2082)!=typeof r)throw new TypeError(t(875));if(void 0!==n){if(n.has(r))return n.get(r);n.set(r,e)}function e(){var e=t;return _construct(r,arguments,_getPrototypeOf(this)[e(635)])}return e.prototype=Object[t(1675)](r[t(1809)],{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(e,r)})(e)}function _construct(e,r,t){var n,i=_0x3d6c;return _isNativeReflectConstruct()?Reflect.construct[i(475)](null,arguments):((n=[null])[i(1922)][i(475)](n,r),r=new(e[i(1733)].apply(e,n)),t&&_setPrototypeOf(r,t.prototype),r)}function _isNativeReflectConstruct(){var e=_0x3d6c;try{var r=!Boolean.prototype.valueOf[e(1360)](Reflect[e(755)](Boolean,[],function(){}))}catch(e){}return(_isNativeReflectConstruct=function(){return!!r})()}function _isNativeFunction(r){var e=_0x3d6c;try{return-1!==Function[e(926)][e(1360)](r)[e(726)]("[native code]")}catch(e){return"function"==typeof r}}function _setPrototypeOf(e,r){var t=_0x3d6c;return(_setPrototypeOf=Object[t(1024)]?Object[t(1024)][t(1733)]():function(e,r){return e[t(1358)]=r,e})(e,r)}function _getPrototypeOf(e){var r=_0x3d6c;return(_getPrototypeOf=Object.setPrototypeOf?Object[r(707)].bind():function(e){return e[r(1358)]||Object.getPrototypeOf(e)})(e)}function _createForOfIteratorHelper(e,r){var t,n,i,a,o=_0x3d6c,s="undefined"!=typeof Symbol&&e[Symbol.iterator]||e[o(1185)];if(s)return i=!(n=!0),{s:function(){s=s.call(e)},n:function(){var e=o,r=s[e(348)]();return n=r[e(1616)],r},e:function(e){i=!0,t=e},f:function(){var e=o;try{n||null==s[e(433)]||s[e(433)]()}finally{if(i)throw t}}};if(Array[o(1063)](e)||(s=_unsupportedIterableToArray(e))||r&&e&&"number"==typeof e[o(847)])return s&&(e=s),a=0,{s:r=function(){},n:function(){return a>=e[o(847)]?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:r};throw new TypeError(o(1147))}function _unsupportedIterableToArray(e,r){var t,n=_0x3d6c;if(e)return"string"==typeof e?_arrayLikeToArray(e,r):("Object"===(t={}.toString[n(1360)](e).slice(8,-1))&&e.constructor&&(t=e[n(635)].name),n(1768)===t||"Set"===t?Array[n(1790)](e):n(563)===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/[n(806)](t)?_arrayLikeToArray(e,r):void 0)}function _arrayLikeToArray(e,r){var t=_0x3d6c;(null==r||r>e.length)&&(r=e[t(847)]);for(var n=0,i=Array(r);n<r;n++)i[n]=e[n];return i}function _typeof(e){var t=_0x3d6c;return(_typeof=t(2082)==typeof Symbol&&"symbol"==typeof Symbol[t(959)]?function(e){return typeof e}:function(e){var r=t;return e&&"function"==typeof Symbol&&e[r(635)]===Symbol&&e!==Symbol[r(1809)]?r(1882):typeof e})(e)}(()=>{for(var e=_0x3d6c,r=_0x236f();;)try{if(126823==+parseInt(e(1823))*(-parseInt(e(1096))/2)+-parseInt(e(710))/3+-parseInt(e(464))/4+parseInt(e(1535))/5+-parseInt(e(1221))/6*(-parseInt(e(342))/7)+parseInt(e(905))/8*(parseInt(e(1276))/9)+parseInt(e(1413))/10)break;r.push(r.shift())}catch(e){r.push(r.shift())}})();var Be=function(r,t){return function(){var e=_0x3d6c;return t||r((t={exports:{}})[e(1317)],t),t[e(1317)]}},Ut=Be(function(c,e){function r(r,t){return function(){var e=_0x3d6c;return t||r((t={exports:{}}).exports,t),t[e(1317)]}}function i(t,n,i,a){var o=X;if(n&&_typeof(n)==o(1361)||typeof n==o(2082)){var s,r=_createForOfIteratorHelper(m(n));try{for(r.s();!(s=r.n()).done;)(()=>{var e=o,r=s.value;T[e(1360)](t,r)||r===i||u(t,r,{get:function(){return n[r]},enumerable:!(a=l(n,r))||a[e(1202)]})})()}catch(e){r.e(e)}finally{r.f()}}return t}function t(e,r,t){var n=X;return t=null!=e?f(y(e)):{},i(!r&&e&&e[n(543)]?t:u(t,n(1152),{value:e,enumerable:!0}),e)}var n,X=_0x3d6c,f=Object[X(1675)],u=Object[X(952)],l=Object[X(441)],m=Object.getOwnPropertyNames,y=Object[X(707)],T=Object[X(1809)].hasOwnProperty,k=r(function(e){_inherits(i,_wrapNativeSuper(Error));var r=_createClass(i),t=(_inherits(n,r),_createClass(n));function n(e){var r=_0x3d6c;return _classCallCheck(this,n),e=_callSuper(this,n,[1,"commander.invalidArgument",e]),Error[r(1115)](_assertThisInitialized(e),e[r(635)]),e[r(741)]=e[r(635)][r(741)],e}function i(e,r,t){var n=_0x3d6c;return _classCallCheck(this,i),t=_callSuper(this,i,[t]),Error[n(1115)](_assertThisInitialized(t),t[n(635)]),t.name=t[n(635)][n(741)],t[n(1072)]=r,t[n(1355)]=e,t[n(723)]=void 0,t}e.CommanderError=r,e.InvalidArgumentError=t}),x=r(function(e){var a,n=X,o=k()[n(2039)],r=_createClass(function e(r,t){var n=_0x3d6c;switch(_classCallCheck(this,e),this.description=t||"",this[n(1553)]=!1,this[n(690)]=void 0,this[n(734)]=void 0,this.defaultValueDescription=void 0,this[n(1359)]=void 0,r[0]){case"<":this[n(966)]=!0,this[n(913)]=r[n(1366)](1,-1);break;case"[":this.required=!1,this._name=r[n(1366)](1,-1);break;default:this[n(966)]=!0,this[n(913)]=r}3<this[n(913)][n(847)]&&this[n(913)][n(1366)](-3)===n(1819)&&(this[n(1553)]=!0,this[n(913)]=this[n(913)][n(1366)](0,-3))},[{key:(a=n)(741),value:function(){return this[a(913)]}},{key:"_concatValue",value:function(e,r){var t=a;return r!==this.defaultValue&&Array.isArray(r)?r[t(1890)](e):[e]}},{key:"default",value:function(e,r){var t=a;return this[t(734)]=e,this[t(2110)]=r,this}},{key:a(1600),value:function(e){return this[a(690)]=e,this}},{key:"choices",value:function(e){var n=a,i=this;return this[n(1359)]=e[n(1366)](),this.parseArg=function(e,r){var t=n;if(i[t(1359)][t(987)](e))return i[t(1553)]?i[t(1334)](e,r):e;throw new o(t(1519).concat(i.argChoices[t(1524)](", "),"."))},this}},{key:"argRequired",value:function(){return this[a(966)]=!0,this}},{key:a(1077),value:function(){return this[a(966)]=!1,this}}]);e[n(2004)]=r,e[n(2006)]=function(e){var r=n,t=e.name()+(!0===e.variadic?"...":"");return e[r(966)]?"<"+t+">":"["+t+"]"}}),C=r(function(e){var c,r=X,n=x()[r(2006)],t=_createClass(function e(){var r=_0x3d6c;_classCallCheck(this,e),this.helpWidth=void 0,this.sortSubcommands=!1,this[r(1802)]=!1},[{key:"visibleCommands",value:function(e){var r,t,n=_0x3d6c,i=e[n(311)][n(924)](function(e){return!e[n(428)]});return e[n(1083)]()&&(t=(r=_slicedToArray(e[n(1634)].match(/([^ ]+) *(.*)/),3))[1],r=r[2],(t=e[n(1896)](t).helpOption(!1))[n(1102)](e[n(853)]),r&&t[n(1039)](r),i[n(1922)](t)),this[n(2021)]&&i[n(1764)](function(e,r){var t=n;return e[t(741)]()[t(1900)](r[t(741)]())}),i}},{key:(c=r)(1157),value:function(e){var n,i=c,r=e[i(346)].filter(function(e){return!e.hidden}),t=e[i(1528)]&&e[i(1095)]&&!e._findOption(e._helpShortFlag),a=e[i(1528)]&&!e[i(422)](e[i(400)]);return(t||a)&&(t=t?a?e.createOption(e._helpFlags,e[i(667)]):e[i(2066)](e[i(1095)],e[i(667)]):e[i(2066)](e._helpLongFlag,e[i(667)]),r.push(t)),this[i(1802)]&&(n=function(e){var r=i;return e.short?e[r(1028)][r(488)](/^-/,""):e[r(1855)][r(488)](/^--/,"")},r[i(1764)](function(e,r){var t=i;return n(e)[t(1900)](n(r))})),r}},{key:c(1293),value:function(t){var n=c;return t._argsDescription&&t._args[n(1793)](function(e){var r=n;e[r(1102)]=e[r(1102)]||t._argsDescription[e[r(741)]()]||""}),t[n(332)].find(function(e){return e[n(1102)]})?t[n(332)]:[]}},{key:c(551),value:function(e){var r=c,t=e[r(332)][r(1399)](function(e){return n(e)})[r(1524)](" ");return e._name+(e[r(2107)][0]?"|"+e[r(2107)][0]:"")+(e.options[r(847)]?r(1687):"")+(t?" "+t:"")}},{key:c(470),value:function(e){return e[c(1386)]}},{key:"argumentTerm",value:function(e){return e[c(741)]()}},{key:"longestSubcommandTermLength",value:function(e,n){var i=c;return n[i(2060)](e).reduce(function(e,r){var t=i;return Math[t(851)](e,n[t(551)](r)[t(847)])},0)}},{key:"longestOptionTermLength",value:function(e,n){return n.visibleOptions(e).reduce(function(e,r){var t=_0x3d6c;return Math[t(851)](e,n[t(470)](r).length)},0)}},{key:c(1455),value:function(e,n){var i=c;return n[i(1293)](e)[i(1566)](function(e,r){var t=i;return Math[t(851)](e,n[t(495)](r).length)},0)}},{key:c(499),value:function(e){for(var r=c,t=e[r(913)],n=(e[r(2107)][0]&&(t=t+"|"+e[r(2107)][0]),""),i=e[r(2105)];i;i=i[r(2105)])n=i[r(741)]()+" "+n;return n+t+" "+e[r(1980)]()}},{key:c(1714),value:function(e){return e[c(1102)]()}},{key:c(533),value:function(e){var r=c;return e.summary()||e[r(1102)]()}},{key:c(1704),value:function(e){var r=c,t=[];return e[r(1359)]&&t[r(1922)]("choices: ".concat(e[r(1359)][r(1399)](function(e){return JSON[r(715)](e)}).join(", "))),void 0!==e[r(734)]&&(e[r(966)]||e[r(513)]||e[r(407)]()&&"boolean"==typeof e[r(734)])&&t.push(r(704).concat(e[r(2110)]||JSON[r(715)](e.defaultValue))),void 0!==e[r(1090)]&&e[r(513)]&&t[r(1922)]("preset: ".concat(JSON[r(715)](e[r(1090)]))),void 0!==e[r(1487)]&&t[r(1922)](r(1570).concat(e[r(1487)])),0<t[r(847)]?""[r(1890)](e[r(1102)]," (")[r(1890)](t[r(1524)](", "),")"):e[r(1102)]}},{key:c(2116),value:function(e){var r=c,t=[];return e[r(1359)]&&t.push(r(1530).concat(e[r(1359)][r(1399)](function(e){return JSON[r(715)](e)})[r(1524)](", "))),void 0!==e[r(734)]&&t[r(1922)](r(704)[r(1890)](e.defaultValueDescription||JSON[r(715)](e[r(734)]))),0<t[r(847)]?(t="("[r(1890)](t[r(1524)](", "),")"),e[r(1102)]?""[r(1890)](e[r(1102)]," ")[r(1890)](t):t):e[r(1102)]}},{key:c(492),value:function(e,n){var i=c,a=n.padWidth(e,n),o=n[i(1364)]||80;function t(e,r){var t=i;return r?(r="".concat(e.padEnd(a+2))[t(1890)](r),n[t(941)](r,o-2,a+2)):e}function r(e){var r=i;return e[r(1524)]("\n")[r(488)](/^/gm," ".repeat(2))}var s=[i(901)[i(1890)](n.commandUsage(e)),""],u=n.commandDescription(e),u=(0<u[i(847)]&&(s=s[i(1890)]([u,""])),n[i(1293)](e).map(function(e){var r=i;return t(n.argumentTerm(e),n[r(2116)](e))})),u=(0<u[i(847)]&&(s=s[i(1890)]([i(836),r(u),""])),n.visibleOptions(e).map(function(e){var r=i;return t(n.optionTerm(e),n[r(1704)](e))})),u=(0<u.length&&(s=s.concat(["Options:",r(u),""])),n[i(2060)](e).map(function(e){var r=i;return t(n[r(551)](e),n[r(533)](e))}));return(s=0<u[i(847)]?s.concat([i(1657),r(u),""]):s)[i(1524)]("\n")}},{key:c(1513),value:function(e,r){var t=c;return Math[t(851)](r[t(893)](e,r),r.longestSubcommandTermLength(e,r),r[t(1455)](e,r))}},{key:c(941),value:function(e,r,t){var n,i=c,a=3<arguments[i(847)]&&void 0!==arguments[3]?arguments[3]:40;return e[i(839)](/[\n]\s+/)||(r=r-t)<a?e:(a=e[i(1366)](0,t),e=e[i(1366)](t),n=" "[i(1419)](t),t=new RegExp(".{1,"+(r-1)+i(1603),"g"),a+(e[i(839)](t)||[])[i(1399)](function(e,r){var t=i;return"\n"===e.slice(-1)&&(e=e[t(1366)](0,e[t(847)]-1)),(0<r?n:"")+e.trimRight()}).join("\n"))}}]);e[r(700)]=t}),E=r(function(e){var i,a,o=X,s=k()[o(2039)],r=_createClass(function e(r,t){var n=_0x3d6c,t=(_classCallCheck(this,e),this[n(1386)]=r,this[n(1102)]=t||"",this.required=r.includes("<"),this.optional=r[n(987)]("["),this[n(1553)]=/\w\.\.\.[>\]]$/[n(806)](r),this.mandatory=!1,u(r));this[n(1028)]=t[n(617)],this[n(1855)]=t[n(1392)],this.negate=!1,this[n(1855)]&&(this[n(2028)]=this.long[n(1427)]("--no-")),this[n(734)]=void 0,this[n(2110)]=void 0,this.presetArg=void 0,this.envVar=void 0,this[n(690)]=void 0,this[n(1719)]=!1,this.argChoices=void 0,this[n(2088)]=[],this.implied=void 0},[{key:(a=o)(1152),value:function(e,r){return this[a(734)]=e,this.defaultValueDescription=r,this}},{key:a(864),value:function(e){return this[a(1090)]=e,this}},{key:a(354),value:function(e){var r=a;return this[r(2088)]=this[r(2088)][r(1890)](e),this}},{key:"implies",value:function(e){var r=a;return this[r(1478)]=Object[r(1465)](this[r(1478)]||{},e),this}},{key:a(912),value:function(e){return this[a(1487)]=e,this}},{key:"argParser",value:function(e){return this.parseArg=e,this}},{key:a(1617),value:function(){var e=a,r=!(0<arguments[e(847)]&&void 0!==arguments[0])||arguments[0];return this[e(1504)]=!!r,this}},{key:"hideHelp",value:function(){return this.hidden=!!(!(0<arguments.length&&void 0!==arguments[0])||arguments[0]),this}},{key:a(1334),value:function(e,r){var t=a;return r!==this.defaultValue&&Array[t(1063)](r)?r[t(1890)](e):[e]}},{key:"choices",value:function(e){var n=a,i=this;return this[n(1359)]=e[n(1366)](),this.parseArg=function(e,r){var t=n;if(i[t(1359)][t(987)](e))return i[t(1553)]?i[t(1334)](e,r):e;throw new s("Allowed choices are ".concat(i[t(1359)].join(", "),"."))},this}},{key:a(741),value:function(){var e=a;return this.long?this.long[e(488)](/^--/,""):this[e(1028)][e(488)](/^-/,"")}},{key:a(1905),value:function(){var n,e=a;return e=this[e(741)]()[e(488)](/^no-/,""),n=o,e.split("-")[n(1566)](function(e,r){var t=n;return e+r[0][t(1270)]()+r.slice(1)})}},{key:"is",value:function(e){var r=a;return this[r(1028)]===e||this[r(1855)]===e}},{key:a(407),value:function(){var e=a;return!this[e(966)]&&!this.optional&&!this[e(2028)]}}]),t=_createClass(function e(r){var n=_0x3d6c,i=this;_classCallCheck(this,e),this.positiveOptions=new Map,this.negativeOptions=new Map,this[n(1297)]=new Set,r[n(1793)](function(e){var r=n;e.negate?i.negativeOptions[r(1033)](e[r(1905)](),e):i.positiveOptions.set(e[r(1905)](),e)}),this[n(2013)][n(1793)](function(e,r){var t=n;i[t(2094)][t(1885)](r)&&i.dualOptions[t(1883)](r)})},[{key:(i=o)(1903),value:function(e,r){var t=i,n=r[t(1905)]();return!this.dualOptions[t(1885)](n)||(t=this[t(2013)].get(n).presetArg,r.negate===((void 0!==t&&t)===e))}}]);function u(e){var r,t=o,e=e[t(1936)](/[ |,]+/);return 1<e.length&&!/^[[<]/.test(e[1])&&(r=e.shift()),e=e[t(769)](),!r&&/^-[^-]$/[t(806)](e)&&(r=e,e=void 0),{shortFlag:r,longFlag:e}}e[o(1927)]=r,e[o(1388)]=u,e[o(990)]=t}),B=r(function(e){e[X(1942)]=function(i,e){var a=_0x3d6c;if(!e||0===e[a(847)])return"";e=Array[a(1790)](new Set(e));var r=i[a(1427)]("--"),o=(r&&(i=i[a(1366)](2),e=e.map(function(e){return e[a(1366)](2)})),[]),s=3;return e[a(1793)](function(e){var r,t,n=a;e[n(847)]<=1||(r=((e,r)=>{var t=_0x3d6c;if(3<Math[t(2032)](e[t(847)]-r[t(847)]))return Math[t(851)](e.length,r.length);for(var n=[],i=0;i<=e.length;i++)n[i]=[i];for(var a=0;a<=r[t(847)];a++)n[0][a]=a;for(var o=1;o<=r[t(847)];o++)for(var s=1;s<=e[t(847)];s++){var u=1,u=e[s-1]===r[o-1]?0:1;n[s][o]=Math[t(1881)](n[s-1][o]+1,n[s][o-1]+1,n[s-1][o-1]+u),1<s&&1<o&&e[s-1]===r[o-2]&&e[s-2]===r[o-1]&&(n[s][o]=Math[t(1881)](n[s][o],n[s-2][o-2]+1))}return n[e[t(847)]][r.length]})(i,e),.4<((t=Math[n(851)](i[n(847)],e[n(847)]))-r)/t&&(r<s?(s=r,o=[e]):r===s&&o[n(1922)](e)))}),o[a(1764)](function(e,r){return e[a(1900)](r)}),1<(o=r?o.map(function(e){return"--".concat(e)}):o)[a(847)]?a(1877)[a(1890)](o[a(1524)](", "),"?)"):1===o[a(847)]?a(932).concat(o[0],"?)"):""}}),H=r(function(e){var t,d,i=X,r=require(i(1404))[i(1442)],h=require(i(588)),l=require("path"),v=require("fs"),p=require(i(1658)),n=x(),a=n[i(2004)],o=n[i(2006)],_=k()[i(461)],s=C()[i(700)],n=E(),u=n[i(1927)],c=n.splitOptionFlags,f=n.DualOptions,g=B()[i(1942)],n=(d=i,_inherits(m,r),_createClass(m,[{key:d(739),value:function(e){var r=d;return this._outputConfiguration=e[r(779)],this[r(1528)]=e._hasHelpOption,this[r(1149)]=e[r(1149)],this[r(667)]=e._helpDescription,this[r(1095)]=e[r(1095)],this[r(400)]=e[r(400)],this._helpCommandName=e[r(1748)],this[r(1634)]=e[r(1634)],this[r(853)]=e[r(853)],this._helpConfiguration=e[r(1415)],this[r(1961)]=e._exitCallback,this._storeOptionsAsProperties=e[r(1826)],this[r(1391)]=e[r(1391)],this[r(919)]=e[r(919)],this._enablePositionalOptions=e._enablePositionalOptions,this[r(991)]=e._showHelpAfterError,this[r(1027)]=e[r(1027)],this}},{key:d(1702),value:function(e,r,t){var n=d,t=(_typeof(r)==n(1361)&&null!==r&&(t=r,r=null),t||{}),e=_slicedToArray(e[n(839)](/([^ ]+) *(.*)/),3),i=e[1],e=e[2],i=this[n(1896)](i);return r&&(i.description(r),i[n(1040)]=!0),t[n(1614)]&&(this._defaultCommandName=i[n(913)]),i[n(428)]=!(!t.noHelp&&!t[n(1719)]),i[n(830)]=t[n(747)]||null,e&&i[n(1039)](e),this[n(311)][n(1922)](i),i[n(2105)]=this,i[n(739)](this),r?this:i}},{key:d(1896),value:function(e){return new m(e)}},{key:d(745),value:function(){var e=d;return Object[e(1465)](new s,this[e(676)]())}},{key:d(676),value:function(e){var r=d;return void 0===e?this[r(1415)]:(this[r(1415)]=e,this)}},{key:"configureOutput",value:function(e){var r=d;return void 0===e?this[r(779)]:(Object.assign(this[r(779)],e),this)}},{key:d(565),value:function(){var e=d,r=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];return typeof r!=e(2076)&&(r=!!r),this[e(991)]=r,this}},{key:"showSuggestionAfterError",value:function(){var e=d,r=!(0<arguments[e(847)]&&void 0!==arguments[0])||arguments[0];return this[e(1027)]=!!r,this}},{key:d(627),value:function(e,r){var t=d;if(e._name)return(r=r||{})[t(1614)]&&(this._defaultCommandName=e[t(913)]),(r[t(2002)]||r[t(1719)])&&(e[t(428)]=!0),this.commands[t(1922)](e),e.parent=this;throw new Error(t(2138))}},{key:d(420),value:function(e,r){return new a(e,r)}},{key:d(1189),value:function(e,r,t,n){var i=d,e=this.createArgument(e,r);return"function"==typeof t?e[i(1152)](n)[i(1600)](t):e.default(t),this[i(604)](e),this}},{key:d(1039),value:function(e){var r=d,t=this;return e[r(1936)](/ +/)[r(1793)](function(e){t[r(1189)](e)}),this}},{key:d(604),value:function(e){var r=d,t=this[r(332)][r(1366)](-1)[0];if(t&&t[r(1553)])throw new Error(r(1918)[r(1890)](t[r(741)](),"'"));if(e[r(966)]&&void 0!==e[r(734)]&&void 0===e[r(690)])throw new Error(r(1615).concat(e[r(741)](),"'"));return this._args[r(1922)](e),this}},{key:d(2139),value:function(e,r){var t=d;return!1===e?this._addImplicitHelpCommand=!1:(this[t(856)]=!0,typeof e==t(2076)&&(this[t(1748)]=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=r||this[t(853)]),this}},{key:d(1083),value:function(){var e=d;return void 0===this[e(856)]?this[e(311)][e(847)]&&!this[e(1650)]&&!this[e(910)]("help"):this._addImplicitHelpCommand}},{key:d(1123),value:function(e,r){var t=d,n=[t(1017),t(328),t(2072)];if(n[t(987)](e))return this[t(1211)][e]?this[t(1211)][e][t(1922)](r):this[t(1211)][e]=[r],this;throw new Error("Unexpected value for event passed to hook : '"[t(1890)](e,t(1450))[t(1890)](n[t(1524)](t(611)),"'"))}},{key:d(1838),value:function(e){return this._exitCallback=e||function(e){var r=_0x3d6c;if(e[r(1072)]!==r(323))throw e},this}},{key:d(1032),value:function(e,r,t){var n=d;this[n(1961)]&&this[n(1961)](new _(e,r,t)),p[n(775)](e)}},{key:d(1784),value:function(n){var i=this;return this[d(1650)]=function(e){var r=_0x3d6c,t=i[r(332)][r(847)],e=e[r(1366)](0,t);return i[r(1826)]?e[t]=i:e[t]=i[r(1755)](),e.push(i),n[r(475)](i,e)},this}},{key:d(2066),value:function(e,r){return new u(e,r)}},{key:d(1878),value:function(a){function t(e,r,t){var n=o,i=(null==e&&void 0!==a[n(1090)]&&(e=a.presetArg),s[n(355)](u));if(null!==e&&a.parseArg)try{e=a[n(690)](e,i)}catch(e){throw e[n(1072)]===n(1119)&&(r=""[n(1890)](r," ")[n(1890)](e[n(1874)]),s[n(678)](r,{exitCode:e[n(1355)],code:e.code})),e}else null!==e&&a[n(1553)]&&(e=a._concatValue(e,i));null==e&&(e=!a.negate&&(!(!a.isBoolean()&&!a[n(513)])||"")),s.setOptionValueWithSource(u,e,t)}var e,o=d,s=this,r=a[o(741)](),u=a.attributeName();a[o(2028)]?(e=a[o(1855)].replace(/^--no-/,"--"),this._findOption(e)||this[o(305)](u,void 0===a.defaultValue||a[o(734)],o(1152))):void 0!==a[o(734)]&&this.setOptionValueWithSource(u,a[o(734)],o(1152)),this[o(346)].push(a);return this.on(o(583)+r,function(e){var r=o,r=r(1447)[r(1890)](a[r(1386)],r(1235))[r(1890)](e,r(939));t(e,r,"cli")}),a.envVar&&this.on("optionEnv:"+r,function(e){var r=o,r="error: option '"[r(1890)](a[r(1386)],r(1921)).concat(e,r(1958)).concat(a[r(1487)],r(939));t(e,r,"env")}),this}},{key:"_optionEx",value:function(e,r,t,n,i){var a=d;if(_typeof(r)==a(1361)&&r instanceof u)throw new Error(a(387));var o,r=this[a(2066)](r,t);return r[a(1617)](!!e[a(1504)]),typeof n==a(2082)?r[a(1152)](i).argParser(n):n instanceof RegExp?(o=n,n=function(e,r){e=o[a(2033)](e);return e?e[0]:r},r[a(1152)](i)[a(1600)](n)):r[a(1152)](n),this.addOption(r)}},{key:d(1540),value:function(e,r,t,n){return this[d(1959)]({},e,r,t,n)}},{key:d(1091),value:function(e,r,t,n){return this[d(1959)]({mandatory:!0},e,r,t,n)}},{key:"combineFlagAndOptionalValue",value:function(){var e=d,r=!(0<arguments[e(847)]&&void 0!==arguments[0])||arguments[0];return this[e(1391)]=!!r,this}},{key:d(768),value:function(){var e=d,r=!(0<arguments[e(847)]&&void 0!==arguments[0])||arguments[0];return this[e(1056)]=!!r,this}},{key:d(1812),value:function(){var e=d,r=!(0<arguments[e(847)]&&void 0!==arguments[0])||arguments[0];return this[e(919)]=!!r,this}},{key:d(671),value:function(){var e=d,r=!(0<arguments[e(847)]&&void 0!==arguments[0])||arguments[0];return this[e(960)]=!!r,this}},{key:"passThroughOptions",value:function(){var e=d,r=!(0<arguments[e(847)]&&void 0!==arguments[0])||arguments[0];if(this._passThroughOptions=!!r,this[e(2105)]&&r&&!this[e(2105)][e(960)])throw new Error(e(1010));return this}},{key:d(957),value:function(){var e=d,r=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];if(this[e(1826)]=!!r,this[e(346)][e(847)])throw new Error(e(1408));return this}},{key:d(355),value:function(e){var r=d;return(this[r(1826)]?this:this[r(449)])[e]}},{key:d(1978),value:function(e,r){var t=d;return this._storeOptionsAsProperties?this[e]=r:this[t(449)][e]=r,this}},{key:"setOptionValueWithSource",value:function(e,r,t){var n=d;return this[n(1978)](e,r),this[n(1989)][e]=t,this}},{key:d(1318),value:function(e){return this._optionValueSources[e]}},{key:d(1409),value:function(e,r){var t,n=d;if(void 0!==e&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");switch(r=r||{},void 0===e&&(e=p[n(2140)],p[n(1505)])&&p[n(1505)][n(1484)]&&(r[n(1790)]="electron"),this[n(892)]=e.slice(),r[n(1790)]){case void 0:case n(1849):this[n(1014)]=e[1],t=e[n(1366)](2);break;case n(1484):t=p[n(2074)]?(this[n(1014)]=e[1],e.slice(2)):e[n(1366)](1);break;case n(304):t=e[n(1366)](0);break;default:throw new Error(n(1269)[n(1890)](r[n(1790)],"' }"))}return!this[n(913)]&&this._scriptPath&&this[n(1623)](this[n(1014)]),this._name=this._name||n(1242),t}},{key:d(763),value:function(e,r){var t=d,e=this[t(1409)](e,r);return this[t(951)]([],e),this}},{key:d(1064),value:(t=_asyncToGenerator(_regenerator().m(function e(t,n){var i;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return i=this[r(1409)](t,n),e.n=1,this[r(951)]([],i);case 1:return e.a(2,this)}},e,this)})),function(e,r){return t[_0x3d6c(475)](this,arguments)})},{key:d(868),value:function(n,e){var i=d,a=(e=e[i(1366)](),[i(693),i(1002),i(1180),i(343),i(791)]);function r(e,r){var t=i,n=l.resolve(e,r);return v.existsSync(n)?n:!a[t(987)](l[t(1705)](r))&&(e=a.find(function(e){var r=t;return v.existsSync("".concat(n)[r(1890)](e))}))?"".concat(n)[t(1890)](e):void 0}this[i(1672)](),this[i(1572)]();var t,o,s,u=n[i(830)]||""[i(1890)](this._name,"-").concat(n._name),c=this[i(1479)]||"";if(this[i(1014)]){try{t=v[i(1529)](this._scriptPath)}catch(e){t=this[i(1014)]}c=l[i(1515)](l.dirname(t),c)}c&&((t=r(c,u))||n[i(830)]||!this[i(1014)]||(o=l.basename(this._scriptPath,l[i(1705)](this[i(1014)])))!==this._name&&(t=r(c,""[i(1890)](o,"-")[i(1890)](n[i(913)]))),u=t||u),o=a[i(987)](l.extname(u)),(s=p[i(1821)]!==i(1390)?o?(e[i(685)](u),e=b(p.execArgv)[i(1890)](e),h[i(2052)](p[i(2140)][0],e,{stdio:"inherit"})):h[i(2052)](u,e,{stdio:i(679)}):(e[i(685)](u),e=b(p.execArgv)[i(1890)](e),h[i(2052)](p[i(1810)],e,{stdio:i(679)})))[i(827)]||[i(1490),i(1508),i(757),i(2062),i(1888)].forEach(function(r){p.on(r,function(){var e=_0x3d6c;!1===s[e(827)]&&null===s[e(1355)]&&s.kill(r)})});var f=this[i(1961)];f?s.on(i(1858),function(){var e=i;f(new _(p.exitCode||0,"commander.executeSubCommandAsync",e(803)))}):s.on(i(1858),p[i(775)][i(1733)](p)),s.on(i(678),function(e){var r,t=i;if("ENOENT"===e.code)throw r=c?t(490)[t(1890)](c,"'"):"no directory for search for local subcommand, use .executableDir() to supply a custom directory",r="'".concat(u,t(506))[t(1890)](n[t(913)],"' 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 - ")[t(1890)](r),new Error(r);if(e[t(1072)]===t(876))throw new Error("'".concat(u,t(505)));f?((r=new _(1,"commander.executeSubCommandAsync",t(1651))).nestedError=e,f(r)):p[t(775)](1)}),this[i(1977)]=s}},{key:d(409),value:function(e,r,t){var n=d,i=this,a=this[n(910)](e);return a||this[n(1760)]({error:!0}),e=this[n(1263)](void 0,a,"preSubcommand"),this[n(2050)](e,function(){var e=n;if(!a[e(1040)])return a[e(951)](r,t);i[e(868)](a,r[e(1890)](t))})}},{key:d(1066),value:function(){var n=d,i=this;this._args[n(1793)](function(e,r){var t=n;e.required&&null==i[t(1198)][r]&&i.missingArgument(e[t(741)]())}),!(0<this._args[n(847)]&&this._args[this[n(332)].length-1][n(1553)])&&this.args[n(847)]>this[n(332)].length&&this[n(503)](this[n(1198)])}},{key:d(1964),value:function(){function i(r,t,n){var i=_0x3d6c,e=t;if(null!==t&&r[i(690)])try{e=r[i(690)](t,n)}catch(e){throw e.code===i(1119)&&(n=i(664)[i(1890)](t,"' is invalid for argument '")[i(1890)](r[i(741)](),i(1537))[i(1890)](e[i(1874)]),o[i(678)](n,{exitCode:e[i(1355)],code:e[i(1072)]})),e}return e}var a=d,o=this,s=(this[a(1066)](),[]);this[a(332)][a(1793)](function(t,e){var r=a,n=t[r(734)];t[r(1553)]?e<o[r(1198)].length?(n=o[r(1198)].slice(e),t[r(690)]&&(n=n[r(1566)](function(e,r){return i(t,r,e)},t[r(734)]))):void 0===n&&(n=[]):e<o[r(1198)].length&&(n=o[r(1198)][e],t[r(690)])&&(n=i(t,n,t[r(734)])),s[e]=n}),this[a(2026)]=s}},{key:d(2050),value:function(e,r){var t=d;return e&&e[t(542)]&&typeof e[t(542)]==t(2082)?e[t(542)](function(){return r()}):r()}},{key:d(1971),value:function(e,t){var n=d,r=this,i=e,a=[];return w(this)[n(1109)]()[n(924)](function(e){return void 0!==e[n(1211)][t]})[n(1793)](function(r){var e=n;r[e(1211)][t][e(1793)](function(e){a.push({hookedCommand:r,callback:e})})}),t===n(2072)&&a.reverse(),a.forEach(function(e){i=r._chainOrCall(i,function(){return e[_0x3d6c(1951)](e.hookedCommand,r)})}),i}},{key:"_chainOrCallSubCommandHook",value:function(e,r,t){var n=d,i=this,a=e;return void 0!==this[n(1211)][t]&&this[n(1211)][t][n(1793)](function(e){a=i[n(2050)](a,function(){return e(i,r)})}),a}},{key:"_parseCommand",value:function(e,r){var t=d,n=this,i=this.parseOptions(r);if(this[t(443)](),this[t(1001)](),e=e[t(1890)](i[t(538)]),r=i[t(2056)],this[t(1198)]=e.concat(r),e&&this[t(910)](e[0]))return this._dispatchSubcommand(e[0],e[t(1366)](1),r);if(this[t(1083)]()&&e[0]===this[t(1748)])return 1===e[t(847)]&&this[t(1760)](),this[t(409)](e[1],[],[this._helpLongFlag]);if(this[t(689)])return y(this,r),this._dispatchSubcommand(this[t(689)],e,r);!this.commands[t(847)]||0!==this.args[t(847)]||this._actionHandler||this._defaultCommandName||this.help({error:!0}),y(this,i.unknown),this[t(1672)](),this._checkForConflictingOptions();function a(){var e=t;0<i.unknown.length&&n[e(474)](i[e(2056)][0])}var o,s=t(1272).concat(this[t(741)]());if(this._actionHandler)return a(),this[t(1964)](),o=this._chainOrCallHooks(o,t(328)),o=this[t(2050)](o,function(){var e=t;return n[e(1650)](n[e(2026)])}),this[t(2105)]&&(o=this[t(2050)](o,function(){n[t(2105)].emit(s,e,r)})),o=this[t(1971)](o,t(2072));if(this[t(2105)]&&this[t(2105)][t(1830)](s))a(),this[t(1964)](),this[t(2105)][t(2036)](s,e,r);else if(e[t(847)]){if(this[t(910)]("*"))return this[t(409)]("*",e,r);this.listenerCount("command:*")?this[t(2036)]("command:*",e,r):this[t(311)][t(847)]?this[t(1842)]():(a(),this._processArguments())}else this[t(311)][t(847)]?(a(),this[t(1760)]({error:!0})):(a(),this[t(1964)]())}},{key:"_findCommand",value:function(t){var n=d;if(t)return this[n(311)][n(698)](function(e){var r=n;return e[r(913)]===t||e[r(2107)][r(987)](t)})}},{key:"_findOption",value:function(r){var e=d;return this[e(346)][e(698)](function(e){return e.is(r)})}},{key:"_checkForMissingMandatoryOptions",value:function(){for(var e=d,r=this;r;r=r[e(2105)])(t=>{var n=_0x3d6c;t[n(346)][n(1793)](function(e){var r=n;e[r(1504)]&&void 0===t[r(355)](e[r(1905)]())&&t[r(825)](e)})})(r)}},{key:"_checkForConflictingLocalOptions",value:function(){var n=d,i=this,a=this.options.filter(function(e){var r=_0x3d6c,e=e[r(1905)]();return void 0!==i[r(355)](e)&&i[r(1318)](e)!==r(1152)});a[n(924)](function(e){var r=n;return 0<e[r(2088)][r(847)]})[n(1793)](function(t){var e=n,r=a.find(function(e){var r=_0x3d6c;return t[r(2088)][r(987)](e[r(1905)]())});r&&i[e(1454)](t,r)})}},{key:d(1572),value:function(){for(var e=d,r=this;r;r=r.parent)r[e(1785)]()}},{key:d(634),value:function(e){var r=d,t=[],n=[],i=t,a=e.slice();function o(e){return 1<e[_0x3d6c(847)]&&"-"===e[0]}for(var s=null;a[r(847)];){var u=a[r(769)]();if("--"===u){i===n&&i[r(1922)](u),(f=i).push[r(475)](f,_toConsumableArray(a));break}if(s&&!o(u))this.emit("option:"[r(1890)](s[r(741)]()),u);else{if(s=null,o(u)){var c,f=this[r(422)](u);if(f){f.required?(void 0===(c=a[r(769)]())&&this[r(1752)](f),this[r(2036)]("option:"[r(1890)](f[r(741)]()),c)):f[r(513)]?(c=null,0<a[r(847)]&&!o(a[0])&&(c=a.shift()),this[r(2036)](r(583)[r(1890)](f[r(741)]()),c)):this[r(2036)](r(583).concat(f[r(741)]())),s=f[r(1553)]?f:null;continue}}if(2<u[r(847)]&&"-"===u[0]&&"-"!==u[1]){var h=this._findOption("-".concat(u[1]));if(h){h[r(966)]||h[r(513)]&&this[r(1391)]?this[r(2036)](r(583)[r(1890)](h[r(741)]()),u[r(1366)](2)):(this[r(2036)](r(583)[r(1890)](h[r(741)]())),a[r(685)]("-"[r(1890)](u[r(1366)](2))));continue}}if(/^--[^=]+=/[r(806)](u)){var h=u[r(726)]("="),l=this[r(422)](u[r(1366)](0,h));if(l&&(l.required||l[r(513)])){this[r(2036)]("option:".concat(l[r(741)]()),u.slice(h+1));continue}}if(o(u)&&(i=n),(this[r(960)]||this._passThroughOptions)&&0===t[r(847)]&&0===n[r(847)]){if(this[r(910)](u)){t[r(1922)](u),0<a[r(847)]&&n[r(1922)][r(475)](n,_toConsumableArray(a));break}if(u===this[r(1748)]&&this._hasImplicitHelpCommand()){t.push(u),0<a[r(847)]&&t.push[r(475)](t,_toConsumableArray(a));break}if(this[r(689)]){n[r(1922)](u),0<a.length&&n[r(1922)].apply(n,_toConsumableArray(a));break}}if(this._passThroughOptions){i[r(1922)](u),0<a[r(847)]&&(l=i)[r(1922)][r(475)](l,_toConsumableArray(a));break}i[r(1922)](u)}}return{operands:t,unknown:n}}},{key:"opts",value:function(){var e=d;if(this._storeOptionsAsProperties){for(var r={},t=this[e(346)].length,n=0;n<t;n++){var i=this[e(346)][n].attributeName();r[i]=i===this._versionOptionName?this._version:this[i]}return r}return this[e(449)]}},{key:d(1624),value:function(){var n=d;return w(this)[n(1566)](function(e,r){var t=n;return Object[t(1465)](e,r[t(1755)]())},{})}},{key:"error",value:function(e,r){var t=d,r=(this[t(779)][t(1864)](""[t(1890)](e,"\n"),this._outputConfiguration.writeErr),typeof this[t(991)]==t(2076)?this[t(779)][t(669)](""[t(1890)](this._showHelpAfterError,"\n")):this._showHelpAfterError&&(this[t(779)][t(669)]("\n"),this[t(2084)]({error:!0})),r||{}),n=r.exitCode||1,r=r[t(1072)]||t(1928);this[t(1032)](n,r,e)}},{key:"_parseOptionsEnv",value:function(){var n=this;this.options.forEach(function(e){var r,t=_0x3d6c;e[t(1487)]&&e.envVar in p[t(912)]&&(r=e.attributeName(),void 0!==n[t(355)](r)&&![t(1152),t(1085),t(912)][t(987)](n[t(1318)](r))||(e[t(966)]||e[t(513)]?n[t(2036)](t(651)[t(1890)](e[t(741)]()),p[t(912)][e[t(1487)]]):n[t(2036)](t(651)[t(1890)](e.name()))))})}},{key:d(1001),value:function(){function i(e){var r=_0x3d6c;return void 0!==o[r(355)](e)&&![r(1152),"implied"][r(987)](o.getOptionValueSource(e))}var a=d,o=this,t=new f(this.options);this[a(346)][a(924)](function(e){var r=a;return void 0!==e[r(1478)]&&i(e[r(1905)]())&&t[r(1903)](o[r(355)](e[r(1905)]()),e)})[a(1793)](function(t){var n=a;Object.keys(t[n(1478)]).filter(function(e){return!i(e)}).forEach(function(e){var r=n;o.setOptionValueWithSource(e,t[r(1478)][e],r(1478))})})}},{key:d(915),value:function(e){var r=d,e=r(1781)[r(1890)](e,"'");this[r(678)](e,{code:r(2146)})}},{key:d(1752),value:function(e){var r=d,e=r(1447)[r(1890)](e.flags,r(1131));this[r(678)](e,{code:"commander.optionMissingArgument"})}},{key:"missingMandatoryOptionValue",value:function(e){var r=d,e=r(1770)[r(1890)](e[r(1386)],r(637));this[r(678)](e,{code:"commander.missingMandatoryOptionValue"})}},{key:"_conflictingOption",value:function(e,r){function t(e){var r=_0x3d6c,t=(e=i(e)).attributeName();return o[r(1318)](t)===r(912)?"environment variable '".concat(e[r(1487)],"'"):"option '".concat(e[r(1386)],"'")}var n=d,o=this,i=function(e){var t=_0x3d6c,n=e.attributeName(),r=o[t(355)](n),i=o[t(346)][t(698)](function(e){var r=t;return e[r(2028)]&&n===e[r(1905)]()}),a=o.options[t(698)](function(e){var r=t;return!e.negate&&n===e[r(1905)]()});return i&&(void 0===i[t(1090)]&&!1===r||void 0!==i.presetArg&&r===i[t(1090)])?i:a||e},e=n(1486).concat(t(e),n(1452))[n(1890)](t(r));this.error(e,{code:n(1332)})}},{key:"unknownOption",value:function(e){var r=d;if(!this[r(1056)]){var t="";if(e[r(1427)]("--")&&this[r(1027)]){var n=[],i=this;do{var a=i[r(745)]()[r(1157)](i)[r(924)](function(e){return e[r(1855)]}).map(function(e){return e[r(1855)]}),n=n[r(1890)](a),i=i[r(2105)]}while(i&&!i[r(960)]);t=g(e,n)}e=r(478).concat(e,"'").concat(t);this[r(678)](e,{code:r(821)})}}},{key:"_excessArguments",value:function(e){var r,t,n=d;this[n(919)]||(r=1===(t=this[n(332)][n(847)])?"":"s",t=n(1190).concat(this[n(2105)]?n(2085)[n(1890)](this[n(741)](),"'"):"",n(2073))[n(1890)](t,n(1234))[n(1890)](r,n(1453)).concat(e.length,"."),this[n(678)](t,{code:n(1025)}))}},{key:d(1842),value:function(){var t,n=d,e=this[n(1198)][0],r="",e=(this[n(1027)]&&(t=[],this[n(745)]().visibleCommands(this)[n(1793)](function(e){var r=n;t[r(1922)](e.name()),e[r(720)]()&&t[r(1922)](e.alias())}),r=g(e,t)),"error: unknown command '".concat(e,"'")[n(1890)](r));this[n(678)](e,{code:n(1556)})}},{key:d(1533),value:function(r,e,t){var n=d,i=this;if(void 0===r)return this[n(840)];this._version=r,e=e||"-V, --version",t=t||n(1744);e=this.createOption(e,t);return this[n(610)]=e[n(1905)](),this[n(346)][n(1922)](e),this.on("option:"+e.name(),function(){var e=n;i[e(779)].writeOut("".concat(r,"\n")),i[e(1032)](0,"commander.version",r)}),this}},{key:d(1102),value:function(e,r){var t=d;return void 0===e&&void 0===r?this[t(1584)]:(this._description=e,r&&(this[t(1120)]=r),this)}},{key:"summary",value:function(e){return void 0===e?this[d(673)]:(this._summary=e,this)}},{key:d(720),value:function(e){var r=d;if(void 0===e)return this[r(2107)][0];var t=this;if(e===(t=0!==this[r(311)].length&&this.commands[this.commands[r(847)]-1][r(1040)]?this[r(311)][this[r(311)].length-1]:t)._name)throw new Error("Command alias can't be the same as its name");return t[r(2107)][r(1922)](e),this}},{key:d(845),value:function(e){var r=d,t=this;return void 0===e?this._aliases:(e[r(1793)](function(e){return t.alias(e)}),this)}},{key:"usage",value:function(e){var r,t=d;return void 0===e?this[t(1054)]?this[t(1054)]:(r=this[t(332)][t(1399)](function(e){return o(e)}),[][t(1890)](this[t(346)].length||this[t(1528)]?"[options]":[],this[t(311)][t(847)]?t(1884):[],this._args[t(847)]?r:[])[t(1524)](" ")):(this[t(1054)]=e,this)}},{key:d(741),value:function(e){var r=d;return void 0===e?this[r(913)]:(this[r(913)]=e,this)}},{key:d(1623),value:function(e){var r=d;return this[r(913)]=l[r(812)](e,l.extname(e)),this}},{key:d(2150),value:function(e){var r=d;return void 0===e?this[r(1479)]:(this[r(1479)]=e,this)}},{key:d(590),value:function(e){var r=d,t=this[r(745)]();return void 0===t.helpWidth&&(t[r(1364)]=e&&e[r(678)]?this._outputConfiguration[r(1914)]():this[r(779)][r(794)]()),t[r(492)](this,t)}},{key:d(1786),value:function(e){var t=d,n=this,r={error:!!(e=e||{}).error},i=r[t(678)]?function(e){var r=t;return n._outputConfiguration[r(669)](e)}:function(e){var r=t;return n._outputConfiguration[r(735)](e)};return r[t(1620)]=e[t(1620)]||i,r.command=this,r}},{key:"outputHelp",value:function(e){var r,t=d,n=("function"==typeof e&&(r=e,e=void 0),this[t(1786)](e)),e=(w(this)[t(1109)]()[t(1793)](function(e){return e[t(2036)]("beforeAllHelp",n)}),this[t(2036)](t(1813),n),this.helpInformation(n));if(r&&"string"!=typeof(e=r(e))&&!Buffer[t(2155)](e))throw new Error(t(1175));n.write(e),this[t(2036)](this._helpLongFlag),this[t(2036)](t(1779),n),w(this)[t(1793)](function(e){var r=t;return e[r(2036)](r(1199),n)})}},{key:d(1649),value:function(e,r){var t=d;return typeof e==t(1071)?this[t(1528)]=e:(this._helpFlags=e||this[t(1149)],this[t(667)]=r||this[t(667)],e=c(this[t(1149)]),this[t(1095)]=e[t(617)],this[t(400)]=e[t(1392)]),this}},{key:d(1760),value:function(e){var r=d,t=(this[r(2084)](e),p[r(1355)]||0);0===t&&e&&typeof e!=r(2082)&&e.error&&(t=1),this[r(1032)](t,r(1076),"(outputHelp)")}},{key:"addHelpText",value:function(e,n){var i=d,r=[i(1158),i(2061),i(1101),i(350)];if(r[i(987)](e))return e=""[i(1890)](e,"Help"),this.on(e,function(e){var r=i,t=typeof n==r(2082)?n({error:e.error,command:e[r(1702)]}):n;t&&e[r(1620)](""[r(1890)](t,"\n"))}),this;throw new Error(i(459)[i(1890)](r.join(i(611)),"'"))}}]));function m(e){var r,t=_0x3d6c;return _classCallCheck(this,m),(r=_callSuper(this,m))[t(311)]=[],r[t(346)]=[],r[t(2105)]=null,r[t(1056)]=!1,r[t(919)]=!0,r[t(332)]=[],r[t(1198)]=[],r.rawArgs=[],r.processedArgs=[],r[t(1014)]=null,r[t(913)]=e||"",r[t(449)]={},r[t(1989)]={},r[t(1826)]=!1,r[t(1650)]=null,r._executableHandler=!1,r[t(830)]=null,r._executableDir=null,r[t(689)]=null,r[t(1961)]=null,r[t(2107)]=[],r._combineFlagAndOptionalValue=!0,r[t(1584)]="",r[t(673)]="",r[t(1120)]=void 0,r[t(960)]=!1,r[t(773)]=!1,r._lifeCycleHooks={},r[t(991)]=!1,r[t(1027)]=!0,r[t(779)]={writeOut:function(e){var r=t;return p.stdout[r(1620)](e)},writeErr:function(e){var r=t;return p[r(575)][r(1620)](e)},getOutHelpWidth:function(){var e=t;return p[e(996)][e(569)]?p.stdout[e(336)]:void 0},getErrHelpWidth:function(){var e=t;return p[e(575)][e(569)]?p[e(575)][e(336)]:void 0},outputError:function(e,r){return r(e)}},r._hidden=!1,r[t(1528)]=!0,r[t(1149)]=t(381),r._helpDescription=t(484),r._helpShortFlag="-h",r[t(400)]=t(306),r[t(856)]=void 0,r[t(1748)]=t(1760),r[t(1634)]=t(555),r[t(853)]="display help for command",r._helpConfiguration={},r}function y(t,e){var n=i;t._hasHelpOption&&e[n(698)](function(e){var r=n;return e===t._helpLongFlag||e===t[r(1095)]})&&(t[n(2084)](),t[n(1032)](0,n(1016),n(2117)))}function b(e){var o=i;return e[o(1399)](function(e){var r,t,n,i,a=o;return e[a(1427)](a(548))&&(t=a(2099),n=a(1503),null!==(i=e[a(839)](/^(--inspect(-brk)?)$/))?r=i[1]:null!==(i=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))?(r=i[1],/^\d+$/.test(i[3])?n=i[3]:t=i[3]):null!==(i=e[a(839)](/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(r=i[1],t=i[3],n=i[4]),r)&&"0"!==n?""[a(1890)](r,"=")[a(1890)](t,":")[a(1890)](parseInt(n)+1):e})}function w(e){for(var r=i,t=[],n=e;n;n=n[r(2105)])t.push(n);return t}e[i(1469)]=n}),U=r(function(e,r){var t=X,n=x()[t(2004)],i=H()[t(1469)],a=k(),o=a[t(461)],a=a[t(2039)],s=C()[t(700)],u=E()[t(1927)];((e=r[t(1317)]=new i)[t(1242)]=e)[t(2004)]=n,e[t(1469)]=i,e[t(461)]=o,e.Help=s,e.InvalidArgumentError=a,e[t(933)]=a,e[t(1927)]=u}),P=r(function(e,r){var u=X;"u"<("undefined"==typeof process?"undefined":_typeof(process))||!process[u(1533)]||0===process.version.indexOf(u(1183))||0===process[u(1533)][u(726)](u(1626))&&0!==process.version[u(726)](u(624))?r[u(1317)]={nextTick:function(e,r,t,n){var i=u;if(typeof e!=i(2082))throw new TypeError(i(737));var a,o,s=arguments[i(847)];switch(s){case 0:case 1:return process.nextTick(e);case 2:return process.nextTick(function(){e.call(null,r)});case 3:return process[i(871)](function(){e.call(null,r,t)});case 4:return process[i(871)](function(){e[i(1360)](null,r,t,n)});default:for(a=new Array(s-1),o=0;o<a.length;)a[o++]=arguments[o];return process[i(871)](function(){e[i(475)](null,a)})}}}:r.exports=process}),M=r(function(e,r){var t=X,n={}[t(926)];r[t(1317)]=Array[t(1063)]||function(e){var r=t;return n[r(1360)](e)==r(2154)}}),F=r(function(e,r){var t=X;r[t(1317)]=require(t(456))}),I=r(function(e,r){var i=X,t=require(i(1261)),a=t.Buffer;function n(e,r){for(var t in e)r[t]=e[t]}function o(e,r,t){return a(e,r,t)}a[i(1790)]&&a[i(1448)]&&a.allocUnsafe&&a.allocUnsafeSlow?r.exports=t:(n(t,e),e[i(1852)]=o),n(a,o),o[i(1790)]=function(e,r,t){var n=i;if(typeof e==n(1653))throw new TypeError(n(897));return a(e,r,t)},o.alloc=function(e,r,t){var n=i;if(typeof e!=n(1653))throw new TypeError("Argument must be a number");e=a(e);return void 0!==r?typeof t==n(2076)?e.fill(r,t):e[n(1690)](r):e[n(1690)](0),e},o[i(545)]=function(e){var r=i;if(typeof e!=r(1653))throw new TypeError(r(402));return a(e)},o.allocUnsafeSlow=function(e){var r=i;if("number"!=typeof e)throw new TypeError(r(402));return t[r(681)](e)}}),R=r(function(e){var t=X;function n(e){var r=t;return Object.prototype[r(926)][r(1360)](e)}e[t(1063)]=function(e){var r=_0x3d6c;return Array[r(1063)]?Array[r(1063)](e):"[object Array]"===n(e)},e[t(407)]=function(e){return typeof e==t(1071)},e.isNull=function(e){return null===e},e[t(1179)]=function(e){return null==e},e[t(1093)]=function(e){return typeof e==t(1653)},e.isString=function(e){return typeof e==t(2076)},e[t(395)]=function(e){return"symbol"==_typeof(e)},e[t(1613)]=function(e){return void 0===e},e[t(1308)]=function(e){var r=t;return n(e)===r(1795)},e.isObject=function(e){var r=t;return _typeof(e)==r(1361)&&null!==e},e[t(1945)]=function(e){var r=t;return n(e)===r(1569)},e[t(315)]=function(e){var r=t;return n(e)===r(1144)||e instanceof Error},e[t(787)]=function(e){return"function"==typeof e},e[t(1400)]=function(e){var r=t;return null===e||typeof e==r(1071)||typeof e==r(1653)||typeof e==r(2076)||_typeof(e)==r(1882)||"u"<_typeof(e)},e[t(2155)]=require("buffer")[t(1852)][t(2155)]}),z=r(function(e,r){var i=X;typeof Object[i(1675)]==i(2082)?r.exports=function(e,r){var t=i;r&&(e[t(1300)]=r,e.prototype=Object[t(1675)](r[t(1809)],{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:r[i(1317)]=function(e,r){var t,n=i;r&&(e[n(1300)]=r,(t=function(){}).prototype=r[n(1809)],e.prototype=new t,e.prototype.constructor=e)}}),j=r(function(e,r){var t,n=X;try{if(typeof(t=require(n(2008))).inherits!=n(2082))throw"";r[n(1317)]=t[n(638)]}catch(e){r[n(1317)]=z()}}),q=r(function(e,r){var t=X;var s,u=I()[t(1852)],n=require(t(2008));function i(){var e=_0x3d6c,r=_0x3d6c;if(!(this instanceof i))throw new TypeError(r(592));this[e(1511)]=null,this.tail=null,this[e(847)]=0}r[t(1317)]=(i[(s=t)(1809)].push=function(e){var r=s,e={data:e,next:null};0<this[r(847)]?this[r(1007)][r(348)]=e:this[r(1511)]=e,this[r(1007)]=e,++this.length},i[s(1809)].unshift=function(e){var r=s,e={data:e,next:this[r(1511)]};0===this[r(847)]&&(this.tail=e),this.head=e,++this[r(847)]},i.prototype[s(769)]=function(){var e,r=s;if(0!==this.length)return e=this.head[r(625)],1===this.length?this[r(1511)]=this[r(1007)]=null:this[r(1511)]=this.head[r(348)],--this[r(847)],e},i[s(1809)][s(1937)]=function(){this[s(1511)]=this.tail=null,this.length=0},i[s(1809)][s(1524)]=function(e){var r=s;if(0===this[r(847)])return"";for(var t=this[r(1511)],n=""+t[r(625)];t=t.next;)n+=e+t[r(625)];return n},i[s(1809)][s(1890)]=function(e){var r=s;if(0===this[r(847)])return u[r(1448)](0);for(var t,n,i=u.allocUnsafe(e>>>0),a=this[r(1511)],o=0;a;)t=a[r(625)],n=o,t.copy(i,n),o+=a[r(625)][r(847)],a=a[r(348)];return i},i),n&&n.inspect&&n.inspect[t(1192)]&&(r[t(1317)][t(1809)][n[t(577)][t(1192)]]=function(){var e=t,r=n.inspect({length:this[e(847)]});return this[e(635)][e(741)]+" "+r})}),N=r(function(e,r){var t=X,o=P();function s(e,r){var t=_0x3d6c;e[t(2036)](t(678),r)}r[t(1317)]={destroy:function(e,t){var n=_0x3d6c,i=this,r=this[n(674)]&&this[n(674)][n(1301)],a=this[n(561)]&&this[n(561)][n(1301)];return r||a?t?t(e):e&&(this._writableState?this._writableState[n(1753)]||(this._writableState.errorEmitted=!0,o[n(871)](s,this,e)):o[n(871)](s,this,e)):(this[n(674)]&&(this[n(674)][n(1301)]=!0),this._writableState&&(this[n(561)][n(1301)]=!0),this._destroy(e||null,function(e){var r=n;!t&&e?i[r(561)]?i[r(561)][r(1753)]||(i[r(561)][r(1753)]=!0,o[r(871)](s,i,e)):o[r(871)](s,i,e):t&&t(e)})),this},undestroy:function(){var e=_0x3d6c;this[e(674)]&&(this[e(674)][e(1301)]=!1,this[e(674)][e(1893)]=!1,this._readableState[e(318)]=!1,this._readableState[e(1281)]=!1),this._writableState&&(this._writableState[e(1301)]=!1,this[e(561)][e(318)]=!1,this[e(561)][e(1757)]=!1,this[e(561)][e(1929)]=!1,this[e(561)][e(1178)]=!1,this._writableState[e(1062)]=!1,this[e(561)][e(1753)]=!1)}}}),W=r(function(e,r){var t=X;r[t(1317)]=require(t(2008)).deprecate}),d=r(function(e,r){var p=X,_=P();function h(o){var e=p,s=this;this[e(348)]=null,this[e(1644)]=null,this[e(1223)]=function(){var e=s,r=o,t=void 0,n=p,i=e.entry;for(e[n(1644)]=null;i;){var a=i[n(1951)];r.pendingcb--,a(t),i=i[n(348)]}r.corkedRequestsFree[n(348)]=e}}r[p(1317)]=c;var o,d=!process[p(650)]&&-1<["v0.10","v0.9."].indexOf(process[p(1533)].slice(0,5))?setImmediate:_[p(871)],r=(c[p(2063)]=s,Object[p(1675)](R())),t=(r[p(638)]=j(),{deprecate:W()}),n=F(),g=I().Buffer,m=((typeof global===p(1758)?"undefined":_typeof(global))<"u"?global:(typeof window===p(1758)?p(1758):_typeof(window))<"u"?window:("undefined"==typeof self?p(1758):_typeof(self))<"u"?self:{})[p(1352)]||function(){};var i,a=N();function y(){}function s(e,l){var r=p,t=(o=o||G(),e=e||{},l instanceof o),n=(this[r(706)]=!!e[r(706)],t&&(this[r(706)]=this[r(706)]||!!e[r(1003)]),e[r(1373)]),i=e.writableHighWaterMark,a=this[r(706)]?16:16384,n=(this[r(1373)]=n||0===n?n:t&&(i||0===i)?i:a,this[r(1373)]=Math[r(2121)](this.highWaterMark),this.finalCalled=!1,this[r(1322)]=!1,this.ending=!1,this[r(318)]=!1,this.finished=!1,(this[r(1301)]=!1)===e[r(1082)]);this[r(1082)]=!n,this[r(1244)]=e[r(1244)]||"utf8",this[r(847)]=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this[r(1680)]=function(e){e=e,n=(r=l)[(t=p)(561)],i=n[t(2046)],a=n[t(2086)];var r,t,n,i,a,o=n,s=p;{var u,c,f,h;(o.writing=!1,o.writecb=null,o.length-=o[s(356)],o[s(356)]=0,e)?(o=r,u=i,c=e,f=a,--(s=n)[(h=p)(2067)],u?(_[h(871)](f,c),_[h(871)](x,o,s),o[h(561)][h(1753)]=!0,o[h(2036)](h(678),c)):(f(c),o[h(561)].errorEmitted=!0,o[h(2036)](h(678),c),x(o,s))):((e=k(n))||n[t(694)]||n[t(1925)]||!n[t(718)]||w(r,n),i?d(v,r,n,e,a):v(r,n,e,a))}},this[r(2086)]=null,this.writelen=0,this[r(718)]=null,this.lastBufferedRequest=null,this[r(2067)]=0,this[r(1178)]=!1,this[r(1753)]=!1,this.bufferedRequestCount=0,this[r(623)]=new h(this)}r[p(638)](c,n),s[p(1809)][p(416)]=function(){for(var e=p,r=this.bufferedRequest,t=[];r;)t[e(1922)](r),r=r[e(348)];return t};var u=p;try{Object[u(952)](s[u(1809)],u(1261),{get:t[u(1514)](function(){return this[u(416)]()},u(719),"DEP0003")})}catch(e){}function c(e){var r=p;if(o=o||G(),!(i[r(1360)](c,this)||this instanceof o))return new c(e);this[r(561)]=new s(e,this),this.writable=!0,e&&(typeof e.write==r(2082)&&(this[r(1058)]=e[r(1620)]),typeof e[r(1799)]==r(2082)&&(this._writev=e.writev),typeof e[r(979)]==r(2082)&&(this[r(1260)]=e[r(979)]),"function"==typeof e[r(1908)])&&(this[r(1688)]=e[r(1908)]),n[r(1360)](this)}function b(e,r,t,n,i,a,o){var s=p;r[s(356)]=n,r.writecb=o,r[s(1635)]=!0,r.sync=!0,t?e[s(1330)](i,r[s(1680)]):e._write(i,a,r[s(1680)]),r[s(2046)]=!1}function v(e,r,t,n){var i,a,o=p;t||(t=e,0===(i=r)[(a=p)(847)]&&i.needDrain&&(i[a(1322)]=!1,t[a(2036)](a(1848)))),r[o(2067)]--,n(),x(e,r)}function w(e,r){var t=p,n=(r[t(1925)]=!0,r[t(718)]);if(e[t(1330)]&&n&&n[t(348)]){var i=r[t(1172)],a=new Array(i),i=r[t(623)];i.entry=n;for(var o=0,s=!0;n;)(a[o]=n)[t(1376)]||(s=!1),n=n[t(348)],o+=1;a[t(1641)]=s,b(e,r,!0,r[t(847)],a,"",i[t(1223)]),r[t(2067)]++,r[t(1599)]=null,i.next?(r[t(623)]=i.next,i[t(348)]=null):r[t(623)]=new h(r),r[t(1172)]=0}else{for(;n;){var u=n.chunk,c=n[t(1156)],f=n.callback;if(b(e,r,!1,r[t(706)]?1:u.length,u,c,f),n=n[t(348)],r[t(1172)]--,r[t(1635)])break}null===n&&(r[t(1599)]=null)}r[t(718)]=n,r[t(1925)]=!1}function k(e){var r=p;return e[r(1757)]&&0===e.length&&null===e.bufferedRequest&&!e[r(1062)]&&!e.writing}function f(t,n){var i=p;t[i(1688)](function(e){var r=i;n[r(2067)]--,e&&t[r(2036)](r(678),e),n[r(1178)]=!0,t.emit(r(1181)),x(t,n)})}function x(e,r){var t,n,i,a=p,o=k(r);return o&&(t=e,i=p,(n=r).prefinished||n[i(1929)]||(typeof t[i(1688)]==i(2082)?(n.pendingcb++,n[i(1929)]=!0,_.nextTick(f,t,n)):(n[i(1178)]=!0,t.emit("prefinish"))),0===r[a(2067)])&&(r.finished=!0,e[a(2036)](a(1223))),o}"function"==typeof Symbol&&Symbol[p(489)]&&"function"==typeof Function.prototype[Symbol[p(489)]]?(i=Function.prototype[Symbol[p(489)]],Object.defineProperty(c,Symbol.hasInstance,{value:function(e){var r=p;return!!i[r(1360)](this,e)||this===c&&e&&e[r(561)]instanceof s}})):i=function(e){return e instanceof this},c.prototype.pipe=function(){var e=p;this[e(2036)](e(678),new Error("Cannot pipe, not readable"))},c[p(1809)][p(1620)]=function(e,r,t){var n,i,a,o,s,u,c,f,h=p,l=this[h(561)],d=!1,v=!l[h(706)]&&(v=e,g[p(2155)](v)||v instanceof m);return v&&!g[h(2155)](e)&&(f=e,e=g[p(1790)](f)),"function"==typeof r&&(t=r,r=null),r=v?h(1261):r||l[h(1244)],typeof t!=h(2082)&&(t=y),l[h(318)]?(f=this,s=t,u=p,c=new Error(u(1716)),f[u(2036)](u(678),c),_[u(871)](s,c)):(v||(u=this,s=l,c=t,i=p,o=!(a=!0),null===(n=e)?o=new TypeError(i(1426)):typeof n==i(2076)||void 0===n||s[i(706)]||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(u[i(2036)]("error",o),_[i(871)](c,o),a=!1),a))&&(l[h(2067)]++,d=((e,r,t,n,i,a)=>{var o,s=p,u=(t||(u=((e,r,t)=>{var n=p;return r=e[n(706)]||!1===e.decodeStrings||typeof r!=n(2076)?r:g[n(1790)](r,t)})(r,n,i),n!==u&&(t=!0,i="buffer",n=u)),r[s(706)]?1:n[s(847)]),c=(r[s(847)]+=u,r.length<r[s(1373)]);return c||(r[s(1322)]=!0),r.writing||r[s(694)]?(o=r[s(1599)],r[s(1599)]={chunk:n,encoding:i,isBuf:t,callback:a,next:null},o?o[s(348)]=r.lastBufferedRequest:r[s(718)]=r[s(1599)],r.bufferedRequestCount+=1):b(e,r,!1,u,n,i,a),c})(this,l,v,e,r,t)),d},c[p(1809)][p(666)]=function(){var e=p;this[e(561)][e(694)]++},c[p(1809)].uncork=function(){var e=p,r=this._writableState;!r[e(694)]||(r.corked--,r[e(1635)])||r[e(694)]||r.bufferProcessing||!r[e(718)]||w(this,r)},c[p(1809)].setDefaultEncoding=function(e){var r=p;if("string"==typeof e&&(e=e.toLowerCase()),-1<["hex","utf8","utf-8",r(405),r(654),r(675),r(878),r(998),r(1136),r(1502),r(1562)][r(726)]((e+"")[r(570)]()))return this[r(561)][r(1244)]=e,this;throw new TypeError(r(1285)+e)},Object.defineProperty(c[p(1809)],"writableHighWaterMark",{enumerable:!1,get:function(){var e=p;return this[e(561)][e(1373)]}}),c.prototype._write=function(e,r,t){t(new Error(p(721)))},c[p(1809)][p(1330)]=null,c[p(1809)][p(2007)]=function(e,r,t){var n=p,i=this[n(561)];"function"==typeof e?(t=e,r=e=null):"function"==typeof r&&(t=r,r=null),null!=e&&this[n(1620)](e,r),i[n(694)]&&(i.corked=1,this.uncork()),i[n(1757)]||(e=this,r=t,n=p,(t=i).ending=!0,x(e,t),r&&(t[n(1062)]?_[n(871)](r):e.once(n(1223),r)),t[n(318)]=!0,e.writable=!1)},Object[p(952)](c.prototype,p(1301),{get:function(){var e=p;return void 0!==this[e(561)]&&this[e(561)].destroyed},set:function(e){var r=p;this[r(561)]&&(this[r(561)][r(1301)]=e)}}),c[p(1809)][p(979)]=a[p(979)],c[p(1809)][p(1035)]=a[p(1154)],c.prototype[p(1260)]=function(e,r){this[p(2007)](),r(e)}}),G=r(function(e,r){var t,n,i,a=X,o=P(),s=Object.keys||function(e){var r,t=_0x3d6c,n=[];for(r in e)n[t(1922)](r);return n},r=(r[a(1317)]=f,Object[a(1675)](R())),u=(r.inherits=j(),v()),c=d();for(r[a(638)](f,u),t=s(c[a(1809)]),i=0;i<t[a(847)];i++)n=t[i],f[a(1809)][n]||(f.prototype[n]=c[a(1809)][n]);function f(e){var r=a;if(!(this instanceof f))return new f(e);u[r(1360)](this,e),c.call(this,e),e&&!1===e[r(1268)]&&(this[r(1268)]=!1),e&&!1===e[r(1532)]&&(this[r(1532)]=!1),this[r(795)]=!0,e&&!1===e[r(795)]&&(this[r(795)]=!1),this.once(r(2007),h)}function h(){var e=a;this[e(795)]||this._writableState.ended||o[e(871)](l,this)}function l(e){e[a(2007)]()}Object[a(952)](f[a(1809)],a(1252),{enumerable:!1,get:function(){return this[a(561)].highWaterMark}}),Object[a(952)](f[a(1809)],a(1301),{get:function(){var e=a;return void 0!==this[e(674)]&&void 0!==this[e(561)]&&this[e(674)][e(1301)]&&this._writableState[e(1301)]},set:function(e){var r=a;void 0!==this[r(674)]&&void 0!==this._writableState&&(this[r(674)].destroyed=e,this[r(561)][r(1301)]=e)}}),f[a(1809)][a(1260)]=function(e,r){var t=a;this[t(1922)](null),this[t(2007)](),o[t(871)](r,e)}}),L=r(function(e){var o=X,n=I()[o(1852)],i=n[o(2091)]||function(e){var r=o;switch((e=""+e)&&e[r(570)]()){case r(1079):case r(767):case r(946):case r(405):case r(654):case r(675):case r(878):case r(998):case r(1136):case r(1502):case"raw":return!0;default:return!1}};function a(e){var r=o,t=(e=>{var r,t=o;if(!e)return t(767);for(;;)switch(e){case"utf8":case t(946):return t(767);case t(878):case"ucs-2":case t(1136):case t(1502):return"utf16le";case t(691):case t(654):return"latin1";case t(675):case t(405):case t(1079):return e;default:if(r)return;e=(""+e).toLowerCase(),r=!0}})(e);if(typeof t==r(2076)||n.isEncoding!==i&&i(e))return t||e;throw new Error(r(1285)+e)}function r(e){var r,t=o;switch(this.encoding=a(e),this[t(1156)]){case t(1136):this[t(1138)]=c,this[t(2007)]=f,r=4;break;case t(767):this.fillLast=u,r=4;break;case t(675):this[t(1138)]=h,this[t(2007)]=l,r=3;break;default:return this[t(1620)]=d,void(this[t(2007)]=v)}this.lastNeed=0,this[t(761)]=0,this[t(1164)]=n[t(545)](r)}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 r,t,n=o,i=this.lastTotal-this[n(1689)],a=(r=this,t=o,128!=(192&(a=e)[0])?(r.lastNeed=0,"�"):1<r[t(1689)]&&1<a[t(847)]?128!=(192&a[1])?(r[t(1689)]=1,"�"):2<r[t(1689)]&&2<a[t(847)]&&128!=(192&a[2])?(r[t(1689)]=2,"�"):void 0:void 0);return void 0!==a?a:this.lastNeed<=e.length?(e[n(573)](this.lastChar,i,0,this[n(1689)]),this[n(1164)][n(926)](this[n(1156)],0,this.lastTotal)):(e[n(573)](this[n(1164)],i,0,e[n(847)]),void(this[n(1689)]-=e[n(847)]))}function c(e,r){var t=o;if((e.length-r)%2!=0)return this[t(1689)]=1,this.lastTotal=2,this[t(1164)][0]=e[e[t(847)]-1],e[t(926)](t(1136),r,e[t(847)]-1);r=e[t(926)]("utf16le",r);if(r){var n=r[t(1080)](r[t(847)]-1);if(55296<=n&&n<=56319)return this[t(1689)]=2,this.lastTotal=4,this[t(1164)][0]=e[e[t(847)]-2],this[t(1164)][1]=e[e[t(847)]-1],r.slice(0,-1)}return r}function f(e){var r,t=o,e=e&&e[t(847)]?this[t(1620)](e):"";return this[t(1689)]?(r=this[t(761)]-this[t(1689)],e+this[t(1164)].toString("utf16le",0,r)):e}function h(e,r){var t=o,n=(e[t(847)]-r)%3;return 0==n?e.toString(t(675),r):(this.lastNeed=3-n,this[t(761)]=3,1==n?this[t(1164)][0]=e[e[t(847)]-1]:(this.lastChar[0]=e[e[t(847)]-2],this.lastChar[1]=e[e[t(847)]-1]),e.toString(t(675),r,e.length-n))}function l(e){var r=o,e=e&&e[r(847)]?this.write(e):"";return this[r(1689)]?e+this[r(1164)][r(926)](r(675),0,3-this.lastNeed):e}function d(e){return e[o(926)](this.encoding)}function v(e){var r=o;return e&&e[r(847)]?this[r(1620)](e):""}(e[o(587)]=r).prototype[o(1620)]=function(e){var r,t,n=o;if(0===e[n(847)])return"";if(this[n(1689)]){if(void 0===(r=this[n(1987)](e)))return"";t=this[n(1689)],this.lastNeed=0}else t=0;return t<e[n(847)]?r?r+this.text(e,t):this[n(1138)](e,t):r||""},r[o(1809)][o(2007)]=function(e){var r=o,e=e&&e[r(847)]?this[r(1620)](e):"";return this[r(1689)]?e+"�":e},r[o(1809)][o(1138)]=function(e,r){var t=o,n=((e,r,t)=>{var n,i=o,a=r[i(847)]-1;return a<t?0:0<=(n=s(r[a]))?(0<n&&(e[i(1689)]=n-1),n):--a<t||-2===n?0:0<=(n=s(r[a]))?(0<n&&(e[i(1689)]=n-2),n):!(--a<t||-2===n)&&0<=(n=s(r[a]))?(0<n&&(2===n?n=0:e[i(1689)]=n-3),n):0})(this,e,r);if(!this[t(1689)])return e[t(926)](t(767),r);this[t(761)]=n;n=e[t(847)]-(n-this[t(1689)]);return e[t(573)](this[t(1164)],0,n),e[t(926)](t(767),r,n)},r[o(1809)][o(1987)]=function(e){var r=o;if(this[r(1689)]<=e.length)return e[r(573)](this[r(1164)],this.lastTotal-this[r(1689)],0,this[r(1689)]),this[r(1164)].toString(this[r(1156)],0,this[r(761)]);e[r(573)](this[r(1164)],this.lastTotal-this[r(1689)],0,e[r(847)]),this[r(1689)]-=e.length}}),v=r(function(e,r){function g(e,r){return e[m(1108)](r).length}var o,m=X,y=P(),b=(r[m(1317)]=a,M()),n=(a.ReadableState=i,require(m(1404))[m(1442)],F()),d=I()[m(1852)],v=((typeof global===m(1758)?m(1758):_typeof(global))<"u"?global:(typeof window===m(1758)?m(1758):_typeof(window))<"u"?window:(typeof self===m(1758)?"undefined":_typeof(self))<"u"?self:{}).Uint8Array||function(){};var s,r=Object[m(1675)](R()),t=(r[m(638)]=j(),require(m(2008))),w=void 0,w=t&&t[m(320)]?t[m(320)]("stream"):function(){},u=q(),t=N(),c=(r.inherits(a,n),[m(678),m(1858),m(979),"pause",m(807)]);function i(e,r){var t=m,r=(e=e||{},r instanceof(o=o||G())),n=(this[t(706)]=!!e[t(706)],r&&(this[t(706)]=this[t(706)]||!!e[t(1729)]),e.highWaterMark),i=e[t(582)],a=this[t(706)]?16:16384;n||0===n?this[t(1373)]=n:r&&(i||0===i)?this.highWaterMark=i:this[t(1373)]=a,this.highWaterMark=Math[t(2121)](this[t(1373)]),this.buffer=new u,this[t(847)]=0,this[t(1092)]=null,this[t(550)]=0,this[t(896)]=null,this[t(318)]=!1,this.endEmitted=!1,this.reading=!1,this[t(2046)]=!0,this[t(1706)]=!1,this[t(1474)]=!1,this[t(1259)]=!1,this[t(971)]=!1,this.destroyed=!1,this.defaultEncoding=e[t(1244)]||t(767),this[t(1142)]=0,this[t(2080)]=!1,this[t(909)]=null,this[t(1156)]=null,e[t(1156)]&&(s=s||L()[t(587)],this.decoder=new s(e[t(1156)]),this.encoding=e.encoding)}function a(e){var r=m;if(o=o||G(),!(this instanceof a))return new a(e);this[r(674)]=new i(e,this),this[r(1268)]=!0,e&&(typeof e.read==r(2082)&&(this._read=e[r(1305)]),typeof e[r(979)]==r(2082))&&(this._destroy=e.destroy),n[r(1360)](this)}function f(e,r,t,n,i){var a,o,s,u,c,f,h=m,l=e[h(674)];return null===r?(l.reading=!1,o=e,u=m,(c=l).ended||(c[u(909)]&&(s=c[u(909)][u(2007)]())&&s[u(847)]&&(c.buffer[u(1922)](s),c[u(847)]+=c.objectMode?1:s[u(847)]),c[u(318)]=!0,_(o))):(i||(s=l,c=m,a=f=(e=>d[m(2155)](e)||e instanceof v)(u=r)||typeof u==c(2076)||void 0===u||s[c(706)]?f:new TypeError("Invalid non-string/buffer chunk")),a?e[h(2036)]("error",a):l[h(706)]||r&&0<r[h(847)]?(typeof r==h(2076)||l[h(706)]||Object.getPrototypeOf(r)===d.prototype||(o=r,r=d[m(1790)](o)),n?l[h(1281)]?e[h(2036)](h(678),new Error(h(659))):p(e,l,r,!0):l[h(318)]?e[h(2036)]("error",new Error("stream.push() after EOF")):(l.reading=!1,!l[h(909)]||t||(r=l[h(909)][h(1620)](r),l[h(706)])||0!==r[h(847)]?p(e,l,r,!1):x(e,l))):n||(l[h(1893)]=!1)),!(i=l)[(f=m)(318)]&&(i[f(1706)]||i[f(847)]<i.highWaterMark||0===i[f(847)])}function p(e,r,t,n){var i=m;r.flowing&&0===r[i(847)]&&!r[i(2046)]?(e[i(2036)]("data",t),e[i(1305)](0)):(r[i(847)]+=r[i(706)]?1:t.length,n?r[i(1261)][i(685)](t):r[i(1261)][i(1922)](t),r[i(1706)]&&_(e)),x(e,r)}Object[m(952)](a.prototype,m(1301),{get:function(){var e=m;return void 0!==this[e(674)]&&this[e(674)][e(1301)]},set:function(e){var r=m;this[r(674)]&&(this[r(674)].destroyed=e)}}),a[m(1809)][m(979)]=t[m(979)],a[m(1809)][m(1035)]=t[m(1154)],a[m(1809)][m(1260)]=function(e,r){this[m(1922)](null),r(e)},a[m(1809)][m(1922)]=function(e,r){var t,n=m,i=this[n(674)];return i[n(706)]?t=!0:"string"==typeof e&&((r=r||i[n(1244)])!==i[n(1156)]&&(e=d.from(e,r),r=""),t=!0),f(this,e,r,!1,t)},a[m(1809)][m(685)]=function(e){return f(this,e,null,!0,!1)},a[m(1809)].isPaused=function(){var e=m;return!1===this[e(674)][e(896)]},a[m(1809)][m(1507)]=function(e){var r=m;return s=s||L()[r(587)],this[r(674)][r(909)]=new s(e),this[r(674)][r(1156)]=e,this};var h=8388608;function l(e,r){var t,n=m;return e<=0||0===r[n(847)]&&r[n(318)]?0:r[n(706)]?1:e!=e?(r[n(896)]&&r[n(847)]?r.buffer.head[n(625)]:r)[n(847)]:(e>r[n(1373)]&&(r.highWaterMark=(h<=(t=e)?t=h:(t--,t=(t=(t=(t=(t|=t>>>1)|t>>>2)|t>>>4)|t>>>8)|t>>>16,t++),t)),e<=r[n(847)]?e:r.ended?r.length:(r[n(1706)]=!0,0))}function _(e){var r=m,t=e[r(674)];t[r(1706)]=!1,t[r(1474)]||(w("emitReadable",t.flowing),t[r(1474)]=!0,t.sync?y[r(871)](k,e):k(e))}function k(e){var r=m;w("emit readable"),e[r(2036)](r(1268)),S(e)}function x(e,r){var t=m;r[t(2080)]||(r.readingMore=!0,y[t(871)](C,e,r))}function C(e,r){for(var t=m,n=r[t(847)];!r[t(1893)]&&!r[t(896)]&&!r.ended&&r[t(847)]<r[t(1373)]&&(w(t(854)),e[t(1305)](0),n!==r[t(847)]);)n=r.length;r[t(2080)]=!1}function E(e){w("readable nexttick read 0"),e.read(0)}function A(e,r){var t=m;r.reading||(w(t(2042)),e[t(1305)](0)),r[t(971)]=!1,r.awaitDrain=0,e[t(2036)](t(807)),S(e),r[t(896)]&&!r.reading&&e[t(1305)](0)}function S(e){var r=m,t=e[r(674)];for(w(r(1253),t[r(896)]);t[r(896)]&&null!==e[r(1305)](););}function D(e,r){var t,n,i,a=m;return 0===r[a(847)]?null:(r[a(706)]?t=r.buffer[a(769)]():!e||e>=r[a(847)]?(t=r[a(909)]?r[a(1261)][a(1524)](""):1===r.buffer.length?r.buffer[a(1511)].data:r[a(1261)][a(1890)](r[a(847)]),r[a(1261)][a(1937)]()):(e=e,a=r[a(1261)],r=r.decoder,e<a[(i=m)(1511)][i(625)][i(847)]?(n=a[i(1511)][i(625)][i(1366)](0,e),a[i(1511)][i(625)]=a[i(1511)][i(625)][i(1366)](e)):n=e===a[i(1511)][i(625)][i(847)]?a.shift():(r?(e,r)=>{var t=m,n=r[t(1511)],i=1,a=n[t(625)];for(e-=a[t(847)];n=n[t(348)];){var o=n.data,s=e>o[t(847)]?o[t(847)]:e;if(s===o[t(847)]?a+=o:a+=o.slice(0,e),0===(e-=s)){s===o[t(847)]?(++i,n[t(348)]?r[t(1511)]=n.next:r[t(1511)]=r[t(1007)]=null):(r.head=n)[t(625)]=o[t(1366)](s);break}++i}return r[t(847)]-=i,a}:(e,r)=>{var t=m,n=d.allocUnsafe(e),i=r[t(1511)],a=1;for(i[t(625)].copy(n),e-=i[t(625)][t(847)];i=i[t(348)];){var o=i[t(625)],s=e>o.length?o[t(847)]:e;if(o[t(573)](n,n[t(847)]-e,0,s),0===(e-=s)){s===o[t(847)]?(++a,i[t(348)]?r[t(1511)]=i[t(348)]:r[t(1511)]=r[t(1007)]=null):(r[t(1511)]=i)[t(625)]=o[t(1366)](s);break}++a}return r[t(847)]-=a,n})(e,a),t=n),t)}function O(e){var r=m,t=e[r(674)];if(0<t.length)throw new Error('"endReadable()" called on non-empty stream');t[r(1281)]||(t[r(318)]=!0,y[r(871)](T,t,e))}function T(e,r){var t=m;e[t(1281)]||0!==e[t(847)]||(e[t(1281)]=!0,r[t(1268)]=!1,r[t(2036)](t(2007)))}function B(e,r){for(var t=0,n=e[m(847)];t<n;t++)if(e[t]===r)return t;return-1}a[m(1809)].read=function(e){var r,t=m,n=(w("read",e),e=parseInt(e,10),this[t(674)]),i=e;return 0!==e&&(n[t(1474)]=!1),0===e&&n.needReadable&&(n[t(847)]>=n.highWaterMark||n[t(318)])?(w(t(705),n[t(847)],n.ended),(0===n[t(847)]&&n[t(318)]?O:_)(this),null):0===(e=l(e,n))&&n[t(318)]?(0===n[t(847)]&&O(this),null):(r=n[t(1706)],w(t(804),r),(0===n[t(847)]||n[t(847)]-e<n[t(1373)])&&(r=!0,w(t(1664),r)),n[t(318)]||n[t(1893)]?(r=!1,w(t(600),r)):r&&(w(t(453)),n[t(1893)]=!0,n[t(2046)]=!0,0===n[t(847)]&&(n[t(1706)]=!0),this[t(660)](n[t(1373)]),n.sync=!1,n.reading||(e=l(i,n))),null===(r=0<e?D(e,n):null)?(n[t(1706)]=!0,e=0):n[t(847)]-=e,0===n[t(847)]&&(n[t(318)]||(n.needReadable=!0),i!==e)&&n.ended&&O(this),null!==r&&this.emit(t(625),r),r)},a[m(1809)][m(660)]=function(e){var r=m;this[r(2036)](r(678),new Error(r(375)))},a[m(1809)][m(1949)]=function(n,e){var i=m,a=this,o=this._readableState;switch(o[i(550)]){case 0:o[i(1092)]=n;break;case 1:o.pipes=[o.pipes,n];break;default:o[i(1092)][i(1922)](n)}o[i(550)]+=1,w("pipe count=%d opts=%j",o[i(550)],e);e=(!e||!1!==e[i(2007)])&&n!==process.stdout&&n!==process[i(575)]?u:_;function s(e,r){var t=i;w(t(1036)),e===a&&r&&!1===r.hasUnpiped&&(r[t(1065)]=!0,e=i,w("cleanup"),n[e(341)](e(1858),v),n[e(341)](e(1223),p),n[e(341)](e(1848),c),n[e(341)](e(678),d),n[e(341)](e(1381),s),a[e(341)](e(2007),u),a[e(341)](e(2007),_),a[e(341)](e(625),l),f=!0,!o[e(1142)]||n[e(561)]&&!n[e(561)][e(1322)]||c())}function u(){w(i(1416)),n.end()}o[i(1281)]?y[i(871)](e):a[i(1871)](i(2007),e),n.on(i(1381),s);t=a;var t,c=function(){var e=_0x3d6c,r=t._readableState;w("pipeOnDrain",r[e(1142)]),r[e(1142)]&&r.awaitDrain--,0===r[e(1142)]&&g(t,e(625))&&(r[e(896)]=!0,S(t))},f=(n.on(i(1848),c),!1);var h=!1;function l(e){var r=i;w(r(1337)),(h=!1)!==n[r(1620)](e)||h||((1===o[r(550)]&&o.pipes===n||1<o[r(550)]&&-1!==B(o.pipes,n))&&!f&&(w(r(1167),o[r(1142)]),o[r(1142)]++,h=!0),a[r(1722)]())}function d(e){var r=i;w("onerror",e),_(),n[r(341)](r(678),d),0===g(n,r(678))&&n.emit("error",e)}function v(){var e=i;n[e(341)](e(1223),p),_()}function p(){var e=i;w(e(969)),n.removeListener(e(1858),v),_()}function _(){w("unpipe"),a.unpipe(n)}return a.on(i(625),l),((e,r,t)=>{var n=m;if(typeof e[n(507)]==n(2082))return e[n(507)](r,t);e._events&&e[n(313)][r]?b(e[n(313)][r])?e._events[r].unshift(t):e._events[r]=[t,e[n(313)][r]]:e.on(r,t)})(n,i(678),d),n[i(1871)](i(1858),v),n.once(i(1223),p),n[i(2036)](i(1949),a),o.flowing||(w(i(359)),a[i(807)]()),n},a[m(1809)][m(1381)]=function(e){var r=m,t=this._readableState,n={hasUnpiped:!1};if(0!==t[r(550)])if(1===t[r(550)])e&&e!==t[r(1092)]||(e=e||t.pipes,t[r(1092)]=null,t[r(550)]=0,t[r(896)]=!1,e&&e[r(2036)](r(1381),this,n));else if(e){var i=B(t[r(1092)],e);-1!==i&&(t[r(1092)][r(1916)](i,1),--t[r(550)],1===t.pipesCount&&(t[r(1092)]=t.pipes[0]),e[r(2036)](r(1381),this,n))}else{var a=t[r(1092)],o=t.pipesCount;t[r(1092)]=null,t.pipesCount=0,t[r(896)]=!1;for(var s=0;s<o;s++)a[s][r(2036)](r(1381),this,{hasUnpiped:!1})}return this},a[m(1809)].on=function(e,r){var t=m,r=n[t(1809)].on.call(this,e,r);return e===t(625)?!1!==this[t(674)].flowing&&this[t(807)]():e!==t(1268)||(e=this._readableState).endEmitted||e[t(1259)]||(e[t(1259)]=e.needReadable=!0,e.emittedReadable=!1,e[t(1893)]?e.length&&_(this):y.nextTick(E,this)),r},a[m(1809)][m(1214)]=a[m(1809)].on,a.prototype[m(807)]=function(){var e,r=m,t=this[r(674)];return t[r(896)]||(w(r(807)),t[r(896)]=!0,r=this,e=m,(t=t).resumeScheduled||(t.resumeScheduled=!0,y[e(871)](A,r,t))),this},a[m(1809)][m(1722)]=function(){var e=m;return w(e(1022),this._readableState.flowing),!1!==this[e(674)][e(896)]&&(w("pause"),this[e(674)][e(896)]=!1,this[e(2036)](e(1722))),this},a[m(1809)].wrap=function(t){var e,n=m,i=this,a=this[n(674)],o=!1;for(e in t.on(n(2007),function(){var e,r=n;w("wrapped end"),a[r(909)]&&!a[r(318)]&&(e=a[r(909)][r(2007)]())&&e[r(847)]&&i[r(1922)](e),i[r(1922)](null)}),t.on(n(625),function(e){var r=n;w(r(2130)),a.decoder&&(e=a[r(909)].write(e)),a[r(706)]&&null==e||!(a[r(706)]||e&&e[r(847)])||i.push(e)||(o=!0,t[r(1722)]())}),t)void 0===this[e]&&typeof t[e]==n(2082)&&(this[e]=(r=>function(){var e=_0x3d6c;return t[r][e(475)](t,arguments)})(e));for(var r=0;r<c.length;r++)t.on(c[r],this[n(2036)][n(1733)](this,c[r]));return this._read=function(e){var r=n;w(r(822),e),o&&(o=!1,t[r(807)]())},this},Object.defineProperty(a.prototype,m(582),{enumerable:!1,get:function(){var e=m;return this._readableState[e(1373)]}}),a[m(1116)]=D}),a=r(function(e,r){var a=X,o=(r.exports=t,G()),r=Object[a(1675)](R());function t(e){var r=a;if(!(this instanceof t))return new t(e);o[r(1360)](this,e),this[r(1597)]={afterTransform:function(e,r){var t=a,n=this[t(1597)],i=(n[t(925)]=!1,n[t(2086)]);if(!i)return this[t(2036)](t(678),new Error("write callback called multiple times"));n[t(1321)]=null,(n[t(2086)]=null)!=r&&this[t(1922)](r),i(e),(n=this._readableState)[t(1893)]=!1,(n.needReadable||n[t(847)]<n.highWaterMark)&&this[t(660)](n[t(1373)])}[r(1733)](this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this[r(674)][r(1706)]=!0,this[r(674)][r(2046)]=!1,e&&("function"==typeof e[r(1340)]&&(this[r(981)]=e.transform),typeof e.flush==r(2082))&&(this[r(2144)]=e[r(2151)]),this.on(r(1181),n)}function n(){var e=a,t=this;typeof this[e(2144)]==e(2082)?this._flush(function(e,r){i(t,e,r)}):i(this,null,null)}function i(e,r,t){var n=a;if(r)return e[n(2036)](n(678),r);if(null!=t&&e.push(t),e[n(561)].length)throw new Error(n(444));if(e[n(1597)][n(925)])throw new Error(n(1979));e[n(1922)](null)}r[a(638)]=j(),r[a(638)](t,o),t.prototype[a(1922)]=function(e,r){var t=a;return this[t(1597)][t(1720)]=!1,o[t(1809)][t(1922)].call(this,e,r)},t[a(1809)][a(981)]=function(e,r,t){throw new Error(a(1336))},t.prototype[a(1058)]=function(e,r,t){var n=a,i=this[n(1597)];i[n(2086)]=t,i[n(1321)]=e,i[n(800)]=r,!i.transforming&&(t=this._readableState,i[n(1720)]||t.needReadable||t[n(847)]<t[n(1373)])&&this[n(660)](t[n(1373)])},t.prototype[a(660)]=function(e){var r=a,t=this[r(1597)];null!==t[r(1321)]&&t[r(2086)]&&!t[r(925)]?(t.transforming=!0,this[r(981)](t[r(1321)],t[r(800)],t.afterTransform)):t[r(1720)]=!0},t[a(1809)][a(1260)]=function(e,t){var n=a,i=this;o[n(1809)][n(1260)].call(this,e,function(e){var r=n;t(e),i[r(2036)]("close")})}}),V=r(function(e,r){var t=X,n=(r[t(1317)]=i,a()),r=Object[t(1675)](R());function i(e){var r=t;if(!(this instanceof i))return new i(e);n[r(1360)](this,e)}r[t(638)]=j(),r[t(638)](i,n),i[t(1809)][t(981)]=function(e,r,t){t(null,e)}}),s=r(function(e,r){var t=X,n=require(t(456));process[t(912)][t(1421)]===t(1521)&&n?(r[t(1317)]=n,(e=r[t(1317)]=n[t(1126)])[t(1126)]=n.Readable,e[t(497)]=n[t(497)],e.Duplex=n[t(370)],e[t(1380)]=n[t(1380)],e.PassThrough=n.PassThrough,e.Stream=n):((e=r.exports=v()).Stream=n||e,(e[t(1126)]=e)[t(497)]=d(),e[t(370)]=G(),e[t(1380)]=a(),e[t(353)]=V())}),_=r(function(r){var t,n,i=X;if(r.base64=!0,r[i(1015)]=!0,r[i(2076)]=!0,r[i(692)]=(typeof ArrayBuffer===i(1758)?"undefined":_typeof(ArrayBuffer))<"u"&&(typeof Uint8Array===i(1758)?"undefined":_typeof(Uint8Array))<"u",r[i(1029)]=("undefined"==typeof Buffer?i(1758):_typeof(Buffer))<"u",r.uint8array=(typeof Uint8Array===i(1758)?i(1758):_typeof(Uint8Array))<"u","u"<("undefined"==typeof ArrayBuffer?i(1758):_typeof(ArrayBuffer)))r.blob=!1;else{t=new ArrayBuffer(0);try{r.blob=0===new Blob([t],{type:i(695)}).size}catch(e){try{(n=new(self[i(1254)]||self[i(321)]||self[i(748)]||self[i(1660)]))[i(1184)](t),r[i(1761)]=0===n[i(628)]("application/zip")[i(322)]}catch(e){r[i(1761)]=!1}}}try{r.nodestream=!!s()[i(1126)]}catch(e){r[i(754)]=!1}}),p=r(function(e){var d=X,v=A(),l=_(),p=d(568);e[d(1294)]=function(e){for(var r,t,n,i,a,o,s,u=d,c=[],f=0,h=e[u(847)],l=v[u(1218)](e)!==u(2076);f<e[u(847)];)s=h-f,n=l?(r=e[f++],t=f<h?e[f++]:0,f<h?e[f++]:0):(r=e[u(1080)](f++),t=f<h?e[u(1080)](f++):0,f<h?e[u(1080)](f++):0),i=r>>2,a=(3&r)<<4|t>>4,o=1<s?(15&t)<<2|n>>6:64,s=2<s?63&n:64,c.push(p[u(2101)](i)+p[u(2101)](a)+p[u(2101)](o)+p[u(2101)](s));return c.join("")},e[d(1872)]=function(e){var r,t,n,i,a,o,s=d,u=0,c=0;if("data:"===e[s(1326)](0,"data:"[s(847)]))throw new Error(s(410));var f,h=3*(e=e[s(488)](/[^A-Za-z0-9\+\/\=]/g,""))[s(847)]/4;if(e[s(2101)](e[s(847)]-1)===p.charAt(64)&&h--,e[s(2101)](e.length-2)===p[s(2101)](64)&&h--,h%1!=0)throw new Error(s(556));for(f=new(l[s(2104)]?Uint8Array:Array)(0|h);u<e[s(847)];)n=p[s(726)](e[s(2101)](u++)),r=(15&(i=p[s(726)](e[s(2101)](u++))))<<4|(a=p[s(726)](e[s(2101)](u++)))>>2,t=(3&a)<<6|(o=p[s(726)](e[s(2101)](u++))),f[c++]=n<<2|i>>4,64!==a&&(f[c++]=r),64!==o&&(f[c++]=t);return f}}),b=r(function(e,r){var n=X;r[n(1317)]={isNode:("undefined"==typeof Buffer?n(1758):_typeof(Buffer))<"u",newBufferFrom:function(e,r){var t=n;if(Buffer.from&&Buffer[t(1790)]!==Uint8Array.from)return Buffer.from(e,r);if(typeof e==t(1653))throw new Error(t(1632));return new Buffer(e,r)},allocBuffer:function(e){var r=n;return Buffer[r(1448)]?Buffer[r(1448)](e):((e=new Buffer(e))[r(1690)](0),e)},isBuffer:function(e){return Buffer[n(2155)](e)},isStream:function(e){var r=n;return e&&typeof e.on==r(2082)&&"function"==typeof e.pause&&typeof e[r(807)]==r(2082)}}}),Z=r(function(e,r){var t=X;r[t(1317)]=typeof setImmediate==t(2082)?setImmediate:function(){var e=t,r=[][e(1366)][e(475)](arguments);r[e(1916)](1,0,0),setTimeout.apply(null,r)}}),J=r(function(e,r){var t,n,i,a,o=X,s=global.MutationObserver||global[o(762)],u=process[o(650)]?s?(t=0,s=new s(f),n=global[o(1122)][o(1691)](""),s.observe(n,{characterData:!0}),function(){n[o(625)]=t=++t%2}):!global.setImmediate&&_typeof(global.MessageChannel)<"u"?((i=new global.MessageChannel)[o(1637)][o(1995)]=f,function(){var e=o;i[e(1463)][e(975)](0)}):o(1122)in global&&o(1912)in global.document[o(1579)](o(1133))?function(){var r=o,t=global[r(1122)][r(1579)](r(1133));t[r(1912)]=function(){var e=r;f(),t[e(1912)]=null,t[e(662)].removeChild(t),t=null},global[r(1122)][r(1796)][r(1494)](t)}:function(){setTimeout(f,0)}:function(){process.nextTick(f)},c=[];function f(){a=!0;for(var e,r,t=c[o(847)];t;){for(r=c,c=[],e=-1;++e<t;)r[e]();t=c.length}a=!1}r.exports=function(e){1!==c[o(1922)](e)||a||u()}}),Y=r(function(e,r){var f=X,a=J();function h(){}var o,l={},s=[f(358)],u=["FULFILLED"],i=["PENDING"];function t(e){var r=f;if(typeof e!=r(2082))throw new TypeError(r(1370));this[r(1853)]=i,this[r(1247)]=[],this[r(578)]=void 0,process.browser||(this[r(786)]=o),e!==h&&p(this,e)}function c(e,r,t){var n=f;this[n(1941)]=e,"function"==typeof r&&(this[n(601)]=r,this[n(1695)]=this[n(434)]),typeof t==n(2082)&&(this[n(1044)]=t,this[n(379)]=this[n(859)])}function d(t,n,i){a(function(){var e,r=_0x3d6c;try{e=n(i)}catch(e){return l[r(863)](t,e)}e===t?l[r(863)](t,new TypeError(r(1209))):l.resolve(t,e)})}function v(e){var r=f,t=e&&e[r(542)];if(e&&(_typeof(e)==r(1361)||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function p(r,e){var t=f,n=!1;function i(e){n||(n=!0,l[_0x3d6c(863)](r,e))}function a(e){n||(n=!0,l[_0x3d6c(1515)](r,e))}var o=_(function(){e(a,i)});o.status===t(678)&&i(o[t(696)])}function _(e,r){var t=f,n={};try{n[t(696)]=e(r),n.status=t(1030)}catch(e){n.status=t(678),n[t(696)]=e}return n}process[f(650)]||(o=[f(796)]),(r[f(1317)]=t)[f(1809)][f(1818)]=function(t){var n,i=f;return"function"!=typeof t?this:(n=this[i(635)],this.then(function(e){return n.resolve(t()).then(function(){return e})},function(e){var r=i;return n[r(1515)](t())[r(542)](function(){throw e})}))},t[f(1809)].catch=function(e){return this[f(542)](null,e)},t[f(1809)][f(542)]=function(e,r){var t,n=f;return typeof e!=n(2082)&&this[n(1853)]===u||typeof r!=n(2082)&&this[n(1853)]===s?this:(t=new this.constructor(h),process[n(650)]||this[n(786)]===o&&(this[n(786)]=null),this[n(1853)]!==i?d(t,this[n(1853)]===u?e:r,this[n(578)]):this.queue[n(1922)](new c(t,e,r)),t)},c[f(1809)].callFulfilled=function(e){var r=f;l[r(1515)](this[r(1941)],e)},c[f(1809)][f(434)]=function(e){var r=f;d(this[r(1941)],this[r(601)],e)},c[f(1809)].callRejected=function(e){l[f(863)](this.promise,e)},c[f(1809)][f(859)]=function(e){d(this[f(1941)],this.onRejected,e)},l[f(1515)]=function(e,r){var t=f,n=_(v,r);if(n[t(1892)]===t(678))return l[t(863)](e,n[t(696)]);n=n[t(696)];if(n)p(e,n);else{e.state=u,e.outcome=r;for(var i=-1,a=e.queue.length;++i<a;)e[t(1247)][i][t(1695)](r)}return e},l.reject=function(r,t){var n=f;r[n(1853)]=s,r[n(578)]=t,process[n(650)]||r[n(786)]===o&&a(function(){var e=n;r[e(786)]===o&&process.emit(e(1700),t,r)});for(var e=-1,i=r[n(1247)][n(847)];++e<i;)r[n(1247)][e][n(379)](t);return r},t[f(1515)]=function(e){var r=f;return e instanceof this?e:l[r(1515)](new this(h),e)},t.reject=function(e){var r=new this(h);return l.reject(r,e)},t[f(1643)]=function(e){var n=f,i=this;if(Object[n(1809)][n(926)][n(1360)](e)!==n(2154))return this[n(863)](new TypeError(n(1638)));var a=e[n(847)],o=!1;if(!a)return this[n(1515)]([]);for(var s=new Array(a),u=0,r=-1,c=new this(h);++r<a;)((e,r)=>{var t=n;i[t(1515)](e)[t(542)](function(e){s[r]=e,++u!==a||o||(o=!0,l.resolve(c,s))},function(e){o||(o=!0,l[t(863)](c,e))})})(e[r],r);return c},t.race=function(e){var t=f,n=this;if(Object[t(1809)][t(926)][t(1360)](e)!==t(2154))return this.reject(new TypeError(t(1638)));var r=e[t(847)],i=!1;if(!r)return this.resolve([]);for(var a=-1,o=new this(h);++a<r;)(e=>{var r=t;n[r(1515)](e).then(function(e){i||(i=!0,l[r(1515)](o,e))},function(e){i||(i=!0,l.reject(o,e))})})(e[a]);return o}}),g=r(function(e,r){var t=X,n=null,n=(typeof Promise===t(1758)?t(1758):_typeof(Promise))<"u"?Promise:Y();r[t(1317)]={Promise:n}}),A=r(function(c){var f=X,h=_(),l=p(),t=b(),n=Z(),d=g();function e(e){return e}function v(e,r){for(var t=f,n=0;n<e.length;++n)r[n]=255&e[t(1080)](n);return r}c[f(1354)]=function(r,t){var n=f;c.checkSupport(n(1761));try{return new Blob([r],{type:t})}catch(e){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self[n(748)]||self[n(1660)]);return i[n(1184)](r),i[n(628)](t)}catch(e){throw new Error(n(1541))}}};var a={stringifyByChunk:function(e,r,t){var n=f,i=[],a=0,o=e[n(847)];if(o<=t)return String[n(333)][n(475)](null,e);for(;a<o;)r===n(1015)||r===n(1029)?i[n(1922)](String[n(333)][n(475)](null,e[n(1366)](a,Math[n(1881)](a+t,o)))):i.push(String.fromCharCode[n(475)](null,e.subarray(a,Math[n(1881)](a+t,o)))),a+=t;return i[n(1524)]("")},stringifyByChar:function(e){for(var r=f,t="",n=0;n<e.length;n++)t+=String[r(333)](e[n]);return t},applyCanBeUsed:{uint8array:(()=>{var e=f;try{return h[e(2104)]&&1===String[e(333)].apply(null,new Uint8Array(1))[e(847)]}catch(e){return!1}})(),nodebuffer:(()=>{var e=f;try{return h[e(1029)]&&1===String[e(333)][e(475)](null,t[e(462)](1)).length}catch(e){return!1}})()}};function r(e){var r=f,t=65536,n=c.getTypeOf(e),i=!0;if("uint8array"===n?i=a[r(1654)][r(2104)]:n===r(1029)&&(i=a[r(1654)][r(1029)]),i)for(;1<t;)try{return a[r(368)](e,n,t)}catch(e){t=Math.floor(t/2)}return a[r(1968)](e)}function i(e,r){for(var t=f,n=0;n<e[t(847)];n++)r[n]=e[n];return r}c[f(2125)]=r;var o={};o[f(2076)]={string:e,array:function(e){return v(e,new Array(e[f(847)]))},arraybuffer:function(e){var r=f;return o[r(2076)][r(2104)](e)[r(1261)]},uint8array:function(e){return v(e,new Uint8Array(e.length))},nodebuffer:function(e){return v(e,t[f(462)](e.length))}},o[f(1015)]={string:r,array:e,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return t[f(1282)](e)}},o[f(692)]={string:function(e){return r(new Uint8Array(e))},array:function(e){return i(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:e,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return t[f(1282)](new Uint8Array(e))}},o.uint8array={string:r,array:function(e){return i(e,new Array(e[f(847)]))},arraybuffer:function(e){return e[f(1261)]},uint8array:e,nodebuffer:function(e){return t.newBufferFrom(e)}},o[f(1029)]={string:r,array:function(e){return i(e,new Array(e.length))},arraybuffer:function(e){var r=f;return o[r(1029)].uint8array(e)[r(1261)]},uint8array:function(e){return i(e,new Uint8Array(e[f(847)]))},nodebuffer:e},c[f(1078)]=function(e,r){var t=f;if(r=r||"",!e)return r;c[t(401)](e);t=c[t(1218)](r);return o[t][e](r)},c[f(1218)]=function(e){var r=f;return typeof e==r(2076)?r(2076):Object[r(1809)][r(926)][r(1360)](e)===r(2154)?r(1015):h[r(1029)]&&t[r(2155)](e)?r(1029):h[r(2104)]&&e instanceof Uint8Array?r(2104):h[r(692)]&&e instanceof ArrayBuffer?r(692):void 0},c[f(401)]=function(e){var r=f;if(!h[e.toLowerCase()])throw new Error(e+r(1863))},c[f(709)]=65535,c[f(1182)]=-1,c[f(1523)]=function(e){for(var r,t=f,n="",i=0;i<(e||"")[t(847)];i++)n+="\\x"+((r=e[t(1080)](i))<16?"0":"")+r.toString(16)[t(1270)]();return n},c[f(904)]=function(e,r,t){n(function(){e[_0x3d6c(475)](t||null,r||[])})},c[f(638)]=function(e,r){function t(){}var n=f;t.prototype=r[n(1809)],e[n(1809)]=new t},c[f(1963)]=function(){for(var e,r=f,t={},n=0;n<arguments[r(847)];n++)for(e in arguments[n])arguments[n][r(1160)](e)&&"u"<_typeof(t[e])&&(t[e]=arguments[n][e]);return t},c[f(1410)]=function(i,e,a,o,s){var u=f;return d[u(552)][u(1515)](e)[u(542)](function(r){var a=u;return h.blob&&(r instanceof Blob||-1!==[a(1907),a(977)][a(726)](Object[a(1809)][a(926)].call(r)))&&(typeof FileReader===a(1758)?a(1758):_typeof(FileReader))<"u"?new d[a(552)](function(t,n){var i=a,e=new FileReader;e[i(512)]=function(e){var r=i;t(e.target[r(2131)])},e[i(2106)]=function(e){var r=i;n(e[r(1387)][r(678)])},e.readAsArrayBuffer(r)}):r})[u(542)](function(e){var r,t=u,n=c.getTypeOf(e);return n?(n===t(692)?e=c.transformTo(t(2104),e):n===t(2076)&&(s?e=l[t(1872)](e):a&&!0!==o&&(e=v(n=e,new(h[(r=_0x3d6c)(2104)]?Uint8Array:Array)(n[r(847)])))),e):d[t(552)][t(863)](new Error(t(1554)+i+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}}),S=r(function(e,r){var i=X;function t(e){var r=_0x3d6c;this.name=e||r(1152),this[r(1726)]={},this.generatedError=null,this[r(384)]={},this[r(1432)]=!0,this.isFinished=!1,this[r(417)]=!1,this._listeners={data:[],end:[],error:[]},this[r(630)]=null}t[i(1809)]={push:function(e){var r=i;this[r(2036)](r(625),e)},end:function(){var r=i;if(this[r(816)])return!1;this[r(2151)]();try{this[r(2036)](r(2007)),this[r(869)](),this[r(816)]=!0}catch(e){this[r(2036)](r(678),e)}return!0},error:function(e){var r=i;return!this[r(816)]&&(this[r(1432)]?this[r(970)]=e:(this.isFinished=!0,this[r(2036)](r(678),e),this[r(630)]&&this[r(630)][r(678)](e),this[r(869)]()),!0)},on:function(e,r){return this[i(2014)][e].push(r),this},cleanUp:function(){var e=i;this[e(1726)]=this[e(970)]=this.extraStreamInfo=null,this[e(2014)]=[]},emit:function(e,r){var t=i;if(this[t(2014)][e])for(var n=0;n<this[t(2014)][e].length;n++)this[t(2014)][e][n].call(this,r)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){var r=i;if(this[r(417)])throw new Error("The stream '"+this+r(961));this[r(1726)]=e[r(1726)],this[r(1230)](),this[r(630)]=e;var t=this;return e.on(r(625),function(e){t[r(1711)](e)}),e.on(r(2007),function(){t[r(2007)]()}),e.on(r(678),function(e){t.error(e)}),this},pause:function(){var e=i;return!this[e(1432)]&&!this[e(816)]&&(this[e(1432)]=!0,this[e(630)]&&this.previous[e(1722)](),!0)},resume:function(){var e,r=i;return!(!this[r(1432)]||this.isFinished||(e=this.isPaused=!1,this[r(970)]&&(this[r(678)](this[r(970)]),e=!0),this[r(630)]&&this.previous[r(807)](),e))},flush:function(){},processChunk:function(e){this[i(1922)](e)},withStreamInfo:function(e,r){var t=i;return this[t(384)][e]=r,this[t(1230)](),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){var e=i;if(this[e(417)])throw new Error(e(1518)+this+e(961));this[e(417)]=!0,this[e(630)]&&this[e(630)].lock()},toString:function(){var e=i,r=e(1374)+this[e(741)];return this.previous?this.previous+e(1377)+r:r}},r.exports=t}),D=r(function(a){for(var e,h=X,c=A(),l=_(),d=b(),r=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 t(){var e=h;r.call(this,e(686)),this[e(1331)]=null}function n(){var e=h;r[e(1360)](this,e(867))}a[h(750)]=function(e){var r=h;if(l[r(1029)])return d[r(1282)](e,r(946));for(var t,n,i,a,o=e,s=_0x3d6c,u=o.length,c=0,f=0;f<u;f++)55296==(64512&(n=o.charCodeAt(f)))&&f+1<u&&56320==(64512&(i=o[s(1080)](f+1)))&&(n=65536+(n-55296<<10)+(i-56320),f++),c+=n<128?1:n<2048?2:n<65536?3:4;for(t=new(l[s(2104)]?Uint8Array:Array)(c),f=a=0;a<c;f++)55296==(64512&(n=o[s(1080)](f)))&&f+1<u&&56320==(64512&(i=o[s(1080)](f+1)))&&(n=65536+(n-55296<<10)+(i-56320),f++),n<128?t[a++]=n:(n<2048?t[a++]=192|n>>>6:(n<65536?t[a++]=224|n>>>12:(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63),t[a++]=128|n>>>6&63),t[a++]=128|63&n);return t},a.utf8decode=function(e){var r=h;if(l.nodebuffer)return c[r(1078)](r(1029),e)[r(926)](r(946));for(var t,n,i=e=c[r(1078)](l[r(2104)]?r(2104):r(1015),e),r=_0x3d6c,a=i[r(847)],o=new Array(2*a),s=0,u=0;u<a;)if((t=i[u++])<128)o[s++]=t;else if(4<(n=f[t]))o[s++]=65533,u+=n-1;else{for(t&=2===n?31:3===n?15:7;1<n&&u<a;)t=t<<6|63&i[u++],n--;1<n?o[s++]=65533:t<65536?o[s++]=t:(t-=65536,o[s++]=55296|t>>10&1023,o[s++]=56320|1023&t)}return o[r(847)]!==s&&(o[r(731)]?o=o[r(731)](0,s):o[r(847)]=s),c[r(2125)](o)},c[h(638)](t,r),t.prototype[h(1711)]=function(e){var r=h,t=c.transformTo(l[r(2104)]?"uint8array":"array",e[r(625)]),n=(this[r(1331)]&&this[r(1331)][r(847)]&&(l.uint8array?(n=t,(t=new Uint8Array(n[r(847)]+this.leftOver.length))[r(1033)](this.leftOver,0),t[r(1033)](n,this.leftOver[r(847)])):t=this.leftOver[r(1890)](t),this[r(1331)]=null),((e,r)=>{for(var t=_0x3d6c,n=(r=(r=r||e[t(847)])>e[t(847)]?e[t(847)]:r)-1;0<=n&&128==(192&e[n]);)n--;return!(n<0||0===n)&&n+f[e[n]]>r?n:r})(t)),i=t;n!==t[r(847)]&&(l[r(2104)]?(i=t[r(731)](0,n),this[r(1331)]=t[r(731)](n,t[r(847)])):(i=t[r(1366)](0,n),this.leftOver=t[r(1366)](n,t.length))),this[r(1922)]({data:a[r(2045)](i),meta:e[r(454)]})},t[h(1809)].flush=function(){var e=h;this[e(1331)]&&this[e(1331)][e(847)]&&(this.push({data:a[e(2045)](this.leftOver),meta:{}}),this[e(1331)]=null)},a[h(1216)]=t,c[h(638)](n,r),n[h(1809)][h(1711)]=function(e){var r=h;this.push({data:a[r(750)](e.data),meta:e[r(454)]})},a[h(766)]=n}),Q=r(function(e,r){var t=X,n=S(),i=A();function a(e){var r=_0x3d6c;n[r(1360)](this,"ConvertWorker to "+e),this[r(980)]=e}i[t(638)](a,n),a[t(1809)][t(1711)]=function(e){var r=t;this[r(1922)]({data:i[r(1078)](this[r(980)],e.data),meta:e[r(454)]})},r[t(1317)]=a}),ee=r(function(e,r){var t=X,o=s()[t(1126)];function n(e,r,n){var i=t,a=(o[i(1360)](this,r),this[i(324)]=e,this);e.on(i(625),function(e,r){var t=i;a[t(1922)](e)||a[t(324)].pause(),n&&n(r)}).on("error",function(e){var r=i;a.emit(r(678),e)}).on(i(2007),function(){a[i(1922)](null)})}A()[t(638)](n,o),n[t(1809)][t(660)]=function(){var e=t;this[e(324)][e(807)]()},r[t(1317)]=n}),w=r(function(e,r){var c=X,f=A(),a=Q(),o=S(),h=p(),t=_(),n=g(),i=null;if(t[c(754)])try{i=ee()}catch(e){}function s(e,u){return new n.Promise(function(r,t){var n=_0x3d6c,i=[],a=e[n(1104)],o=e[n(466)],s=e._mimeType;e.on(n(625),function(e,r){i[n(1922)](e),u&&u(r)}).on(n(678),function(e){i=[],t(e)}).on(n(2007),function(){try{var e=((e,r,t)=>{var n=c;switch(e){case n(1761):return f[n(1354)](f[n(1078)](n(692),r),t);case n(675):return h.encode(r);default:return f[n(1078)](e,r)}})(o,((e,r)=>{for(var t=c,n=0,i=null,a=0,o=0;o<r.length;o++)a+=r[o].length;switch(e){case t(2076):return r[t(1524)]("");case"array":return Array.prototype[t(1890)].apply([],r);case t(2104):for(i=new Uint8Array(a),o=0;o<r[t(847)];o++)i[t(1033)](r[o],n),n+=r[o][t(847)];return i;case"nodebuffer":return Buffer[t(1890)](r);default:throw new Error(t(985)+e+"'")}})(a,i),s);r(e)}catch(e){t(e)}i=[]}).resume()})}function u(e,r,t){var n=c,i=r;switch(r){case"blob":case n(692):i=n(2104);break;case n(675):i="string"}try{this[n(1104)]=i,this._outputType=r,this[n(1866)]=t,f.checkSupport(i),this[n(889)]=e[n(1949)](new a(i)),e[n(619)]()}catch(e){this[n(889)]=new o(n(678)),this._worker[n(678)](e)}}u[c(1809)]={accumulate:function(e){return s(this,e)},on:function(e,r){var t=this;return"data"===e?this._worker.on(e,function(e){r[_0x3d6c(1360)](t,e.data,e.meta)}):this._worker.on(e,function(){f[_0x3d6c(904)](r,arguments,t)}),this},resume:function(){var e=c;return f[e(904)](this[e(889)].resume,[],this[e(889)]),this},pause:function(){var e=c;return this._worker[e(1722)](),this},toNodejsStream:function(e){var r=c;if(f[r(401)](r(754)),this._outputType!==r(1029))throw new Error(this[r(466)]+" is not supported by this method");return new i(this,{objectMode:this[r(466)]!==r(1029)},e)}},r[c(1317)]=u}),re=r(function(e){var r=X;e[r(675)]=!1,e[r(654)]=!1,e[r(2019)]=!1,e[r(1954)]=!0,e[r(2134)]=null,e[r(1960)]=null,e.compressionOptions=null,e[r(1992)]=null,e.unixPermissions=null,e[r(832)]=null}),te=r(function(e,r){var n=X,i=A(),a=S();function t(e){var t=_0x3d6c,n=(a[t(1360)](this,t(1544)),this);this[t(1676)]=!1,this[t(1986)]=0,this[t(851)]=0,this[t(625)]=null,this[t(1443)]="",this[t(1382)]=!1,e.then(function(e){var r=t;n[r(1676)]=!0,n.data=e,n[r(851)]=e&&e[r(847)]||0,n.type=i.getTypeOf(e),n[r(1432)]||n._tickAndRepeat()},function(e){n[t(678)](e)})}i.inherits(t,a),t[n(1809)].cleanUp=function(){var e=n;a[e(1809)][e(869)][e(1360)](this),this[e(625)]=null},t[n(1809)][n(807)]=function(){var e=n;return!!a[e(1809)][e(807)][e(1360)](this)&&(!this._tickScheduled&&this.dataIsReady&&(this[e(1382)]=!0,i[e(904)](this[e(1271)],[],this)),!0)},t[n(1809)][n(1271)]=function(){var e=n;this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this[e(816)])||(i[e(904)](this._tickAndRepeat,[],this),this[e(1382)]=!0)},t[n(1809)][n(527)]=function(){var e=n;if(this[e(1432)]||this[e(816)])return!1;var r=null,t=Math[e(1881)](this.max,this[e(1986)]+16384);if(this[e(1986)]>=this[e(851)])return this[e(2007)]();switch(this[e(1443)]){case"string":r=this[e(625)][e(2016)](this[e(1986)],t);break;case e(2104):r=this[e(625)][e(731)](this[e(1986)],t);break;case"array":case"nodebuffer":r=this[e(625)][e(1366)](this[e(1986)],t)}return this[e(1986)]=t,this[e(1922)]({data:r,meta:{percent:this[e(851)]?this[e(1986)]/this[e(851)]*100:0}})},r.exports=t}),h=r(function(e,r){var p=A();var _=(()=>{for(var e=[],r=0;r<256;r++){for(var t=r,n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})();r.exports=function(e,r){var t=_0x3d6c;if("u"<_typeof(e)||!e[t(847)])return 0;var n=p[t(1218)](e)!==t(2076);if(n){var i=0|r,a=e,n=e[t(847)],t=0,o=_,s=t+n;i^=-1;for(var u=t;u<s;u++)i=i>>>8^o[255&(i^a[u])];return-1^i}var c=0|r,f=e,n=e.length,t=0,h=_0x3d6c,l=_,d=t+n;c^=-1;for(var v=t;v<d;v++)c=c>>>8^l[255&(c^f[h(1080)](v))];return-1^c}}),ne=r(function(e,r){var t=X,n=S(),i=h();function a(){var e=_0x3d6c;n[e(1360)](this,"Crc32Probe"),this[e(1499)](e(1876),0)}A().inherits(a,n),a[t(1809)][t(1711)]=function(e){var r=t;this[r(1726)].crc32=i(e[r(625)],this[r(1726)].crc32||0),this[r(1922)](e)},r.exports=a}),ie=r(function(e,r){var t=X,n=A(),i=S();function a(e){var r=_0x3d6c;i.call(this,r(778)+e),this.propName=e,this[r(1499)](e,0)}n[t(638)](a,i),a[t(1809)][t(1711)]=function(e){var r=t;e&&(r=this.streamInfo[this[r(944)]]||0,this.streamInfo[this.propName]=r+e.data.length),i.prototype.processChunk.call(this,e)},r[t(1317)]=a}),O=r(function(e,r){var i=X,n=g(),a=te(),o=ne(),s=ie();function t(e,r,t,n,i){var a=_0x3d6c;this[a(1173)]=e,this[a(567)]=r,this[a(1876)]=t,this[a(1960)]=n,this.compressedContent=i}t[i(1809)]={getContentWorker:function(){var r=i,e=new a(n[r(552)][r(1515)](this[r(1789)]))[r(1949)](this[r(1960)].uncompressWorker())[r(1949)](new s(r(383))),t=this;return e.on(r(2007),function(){var e=r;if(this[e(1726)].data_length!==t[e(567)])throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){var e=i;return new a(n[e(552)][e(1515)](this[e(1789)]))[e(1499)]("compressedSize",this[e(1173)])[e(1499)](e(567),this[e(567)])[e(1499)]("crc32",this[e(1876)])[e(1499)](e(1960),this[e(1960)])}},t[i(1117)]=function(e,r,t){var n=i;return e[n(1949)](new o)[n(1949)](new s(n(567)))[n(1949)](r[n(1296)](t))[n(1949)](new s(n(1173)))[n(1499)]("compression",r)},r[i(1317)]=t}),ae=r(function(e,r){for(var t,n=X,o=w(),i=te(),s=D(),a=O(),u=S(),c=function(e,r,t){var n=_0x3d6c;this[n(741)]=e,this[n(2019)]=t[n(2019)],this[n(2134)]=t[n(2134)],this[n(1992)]=t[n(1992)],this[n(1295)]=t[n(1295)],this[n(832)]=t[n(832)],this[n(2010)]=r,this._dataBinary=t.binary,this.options={compression:t.compression,compressionOptions:t.compressionOptions}},f=(c.prototype={internalStream:function(e){var r=_0x3d6c,t=null,n=r(2076);try{if(!e)throw new Error(r(2038));var i=(n=e[r(570)]())===r(2076)||n===r(1138),a=("binarystring"!==n&&n!==r(1138)||(n=r(2076)),t=this[r(1406)](),!this[r(1161)]);a&&!i&&(t=t[r(1949)](new s[r(766)])),!a&&i&&(t=t[r(1949)](new s[r(1216)]))}catch(e){(t=new u(r(678)))[r(678)](e)}return new o(t,n,"")},async:function(e,r){var t=_0x3d6c;return this.internalStream(e)[t(1493)](r)},nodeStream:function(e,r){var t=_0x3d6c;return this[t(984)](e||t(1029)).toNodejsStream(r)},_compressWorker:function(e,r){var t,n=_0x3d6c;return this[n(2010)]instanceof a&&this[n(2010)][n(1960)][n(1558)]===e[n(1558)]?this[n(2010)][n(1460)]():(t=this[n(1406)](),this[n(1161)]||(t=t[n(1949)](new s[n(766)])),a.createWorkerFrom(t,e,r))},_decompressWorker:function(){var e=_0x3d6c;return this[e(2010)]instanceof a?this[e(2010)][e(1724)]():this._data instanceof u?this[e(2010)]:new i(this[e(2010)])}},[n(1402),n(1868),"asNodeBuffer",n(911),n(938)]),h=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},t=0;t<f[n(847)];t++)c[n(1809)][f[t]]=h;r[n(1317)]=c}),$=r(function(t){var u=X,e=(typeof Uint8Array===u(1758)?u(1758):_typeof(Uint8Array))<"u"&&("undefined"==typeof Uint16Array?"undefined":_typeof(Uint16Array))<"u"&&(typeof Int32Array===u(1758)?u(1758):_typeof(Int32Array))<"u";t[u(1465)]=function(e){for(var r,t,n,i=u,a=Array[i(1809)][i(1366)].call(arguments,1);a[i(847)];){var o=a[i(769)]();if(o){if(_typeof(o)!=i(1361))throw new TypeError(o+i(1357));for(var s in o)r=o,t=s,n=void 0,n=u,Object[n(1809)][n(1160)].call(r,t)&&(e[s]=o[s])}}return e},t.shrinkBuf=function(e,r){var t=u;return e[t(847)]===r?e:e[t(731)]?e[t(731)](0,r):(e.length=r,e)};var n={arraySet:function(e,r,t,n,i){var a=u;if(r[a(731)]&&e[a(731)])e[a(1033)](r.subarray(t,t+n),i);else for(var o=0;o<n;o++)e[i+o]=r[t+o]},flattenChunks:function(e){for(var r,t,n,i=u,a=0,o=0,s=e[i(847)];o<s;o++)a+=e[o][i(847)];for(n=new Uint8Array(a),o=r=0,s=e[i(847)];o<s;o++)t=e[o],n[i(1033)](t,r),r+=t[i(847)];return n}},i={arraySet:function(e,r,t,n,i){for(var a=0;a<n;a++)e[i+a]=r[t+a]},flattenChunks:function(e){return[][u(1890)].apply([],e)}};t[u(540)]=function(e){var r=u;e?(t.Buf8=Uint8Array,t[r(469)]=Uint16Array,t[r(1013)]=Int32Array,t[r(1465)](t,n)):(t[r(1985)]=Array,t.Buf16=Array,t[r(1013)]=Array,t.assign(t,i))},t[u(540)](e)}),oe=r(function(e){var r=X,o=$(),l=0,d=1;function t(e){for(var r=e.length;0<=--r;)e[r]=0}var u,c,f,h=29,v=256,p=v+1+h,_=30,g=19,S=2*p+1,D=15,i=16,L=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],H=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],C=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],E=new Array(2*(p+2)),A=(t(E),new Array(2*_)),O=(t(A),new Array(512)),T=(t(O),new Array(256)),B=(t(T),new Array(h)),P=(t(B),new Array(_));function F(e,r,t,n,i){var a=_0x3d6c;this[a(2079)]=e,this[a(452)]=r,this[a(879)]=t,this[a(1902)]=n,this[a(1944)]=i,this.has_stree=e&&e[a(847)]}function I(e,r){var t=_0x3d6c;this[t(362)]=e,this[t(1045)]=0,this.stat_desc=r}function U(e){return e<256?O[e]:O[256+(e>>>7)]}function a(e,r){var t=_0x3d6c;e.pending_buf[e[t(1822)]++]=255&r,e[t(2153)][e[t(1822)]++]=r>>>8&255}function R(e,r,t){var n=_0x3d6c;e.bi_valid>i-t?(e[n(1648)]|=r<<e[n(1962)]&65535,a(e,e[n(1648)]),e[n(1648)]=r>>i-e[n(1962)],e[n(1962)]+=t-i):(e[n(1648)]|=r<<e[n(1962)]&65535,e[n(1962)]+=t)}function j(e,r,t){R(e,t[2*r],t[2*r+1])}function M(e,r){for(var t=0;t|=1&e,e>>>=1,t<<=1,0<--r;);return t>>>1}function z(e,r,t){for(var n,i=new Array(D+1),a=0,o=1;o<=D;o++)i[o]=a=a+t[o-1]<<1;for(n=0;n<=r;n++){var s=e[2*n+1];0!==s&&(e[2*n]=M(i[s]++,s))}}function q(e){for(var r=_0x3d6c,t=0;t<p;t++)e[r(2141)][2*t]=0;for(t=0;t<_;t++)e[r(1204)][2*t]=0;for(t=0;t<g;t++)e.bl_tree[2*t]=0;e[r(2141)][2*m]=1,e[r(632)]=e[r(1213)]=0,e.last_lit=e[r(1188)]=0}function W(e){var r=_0x3d6c;8<e.bi_valid?a(e,e[r(1648)]):0<e[r(1962)]&&(e[r(2153)][e[r(1822)]++]=e.bi_buf),e[r(1648)]=0,e[r(1962)]=0}function s(e,r,t,n){var i=2*r,a=2*t;return e[i]<e[a]||e[i]===e[a]&&n[r]<=n[t]}function N(e,r,t){for(var n=_0x3d6c,i=e[n(1411)][t],a=t<<1;a<=e[n(1735)]&&(a<e[n(1735)]&&s(r,e[n(1411)][a+1],e[n(1411)][a],e[n(954)])&&a++,!s(r,i,e.heap[a],e[n(954)]));)e[n(1411)][t]=e[n(1411)][a],t=a,a<<=1;e[n(1411)][t]=i}function V(e,r,t){var n,i,a,o,s=_0x3d6c,u=0;if(0!==e[s(349)])for(;n=e[s(2153)][e[s(2003)]+2*u]<<8|e[s(2153)][e[s(2003)]+2*u+1],i=e[s(2153)][e[s(2049)]+u],u++,0==n?j(e,i,r):(j(e,(a=T[i])+v+1,r),0!==(o=k[a])&&R(e,i-=B[a],o),j(e,a=U(--n),t),0!==(o=x[a])&&R(e,n-=P[a],o)),u<e[s(349)];);j(e,m,r)}function G(e,r){var t,n,i,a=_0x3d6c,o=r.dyn_tree,s=r[a(1806)].static_tree,u=r[a(1806)][a(427)],c=r[a(1806)].elems,f=-1;for(e[a(1735)]=0,e[a(1604)]=S,t=0;t<c;t++)0!==o[2*t]?(e[a(1411)][++e.heap_len]=f=t,e[a(954)][t]=0):o[2*t+1]=0;for(;e[a(1735)]<2;)o[2*(i=e[a(1411)][++e.heap_len]=f<2?++f:0)]=1,e[a(954)][i]=0,e[a(632)]--,u&&(e.static_len-=s[2*i+1]);for(r[a(1045)]=f,t=e.heap_len>>1;1<=t;t--)N(e,o,t);for(i=c;t=e[a(1411)][1],e[a(1411)][1]=e[a(1411)][e[a(1735)]--],N(e,o,1),n=e.heap[1],e[a(1411)][--e[a(1604)]]=t,e[a(1411)][--e[a(1604)]]=n,o[2*i]=o[2*t]+o[2*n],e.depth[i]=(e[a(954)][t]>=e[a(954)][n]?e[a(954)][t]:e[a(954)][n])+1,o[2*t+1]=o[2*n+1]=i,e[a(1411)][1]=i++,N(e,o,1),2<=e[a(1735)];);e[a(1411)][--e[a(1604)]]=e[a(1411)][1];for(var h,l,d,v,p,_=e,g=_0x3d6c,m=r[g(362)],y=r[g(1045)],b=r.stat_desc[g(2079)],w=r[g(1806)][g(427)],k=r.stat_desc[g(452)],x=r[g(1806)][g(879)],C=r.stat_desc.max_length,E=0,A=0;A<=D;A++)_[g(1879)][A]=0;for(m[2*_[g(1411)][_[g(1604)]]+1]=0,h=_.heap_max+1;h<S;h++)C<(A=m[2*m[2*(l=_[g(1411)][h])+1]+1]+1)&&(A=C,E++),m[2*l+1]=A,y<l||(_[g(1879)][A]++,v=0,x<=l&&(v=k[l-x]),p=m[2*l],_[g(632)]+=p*(A+v),!w)||(_[g(1213)]+=p*(b[2*l+1]+v));if(0!==E){do{for(A=C-1;0===_[g(1879)][A];)A--}while(_[g(1879)][A]--,_[g(1879)][A+1]+=2,_[g(1879)][C]--,0<(E-=2));for(A=C;0!==A;A--)for(l=_[g(1879)][A];0!==l;)y<(d=_.heap[--h])||(m[2*d+1]!==A&&(_[g(632)]+=(A-m[2*d+1])*m[2*d],m[2*d+1]=A),l--)}z(o,f,e[a(1879)])}function K(e,r,t){var n,i,a=_0x3d6c,o=-1,s=r[1],u=0,c=7,f=4;for(0===s&&(c=138,f=3),r[2*(t+1)+1]=65535,n=0;n<=t;n++)i=s,s=r[2*(n+1)+1],++u<c&&i===s||(u<f?e[a(1345)][2*i]+=u:0!==i?(i!==o&&e.bl_tree[2*i]++,e[a(1345)][2*y]++):u<=10?e.bl_tree[2*b]++:e[a(1345)][2*w]++,o=i,f=(u=0)===s?(c=138,3):i===s?(c=6,3):(c=7,4))}function Z(e,r,t){var n,i,a=_0x3d6c,o=-1,s=r[1],u=0,c=7,f=4;for(0===s&&(c=138,f=3),n=0;n<=t;n++)if(i=s,s=r[2*(n+1)+1],!(++u<c&&i===s)){if(u<f)for(;j(e,i,e[a(1345)]),0!=--u;);else 0!==i?(i!==o&&(j(e,i,e[a(1345)]),u--),j(e,y,e.bl_tree),R(e,u-3,2)):u<=10?(j(e,b,e[a(1345)]),R(e,u-3,3)):(j(e,w,e[a(1345)]),R(e,u-11,7));o=i,f=(u=0)===s?(c=138,3):i===s?(c=6,3):(c=7,4)}}t(P);var J=!1;function Y(e,r,t,n){var i;R(e,0+(n?1:0),3),n=r,r=t,t=!0,i=_0x3d6c,W(e=e),t&&(a(e,r),a(e,~r)),o[i(1574)](e[i(2153)],e[i(858)],n,r,e[i(1822)]),e[i(1822)]+=r}e[r(891)]=function(e){var r=_0x3d6c;if(!J){for(var t,n,i,a=new Array(D+1),o=0,s=0;s<h-1;s++)for(B[s]=o,t=0;t<1<<k[s];t++)T[o++]=s;for(T[o-1]=s,s=i=0;s<16;s++)for(P[s]=i,t=0;t<1<<x[s];t++)O[i++]=s;for(i>>=7;s<_;s++)for(P[s]=i<<7,t=0;t<1<<x[s]-7;t++)O[256+i++]=s;for(n=0;n<=D;n++)a[n]=0;for(t=0;t<=143;)E[2*t+1]=8,t++,a[8]++;for(;t<=255;)E[2*t+1]=9,t++,a[9]++;for(;t<=279;)E[2*t+1]=7,t++,a[7]++;for(;t<=287;)E[2*t+1]=8,t++,a[8]++;for(z(E,p+1,a),t=0;t<_;t++)A[2*t+1]=5,A[2*t]=M(t,5);u=new F(E,k,v+1,p,D),c=new F(A,x,0,_,D),f=new F(new Array(0),H,0,g,L),J=!0}e.l_desc=new I(e[r(2141)],u),e[r(591)]=new I(e[r(1204)],c),e[r(426)]=new I(e.bl_tree,f),e[r(1648)]=0,e[r(1962)]=0,q(e)},e[r(1226)]=Y,e[r(1098)]=function(e,r,t,n){var i,a,o=_0x3d6c,s=0;if(0<e[o(1424)]?(2===e[o(1602)][o(746)]&&(e.strm[o(746)]=(e=>{for(var r=_0x3d6c,t=4093624447,n=0;n<=31;n++,t>>>=1)if(1&t&&0!==e[r(2141)][2*n])return l;if(0!==e[r(2141)][18]||0!==e[r(2141)][20]||0!==e[r(2141)][26])return d;for(n=32;n<v;n++)if(0!==e[r(2141)][2*n])return d;return l})(e)),G(e,e[o(1555)]),G(e,e[o(591)]),s=(e=>{var r,t=_0x3d6c;for(K(e,e.dyn_ltree,e[t(1555)][t(1045)]),K(e,e[t(1204)],e.d_desc.max_code),G(e,e[t(426)]),r=g-1;3<=r&&0===e.bl_tree[2*C[r]+1];r--);return e.opt_len+=3*(r+1)+5+5+4,r})(e),i=e[o(632)]+3+7>>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=t+5,t+4<=i&&-1!==r)Y(e,r,t,n);else if(4===e[o(2070)]||a===i)R(e,2+(n?1:0),3),V(e,E,A);else{R(e,4+(n?1:0),3);var u,c=e,f=(r=e[o(1555)][o(1045)]+1,t=e[o(591)].max_code+1,s+1),h=_0x3d6c;for(R(c,r-257,5),R(c,t-1,5),R(c,f-4,4),u=0;u<f;u++)R(c,c[h(1345)][2*C[u]+1],3);Z(c,c[h(2141)],r-1),Z(c,c[h(1204)],t-1),V(e,e.dyn_ltree,e[o(1204)])}q(e),n&&W(e)},e[r(1166)]=function(e,r,t){var n=_0x3d6c;return e[n(2153)][e.d_buf+2*e.last_lit]=r>>>8&255,e.pending_buf[e[n(2003)]+2*e.last_lit+1]=255&r,e[n(2153)][e[n(2049)]+e[n(349)]]=255&t,e.last_lit++,0===r?e.dyn_ltree[2*t]++:(e.matches++,r--,e.dyn_ltree[2*(T[t]+v+1)]++,e[n(1204)][2*U(r)]++),e[n(349)]===e[n(1414)]-1},e[r(412)]=function(e){var r;R(e,2,3),j(e,m,E),16===(e=e)[(r=_0x3d6c)(1962)]?(a(e,e[r(1648)]),e[r(1648)]=0,e[r(1962)]=0):8<=e.bi_valid&&(e.pending_buf[e[r(1822)]++]=255&e[r(1648)],e.bi_buf>>=8,e[r(1962)]-=8)}}),se=r(function(e,r){r.exports=function(e,r,t,n){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;0!==t;){for(t-=o=2e3<t?2e3:t;a=a+(i=i+r[n++]|0)|0,--o;);i%=65521,a%=65521}return i|a<<16|0}}),ue=r(function(e,r){var t=X;var s=(()=>{for(var e=[],r=0;r<256;r++){for(var t=r,n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})();r[t(1317)]=function(e,r,t,n){var i=s,a=n+t;e^=-1;for(var o=n;o<a;o++)e=e>>>8^i[255&(e^r[o])];return-1^e}}),K=r(function(e,r){var t=X;r.exports={2:"need dictionary",1:t(917),0:"","-1":"file error","-2":t(442),"-3":t(357),"-4":t(596),"-5":t(1981),"-6":t(2001)}}),ce=r(function(e){var u,r=X,d=$(),c=oe(),v=se(),p=ue(),j=K(),f=0,h=4,l=0,_=-2,N=-1,G=4,L=2,g=8,H=9,t=286,U=30,M=19,z=2*t+1,q=15,m=3,y=258,b=y+m+1,w=42,k=113,x=1,C=2,E=3,A=4;function S(e,r){return e[_0x3d6c(1433)]=j[r],r}function D(e){return(e<<1)-(4<e?9:0)}function O(e){for(var r=e.length;0<=--r;)e[r]=0}function T(e){var r=_0x3d6c,t=e[r(1853)],n=t[r(1822)];0!==(n=n>e.avail_out?e[r(1279)]:n)&&(d[r(1574)](e[r(2102)],t[r(2153)],t[r(645)],n,e[r(1661)]),e[r(1661)]+=n,t[r(645)]+=n,e[r(1841)]+=n,e[r(1279)]-=n,t[r(1822)]-=n,0===t[r(1822)])&&(t[r(645)]=0)}function B(e,r){var t=_0x3d6c;c[t(1098)](e,0<=e[t(1943)]?e[t(1943)]:-1,e.strstart-e[t(1943)],r),e[t(1943)]=e[t(2069)],T(e.strm)}function P(e,r){var t=_0x3d6c;e[t(2153)][e[t(1822)]++]=r}function F(e,r){var t=_0x3d6c;e[t(2153)][e[t(1822)]++]=r>>>8&255,e[t(2153)][e.pending++]=255&r}function o(e,r){var t,n,i=_0x3d6c,a=e[i(1348)],o=e[i(2069)],s=e[i(1130)],u=e[i(940)],c=e[i(2069)]>e[i(668)]-b?e.strstart-(e[i(668)]-b):0,f=e[i(858)],h=e[i(712)],l=e[i(2048)],d=e.strstart+y,v=f[o+s-1],p=f[o+s];e[i(1130)]>=e.good_match&&(a>>=2),e.lookahead<u&&(u=e[i(928)]);do{if(f[(t=r)+s]===p&&f[t+s-1]===v&&f[t]===f[o]&&f[++t]===f[o+1]){for(o+=2,t++;f[++o]===f[++t]&&f[++o]===f[++t]&&f[++o]===f[++t]&&f[++o]===f[++t]&&f[++o]===f[++t]&&f[++o]===f[++t]&&f[++o]===f[++t]&&f[++o]===f[++t]&&o<d;);if(n=y-(d-o),o=d-y,s<n){if(e.match_start=r,u<=(s=n))break;v=f[o+s-1],p=f[o+s]}}}while((r=l[r&h])>c&&0!=--a);return s<=e[i(928)]?s:e.lookahead}function I(e){var r,t,n,i,a,o,s,u,c,f,h=_0x3d6c,l=e[h(668)];do{if(u=e.window_size-e[h(928)]-e[h(2069)],e[h(2069)]>=l+(l-b)){for(d.arraySet(e[h(858)],e[h(858)],l,l,0),e[h(2135)]-=l,e.strstart-=l,e[h(1943)]-=l,r=t=e[h(1850)];n=e[h(1511)][--r],e[h(1511)][r]=l<=n?n-l:0,--t;);for(r=t=l;n=e[h(2048)][--r],e[h(2048)][r]=l<=n?n-l:0,--t;);u+=l}if(0===e[h(1602)][h(1595)])break;if(a=e.strm,o=e.window,s=e.strstart+e.lookahead,u=u,f=c=void 0,f=a[(c=_0x3d6c)(1595)],t=0===(f=u<f?u:f)?0:(a[c(1595)]-=f,d[c(1574)](o,a[c(334)],a[c(1762)],f,s),1===a[c(1853)][c(941)]?a[c(526)]=v(a[c(526)],o,f,s):2===a.state[c(941)]&&(a[c(526)]=p(a.adler,o,f,s)),a.next_in+=f,a[c(1923)]+=f,f),e[h(928)]+=t,e[h(928)]+e[h(1625)]>=m)for(i=e.strstart-e[h(1625)],e[h(1542)]=e[h(858)][i],e.ins_h=(e.ins_h<<e.hash_shift^e.window[i+1])&e[h(413)];e[h(1625)]&&(e[h(1542)]=(e[h(1542)]<<e[h(493)]^e[h(858)][i+m-1])&e[h(413)],e.prev[i&e[h(712)]]=e.head[e[h(1542)]],e.head[e[h(1542)]]=i,i++,e.insert--,!(e[h(928)]+e[h(1625)]<m)););}while(e[h(928)]<b&&0!==e[h(1602)][h(1595)])}function n(e,r){for(var t,n,i=_0x3d6c;;){if(e.lookahead<b){if(I(e),e.lookahead<b&&r===f)return x;if(0===e[i(928)])break}if(t=0,m<=e.lookahead&&(e[i(1542)]=(e[i(1542)]<<e[i(493)]^e[i(858)][e[i(2069)]+m-1])&e[i(413)],t=e[i(2048)][e[i(2069)]&e[i(712)]]=e[i(1511)][e[i(1542)]],e[i(1511)][e[i(1542)]]=e[i(2069)]),0!==t&&e[i(2069)]-t<=e[i(668)]-b&&(e.match_length=o(e,t)),e[i(652)]>=m)if(n=c[i(1166)](e,e[i(2069)]-e[i(2135)],e[i(652)]-m),e[i(928)]-=e[i(652)],e[i(652)]<=e.max_lazy_match&&e[i(928)]>=m){for(e[i(652)]--;e[i(2069)]++,e.ins_h=(e[i(1542)]<<e[i(493)]^e[i(858)][e[i(2069)]+m-1])&e.hash_mask,t=e.prev[e[i(2069)]&e.w_mask]=e[i(1511)][e[i(1542)]],e[i(1511)][e[i(1542)]]=e[i(2069)],0!=--e[i(652)];);e[i(2069)]++}else e[i(2069)]+=e[i(652)],e.match_length=0,e[i(1542)]=e[i(858)][e[i(2069)]],e.ins_h=(e.ins_h<<e[i(493)]^e[i(858)][e[i(2069)]+1])&e[i(413)];else n=c[i(1166)](e,0,e[i(858)][e[i(2069)]]),e[i(928)]--,e[i(2069)]++;if(n&&(B(e,!1),0===e[i(1602)][i(1279)]))return x}return e[i(1625)]=e[i(2069)]<m-1?e[i(2069)]:m-1,r===h?(B(e,!0),0===e[i(1602)][i(1279)]?E:A):e.last_lit&&(B(e,!1),0===e[i(1602)][i(1279)])?x:C}function i(e,r){for(var t,n,i,a=_0x3d6c;;){if(e[a(928)]<b){if(I(e),e[a(928)]<b&&r===f)return x;if(0===e[a(928)])break}if(t=0,e[a(928)]>=m&&(e[a(1542)]=(e[a(1542)]<<e[a(493)]^e[a(858)][e[a(2069)]+m-1])&e[a(413)],t=e[a(2048)][e[a(2069)]&e[a(712)]]=e[a(1511)][e[a(1542)]],e.head[e[a(1542)]]=e[a(2069)]),e.prev_length=e[a(652)],e.prev_match=e.match_start,e[a(652)]=m-1,0!==t&&e[a(1130)]<e.max_lazy_match&&e[a(2069)]-t<=e[a(668)]-b&&(e[a(652)]=o(e,t),e[a(652)]<=5)&&(1===e[a(2070)]||e[a(652)]===m&&4096<e[a(2069)]-e.match_start)&&(e[a(652)]=m-1),m<=e.prev_length&&e[a(652)]<=e[a(1130)]){for(i=e.strstart+e[a(928)]-m,n=c[a(1166)](e,e[a(2069)]-1-e[a(2128)],e[a(1130)]-m),e[a(928)]-=e.prev_length-1,e[a(1130)]-=2;++e.strstart<=i&&(e.ins_h=(e[a(1542)]<<e.hash_shift^e.window[e[a(2069)]+m-1])&e.hash_mask,t=e[a(2048)][e[a(2069)]&e[a(712)]]=e[a(1511)][e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e[a(1130)];);if(e[a(828)]=0,e.match_length=m-1,e.strstart++,n&&(B(e,!1),0===e[a(1602)][a(1279)]))return x}else if(e[a(828)]){if((n=c[a(1166)](e,0,e[a(858)][e[a(2069)]-1]))&&B(e,!1),e[a(2069)]++,e[a(928)]--,0===e[a(1602)][a(1279)])return x}else e.match_available=1,e.strstart++,e[a(928)]--}return e[a(828)]&&(n=c[a(1166)](e,0,e[a(858)][e[a(2069)]-1]),e[a(828)]=0),e[a(1625)]=e.strstart<m-1?e[a(2069)]:m-1,r===h?(B(e,!0),0===e[a(1602)].avail_out?E:A):e[a(349)]&&(B(e,!1),0===e[a(1602)].avail_out)?x:C}function a(e,r,t,n,i){var a=_0x3d6c;this.good_length=e,this[a(936)]=r,this[a(482)]=t,this[a(1251)]=n,this.func=i}function W(){var e=_0x3d6c;this.strm=null,this.status=0,this[e(2153)]=null,this[e(1312)]=0,this[e(645)]=0,this[e(1822)]=0,this[e(941)]=0,this[e(1169)]=null,this.gzindex=0,this[e(516)]=g,this.last_flush=-1,this[e(668)]=0,this[e(1231)]=0,this[e(712)]=0,this[e(858)]=null,this[e(1534)]=0,this[e(2048)]=null,this[e(1511)]=null,this.ins_h=0,this[e(1850)]=0,this.hash_bits=0,this[e(413)]=0,this.hash_shift=0,this[e(1943)]=0,this.match_length=0,this[e(2128)]=0,this[e(828)]=0,this[e(2069)]=0,this.match_start=0,this[e(928)]=0,this[e(1130)]=0,this[e(1348)]=0,this.max_lazy_match=0,this[e(1424)]=0,this[e(2070)]=0,this[e(865)]=0,this.nice_match=0,this[e(2141)]=new d[e(469)](2*z),this[e(1204)]=new d[e(469)](2*(2*U+1)),this[e(1345)]=new d[e(469)](2*(2*M+1)),O(this[e(2141)]),O(this[e(1204)]),O(this.bl_tree),this[e(1555)]=null,this[e(591)]=null,this.bl_desc=null,this[e(1879)]=new d[e(469)](q+1),this.heap=new d[e(469)](2*t+1),O(this[e(1411)]),this[e(1735)]=0,this.heap_max=0,this.depth=new d[e(469)](2*t+1),O(this.depth),this[e(2049)]=0,this[e(1414)]=0,this[e(349)]=0,this[e(2003)]=0,this.opt_len=0,this[e(1213)]=0,this[e(1188)]=0,this[e(1625)]=0,this[e(1648)]=0,this[e(1962)]=0}function s(e){var r,t=_0x3d6c;return e&&e.state?(e[t(1923)]=e[t(1841)]=0,e[t(746)]=L,(r=e[t(1853)]).pending=0,r[t(645)]=0,r[t(941)]<0&&(r[t(941)]=-r[t(941)]),r[t(1892)]=r.wrap?w:k,e.adler=2===r[t(941)]?0:1,r[t(1889)]=f,c[t(891)](r),l):S(e,_)}function R(e){var r=_0x3d6c,t=s(e);return t===l&&((e=e[r(1853)])[(r=_0x3d6c)(1534)]=2*e[r(668)],O(e[r(1511)]),e[r(2059)]=u[e[r(1424)]][r(936)],e[r(865)]=u[e.level].good_length,e.nice_match=u[e[r(1424)]][r(482)],e[r(1348)]=u[e.level].max_chain,e.strstart=0,e[r(1943)]=0,e[r(928)]=0,e[r(1625)]=0,e[r(652)]=e[r(1130)]=m-1,e[r(828)]=0,e.ins_h=0),t}function V(e,r,t,n,i,a){var o=_0x3d6c;if(!e)return _;var s=1;if(r===N&&(r=6),n<0?(s=0,n=-n):15<n&&(s=2,n-=16),i<1||H<i||t!==g||n<8||15<n||r<0||9<r||a<0||G<a)return S(e,_);8===n&&(n=9);var u=new W;return(e[o(1853)]=u)[o(1602)]=e,u[o(941)]=s,u[o(1169)]=null,u[o(1231)]=n,u[o(668)]=1<<u.w_bits,u[o(712)]=u[o(668)]-1,u.hash_bits=i+7,u[o(1850)]=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u[o(493)]=~~((u.hash_bits+m-1)/m),u[o(858)]=new d[o(1985)](2*u[o(668)]),u[o(1511)]=new d[o(469)](u.hash_size),u.prev=new d[o(469)](u[o(668)]),u.lit_bufsize=1<<i+6,u[o(1312)]=4*u[o(1414)],u[o(2153)]=new d.Buf8(u.pending_buf_size),u[o(2003)]=+u[o(1414)],u[o(2049)]=3*u[o(1414)],u.level=r,u.strategy=a,u[o(516)]=t,R(e)}u=[new a(0,0,0,0,function(e,r){var t=_0x3d6c,n=65535;for(n>e.pending_buf_size-5&&(n=e[t(1312)]-5);;){if(e[t(928)]<=1){if(I(e),0===e.lookahead&&r===f)return x;if(0===e[t(928)])break}e.strstart+=e[t(928)],e.lookahead=0;var i=e[t(1943)]+n;if((0===e.strstart||e[t(2069)]>=i)&&(e[t(928)]=e[t(2069)]-i,e[t(2069)]=i,B(e,!1),0===e[t(1602)][t(1279)])||e[t(2069)]-e.block_start>=e[t(668)]-b&&(B(e,!1),0===e[t(1602)][t(1279)]))return x}return e[t(1625)]=0,r===h?(B(e,!0),0===e[t(1602)].avail_out?E:A):(e[t(2069)]>e.block_start&&(B(e,!1),e[t(1602)][t(1279)]),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.deflateInit=function(e,r){return V(e,r,g,15,8,0)},e[r(1139)]=V,e[r(999)]=R,e[r(1732)]=s,e[r(1476)]=function(e,r){var t=_0x3d6c;return e&&e[t(1853)]&&2===e.state[t(941)]?(e[t(1853)][t(1169)]=r,l):_},e.deflate=function(e,r){var t,n,i,a,o=_0x3d6c;if(!e||!e[o(1853)]||5<r||r<0)return e?S(e,_):_;if(n=e[o(1853)],!e[o(2102)]||!e[o(334)]&&0!==e[o(1595)]||666===n.status&&r!==h)return S(e,0===e[o(1279)]?-5:_);if(n[o(1602)]=e,t=n[o(1889)],n.last_flush=r,n[o(1892)]===w&&(2===n[o(941)]?(e[o(526)]=0,P(n,31),P(n,139),P(n,8),n[o(1169)]?(P(n,(n[o(1169)][o(1138)]?1:0)+(n.gzhead[o(771)]?2:0)+(n[o(1169)].extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead[o(1992)]?16:0)),P(n,255&n[o(1169)].time),P(n,n[o(1169)][o(1367)]>>8&255),P(n,n[o(1169)][o(1367)]>>16&255),P(n,n[o(1169)].time>>24&255),P(n,9===n[o(1424)]?2:2<=n.strategy||n[o(1424)]<2?4:0),P(n,255&n[o(1169)].os),n[o(1169)].extra&&n.gzhead[o(1767)][o(847)]&&(P(n,255&n[o(1169)][o(1767)][o(847)]),P(n,n[o(1169)].extra.length>>8&255)),n[o(1169)].hcrc&&(e[o(526)]=p(e[o(526)],n.pending_buf,n[o(1822)],0)),n.gzindex=0,n[o(1892)]=69):(P(n,0),P(n,0),P(n,0),P(n,0),P(n,0),P(n,9===n[o(1424)]?2:2<=n[o(2070)]||n[o(1424)]<2?4:0),P(n,3),n[o(1892)]=k)):(s=g+(n[o(1231)]-8<<4)<<8,s|=(2<=n[o(2070)]||n[o(1424)]<2?0:n[o(1424)]<6?1:6===n[o(1424)]?2:3)<<6,0!==n.strstart&&(s|=32),s+=31-s%31,n.status=k,F(n,s),0!==n.strstart&&(F(n,e[o(526)]>>>16),F(n,65535&e[o(526)])),e[o(526)]=1)),69===n[o(1892)])if(n.gzhead.extra){for(i=n[o(1822)];n.gzindex<(65535&n[o(1169)][o(1767)][o(847)])&&(n[o(1822)]!==n.pending_buf_size||(n[o(1169)][o(771)]&&n[o(1822)]>i&&(e[o(526)]=p(e[o(526)],n[o(2153)],n[o(1822)]-i,i)),T(e),i=n[o(1822)],n.pending!==n[o(1312)]));)P(n,255&n[o(1169)][o(1767)][n[o(2023)]]),n.gzindex++;n[o(1169)][o(771)]&&n[o(1822)]>i&&(e[o(526)]=p(e[o(526)],n[o(2153)],n[o(1822)]-i,i)),n.gzindex===n[o(1169)][o(1767)][o(847)]&&(n.gzindex=0,n[o(1892)]=73)}else n.status=73;if(73===n[o(1892)])if(n[o(1169)][o(741)]){i=n[o(1822)];do{if(n[o(1822)]===n[o(1312)]&&(n.gzhead[o(771)]&&n[o(1822)]>i&&(e[o(526)]=p(e[o(526)],n[o(2153)],n[o(1822)]-i,i)),T(e),i=n[o(1822)],n[o(1822)]===n[o(1312)])){a=1;break}}while(a=n[o(2023)]<n[o(1169)][o(741)][o(847)]?255&n[o(1169)][o(741)][o(1080)](n[o(2023)]++):0,P(n,a),0!==a);n.gzhead[o(771)]&&n.pending>i&&(e[o(526)]=p(e[o(526)],n[o(2153)],n[o(1822)]-i,i)),0===a&&(n.gzindex=0,n[o(1892)]=91)}else n[o(1892)]=91;if(91===n[o(1892)])if(n.gzhead[o(1992)]){i=n[o(1822)];do{if(n[o(1822)]===n[o(1312)]&&(n[o(1169)][o(771)]&&n[o(1822)]>i&&(e[o(526)]=p(e[o(526)],n[o(2153)],n.pending-i,i)),T(e),i=n[o(1822)],n.pending===n.pending_buf_size)){a=1;break}}while(a=n[o(2023)]<n.gzhead.comment[o(847)]?255&n[o(1169)][o(1992)][o(1080)](n.gzindex++):0,P(n,a),0!==a);n.gzhead[o(771)]&&n[o(1822)]>i&&(e[o(526)]=p(e[o(526)],n.pending_buf,n[o(1822)]-i,i)),0===a&&(n[o(1892)]=103)}else n[o(1892)]=103;if(103===n[o(1892)]&&(n[o(1169)][o(771)]?(n[o(1822)]+2>n[o(1312)]&&T(e),n[o(1822)]+2<=n[o(1312)]&&(P(n,255&e[o(526)]),P(n,e.adler>>8&255),e[o(526)]=0,n[o(1892)]=k)):n.status=k),0!==n[o(1822)]){if(T(e),0===e[o(1279)])return n[o(1889)]=-1,l}else if(0===e[o(1595)]&&D(r)<=D(t)&&r!==h)return S(e,-5);if(666===n[o(1892)]&&0!==e[o(1595)])return S(e,-5);if(0!==e.avail_in||0!==n[o(928)]||r!==f&&666!==n[o(1892)]){var s=2===n.strategy?((e,r)=>{for(var t,n=_0x3d6c;;){if(0===e[n(928)]&&(I(e),0===e[n(928)])){if(r===f)return x;break}if(e[n(652)]=0,t=c[n(1166)](e,0,e[n(858)][e[n(2069)]]),e[n(928)]--,e[n(2069)]++,t&&(B(e,!1),0===e[n(1602)][n(1279)]))return x}return e[n(1625)]=0,r===h?(B(e,!0),0===e[n(1602)][n(1279)]?E:A):e.last_lit&&(B(e,!1),0===e[n(1602)][n(1279)])?x:C})(n,r):3===n[o(2070)]?((e,r)=>{for(var t,n,i,a,o=_0x3d6c,s=e[o(858)];;){if(e.lookahead<=y){if(I(e),e.lookahead<=y&&r===f)return x;if(0===e.lookahead)break}if(e.match_length=0,e[o(928)]>=m&&0<e[o(2069)]&&(n=s[i=e[o(2069)]-1])===s[++i]&&n===s[++i]&&n===s[++i]){for(a=e[o(2069)]+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(652)]=y-(a-i),e[o(652)]>e[o(928)]&&(e[o(652)]=e[o(928)])}if(e[o(652)]>=m?(t=c._tr_tally(e,1,e.match_length-m),e[o(928)]-=e[o(652)],e[o(2069)]+=e[o(652)],e[o(652)]=0):(t=c[o(1166)](e,0,e[o(858)][e[o(2069)]]),e.lookahead--,e[o(2069)]++),t&&(B(e,!1),0===e[o(1602)][o(1279)]))return x}return e[o(1625)]=0,r===h?(B(e,!0),0===e[o(1602)][o(1279)]?E:A):e[o(349)]&&(B(e,!1),0===e[o(1602)].avail_out)?x:C})(n,r):u[n[o(1424)]][o(2083)](n,r);if(s!==E&&s!==A||(n[o(1892)]=666),s===x||s===E)return 0===e[o(1279)]&&(n[o(1889)]=-1),l;if(s===C&&(1===r?c[o(412)](n):5!==r&&(c[o(1226)](n,0,0,!1),3===r)&&(O(n[o(1511)]),0===n[o(928)])&&(n[o(2069)]=0,n[o(1943)]=0,n.insert=0),T(e),0===e[o(1279)]))return n[o(1889)]=-1,l}return r!==h||!(n[o(941)]<=0)&&(2===n.wrap?(P(n,255&e[o(526)]),P(n,e[o(526)]>>8&255),P(n,e[o(526)]>>16&255),P(n,e.adler>>24&255),P(n,255&e.total_in),P(n,e.total_in>>8&255),P(n,e.total_in>>16&255),P(n,e[o(1923)]>>24&255)):(F(n,e[o(526)]>>>16),F(n,65535&e[o(526)])),T(e),0<n[o(941)]&&(n[o(941)]=-n[o(941)]),0!==n[o(1822)])?l:1},e.deflateEnd=function(e){var r,t=_0x3d6c;return e&&e[t(1853)]?(r=e.state[t(1892)])!==w&&69!==r&&73!==r&&91!==r&&103!==r&&r!==k&&666!==r?S(e,_):(e[t(1853)]=null,r===k?S(e,-3):l):_},e.deflateSetDictionary=function(e,r){var t,n,i,a,o,s,u,c=_0x3d6c,f=r[c(847)];if(!e||!e[c(1853)]||2===(a=(t=e[c(1853)])[c(941)])||1===a&&t[c(1892)]!==w||t[c(928)])return _;for(1===a&&(e.adler=v(e[c(526)],r,f,0)),t.wrap=0,f>=t[c(668)]&&(0===a&&(O(t.head),t.strstart=0,t[c(1943)]=0,t.insert=0),u=new d.Buf8(t[c(668)]),d[c(1574)](u,r,f-t.w_size,t.w_size,0),r=u,f=t.w_size),u=e[c(1595)],o=e[c(1762)],s=e[c(334)],e[c(1595)]=f,e[c(1762)]=0,e[c(334)]=r,I(t);t.lookahead>=m;){for(n=t[c(2069)],i=t[c(928)]-(m-1);t[c(1542)]=(t[c(1542)]<<t[c(493)]^t.window[n+m-1])&t[c(413)],t.prev[n&t[c(712)]]=t.head[t.ins_h],t[c(1511)][t[c(1542)]]=n,n++,--i;);t[c(2069)]=n,t.lookahead=m-1,I(t)}return t[c(2069)]+=t.lookahead,t[c(1943)]=t.strstart,t[c(1625)]=t[c(928)],t[c(928)]=0,t.match_length=t[c(1130)]=m-1,t[c(828)]=0,e.next_in=o,e.input=s,e.avail_in=u,t[c(941)]=a,l},e[r(329)]="pako deflate (from Nodeca project)"}),fe=r(function(e){var c=X,f=$(),a=!0,o=!0;try{String[c(333)][c(475)](null,[0])}catch(e){a=!1}try{String.fromCharCode[c(475)](null,new Uint8Array(1))}catch(e){o=!1}for(var r,u=new f[c(1985)](256),r=0;r<256;r++)u[r]=252<=r?6:248<=r?5:240<=r?4:224<=r?3:192<=r?2:1;function h(e,r){var t=c;if(r<65534&&(e[t(731)]&&o||!e[t(731)]&&a))return String.fromCharCode.apply(null,f[t(934)](e,r));for(var n="",i=0;i<r;i++)n+=String[t(333)](e[i]);return n}u[254]=u[254]=1,e.string2buf=function(e){for(var r,t,n,i,a=c,o=e[a(847)],s=0,u=0;u<o;u++)55296==(64512&(t=e[a(1080)](u)))&&u+1<o&&56320==(64512&(n=e.charCodeAt(u+1)))&&(t=65536+(t-55296<<10)+(n-56320),u++),s+=t<128?1:t<2048?2:t<65536?3:4;for(r=new f[a(1985)](s),u=i=0;i<s;u++)55296==(64512&(t=e.charCodeAt(u)))&&u+1<o&&56320==(64512&(n=e[a(1080)](u+1)))&&(t=65536+(t-55296<<10)+(n-56320),u++),t<128?r[i++]=t:(t<2048?r[i++]=192|t>>>6:(t<65536?r[i++]=224|t>>>12:(r[i++]=240|t>>>18,r[i++]=128|t>>>12&63),r[i++]=128|t>>>6&63),r[i++]=128|63&t);return r},e.buf2binstring=function(e){return h(e,e[c(847)])},e[c(834)]=function(e){for(var r=c,t=new f.Buf8(e[r(847)]),n=0,i=t[r(847)];n<i;n++)t[n]=e[r(1080)](n);return t},e.buf2string=function(e,r){for(var t,n,i=r||e.length,a=new Array(2*i),o=0,s=0;s<i;)if((t=e[s++])<128)a[o++]=t;else if(4<(n=u[t]))a[o++]=65533,s+=n-1;else{for(t&=2===n?31:3===n?15:7;1<n&&s<i;)t=t<<6|63&e[s++],n--;1<n?a[o++]=65533:t<65536?a[o++]=t:(t-=65536,a[o++]=55296|t>>10&1023,a[o++]=56320|1023&t)}return h(a,o)},e[c(708)]=function(e,r){for(var t=(r=(r=r||e.length)>e.length?e.length:r)-1;0<=t&&128==(192&e[t]);)t--;return!(t<0||0===t)&&t+u[e[t]]>r?t:r}}),he=r(function(e,r){r.exports=function(){var e=_0x3d6c;this[e(334)]=null,this.next_in=0,this[e(1595)]=0,this[e(1923)]=0,this[e(2102)]=null,this[e(1661)]=0,this.avail_out=0,this.total_out=0,this[e(1433)]="",this[e(1853)]=null,this.data_type=2,this[e(526)]=0}}),le=r(function(e){var s=X,u=ce(),c=$(),f=fe(),n=K(),i=he(),h=Object[s(1809)][s(926)];function a(e){var r=s;if(!(this instanceof a))return new a(e);this[r(346)]=c[r(1465)]({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});e=this[r(346)];if(e[r(1562)]&&0<e.windowBits?e[r(1703)]=-e[r(1703)]:e[r(1751)]&&0<e[r(1703)]&&e[r(1703)]<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this[r(1692)]=[],this[r(1602)]=new i,(this.strm[r(1279)]=0)!==(t=u[r(1139)](this.strm,e[r(1424)],e[r(516)],e[r(1703)],e[r(1459)],e[r(2070)])))throw new Error(n[t]);if(e[r(1006)]&&u[r(1476)](this[r(1602)],e[r(1006)]),e[r(399)]){var t,e=typeof e.dictionary==r(2076)?f[r(929)](e.dictionary):"[object ArrayBuffer]"===h.call(e[r(399)])?new Uint8Array(e[r(399)]):e[r(399)];if(0!==(t=u.deflateSetDictionary(this.strm,e)))throw new Error(n[t]);this[r(1953)]=!0}}function t(e,r){var t=s,r=new a(r);if(r[t(1922)](e,!0),r[t(1640)])throw r[t(1433)]||n[r[t(1640)]];return r[t(2131)]}a[s(1809)][s(1922)]=function(e,r){var t,n,i=s,a=this[i(1602)],o=this[i(346)][i(1319)];if(this[i(318)])return!1;n=r===~~r?r:!0===r?4:0,typeof e==i(2076)?a[i(334)]=f[i(929)](e):"[object ArrayBuffer]"===h.call(e)?a.input=new Uint8Array(e):a[i(334)]=e,a[i(1762)]=0,a[i(1595)]=a[i(334)][i(847)];do{if(0===a[i(1279)]&&(a[i(2102)]=new c[i(1985)](o),a.next_out=0,a[i(1279)]=o),1!==(t=u[i(805)](a,n))&&0!==t)return this[i(1171)](t),!(this.ended=!0)}while(0!==a.avail_out&&(0!==a.avail_in||4!==n&&2!==n)||(this[i(346)].to===i(2076)?this.onData(f[i(656)](c[i(934)](a[i(2102)],a.next_out))):this[i(684)](c.shrinkBuf(a[i(2102)],a[i(1661)]))),(0<a[i(1595)]||0===a[i(1279)])&&1!==t);return 4===n?(t=u[i(496)](this[i(1602)]),this[i(1171)](t),this[i(318)]=!0,0===t):(2===n&&(this.onEnd(0),a[i(1279)]=0),!0)},a[s(1809)].onData=function(e){var r=s;this[r(1692)][r(1922)](e)},a[s(1809)].onEnd=function(e){var r=s;0===e&&(this[r(346)].to===r(2076)?this[r(2131)]=this.chunks.join(""):this[r(2131)]=c[r(376)](this[r(1692)])),this[r(1692)]=[],this[r(1640)]=e,this[r(1433)]=this.strm[r(1433)]},e[s(653)]=a,e[s(805)]=t,e[s(1383)]=function(e,r){return(r=r||{})[s(1562)]=!0,t(e,r)},e[s(1751)]=function(e,r){return(r=r||{}).gzip=!0,t(e,r)}}),de=r(function(e,r){r.exports=function(e,r){var t,n,i,a,o,s,u=_0x3d6c,c=e.state,f=e[u(1762)],h=e[u(334)],l=f+(e[u(1595)]-5),d=e[u(1661)],v=e.output,p=d-(r-e[u(1279)]),_=d+(e[u(1279)]-257),g=c.dmax,m=c[u(2109)],y=c[u(838)],b=c[u(597)],w=c[u(858)],k=c[u(1186)],x=c[u(361)],C=c[u(607)],E=c[u(547)],A=(1<<c[u(423)])-1,S=(1<<c.distbits)-1;e:do{for(x<15&&(k+=h[f++]<<x,x+=8,k+=h[f++]<<x,x+=8),t=C[k&A];;){if(k>>>=n=t>>>24,x-=n,0===(n=t>>>16&255))v[d++]=65535&t;else{if(!(16&n)){if(0==(64&n)){t=C[(65535&t)+(k&(1<<n)-1)];continue}if(32&n){c[u(665)]=12;break e}e[u(1433)]=u(1338),c[u(665)]=30;break e}for(i=65535&t,(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),t=E[k&S];;){if(k>>>=n=t>>>24,x-=n,!(16&(n=t>>>16&255))){if(0==(64&n)){t=E[(65535&t)+(k&(1<<n)-1)];continue}e.msg="invalid distance code",c[u(665)]=30;break e}if(a=65535&t,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(937),c[u(665)]=30;break e}if(k>>>=n,x-=n,(n=d-p)<a){if(y<(n=a-n)&&c.sane){e[u(1433)]=u(937),c[u(665)]=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(1762)]=f,e.next_out=d,e[u(1595)]=f<l?l-f+5:5-(f-l),e.avail_out=d<_?_-d+257:257-(d-_),c[u(1186)]=k,c[u(361)]=x}}),ve=r(function(e,r){var R=$(),j=[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],N=[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],G=[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],L=[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];r.exports=function(e,r,t,n,i,a,o,s){for(var u,c,f,h,l,d,v,p,_,g=_0x3d6c,m=s[g(361)],y=0,b=0,w=0,k=0,x=0,C=0,E=0,A=0,S=0,D=0,O=null,T=0,B=new R[g(469)](16),P=new R[g(469)](16),F=null,I=0,y=0;y<=15;y++)B[y]=0;for(b=0;b<n;b++)B[r[t+b]]++;for(x=m,k=15;1<=k&&0===B[k];k--);if(k<x&&(x=k),0===k)i[a++]=20971520,i[a++]=20971520,s.bits=1;else{for(w=1;w<k&&0===B[w];w++);for(x<w&&(x=w),y=A=1;y<=15;y++)if((A=(A<<1)-B[y])<0)return-1;if(0<A&&(0===e||1!==k))return-1;for(P[1]=0,y=1;y<15;y++)P[y+1]=P[y]+B[y];for(b=0;b<n;b++)0!==r[t+b]&&(o[P[r[t+b]]++]=b);if(d=0===e?(O=F=o,19):1===e?(O=j,T-=257,F=N,I-=257,256):(O=G,F=L,-1),y=w,l=a,E=b=D=0,f=-1,h=(S=1<<(C=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=F[I+o[b]],O[T+o[b]]):(p=96,0),u=1<<(v=y-E),w=c=1<<C;i[l+(D>>E)+(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==--B[y]){if(y===k)break;y=r[t+o[b]]}if(x<y&&(D&h)!==f){for(l+=w,A=1<<(C=y-(E=0===E?x:E));C+E<k&&!((A-=B[C+E])<=0);)C++,A<<=1;if(S+=1<<C,1===e&&852<S||2===e&&592<S)return 1;i[f=D&h]=x<<24|C<<16|l-a|0}}0!==D&&(i[l+D]=y-E<<24|64<<16|0),s[g(361)]=x}return 0}}),pe=r(function(e){var r=X,F=$(),I=se(),R=ue(),j=de(),N=ve(),G=1,L=2,H=0,U=-2,M=1,n=852,i=592;function z(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function a(){var e=_0x3d6c;this[e(665)]=0,this[e(1135)]=!1,this[e(941)]=0,this[e(537)]=!1,this.flags=0,this[e(1012)]=0,this[e(1245)]=0,this.total=0,this[e(1511)]=null,this[e(2081)]=0,this[e(2109)]=0,this.whave=0,this[e(597)]=0,this[e(858)]=null,this[e(1186)]=0,this[e(361)]=0,this[e(847)]=0,this[e(920)]=0,this[e(1767)]=0,this[e(607)]=null,this[e(547)]=null,this.lenbits=0,this[e(403)]=0,this[e(1763)]=0,this[e(1606)]=0,this[e(1222)]=0,this[e(366)]=0,this.next=null,this[e(1578)]=new F[e(469)](320),this[e(894)]=new F[e(469)](288),this[e(784)]=null,this.distdyn=null,this[e(1323)]=0,this[e(598)]=0,this.was=0}function o(e){var r,t=_0x3d6c;return e&&e[t(1853)]?(r=e[t(1853)],e[t(1923)]=e.total_out=r[t(2112)]=0,e[t(1433)]="",r[t(941)]&&(e.adler=1&r.wrap),r[t(665)]=M,r[t(1135)]=0,r.havedict=0,r[t(1012)]=32768,r.head=null,r.hold=0,r[t(361)]=0,r[t(607)]=r[t(784)]=new F[t(1013)](n),r[t(547)]=r[t(1291)]=new F.Buf32(i),r[t(1323)]=1,r[t(598)]=-1,H):U}function s(e){var r,t=_0x3d6c;return e&&e[t(1853)]?((r=e[t(1853)])[t(2109)]=0,r[t(838)]=0,r.wnext=0,o(e)):U}function u(e,r){var t,n,i=_0x3d6c;return!e||!e[i(1853)]||(n=e[i(1853)],r<0?(t=0,r=-r):(t=1+(r>>4),r<48&&(r&=15)),r&&(r<8||15<r))?U:(null!==n.window&&n[i(2081)]!==r&&(n[i(858)]=null),n.wrap=t,n[i(2081)]=r,s(e))}function t(e,r){var t,n=_0x3d6c;return e?(t=new a,(e.state=t)[n(858)]=null,(t=u(e,r))!==H&&(e[n(1853)]=null),t):U}var q,W,V=!0;function K(e,r,t,n){var i,a=_0x3d6c,e=e[a(1853)];return null===e.window&&(e.wsize=1<<e.wbits,e[a(597)]=0,e[a(838)]=0,e.window=new F[a(1985)](e[a(2109)])),n>=e[a(2109)]?(F[a(1574)](e[a(858)],r,t-e.wsize,e[a(2109)],0),e[a(597)]=0,e[a(838)]=e[a(2109)]):(n<(i=e.wsize-e[a(597)])&&(i=n),F[a(1574)](e[a(858)],r,t-n,i,e[a(597)]),(n-=i)?(F[a(1574)](e[a(858)],r,t-n,n,0),e.wnext=n,e[a(838)]=e.wsize):(e[a(597)]+=i,e[a(597)]===e[a(2109)]&&(e[a(597)]=0),e[a(838)]<e[a(2109)]&&(e[a(838)]+=i))),0}e[r(574)]=s,e[r(1750)]=u,e.inflateResetKeep=o,e[r(522)]=function(e){return t(e,15)},e[r(2090)]=t,e[r(813)]=function(e,r){var t,n,i,a,o,s,u,c,f,h,l,d,v,p,_,g,m,y,b,w,k,x,C,E,A=_0x3d6c,S=0,D=new F[A(1985)](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(1853)]||!e.output||!e.input&&0!==e[A(1595)])return U;12===(t=e[A(1853)])[A(665)]&&(t[A(665)]=13),o=e[A(1661)],i=e.output,u=e[A(1279)],a=e.next_in,n=e[A(334)],s=e.avail_in,c=t[A(1186)],f=t[A(361)],h=s,l=u,x=H;e:for(;;)switch(t.mode){case M:if(0===t[A(941)])t[A(665)]=13;else{for(;f<16;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}if(2&t.wrap&&35615===c)D[t[A(1245)]=0]=255&c,D[1]=c>>>8&255,t[A(1245)]=R(t[A(1245)],D,2,0),f=c=0,t[A(665)]=2;else if(t[A(1386)]=0,t[A(1511)]&&(t.head.done=!1),!(1&t.wrap)||(((255&c)<<8)+(c>>8))%31)e[A(1433)]=A(546),t.mode=30;else if(8!=(15&c))e.msg=A(1955),t[A(665)]=30;else{if(f-=4,k=8+(15&(c>>>=4)),0===t.wbits)t[A(2081)]=k;else if(k>t[A(2081)]){e[A(1433)]=A(1829),t[A(665)]=30;break}t.dmax=1<<k,e.adler=t[A(1245)]=1,t.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(t[A(1386)]=c,8!=(255&t[A(1386)])){e[A(1433)]=A(1955),t[A(665)]=30;break}if(57344&t[A(1386)]){e[A(1433)]=A(802),t[A(665)]=30;break}t[A(1511)]&&(t[A(1511)][A(1138)]=c>>8&1),512&t[A(1386)]&&(D[0]=255&c,D[1]=c>>>8&255,t[A(1245)]=R(t.check,D,2,0)),f=c=0,t[A(665)]=3;case 3:for(;f<32;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}t[A(1511)]&&(t[A(1511)][A(1367)]=c),512&t.flags&&(D[0]=255&c,D[1]=c>>>8&255,D[2]=c>>>16&255,D[3]=c>>>24&255,t[A(1245)]=R(t[A(1245)],D,4,0)),f=c=0,t.mode=4;case 4:for(;f<16;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}t[A(1511)]&&(t[A(1511)][A(549)]=255&c,t[A(1511)].os=c>>8),512&t[A(1386)]&&(D[0]=255&c,D[1]=c>>>8&255,t[A(1245)]=R(t[A(1245)],D,2,0)),f=c=0,t.mode=5;case 5:if(1024&t[A(1386)]){for(;f<16;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}t[A(847)]=c,t[A(1511)]&&(t[A(1511)][A(1193)]=c),512&t[A(1386)]&&(D[0]=255&c,D[1]=c>>>8&255,t.check=R(t.check,D,2,0)),f=c=0}else t[A(1511)]&&(t[A(1511)].extra=null);t.mode=6;case 6:if(1024&t.flags&&((d=s<(d=t[A(847)])?s:d)&&(t.head&&(k=t[A(1511)][A(1193)]-t[A(847)],t.head[A(1767)]||(t.head[A(1767)]=new Array(t[A(1511)][A(1193)])),F[A(1574)](t.head[A(1767)],n,a,d,k)),512&t[A(1386)]&&(t[A(1245)]=R(t[A(1245)],n,d,a)),s-=d,a+=d,t[A(847)]-=d),t[A(847)]))break e;t[A(847)]=0,t[A(665)]=7;case 7:if(2048&t[A(1386)]){if(0===s)break e;for(d=0;k=n[a+d++],t.head&&k&&t[A(847)]<65536&&(t.head[A(741)]+=String[A(333)](k)),k&&d<s;);if(512&t[A(1386)]&&(t[A(1245)]=R(t[A(1245)],n,d,a)),s-=d,a+=d,k)break e}else t[A(1511)]&&(t[A(1511)][A(741)]=null);t[A(847)]=0,t[A(665)]=8;case 8:if(4096&t[A(1386)]){if(0===s)break e;for(d=0;k=n[a+d++],t.head&&k&&t[A(847)]<65536&&(t[A(1511)][A(1992)]+=String[A(333)](k)),k&&d<s;);if(512&t[A(1386)]&&(t[A(1245)]=R(t[A(1245)],n,d,a)),s-=d,a+=d,k)break e}else t[A(1511)]&&(t[A(1511)][A(1992)]=null);t.mode=9;case 9:if(512&t.flags){for(;f<16;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}if(c!==(65535&t[A(1245)])){e.msg=A(1712),t[A(665)]=30;break}f=c=0}t[A(1511)]&&(t[A(1511)][A(771)]=t.flags>>9&1,t.head[A(1616)]=!0),e[A(526)]=t[A(1245)]=0,t[A(665)]=12;break;case 10:for(;f<32;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}e.adler=t[A(1245)]=z(c),f=c=0,t.mode=11;case 11:if(0===t[A(537)])return e.next_out=o,e.avail_out=u,e[A(1762)]=a,e[A(1595)]=s,t[A(1186)]=c,t[A(361)]=f,2;e[A(526)]=t[A(1245)]=1,t[A(665)]=12;case 12:if(5===r||6===r)break e;case 13:if(t[A(1135)])c>>>=7&f,f-=7&f,t[A(665)]=27;else{for(;f<3;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}switch(t[A(1135)]=1&c,--f,3&(c>>>=1)){case 0:t.mode=14;break;case 1:T=P=B=void 0;var T,B=t,P=_0x3d6c;if(V){for(q=new F.Buf32(512),W=new F.Buf32(32),T=0;T<144;)B[P(1578)][T++]=8;for(;T<256;)B[P(1578)][T++]=9;for(;T<280;)B.lens[T++]=7;for(;T<288;)B[P(1578)][T++]=8;for(N(G,B[P(1578)],0,288,q,0,B[P(894)],{bits:9}),T=0;T<32;)B[P(1578)][T++]=5;N(L,B[P(1578)],0,32,W,0,B[P(894)],{bits:5}),V=!1}if(B[P(607)]=q,B[P(423)]=9,B[P(547)]=W,B[P(403)]=5,t.mode=20,6!==r)break;c>>>=2,f-=2;break e;case 2:t.mode=17;break;case 3:e[A(1433)]=A(1397),t.mode=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(1433)]="invalid stored block lengths",t[A(665)]=30;break}if(t[A(847)]=65535&c,f=c=0,t[A(665)]=15,6===r)break e;case 15:t[A(665)]=16;case 16:if(d=t[A(847)]){if(0===(d=u<(d=s<d?s:d)?u:d))break e;F[A(1574)](i,n,a,d,o),s-=d,a+=d,u-=d,o+=d,t.length-=d}else t[A(665)]=12;break;case 17:for(;f<14;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}if(t[A(1606)]=257+(31&c),c>>>=5,f-=5,t[A(1222)]=1+(31&c),c>>>=5,f-=5,t[A(1763)]=4+(15&c),c>>>=4,f-=4,286<t[A(1606)]||30<t[A(1222)]){e.msg="too many length or distance symbols",t[A(665)]=30;break}t[A(366)]=0,t[A(665)]=18;case 18:for(;t[A(366)]<t[A(1763)];){for(;f<3;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}t[A(1578)][O[t.have++]]=7&c,c>>>=3,f-=3}for(;t[A(366)]<19;)t[A(1578)][O[t[A(366)]++]]=0;if(t[A(607)]=t.lendyn,t.lenbits=7,C={bits:t.lenbits},x=N(0,t[A(1578)],0,19,t[A(607)],0,t[A(894)],C),t[A(423)]=C[A(361)],x){e[A(1433)]=A(481),t[A(665)]=30;break}t[A(366)]=0,t.mode=19;case 19:for(;t[A(366)]<t[A(1606)]+t[A(1222)];){for(;g=(S=t[A(607)][c&(1<<t[A(423)])-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-=_,t[A(1578)][t[A(366)]++]=m;else{if(16===m){for(E=_+2;f<E;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}if(c>>>=_,f-=_,0===t[A(366)]){e[A(1433)]="invalid bit length repeat",t[A(665)]=30;break}k=t.lens[t[A(366)]-1],d=3+(3&c),c>>>=2,f-=2}else if(17===m){for(E=_+3;f<E;){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(E=_+7;f<E;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}k=0,d=11+(127&(c>>>=_)),c>>>=7,f=f-_-7}if(t[A(366)]+d>t[A(1606)]+t[A(1222)]){e[A(1433)]=A(1573),t[A(665)]=30;break}for(;d--;)t[A(1578)][t.have++]=k}}if(30===t[A(665)])break;if(0===t[A(1578)][256]){e.msg=A(2122),t[A(665)]=30;break}if(t[A(423)]=9,C={bits:t[A(423)]},x=N(G,t[A(1578)],0,t[A(1606)],t.lencode,0,t.work,C),t.lenbits=C[A(361)],x){e.msg=A(1817),t[A(665)]=30;break}if(t[A(403)]=6,t.distcode=t[A(1291)],C={bits:t[A(403)]},x=N(L,t[A(1578)],t[A(1606)],t[A(1222)],t[A(547)],0,t.work,C),t[A(403)]=C[A(361)],x){e.msg=A(1560),t[A(665)]=30;break}if(t.mode=20,6===r)break e;case 20:t[A(665)]=21;case 21:if(6<=s&&258<=u){e[A(1661)]=o,e.avail_out=u,e[A(1762)]=a,e.avail_in=s,t[A(1186)]=c,t.bits=f,j(e,l),o=e.next_out,i=e[A(2102)],u=e[A(1279)],a=e[A(1762)],n=e[A(334)],s=e[A(1595)],c=t[A(1186)],f=t[A(361)],12===t[A(665)]&&(t[A(598)]=-1);break}for(t.back=0;g=(S=t[A(607)][c&(1<<t.lenbits)-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=t[A(607)][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,t[A(598)]+=y}if(c>>>=_,f-=_,t.back+=_,t[A(847)]=m,0===g){t[A(665)]=26;break}if(32&g){t[A(598)]=-1,t[A(665)]=12;break}if(64&g){e[A(1433)]="invalid literal/length code",t[A(665)]=30;break}t.extra=15&g,t.mode=22;case 22:if(t[A(1767)]){for(E=t[A(1767)];f<E;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}t.length+=c&(1<<t.extra)-1,c>>>=t[A(1767)],f-=t[A(1767)],t[A(598)]+=t[A(1767)]}t[A(557)]=t[A(847)],t.mode=23;case 23:for(;g=(S=t[A(547)][c&(1<<t[A(403)])-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=t[A(547)][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,t[A(598)]+=y}if(c>>>=_,f-=_,t[A(598)]+=_,64&g){e[A(1433)]="invalid distance code",t.mode=30;break}t[A(920)]=m,t.extra=15&g,t[A(665)]=24;case 24:if(t[A(1767)]){for(E=t[A(1767)];f<E;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}t[A(920)]+=c&(1<<t[A(1767)])-1,c>>>=t[A(1767)],f-=t.extra,t[A(598)]+=t[A(1767)]}if(t.offset>t[A(1012)]){e.msg=A(937),t.mode=30;break}t[A(665)]=25;case 25:if(0===u)break e;if(d=l-u,t[A(920)]>d){if((d=t.offset-d)>t[A(838)]&&t[A(1323)]){e[A(1433)]=A(937),t.mode=30;break}v=d>t[A(597)]?(d-=t[A(597)],t[A(2109)]-d):t[A(597)]-d,d>t[A(847)]&&(d=t.length),p=t[A(858)]}else p=i,v=o-t[A(920)],d=t[A(847)];for(u-=d=u<d?u:d,t[A(847)]-=d;i[o++]=p[v++],--d;);0===t[A(847)]&&(t.mode=21);break;case 26:if(0===u)break e;i[o++]=t[A(847)],u--,t[A(665)]=21;break;case 27:if(t[A(941)]){for(;f<32;){if(0===s)break e;s--,c|=n[a++]<<f,f+=8}if(l-=u,e[A(1841)]+=l,t[A(2112)]+=l,l&&(e.adler=t[A(1245)]=t[A(1386)]?R(t[A(1245)],i,l,o-l):I(t.check,i,l,o-l)),l=u,(t[A(1386)]?c:z(c))!==t[A(1245)]){e.msg=A(1257),t[A(665)]=30;break}f=c=0}t[A(665)]=28;case 28:if(t.wrap&&t[A(1386)]){for(;f<32;){if(0===s)break e;s--,c+=n[a++]<<f,f+=8}if(c!==(4294967295&t[A(2112)])){e[A(1433)]=A(744),t[A(665)]=30;break}f=c=0}t[A(665)]=29;case 29:x=1;break e;case 30:x=-3;break e;case 31:return-4;default:return U}return e.next_out=o,e[A(1279)]=u,e.next_in=a,e[A(1595)]=s,t[A(1186)]=c,t.bits=f,(t[A(2109)]||l!==e.avail_out&&t[A(665)]<30&&(t[A(665)]<27||4!==r))&&K(e,e[A(2102)],e[A(1661)],l-e[A(1279)])?(t[A(665)]=31,-4):(h-=e[A(1595)],l-=e[A(1279)],e[A(1923)]+=h,e[A(1841)]+=l,t[A(2112)]+=l,t[A(941)]&&l&&(e[A(526)]=t[A(1245)]=t.flags?R(t.check,i,l,e[A(1661)]-l):I(t[A(1245)],i,l,e[A(1661)]-l)),e.data_type=t.bits+(t.last?64:0)+(12===t[A(665)]?128:0)+(20===t.mode||15===t[A(665)]?256:0),x=(0==h&&0===l||4===r)&&x===H?-5:x)},e[r(1068)]=function(e){var r,t=_0x3d6c;return e&&e[t(1853)]?((r=e.state)[t(858)]&&(r[t(858)]=null),e[t(1853)]=null,H):U},e.inflateGetHeader=function(e,r){var t=_0x3d6c;return e&&e[t(1853)]&&0!=(2&(e=e.state).wrap)?((e[t(1511)]=r)[t(1616)]=!1,H):U},e[r(1840)]=function(e,r){var t,n=_0x3d6c,i=r.length;return e&&e[n(1853)]&&(0===(t=e.state)[n(941)]||11===t[n(665)])?11===t[n(665)]&&I(1,r,i,0)!==t[n(1245)]?-3:K(e,r,i,i)?(t[n(665)]=31,-4):(t.havedict=1,H):U},e.inflateInfo=r(965)}),_e=r(function(e,r){r[X(1317)]={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=r(function(e,r){r[X(1317)]=function(){var e=_0x3d6c;this[e(1138)]=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this[e(1193)]=0,this[e(741)]="",this[e(1992)]="",this[e(771)]=0,this.done=!1}}),me=r(function(e){var l=X,d=pe(),v=$(),p=fe(),_=_e(),n=K(),i=he(),a=ge(),g=Object.prototype[l(926)];function o(e){var r=l;if(!(this instanceof o))return new o(e);this[r(346)]=v[r(1465)]({chunkSize:16384,windowBits:0,to:""},e||{});var t=this[r(346)],e=(t[r(1562)]&&0<=t[r(1703)]&&t[r(1703)]<16&&(t[r(1703)]=-t.windowBits,0===t[r(1703)])&&(t.windowBits=-15),!(0<=t[r(1703)]&&t.windowBits<16)||e&&e[r(1703)]||(t.windowBits+=32),15<t[r(1703)]&&t[r(1703)]<48&&0==(15&t[r(1703)])&&(t[r(1703)]|=15),this[r(1640)]=0,this.msg="",this[r(318)]=!1,this.chunks=[],this[r(1602)]=new i,this.strm[r(1279)]=0,d[r(2090)](this.strm,t[r(1703)]));if(e!==_[r(1069)])throw new Error(n[e]);if(this[r(1006)]=new a,d[r(2015)](this[r(1602)],this[r(1006)]),t[r(399)]&&(typeof t[r(399)]==r(2076)?t[r(399)]=p[r(929)](t[r(399)]):g.call(t.dictionary)===r(1049)&&(t[r(399)]=new Uint8Array(t[r(399)])),t.raw)&&(e=d.inflateSetDictionary(this[r(1602)],t.dictionary))!==_[r(1069)])throw new Error(n[e])}function t(e,r){var t=l,r=new o(r);if(r[t(1922)](e,!0),r[t(1640)])throw r[t(1433)]||n[r[t(1640)]];return r[t(2131)]}o[l(1809)][l(1922)]=function(e,r){var t,n,i,a,o,s=l,u=this[s(1602)],c=this[s(346)][s(1319)],f=this[s(346)][s(399)],h=!1;if(this[s(318)])return!1;n=r===~~r?r:!0===r?_[s(1365)]:_.Z_NO_FLUSH,typeof e==s(2076)?u[s(334)]=p.binstring2buf(e):g[s(1360)](e)===s(1049)?u[s(334)]=new Uint8Array(e):u.input=e,u[s(1762)]=0,u[s(1595)]=u[s(334)][s(847)];do{if(0===u[s(1279)]&&(u[s(2102)]=new v[s(1985)](c),u.next_out=0,u[s(1279)]=c),(t=(t=d[s(813)](u,_.Z_NO_FLUSH))===_[s(520)]&&f?d.inflateSetDictionary(this[s(1602)],f):t)===_[s(1208)]&&!0===h&&(t=_[s(1069)],h=!1),t!==_.Z_STREAM_END&&t!==_[s(1069)])return this.onEnd(t),!(this[s(318)]=!0)}while(!u[s(1661)]||0!==u.avail_out&&t!==_[s(385)]&&(0!==u[s(1595)]||n!==_[s(1365)]&&n!==_.Z_SYNC_FLUSH)||("string"===this.options.to?(i=p[s(708)](u[s(2102)],u[s(1661)]),a=u.next_out-i,o=p[s(2145)](u[s(2102)],i),u[s(1661)]=a,u[s(1279)]=c-a,a&&v[s(1574)](u[s(2102)],u[s(2102)],i,a,0),this[s(684)](o)):this[s(684)](v[s(934)](u[s(2102)],u[s(1661)]))),0===u[s(1595)]&&0===u[s(1279)]&&(h=!0),(0<u.avail_in||0===u[s(1279)])&&t!==_[s(385)]);return(n=t===_[s(385)]?_[s(1365)]:n)===_[s(1365)]?(t=d.inflateEnd(this[s(1602)]),this[s(1171)](t),this[s(318)]=!0,t===_.Z_OK):(n===_.Z_SYNC_FLUSH&&(this[s(1171)](_.Z_OK),u[s(1279)]=0),!0)},o[l(1809)].onData=function(e){var r=l;this.chunks[r(1922)](e)},o.prototype.onEnd=function(e){var r=l;e===_[r(1069)]&&(this[r(346)].to===r(2076)?this[r(2131)]=this[r(1692)][r(1524)](""):this.result=v[r(376)](this[r(1692)])),this.chunks=[],this[r(1640)]=e,this.msg=this[r(1602)].msg},e.Inflate=o,e[l(813)]=t,e.inflateRaw=function(e,r){return(r=r||{})[l(1562)]=!0,t(e,r)},e[l(1828)]=t}),ye=r(function(e,r){var t=X,n={};(0,$()[t(1465)])(n,le(),me(),_e()),r[t(1317)]=n}),be=r(function(e){var i=X,r=(typeof Uint8Array===i(1758)?"undefined":_typeof(Uint8Array))<"u"&&(typeof Uint16Array===i(1758)?"undefined":_typeof(Uint16Array))<"u"&&(typeof Uint32Array===i(1758)?"undefined":_typeof(Uint32Array))<"u",a=ye(),t=A(),n=S(),o=i(r?2104:1015);function s(e,r){var t=i;n.call(this,"FlateWorker/"+e),this[t(460)]=null,this[t(2149)]=e,this[t(1470)]=r,this[t(454)]={}}e[i(1558)]="\b\0",t.inherits(s,n),s[i(1809)][i(1711)]=function(e){var r=i;this.meta=e.meta,null===this[r(460)]&&this[r(1034)](),this[r(460)][r(1922)](t.transformTo(o,e[r(625)]),!1)},s.prototype.flush=function(){var e=i;n[e(1809)][e(2151)][e(1360)](this),null===this[e(460)]&&this[e(1034)](),this._pako[e(1922)]([],!0)},s.prototype[i(869)]=function(){var e=i;n[e(1809)][e(869)][e(1360)](this),this._pako=null},s.prototype._createPako=function(){var t=i,n=(this[t(460)]=new a[this[t(2149)]]({raw:!0,level:this[t(1470)][t(1424)]||-1}),this);this[t(460)][t(684)]=function(e){var r=t;n[r(1922)]({data:e,meta:n[r(454)]})}},e[i(1296)]=function(e){return new s(i(653),e)},e[i(415)]=function(){return new s(i(958),{})}}),we=r(function(e){var r=X,t=S();e[r(1307)]={magic:"\0\0",compressWorker:function(e){return new t(r(1313))},uncompressWorker:function(){return new t(r(1798))}},e[r(1512)]=be()}),ke=r(function(e){var r=X;e[r(1665)]=r(1176),e[r(372)]=r(1976),e[r(1777)]=r(2124),e[r(1379)]=r(2035),e.ZIP64_CENTRAL_DIRECTORY_END=r(1110),e[r(717)]=r(1385)}),xe=r(function(e,r){function y(e,r){for(var t="",n=0;n<r;n++)t+=String.fromCharCode(255&e),e>>>=8;return t}function i(e,r,t,n,i,a){var o=_0x3d6c,s=e[o(1491)],u=e[o(1960)],c=a!==w.utf8encode,f=b[o(1078)]("string",a(s[o(741)])),h=b[o(1078)]("string",w[o(750)](s[o(741)])),l=s[o(1992)],a=b[o(1078)](o(2076),a(l)),d=b[o(1078)]("string",w[o(750)](l)),v=h.length!==s[o(741)][o(847)],l=d[o(847)]!==l[o(847)],p="",_=s[o(2019)],g=s[o(2134)],m={crc32:0,compressedSize:0,uncompressedSize:0},t=(r&&!t||(m[o(1876)]=e[o(1876)],m[o(1173)]=e[o(1173)],m[o(567)]=e[o(567)]),0),e=(r&&(t|=8),c||!v&&!l||(t|=2048),0),r=0,g=(_&&(e|=16),i===o(738)?(r=798,e|=(c=s[o(1295)],i=_,(65535&(c?c:i?16893:33204))<<16)):(r=20,e|=63&(s[o(832)]||0)),_=g[o(1887)](),_<<=6,_=(_=(_|g.getUTCMinutes())<<5)|g[o(480)]()/2,c=g[o(398)]()-1980,c=(c=((c<<=4)|g[o(1834)]()+1)<<5)|g[o(571)](),v&&(i=y(1,1)+y(k(f),4)+h,p+="up"+y(i[o(847)],2)+i),l&&(s=y(1,1)+y(k(a),4)+d,p+="uc"+y(s.length,2)+s),""),g=(g=(g=(g=(g=(g=(g=(g=(g=(g+="\n\0")+y(t,2))+u[o(1558)])+y(_,2))+y(c,2))+y(m[o(1876)],4))+y(m[o(1173)],4))+y(m[o(567)],4))+y(f.length,2))+y(p[o(847)],2);return{fileRecord:x.LOCAL_FILE_HEADER+g+f+p,dirRecord:x[o(372)]+y(r,2)+g+y(a[o(847)],2)+o(1550)+y(e,4)+y(n,4)+f+p+a}}var u=X,b=A(),a=S(),w=D(),k=h(),x=ke();function t(e,r,t,n){var i=_0x3d6c;a[i(1360)](this,"ZipFileWorker"),this[i(447)]=0,this[i(780)]=r,this[i(1107)]=t,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this[i(1589)]=[],this[i(736)]=0,this.entriesCount=0,this.currentFile=null,this[i(799)]=[]}b.inherits(t,a),t.prototype[u(1922)]=function(e){var r=u,t=e[r(454)][r(1191)]||0,n=this.entriesCount,i=this[r(799)][r(847)];this[r(1493)]?this[r(1776)][r(1922)](e):(this[r(447)]+=e[r(625)][r(847)],a[r(1809)][r(1922)].call(this,{data:e.data,meta:{currentFile:this[r(2092)],percent:n?(t+100*(n-i-1))/n:100}}))},t[u(1809)].openedSource=function(e){var r=u,t=(this[r(736)]=this[r(447)],this[r(2092)]=e[r(1491)][r(741)],this[r(1394)]&&!e.file[r(2019)]);t?(e=i(e,t,!1,this[r(736)],this.zipPlatform,this[r(581)]),this[r(1922)]({data:e[r(317)],meta:{percent:0}})):this[r(1493)]=!0},t[u(1809)][u(1609)]=function(e){var r=u,t=(this.accumulate=!1,this[r(1394)]&&!e.file[r(2019)]),n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this[r(581)]);if(this[r(1589)][r(1922)](n[r(335)]),t)this[r(1922)]({data:(t=e,x[(e=_0x3d6c)(717)]+y(t[e(1876)],4)+y(t[e(1173)],4)+y(t[e(567)],4)),meta:{percent:100}});else for(this[r(1922)]({data:n.fileRecord,meta:{percent:0}});this[r(1776)][r(847)];)this[r(1922)](this[r(1776)].shift());this[r(2092)]=null},t[u(1809)][u(2151)]=function(){for(var e=u,r=this[e(447)],t=0;t<this[e(1589)][e(847)];t++)this[e(1922)]({data:this[e(1589)][t],meta:{percent:100}});var n,i,a,o=this.bytesWritten-r,s=(n=this[e(1589)].length,o=o,r=r,s=this[e(780)],i=this[e(581)],i=b[(a=_0x3d6c)(1078)](a(2076),i(s)),x[a(1777)]+a(1550)+y(n,2)+y(n,2)+y(o,4)+y(r,4)+y(i[a(847)],2)+i);this[e(1922)]({data:s,meta:{percent:100}})},t[u(1809)].prepareNextSource=function(){var e=u;this.previous=this[e(799)].shift(),this.openedSource(this[e(630)][e(1726)]),this[e(1432)]?this[e(630)][e(1722)]():this[e(630)][e(807)]()},t.prototype[u(1353)]=function(e){var r=u,t=(this._sources[r(1922)](e),this);return e.on(r(625),function(e){t[r(1711)](e)}),e.on("end",function(){var e=r;t[e(1609)](t[e(630)][e(1726)]),t._sources[e(847)]?t[e(1686)]():t[e(2007)]()}),e.on(r(678),function(e){t[r(678)](e)}),this},t[u(1809)][u(807)]=function(){var e=u;return!!a[e(1809)][e(807)][e(1360)](this)&&(!this.previous&&this[e(799)].length?(this[e(1686)](),!0):this[e(630)]||this[e(799)][e(847)]||this[e(970)]?void 0:(this[e(2007)](),!0))},t[u(1809)].error=function(e){var r=u,t=this[r(799)];if(!a.prototype[r(678)][r(1360)](this,e))return!1;for(var n=0;n<t[r(847)];n++)try{t[n][r(678)](e)}catch(e){}return!0},t[u(1809)][u(619)]=function(){var e=u;a[e(1809)][e(619)].call(this);for(var r=this[e(799)],t=0;t<r[e(847)];t++)r[t][e(619)]()},r.exports=t}),Ce=r(function(e){var t=X,h=we(),n=xe();e[t(740)]=function(e,s,r){var u=t,c=new n(s[u(1394)],r,s[u(1821)],s[u(581)]),f=0;try{e.forEach(function(e,r){var t=u,n=(f++,((e,r)=>{var t=_0x3d6c;if(r=h[e=e||r])return r;throw new Error(e+t(785))})(r[t(346)].compression,s[t(1960)])),i=r[t(346)].compressionOptions||s.compressionOptions||{},a=r[t(2019)],o=r.date;r[t(621)](n,i)[t(1499)](t(1491),{name:e,dir:a,date:o,comment:r[t(1992)]||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(c)}),c[u(1647)]=f}catch(e){c.error(e)}return c}}),Ee=r(function(e,r){var i=X,t=A(),n=S();function a(e,r){var t=_0x3d6c;n[t(1360)](this,t(2123)+e),this[t(1939)]=!1,this[t(1904)](r)}t.inherits(a,n),a[i(1809)][i(1904)]=function(e){var t=i,n=this;(this[t(530)]=e)[t(1722)](),e.on(t(625),function(e){n[t(1922)]({data:e,meta:{percent:0}})}).on("error",function(e){var r=t;n[r(1432)]?this[r(970)]=e:n.error(e)}).on(t(2007),function(){var e=t;n[e(1432)]?n._upstreamEnded=!0:n[e(2007)]()})},a.prototype[i(1722)]=function(){var e=i;return!!n[e(1809)][e(1722)][e(1360)](this)&&(this._stream[e(1722)](),!0)},a[i(1809)].resume=function(){var e=i;return!!n[e(1809)][e(807)][e(1360)](this)&&(this[e(1939)]?this.end():this._stream[e(807)](),!0)},r[i(1317)]=a}),Ae=r(function(e,r){function s(e){var r=_0x3d6c;return 0<(r=(e="/"===e[r(1366)](-1)?e[r(2016)](0,e.length-1):e)[r(1067)]("/"))?e.substring(0,r):""}function u(e,r){var t=_0x3d6c;return r=_typeof(r)<"u"?r:h.createFolders,e=m(e),this[t(330)][e]||g.call(this,e,null,{dir:!0,createFolders:r}),this.files[e]}var a=D(),c=A(),f=S(),o=w(),h=re(),l=O(),d=ae(),v=Ce(),p=b(),_=Ee(),g=function(e,r,t){var n=_0x3d6c,i=c[n(1218)](r),a=c[n(1963)](t||{},h),o=(a.date=a.date||new Date,null!==a[n(1960)]&&(a[n(1960)]=a.compression[n(1270)]()),typeof a[n(1295)]==n(2076)&&(a[n(1295)]=parseInt(a.unixPermissions,8)),a[n(1295)]&&16384&a[n(1295)]&&(a[n(2019)]=!0),a[n(832)]&&16&a.dosPermissions&&(a[n(2019)]=!0),a[n(2019)]&&(e=m(e)),a[n(1954)]&&(o=s(e))&&u[n(1360)](this,o,!0),i===n(2076)&&!1===a[n(654)]&&!1===a[n(675)]);(!t||"u"<_typeof(t[n(654)]))&&(a[n(654)]=!o);(r instanceof l&&0===r[n(567)]||a[n(2019)]||!r||0===r[n(847)])&&(a[n(675)]=!1,a[n(654)]=!0,r="",a[n(1960)]=n(1307),n(2076));i=null,i=r instanceof l||r instanceof f?r:p.isNode&&p[n(1671)](r)?new _(e,r):c[n(1410)](e,r,a[n(654)],a[n(1220)],a[n(675)]),t=new d(e,i,a);this[n(330)][e]=t},m=function(e){return"/"!==e[_0x3d6c(1366)](-1)&&(e+="/"),e};function y(e){var r=_0x3d6c;return Object[r(1809)][r(926)].call(e)===r(1795)}r.exports={load:function(){throw new Error(_0x3d6c(1356))},forEach:function(e){var r,t,n,i=_0x3d6c;for(r in this[i(330)])n=this[i(330)][r],t=r[i(1366)](this[i(1551)][i(847)],r[i(847)]),t&&r.slice(0,this.root.length)===this[i(1551)]&&e(t,n)},filter:function(n){var i=_0x3d6c,a=[];return this[i(1793)](function(e,r){var t=i;n(e,r)&&a[t(1922)](r)}),a},file:function(e,r,t){var n,i,a=_0x3d6c;return 1===arguments.length?y(e)?(n=e,this[a(924)](function(e,r){return!r[a(2019)]&&n.test(e)})):(i=this[a(330)][this[a(1551)]+e])&&!i[a(2019)]?i:null:(e=this[a(1551)]+e,g[a(1360)](this,e,r,t),this)},folder:function(t){var e,r,n=_0x3d6c;return t?y(t)?this.filter(function(e,r){return r[_0x3d6c(2019)]&&t.test(e)}):(e=this[n(1551)]+t,e=u[n(1360)](this,e),(r=this[n(1527)]())[n(1551)]=e.name,r):this},remove:function(n){var i=_0x3d6c,e=(n=this.root+n,this[i(330)][n]);if(e||("/"!==n[i(1366)](-1)&&(n+="/"),e=this[i(330)][n]),e&&!e[i(2019)])delete this.files[n];else for(var r=this[i(924)](function(e,r){var t=i;return r[t(741)][t(1366)](0,n[t(847)])===n}),t=0;t<r.length;t++)delete this[i(330)][r[t].name];return this},generate:function(e){throw new Error(_0x3d6c(1356))},generateInternalStream:function(e){var r=_0x3d6c,t={};try{if((t=c.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:r(900),comment:null,mimeType:r(695),encodeFileName:a.utf8encode}))[r(1443)]=t[r(1443)][r(570)](),t[r(1960)]=t[r(1960)][r(1270)](),"binarystring"===t[r(1443)]&&(t[r(1443)]=r(2076)),!t[r(1443)])throw new Error(r(2038));c[r(401)](t[r(1443)]),t[r(1821)]!==r(367)&&t.platform!==r(1563)&&t[r(1821)]!==r(772)&&t[r(1821)]!==r(458)||(t.platform=r(738)),t[r(1821)]===r(1390)&&(t[r(1821)]="DOS");var n=t[r(1992)]||this[r(1992)]||"",i=v[r(740)](this,t,n)}catch(e){(i=new f("error"))[r(678)](e)}return new o(i,t.type||r(2076),t.mimeType)},generateAsync:function(e,r){var t=_0x3d6c;return this[t(1564)](e)[t(1493)](r)},generateNodeStream:function(e,r){var t=_0x3d6c;return(e=e||{}).type||(e[t(1443)]=t(1029)),this[t(1564)](e)[t(626)](r)}}}),Se=r(function(e,r){var i=X,t=A();function n(e){var r=_0x3d6c;this[r(625)]=e,this[r(847)]=e.length,this[r(1986)]=0,this[r(877)]=0}n[i(1809)]={checkOffset:function(e){var r=i;this.checkIndex(this[r(1986)]+e)},checkIndex:function(e){var r=i;if(this[r(847)]<this[r(877)]+e||e<0)throw new Error(r(1576)+this[r(847)]+", asked index = "+e+r(1715))},setIndex:function(e){var r=i;this.checkIndex(e),this[r(1986)]=e},skip:function(e){this[i(438)](this.index+e)},byteAt:function(e){},readInt:function(e){var r,t=i,n=0;for(this.checkOffset(e),r=this.index+e-1;r>=this[t(1986)];r--)n=(n<<8)+this.byteAt(r);return this[t(1986)]+=e,n},readString:function(e){var r=i;return t.transformTo(r(2076),this[r(943)](e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this[i(1731)](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))}},r.exports=n}),De=r(function(e,r){var s=X,n=Se();function t(e){var r=_0x3d6c;n[r(1360)](this,e);for(var t=0;t<this[r(625)][r(847)];t++)e[t]=255&e[t]}A().inherits(t,n),t[s(1809)].byteAt=function(e){var r=s;return this.data[this[r(877)]+e]},t.prototype[s(618)]=function(e){for(var r=s,t=e[r(1080)](0),n=e[r(1080)](1),i=e[r(1080)](2),a=e.charCodeAt(3),o=this[r(847)]-4;0<=o;--o)if(this.data[o]===t&&this[r(625)][o+1]===n&&this[r(625)][o+2]===i&&this.data[o+3]===a)return o-this.zero;return-1},t[s(1809)][s(930)]=function(e){var r=s,t=e[r(1080)](0),n=e[r(1080)](1),i=e[r(1080)](2),e=e[r(1080)](3),r=this[r(943)](4);return t===r[0]&&n===r[1]&&i===r[2]&&e===r[3]},t[s(1809)][s(943)]=function(e){var r,t=s;return this[t(1844)](e),0===e?[]:(r=this[t(625)][t(1366)](this[t(877)]+this[t(1986)],this[t(877)]+this[t(1986)]+e),this[t(1986)]+=e,r)},r[s(1317)]=t}),Oe=r(function(e,r){var t=X,n=Se();function i(e){n.call(this,e)}A().inherits(i,n),i.prototype.byteAt=function(e){return this[_0x3d6c(625)].charCodeAt(this.zero+e)},i[t(1809)][t(618)]=function(e){var r=t;return this[r(625)][r(1067)](e)-this[r(877)]},i[t(1809)][t(930)]=function(e){return e===this[t(943)](4)},i[t(1809)].readData=function(e){var r=t,r=(this.checkOffset(e),this[r(625)][r(1366)](this.zero+this[r(1986)],this[r(877)]+this.index+e));return this.index+=e,r},r[t(1317)]=i}),Te=r(function(e,r){var t=X,n=De();function i(e){n[_0x3d6c(1360)](this,e)}A()[t(638)](i,n),i[t(1809)][t(943)]=function(e){var r=t;return this[r(1844)](e),0===e?new Uint8Array(0):(r=this[r(625)][r(731)](this[r(877)]+this[r(1986)],this[r(877)]+this[r(1986)]+e),this.index+=e,r)},r[t(1317)]=i}),Be=r(function(e,r){var t=X,n=Te();function i(e){n.call(this,e)}A()[t(638)](i,n),i[t(1809)][t(943)]=function(e){var r=t,r=(this[r(1844)](e),this[r(625)].slice(this.zero+this.index,this[r(877)]+this[r(1986)]+e));return this.index+=e,r},r[t(1317)]=i}),Pe=r(function(e,r){var n=X,i=A(),a=_(),o=De(),s=Oe(),u=Be(),c=Te();r[n(1317)]=function(e){var r=n,t=i.getTypeOf(e);return i[r(401)](t),t!==r(2076)||a.uint8array?"nodebuffer"===t?new u(e):a[r(2104)]?new c(i[r(1078)](r(2104),e)):new o(i[r(1078)](r(1015),e)):new s(e)}}),Fe=r(function(e,r){var o=X,n=Pe(),i=A(),a=O(),s=h(),u=D(),c=we(),f=_();function t(e,r){var t=_0x3d6c;this[t(346)]=e,this[t(908)]=r}t[o(1809)]={isEncrypted:function(){return 1==(1&this[o(1423)])},useUTF8:function(){return 2048==(2048&this[o(1423)])},readLocalPart:function(e){var r,t=o;if(e.skip(22),this[t(1210)]=e.readInt(2),r=e[t(1731)](2),this[t(1861)]=e.readData(this[t(1210)]),e.skip(r),-1===this[t(1173)]||-1===this[t(567)])throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(r=(e=>{var r,t=_0x3d6c;for(r in c)if(c.hasOwnProperty(r)&&c[r][t(1558)]===e)return c[r];return null})(this[t(340)])))throw new Error("Corrupted zip : compression "+i[t(1523)](this[t(340)])+" unknown (inner file : "+i[t(1078)](t(2076),this[t(1861)])+")");this.decompressed=new a(this[t(1173)],this[t(567)],this.crc32,r,e[t(943)](this[t(1173)]))},readCentralPart:function(e){var r=o,t=(this[r(1608)]=e[r(1731)](2),e[r(751)](2),this[r(1423)]=e[r(1731)](2),this[r(340)]=e.readString(2),this[r(2134)]=e[r(1827)](),this.crc32=e[r(1731)](4),this[r(1173)]=e[r(1731)](4),this[r(567)]=e.readInt(4),e.readInt(2));if(this[r(1105)]=e.readInt(2),this.fileCommentLength=e[r(1731)](2),this.diskNumberStart=e[r(1731)](2),this[r(730)]=e.readInt(2),this[r(1267)]=e[r(1731)](4),this.localHeaderOffset=e[r(1731)](4),this[r(1780)]())throw new Error(r(1846));e.skip(t),this[r(1324)](e),this[r(1601)](e),this[r(1440)]=e[r(943)](this[r(485)])},processAttributes:function(){var e=o,r=(this[e(1295)]=null,this[e(832)]=null,this[e(1608)]>>8);this.dir=!!(16&this[e(1267)]),0==r&&(this[e(832)]=63&this[e(1267)]),3==r&&(this[e(1295)]=this.externalFileAttributes>>16&65535),this.dir||"/"!==this[e(1174)].slice(-1)||(this[e(2019)]=!0)},parseZIP64ExtraField:function(e){var r,t=o;this.extraFields[1]&&(r=n(this[t(1571)][1].value),this.uncompressedSize===i.MAX_VALUE_32BITS&&(this[t(567)]=r[t(1731)](8)),this[t(1173)]===i[t(1182)]&&(this.compressedSize=r[t(1731)](8)),this[t(1543)]===i[t(1182)]&&(this[t(1543)]=r[t(1731)](8)),this[t(1915)]===i[t(1182)])&&(this[t(1915)]=r.readInt(4))},readExtraFields:function(e){var r,t,n,i=o,a=e.index+this.extraFieldsLength;for(this[i(1571)]||(this.extraFields={});e.index+4<a;)r=e[i(1731)](2),t=e[i(1731)](2),n=e.readData(t),this[i(1571)][r]={id:r,length:t,value:n};e.setIndex(a)},handleUTF8:function(){var e,r=o,t=f[r(2104)]?r(2104):"array";this[r(1708)]()?(this[r(1174)]=u.utf8decode(this[r(1861)]),this[r(1677)]=u.utf8decode(this[r(1440)])):(null!==(e=this.findExtraFieldUnicodePath())?this.fileNameStr=e:(e=i.transformTo(t,this[r(1861)]),this[r(1174)]=this[r(908)].decodeFileName(e)),null!==(e=this[r(989)]())?this[r(1677)]=e:(e=i.transformTo(t,this.fileComment),this[r(1677)]=this[r(908)][r(1217)](e)))},findExtraFieldUnicodePath:function(){var e,r=o,t=this.extraFields[28789];return!t||1!==(e=n(t[r(696)]))[r(1731)](1)||s(this[r(1861)])!==e.readInt(4)?null:u[r(2045)](e[r(943)](t[r(847)]-5))},findExtraFieldUnicodeComment:function(){var e,r=o,t=this[r(1571)][25461];return!t||1!==(e=n(t[r(696)]))[r(1731)](1)||s(this.fileComment)!==e[r(1731)](4)?null:u[r(2045)](e[r(943)](t[r(847)]-5))}},r.exports=t}),Ie=r(function(e,r){var a=X,t=Pe(),n=A(),i=ke(),o=Fe(),s=(D(),_());function u(e){var r=_0x3d6c;this[r(330)]=[],this[r(908)]=e}u[a(1809)]={checkSignature:function(e){var r,t=a;if(!this.reader[t(930)](e))throw this[t(1238)][t(1986)]-=4,r=this.reader[t(760)](4),new Error(t(1464)+n[t(1523)](r)+t(727)+n[t(1523)](e)+")")},isSignature:function(e,r){var t=a,n=this[t(1238)][t(1986)];this.reader.setIndex(e);e=this[t(1238)][t(760)](4)===r;return this.reader[t(438)](n),e},readBlockEndOfCentral:function(){var e=a,r=(this[e(1299)]=this[e(1238)][e(1731)](2),this[e(1219)]=this[e(1238)][e(1731)](2),this.centralDirRecordsOnThisDisk=this[e(1238)][e(1731)](2),this[e(646)]=this[e(1238)][e(1731)](2),this[e(534)]=this[e(1238)][e(1731)](4),this[e(1137)]=this[e(1238)].readInt(4),this.zipCommentLength=this[e(1238)][e(1731)](2),this[e(1238)][e(943)](this[e(1782)])),t=s[e(2104)]?e(2104):e(1015),t=n.transformTo(t,r);this[e(780)]=this[e(908)][e(1217)](t)},readBlockZip64EndOfCentral:function(){var e=a;this[e(1926)]=this[e(1238)][e(1731)](8),this[e(1238)][e(751)](4),this[e(1299)]=this.reader[e(1731)](4),this[e(1219)]=this[e(1238)][e(1731)](4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this[e(1238)][e(1731)](8),this.centralDirSize=this[e(1238)][e(1731)](8),this[e(1137)]=this.reader[e(1731)](8),this.zip64ExtensibleData={};for(var r,t,n,i=this.zip64EndOfCentralSize-44;0<i;)r=this[e(1238)].readInt(2),t=this[e(1238)][e(1731)](4),n=this[e(1238)][e(943)](t),this[e(1042)][r]={id:r,length:t,value:n}},readBlockZip64EndOfCentralLocator:function(){var e=a;if(this[e(1349)]=this[e(1238)].readInt(4),this[e(1310)]=this[e(1238)][e(1731)](8),this[e(2011)]=this[e(1238)].readInt(4),1<this.disksCount)throw new Error(e(777))},readLocalFiles:function(){for(var e,r=a,t=0;t<this[r(330)][r(847)];t++)e=this.files[t],this[r(1238)].setIndex(e[r(1543)]),this[r(2044)](i[r(1665)]),e.readLocalPart(this[r(1238)]),e[r(1847)](),e[r(1974)]()},readCentralDir:function(){var e,r=a;for(this.reader[r(438)](this[r(1137)]);this[r(1238)][r(930)](i[r(372)]);)(e=new o({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this[r(330)][r(1922)](e);if(this[r(646)]!==this.files[r(847)]&&0!==this[r(646)]&&0===this[r(330)][r(847)])throw new Error(r(404)+this[r(646)]+r(823)+this[r(330)][r(847)])},readEndOfCentral:function(){var e=a,r=this[e(1238)][e(618)](i[e(1777)]);if(r<0)throw!this.isSignature(0,i[e(1665)])?new Error(e(1201)):new Error(e(500));this[e(1238)][e(438)](r);var t=r;if(this[e(2044)](i[e(1777)]),this[e(1445)](),this[e(1299)]===n.MAX_VALUE_16BITS||this.diskWithCentralDirStart===n.MAX_VALUE_16BITS||this[e(1656)]===n.MAX_VALUE_16BITS||this[e(646)]===n[e(709)]||this.centralDirSize===n.MAX_VALUE_32BITS||this[e(1137)]===n[e(1182)]){if(this[e(2040)]=!0,(r=this[e(1238)].lastIndexOfSignature(i[e(1379)]))<0)throw new Error(e(972));if(this[e(1238)].setIndex(r),this.checkSignature(i.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this[e(1315)](),!this.isSignature(this[e(1310)],i[e(1266)])&&(this[e(1310)]=this[e(1238)].lastIndexOfSignature(i[e(1266)]),this[e(1310)]<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this[e(1238)][e(438)](this[e(1310)]),this.checkSignature(i[e(1266)]),this[e(1593)]()}r=this[e(1137)]+this[e(534)],r=t-(r=this[e(2040)]?r+20+(12+this.zip64EndOfCentralSize):r);if(0<r)this.isSignature(t,i[e(372)])||(this[e(1238)][e(877)]=r);else if(r<0)throw new Error(e(1869)+Math.abs(r)+e(430))},prepareReader:function(e){this[a(1238)]=t(e)},load:function(e){var r=a;this[r(1605)](e),this[r(950)](),this.readCentralDir(),this[r(1546)]()}},r[a(1317)]=u}),Re=r(function(e,r){var t=A(),u=g(),n=D(),i=Ie(),c=ne(),f=b();r.exports=function(e,a){var o=_0x3d6c,s=this;return a=t[o(1963)](a||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:n[o(2045)]}),f[o(1233)]&&f[o(1671)](e)?u.Promise[o(863)](new Error(o(636))):t[o(1410)]("the loaded zip file",e,!0,a[o(1220)],a.base64).then(function(e){var r=o,t=new i(a);return t[r(655)](e),t})[o(542)](function(e){var r=o,t=[u.Promise[r(1515)](e)],n=e[r(330)];if(a[r(672)])for(var i=0;i<n[r(847)];i++)t[r(1922)]((a=>{var e=_0x3d6c;return new u[e(552)](function(r,t){var n=e,i=a.decompressed[n(1724)]()[n(1949)](new c);i.on(n(678),function(e){t(e)}).on(n(2007),function(){var e=n;i[e(1726)][e(1876)]!==a.decompressed[e(1876)]?t(new Error(e(388))):r()})[n(807)]()})})(n[i]));return u[r(552)].all(t)})[o(542)](function(e){for(var r=o,e=e.shift(),t=e[r(330)],n=0;n<t[r(847)];n++){var i=t[n];s.file(i[r(1174)],i[r(1451)],{binary:!0,optimizedBinaryString:!0,date:i[r(2134)],dir:i[r(2019)],comment:i[r(1677)][r(847)]?i.fileCommentStr:null,unixPermissions:i.unixPermissions,dosPermissions:i[r(832)],createFolders:a[r(1954)]})}return e[r(780)].length&&(s[r(1992)]=e[r(780)]),s})}}),je=r(function(e,r){var t=X;function n(){var e=_0x3d6c;if(!(this instanceof n))return new n;if(arguments[e(847)])throw new Error(e(1162));this[e(330)]=Object[e(1675)](null),this[e(1992)]=null,this[e(1551)]="",this[e(1527)]=function(){var e,r=new n;for(e in this)"function"!=typeof this[e]&&(r[e]=this[e]);return r}}n[t(1809)]=Ae(),n[t(1809)][t(1520)]=Re(),n[t(2113)]=_(),n[t(1804)]=re(),n[t(1533)]=t(774),n[t(1520)]=function(e,r){return(new n).loadAsync(e,r)},n[t(2129)]=g(),r[t(1317)]=n}),o={},Ne=o,Ge={Command:function(){return Le},jszip:function(){return He[X(1152)]}};for(n in Ge)u(Ne,n,{get:Ge[n],enumerable:!0});e[X(1317)]=(e=o,i(u({},"__esModule",{value:!0}),e));var o=t(U(),1)[X(1152)],Le=(o[X(1242)],o.createCommand,o[X(420)],o[X(2066)],o.CommanderError,o.InvalidArgumentError,o[X(933)],o[X(1469)]),He=(o[X(2004)],o.Option,o[X(700)],t(je()))}),Jn=Be(function(e,r){var t=_0x3d6c;r[t(1317)]={name:t(1815),version:t(1538),description:"ASCF sign tools",main:"./lib/index.js",scripts:{build:t(716),dev:"tsup --env.NODE_ENV development",watch:t(1047),"build:ascf-toolkit":"tsup --minify --dts -d ../ascf-toolkit/src/ascf-sign-tools","dev:ascf-toolkit":"tsup --sourcemap --no-minify -d ../ascf-toolkit/src/ascf-sign-tools","watch:ascf-toolkit":t(1472)},dependencies:{semver:t(881),tar:"7.4.3",express:"4.21.0",typescript:"4.8.4",decompress:t(1698),"js-base64":t(1901),json5:t(1594),jsrsasign:t(1429),rimraf:"4.4.0",cachedir:t(978),log4js:"6.9.1"},devDependencies:{tsup:"^8.4.0"},bin:{"ascf-sign-tools":"./lib/bin/index.js"}}}),bt=Be(function(j,e){function N(t,n,i,a){var o=y;if(n&&"object"==_typeof(n)||typeof n==o(2082)){var s,r=_createForOfIteratorHelper(M(n));try{for(r.s();!(s=r.n())[o(1616)];)(()=>{var e=o,r=s[e(696)];q[e(1360)](t,r)||r===i||H(t,r,{get:function(){return n[r]},enumerable:!(a=U(n,r))||a[e(1202)]})})()}catch(e){r.e(e)}finally{r.f()}}return t}function r(e,r,t){var n=y;return t=null!=e?L(z(e)):{},N(!r&&e&&e[n(543)]?t:H(t,n(1152),{value:e,enumerable:!0}),e)}var G,y=_0x3d6c,L=Object[y(1675)],H=Object[y(952)],U=Object[y(441)],M=Object[y(1610)],z=Object[y(707)],q=Object[y(1809)][y(1160)],t={},W=t,V={$async:function(){return b},ASCF_LOG_FILE:function(){return ee},AscfBuilder:function(){return Cn},AscfDebugger:function(){return At},AsyncResult:function(){return oe},BUILD_MODE_DEBUG:function(){return ln},BUILD_MODE_RELEASE:function(){return dn},BUILD_TARGET_AS:function(){return Me},BUILD_TARGET_QS:function(){return ze},BuildProcessFactory:function(){return Kn},DebuggerProcessFactory:function(){return Zn},ERROR_MSG:function(){return m},HOS_DEVICE:function(){return l},LEGACY_DEVICE:function(){return h},ascfCompile:function(){return Yt},ascfConvert:function(){return $t},ascfGenCert:function(){return en},ascfGenP12:function(){return tn},ascfRun:function(){return Zt},clearAscfDepDirCache:function(){return Gt},configureLogger:function(){return te},devicesLegacyShared:function(){return xe},execSafe:function(){return br},findAvailablePort:function(){return Cr},fixHvigorPath:function(){return Ht},getAscfDebuggerPidFile:function(){return fn},getAscfDepDir:function(){return Mt},getBundleInfo:function(){return cr},getDebugServerInfo:function(){return un},getDebugees:function(){return st},getDevEcoSdkHome:function(){return ye},getDevEcoToolsDir:function(){return pe},getHdcPath:function(){return be},getHvigorwPath:function(){return s},getLogLevelGetter:function(){return ie},getLogger:function(){return n},getNodePath:function(){return _e},getNpmPath:function(){return ge},getOhpmPath:function(){return me},getPath:function(){return i},getProjectConfig:function(){return fr},getSpkInfo:function(){return ur},hasHvigor:function(){return Nt},hdcDeviceShared:function(){return er},hdcShared:function(){return qe},installSpkShared:function(){return Pn},isPortReachable:function(){return kr},maskLast4:function(){return Ue},mergeJson:function(){return ar},normalizeBuildMode:function(){return vn},openInBrowser:function(){return Zr},optArgIf:function(){return xn},parseJsonFile:function(){return d},parseJsonSafe:function(){return ir},portManagerShared:function(){return Ar},setLogLevelGetter:function(){return ne},setLoggerConfig:function(){return re},startDebugServerCmd:function(){return an},stopDebugServer:function(){return sn},tryHdcPortReversing:function(){return Ge}};for(G in V)H(W,G,{get:V[G],enumerable:!0});e.exports=(e=t,N(H({},"__esModule",{value:!0}),e));var K=r(require(y(1073))),Z=r(require(y(648))),J=r(require(y(1023))),Y={isRelease:!1},X=[y(1363),"info",y(585),y(678),y(1304)],$="info",Q=function(){return $||y(1129)},ee=Z[y(1515)]((0,J[y(1152)])("ascf-cache"),"build.log");function re(e){var r,t=y,e=(r=y,(e=e)&&X[r(987)](e[r(570)]())?e[r(570)]():"info");$=e,K[t(1088)]({appenders:{default:{type:"stdout",layout:{type:t(1127),pattern:"%d{hh:mm:ss.SSS} > %p %c %[%m%]"}},"debug-log-file":{type:t(1163),filename:Z[t(1515)]((0,J[t(1152)])(t(363)),t(377)),maxLogSize:10485760,backups:9,layout:{type:t(1127),pattern:t(801)}}},categories:{default:{appenders:[t(1152)],level:e},AscfToolkit:{appenders:[t(743)],level:t(1363)}}})}function te(e){K[y(1088)](e)}function ne(e){Q=e}function ie(){return Q}var a,ae=_createClass(function e(r){var t=_0x3d6c;_classCallCheck(this,e),this[t(1894)]=r,this[t(798)]=K[t(2018)](r),global[t(1967)]&&(this[t(614)]=K[t(2018)]("AscfToolkit"))},[{key:"doLog",value:function(e,r,t){var n,i=_0x3d6c,a=3<arguments[i(847)]&&void 0!==arguments[3]&&arguments[3],o="";""!==(o=e!==i(1129)?function(e){var r=y,t="";if(Y[r(997)]){for(var n=arguments[r(847)],i=new Array(1<n?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];i[r(685)](e);for(var o=0;o<i[r(847)];o++){var s="";typeof i[o]==r(2076)&&(s=i[o]),(s=i[o]instanceof Error?i[o].message:s)[r(1427)]("\n")?t+=String(s)[r(1936)]("\n")[1]:t+=String(s).split("\n")[0]}}return t}[i(475)](void 0,[r][i(1890)](_toConsumableArray(t))):o)?(this[i(798)][e](o),null!=(n=this[i(614)])&&n[e](o)):((n=this[i(798)])[e][i(475)](n,[r][i(1890)](_toConsumableArray(t))),null!=(o=this[i(614)])&&o[e][i(475)](o,[r].concat(_toConsumableArray(t)))),a&&process[i(775)](1)}},{key:(a=y)(1129),value:function(e){for(var r=a,t=arguments.length,n=new Array(1<t?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return this[r(1148)](r(1129),e,n)}},{key:a(585),value:function(e){for(var r=a,t=arguments[r(847)],n=new Array(1<t?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return this[r(1148)](r(585),e,n)}},{key:"debug",value:function(e){for(var r=a,t=arguments.length,n=new Array(1<t?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return this[r(1148)]("debug",e,n)}},{key:a(678),value:function(e){for(var r=a,t=arguments[r(847)],n=new Array(1<t?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return this.doLog(r(678),e,n)}},{key:a(1304),value:function(e){for(var r=a,t=arguments.length,n=new Array(1<t?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return this[r(1148)](r(1304),e,n,!0)}}]);function n(e){return new ae(e)}var oe=_createClass(function e(){_classCallCheck(this,e)});function b(e){return se[y(475)](this,arguments)}function se(){var e=y;return(se=_asyncToGenerator(_regenerator().m(function e(r){var t;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,r;case 1:return t=e.v,e.a(2,{data:t});case 2:return e.p=2,e.a(2,{err:e.v})}},e,null,[[0,2]])})))[e(475)](this,arguments)}var ue=require(y(588)),ce=r(require("fs")),fe=r(require("fs")),he=r(require(y(648))),le=n("deveco"),de=!1,o=process[y(1821)]===y(1390),t=y(1619),e=y(2095),ve=o?e:t;function pe(){var e=y,r=process[e(912)][e(468)]||process[e(912)][e(1725)]||process[e(912)][e(586)],r=r?r[e(1936)](";")[0][e(1437)]()+e(1536):ve;return de||fe.existsSync(r)||(de=!0,le.error(e(831))),r}function i(){for(var e=y,r=arguments[e(847)],t=new Array(r),n=0;n<r;n++)t[n]=arguments[n];var i=pe(),i=he[e(1524)][e(475)](he,[i][e(1890)](t));return o&&i.includes(" ")?'"'[e(1890)](i,'"'):i}function _e(){var e=y;return i(e(1849),e(o?697:1998))}function ge(){var e=y;return i(e(1849),o?e(886):"bin/npm")}function me(){var e=y;return i(e(732),e(1839),"ohpm")}function s(){var e=y;return i(e(558),"bin",e(1991))}function ye(){var e=y;return i(e(2029))[e(488)](/"/g,"")}function be(){var e=y;return i(e(1670),e(o?1754:1e3))}var we=r(require(y(648))),ke=require("os");function xe(e){var n=y,c=e.logger,f=e[n(1274)];function r(){var e=n;return(r=_asyncToGenerator(_regenerator().m(function e(){var t;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return e.n=1,b(f([r(1662),"-l"]));case 1:return t=e.v,e.a(2,t.err?(c[r(678)](r(1969)+t[r(1640)]),[]):null==(t=t[r(625)])||null==(t=t[r(1437)]())||null==(t=t[r(1936)]("\n"))?void 0:t.map(function(e){return e[r(1437)]()}))}},e)})))[e(475)](this,arguments)}function t(){return(t=_asyncToGenerator(_regenerator().m(function e(t){var n;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return e.n=1,b(f(["-s",t,r(1229),r(974),r(1327)]));case 1:return n=e.v,e.a(2,n[r(1640)]||/(\[Fail\])/[r(806)](n[r(625)])?(c.error("get device name error",n[r(1640)]),"Unknown"):null==(n=n[r(625)])?void 0:n.trim())}},e)}))).apply(this,arguments)}function h(e,r){return i[n(475)](this,arguments)}function i(){var e=n;return(i=_asyncToGenerator(_regenerator().m(function e(t,n){var i,a,o,s,u=arguments;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return a=2<u[r(847)]&&void 0!==u[2]?u[2]:0,o=Math[r(2121)](64512*Math[r(1031)]())+1024,e.n=1,b(f(["-s",t,r(1109),r(1339)[r(1890)](o),r(1339)[r(1890)](n)]));case 1:if((s=e.v).err)return c[r(585)](r(1284)[r(1890)](o,r(1446))[r(1890)](n),s[r(1640)]),e.a(2);e.n=2;break;case 2:return e.a(2,s[r(625)]&&10!==a?null!=(i=s[r(625)])&&i[r(987)](String(o))?o:h(t,n,++a):0)}},e)})))[e(475)](this,arguments)}var a="com.huawei.ascf.sample/com.huawei.ascf.main.AscfActivity";function o(){return(o=_asyncToGenerator(_regenerator().m(function e(t,n){return _regenerator().w(function(e){for(var r=_0x3d6c;;)if(0===e.n)return e.a(2,f(["-s",t,r(1229),"am","start","-n",a,"-S",r(848),r(1740),n]))},e)}))).apply(this,arguments)}function s(){var e=n;return(s=_asyncToGenerator(_regenerator().m(function e(t,n,i){return _regenerator().w(function(e){for(var r=_0x3d6c;;)if(0===e.n)return e.a(2,f(["-s",t,r(1229),"am","start","-n",a,"-S",r(848),r(594),r(1298),r(848),r(1587),i,"--es",r(1740),n,r(848),r(1346),n[r(1936)](r(1684))[1]]))},e)})))[e(475)](this,arguments)}function u(){var e=n;return(u=_asyncToGenerator(_regenerator().m(function e(t){return _regenerator().w(function(e){for(var r=_0x3d6c;;)if(0===e.n)return e.a(2,f(["-s",t,r(1756),"--list"],{sensitive:!0}))},e)})))[e(475)](this,arguments)}function l(){return(l=_asyncToGenerator(_regenerator().m(function e(t,n){return _regenerator().w(function(e){for(var r=_0x3d6c;;)if(0===e.n)return e.a(2,f(["-s",t,r(1756),r(510),n]))},e)}))).apply(this,arguments)}function d(){var e=n;return(d=_asyncToGenerator(_regenerator().m(function e(t,n,i){return _regenerator().w(function(e){for(var r=_0x3d6c;;)if(0===e.n)return e.a(2,f(["-s",t,r(1756),n,i]))},e)})))[e(475)](this,arguments)}function v(){return(v=_asyncToGenerator(_regenerator().m(function e(t,n,i){return _regenerator().w(function(e){for(var r=_0x3d6c;;)if(0===e.n)return e.a(2,f(["-s",t,r(1109),r(1339).concat(i),"tcp".concat(n)]))},e)}))).apply(this,arguments)}function p(){var e=n;return(p=_asyncToGenerator(_regenerator().m(function e(r,t){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,f(["-s",r,"reverse","--remove",t]))},e)})))[e(475)](this,arguments)}function _(){var e=n;return(_=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(var r=_0x3d6c;;)if(0===e.n)return e.a(2,f([r(1662),"-l"],{sensitive:!0}))},e)})))[e(475)](this,arguments)}function g(){var e=n;return(g=_asyncToGenerator(_regenerator().m(function e(t){return _regenerator().w(function(e){for(var r=_0x3d6c;;)if(0===e.n)return e.a(2,f(["-s",t,"shell","getprop",r(514)]))},e)})))[e(475)](this,arguments)}function m(){var e=n;return(m=_asyncToGenerator(_regenerator().m(function e(t,n){var i,a;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return i=1,e.n=1,b(f(["-s",t,r(1229),'"dumpsys activity activities | grep mResumedActivity"']));case 1:return a=e.v,e.a(2,(a.data&&(i=null!=(a=Number(null==(a=/AscfContainerActivity(\d+)/.exec(a[r(625)]))?void 0:a[1]))?a:1),f(["-s",t,r(1229),r(1329)[r(1890)](n,r(1808))[r(1890)](i,r(837))])))}},e)})))[e(475)](this,arguments)}return{listTargets:function(){return r[n(475)](this,arguments)},getDeviceName:function(e){return t[n(475)](this,arguments)},tryAdbPortReversing:h,startHostPkg:function(e,r){return o.apply(this,arguments)},startHostPkgUrl:function(e,r,t){return s[n(475)](this,arguments)},fportListCmd:function(e){return u[n(475)](this,arguments)},fportRmCmd:function(e,r){return l[n(475)](this,arguments)},fportCmd:function(e,r,t){return d.apply(this,arguments)},rportCmd:function(e,r,t){return v[n(475)](this,arguments)},rportRmCmd:function(e,r){return p[n(475)](this,arguments)},getDevicesCmd:function(){return _[n(475)](this,arguments)},getLegacyDeviceName:function(e){return g[n(475)](this,arguments)},getLegacyProcess:function(e,r){return m.apply(this,arguments)}}}function Ce(e,r){return Ee[y(475)](this,arguments)}function Ee(){return(Ee=_asyncToGenerator(_regenerator().m(function e(t,n){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,p((r=void 0,r=y,"win32"===(0,ke.platform)()?we[r(1152)][r(1524)](__dirname,r(1075)):"darwin"===(0,ke[r(1821)])()?we.default.join(__dirname,r(1250)):we[r(1152)][r(1524)](__dirname,r(515))),t,n));var r},e)}))).apply(this,arguments)}var e=xe({logger:n(y(1482)),runAdbCmdAsync:Ce}),Ae=(e.listTargets,y(369),e[y(907)]),Se=e[y(1898)],De=e[y(1970)],t=e[y(1103)],Oe=e.fportRmCmd,Te=e[y(1721)],Be=(e.rportCmd,e.rportRmCmd),u=e[y(1021)],c=e[y(1697)],Pe=e[y(1591)];function Fe(){return(Fe=_asyncToGenerator(_regenerator().m(function e(t,n){return _regenerator().w(function(e){for(var r=_0x3d6c;;)if(0===e.n)return e.a(2,Ce(["-s",t,r(1229),r(473).concat(n,'"')]))},e)}))).apply(this,arguments)}var Ie=n(y(446));function Re(){return je[y(475)](this,arguments)}function je(){var e=y;return(je=_asyncToGenerator(_regenerator().m(function e(r,t){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,p(be(),r,t))},e)})))[e(475)](this,arguments)}function Ne(){var e=y;return(Ne=_asyncToGenerator(_regenerator().m(function e(){var t;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return e.n=1,b(Re([r(1444),r(451)],{sensitive:!0}));case 1:return t=e.v,e.a(2,t.err?(Ie[r(678)](r(1969)+t[r(1640)]),[]):null==(t=t[r(625)])||null==(t=t[r(1437)]())||null==(t=t[r(1936)]("\n"))?void 0:t.map(function(e){return e[r(1437)]()}))}},e)})))[e(475)](this,arguments)}function Ge(e,r){return Le[y(475)](this,arguments)}function Le(){var e=y;return(Le=_asyncToGenerator(_regenerator().m(function e(t,n){var i,a,o,s,u=arguments;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return a=2<u.length&&void 0!==u[2]?u[2]:0,o=Math[r(2121)](64512*Math[r(1031)]())+1024,e.n=1,b(Re(["-t",t,"rport",r(1339)[r(1890)](o),r(1339)[r(1890)](n)]));case 1:if((s=e.v)[r(1640)])return Ie[r(585)](r(1061).concat(o,r(1446))[r(1890)](n),s[r(1640)]),e.a(2);e.n=2;break;case 2:return e.a(2,s[r(625)]&&10!==a?null!=(i=s[r(625)])&&i[r(987)](r(742))?o:Ge(t,n,++a):0)}},e)})))[e(475)](this,arguments)}var He=require(y(588));function Ue(e){var r=y;return e&&(e[r(847)]<4?"*"[r(1419)](e[r(847)]):e.slice(0,-4)+r(1831))}var Me=y(1155),ze=y(1372);function qe(e){var l=y,d=e[l(798)],v=e.getDevEcoSdkHome,p=e.getPath,n=e[l(1618)];function _(e){var n=l;return null==e?void 0:e.replace(/--sign-pwd\s+\S+/g,n(337))[n(488)](/(--deviceId|-t|-s)\s+(\S+)/g,function(e,r,t){return""[n(1890)](r," ").concat(Ue(t))})}function s(e,r,i,a,t){function n(e){var r=c;null!=a&&a.sensitive||d[r(1363)]("runCmd stdout: ",_(e)),f.push(e)}var o,s,u,c=l,r=(d.debug(c(729),e," ",_(null==r?void 0:r[c(1524)](" "))),!1===(null==a?void 0:a.shell)&&(e=e[c(488)](/"/g,"")),(0,He[c(2052)])(e,r,(e=a,r=l,o=v(),s=p(r(1849)),d.debug(r(615)+o),u=s+";"+(null!=(u=process[r(912)][r(2127)])?u:""),Object[r(1465)]({shell:!0,env:_objectSpread(_objectSpread({},process[r(912)]||{}),{},{NODE_HOME:s,PATH:u,DEVECO_SDK_HOME:o})},e)))),f=(null!=t&&t(r),[]),h=[];return r[c(996)].on(c(625),function(e){e=e[c(926)]().trim();n(e)}),r[c(575)].on(c(625),function(e){var r=c,e=e[r(926)]().trim();/<i> \[(webpack-dev-server)|(webpack-dev-middleware)\]/[r(806)](e)?n(e):(r=e,/hvigor /[(e=c)(806)](r)&&/WARN/[e(806)](r)?(d.warn(e(1693),r),f.push(r)):(d[e(678)](e(1685),r),h[e(1922)](r)))}),r.on(c(1858),function(e){var r,t=c,n=f[t(1524)]("\n");0===e||null!=a&&null!=(r=a[t(1935)])&&r.call(a,e)?/failed to start ability/[t(806)](n)?null!=i&&i(t(818)):(null!=i&&i(null,n),d[t(1363)](t(408))):(r=t(1596)[t(1890)](e,"."),d[t(678)](r),null!=i&&i(r+t(1652)+h[t(1524)]("\n"),n))}),r}function i(e,r,t,n){return a.apply(this,arguments)}function a(){return(a=_asyncToGenerator(_regenerator().m(function e(r,i,a,o){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(t,n){s(r,i,function(e,r){if(e)return n(e);t(r)},a,o)}))},e)}))).apply(this,arguments)}function o(e,r){return t[l(475)](this,arguments)}function t(){var e=l;return(t=_asyncToGenerator(_regenerator().m(function e(r,t){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,i(n(),r,t))},e)})))[e(475)](this,arguments)}function r(){return(r=_asyncToGenerator(_regenerator().m(function e(t){var n;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return e.n=1,b(o(["-t",t,r(1229),r(1742),r(504),r(1911)]));case 1:return n=e.v,e.a(2,n[r(1640)]||/(\[Fail\])/[r(806)](n[r(625)])?(d[r(678)](r(1548),n[r(1640)]),"Unknown"):null==(n=n[r(625)])?void 0:n[r(1437)]())}},e)}))).apply(this,arguments)}return{runCmd:s,runCmdAsync:i,runExecAsync:function(r,t,n){return new Promise(function(i,a){var o=_0x3d6c,e=[r].concat(_toConsumableArray(t||[])).join(" ");d[o(1363)](o(993),e),(0,He.exec)(e,_objectSpread({encoding:"utf8"},n||{}),function(e,r,t){var n=o;if(e)return d[n(678)](n(589),t),a(t);d[n(1363)](n(663),r),i(r)})})},runHdcCmd:function(e,r,t){return s(n(),e,r,t)},runHdcCmdAsync:o,getDeviceName:function(e){return r[l(475)](this,arguments)}}}var We,Ve,Ke,Ze,Je,Ye,Xe,f,h=y(1482),l="hos",$e=_createClass(function e(){var r=y,t=0<arguments[r(847)]&&void 0!==arguments[0]?arguments[0]:l;_classCallCheck(this,e),this[r(1443)]=t}),Qe=(f=y,_createClass(function e(r){var t=_0x3d6c;_classCallCheck(this,e),this.cache=new Map,this.cur=null,this[t(2071)]=!1,this[t(1662)]=[],this[t(1203)]=r},[{key:"getDevices",value:(Xe=_asyncToGenerator(_regenerator().m(function e(){var t,n,i,a=arguments;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(t=0<a.length&&void 0!==a[0]&&a[0],n=1<a[r(847)]&&void 0!==a[1]&&a[1],!t&&this[r(2071)]&&null!=(t=this[r(1662)])&&t[r(847)])return e.a(2,this.devices);e.n=1;break;case 1:return i=n?null:(null==(t=global[r(1718)])?void 0:t[r(1449)])||l,e.n=2,this[r(1255)](i);case 2:return i=e.v,e.a(2,(this[r(1662)]=i,this[r(2071)]=!0,i))}},e,this)})),function(){return Xe[_0x3d6c(475)](this,arguments)})},{key:"getDevicesInner",value:(Ye=_asyncToGenerator(_regenerator().m(function e(t){var n,i,a,o,s,u;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(n=[],t===l)return e.n=1,this[r(1194)]();e.n=2;break;case 1:n=e.v,e.n=4;break;case 2:if(t===h)return e.n=3,this[r(1430)]();e.n=4;break;case 3:n=e.v;case 4:if(n[r(847)]){e.n=8;break}return o=Promise,e.n=5,this[r(1194)]();case 5:return s=e.v,e.n=6,this.getLegacyDevices();case 6:return u=e.v,e.n=7,o[r(1643)][r(1360)](o,[s,u]);case 7:u=e.v,a=_slicedToArray(u,2),i=a[0],a=a[1],n=[][r(1890)](_toConsumableArray(i),_toConsumableArray(a));case 8:return e.a(2,(n[r(847)]||this[r(1203)][r(798)][r(1363)](r(1240)),n))}},e,this)})),function(e){return Ye[_0x3d6c(475)](this,arguments)})},{key:f(1194),value:(Je=_asyncToGenerator(_regenerator().m(function e(){var t,n,a,i,o=this;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return e.n=1,b(this[r(1203)][r(639)]());case 1:if((n=e.v).err||null==n||null==(t=n[r(625)])||!t[r(847)]||/(\[Empty\])|(\[Fail\])/[r(806)](null==(t=n[r(625)])?void 0:t.join("\n")))return e.a(2,(this[r(347)]=null,this[r(1203)][r(798)].debug(r(1303),n[r(1640)]),[]));e.n=2;break;case 2:return this[r(1203)][r(798)][r(1363)](r(873),null==(t=n[r(625)])?void 0:t[r(1399)](Ue)[r(1524)]("\n")),a=!1,e.n=3,Promise.all(n[r(625)][r(1399)]((()=>{var r=_asyncToGenerator(_regenerator().m(function e(t){var n,i;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(o[r(347)]&&o[r(347)].sn===t&&(a=!0),o.cache[r(1885)](t))return e.a(2,o[r(986)][r(504)](t));e.n=1;break;case 1:return(n=new $e(l)).sn=t,e.n=2,o[r(1203)][r(369)](t);case 2:return i=e.v,e.a(2,(n[r(741)]=r(1239)[r(1890)](i),o[r(986)].set(t,n),n))}},e)}));return function(e){return r[_0x3d6c(475)](this,arguments)}})()));case 3:return i=e.v,e.a(2,(a||(this[r(347)]=i[r(847)]?i[0]:null),i))}},e,this)})),function(){return Je.apply(this,arguments)})},{key:"getLegacyDevices",value:(Ze=_asyncToGenerator(_regenerator().m(function e(){var t,n,a,i,o=this;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return e.n=1,b(this.adapter[r(1021)]());case 1:if((t=e.v)[r(1640)]||null==t||null==(n=t[r(625)])||!n[r(847)]||/^List of devices attached$/[r(806)](t[r(625)]))return e.a(2,(this[r(1203)][r(798)][r(1363)](r(1738)),[]));e.n=2;break;case 2:return(n=t[r(625)][r(1936)]("\n"))[r(769)](),n=n[r(1399)](function(e){return e.split(" ")[0]}),this[r(1203)].logger[r(1363)](r(873),null==(i=n)?void 0:i[r(1399)](Ue)[r(1524)]("\n")),a=!1,e.n=3,Promise[r(1643)](n[r(1399)]((()=>{var r=_asyncToGenerator(_regenerator().m(function e(t){var n,i;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(o[r(347)]&&o.cur.sn===t&&(a=!0),o.cache[r(1885)](t))return e.a(2,o.cache[r(504)](t));e.n=1;break;case 1:return(n=new $e(h)).sn=t,e.n=2,o[r(1203)][r(1697)](t);case 2:return i=e.v,e.a(2,(n[r(741)]=i,o[r(986)][r(1033)](t,n),n))}},e)}));return function(e){return r.apply(this,arguments)}})()));case 3:return i=e.v,e.a(2,(a||(this.cur=i[r(847)]?i[0]:null),i))}},e,this)})),function(){return Ze[_0x3d6c(475)](this,arguments)})},{key:"getCurrent",value:function(){return this[f(347)]}},{key:f(1993),value:function(e){var r=f;e&&this.cache[r(1885)](e)&&(e=this[r(986)][r(504)](e),this[r(347)]=e)}},{key:f(1627),value:(Ke=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return e.n=1,this[r(1483)]();case 1:return e.a(2,this[r(1458)]())}},e,this)})),function(){return Ke[_0x3d6c(475)](this,arguments)})},{key:"getDeviceId",value:(Ve=_asyncToGenerator(_regenerator().m(function e(){var t;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return e.n=1,this[r(1483)]();case 1:if(t=null==(t=this.getCurrent())?void 0:t.sn){e.n=2;break}return this[r(1203)][r(524)](this.adapter[r(465)]),e.a(2);case 2:return e.a(2,t)}},e,this)})),function(){return Ve.apply(this,arguments)})},{key:"getDeviceType",value:(We=_asyncToGenerator(_regenerator().m(function e(t){var n,i;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return e.n=1,this[r(1483)]();case 1:if(n=t?null==(n=this[r(1662)])?void 0:n[r(698)](function(e){return e.sn===t}):null)return e.a(2,n.type);e.n=2;break;case 2:if(i=null==(i=this[r(1458)]())?void 0:i[r(1443)]){e.n=3;break}return this[r(1203)][r(524)](this.adapter[r(465)]),e.a(2);case 3:return e.a(2,i)}},e,this)})),function(e){return We.apply(this,arguments)})}]));function er(e){var r=y,t=_createClass(n,null,[{key:_0x3d6c(898),value:function(){return n.instance}}]);function n(){_classCallCheck(this,n)}return t[r(1153)]=new Qe(e),{DeviceInfo:$e,DeviceManager:t}}var rr=r(require("fs")),tr=require("json5"),nr=n(y(1417));function ir(e,r){var t,n=y;try{return(null!=(t=tr[n(1152)])?t:tr)[n(763)](e)}catch(e){nr[n(678)](n(1737),e)}return r}function d(e,r){var t=y;return rr[t(1196)](e)?ir(rr[t(1434)](e,t(946)),r):r}function ar(e,r){var t,n,i=y;for(t in r)_typeof(r[t])==i(1361)?Array[i(1063)](r[t])?(Object.prototype[i(1160)].call(e,t)||(e[t]=[]),(n=e[t])[i(1922)][i(475)](n,_toConsumableArray(r[t]))):(Object[i(1809)][i(1160)].call(e,t)&&_typeof(e[t])==i(1361)||(e[t]={}),ar(e[t],r[t])):e[t]=r[t];return e}var or=r(require("fs")),sr=n(y(386));function ur(e,r){var t=y,e=cr(e,!0),n=e.bundleName,e=e[t(1598)],i=(new Date)[t(1265)]()[t(1936)]("T")[0].split("-")[t(1524)]("");return{bundleName:n,spkName:""[t(1890)](n,"-").concat(e,"-")[t(1890)](r,"-").concat(i,".spk")}}function cr(e){var r=y,t={bundleName:"",versionCode:""};if(1<arguments[r(847)]&&void 0!==arguments[1]&&arguments[1]){var n="".concat(e,r(923));if(or[r(1152)][r(1196)](n)){n=JSON.parse(or[r(1152)][r(1434)](n,r(767)));if(null!=n&&n[r(1800)])return t.bundleName=null==n?void 0:n[r(1800)],t[r(1598)]=null==n?void 0:n[r(1598)],t}}var n=""[r(1890)](e,r(2058));if(or.default[r(1196)](n))return e=d(n,{}),t[r(683)]=null==e||null==(n=e[r(511)])?void 0:n.bundleName,t.versionCode=null==e||null==(n=e.app)?void 0:n[r(1598)],t;if(t.bundleName&&t[r(1598)])return t;throw e=r(733),sr[r(678)](e),new Error(e)}function fr(e){var r=y;return d("".concat(e,r(593)),{})}var v=n(y(1e3)),e=qe({logger:v,getDevEcoSdkHome:ye,getPath:i,getHdcPath:be}),hr=e.runCmd,p=e[y(1723)],_=(e.runExecAsync,e[y(391)],e[y(1425)]),e=e[y(369)];function lr(e){var r,t=y,e=""[t(1890)](e,t(2058));if(ce[t(1196)](e))return null==(r=d(e,{}))||null==(r=r.app)?void 0:r.bundleName;throw v.error("".concat(e,t(1258))),new Error(""[t(1890)](e,t(1258)))}function dr(e){var r=y,e=""[r(1890)](e,r(1456));if(ce[r(1196)](e))return d(e,{});throw v[r(678)](""[r(1890)](e,r(1258))),new Error(""[r(1890)](e,r(1258)))}function vr(){return pr[y(475)](this,arguments)}function pr(){return(pr=_asyncToGenerator(_regenerator().m(function e(t,n){var i,a,o;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return v[r(1129)](r(725)[r(1890)](t)),i=lr(t),e.n=1,b(_(["-t",n,r(1229),"aa","force-stop",i]));case 1:return a=["-t",n,r(1229),"aa","start","-a",r(2133),"-b",i,r(1736)],(null==(o=fr(t))?void 0:o[r(1046)])===r(1050)&&a.push(r(1696)),e.n=2,b(_(a));case 2:if((o=e.v)[r(1640)])return v[r(678)](r(1745),o.err),v[r(678)]("Start ability error"),e.a(2);e.n=3;break;case 3:return e.a(2)}},e)}))).apply(this,arguments)}function _r(){return(_r=_asyncToGenerator(_regenerator().m(function e(t){var n;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return v[r(1129)](r(576)[r(1890)](t)),e.n=1,b(p(me(),["update"],{chdir:!0,cwd:t}));case 1:(n=e.v)[r(1640)]&&v[r(678)](r(467),n[r(1640)]);case 2:return e.a(2)}},e)}))).apply(this,arguments)}function gr(){var e=y;return(gr=_asyncToGenerator(_regenerator().m(function e(t){var n;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return v[r(1129)](r(1792)[r(1890)](t)),e.n=1,b(p(me(),[r(1749)],{chdir:!0,cwd:t}));case 1:(n=e.v)[r(1640)]&&v[r(678)](r(1195),n[r(1640)]);case 2:return e.a(2)}},e)})))[e(475)](this,arguments)}function mr(){return(mr=_asyncToGenerator(_regenerator().m(function e(t){var n;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return v[r(1129)]("start hvigor clean under "[r(1890)](t)),e.n=1,b(p(s(),["clean",r(2152)],{chdir:!0,cwd:t}));case 1:(n=e.v)[r(1640)]&&v.error(r(374),n[r(1640)]);case 2:return e.a(2)}},e)}))).apply(this,arguments)}function yr(e){var r=y;if(e){var t=process.platform;try{t===r(1390)?(0,ue[r(1495)])(r(1984)[r(1890)](e.pid,r(1851))):t===r(367)&&e[r(525)]?process[r(1124)](e[r(525)]):e[r(1124)]()}catch(e){v.warn("killProcess error")}}}var e=er({logger:v,listTargets:function(){return Ne.apply(this,arguments)},getDeviceName:e,getDevicesCmd:u,getLegacyDeviceName:c,NO_DEVICE_ERROR:y(874),onError:function(e){throw new Error(e)}}),g=(e[y(792)],e[y(450)]);function br(e){var r,t=y,n=1<arguments[t(847)]&&void 0!==arguments[1]?arguments[1]:{};try{return null==(r=(0,ue[t(1495)])(e,n))?void 0:r[t(926)](t(767))}catch(e){v[t(585)](t(945),e)}}var wr=r(require(y(2037)));function kr(e){return xr[y(475)](this,arguments)}function xr(){return(xr=_asyncToGenerator(_regenerator().m(function e(o){var s,r,u,t,n=arguments;return _regenerator().w(function(e){for(var a=_0x3d6c;;)switch(e.p=e.n){case 0:return t=1<n[a(847)]&&void 0!==n[1]?n[1]:{},r=t[a(609)],s=void 0===r?a(2099):r,r=t[a(501)],u=void 0===r?1e3:r,t=new Promise(function(e,r){function t(){i[n(979)](),r()}var n=a,i=new wr[n(535)];i[n(1871)](n(678),t),i[n(1871)](n(501),t),i[n(1089)](u),i[n(2020)](o,s,function(){i.end(),e(o)})}),e.p=1,e.n=2,t;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 Cr(){return Er[y(475)](this,arguments)}function Er(){var e=y;return(Er=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(t,n){var i,a,o;i=function(e,r){r?t(r):n(e)},(o=wr[(a=y)(1801)]()).listen(0,a(2099),function(){var e=a,r=null==(r=o[e(964)]())?void 0:r[e(814)];o[e(1858)](),i(null,r)}),o.on("error",function(e){i(e)})}))},e)})))[e(475)](this,arguments)}var m=y(1225);function Ar(e){var n=y,c=e.logger,f=e[n(1103)],h=e[n(2027)],u=e[n(1646)],l=e.fportCmd;function d(e){return r[n(475)](this,arguments)}function r(){var e=n;return(r=_asyncToGenerator(_regenerator().m(function e(o){var r,s,u,n,i,a=arguments;return _regenerator().w(function(e){for(var t=_0x3d6c;;)switch(e.n){case 0:return s=1<a[t(847)]&&void 0!==a[1]&&a[1],u=2<a.length&&void 0!==a[2]?a[2]:"",e.n=1,b(f(o));case 1:!(n=e.v).err&&n[t(625)]?e.n=2:(c[t(678)](t(1581),m),i=[],e.n=4);break;case 2:return e.n=3,Promise.all(null==(r=n[t(625)])?void 0:r.trim()[t(1936)]("\n")[t(1399)]((()=>{var r=_asyncToGenerator(_regenerator().m(function e(t){var n,i,a;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(i=t.split(/\s+/),n=null==(n=i[1])?void 0:n[r(1437)](),i=null==(i=i[2])?void 0:i[r(1437)](),a=s&&n===r(1339)[r(1890)](u))return e.n=1,b(h(o,n,i));e.n=1;break;case 1:return e.a(2,{localPort:n,remotePort:i,needRm:a})}},e)}));return function(e){return r[_0x3d6c(475)](this,arguments)}})()));case 3:i=e.v.filter(function(e){var r=t;return e[r(1477)]&&!e[r(870)]});case 4:return e.a(2,i)}},e)})))[e(475)](this,arguments)}function i(){var e=n;return(i=_asyncToGenerator(_regenerator().m(function e(i,a,o){var t,s,n;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return e.n=1,d(i);case 1:return t=e.v,s=!1,n=a[r(1437)]()[r(488)](r(1339),""),e.n=2,Promise[r(1643)](t[r(1399)]((()=>{var r=_asyncToGenerator(_regenerator().m(function e(t){var n;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(t.localPort&&t[r(1797)]){e.n=1;break}return e.a(2);case 1:if(n=!1,t[r(1477)]===a&&t[r(1797)]===o?s=!0:t.localPort!==a&&t[r(1797)]!==o||(n=!0),n)return e.n=2,b(h(i,a,o));e.n=2;break;case 2:return e.a(2)}},e)}));return function(e){return r[_0x3d6c(475)](this,arguments)}})()));case 2:if(s)return c[r(585)]("already has forward"),e.a(2);e.n=3;break;case 3:return e.n=4,u(n);case 4:if(e.v)return c[r(678)](r(2005)[r(1890)](n,r(2057))),e.a(2);e.n=5;break;case 5:return e.n=6,b(l(i,a,o));case 6:if(e.v[r(1640)])return c.error(r(1510),m),e.a(2);e.n=7;break;case 7:return e.a(2)}},e)})))[e(475)](this,arguments)}function t(){var e=n;return(t=_asyncToGenerator(_regenerator().m(function e(r,t){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,d(r,!0,t);case 1:return e.a(2,e.v)}},e)})))[e(475)](this,arguments)}return{fportList:d,fport:function(e,r,t){return i[n(475)](this,arguments)},fportRm:function(e,r){return t[n(475)](this,arguments)}}}function Sr(e){var r,t,n,i,a,o,s=y,u=e[s(798)],c=e.DeviceManager,f=e[s(1577)],h=e[s(1475)],l=e[s(1811)],d=e[s(749)],v=e[s(325)],e=e[s(508)],p=void 0===e?9225:e,s=_createClass(function e(){var r=_0x3d6c;_classCallCheck(this,e),this[r(1145)]=9222,this[r(1568)]=9229},[{key:(e=s)(1972),value:(o=_asyncToGenerator(_regenerator().m(function e(t,n){var i,a,o,s;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(s=!t)return e.n=1,c.getInstance()[r(1678)]();e.n=2;break;case 1:t=e.v,s=!t;case 2:if(s)return e.a(2);e.n=3;break;case 3:return e.n=4,b(f(t,n));case 4:if((a=e.v)[r(1640)]||null==(i=a[r(625)])||!i[r(847)])return u[r(678)](r(1011),h),e.a(2);e.n=5;break;case 5:return o=null==(i=a[r(625)])||null==(i=i[r(1437)]()[r(1936)]("\n"))?void 0:i[0][r(1437)]()[r(1936)](/\s+/)[1][r(1437)](),e.n=6,b(l(t,r(1339)+this.webLocalPort,r(487)[r(1890)](o)));case 6:if(e.v.err)return u.error(r(921),h),e.a(2);e.n=7;break;case 7:return e.a(2)}},e,this)})),function(e,r){return o[_0x3d6c(475)](this,arguments)})},{key:"fportV8",value:(a=_asyncToGenerator(_regenerator().m(function e(t){var n,i;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(i=!t)return e.n=1,c.getInstance()[r(1678)]();e.n=2;break;case 1:t=e.v,i=!t;case 2:if(n=!i)return e.n=3,b(l(t,r(1339)+this[r(1568)],r(1339).concat(p)));e.n=4;break;case 3:n=e.v[r(1640)];case 4:if(n)return u[r(678)]("fport v8 error: ",h),e.a(2);e.n=5;break;case 5:return e.a(2)}},e,this)})),function(e){return a.apply(this,arguments)})},{key:e(476),value:(i=_asyncToGenerator(_regenerator().m(function e(t){return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return e.n=1,this[r(749)](t,String(this.v8LocalPort));case 1:return e.a(2)}},e,this)})),function(e){return i[_0x3d6c(475)](this,arguments)})},{key:"fportRmWeb",value:(n=_asyncToGenerator(_regenerator().m(function e(t){return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return e.n=1,this[r(749)](t,String(this.webLocalPort));case 1:return e.a(2)}},e,this)})),function(e){return n.apply(this,arguments)})},{key:e(749),value:(t=_asyncToGenerator(_regenerator().m(function e(t,n){var i;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(i=!t)return e.n=1,c[r(898)]()[r(1678)]();e.n=2;break;case 1:t=e.v,i=!t;case 2:if(i){e.n=3;break}return e.n=3,d(t,n);case 3:return e.a(2)}},e)})),function(e,r){return t.apply(this,arguments)})},{key:e(1892),value:(r=_asyncToGenerator(_regenerator().m(function e(t){var n,i;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(n=!t)return e.n=1,c[r(898)]()[r(1678)]();e.n=2;break;case 1:t=e.v,n=!t;case 2:n?(i=[],e.n=5):e.n=3;break;case 3:return e.n=4,v(t);case 4:i=e.v;case 5:return e.a(2,i)}},e)})),function(e){return r[_0x3d6c(475)](this,arguments)})}],[{key:e(898),value:function(){return this.instance}}]);return s.instance=new s,{DebugPortManager:s}}var u=n(y(1187)),c=Ar({logger:u,isPortReachable:kr,fportListCmd:function(e){return _(["-t",e,y(1811),"ls"])},fportRmCmd:function(e,r,t){return _(["-t",e,y(1811),"rm",r,t])},fportCmd:function(e,r,t){return _(["-t",e,y(1811),r,t])}}),e=c[y(325)],w=c[y(1811)],c=c[y(749)],Dr=Sr({logger:u,DeviceManager:g,ERROR_MSG:m,fport:w,fportRm:c,fportList:e,getPid:function(e,r){var t=y;return _(["-t",e,t(1229),t(1329)[t(1890)](r,t(837))])}})[y(1187)],Or=y(394),Tr=y(517),Br=y(1482),Pr=y(523),k="service",u=n("LegacyDebugPortManager"),w=Ar({logger:u,fportListCmd:t,fportRmCmd:Oe,isPortReachable:kr,fportCmd:Te}),c=w[y(325)],e=w[y(1811)],t=w[y(749)],Fr=Sr({logger:u,DeviceManager:g,ERROR_MSG:m,fport:e,fportRm:t,fportList:c,getPid:function(e,r){return Pe(e,Tr)},remoteV8Port:9229})[y(1187)],Oe=r(require("path")),Ir=r(require(y(1466)));function Rr(n,o){return new Promise(function(i,a){var r=_0x3d6c,e=Object[r(1465)]({timeout:6e3},o),t=Ir[r(1152)][r(504)](n,function(e){var t=r,n="";e.on(t(625),function(e){n+=e}),e.on("end",function(){var r=t;try{i(JSON[r(763)](n))}catch(e){a(new Error(r(429)))}})});t[r(1089)](e[r(501)],function(){var e=r;t[e(1052)](),a(new Error(e(1100)))}),t.on(r(678),a),t.end()})}var jr=r(require("fs")),Nr=r(require(y(648))),Gr=r(require(y(1019))),Lr=r(require(y(1023))),Hr=n(y(1328));function Ur(){var e=y;return Nr[e(1515)]((0,Lr[e(1152)])(e(363)),e(1734)[e(1890)](process[e(525)],e(502)))}function Mr(){var e=y;return(Mr=_asyncToGenerator(_regenerator().m(function e(r,t){var i,a,o,s,u,c;return _regenerator().w(function(e){for(var n=_0x3d6c;;)if(0===e.n)return a=(i=!1,Gr[n(1152)])(),o=Nr[n(1362)](r),a[n(1517)](Gr[n(1152)][n(1492)](o)),a[n(504)](n(855),function(e,r){r[n(1417)]({code:0,isStart:i,port:t})}),a.get(n(352),function(e,r){var t=n;c(),r[t(1417)]({code:0})}),s=a[n(319)](t,n(2099),function(){var e=n;Hr[e(1129)](e(1525)[e(1890)](t)),i=!0}),u=!1,c=function(){var e,t=n;u||(Hr[t(1129)](t(633)),e=Ur(),jr[t(1196)](e)&&jr[t(393)](e,function(e){var r=t;return e&&Hr.warn(r(1422),e)}),s.close(function(){var e=t;Hr[e(1129)](e(1747)),u=!0}))},e.a(2,{port:t,stop:c})},e)})))[e(475)](this,arguments)}var zr=r(require(y(1658))),qr=require(y(1261)),Wr=r(require(y(588))),Vr={chrome:{darwin:y(1081),win32:"chrome",linux:["google-chrome","google-chrome-stable","chromium"]},edge:{darwin:"microsoft edge",win32:y(1485),linux:[y(1683),y(1707)]}};function Kr(e,r){var t=y,n=zr.platform,i=null==(i=Vr[e])?void 0:i[n];if(!i)throw new Error("".concat(e," is not supported"));var e=t(1759),a=[],o=[];"darwin"===n?(e="open",o[t(1922)]("-a",i),/^(chrome|edge):/i[t(806)](r)&&o.push(t(1788))):n===t(1390)&&(e=""[t(1890)](zr[t(912)].SYSTEMROOT||zr[t(912)][t(2055)]||t(1143),t(562)),o[t(1922)]("-NoProfile",t(1086),t(1106),t(1910),t(789)),n=[t(1249)],i?(n.push(t(316)[t(1890)](i,t(1709))),r&&(/^(chrome|edge):/i.test(r)&&a[t(1922)](t(1636),"--allow-file-access-from-files"),a[t(1922)](r))):r&&n[t(1922)]('"'.concat(r,'"')),0<a.length&&(a=a[t(1399)](function(e){var r=t;return'"`"'.concat(e,r(1709))}),n.push(t(1771),a.join(","))),r=qr[t(1852)].from(n[t(1524)](" "),t(1136))[t(926)](t(675))),r&&o[t(1922)](r),Wr[t(2052)](e,o).unref()}function Zr(r){var t=y,n=1<arguments[t(847)]&&void 0!==arguments[1]?arguments[1]:t(861);try{Kr(n,r)}catch(e){Kr(n===t(861)?t(1436):t(861),r)}}var Te=r(require(y(1023))),Jr=require(y(995)),Yr=require("fs"),Xr=require(y(648)),$r=r(require(y(378))),Qr=r(require("zlib")),et=r(require("stream")),rt=require(y(531)),x=n(y(1783));function tt(){var e=y;return(tt=_asyncToGenerator(_regenerator().m(function e(t,u,c){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(o,s){var r=_0x3d6c;(0,Jr[r(504)])(t,function(e){var t,n,a=r;200!==e[a(1774)]?s(new Error(a(1057)[a(1890)](e[a(1774)]))):(t=(0,rt[a(1713)])(a(1824)),n=[],e.on(a(625),function(e){t.update(e),n.push(e)}),e.on("end",function(){var e,r,i=a;i(463)[i(1890)](t[i(776)]("base64"))!==c?s(i(931)):(x[i(1363)](i(1895)[i(1890)](u)),r=Buffer[i(1890)](n),(e=new et[i(353)]).end(r),(r=$r.x({cwd:u,strip:1,noChmod:!0,noMtime:!0,preserveOwner:!1,onwarn:function(e,r,t){var n=i;x[n(585)](n(888),e,r)}})).on(i(2007),o),r.on(i(678),s),e[i(1949)](Qr.createGunzip())[i(1949)](r).on("error",function(e){var r=i;return x.error(r(2e3),e)}).on("close",o))}),e.on("finish",o),e.on(a(678),s))}).on(r(678),s)}))},e)})))[e(475)](this,arguments)}var nt={pkg:y(826),version:y(1132),baseFolder:""};function it(){var e=y;return(it=_asyncToGenerator(_regenerator().m(function e(a){var o,s,u,c,f,h,l,d;return _regenerator().w(function(e){for(var r,t,n,i=_0x3d6c;;)switch(e.p=e.n){case 0:if(o=nt[i(603)],s=nt[i(1533)],c=nt[i(903)],u="".concat(o,"@").concat(s),x[i(1129)]("begin to download ".concat(u)),c=(0,Xr[i(1524)])(a,c),f=(0,Xr[i(1524)])(c,"js_app.html"),(0,Yr[i(1196)])(f))return e.a(2,(x[i(1363)](""[i(1890)](f,i(406))),c));e.n=1;break;case 1:if(r=o,t=s,n=void 0,l=(null==(r=ir(br(""[(n=y)(1890)](ge(),n(885))[n(1890)](r,"@")[n(1890)](t)),{}))?void 0:r[n(1393)])||{},h=l[i(553)],l=l[i(1997)],h){e.n=2;break}return x[i(678)](""[i(1890)](u," is not found")),e.a(2);case 2:return(0,Yr[i(631)])(a,{recursive:!0}),e.p=3,e.n=4,function(){return tt[y(475)](this,arguments)}(h,a,l);case 4:e.n=6;break;case 5:return e.p=5,d=e.v,x[i(678)](i(2065)[i(1890)](h," error"),d),(0,Yr.existsSync)(a)&&(0,Yr.rmdirSync)(a,{recursive:!0}),e.a(2);case 6:if((0,Yr[i(1196)])(f))return e.a(2,(x[i(1129)](i(1428).concat(u,i(765)).concat(a,i(1930))),c));e.n=7;break;case 7:x[i(678)](i(1428).concat(u," to ")[i(1890)](a,i(1835)));case 8:return e.a(2)}},e,null,[[3,5]])})))[e(475)](this,arguments)}var C=n(y(1552)),w=(0,Te[y(1152)])(y(363)),at=Oe[y(1524)](w,y(2089)),ot=[y(775),y(2062),y(757)];function st(e){return ut[y(475)](this,arguments)}function ut(){return(ut=_asyncToGenerator(_regenerator().m(function e(t){var n;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.p=e.n){case 0:return n=[],e.p=1,e.n=2,Rr(r(1814)[r(1890)](t,r(948)),{timeout:3e3});case 2:n=e.v,e.n=4;break;case 3:e.p=3,C[r(678)](r(1859)[r(1890)](t,r(942)),m);case 4:return e.a(2,n)}},e,null,[[1,3]])}))).apply(this,arguments)}function ct(){return ft[y(475)](this,arguments)}function ft(){var e=y;return(ft=_asyncToGenerator(_regenerator().m(function e(t){var n,i,a,o,s;return _regenerator().w(function(e){for(var r=_0x3d6c;;)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,st(t);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,C[r(678)](r(1681)[r(1890)](t," error"),s),e.a(2,"")}},e,null,[[1,7]])})))[e(475)](this,arguments)}var ht,lt,dt,vt,E,pt,_t,gt,mt,yt,bt,wt,kt,A,xt,Ct,S,u=_createClass(function e(r){var t=_0x3d6c;_classCallCheck(this,e),this[t(770)]=null,this[t(346)]=Object[t(1465)]({open:""},r)},[{key:(S=y)(935),value:function(e){var t=S,r=this,n=(C[t(1129)](t(1674)[t(1890)](e)),{status:function(){return r[t(1892)]()},start:function(){return r[t(1197)]()},stop:function(){return r[t(392)]()},"start-view":function(){return r[t(1897)]()},"start-service":function(){return r[t(1351)]()},"stop-view":function(){return r[t(1286)]()},"stop-service":function(){return r[t(1630)]()}});n[e]?n[e]()[t(542)](function(){return C[t(1129)]("handle end")})[t(884)](function(e){var r=t;return C[r(678)](r(1311),e)}):C[t(678)](t(2097)+Object[t(808)](n)[t(1524)](","))}},{key:S(2043),value:(Ct=_asyncToGenerator(_regenerator().m(function e(t,n){var i,a,o,s=arguments;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:a=2<s.length&&void 0!==s[2]?s[2]:"",C.info(r(2043),t,n),t!==k||(null==(i=this[r(346)])?void 0:i.deviceType)!==h?e.n=1:(o=r(661),e.n=3);break;case 1:return e.n=2,ct(n);case 2:o=e.v;case 3:if(o){e.n=4;break}return C[r(1129)](r(1125)),e.a(2);case 4:t===k?this[r(852)](o):(a&&(o=a),C.info(r(927),o));case 5:return e.a(2)}},e,this)})),function(e,r){return Ct[_0x3d6c(475)](this,arguments)})},{key:S(852),value:(xt=_asyncToGenerator(_regenerator().m(function e(n){var i,a,o,s,u;return _regenerator().w(function(e){for(var r,t=_0x3d6c;;)switch(e.p=e.n){case 0:return this.stopDebugServer(),e.p=1,e.n=2,function(){return it[y(475)](this,arguments)}(at);case 2:if(i=e.v){e.n=3;break}return C[t(678)](t(1344)),e.a(2);case 3:return e.n=4,Cr();case 4:return a=e.v,o=n[t(488)](t(1837),t(1439).concat(a,t(1241))),o+=(o[t(987)]("?")?"&":"?")+t(1645),r={port:a,debugUrl:o},jr[y(699)](Ur(),JSON.stringify(r),"utf8"),e.n=5,function(){return Mr[y(475)](this,arguments)}(i,a);case 5:s=e.v,this[t(770)]=s,ot[t(1793)](function(e){process.on(e,s.stop)}),C.info(t(1701)[t(1890)](o)),null!=(a=this[t(346)])&&a[t(1759)]&&Zr(o,this[t(346)].open),e.n=7;break;case 6:e.p=6,u=e.v,C[t(678)](t(1990),u),this[t(1280)]();case 7:return e.a(2)}},e,this,[[1,6]])})),function(e){return xt[_0x3d6c(475)](this,arguments)})},{key:S(1280),value:function(){var t=S,n=this;this.lastDebugServer&&(ot[t(1793)](function(e){var r=t;process.removeListener(e,n.lastDebugServer[r(392)])}),this[t(770)][t(392)](),this[t(770)]=null)}}]),D=n(y(483)),Et=y(541),At=(A=y,_inherits(jt,u),_createClass(jt,[{key:"isLegacy",value:function(){var e=_0x3d6c;return this[e(346)][e(1449)]===Br}},{key:A(1113),value:function(){var e=A;return(this[e(1325)]()?Fr:Dr)[e(898)]()}},{key:A(1892),value:(kt=_asyncToGenerator(_regenerator().m(function e(){var t,s=this;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return D.info(r(1892)),e.n=1,this[r(314)]();case 1:if(e.v){e.n=2;break}return e.a(2);case 2:return e.n=3,this[r(1113)]()[r(1892)](this[r(346)][r(1526)]);case 3:return t=e.v,e.n=4,Promise[r(1643)](null==t?void 0:t[r(1399)]((()=>{var r=_asyncToGenerator(_regenerator().m(function e(t){var n,i,a,o;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:t[r(1477)]!=="tcp:"[r(1890)](s[r(1113)]()[r(1145)])?e.n=1:(n=Pr,e.n=3);break;case 1:t[r(1477)]!=="tcp:".concat(s[r(1113)]()[r(1568)])?e.n=2:(n=k,e.n=3);break;case 2:return e.a(2);case 3:if(i="",a=!(n===k&&s.isLegacy()))return e.n=4,ct(t[r(1477)].replace(r(1339),""));e.n=5;break;case 4:i=e.v,a=!i;case 5:a?(o="",e.n=7):e.n=6;break;case 6:n===Pr&&(i=r(1539)),o=""[r(1890)](n," ")[r(1890)](t[r(1477)]," ")[r(1890)](t.remotePort,r(1899))[r(1890)](i);case 7:return e.a(2,o)}},e)}));return function(e){return r.apply(this,arguments)}})()));case 4:0!==(t=(t=e.v)[r(924)](Boolean))[r(847)]&&D.info(r(2093)+t[r(1524)]("\n"));case 5:return e.a(2)}},e,this)})),function(){return kt.apply(this,arguments)})},{key:"start",value:(wt=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return D[r(1129)](r(1197)),e.n=1,this[r(1897)]();case 1:return e.n=2,this[r(1351)]();case 2:return e.a(2)}},e,this)})),function(){return wt[_0x3d6c(475)](this,arguments)})},{key:A(392),value:(bt=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return D[r(1129)](r(392)),e.n=1,this[r(1286)]();case 1:return e.n=2,this[r(1630)]();case 2:return e.a(2)}},e,this)})),function(){return bt[_0x3d6c(475)](this,arguments)})},{key:A(1897),value:(yt=_asyncToGenerator(_regenerator().m(function e(){var t;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return D[r(1129)]("startView"),e.n=1,this[r(314)]();case 1:if(t=e.v)return e.n=2,this[r(1113)]().fportWeb(this[r(346)].deviceId,t);e.n=3;break;case 2:return e.n=3,this[r(2043)](Pr,this[r(1113)]()[r(1145)],r(554));case 3:return e.a(2)}},e,this)})),function(){return yt.apply(this,arguments)})},{key:A(1351),value:(mt=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return D.info(r(1351)),e.n=1,this[r(314)]();case 1:if(e.v)return e.n=2,this.getPortManager()[r(1412)](this[r(346)][r(1526)]);e.n=3;break;case 2:return e.n=3,this[r(2043)](k,this.getPortManager().v8LocalPort);case 3:return e.a(2)}},e,this)})),function(){return mt.apply(this,arguments)})},{key:"stopView",value:(gt=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return D[r(1129)](r(1286)),e.n=1,this[r(1113)]()[r(1236)](this.options[r(1526)]);case 1:return e.a(2)}},e,this)})),function(){return gt[_0x3d6c(475)](this,arguments)})},{key:"stopService",value:(_t=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return D[r(1129)]("stopService"),e.n=1,this[r(1113)]()[r(476)](this[r(346)][r(1526)]);case 1:return e.a(2)}},e,this)})),function(){return _t.apply(this,arguments)})},{key:A(314),value:(pt=_asyncToGenerator(_regenerator().m(function e(){var t,n,i,a,o,s,u,c,f;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(i=this[r(346)],n=i[r(1449)],i=i[r(451)],i=i===ze?Or:this[r(346)][r(683)],i=n===Br?Tr:i||lr(process.cwd()),a=this.options[r(1526)],u=!a)return e.n=1,g.getInstance().getDeviceId();e.n=2;break;case 1:a=e.v,u=!a;case 2:if(u)return e.a(2,!1);e.n=3;break;case 3:if(o="",n===Br)return e.n=4,b(function(){return Fe.apply(this,arguments)}(a,i));e.n=5;break;case 4:s=e.v,o=!(s[r(1640)]||!s[r(625)]),e.n=10;break;case 5:return e.n=6,b(_(["-t",a,r(1229),r(411),i]));case 6:if(t=e.v.data,c=null===t){e.n=7;break}c=void 0===t;case 7:c?(f=void 0,e.n=9):e.n=8;break;case 8:f=t[r(1437)]();case 9:o=f;case 10:return e.a(2,(o||D[r(678)](Et),i))}},e,this)})),function(){return pt[_0x3d6c(475)](this,arguments)})}])),St=r(require("fs")),Dt=r(require(y(648))),Ot=r(require("fs")),Tt=r(require(y(648))),O=n("BuildProcess"),e=(E=y,_createClass(function e(r){var t=_0x3d6c;_classCallCheck(this,e),this[t(1631)]=[],this[t(1369)]=null,this.stopping=!1,this[t(346)]=Object[t(1465)]({buildMode:"debug"},r)},[{key:"handle",value:function(e){var t=_0x3d6c,r=this,n=(O[t(1129)](t(1674)[t(1890)](e)),{start:function(){return r[t(1197)]()},installDeps:function(){return r[t(1950)]()},assembleHap:function(){return r[t(608)]()},assembleApp:function(){return r[t(1909)]()},installHap:function(){return r[t(1833)]()},assembleAndInstallHap:function(){return r[t(1938)]()},uninstall:function(){return r[t(880)]()},clean:function(){return r[t(1749)]()},stop:function(){return r[t(392)]()}});n[e]?n[e]()[t(542)](function(){return O[t(1129)]("handle success")}).catch(function(e){var r=t;return O[r(678)](r(1311),e)}):O[t(678)](t(2097)+Object.keys(n).join(","))}},{key:"installDeps",value:(vt=_asyncToGenerator(_regenerator().m(function e(){var t;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return t=this[r(346)][r(918)],O.info("start installDeps under "[r(1890)](t)),e.n=1,b(function(){return _r[y(475)](this,arguments)}(t));case 1:return e.a(2)}},e,this)})),function(){return vt[_0x3d6c(475)](this,arguments)})},{key:E(1111),value:(dt=_asyncToGenerator(_regenerator().m(function e(t,n){return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(Ot.existsSync(Tt[r(1515)](t,"oh_modules"))){e.n=1;break}return e.n=1,this[r(1950)]();case 1:return O.info(r(331)),e.n=2,b(this.runCmdAsync(s(),[r(1622)][r(1890)](_toConsumableArray(n||[])),{cwd:t}));case 2:return e.a(2)}},e,this)})),function(e,r){return dt[_0x3d6c(475)](this,arguments)})},{key:E(1883),value:function(e){this[E(1631)].push(e)}},{key:E(680),value:function(e){var r=E,e=this[r(1631)][r(726)](e);-1!==e&&this[r(1631)][r(1916)](e,1)}},{key:E(392),value:function(){this[E(309)]=!0,this.dispose()}},{key:E(1873),value:function(){for(var e=E;this.cpList[e(847)];)yr(this[e(1631)].pop())}},{key:E(992),value:function(){}},{key:E(1723),value:(lt=_asyncToGenerator(_regenerator().m(function e(r,o,s){var u=this;return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(t,n){var i,a=_0x3d6c;u.stopping?n(a(1629)):(i=hr(r,o,function(e,r){if(u[a(680)](i),e)return n(e);t(r)},s),u[a(1883)](i))}))},e)})),function(e,r,t){return lt[_0x3d6c(475)](this,arguments)})},{key:E(1749),value:(ht=_asyncToGenerator(_regenerator().m(function e(){var r,n;return _regenerator().w(function(e){for(var t=_0x3d6c;;)switch(e.n){case 0:if(void 0===(r=this[t(346)][t(918)]))return e.a(2);e.n=1;break;case 1:return e.n=2,function(){return gr[y(475)](this,arguments)}(r);case 2:return e.n=3,function(){return mr[y(475)](this,arguments)}(r);case 3:n=Tt[t(1515)](r,t(1043),"build",t(498)),Ot.rm(n,{recursive:!0,force:!0},function(e){var r=t;e?O[r(678)](r(345),e):O[r(1129)](r(390))});case 4:return e.a(2)}},e,this)})),function(){return ht.apply(this,arguments)})}])),T=r(require(y(648))),B=r(require("fs")),Bt=r(require("os")),Pt=r(require(y(531))),Ft=r(require("semver")),It=r(require(y(1023))),P=n(y(713)),Rt=/ASCF_GET_HVIGOR_DEPS_CACHES_DIR=(.+)$/m;function jt(e){return _classCallCheck(this,jt),_callSuper(this,jt,[e])}function Nt(e){var r=y,e=T[r(1524)](e,r(1924));return B[r(1196)](e)}function Gt(e){}var Lt=function(e){var r=y;return Pt[r(1713)]("MD5")[r(1347)](e)[r(776)]("hex")};function Ht(r){var e=y;try{return B[e(1529)][e(1778)](r)}catch(e){return r}}function Ut(e){var r=y,t=""[r(1890)](T[r(1515)]((t=y,process.env[t(389)]||T[t(1515)](Bt[t(1232)](),t(2054))),"project_caches",Lt(T[r(1515)](e)),r(1405)),r(486));return B[r(1196)]("".concat(t,r(1769)))?t:void 0}function Mt(e){return zt[y(475)](this,arguments)}function zt(){var e=y;return(zt=_asyncToGenerator(_regenerator().m(function e(t){var n,i,a,o;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(P[r(1129)](r(1730).concat(t)),n="",Nt(t)){if(!process[r(912)][r(1302)]&&(n=Ut(t)))return e.a(2,n);e.n=1}else e.n=3;break;case 1:return e.n=2,b(p(s(),[r(2108),"--no-daemon"],{chdir:!0,cwd:t}));case 2:(a=e.v)[r(1640)]&&P.error(r(509),a[r(1640)]),a=null!=(a=a[r(625)])?a:"",n=null==(a=Rt[r(2033)](a))?void 0:a[1],e.n=6;break;case 3:if(i=T.join(t,r(1957)),!B[r(1196)](i)){e.n=5;break}if(n=T[r(1524)](t,r(758)),B[r(1196)](""[r(1890)](n,r(1769)))){e.n=4;break}throw a=""[r(1890)](n,"/bin/ascf.js is not found for project, please install using package manager first"),P[r(678)](a),new Error(a);case 4:e.n=6;break;case 5:o=""[r(1890)](i,r(688)),P[r(678)](o);case 6:return e.a(2,(P.debug(r(2034),n),n))}},e)})))[e(475)](this,arguments)}function qt(){return Wt[y(475)](this,arguments)}function Wt(){var e=y;return(Wt=_asyncToGenerator(_regenerator().m(function e(t,n){var i,a,o,s;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return e.n=1,Mt(t);case 1:return i=e.v,a=r(1043),o=[],i?(a=_e(),o[r(1922)](""[r(1890)](i,r(1769)))):P.warn(r(914)),s=null==(s=Q)?void 0:s(),e.a(2,(s&&s!==r(1129)&&o[r(1922)](r(2118),s),o.push[r(475)](o,_toConsumableArray((null==n?void 0:n.args)||[])),{cmd:a,args:o,ascfVerCmd:i?""[r(1890)](a," ")[r(1890)](o[0],r(382)):r(1396)}))}},e)})))[e(475)](this,arguments)}var Vt,Kt=function(e,r,t){var n=y,r=e.indexOf(r);return-1!==r&&(null==(e=e[r+1])?void 0:e[n(987)](t))};function Zt(e,r,t){return Jt[y(475)](this,arguments)}function Jt(){return(Jt=_asyncToGenerator(_regenerator().m(function e(a,o,s){var u,c,f;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return e.n=1,qt(a,o);case 1:if(f=e.v,u=f[r(616)],c=f[r(1198)],f=f.ascfVerCmd,Kt(c,r(810),h)){t=void 0;n=void 0;i=void 0;var t=f;var n=y,i=global[n(1741)];if(i){t=br(t);if(t&&Ft.gt(i,t))throw new Error(n(829)[n(1890)](i,n(365)))}}return e.n=2,b(p(u,c,_objectSpread(_objectSpread({},(null==o?void 0:o[r(1755)])||{}),{},{chdir:!0,cwd:a}),s));case 2:if((f=e.v)[r(1640)])throw P[r(678)](r(1059),f.err),f[r(1640)];e.n=3;break;case 3:return e.a(2)}},e)}))).apply(this,arguments)}function Yt(e,r,t){return Xt[y(475)](this,arguments)}function Xt(){return(Xt=_asyncToGenerator(_regenerator().m(function e(t,n,i){return _regenerator().w(function(e){for(var r=_0x3d6c;;)if(0===e.n)return e.a(2,Zt(t,Object[r(1465)]({args:["compile",t][r(1890)](_toConsumableArray((null==n?void 0:n[r(1860)])||[]))},n),i))},e)}))).apply(this,arguments)}function $t(e,r,t){return Qt[y(475)](this,arguments)}function Qt(){return(Qt=_asyncToGenerator(_regenerator().m(function e(t,n,i){return _regenerator().w(function(e){for(var r=_0x3d6c;;)if(0===e.n)return e.a(2,Zt(n,Object.assign({args:[r(862),"-i",t,"-o",n][r(1890)](_toConsumableArray((null==i?void 0:i[r(1860)])||[]))},i)))},e)}))).apply(this,arguments)}function en(e,r){return rn[y(475)](this,arguments)}function rn(){return(rn=_asyncToGenerator(_regenerator().m(function e(t,n){return _regenerator().w(function(e){for(var r=_0x3d6c;;)if(0===e.n)return e.a(2,Zt(t,Object[r(1465)]({args:[r(477),r(1668),"-r",t].concat(_toConsumableArray((null==n?void 0:n.extraArgs)||[]))},n)))},e)}))).apply(this,arguments)}function tn(e,r){return nn.apply(this,arguments)}function nn(){return(nn=_asyncToGenerator(_regenerator().m(function e(t,n){return _regenerator().w(function(e){for(var r=_0x3d6c;;)if(0===e.n)return e.a(2,Zt(t,Object[r(1465)]({args:["signtools",r(1948),"-r",t][r(1890)](_toConsumableArray((null==n?void 0:n[r(1860)])||[]))},n)))},e)}))).apply(this,arguments)}function an(e,r){return on.apply(this,arguments)}function on(){var e=y;return(on=_asyncToGenerator(_regenerator().m(function e(r,n){var i,a,o,s;return _regenerator().w(function(e){for(var t=_0x3d6c;;)switch(e.n){case 0:return sn(),i=[t(1389),t(1197)],["deviceType",t(1526)][t(1793)](function(e){var r=t;n[e]&&i[r(1922)]("--"[r(1890)](e),n[e])}),e.n=1,qt(r,{args:i});case 1:return a=e.v,o=a[t(616)],s=a[t(1198)],e.a(2,new Promise(function(n,e){hr(o,s,function(e,r){},{shell:!1,chdir:!0,cwd:r,ignoreError:function(e){return!0}},function(e){var r=_0x3d6c,t=fn(null==(e=Vt=e)?void 0:e[r(525)]);P[r(1363)](r(1468)[r(1890)](t)),function(t,n){var i=y,a=2<arguments[i(847)]&&void 0!==arguments[2]?arguments[2]:500,o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:6e4,s=(hn&&clearInterval(hn),0);hn=setInterval(function(){var e=o<s,r=B[i(1196)](t);(e||r)&&(clearInterval(hn),hn=0,n(r)),s+=a},a)}(t,function(e){n(e?d(t,{}):{})})})}))}},e)})))[e(475)](this,arguments)}function sn(){Vt&&(yr(Vt),Vt=void 0)}function un(e,r){return cn[y(475)](this,arguments)}function cn(){var e=y;return(cn=_asyncToGenerator(_regenerator().m(function e(t,n){var i;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,Rr("http://127.0.0.1:"[r(1890)](t,"/")[r(1890)](n),{timeout:3e3});case 1:return e.a(2,e.v);case 2:e.p=2,i=e.v,P[r(678)]("getDebugees error",i);case 3:return e.a(2)}},e,null,[[0,2]])})))[e(475)](this,arguments)}function fn(e){var r=y;if(e)return T[r(1515)]((0,It.default)(r(363)),r(1734)[r(1890)](e,".json"))}var hn=0;var ln=y(1363),dn="release";function vn(e){return e&&(!0===e||/debug|development/i.test(e))?ln:dn}var pn,_n,gn,mn,yn,bn,wn,kn,xn=function(e,r,t){return r===t?[]:[e,r]},F=n("AscfBuilder"),Cn=(t=y,_inherits(On,e),_createClass(On,[{key:t(1425),value:(kn=_asyncToGenerator(_regenerator().m(function e(r,t){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,this.runCmdAsync(be(),r,t))},e,this)})),function(e,r){return kn[_0x3d6c(475)](this,arguments)})},{key:t(1197),value:(wn=_asyncToGenerator(_regenerator().m(function e(){var t,n;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(t=this[r(346)][r(918)],F[r(1129)](r(2051)[r(1890)](t)),n=this[r(346)][r(1526)]){e.n=2;break}return e.n=1,g.getInstance()[r(1678)]();case 1:n=e.v;case 2:return e.n=3,b(vr(t,n));case 3:return e.a(2)}},e,this)})),function(){return wn.apply(this,arguments)})},{key:t(608),value:(bn=_asyncToGenerator(_regenerator().m(function e(){var r,n,i,a,o;return _regenerator().w(function(e){for(var t=_0x3d6c;;)switch(e.n){case 0:return i=this[t(346)],r=i.projectRoot,i=i[t(1420)],F[t(1129)](t(1880).concat(r)),n=(new Date)[t(360)](),i=["-p","buildMode="[t(1890)](vn(i)),t(2152),t(1522)],e.n=1,this[t(1111)](r,i);case 1:return a=null==(a=dr(r))||null==(a=a[t(1906)])?void 0:a[t(1399)](function(e){var r=t;return""[r(1890)](e[r(741)],r(2132))}),e.n=2,b(this[t(1723)](s(),["-m",t(824),"-p",t(1371).concat(null==a?void 0:a[t(1524)](","))][t(1890)](i,[t(608),1<a[t(847)]?t(988):"",t(1775)]),{chdir:!0,cwd:r}));case 2:(a=e.v)[t(1640)]&&F.error(t(494),a[t(1640)]),o=Math[t(327)](((new Date)[t(360)]()-n)/1e3),F[t(1129)]("assembleHap within "[t(1890)](o," s"));case 3:return e.a(2)}},e,this)})),function(){return bn.apply(this,arguments)})},{key:t(1909),value:(yn=_asyncToGenerator(_regenerator().m(function e(){var t,n,i,a;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return i=this[r(346)],t=i[r(918)],i=i.buildMode,F.info(r(677)[r(1890)](t)),n=(new Date).getTime(),i=["-p","product=default","-p",r(326).concat(vn(i)),"--parallel",r(1522)],e.n=1,this[r(1111)](t,i);case 1:return F[r(1129)]("start assembleApp, please waiting ..."),e.n=2,b(this[r(1723)](s(),["-m",r(1940),"assembleApp"].concat(i,[r(1775)]),{chdir:!0,cwd:t}));case 2:(a=e.v)[r(1640)]&&F[r(678)](r(1206),a[r(1640)]),a=Math[r(327)](((new Date)[r(360)]()-n)/1e3),F[r(1129)]("assembleApp within ".concat(a," s"));case 3:return e.a(2)}},e,this)})),function(){return yn[_0x3d6c(475)](this,arguments)})},{key:t(2137),value:(mn=_asyncToGenerator(_regenerator().m(function e(t,n){var i,a;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return i="/data/local/tmp/"+((new Date)[r(360)]()+Math.round(1e3*Math.random())),e.n=1,b(this[r(1425)](["-t",t,"shell",r(1666),i]));case 1:if((a=e.v)[r(1640)])return F.error(r(1919),a.err),e.a(2);e.n=2;break;case 2:return e.n=3,b(n(i));case 3:return(a=e.v)[r(1640)]&&F[r(678)](r(1200),a[r(1640)]),e.n=4,b(this[r(1425)](["-t",t,r(1229),"rm",r(790),i]));case 4:return e.a(2)}},e,this)})),function(e,r){return mn[_0x3d6c(475)](this,arguments)})},{key:t(1833),value:(gn=_asyncToGenerator(_regenerator().m(function e(){var n,t,o,i,s=this;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(n=this.options[r(918)],F.info("start install pkg under "[r(1890)](n)),t=(new Date)[r(360)](),o=this[r(346)].deviceId){e.n=2;break}return e.n=1,g[r(898)]()[r(1678)]();case 1:o=e.v;case 2:return e.n=3,b(this[r(2137)](o,(()=>{var r=_asyncToGenerator(_regenerator().m(function e(i){var a,r;return _regenerator().w(function(e){for(var t=_0x3d6c;;)switch(e.n){case 0:return r=null==(r=dr(n))||null==(r=r[t(1906)])?void 0:r.map(function(e){var r=t;return Dt[r(1515)](n,e[r(1378)],"build/default/outputs/default/"[r(1890)](e.name,r(640))[r(1890)]("entry"===e[r(741)]?r(1467):"hsp"))}),a=!1,e.n=1,Promise[t(1643)](null==r?void 0:r.map((()=>{var r=_asyncToGenerator(_regenerator().m(function e(t){var n;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(St[r(1196)](t)){e.n=1;break}return F.error(r(436),t),a=!0,e.a(2);case 1:return e.n=2,b(s[r(1425)](["-t",o,"file",r(1766),t,i]));case 2:(n=e.v)[r(1640)]&&(F[r(678)](r(1496),n[r(1640)]),a=!0);case 3:return e.a(2)}},e)}));return function(e){return r.apply(this,arguments)}})()));case 1:if(a)return e.a(2);e.n=2;break;case 2:return e.n=3,b(s[t(1425)](["-t",o,"shell","bm",t(1794),"-p",i]));case 3:if((r=e.v)[t(1640)])return F.error(t(2047),r.err),e.a(2);e.n=4;break;case 4:vr(n,o);case 5:return e.a(2)}},e)}));return function(e){return r[_0x3d6c(475)](this,arguments)}})()));case 3:i=Math[r(327)](((new Date)[r(360)]()-t)/1e3),F.info("Launched within "[r(1890)](i," s"));case 4:return e.a(2)}},e,this)})),function(){return gn[_0x3d6c(475)](this,arguments)})},{key:t(1938),value:(_n=_asyncToGenerator(_regenerator().m(function e(){var t;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return this[r(309)]=!1,e.n=1,g[r(898)]().getDeviceId();case 1:if(e.v){e.n=2;break}return e.a(2);case 2:return e.n=3,b(this[r(608)]());case 3:if((t=e.v)[r(1640)])return F.error(r(642),t.err),e.a(2);e.n=4;break;case 4:return e.n=5,b(this[r(1833)]());case 5:return e.a(2)}},e,this)})),function(){return _n[_0x3d6c(475)](this,arguments)})},{key:t(880),value:(pn=_asyncToGenerator(_regenerator().m(function e(){var t,n,i;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(t=this[r(346)][r(918)],F[r(1129)]("start uninstall pkg under "[r(1890)](t)),n=this[r(346)].deviceId){e.n=2;break}return e.n=1,g[r(898)]()[r(1678)]();case 1:n=e.v;case 2:return i=lr(t),e.n=3,b(this.runHdcCmdAsync(["-t",n,r(880),i]));case 3:if((i=e.v)[r(1640)])return F[r(678)](r(647),i.err),e.a(2);e.n=4;break;case 4:return e.a(2)}},e,this)})),function(){return pn[_0x3d6c(475)](this,arguments)})}])),En=r(require("path")),An=r(require("http")),Sn=r(require("fs")),Dn=r(require(y(648))),I=n(y(1418));function On(e){return _classCallCheck(this,On),_callSuper(this,On,[e])}function Tn(e,r){return Bn[y(475)](this,arguments)}function Bn(){var e=y;return(Bn=_asyncToGenerator(_regenerator().m(function e(t,n){return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return e.n=1,kr(t);case 1:if(e.v){e.n=3;break}return I[r(585)](r(1237).concat(t,r(2064))),e.n=2,Cr();case 2:t=e.v;case 3:return e.a(2,((e,r)=>{var s=y,u=[],t=An[s(1801)](function(n,i){var e,a=s,o=(new Date).getTime();I[a(1363)]("request "[a(1890)](n[a(1920)])),n[a(516)]===a(351)?(e=Dn.join(r,n.url),Sn.readFile(e,function(e,r){var t=a;e?(i[t(1489)](404,{"Content-Type":t(2078)}),i[t(2007)](t(519))):(i[t(1489)](200,{"Content-Type":"application/octet-stream"}),i[t(2007)](r),I[t(1363)](t(1228).concat(n.url,t(1060))[t(1890)]((new Date).getTime()-o,t(644))),u[t(1922)](n[t(1920)]))})):(i[a(1489)](405,{"Content-Type":a(2078)}),i.end(a(440)))});return t.listen(e,function(){I.debug("Server running at http://localhost:".concat(e,"/"))}),t.on(s(678),function(e){I[s(678)]("Server error:",e)}),{server:t,port:e,close:function(){var r=s;t[r(1858)](function(){var e=r;I[e(1363)](e(2103))})},hasReq:function(r){var t=s;return r&&u[t(860)](function(e){return e&&r[t(833)](e)})}}})(t,n))}},e)})))[e(475)](this,arguments)}var R=n(y(1917));function Pn(e){return Fn.apply(this,arguments)}function Fn(){return(Fn=_asyncToGenerator(_regenerator().m(function e(t){var n,i,a,o,s,u,c,f,h,l,d,v,p,_;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return n=t.logger,f=t.projectRoot,i=t[r(1526)],c=t[r(532)],u=t[r(1420)],v=t[r(1565)],a=t[r(907)],o=t.startHostPkgUrl,s=t.rportRmCmd,n[r(1129)](r(435)[r(1890)](f)),c=c(f,u),u=c[r(683)],c=c.spkName,f=En[r(1524)](f,r(1549)),e.n=1,v(3e3,f);case 1:return h=e.v,e.n=2,a(i,h[r(814)],0);case 2:if(l=e.v){e.n=3;break}return n.error(r(1825)),e.a(2);case 3:return d=r(1439).concat(l,"/")[r(1890)](c),e.n=4,b(o(i,u,d));case 4:if((v=e.v).err)return n[r(678)](r(1053),v.err),e.a(2);e.n=5;break;case 5:n[r(1129)]("waiting download and install package ..."),p=0,_=setInterval(function(){var e=r;h[e(1545)](d)||60<p?(s(i,e(1339)[e(1890)](l)),h[e(1858)](),clearInterval(_)):p++},1e3);case 6:return e.a(2)}},e)}))).apply(this,arguments)}c=y,_inherits(zn,e);var In,Rn,jn,Nn,Gn,Ln,Hn,Un=_createClass(zn,[{key:"start",value:(Hn=_asyncToGenerator(_regenerator().m(function e(){var t,n,i,a;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return n=this[r(346)],t=n.projectRoot,n=n[r(1420)],R.info(r(2051)[r(1890)](t)),e.n=1,this.getDeviceId();case 1:return i=e.v,a=ur(t,n),a=a.bundleName,e.n=2,b(Se(i,a));case 2:return e.a(2)}},e,this)})),function(){return Hn.apply(this,arguments)})},{key:c(608),value:(Ln=_asyncToGenerator(_regenerator().m(function e(){var t,n,i,a;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return t=this.options[r(918)],R[r(1129)](r(1037)[r(1890)](t)),n=(new Date).getTime(),e.n=1,this[r(1111)](t);case 1:return e.n=2,b(Yt(t,{extraArgs:["-c",r(2024),this[r(346)][r(451)],this[r(346)].buildMode===r(1363)?"-m":""]}));case 2:if((i=e.v)[r(1640)])throw R[r(678)]("generateSpk err",i[r(1640)]),i[r(1640)];e.n=3;break;case 3:i[r(625)]&&R[r(1129)](r(1008),i.data),i[r(1640)]&&R.error(r(1026),i[r(1640)]),a=Math[r(327)](((new Date).getTime()-n)/1e3),R.info(r(544)[r(1890)](a," s"));case 4:return e.a(2)}},e,this)})),function(){return Ln[_0x3d6c(475)](this,arguments)})},{key:c(1909),value:(Gn=_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 Gn[_0x3d6c(475)](this,arguments)})},{key:c(1833),value:(Nn=_asyncToGenerator(_regenerator().m(function e(){var t,n,i;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return n=this[r(346)],t=n[r(918)],n=n[r(1420)],R[r(1129)](r(657)[r(1890)](t)),e.n=1,this.getDeviceId();case 1:return i=e.v,e.a(2,Pn({logger:R,projectRoot:t,deviceId:i,getSpkInfo:ur,buildMode:n,startServer:Tn,tryAdbPortReversing:Ae,startHostPkgUrl:De,rportRmCmd:Be}))}},e,this)})),function(){return Nn.apply(this,arguments)})},{key:c(1938),value:(jn=_asyncToGenerator(_regenerator().m(function e(){var t;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return this[r(309)]=!1,e.n=1,b(this[r(608)]());case 1:if((t=e.v)[r(1640)])return R[r(678)](r(1947),t[r(1640)]),e.a(2);e.n=2;break;case 2:return e.n=3,b(this.installHap());case 3:return e.a(2)}},e,this)})),function(){return jn.apply(this,arguments)})},{key:c(880),value:(Rn=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:R[r(585)](r(1975));case 1:return e.a(2)}},e)})),function(){return Rn[_0x3d6c(475)](this,arguments)})},{key:c(1678),value:(In=_asyncToGenerator(_regenerator().m(function e(){var t,n,i;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:null==(t=this[r(346)][r(1526)])?e.n=1:(i=t,e.n=3);break;case 1:return e.n=2,g[r(898)]().getDeviceId();case 2:i=e.v;case 3:if(n=i){e.n=4;break}throw new Error(r(1159));case 4:return e.a(2,n)}},e,this)})),function(){return In[_0x3d6c(475)](this,arguments)})}]),Mn=_defineProperty(_defineProperty({},Br,function(e){return new Un(e)}),y(446),function(e){return new Cn(e)});function zn(e){return _classCallCheck(this,zn),_callSuper(this,zn,[e])}function qn(){var e=y;return(qn=_asyncToGenerator(_regenerator().m(function e(t,n){var i,a,o,s;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(a=(a=t.deviceType)&&!n[a]?r(446):a){e.n=5;break}return e.n=1,b(g[r(898)]()[r(1273)](t[r(1526)]));case 1:if(i=e.v[r(625)],!(o=null!==i)){e.n=2;break}o=void 0!==i;case 2:o?(s=i,e.n=4):e.n=3;break;case 3:s="hos";case 4:a=s;case 5:return e.a(2,n[a](t))}},e)})))[e(475)](this,arguments)}var Wn,Vn,Kn=_createClass(function e(){_classCallCheck(this,e)},null,[{key:"create",value:(Vn=_asyncToGenerator(_regenerator().m(function e(r){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,function(){return qn[y(475)](this,arguments)}(r,Mn))},e)})),function(e){return Vn[_0x3d6c(475)](this,arguments)})}]),Zn=_createClass(function e(){_classCallCheck(this,e)},null,[{key:"create",value:(Wn=_asyncToGenerator(_regenerator().m(function e(r){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,new At(r))},e)})),function(e){return Wn[_0x3d6c(475)](this,arguments)})}])}),Qt=Be(function(e,r){var t,n,i=_0x3d6c,a=i(1038),o="crossAtomicService";r[i(1317)]={MAX_SIZE_SSPK:2097152,MAX_SIZE_SPK:20971520,SIGN_MAGIC:i(1988),SIGN_MAGIC_APK:i(1816),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(1791),CERT_END:i(2022),setSignType:function(e){return a=e},isApkSign:function(){return a===i(753)},setDssHost:function(e){return t=e},setDssKey:function(e){return n=e},setDssKeyId:function(e){return o=e},getDssHost:function(){return t},getDssKey:function(){return n},getDssKeyId:function(){return o},setDssConfig:function(e){var r=i;t=e.dssHost,n=e[r(724)]}}}),Yr=Be(function(e,r){var t=_0x3d6c,h=Qt(),l=22,d=67324752,v=33639248,p=101010256,_=16;r[t(1317)]={parserZip:function(e,r){var t,n,i,a,o,s,u,c=_0x3d6c,f={tag:!1,length:e[c(847)],sections:{header:null,central:null,footer:null}};return f[c(968)].footer=(e=>{var r=_0x3d6c,t={tag:!1};if(e&&!(e[r(847)]<l))for(var n=e[r(847)]-l;0<=n;n--)if(p===e[r(2142)](n)){t[r(421)]=!0,t.startIndex=n,t.len=e[r(847)]-n,t[r(630)]=e[r(2142)](n+_);break}return t})(e),f[c(968)][c(1845)][c(421)]&&(f[c(968)][c(566)]=(i=e,a=f[c(968)][c(1845)][c(630)],o=f.sections[c(1845)][c(1306)]-f[c(968)][c(1845)][c(630)],s=_0x3d6c,u={tag:!1},!i||i[s(847)]<a||v===i[s(2142)](a)&&(u.tag=!0,u.startIndex=a,u[s(1772)]=o,u.previous=i[s(2142)](a+42)),u),f.sections[c(566)][c(421)])&&(o=f[c(968)][c(566)][c(630)],i=f[c(968)][c(566)][c(1306)]-f[c(968)][c(566)][c(630)],r&&(f[c(968)].sign=(s=o,a=_0x3d6c,u={tag:!1},!(r=e)||r[a(847)]<s||(s=h[a(312)]()?h[a(703)]:h[a(2053)],0<(s=r.indexOf(s))&&(t=r[a(2142)](s-8),n=s+16-t-8,r[a(2142)](n)===t)&&(u[a(421)]=!0,u[a(1772)]=t,u[a(1306)]=s+16,u.previous=n)),u),o=0,i=f.sections.sign.startIndex-f[c(968)][c(1728)][c(1772)]-8),f.sections[c(1006)]=(r=o,t=i,a=_0x3d6c,s={tag:!1},!(n=e)||n[a(847)]<r||d===n.readInt32LE(r)&&(s[a(421)]=!0,s[a(1306)]=r,s[a(1772)]=t,s.previous=-1),s),f[c(968)][c(1006)].tag&&(f[c(421)]=!0)),f},checkZipBuffer:function(e,r){var t=_0x3d6c;return!e||e[t(847)]<=4?(console[t(599)](t(701),r),!1):d===e.readInt32LE(0)||(console[t(599)]("### Sign Failed, zip file error: ",r),!1)}}}),ps=Be(function(e,r){var u,c=_0x3d6c,n={};n[c(1872)]=function(e){var r=c;if(void 0===u){var t=r(687);for(u=[],o=0;o<64;++o)u["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(o)]=o;for(o=0;o<t.length;++o)u[t.charAt(o)]=-1}for(var n=[],i=0,a=0,o=0;o<e[r(847)];++o){var s=e[r(2101)](o);if("="===s)break;if(-1!==(s=u[s])){if(void 0===s)throw r(2025)+o;i|=s,4<=++a?(n[n[r(847)]]=i>>16,n[n[r(847)]]=i>>8&255,n[n[r(847)]]=255&i,a=i=0):i<<=6}}switch(a){case 1:throw r(2119);case 2:n[n.length]=i>>10;break;case 3:n[n.length]=i>>16,n[n[r(847)]]=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(1501)]=function(e){var r=c,t=n.re[r(2033)](e);if(t)if(t[1])e=t[1];else{if(!t[2])throw"RegExp out of sync";e=t[2]}return n[r(1872)](e)},r[c(1317)]=n}),_s=Be(function(e,r){var c,f=_0x3d6c,t={};t[f(1872)]=function(e){var r=f;if(void 0===c){var t=r(1509),n=r(1934);for(c=[],s=0;s<16;++s)c[t[r(2101)](s)]=s;for(t=t.toLowerCase(),s=10;s<16;++s)c[t.charAt(s)]=s;for(s=0;s<n[r(847)];++s)c[n[r(2101)](s)]=-1}for(var i=[],a=0,o=0,s=0;s<e[r(847)];++s){var u=e.charAt(s);if("="===u)break;if(-1!==(u=c[u])){if(void 0===u)throw r(2025)+s;a|=u,2<=++o?(i[i[r(847)]]=a,o=a=0):a<<=4}}if(o)throw r(572);return i},r[f(1317)]=t}),bs=Be(function(e,r){var o=_0x3d6c,t={};t[o(776)]=function(e,r){var t,n=o;void 0===r&&(r=0);r^=-1;for(var i=0,a=e.length;i<a;i++)t=255&(r^e.charCodeAt(i)),r=r>>>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"[n(1326)](9*t,8);return-1^r},r[o(1317)]=t}),Xr=Be(function(e,r){var t=ps(),n=_s(),i=bs();r.exports={Base64:t,Hex:n,CRC32:i}}),en=Be(function(e,r){var c=_0x3d6c,f=require("crypto"),h=require(c(1466)),l=Qt(),d=require(c(1586))[c(1590)];var v={"Content-Type":c(887)};function a(e){var r,t,n,a=c,o={version:"1",payload:d(e),paddingMode:"1"},e=(new Date)[a(360)](),i=a(857),s=(v[i]=(i=o,r=c,t=(new Date)[r(360)](),i="POST&"+new URL(l[r(1246)]()).pathname+"&&"+JSON[r(715)](i)+r(2100)+l.getDssKeyId()+r(902)+t,n=l.getDssKey(),n=f.createHmac(r(1832),n)[r(1347)](i)[r(776)](r(675)),r(1018)[r(1890)](l[r(846)](),r(2012))[r(1890)](t,r(916))[r(1890)](n,'"')),v[a(612)]=e,new URL(l[a(1246)]())),u=s[a(1128)];return new Promise(function(n){var i=a,e=h[i(521)]({host:s[i(448)],port:8108,method:i(310),path:u,headers:v},function(e){var r=i,t="";e.on(r(625),function(e){t+=e}),e.on("end",function(){n(JSON[r(763)](t))})});e.on(i(678),function(e){var r=i;console.error(r(906)[r(1890)](e[r(1874)]))}),e[i(1620)](JSON[i(715)](o)),e.end()})}function i(e){return t[c(475)](this,arguments)}function t(){var e=c;return(t=_asyncToGenerator(_regenerator().m(function e(t){var n,i;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return e.n=1,a(t);case 1:return n=e.v,console[r(599)](n),i={},e.a(2,(n&&0===n[r(1892)]?(i[r(425)]=n[r(2131)][r(425)],i[r(1435)]=n[r(2131)][r(1435)]):console[r(678)]("sign request error:"+(n?n[r(2131)][r(922)]:"")),i))}},e)})))[e(475)](this,arguments)}function o(e){var r,t=c;if(e)return r=(e=e[t(488)](/-/g,"+")[t(488)](/_/g,"/"))[t(847)]%4,e+"===="[t(2016)](0,r)}function n(){var e=c;return(n=_asyncToGenerator(_regenerator().m(function e(t){var n;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return l.setDssConfig(t),e.n=1,i(r(1956));case 1:return n=e.v,n=o(n[r(425)])[r(488)](/(.{64})/g,r(1639)),e.a(2,l[r(819)]+n+l.CERT_END)}},e)})))[e(475)](this,arguments)}r.exports={getSignDigestOnline:i,Base64UrlToBase64:o,setOnlineParam:function(e,r){var t=c;l[t(1407)](e),l[t(956)](r)},generateCertificate:function(e){return n[c(475)](this,arguments)}}}),nn=Be(function(e,r){var k=_0x3d6c,x=Qt(),v=Yr(),t=require("js-base64"),n=t[k(1294)],p=t[k(643)],u=require(k(1466)),i=require("fs"),_=require(k(531)),o=Xr(),g=en(),c="Rsagen",f="Rsagen-V3.0.1.20190615",h=k(817),l=k(418),d=k(1320);function m(e,r){var t=k,n=r.startIndex,i=r[t(1306)]+r[t(1772)],e=e.slice(n,i),n=Buffer[t(1448)](5+r[t(1772)]);n[0]=x[t(842)],n.writeInt32LE(e[t(847)],1),e[t(573)](n,5),r[t(1728)]=B(n)}function y(e){var r=k;function t(e){var r=_0x3d6c;e[r(573)](i,a),a+=e[r(847)]}var e=e.sections,n=e.header[r(1728)].length+e.central[r(1728)][r(847)]+e[r(1845)][r(1728)][r(847)]+5,i=Buffer[r(1448)](n),a=0;return i[r(1727)](x[r(1854)],0),i[r(1739)](3,1),a+=5,t(e[r(1006)][r(1728)]),t(e.central[r(1728)]),t(e[r(1845)][r(1728)]),B(i)}function b(e,r){var t=k,a={keyId:r[t(1290)],clientType:c,clientVersion:f,algorithmType:h,userName:r[t(371)],unSignData:n(e),passwordDigest:r[t(1682)],algorithm:l,outFileNameArray:[d],encryptPassword:r.encryptPassword},o=new URL(r[t(609)]),s=o[t(1128)];return new Promise(function(n){var i=t,e=u[i(521)]({host:o[i(448)],method:i(310),path:s,headers:{"Content-Type":"application/json"}},function(e){var r=i,t="";e.on(r(625),function(e){t+=e}),e.on(r(2007),function(){n(JSON.parse(t))})});e.on("error",function(e){var r=i;console[r(678)]("problem with request: "[r(1890)](e.message))}),e[i(1620)](JSON[i(715)](a)),e[i(2007)]()})}function w(e){var r=k,t=Buffer[r(1790)](x[r(1710)]),e=B(e),n=Buffer.alloc(e[r(847)]+t.length),i=0;return t.copy(n,0),i+=t[r(847)],e[r(573)](n,i),n}function C(e){var r=k,t=Buffer.alloc(e[r(847)]+12);return t[r(1739)](e.length+8,0),t.writeInt32LE(x[r(539)],4),t[r(1739)](e[r(847)],8),e[r(573)](t,12),{len:t[r(847)],buffer:t}}function E(e,r){var t=k,n={len:12,digests:{size:0,data:[]},certs:{size:0,data:[]},additional:0};return n[t(1580)].data[t(1922)](e),n.digests[t(322)]+=e.len,n[t(1772)]+=e[t(1772)],n[t(1699)][t(625)].push(r),n[t(1699)][t(322)]+=r[t(1772)],n[t(1772)]+=r[t(1772)],n}function A(){var e=k;return(A=_asyncToGenerator(_regenerator().m(function e(t,n){var i,a,o,s,u;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if((i={len:16+n.cert[r(471)][r(847)],size:12+n.cert[r(471)].length,signdata:{size:0,buffer:null},signatures:{size:0,data:[]},pubkey:{size:n.cert[r(471)][r(847)],buffer:n.cert[r(471)]}})[r(1843)][r(1261)]=D(t),i[r(1843)][r(322)]=t[r(1772)],i.size+=t.len,i[r(1772)]+=t[r(1772)],x.isApkSign())return e.n=1,g[r(1633)](i[r(1843)][r(1261)]);e.n=2;break;case 1:a=e.v,a=Buffer.from(p[r(1588)](a[r(1435)])),e.n=8;break;case 2:if(n[r(1443)]===r(2148))return e.n=3,g[r(1633)](i[r(1843)][r(1261)]);e.n=4;break;case 3:o=e.v,a=Buffer[r(1790)](p[r(1588)](o[r(1435)])),e.n=8;break;case 4:if(n[r(414)])return o=w(i.signdata.buffer),e.n=5,b(o,n[r(1743)]);e.n=7;break;case 5:if((s=e.v).success){e.n=6;break}throw new Error(s.message);case 6:a=Buffer.from(p[r(1588)](s[r(625)].signData)),e.n=8;break;case 7:(u=_.createSign("RSA-SHA256")).update(i[r(1843)][r(1261)]),a=u[r(1728)](n[r(1177)]);case 8:return u={len:a[r(847)]+12,size:a[r(847)]+8,id:x[r(539)],buffer:a},e.a(2,(i[r(1097)].data[r(1922)](u),i[r(1097)][r(322)]+=u[r(1772)],i[r(322)]+=u[r(1772)],i[r(1772)]+=u[r(1772)],i))}},e)})))[e(475)](this,arguments)}function S(){return(S=_asyncToGenerator(_regenerator().m(function e(t,n,i){var a,o,s;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if((a={len:4+n[r(1772)],size:n[r(1772)],data:[]})[r(625)][r(1922)](n),o=x[r(312)]()?x[r(1642)]:x[r(1856)],o={len:a[r(1772)]+12,size:a[r(1772)]+4,id:o,value:a},(a={len:32+o.len,size:24+o[r(1772)],data:[]}).data[r(1922)](o),t[r(330)]&&!x.isApkSign())return e.n=1,function(){return T[k(475)](this,arguments)}(t[r(330)],i);e.n=2;break;case 1:(o=e.v)&&((s={len:4+o[r(847)],size:o[r(847)],data:[]})[r(625)][r(1922)](o),s={len:s[r(1772)]+12,size:s[r(1772)]+4,id:x[r(1168)],value:s},a[r(625)].push(s),a[r(322)]+=s[r(1772)],a[r(1772)]+=s[r(1772)]);case 2:return e.a(2,a)}},e)}))).apply(this,arguments)}function D(e){var t=k,n=Buffer[t(1448)](e[t(1772)]),i=0;return n[t(1739)](e[t(1580)][t(322)],i),i+=4,e.digests[t(625)][t(1793)](function(e){var r=t;e[r(1261)][r(573)](n,i),i+=e[r(1772)]}),n[t(1739)](e[t(1699)][t(322)],i),i+=4,e[t(1699)][t(625)][t(1793)](function(e){var r=t;e.buffer[r(573)](n,i),i+=e[r(1772)]}),n[t(1739)](e.additional,i),n}function O(e){var a={len:8,size:4,digests:[],sign:null};return e.forEach(function(e){var r=_0x3d6c,t=o.CRC32.digest(e[r(741)][r(926)]()),n=6+e[r(1283)][r(847)],i=Buffer[r(1448)](n);i.writeInt32LE(t,0),i[r(2096)](e[r(1283)].length,4),e.hash[r(573)](i,6),a.digests[r(1922)](i),a[r(322)]+=n,a[r(1772)]+=n}),a}function T(){var e=k;return(T=_asyncToGenerator(_regenerator().m(function e(o,s){var u,c,f,h,l,d,v;return _regenerator().w(function(e){for(var r,t,n,i,a=_0x3d6c;;)switch(e.n){case 0:u=O(o),c=Buffer[a(1448)](u[a(322)]),f=0,u[a(1580)][a(1793)](function(e){var r=a;e.copy(c,f),f+=e[r(847)]}),s[a(1728)]?(console[a(599)](a(1335)),h=s[a(1728)],e.n=7):e.n=1;break;case 1:if(s.type===a(2148))return e.n=2,g[a(1633)](c);e.n=3;break;case 2:l=e.v,h=Buffer[a(1790)](p[a(1588)](l[a(1435)])),e.n=7;break;case 3:if(s.signOnline)return l=w(c),e.n=4,b(l,s[a(1743)]);e.n=6;break;case 4:if((d=e.v).success){e.n=5;break}throw new Error(d.message);case 5:h=Buffer.from(p[a(1588)](d[a(625)][a(1320)])),e.n=7;break;case 6:(v=_[a(1612)](a(1401)))[a(1347)](c),h=v[a(1728)](s[a(1177)]);case 7:return e.a(2,(u[a(1580)]=c.slice(),u[a(1728)]={len:12+h[a(847)],size:8+h[a(847)],id:x[a(539)],data:h},u.len+=u[a(1728)][a(1772)],r=u,i=n=t=void 0,t=k,n=Buffer[t(1448)](r[t(1772)]),i=0,n[t(1739)](r[t(322)],0),i+=4,r[t(1580)][t(573)](n,4),i+=r[t(1580)][t(847)],n[t(1739)](r.sign[t(322)],i),i+=4,n[t(1739)](r[t(1728)].id,i),i+=4,n[t(1739)](r[t(1728)][t(625)][t(847)],i),i+=4,r[t(1728)][t(625)][t(573)](n,i),n))}},e)})))[e(475)](this,arguments)}function a(){return(a=_asyncToGenerator(_regenerator().m(function e(u,c,f){var h,l,d;return _regenerator().w(function(e){for(var r,t,n,i,a,o,s=_0x3d6c;;)switch(e.n){case 0:if(v[s(1807)](u)){e.n=1;break}return e.a(2,null);case 1:if((h=v[s(1585)](u))[s(346)]={files:c},h[s(421)]){e.n=2;break}return e.a(2,null);case 2:return Object[s(808)](h[s(968)])[s(1793)](function(e){e=h[s(968)][e];m(u,e)}),l=y(h),l=C(l),l=E(l,f[s(425)][s(1292)]),e.n=3,function(){return A[k(475)](this,arguments)}(l,f);case 3:return l=e.v,e.n=4,function(){return S[k(475)](this,arguments)}(h[s(346)],l,f);case 4:return d=e.v,e.a(2,(h[s(491)]=(e=>{var r=k,i=Buffer[r(1448)](e.len),a=0,t=(i.writeInt32LE(e[r(322)],a),a+=4,i[r(1739)](0,a),a+=4,x.isApkSign()?x[r(1642)]:x[r(1856)]),e=(e[r(625)].forEach(function(e){var n=r;i.writeInt32LE(e[n(322)],a),a+=4,i[n(1739)](0,a),a+=4,i[n(1739)](e.id,a),a+=4,i.writeInt32LE(e[n(696)].size,a),a+=4,t===e.id?e[n(696)][n(625)][n(1793)](function(e){var t=n;i[t(1739)](e[t(322)],a),a+=4,i[t(1739)](e[t(1843)].size,a),a+=4,e[t(1843)][t(1261)].copy(i,a),a+=e[t(1843)][t(1261)][t(847)],i[t(1739)](e.signatures[t(322)],a),a+=4,e.signatures.data[t(1793)](function(e){var r=t;i.writeInt32LE(e[r(322)],a),a+=4,i[r(1739)](e.id,a),a+=4,i.writeInt32LE(e.buffer[r(847)],a),a+=4,e[r(1261)][r(573)](i,a),a+=e[r(1261)].length}),i[t(1739)](e[t(1547)][t(322)],a),a+=4,e.pubkey.buffer[t(573)](i,a),a+=e.pubkey[t(1261)][t(847)]}):x.SIGN_TYPE_FILE_LIST===e.id&&e[n(696)][n(625)][n(1793)](function(e){var r=n;e[r(573)](i,a),a+=e[r(847)]})}),i[r(1739)](e[r(322)],a),a+=4,i[r(1739)](0,a),a+=4,x[r(312)]()?x[r(703)]:x.SIGN_MAGIC);return Buffer[r(1790)](e)[r(573)](i,a),i})(d),r=u,t=h,o=a=i=n=void 0,n=k,i=Buffer[n(1448)](r[n(847)]+t.signchunk.length),a=0,o=t[n(968)],r[n(573)](i,0,o[n(1006)].startIndex,o[n(1006)][n(1306)]+o[n(1006)][n(1772)]),a+=o.header[n(1772)],t[n(491)][n(573)](i,a),a+=t[n(491)].length,r[n(573)](i,a,o[n(566)].startIndex,o[n(566)][n(1306)]+o[n(566)][n(1772)]),a+=o[n(566)][n(1772)],r[n(1739)](o[n(566)].startIndex+t[n(491)][n(847)],o[n(1845)][n(1306)]+16),r.copy(i,a,o[n(1845)].startIndex,o[n(1845)][n(1306)]+o[n(1845)][n(1772)]),i))}},e)}))).apply(this,arguments)}function s(){var e=k;return(s=_asyncToGenerator(_regenerator().m(function e(t,n,i){var a,o;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(v[r(1807)](t)){e.n=1;break}return e.a(2,null);case 1:if((a=v[r(1585)](t))[r(346)]={files:n},a[r(421)]){e.n=2;break}return e.a(2,null);case 2:return Object[r(808)](a[r(968)])[r(1793)](function(e){e=a[r(968)][e];m(t,e)}),o=y(a),o=C(o),o=E(o,i[r(425)][r(1292)]),e.a(2,D(o))}},e)})))[e(475)](this,arguments)}function B(e){var r=k,t=_.createHash("SHA256");return t[r(1347)](e),t[r(776)]()}function P(e,r){var t=k,n={};return n.size=e[t(2142)](r),r+=4,n[t(1261)]=e[t(1366)](r,r+n.size),{obj:n,i:r+=n.size}}r[k(1317)]={hashFile:function(e){return B(i[k(1434)](e))},signZipResource:function(e,r,t){return a.apply(this,arguments)},getBufferSha256:B,getSignChunk:function(e,r){for(var t,n,i,a,o,s,u,c=k,f=(w=r.previous+8)+r[c(1772)],h=[],l={},d=(l[c(1497)]=[],x[c(312)]()?x[c(1642)]:x[c(1856)]);w<f;){o=w,u=s=void 0,(u={}).size=(v=e)[(s=k)(2142)](o),u.id=v.readInt32LE(o+=8),o+=4,u[s(696)]={},u[s(696)][s(322)]=v[s(2142)](o),u[s(696)][s(625)]=[];var v={data:u,index:o+=4},p=v.data,_=(w=v[c(1986)])+p[c(696)][c(322)],g={};if(d===p.id)for(;w<_;){g[c(322)]=e.readInt32LE(w);var m=P(e,w+=4),y=(g[c(1843)]=m[c(1292)],w=m.i,l[c(1497)][c(1922)](g[c(1843)].buffer),g[c(1097)]={},g[c(1097)][c(322)]=e.readInt32LE(w),(w+=4)+g[c(1097)][c(322)]);for(g[c(1097)][c(625)]=[];w<y;){t=w,a=i=n=void 0,(i={}).size=(b=e)[(n=k)(2142)](t),t+=4,i.id=b[n(2142)](t),t+=4,a=b[n(2142)](t),t+=4,i[n(1261)]=b[n(1366)](t,t+a);var b={sData:i,index:t+=a},w=b.index;g.signatures[c(625)].push(b[c(559)])}m=P(e,w);g[c(1547)]=m[c(1292)],w=m.i,p.value.data.push(g)}else x[c(1168)]===p.id&&(g=e.slice(w,w+p[c(696)][c(322)]),p.value[c(625)][c(1922)](g));h[c(1922)](p)}return l[c(625)]=h,l[c(322)]=r[c(322)],l},getCertBuffer:function(e){var r,t,n=k;if(e)return e[n(1497)]&&0<e[n(1497)][n(847)]?(r=(r=0)+(4+e[n(1497)][0][n(2142)](0))+4,t=e[n(1497)][0][n(2142)](r),r+=4,e=e[n(1497)][0][n(1366)](r,r+t),x.CERT_HEAD+e.toString(n(675))+x[n(1262)]):void 0;console[n(678)](n(1146))},getSignFilesObject:O,getSignData:function(e,r,t){return s[k(475)](this,arguments)}}}),ir=Be(function(e,r){var _=_0x3d6c,c=require("path"),g=require("fs"),m=require(_(531)),y=Ut()[_(1500)],b=nn(),h=require(_(714)),l=Xr(),w=Yr(),k=nn(),d=en(),x=(0,bt()[_(2018)])("spk-sign-utils"),u=_(1913),s=_(595),C={type:_(1029),compression:_(1512),compressionOptions:{level:9}};function f(){var e=_;return(f=_asyncToGenerator(_regenerator().m(function e(r,t){var i,a,o;return _regenerator().w(function(e){for(var n=_0x3d6c;;)switch(e.n){case 0:return i={},r[n(1793)](function(e){var r=n,t=e[r(866)],e=e[r(1248)];return i[t]=e[r(926)](r(1079))}),(a=new y)[n(1491)](s,JSON[n(715)]({algorithm:"SHA-256",digests:i})),e.n=1,a[n(1891)](C);case 1:return a=e.v,o={name:s,hash:b[n(1973)](a)},e.n=2,b[n(1862)](a,[o],t);case 2:return e.a(2,e.v)}},e)})))[e(475)](this,arguments)}function E(){return t[_(475)](this,arguments)}function t(){var e=_;return(t=_asyncToGenerator(_regenerator().m(function e(r,t){var i,a,o,s;return _regenerator().w(function(e){for(var n=_0x3d6c;;)switch(e.n){case 0:return i=r[n(1575)],a=new y,o=i.map(function(e){var r=n;return{name:e.fileBuildPath,hash:e[r(1248)]}}),e.n=1,function(){return f[_(475)](this,arguments)}(i,t);case 1:return s=e.v,a.file(u,s),o[n(685)]({name:u,hash:b[n(1973)](s)}),s=Object[n(1465)]({},C),i[n(1793)](function(e){var r=n,t=e.fileBuildPath,e=e[r(843)];a[r(1491)](t,e)}),e.n=2,a[n(1891)](s);case 2:return s=e.v,e.n=3,b[n(1862)](s,o,t);case 3:return e.a(2,e.v)}},e)})))[e(475)](this,arguments)}function a(){var e=_;return(a=_asyncToGenerator(_regenerator().m(function e(r,t,i,a,o){var s,u,c,f,h,l,d,v,p;return _regenerator().w(function(e){for(var n=_0x3d6c;;)switch(e.n){case 0:return e.n=1,E(i,t);case 1:if(s=e.v,a[n(847)]){e.n=2;break}return e.a(2,{rpkBuffer:s});case 2:if(u=new y,c=[],f=Object.assign({},C),o.disableSubpackages&&o[n(2115)]!==n(1996)){e.n=4;break}return l=a[n(1399)](function(e){return E(e,t)}),e.n=3,Promise[n(1643)](l)[n(884)](function(){new Error(n(1559))});case 3:e.v.forEach(function(e,r){var t=n,r=""[t(1890)](a[r][t(641)]);e.length,u[t(1491)](r,e),c.push({name:r,hash:b[t(1973)](e)})}),e.n=6;break;case 4:return h=a[0],e.n=5,E(h,t)[n(884)](function(){new Error(n(1559))});case 5:l=e.v,d=""[n(1890)](h[n(641)]),l[n(847)],u[n(1491)](d,l),c[n(1922)]({name:d,hash:b[n(1973)](l)});case 6:return e.n=7,u[n(1891)](f);case 7:return d=e.v,e.n=8,b.signZipResource(d,c,t);case 8:return v=e.v,p=s,e.a(2,{rpksBuffer:v,rpkBuffer:p})}},e)})))[e(475)](this,arguments)}function n(){return(n=_asyncToGenerator(_regenerator().m(function e(t,n){var i;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return i=g[r(1434)](n),e.n=1,b[r(1862)](i,[],t);case 1:return i=e.v,e.a(2,{apkBuffer:i})}},e)}))).apply(this,arguments)}function v(e,r,t,n){var i=_;e[i(1575)][i(1922)]({fileBuildPath:r,fileContentBuffer:t,fileContentDigest:n})}function i(e){var r,t,n,i,a,o,s,u=_,e=e[u(839)](/^(\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,r=parseInt(e[3]),t=parseInt(e[4]),n=parseInt(e[5]),i=parseInt(e[6]),a=0,""!==(e=e[7])&&(e=(e[u(1326)](1)+"00")[u(1326)](0,3),a=parseInt(e)),Date[u(1074)](s,o,r,t,n,i,a);throw new Error(u(2126))}function A(e,r,t){return o.apply(this,arguments)}function o(){var e=_;return(o=_asyncToGenerator(_regenerator().m(function e(t,n,i){var a,o,s,u,c,f=arguments;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(o=3<f[r(847)]&&void 0!==f[3]?f[3]:{},a={signOnline:null!=i,privateKey:n,onlineConfig:i},o&&o.dssHost&&o[r(724)])return e.n=1,d.generateCertificate(o);e.n=2;break;case 1:t=e.v,a[r(1443)]="dss";case 2:return(o=new h.X509)[r(1277)](t.toString()),s=h[r(1005)][r(1375)](o[r(1227)]()),u=Buffer[r(1790)](l[r(643)].unarmor(t)),c=Buffer.alloc(u[r(847)]+4),e.a(2,(c[r(1739)](u[r(847)],0),u[r(573)](c,4),a[r(425)]={content:t,obj:{len:c[r(847)],buffer:c},pemBuffer:Buffer[r(1790)](l[r(643)][r(1501)](s))},a))}},e)})))[e(475)](this,arguments)}function p(e){var r=_,t=new h[r(536)],e=(t[r(1277)](e),t[r(1441)]()),t=Buffer[r(1790)](e,r(1079))[r(926)](r(675)),e=k[r(1973)](t);return Buffer[r(1790)](e)[r(926)](r(1079))}function S(){return(S=_asyncToGenerator(_regenerator().m(function e(s){var u,c,f,h,l,d,v,p;return _regenerator().w(function(e){for(var r,t,n,i,a,o=_0x3d6c;;)switch(e.n){case 0:if(s&&g[o(1196)](s)){e.n=1;break}throw new Error(o(2075)+s);case 1:if(u=g[o(1434)](s),w[o(1807)](u)){e.n=2;break}throw new Error(o(1994));case 2:if((c=w[o(1585)](u,!0))[o(968)][o(1728)][o(421)]){e.n=3;break}throw new Error(o(1655));case 3:if(f=k[o(373)](u,c.sections.sign),h=k.getCertBuffer(f)){e.n=4;break}throw new Error("Get Certificate error!");case 4:return l=f[o(625)][0][o(696)][o(625)][0][o(1097)][o(625)][0].buffer,d=[],r=u,a=i=n=void 0,t=(t=c)[(n=_)(968)],i=Buffer.alloc(t.header.len+t[n(566)][n(1772)]+t[n(1845)].len),a=0,r.copy(i,0,t.header[n(1306)],t.header[n(1306)]+t[n(1006)].len),a+=t.header[n(1772)],r[n(573)](i,a,t[n(566)][n(1306)],t.central[n(1306)]+t.central[n(1772)]),a+=t.central[n(1772)],r.copy(i,a,t[n(1845)].startIndex,t[n(1845)][n(1306)]+t[n(1845)][n(1772)]),i[n(1739)](t[n(1006)][n(1772)],i[n(847)]-6),v=i,e.n=5,A(h);case 5:return p=e.v,e.n=6,b[o(1288)](v,d,p);case 6:p=e.v,m[o(1461)](o(1401))[o(1347)](p)[o(1350)](h,l)||(x[o(678)]("Failed to verify the signature"),process[o(775)](-1));case 7:return e.a(2)}},e)}))).apply(this,arguments)}r[_(1317)]={generatePkgDef:function(){var t=_,e=0<arguments[t(847)]&&void 0!==arguments[0]?arguments[0]:[],n=[],r={pkgName:t(1099),fileList:[]},i={pkgName:"base.sspk",fileList:[]};return e[t(1793)](function(e){var r=t,e=e[r(1094)];n[r(1922)]({pkgName:""[r(1890)](e,".sspk"),fileList:[],root:e})}),{mainPkg:r,subPkgs:e.length?[i][t(1890)](n):[i]}},addResourceToPkg:function(e,r,t,s){var u=_;e[u(1793)](function(n){var i,a=u,e=g.readFileSync(c[a(1524)](r,n)),o=[n,e,b[a(1973)](e)];v.apply(void 0,[t][a(1890)](o)),s[a(847)]&&(i=!0,s[a(1366)](1).forEach(function(e){var r=a,t=n[r(1936)]("/");t[0]===e[r(1551)]&&(o[0]=t.slice(1)[r(1524)]("/"),v.apply(void 0,[e][r(1890)](o)),i=!1)}),i)&&v.apply(void 0,[s[0]][a(1890)](o))})},signPkgs:function(e,r,t,n,i){return a.apply(this,arguments)},DIGEST_PATH:u,getResources:function(e){var r=_;return function n(i,a){var o=_0x3d6c,s=[],u=c[o(1717)][o(1524)](i,a);return g[o(711)](u)[o(1793)](function(e){var r=o,t=c.posix[r(1524)](u,e),e=c[r(1717)][r(1524)](a,e);g[r(472)](t).isFile()?s[r(1922)](e):s=s[r(1890)](n(i,e))}),s}(e,".")[r(924)](function(e){return e!==u})},checkValidity:function(e){(t=new h[(r=_)(536)])[r(1277)](String(e));var r=i(t.getNotAfter()),e=i(t.getNotBefore()),t=Number(new Date);return{validityDays:Number(r-t)/864e5,isInvalid:0<Number(e)-t}},getSignInfo:A,getApkSignInfo:function(e){var r=_,t={signOnline:!1,onlineConfig:null},n=((n=new h[r(536)])[r(1277)](e[r(926)]()),h.KEYUTIL[r(1375)](n[r(1227)]())),i=Buffer.from(l[r(643)][r(1501)](e)),a=Buffer[r(1448)](i[r(847)]+4);return a[r(1739)](i[r(847)],0),i[r(573)](a,4),t[r(425)]={content:e,obj:{len:a.length,buffer:a},pemBuffer:Buffer[r(1790)](l.Base64[r(1501)](n))},t},getSignedZipCertFp:function(e){return S[_(475)](this,arguments)},getCertFp:function(e){var r=_;if(g[r(1196)](e))return p(g[r(1434)](e)[r(926)]());console.error(r(976))},signFullApk:function(e,r){return n.apply(this,arguments)},getCertString:function(e){var r=_;if(!e||!g[r(1196)](e))throw new Error(r(841)+e);if(e=g[r(1434)](e),!w[r(1807)](e))throw new Error("Get File Certificate Error!");var t=w[r(1585)](e,!0);if(!t[r(968)][r(1728)][r(421)])throw new Error(r(1655));if(e=k.getSignChunk(e,t.sections[r(1728)]),t=k[r(1343)](e))return p(t);throw new Error(r(2017))}}}),At=Be(function(e,r){var f=_0x3d6c,h=require(f(648)),l=require("fs"),n=require(f(883)),i=require(f(396)),d=require(f(1582)),t="src/main/resources/rawfile",a=f(1531),o=f(1333),s=f(994),u=f(1549),c=(0,bt().getLogger)(f(764)),v=require("child_process"),p=v[f(2033)],_=v[f(728)];function g(e){var r,t=f,n=h[t(1515)](e,t(2030));if(!l[t(1196)](n))return h[t(1524)](e,t(1644));n=m(n);if(0<(null==n||null==(r=n[t(1906)])?void 0:r.length))return h[t(1524)](e,n[t(1906)][0][t(1378)]);throw new Error(t(1004))}function m(r){var t=f;if(!l[t(1196)](r))return{};var e={};try{e=n[t(763)](l[t(1434)](r,t(946))[t(926)]()||"{}")}catch(e){throw new Error(t(1087).concat(r,":")[t(1890)](e[t(622)],":")[t(1890)](e.columnNumber," "))}return e}var y=function(e){var n=f;return Promise[n(1643)](e[n(1399)](function(r){var t=n;if(l[t(1196)](r))return new Promise(function(e){i[t(2046)](r),e()})}))};function b(){return(b=_asyncToGenerator(_regenerator().m(function e(t,n){var i,a,o,s,u,c,f;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,d(t,n);case 1:a=l[r(711)](n,{withFileTypes:!0}),i=[],a=_createForOfIteratorHelper(a),e.p=2,a.s();case 3:if((f=a.n()).done)e.n=9;else{if(o=f.value,s=h[r(1515)](h[r(1524)](n,o[r(741)])),u="",o.name===r(1966))return e.n=4,d(s,n);e.n=5}break;case 4:u=h[r(1515)](h[r(1524)](n,r(949))),e.n=7;break;case 5:return c=o[r(741)][r(1936)](".")[0],e.n=6,d(s,h[r(1515)](n,c));case 6:u=h[r(1515)](h.resolve(n,c,r(949)));case 7:i[r(1922)](u),l[r(606)](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,y(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]])}))).apply(this,arguments)}r[f(1317)]={RAWFILE_DIR:t,ASCF_BUILD:a,ASCF_CONFIG_JSON:o,P12_PATH:s,QUICK_SERVICE_BUILD:"build/quick_service_build",DIST_PATH:u,getManifestData:function(e){var r=f;return m(h[r(1515)](g(e),t,r(1403)))},getEntryPkgPath:g,readJsonFile:m,clearResource:y,copyDirectory:function e(r,t){var n,i=f;if(l[i(631)](t,{recursive:!0}),l[i(472)](r)[i(783)]())n=h[i(1524)](t,h[i(812)](r)),l[i(1342)](r,n);else{var a,o=_createForOfIteratorHelper(l[i(711)](r,{withFileTypes:!0}));try{for(o.s();!(a=o.n())[i(1616)];){var s=a.value,u=h.resolve(h[i(1524)](r,s.name)),c=h[i(1524)](t,s[i(741)]);s[i(1857)]()?e(u,c):l[i(1342)](u,c)}}catch(e){o.e(e)}finally{o.f()}}},mkdirsSync:function e(r){var t=f;if(!l.existsSync(r)){if(l.existsSync(h[t(613)](r))||!e(h[t(613)](r)))return l.mkdirSync(r);print(t(424)[t(1890)](r))}},formatHexString:function(e){var r=f;if(64!==e[r(847)])throw new Error(r(793));for(var t="",n=0;n<e[r(847)];n+=2)t+=e[r(1326)](n,2)+":";return t[r(1366)](0,-1)[r(1270)]()},extractspk:function(e,r){return b[f(475)](this,arguments)},deleteDirectory:function t(n){var i=f;l.existsSync(n)&&(l[i(711)](n).forEach(function(e){var r=i,e=h[r(1524)](n,e);l[r(658)](e).isDirectory()?t(e):l[r(606)](e)}),l[i(1055)](n))},executeCommand:function(a){var o=/^mac verified ok/i;return new Promise(function(r,t){var e,n=_0x3d6c,i=p(a);null!=(e=i[n(996)])&&e.on(n(625),function(e){c.debug(e)}),null!=(e=i[n(575)])&&e.on("data",function(e){!e[n(839)](o)&&a.includes("pkcs12")&&t(e)}),null!=(e=i[n(575)])&&e.on(n(678),function(e){t(e)}),i.on("close",function(e){r(e)})})},checkOpenSSL:function(e){var r=f;if(0===(e=_(e,[r(1533)],{encoding:"utf-8"})).status)return c[r(1363)](e[r(996)]),!0;throw new Error(r(953)+e[r(575)])},validatePassword:function(){var e,r=f,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";return!(t.length<8)&&(e=0,/[a-z]/[r(806)](t)&&e++,/[A-Z]/[r(806)](t)&&e++,/[0-9]/[r(806)](t)&&e++,/[`~!@#$%^&*()\-_=+\\|[{}];:'",<.>\/?]/[r(806)](t)&&e++,2<=e)}}}),hn=Be(function(e,r){var t=_0x3d6c,n=require("path"),i=require("os"),a=At().checkOpenSSL,o=i.platform(),s=(0,bt()[t(2018)])(t(1368)),u=!1;r[t(1317)]={getOpensslPath:function(){var e=t,r=e(1368);return"win32"===o&&(r=n[e(1524)](__dirname,"../tools/release_64/bin/openssl.exe")),u||(s[e(1363)](r),u=a(r)),r},getOpensslConfig:function(){var e=t,r="";return r=o===e(1390)?"-config "[e(1890)](n[e(1524)](__dirname,e(1020))):r}}}),ua=Be(function(j,e){var d,h=_0x3d6c,f=require(h(531)),v=require("path"),p=require("fs"),n=Ut()[h(1500)],_=ir(),r=bt()[h(2018)],t=At(),g=t[h(308)],m=t[h(529)],y=t[h(1982)],b=t[h(1805)],w=t[h(1787)],k=t[h(1875)],N=t[h(1314)],x=t[h(605)],l=t[h(872)],G=t[h(1983)],L=t[h(1009)],C=t[h(1673)],E=hn()[h(1141)],A=r(h(1048)),c=100,H=1e4,U=0;function S(){return i[h(475)](this,arguments)}function i(){var e=h;return(i=_asyncToGenerator(_regenerator().m(function e(r,t){var n,i,a;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return n=v.resolve(r,x),e.n=1,function(){return s[h(475)](this,arguments)}(t,r,n);case 1:return i=e.v,e.n=2,function(){return o[h(475)](this,arguments)}(t,r,n);case 2:return a=e.v,e.a(2,_.getSignInfo(a,i,d))}},e)})))[e(475)](this,arguments)}function o(){var e=h;return(o=_asyncToGenerator(_regenerator().m(function e(a,o,s){var u,c,f;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(u="",p[r(1196)](a.signPublicKeyPath)&&(A.debug("Obtaining a public Key using a Path"),u=p[r(1434)](a[r(419)])),!u&&p[r(1196)](a[r(1084)]))return A[r(1363)](r(1471)),e.n=1,R(a[r(1084)],F(a[r(1118)]));e.n=2;break;case 1:u=e.v;case 2:u||!p[r(1196)](s)?e.n=5:(c=null==(c=JSON.parse(p[r(1434)](s)[r(926)]()))?void 0:c[r(1583)],p[r(1196)](null==c?void 0:c[r(1121)])?(A[r(1363)](r(1480)),u=p[r(1434)](c[r(1121)]),e.n=5):e.n=3);break;case 3:if(p[r(1196)](null==c?void 0:c[r(1746)]))return A[r(1363)]("Obtain the public key from the ascf.config.json profilePath"),e.n=4,R(c[r(1746)],F(a[r(1118)]));e.n=5;break;case 4:u=e.v;case 5:if(f=v[r(1515)](o,r(1557)),!u&&p[r(1196)](f)&&(A[r(1363)](r(1205)[r(1890)](f)),u=p[r(1434)](f)),f=v[r(1515)](o,l),!u&&p[r(1196)](f))return A.debug(r(1933)),e.n=6,R(f,F(a[r(1118)]));e.n=7;break;case 6:u=e.v;case 7:u||(A.error(r(1041)),process[r(775)](-1)),i=n=t=void 0;var t=u,n=h,i=(t=_.checkValidity(t))[n(973)],t=t[n(1438)];if(i<0||t)throw new Error(n(1140));return i<180&&A[n(585)](n(338)),e.a(2,u)}},e)})))[e(475)](this,arguments)}function s(){return(s=_asyncToGenerator(_regenerator().m(function e(t,n,i){var a,o,s;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:if(a="",p[r(1196)](t.signPrivateKeyPath)&&(A[r(1363)]("Obtaining a private Key using a Path"),a=p.readFileSync(t[r(983)])),!a&&p.existsSync(t.signProfilePath))return A[r(1363)](r(1471)),e.n=1,I(t[r(1084)],F(t[r(1118)]));e.n=2;break;case 1:a=e.v;case 2:a||!p.existsSync(i)?e.n=5:(o=null==(o=JSON[r(763)](p[r(1434)](i)[r(926)]()))?void 0:o.signConfig,p[r(1196)](null==o?void 0:o[r(2087)])?(A[r(1363)](r(307)),a=p[r(1434)](o[r(2087)]),e.n=5):e.n=3);break;case 3:if(p[r(1196)](null==o?void 0:o[r(1746)]))return A[r(1363)](r(702)),e.n=4,I(o[r(1746)],F(t.signPwd));e.n=5;break;case 4:a=e.v;case 5:if(s=v[r(1515)](n,r(445)),!a&&p[r(1196)](s)&&(A[r(1363)](r(455)[r(1890)](s)),a=p[r(1434)](s)),s=v[r(1515)](n,l),!a&&p[r(1196)](s))return A.debug(r(1309)),e.n=6,I(s,F(t[r(1118)]));e.n=7;break;case 6:a=e.v;case 7:return a||(A.error(r(1481)),process[r(775)](-1)),e.a(2,a)}},e)}))).apply(this,arguments)}function D(){return a.apply(this,arguments)}function a(){var e=h;return(a=_asyncToGenerator(_regenerator().m(function e(o,r,s,u){return _regenerator().w(function(e){for(var r,t,n,i,a=_0x3d6c;;)if(0===e.n)return e.a(2,(p[a(1196)](o)||p[a(631)](o),r=s.rpksBuffer,t=o,i=void 0,i=h,(n=u).length>c&&(n=n[i(1366)](0,c)),t=v[i(1524)](t,n),p[i(699)](t,r),A[i(1129)]("Build spk "[i(1890)](t)),t))},e)})))[e(475)](this,arguments)}function O(e){var r=h;if(!e[r(1800)]||!e[r(1800)][r(1427)]("com.atomicservice."))throw new Error(r(2009));if(!e.versionName||!e[r(1598)])throw new Error(r(1151))}function T(e){var r=h,t=(new Date)[r(1265)]()[r(1936)]("T")[0][r(1936)]("-")[r(1524)](""),n=process[r(912)][r(1473)]===r(649)?"release":r(1363);return""[r(1890)](e[r(1800)],"-")[r(1890)](e.versionCode,"-")[r(1890)](n,"-")[r(1890)](t,r(2147))}function u(){return(u=_asyncToGenerator(_regenerator().m(function e(i,r){var t,a,o,s,u,c,f,h,l;return _regenerator().w(function(e){for(var n=_0x3d6c;;)switch(e.n){case 0:if(t=v[n(1524)](i,x),(d=(p[n(1196)](t)?require(t):{})[n(1728)])&&!d.host)throw new Error(n(890));e.n=1;break;case 1:return e.n=2,S(i,r);case 2:if(a=e.v){e.n=3;break}throw new Error("ERROR: Failed to obtain the signature configuration information.");case 3:return o=v[n(1515)](i,L),s=v.resolve(i,G),e.n=4,y([s]);case 4:if(O(u=k(i)),c=T(u),null!=(t=u[n(397)])&&t[n(1793)](function(e){var r=n,t=v[r(1515)](i,m,e[r(1094)],g);b(t,v[r(1515)](s,e[r(1094)]))}),b(v[n(1515)](w(i),g),s),h=_.generatePkgDef(u[n(397)]),f=h.mainPkg,h=h[n(1341)],(l=0<(l=[])[n(847)]?l:_[n(528)](s))[n(847)]){e.n=5;break}throw new Error(n(1932));case 5:return e.a(2,(_[n(1457)](l,s,f,h),_.signPkgs("",a,f,h,r)[n(542)]((()=>{var r=_asyncToGenerator(_regenerator().m(function e(t){var n;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return e.n=1,D(o,u[r(397)],t,c);case 1:if(n=e.v,"release"===u[r(1488)])return e.n=2,P(n);e.n=2;break;case 2:return e.a(2,n)}},e)}));return function(e){return r[_0x3d6c(475)](this,arguments)}})())))}},e)}))).apply(this,arguments)}function B(){return(B=_asyncToGenerator(_regenerator().m(function e(t,n,i,a){var o,s,u,c,f,h,l;return _regenerator().w(function(e){for(var r=_0x3d6c;;)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[r(1515)](t,"manifest.json"),u=N(h),c=T(u),O(u),h=_[r(1256)](u[r(397)]),f=h[r(1870)],h=h[r(1341)],(l=0<(l=[])[r(847)]?l:_.getResources(t))[r(847)]){e.n=2;break}throw new Error(r(1932));case 2:_[r(1457)](l,t,f,h),a=null!=a?a:v.resolve(t,r(1393)),_[r(797)]("",s,f,h,o)[r(542)]((()=>{var r=_asyncToGenerator(_regenerator().m(function e(t){var n;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return e.n=1,D(a,u[r(397)],t,c);case 1:if(n=e.v,"release"===u[r(1488)])return e.n=2,P(n);e.n=2;break;case 2:return e.a(2,n)}},e)}));return function(e){return r[_0x3d6c(475)](this,arguments)}})());case 3:return e.a(2)}},e)}))).apply(this,arguments)}function P(e){var r=h,t=Qt(),s=t[r(982)],t=t[r(2114)];if(p[r(472)](e)[r(322)]>t)throw new Error(r(1287)[r(1890)](t/1024/1024," MB."));return new Promise(function(a,o){p.readFile(e,function(e,r){var t=_0x3d6c;if(e)return o(e);n[t(1520)](r)[t(542)](function(e){var n=t,i=null;if(e[n(1793)](function(e,r){var t=n;if(H<++U)throw t(1867);!i&&r[t(2010)][t(1173)]>s&&(i=new Error(t(1506)[t(1890)](s/1024/1024,t(1289))))}),i)return o(i);a()})})})}function F(e){var r=h,e=null!=e?e:process.env.ASCF_SIGN_PWD;return e||(A.error(r(788)),process[r(775)](-1)),e}function I(u,c){return new Promise((t=_asyncToGenerator(_regenerator().m(function e(t,n){var i,a,o,s;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.p=e.n){case 0:return A[r(1363)](r(1865)),i=f[r(1316)](16).toString(r(1079)),a=f[r(1316)](16)[r(926)](r(1079)),e.p=1,o=""[r(1890)](E(),r(1946))[r(1890)](u,r(809))[r(1890)](i,r(1628))[r(1890)](c),A[r(1363)](""[r(1890)](E(),r(1946))[r(1890)](u,r(809)).concat(i,r(2068))),e.n=2,C(o);case 2:return o=""[r(1890)](E(),r(1611))[r(1890)](i," -check -out ").concat(a),A[r(1363)](""[r(1890)](E(),r(1611))[r(1890)](i,r(722))[r(1890)](a)),e.n=3,C(o);case 3:return p[r(1196)](i)&&p[r(606)](i),s="",e.a(2,(p[r(1196)](a)&&(s=p.readFileSync(a),p[r(606)](a)),A[r(1363)]("Obtaining the private key is complete."),t(s)));case 4:e.p=4,s=e.v,p.existsSync(i)&&p.unlinkSync(i),p[r(1196)](a)&&p[r(606)](a),n("Failed to obtain the private key: "[r(1890)](s));case 5:return e.a(2)}},e,null,[[1,4]])})),function(e,r){return t[_0x3d6c(475)](this,arguments)}));var t}function R(s,u){return new Promise((t=_asyncToGenerator(_regenerator().m(function e(t,n){var i,a,o;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.p=e.n){case 0:return i=f[r(1316)](16)[r(926)]("hex"),e.p=1,a="".concat(E(),r(1946)).concat(s," -nokeys -clcerts -passin pass:")[r(1890)](u,r(1431)).concat(E(),r(1667))[r(1890)](i),A.debug("".concat(E()," pkcs12 -in ")[r(1890)](s," -nokeys -clcerts -passin pass:*** | ")[r(1890)](E(),r(1667))[r(1890)](i)),e.n=2,C(a);case 2:if(p[r(1196)](i))return a=p[r(1434)](i),e.a(2,(p[r(606)](i),t(a)));e.n=3;break;case 3:e.n=5;break;case 4:e.p=4,o=e.v,p[r(1196)](i)&&p[r(606)](i),n(r(1498)[r(1890)](o));case 5:return e.a(2)}},e,null,[[1,4]])})),function(e,r){return t[_0x3d6c(475)](this,arguments)}));var t}e[h(1317)]={signSpk:function(e,r){return u[h(475)](this,arguments)},resignSpk:function(e,r,t,n){return B[h(475)](this,arguments)}}}),da=Be(function(e,r){var t=_0x3d6c,s=(require(t(648)),require("fs")),n=bt().getLogger,i=At(),u=i[t(1673)],c=i[t(2136)],i=hn(),f=i.getOpensslPath,o=i[t(1170)],h=n("cert-utils");function a(){var e=t;return(a=_asyncToGenerator(_regenerator().m(function e(t,n){var i,a;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.p=e.n){case 0:if(s[r(1196)](t)||s.existsSync(n))throw new Error(""[r(1890)](t,r(1663))[r(1890)](n," exists"));e.n=1;break;case 1:return e.p=1,i=""[r(1890)](f(),r(431)).concat(t),h.debug(i),e.n=2,u(i);case 2:return i=""[r(1890)](f(),r(1803))[r(1890)](t,r(479))[r(1890)](n,r(432))[r(1890)](o()),h[r(1363)](i),e.n=3,u(i);case 3:e.n=5;break;case 4:e.p=4,a=e.v,h[r(678)](r(457),a),s.existsSync(t)&&s.unlinkSync(t),s[r(1196)](n)&&s.unlinkSync(n);case 5:return e.a(2)}},e,null,[[1,4]])})))[e(475)](this,arguments)}function l(){var e=t;return(l=_asyncToGenerator(_regenerator().m(function e(t,n,i,a){var o;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.p=e.n){case 0:if(c(a)){e.n=1;break}throw new Error(r(1516));case 1:if(s.existsSync(t))throw new Error(""[r(1890)](t," exists"));e.n=2;break;case 2:return e.p=2,o=""[r(1890)](f()," pkcs12 -export -out ").concat(t,r(1773))[r(1890)](n,r(380))[r(1890)](i,r(782)).concat(a),h[r(1363)]("".concat(f(),r(344))[r(1890)](t," -inkey ")[r(1890)](n,r(380)).concat(i," -passout pass:***")),e.n=3,u(o);case 3:e.n=5;break;case 4:e.p=4,o=e.v,h[r(678)]("Failed to generate p12",o),s[r(1196)](t)&&s[r(606)](t);case 5:return e.a(2)}},e,null,[[2,4]])})))[e(475)](this,arguments)}r[t(1317)]={genCert:function(e,r){return a[t(475)](this,arguments)},genP12:function(e,r,t,n){return l.apply(this,arguments)}}}),pa=Be(function(e){var t=_0x3d6c,i=require(t(648)),a=require(t(1582)),o=ir()[t(1952)],r=At(),s=r[t(1982)],u=r.deleteDirectory;function n(){var e=t;return(n=_asyncToGenerator(_regenerator().m(function e(t,n){return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return n=null!=n?n:i.resolve(i[r(613)](t),r(1393)),e.n=1,o(t);case 1:return e.n=2,s([n]);case 2:return e.n=3,a(t,n);case 3:u(i.resolve(n,"META-INF"));case 4:return e.a(2)}},e)})))[e(475)](this,arguments)}e[t(1669)]=function(e,r){return n[t(475)](this,arguments)}}),va=Be(function(e,r){var v=_0x3d6c,g=require("fs"),m=require(v(648)),a=Ut()[v(1500)],t=At(),y=t[v(1462)],p=t[v(947)],_=t[v(1982)],b=ir(),o=v(1403),w="";function k(){var e=v;return(k=_asyncToGenerator(_regenerator().m(function e(t,n,i,a){var o,s,u,c,f,h,l,d,v,p,_;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return y(n),o=t[r(1800)],s=t.versionType,u=t[r(1598)],v=a.privateKeyFilePath,f=a[r(759)],f=g[r(1434)](f),v=g[r(1434)](v),e.n=1,b[r(564)](f,v);case 1:if(c=e.v,f=b.generatePkgDef(t[r(397)]),h=f.mainPkg,l=f[r(1341)],(d=0<(d=[])[r(847)]?d:b[r(528)](i)).length){e.n=2;break}throw new Error(r(1932));case 2:return b[r(1457)](d,i,h,l),e.n=3,b[r(797)](o,c,h,l,{disableSubpackages:!1});case 3:v=e.v,p=v[r(580)],_=(new Date)[r(1265)]().split("T")[0][r(1936)]("-")[r(1524)](""),w=m[r(1524)](n,""[r(1890)](o,"-")[r(1890)](u,"-")[r(1890)](s,"-")[r(1890)](_,r(2147))),g.writeFileSync(w,p);case 4:return e.a(2)}},e)})))[e(475)](this,arguments)}function x(){var e=v;return(x=_asyncToGenerator(_regenerator().m(function e(t){var n,i;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return e.n=1,(new a)[r(1520)](g[r(1434)](t));case 1:if((n=e.v).files[r(1966)]){e.n=2;break}throw new Error(r(967));case 2:return e.n=3,n[r(330)][r(1966)].async("nodebuffer");case 3:return i=e.v,e.n=4,(new a)[r(1520)](i);case 4:return e.n=5,e.v[r(1491)](o).async(r(2076));case 5:return i=e.v,e.a(2,JSON[r(763)](i)||{})}},e)})))[e(475)](this,arguments)}r[v(1317)]={spkHandler:function(c,f,h,l,d){return new Promise((t=_asyncToGenerator(_regenerator().m(function e(i,a){var o,s,u;return _regenerator().w(function(e){for(var r,t,n=_0x3d6c;;)switch(e.n){case 0:if(g[n(1196)](c)){e.n=1;break}return e.a(2,a(new Error(n(629)[n(1890)](c))));case 1:if(g[n(1196)](f)){e.n=2;break}return e.a(2,a(new Error(n(1150)[n(1890)](f))));case 2:if(g[n(1196)](h)){e.n=3;break}return e.a(2,a(new Error("Can not resolve private key file: "[n(1890)](h))));case 3:return e.n=4,function(){return x.apply(this,arguments)}(c);case 4:if(o=e.v,r=o,t=void 0,t=v,0===Object[t(808)](r)[t(847)])return e.a(2,a(new Error(n(1207))));e.n=5;break;case 5:return s=o[n(1800)],u=m.dirname(c),u=m[n(1524)](u,s),s=m.join(null!=l?l:u,n(1999)),u=m[n(1524)](null!=l?l:u,n(1393)),e.n=6,_([s,u]);case 6:return y(s),e.n=7,p(c,s);case 7:return o[n(1488)]=null!=d?d:o[n(1488)],g.writeFileSync(m[n(1515)](s,"manifest.json"),JSON[n(715)](o,null,2)),e.n=8,function(){return k[v(475)](this,arguments)}(o,u,s,{privateKeyFilePath:h,certFilePath:f});case 8:return e.a(2,i(w))}},e)})),function(e,r){return t[_0x3d6c(475)](this,arguments)}));var t}}}),ba=Be(function(e,r){var a=_0x3d6c,t=ua(),o=t[a(1224)],s=t.resignSpk,t=da(),n=t.genCert,t=t[a(339)],i=At()[a(1886)],u=pa().verifySignHandler,c=bt()[a(2018)],f=va()[a(2041)],h=ir()[a(882)],l=c("index");function d(){var e=a;return(d=_asyncToGenerator(_regenerator().m(function e(t,n){var i;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.p=e.n){case 0:return e.p=0,l[r(1129)](r(560)),e.n=1,o(t,n);case 1:return i=e.v,e.a(2,(l[r(1129)](r(437)),i));case 2:e.p=2,i=e.v,l[r(1304)](r(1134)+i),process[r(775)](-1);case 3:return e.a(2)}},e,null,[[0,2]])})))[e(475)](this,arguments)}function v(){var e=a;return(v=_asyncToGenerator(_regenerator().m(function e(t,n,i,a){var o;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.p=e.n){case 0:return e.p=0,l[r(1129)]("start exec resign spk"),e.n=1,s(t,n,i,a);case 1:l[r(1129)]("Signed successfully."),e.n=3;break;case 2:e.p=2,o=e.v,l.fatal(r(1134)+o),process[r(775)](-1);case 3:return e.a(2)}},e,null,[[0,2]])})))[e(475)](this,arguments)}function p(){var e=a;return(p=_asyncToGenerator(_regenerator().m(function e(t,n){var i;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.p=e.n){case 0:return e.p=0,l[r(1129)](r(1278)),e.n=1,u(t,n);case 1:l[r(1129)](r(1679)),e.n=3;break;case 2:e.p=2,i=e.v,l.info(r(579),i),process[r(775)](-1);case 3:return e.a(2)}},e,null,[[0,2]])})))[e(475)](this,arguments)}function _(){var e=a;return(_=_asyncToGenerator(_regenerator().m(function e(t,n,i,a,o){var s;return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.p=e.n){case 0:return e.p=0,l[r(1129)](r(1592)),e.n=1,f(t,n,i,a,o);case 1:s=e.v,l[r(1129)](r(1212)+s),e.n=3;break;case 2:e.p=2,s=e.v,l[r(1304)](r(2098)+s),process[r(775)](-1);case 3:return e.a(2)}},e,null,[[0,2]])})))[e(475)](this,arguments)}process.on(a(811),function(e){var r=a;l[r(678)](r(752),e)}),process.on(a(1700),function(e,r){var t=a;l[t(678)]("ASCF unhandled rejection at:",r,t(1965),e)}),r[a(1317)]={signPkg:function(e,r){return d[a(475)](this,arguments)},resignPkg:function(e,r,t,n){return v[a(475)](this,arguments)},verifySign:function(e,r){return p[a(475)](this,arguments)},repackHandler:function(e,r,t,n,i){return _[a(475)](this,arguments)},printFp:function(e){var r=a;try{l[r(1129)](r(1275));var t=h(e),n=i(t);l[r(1129)](r(1694)+n)}catch(e){l[r(1304)]("failed to obtain the fingerprint: "+e),process[r(775)](-1)}},genCert:n,genP12:t}}),_Ut4=Ut(),Nh=_Ut4.Command,$h=Jn(),xt=new Nh,_bt7=bt(),Dr=_bt7[_0x186d50(602)],_ba=ba(),jh=_ba[_0x186d50(1659)],zh=_ba[_0x186d50(781)],Hh=_ba[_0x186d50(620)],Mh=_ba[_0x186d50(1398)],Or=_0x186d50(1815);xt[_0x186d50(1533)]($h[_0x186d50(1533)])[_0x186d50(1102)](_0x186d50(670))[_0x186d50(1540)](_0x186d50(1114),"enable debug logging")[_0x186d50(1540)](_0x186d50(439),_0x186d50(1621)),xt.command(_0x186d50(850)).description(_0x186d50(2031)).requiredOption(_0x186d50(584),_0x186d50(815))[_0x186d50(1091)]("--sign-public-key-path [path]",_0x186d50(1384)).requiredOption(_0x186d50(963),_0x186d50(2111))[_0x186d50(1540)]("--output [path]",_0x186d50(1561))[_0x186d50(1540)](_0x186d50(1070),_0x186d50(962))[_0x186d50(1784)]((()=>{var r=_asyncToGenerator(_regenerator().m(function e(t){return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return Dr(t[r(844)],Or),e.n=1,zh(t[r(334)],t[r(419)],t[r(983)],t[r(2102)],t.versionType);case 1:return e.a(2)}},e)}));return function(e){return r[_0x3d6c(475)](this,arguments)}})()),xt[_0x186d50(1702)]("signPkg")[_0x186d50(1102)](_0x186d50(1051))[_0x186d50(1091)](_0x186d50(584),_0x186d50(2143))[_0x186d50(1540)](_0x186d50(2077),_0x186d50(1215)).requiredOption("--sign-private-key-path [path]",_0x186d50(2111))[_0x186d50(1091)](_0x186d50(1264),"public key path")[_0x186d50(1540)](_0x186d50(364),_0x186d50(1561))[_0x186d50(1784)]((()=>{var r=_asyncToGenerator(_regenerator().m(function e(t){return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return Dr(t[r(844)],Or),e.n=1,Mh(t.input,t[r(419)],t[r(983)],t.output);case 1:return e.a(2)}},e)}));return function(e){return r[_0x3d6c(475)](this,arguments)}})()),xt[_0x186d50(1702)](_0x186d50(1659))[_0x186d50(1540)](_0x186d50(439),_0x186d50(1621))[_0x186d50(1102)](_0x186d50(895))[_0x186d50(1091)](_0x186d50(584),"Path of the file to be verified").option("--output [path]",_0x186d50(2120))[_0x186d50(1784)]((()=>{var r=_asyncToGenerator(_regenerator().m(function e(t){return _regenerator().w(function(e){for(var r=_0x3d6c;;)switch(e.n){case 0:return Dr(t[r(844)],Or),e.n=1,jh(t[r(334)],t.output);case 1:return e.a(2)}},e)}));return function(e){return r[_0x3d6c(475)](this,arguments)}})()),xt.command(_0x186d50(620))[_0x186d50(1102)](_0x186d50(1395))[_0x186d50(1540)]("--logging [level]",_0x186d50(1621))[_0x186d50(1091)]("-i, --input <input-directory>")[_0x186d50(1784)](function(e){var r=_0x186d50;Dr(e[r(844)],Or),Hh(e[r(334)])}),xt[_0x186d50(763)](process.argv),global._ascfCliProgram=xt,global[_0x186d50(1820)]=!(null==(_global$_ascfCliProgr=global[_0x186d50(1967)].opts())||!_global$_ascfCliProgr[_0x186d50(1363)]);
|
|
2
|
+
var _global$_ascfCliProgr;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 Be=function(e,t){return function(){return t||e((t={exports:{}}).exports,t),t.exports}},qt=Be(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],"?)"):""}}),G=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}),M=t(function(e,t){var r=w().Argument,n=G().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}),B=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)}}),I=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=B();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=B();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=I(),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=B(),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=B(),_=(t.exports=u,U()),r=(u.ReadableState=i,require("events").EventEmitter,I()),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)}}),X=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()}}),$=t(function(e,t){var i=X();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:$();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)),B=(t(T),new Array(g));function I(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 G(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(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]=G(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-=B[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--)}M(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(B);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(B[o]=n,t=0;t<1<<k[o];t++)D[n++]=o;for(n>>=7;o<g;o++)for(B[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(M(C,p+1,i),t=0;t<g;t++)x[2*t+1]=5,x[2*t]=G(t,5);s=new I(C,w,d+1,p,A),c=new I(x,k,0,g,A),u=new I(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,G=30,M=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 B(e,t){e.pending_buf[e.pending++]=t}function I(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*G+1)),this.bl_tree=new f.Buf16(2*(2*M+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,B(n,31),B(n,139),B(n,8),n.gzhead?(B(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)),B(n,255&n.gzhead.time),B(n,n.gzhead.time>>8&255),B(n,n.gzhead.time>>16&255),B(n,n.gzhead.time>>24&255),B(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),B(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(B(n,255&n.gzhead.extra.length),B(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):(B(n,0),B(n,0),B(n,0),B(n,0),B(n,0),B(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),B(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,I(n,o),0!==n.strstart&&(I(n,e.adler>>>16),I(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));)B(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,B(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,B(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&&(B(n,255&e.adler),B(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?(B(n,255&e.adler),B(n,e.adler>>8&255),B(n,e.adler>>16&255),B(n,e.adler>>24&255),B(n,255&e.total_in),B(n,e.total_in>>8&255),B(n,e.total_in>>16&255),B(n,e.total_in>>24&255)):(I(n,e.adler>>>16),I(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),B=new F.Buf16(16),I=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(B[1]=0,v=1;v<15;v++)B[v+1]=B[v]+T[v];for(y=0;y<n;y++)0!==t[r+y]&&(o[B[t[r+y]]++]=y);if(d=0===e?(D=I=o,19):1===e?(D=R,O-=257,I=j,P-=257,256):(D=L,I=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=I[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 B=J(),I=oe(),P=se(),F=he(),R=de(),j=1,L=2,N=0,z=-2,H=1,r=852,n=592;function G(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 B.Buf16(320),this.work=new B.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 B.Buf32(r),t.distcode=t.distdyn=new B.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 M,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 B.Buf8(e.wsize)),e.wsize<=n?(B.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),B.arraySet(e.window,t,r-n,i,e.wnext),(n-=i)?(B.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 B.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)),B.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=G(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(M=new B.Buf32(512),U=new B.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,M,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=M,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;B.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:I)(r.check,i,h,o-h)),h=c,(r.flags?u:G(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:I)(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&&I(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}),Be=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)}}),Ie=t(function(e,t){var r=Be(),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=Be(),n=C(),i=we(),a=Ie(),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(M(),1).default,Ne=(c.program,c.Command),ze=r(Re())}),Jn=Be(function(e,t){t.exports={name:"ascf-sign-tools",version:"0.0.1",description:"ASCF sign tools",main:"./lib/index.js",scripts:{build:"tsup",dev:"tsup --env.NODE_ENV development",watch:"tsup --watch ./src --sourcemap --no-minify","build:ascf-toolkit":"tsup --minify --dts -d ../ascf-toolkit/src/ascf-sign-tools","dev:ascf-toolkit":"tsup --sourcemap --no-minify -d ../ascf-toolkit/src/ascf-sign-tools","watch:ascf-toolkit":"tsup --watch ./src -d ../ascf-toolkit/src/ascf-sign-tools"},dependencies:{semver:"7.5.4",tar:"7.4.3",express:"4.21.0",typescript:"4.8.4",decompress:"4.2.1","js-base64":"3.7.7",json5:"2.2.3",jsrsasign:"11.0.0",rimraf:"4.4.0",cachedir:"2.4.0",log4js:"6.9.1"},devDependencies:{tsup:"^8.4.0"},bin:{"ascf-sign-tools":"./lib/bin/index.js"}}}),bt=Be(function(j,e){function L(t,r,n,i){if(r&&"object"==_typeof(r)||"function"==typeof r){var a,o=_createForOfIteratorHelper(G(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(M(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,G=Object.getOwnPropertyNames,M=Object.getPrototypeOf,U=Object.prototype.hasOwnProperty,r={},q=r,V={$async:function(){return v},ASCF_LOG_FILE:function(){return $},AscfBuilder:function(){return Bn},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 B},clearAscfDepDirCache:function(){return Zr},configureLogger:function(){return ee},devicesLegacyShared:function(){return be},execSafe:function(){return Gt},findAvailablePort:function(){return Vt},fixHvigorPath:function(){return Yr},fportCmd:function(){return Xe},fportListCmd:function(){return Ye},fportRmCmd:function(){return Je},getAdbPath:function(){return Ge},getAscfDebuggerPidFile:function(){return vn},getAscfDepDir:function(){return Xr},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 Bt},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 Be},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 $e},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",X=function(){return J||"info"},$=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){X=e}function re(){return X}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 Be(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]={}),Be(e[r],t[r])):e[r]=t[r]}return e}var r=t(require("cachedir")),e=t(require("path")),Ie=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(Gt("".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:Ie.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 Ge(){return Me.apply(this,arguments)}function Me(){return(Me=_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,Ge();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,Xe=e.fportCmd,$e=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 Bt(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}),It=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=Bt(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 Gt(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 Mt=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 Mt.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=Mt.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,Xt="com.huawei.ascf.sample",$t="legacy",C="service",r=i("LegacyDebugPortManager"),e=Zt({logger:r,fportListCmd:Ye,fportRmCmd:Je,isPortReachable:Ut,fportCmd:Xe}),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,Xt)},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,Br,Ir,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===$t}},{key:"getPortManager",value:function(){return(this.isLegacy()?Qt:Jt).getInstance()}},{key:"status",value:(Ir=_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 Ir.apply(this,arguments)})},{key:"start",value:(Br=_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 Br.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===$t?Xt: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===$t)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=It(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")),Gr=t(require("crypto")),Mr=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 Gr.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 Xr(e){return $r.apply(this,arguments)}function $r(){return($r=_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,Xr(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=X)?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 B(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=Gt(t);if(t&&Mr.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,B(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,B(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,B(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,B(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){It(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=(I&&clearInterval(I),0);I=setInterval(function(){var e=a<o,t=O.existsSync(r);(e||t)&&(clearInterval(I),I=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 I=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"),Bn=(_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)})}])),In=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=In.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 Gn,Mn,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:(Mn=_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 Mn.apply(this,arguments)})},{key:"getDeviceId",value:(Gn=_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 Gn.apply(this,arguments)})}]),Yn=_defineProperty(_defineProperty({},$t,function(e){return new Kn(e)}),"hos",function(e){return new Bn(e)});function Jn(e){return _classCallCheck(this,Jn),_callSuper(this,Jn,[e])}function Xn(){return(Xn=_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 $n,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 Xn.apply(this,arguments)}(t,Yn))},e)})),function(e){return Qn.apply(this,arguments)})}]),ti=_createClass(function e(){_classCallCheck(this,e)},null,[{key:"create",value:($n=_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 $n.apply(this,arguments)})}])}),Qt=Be(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}}}),Yr=Be(function(e,t){var u=Qt(),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)}}}),xs=Be(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}),Is=Be(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}),Ps=Be(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}),Xr=Be(function(e,t){var r=xs(),n=Is(),i=Ps();t.exports={Base64:r,Hex:n,CRC32:i}}),en=Be(function(e,t){var s=require("crypto"),c=require("http"),u=Qt(),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)}}}),nn=Be(function(e,t){var y=Qt(),h=Yr(),r=require("js-base64"),o=r.encode,d=r.Base64,s=require("http"),n=require("fs"),p=require("crypto"),a=Xr(),g=en(),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 B(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=B(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=B(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)}}}),ir=Be(function(e,t){var s=require("path"),p=require("fs"),g=require("crypto"),m=qt().jszip,_=nn(),l=require("jsrsasign"),f=Xr(),v=Yr(),y=nn(),h=en(),b=(0,bt().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=Be(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,bt().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)}}}),hn=Be(function(e,t){var n=require("path"),r=require("os"),i=Et().checkOpenSSL,a=r.platform(),r=bt(),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)}}}),Ea=Be(function(j,e){var h,l=require("crypto"),d=require("path"),p=require("fs"),r=qt().jszip,g=ir(),t=bt().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=hn().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,I(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 B(){return(B=_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,I(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 I(e){var t=Qt(),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 B.apply(this,arguments)}}}),Da=Be(function(e,t){require("path");var s=require("fs"),r=bt().getLogger,n=Et(),c=n.executeCommand,u=n.validatePassword,n=hn(),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)}}}),Ia=Be(function(e){var n=require("path"),i=require("decompress"),a=ir().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)}}),Ta=Be(function(e,t){var m=require("fs"),_=require("path"),i=qt().jszip,r=Et(),v=r.mkdirsSync,h=r.extractspk,d=r.clearResource,y=ir(),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}}}),La=Be(function(e,t){var r=Ea(),i=r.signSpk,o=r.resignSpk,r=Da(),n=r.genCert,r=r.genP12,a=Et().formatHexString,s=Ia().verifySignHandler,c=bt().getLogger,u=Ta().spkHandler,l=ir().getCertString,f=c("index");function h(){return(h=_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,f.info("start exec sign spk"),e.n=1,i(t,r);case 1:return n=e.v,e.a(2,(f.info("Signed successfully."),n));case 2:e.p=2,n=e.v,f.fatal("Signing failed: "+n),process.exit(-1);case 3:return e.a(2)}},e,null,[[0,2]])}))).apply(this,arguments)}function d(){return(d=_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,f.info("start exec resign spk"),e.n=1,o(t,r,n,i);case 1:f.info("Signed successfully."),e.n=3;break;case 2:e.p=2,a=e.v,f.fatal("Signing failed: "+a),process.exit(-1);case 3:return e.a(2)}},e,null,[[0,2]])}))).apply(this,arguments)}function p(){return(p=_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,f.info("start exec verify sign"),e.n=1,s(t,r);case 1:f.info("Signature verification succeeded."),e.n=3;break;case 2:e.p=2,n=e.v,f.info("Failed to verify the signature: ",n),process.exit(-1);case 3:return e.a(2)}},e,null,[[0,2]])}))).apply(this,arguments)}function g(){return(g=_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,f.info("start exec repack"),e.n=1,u(t,r,n,i,a);case 1:o=e.v,f.info("exec repack success, repack package path: "+o),e.n=3;break;case 2:e.p=2,o=e.v,f.fatal("repack failed: "+o),process.exit(-1);case 3:return e.a(2)}},e,null,[[0,2]])}))).apply(this,arguments)}process.on("uncaughtException",function(e){f.error("ASCF uncaught error",e)}),process.on("unhandledRejection",function(e,t){f.error("ASCF unhandled rejection at:",t,"reason:",e)}),t.exports={signPkg:function(e,t){return h.apply(this,arguments)},resignPkg:function(e,t,r,n){return d.apply(this,arguments)},verifySign:function(e,t){return p.apply(this,arguments)},repackHandler:function(e,t,r,n,i){return g.apply(this,arguments)},printFp:function(e){try{f.info("start exec print fingerprints");var t=l(e),r=a(t);f.info("exec print fingerprints success, fingerprints info: "+r)}catch(e){f.fatal("failed to obtain the fingerprint: "+e),process.exit(-1)}},genCert:n,genP12:r}}),_qt4=qt(),Yh=_qt4.Command,Xh=Jn(),At=new Yh,_bt7=bt(),Dr=_bt7.setLoggerConfig,_La=La(),Qh=_La.verifySign,ed=_La.repackHandler,td=_La.printFp,rd=_La.resignPkg,Or="ascf-sign-tools";At.version(Xh.version).description("quick service signature packaging tool").option("--debug","enable debug logging").option("--logging [level]","Setting the log level"),At.command("repack").description("Quick service resignature").requiredOption("-i, --input <input-directory>","spk file path").requiredOption("--sign-public-key-path [path]","public key path").requiredOption("--sign-private-key-path [path]","private key path").option("--output [path]","intermediate output path").option("--version-type [type]","version type").action((()=>{var t=_asyncToGenerator(_regenerator().m(function e(t){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return Dr(t.logging,Or),e.n=1,ed(t.input,t.signPublicKeyPath,t.signPrivateKeyPath,t.output,t.versionType);case 1:return e.a(2)}},e)}));return function(e){return t.apply(this,arguments)}})()),At.command("signPkg").description("Signature Packing").requiredOption("-i, --input <input-directory>","build path").option("--disable-subpackages [true or false]","disable subpackages").requiredOption("--sign-private-key-path [path]","private key path").requiredOption("--sign-public-key-path [path]","public key path").option("--output [path]","intermediate output path").action((()=>{var t=_asyncToGenerator(_regenerator().m(function e(t){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return Dr(t.logging,Or),e.n=1,rd(t.input,t.signPublicKeyPath,t.signPrivateKeyPath,t.output);case 1:return e.a(2)}},e)}));return function(e){return t.apply(this,arguments)}})()),At.command("verifySign").option("--logging [level]","Setting the log level").description("Quick service verify sign").requiredOption("-i, --input <input-directory>","Path of the file to be verified").option("--output [path]","Output path").action((()=>{var t=_asyncToGenerator(_regenerator().m(function e(t){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return Dr(t.logging,Or),e.n=1,Qh(t.input,t.output);case 1:return e.a(2)}},e)}));return function(e){return t.apply(this,arguments)}})()),At.command("printFp").description("View Fingerprint").option("--logging [level]","Setting the log level").requiredOption("-i, --input <input-directory>").action(function(e){Dr(e.logging,Or),td(e.input)}),At.parse(process.argv),global._ascfCliProgram=At,global._ascfDebug=!(null==(_global$_ascfCliProgr=global._ascfCliProgram.opts())||!_global$_ascfCliProgr.debug);
|