@atomicservice/ascf-toolkit 1.0.9 → 1.0.11
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-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 +8 -8
- package/lib/ascf-base/index.js +0 -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
package/lib/ascf-base/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var _0x26760e=_0x3edd;function _callSuper(e,r,n){var t=_0x3edd;return r=_getPrototypeOf(r),_possibleConstructorReturn(e,_isNativeReflectConstruct()?Reflect.construct(r,n||[],_getPrototypeOf(e)[t(721)]):r[t(639)](e,n))}function _possibleConstructorReturn(e,r){var n=_0x3edd;if(r&&(n(760)==_typeof(r)||n(587)==typeof r))return r;if(void 0!==r)throw new TypeError(n(900));return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError(_0x3edd(606));return e}function _isNativeReflectConstruct(){var e=_0x3edd;try{var r=!Boolean[e(744)][e(814)][e(581)](Reflect[e(512)](Boolean,[],function(){}))}catch(e){}return(_isNativeReflectConstruct=function(){return!!r})()}function _getPrototypeOf(e){var n=_0x3edd;return(_getPrototypeOf=Object[n(902)]?Object.getPrototypeOf[n(967)]():function(e){var r=n;return e[r(788)]||Object[r(819)](e)})(e)}function _inherits(e,r){var n=_0x3edd;if(n(587)!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");e[n(744)]=Object[n(497)](r&&r[n(744)],{constructor:{value:e,writable:!0,configurable:!0}}),Object[n(733)](e,n(744),{writable:!1}),r&&_setPrototypeOf(e,r)}function _setPrototypeOf(e,r){var n=_0x3edd;return(_setPrototypeOf=Object[n(902)]?Object[n(902)].bind():function(e,r){return e[n(788)]=r,e})(e,r)}function _slicedToArray(e,r){return _arrayWithHoles(e)||_iterableToArrayLimit(e,r)||_unsupportedIterableToArray(e,r)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(_0x3edd(658))}function _iterableToArrayLimit(e,r){var n=_0x3edd,t=null==e?null:n(699)!=typeof Symbol&&e[Symbol[n(509)]]||e["@@iterator"];if(null!=t){var a,o,i,u,s=[],c=!0,f=!1;try{if(i=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;c=!1}else for(;!(c=(a=i[n(581)](t))[n(980)])&&(s[n(934)](a[n(543)]),s.length!==r);c=!0);}catch(e){f=!0,o=e}finally{try{if(!c&&null!=t.return&&(u=t[n(942)](),Object(u)!==u))return}finally{if(f)throw o}}return s}}function _arrayWithHoles(e){if(Array[_0x3edd(717)](e))return e}function ownKeys(n,e){var r,t=_0x3edd,a=Object[t(507)](n);return Object[t(678)]&&(r=Object[t(678)](n),e&&(r=r[t(546)](function(e){var r=t;return Object[r(827)](n,e)[r(703)]})),a[t(934)].apply(a,r)),a}function _objectSpread(r){for(var n=_0x3edd,e=1;e<arguments[n(585)];e++){var t=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(t),!0)[n(867)](function(e){_defineProperty(r,e,t[e])}):Object[n(809)]?Object.defineProperties(r,Object[n(809)](t)):ownKeys(Object(t))[n(867)](function(e){Object[n(733)](r,e,Object.getOwnPropertyDescriptor(t,e))})}return r}function _defineProperty(e,r,n){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function _regenerator(){var h,p=_0x3edd,e="function"==typeof Symbol?Symbol:{},r=e[p(509)]||p(766),n=e.toStringTag||p(869);function t(e,r,n,t){var a,o,i,u,s,c,f,_,l,d=p,r=r&&r[d(744)]instanceof y?r:y,d=Object[d(497)](r.prototype);return _regeneratorDefine2(d,"_invoke",(a=e,o=n,f=t||[],_=!1,l={p:c=0,n:0,v:h,a:v,f:v.bind(h,4),d:function(e,r){return i=e,u=0,s=h,l.n=r,g}},function(e,r,n){var t=_0x3edd;if(1<c)throw TypeError("Generator is already running");for(_&&1===r&&v(r,n),u=r,s=n;(m=u<2?h:s)||!_;){i||(u?u<3?(1<u&&(l.n=-1),v(u,s)):l.n=s:l.v=s);try{if(c=2,i){if(u||(e=t(693)),m=i[e]){if(!(m=m[t(581)](i,s)))throw TypeError(t(524));if(!m[t(980)])return m;s=m[t(543)],u<2&&(u=0)}else 1===u&&(m=i.return)&&m[t(581)](i),u<2&&(s=TypeError(t(660)+e+t(880)),u=1);i=h}else if((m=(_=l.n<0)?s:a[t(581)](o,l))!==g)break}catch(e){i=h,u=1,s=e}finally{c=1}}return{value:m,done:_}}),!0),d;function v(e,r){var n=_0x3edd;for(u=e,s=r,m=0;!_&&c&&!t&&m<f[n(585)];m++){var t,a=f[m],o=l.p,i=a[2];3<e?(t=i===r)&&(s=a[(u=a[4])?5:u=3],a[4]=a[5]=h):a[0]<=o&&((t=e<2&&o<a[1])?(u=0,l.v=r,l.n=a[1]):o<i&&(t=e<3||a[0]>r||i<r)&&(a[4]=e,a[5]=r,l.n=i,u=0))}if(t||1<e)return g;throw _=!0,r}}var g={};function y(){}function a(){}function o(){}var m=Object[p(819)],e=[][r]?m(m([][r]())):(_regeneratorDefine2(m={},r,function(){return this}),m),i=o[p(744)]=y[p(744)]=Object[p(497)](e);function u(e){var r=p;return Object[r(902)]?Object[r(902)](e,o):(e[r(788)]=o,_regeneratorDefine2(e,n,r(685))),e[r(744)]=Object[r(497)](i),e}return a[p(744)]=o,_regeneratorDefine2(i,"constructor",o),_regeneratorDefine2(o,p(721),a),a.displayName=p(685),_regeneratorDefine2(o,n,p(685)),_regeneratorDefine2(i),_regeneratorDefine2(i,n,p(583)),_regeneratorDefine2(i,r,function(){return this}),_regeneratorDefine2(i,p(837),function(){return p(970)}),(_regenerator=function(){return{w:t,m:u}})()}function _regeneratorDefine2(e,r,n,t){var o=Object[_0x3edd(733)];try{o({},"",{})}catch(e){o=0}(_regeneratorDefine2=function(e,r,n,t){function a(r,n){_regeneratorDefine2(e,r,function(e){return this[_0x3edd(636)](r,n,e)})}r?o?o(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(a("next",0),a("throw",1),a("return",2))})(e,r,n,t)}function asyncGeneratorStep(e,r,n,t,a,o,i){var u=_0x3edd;try{var s=e[o](i),c=s.value}catch(e){return void n(e)}s.done?r(c):Promise[u(620)](c)[u(722)](t,a)}function _asyncToGenerator(s){return function(){var e=this,u=arguments;return new Promise(function(r,n){var t=_0x3edd,a=s[t(639)](e,u);function o(e){asyncGeneratorStep(a,r,n,o,i,"next",e)}function i(e){asyncGeneratorStep(a,r,n,o,i,t(989),e)}o(void 0)})}}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError(_0x3edd(724))}function _iterableToArray(e){var r=_0x3edd;if(r(699)!=typeof Symbol&&null!=e[Symbol[r(509)]]||null!=e[r(766)])return Array[r(853)](e)}function _arrayWithoutHoles(e){if(Array[_0x3edd(717)](e))return _arrayLikeToArray(e)}function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var n=_0x3edd,t=0;t<r.length;t++){var a=r[t];a.enumerable=a[n(703)]||!1,a[n(816)]=!0,n(543)in a&&(a[n(755)]=!0),Object[n(733)](e,_toPropertyKey(a.key),a)}}function _createClass(e,r,n){var t=_0x3edd;return r&&_defineProperties(e[t(744)],r),n&&_defineProperties(e,n),Object.defineProperty(e,t(744),{writable:!1}),e}function _toPropertyKey(e){var r=_0x3edd,e=_toPrimitive(e,r(812));return r(771)==_typeof(e)?e:e+""}function _toPrimitive(e,r){var n=_0x3edd;if(n(760)!=_typeof(e)||!e)return e;var t=e[Symbol[n(569)]];if(void 0===t)return(n(812)===r?String:Number)(e);t=t[n(581)](e,r||n(486));if(n(760)!=_typeof(t))return t;throw new TypeError(n(904))}function _createForOfIteratorHelper(e,r){var n,t,a,o,i,u=_0x3edd,s="undefined"!=typeof Symbol&&e[Symbol[u(509)]]||e[u(766)];if(s)return o=!(a=!0),{s:function(){s=s[u(581)](e)},n:function(){var e=u,r=s[e(693)]();return a=r[e(980)],r},e:function(e){o=!0,t=e},f:function(){var e=u;try{a||null==s[e(942)]||s[e(942)]()}finally{if(o)throw t}}};if(Array[u(717)](e)||(s=_unsupportedIterableToArray(e))||r&&e&&u(617)==typeof e[u(585)])return s&&(e=s),i=0,{s:r=function(){},n:(n=function(){return i>=e[u(585)]?{done:!0}:{done:!1,value:e[i++]}},c.toString=function(){return n[_0x3edd(837)]()},c),e:function(e){throw e},f:r};throw new TypeError(u(742));function c(){return n[_0x3edd(639)](this,arguments)}}function _unsupportedIterableToArray(e,r){var n,t=_0x3edd;if(e)return t(812)==typeof e?_arrayLikeToArray(e,r):(n={}[t(837)].call(e)[t(698)](8,-1),t(782)===n&&e[t(721)]&&(n=e[t(721)][t(727)]),t(684)===n||"Set"===n?Array[t(853)](e):t(673)===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/[t(632)](n)?_arrayLikeToArray(e,r):void 0)}function _arrayLikeToArray(e,r){var n=_0x3edd;(null==r||r>e[n(585)])&&(r=e[n(585)]);for(var t=0,a=Array(r);t<r;t++)a[t]=e[t];return a}function _typeof(e){var n=_0x3edd;return(_typeof="function"==typeof Symbol&&n(771)==typeof Symbol[n(509)]?function(e){return typeof e}:function(e){var r=n;return e&&r(587)==typeof Symbol&&e[r(721)]===Symbol&&e!==Symbol.prototype?r(771):typeof e})(e)}(()=>{for(var e=_0x3edd,r=_0x2dd8();;)try{if(783266==-parseInt(e(793))*(-parseInt(e(484))/2)+-parseInt(e(536))/3+parseInt(e(783))/4+-parseInt(e(908))/5+parseInt(e(1003))/6*(parseInt(e(774))/7)+parseInt(e(683))/8+parseInt(e(588))/9*(-parseInt(e(922))/10))break;r.push(r.shift())}catch(e){r.push(r.shift())}})();var Ar=Object.create,de=Object[_0x26760e(733)],Lr=Object[_0x26760e(827)],_r=Object.getOwnPropertyNames,Ir=Object[_0x26760e(819)],Tr=Object[_0x26760e(744)][_0x26760e(861)],kr=function(e,r){for(var n in r)de(e,n,{get:r[n],enumerable:!0})},gt=function(n,t,a,o){var i=_0x26760e;if(t&&_typeof(t)==i(760)||typeof t==i(587)){var u,r=_createForOfIteratorHelper(_r(t));try{for(r.s();!(u=r.n()).done;)(()=>{var e=i,r=u[e(543)];Tr[e(581)](n,r)||r===a||de(n,r,{get:function(){return t[r]},enumerable:!(o=Lr(t,r))||o[e(703)]})})()}catch(e){r.e(e)}finally{r.f()}}return n},h=function(e,r,n){var t=_0x26760e;return n=null!=e?Ar(Ir(e)):{},gt(!r&&e&&e[t(797)]?n:de(n,t(486),{value:e,enumerable:!0}),e)},Or=function(e){return gt(de({},_0x26760e(797),{value:!0}),e)},Is={},q=(kr(Is,{$async:function(){return a},ASCF_LOG_FILE:function(){return Nr},AscfBuilder:function(){return ge},AscfDebugger:function(){return fe},AsyncResult:function(){return Ge},BUILD_MODE_DEBUG:function(){return br},BUILD_MODE_RELEASE:function(){return pt},BUILD_TARGET_AS:function(){return qr},BUILD_TARGET_QS:function(){return ze},BuildProcessFactory:function(){return Re},DebuggerProcessFactory:function(){return Ne},ERROR_MSG:function(){return H},HOS_DEVICE:function(){return oe},LEGACY_DEVICE:function(){return U},ascfCompile:function(){return ft},ascfConvert:function(){return Ps},ascfGenCert:function(){return Ds},ascfGenP12:function(){return xs},ascfRun:function(){return me},clearAscfDepDirCache:function(){return gs},configureLogger:function(){return jr},devicesLegacyShared:function(){return Ye},execSafe:function(){return Q},findAvailablePort:function(){return ae},fixHvigorPath:function(){return ys},getAscfDebuggerPidFile:function(){return vr},getAscfDepDir:function(){return hr},getBundleInfo:function(){return jt},getDebugServerInfo:function(){return Es},getDebugees:function(){return it},getDevEcoSdkHome:function(){return We},getDevEcoToolsDir:function(){return Pt},getHdcPath:function(){return F},getHvigorwPath:function(){return A},getLogLevelGetter:function(){return Ve},getLogger:function(){return y},getNodePath:function(){return Fe},getNpmPath:function(){return Ue},getOhpmPath:function(){return he},getPath:function(){return T},getProjectConfig:function(){return Ze},getSpkInfo:function(){return De},hasHvigor:function(){return dr},hdcDeviceShared:function(){return Xe},hdcShared:function(){return Qe},installSpkShared:function(){return lt},isPortReachable:function(){return W},maskLast4:function(){return se},mergeJson:function(){return Mt},normalizeBuildMode:function(){return Oe},openInBrowser:function(){return pe},optArgIf:function(){return $s},parseJsonFile:function(){return k},parseJsonSafe:function(){return be},portManagerShared:function(){return ce},setLogLevelGetter:function(){return Br},setLoggerConfig:function(){return Mr},startDebugServerCmd:function(){return Ss},stopDebugServer:function(){return wr},tryHdcPortReversing:function(){return Ke}}),module[_0x26760e(872)]=Or(Is),h(require(_0x26760e(780)))),je=h(require("path")),Be=h(require(_0x26760e(562))),dt={isRelease:!1},Hr=["debug",_0x26760e(847),_0x26760e(843),_0x26760e(998),_0x26760e(938)],Rr="AscfToolkit",ht=_0x26760e(847),yt=function(){return ht||_0x26760e(847)},Nr=je.resolve((0,Be[_0x26760e(486)])("ascf-cache"),_0x26760e(964));function Mr(e){var r=_0x26760e,e=Gr(e);ht=e,q[r(1011)]({appenders:{default:{type:r(490),layout:{type:r(751),pattern:r(626)}},"debug-log-file":{type:r(622),filename:je[r(620)]((0,Be[r(486)])("ascf-cache"),r(964)),maxLogSize:10485760,backups:9,layout:{type:r(751),pattern:r(986)}}},categories:{default:{appenders:[r(486)],level:e},AscfToolkit:{appenders:[r(723)],level:"debug"}}})}function jr(e){q[_0x26760e(1011)](e)}function Br(e){yt=e}function Ve(){return yt}function Vr(e){var r=_0x26760e,n="";if(dt.isRelease){for(var t=arguments[r(585)],a=new Array(1<t?t-1:0),o=1;o<t;o++)a[o-1]=arguments[o];a[r(896)](e);for(var i=0;i<a[r(585)];i++){var u="";typeof a[i]==r(812)&&(u=a[i]),(u=a[i]instanceof Error?a[i][r(502)]:u)[r(979)]("\n")?n+=String(u).split("\n")[1]:n+=String(u)[r(971)]("\n")[0]}}return n}function Gr(e){var r=_0x26760e;return e&&Hr[r(605)](e[r(589)]())?e.toLowerCase():r(847)}var Me=(()=>{var o=_0x26760e;return _createClass(function e(r){var n=_0x3edd;_classCallCheck(this,e),this[n(849)]=r,this[n(992)]=q[n(981)](r),global[n(668)]&&(this.fileLogger=q[n(981)](Rr))},[{key:"doLog",value:function(e,r,n){var t,a=_0x3edd,o=3<arguments[a(585)]&&void 0!==arguments[3]&&arguments[3],i="";""!==(i="info"!==e?Vr[a(639)](void 0,[r].concat(_toConsumableArray(n))):i)?(this[a(992)][e](i),null!=(t=this[a(487)])&&t[e](i)):((t=this.logger)[e].apply(t,[r][a(765)](_toConsumableArray(n))),null!=(i=this.fileLogger)&&i[e][a(639)](i,[r][a(765)](_toConsumableArray(n)))),o&&process.exit(1)}},{key:"info",value:function(e){for(var r=arguments[_0x3edd(585)],n=new Array(1<r?r-1:0),t=1;t<r;t++)n[t-1]=arguments[t];return this.doLog("info",e,n)}},{key:o(843),value:function(e){for(var r=o,n=arguments.length,t=new Array(1<n?n-1:0),a=1;a<n;a++)t[a-1]=arguments[a];return this[r(865)](r(843),e,t)}},{key:o(480),value:function(e){for(var r=o,n=arguments[r(585)],t=new Array(1<n?n-1:0),a=1;a<n;a++)t[a-1]=arguments[a];return this[r(865)](r(480),e,t)}},{key:o(998),value:function(e){for(var r=o,n=arguments[r(585)],t=new Array(1<n?n-1:0),a=1;a<n;a++)t[a-1]=arguments[a];return this[r(865)](r(998),e,t)}},{key:o(938),value:function(e){for(var r=o,n=arguments[r(585)],t=new Array(1<n?n-1:0),a=1;a<n;a++)t[a-1]=arguments[a];return this.doLog(r(938),e,t,!0)}}])})();function y(e){return new Me(e)}var Ge=_createClass(function e(){_classCallCheck(this,e)});function a(e){return _a.apply(this,arguments)}function _a(){var e=_0x26760e;return(_a=_asyncToGenerator(_regenerator().m(function e(r){var n;return _regenerator().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,r;case 1:return n=e.v,e.a(2,{data:n});case 2:return e.p=2,e.a(2,{err:e.v})}},e,null,[[0,2]])})))[e(639)](this,arguments)}var et=require(_0x26760e(506)),tt=h(require("fs")),vt=h(require("fs")),bt=h(require("path")),Fr=y(_0x26760e(836)),wt=!1,re=process.platform===_0x26760e(917),Ur=_0x26760e(629),Wr=_0x26760e(781),Yr=re?Wr:Ur;function Pt(){var e=_0x26760e,r=process[e(579)][e(650)]||process[e(579)][e(844)]||process[e(579)].ASCF_DEVECO_SDK_HOME,r=r?r.split(";")[0][e(649)]()+"/../tools/":Yr;return wt||vt[e(773)](r)||(wt=!0,Fr.error(e(582))),r}function T(){for(var e=_0x26760e,r=arguments[e(585)],n=new Array(r),t=0;t<r;t++)n[t]=arguments[t];var a=Pt(),a=bt[e(969)][e(639)](bt,[a][e(765)](n));return re&&a[e(605)](" ")?'"'[e(765)](a,'"'):a}function Fe(){var e=_0x26760e;return T(e(519),re?"node.exe":e(510))}function Ue(){var e=_0x26760e;return T(e(519),e(re?667:704))}function he(){var e=_0x26760e;return T(e(976),e(824),e(976))}function A(){var e=_0x26760e;return T(e(962),e(824),e(848))}function We(){var e=_0x26760e;return T("../sdk")[e(817)](/"/g,"")}function F(){var e=_0x26760e;return T(e(958),re?"hdc.exe":e(1012))}var ye=h(require(_0x26760e(709))),Je=require("os");function Ye(e){var t=_0x26760e,f=e[t(992)],_=e[t(553)];function r(){return(r=_asyncToGenerator(_regenerator().m(function e(){var n;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return e.n=1,a(_([r(609),"-l"]));case 1:return n=e.v,e.a(2,n[r(948)]?(f[r(998)](r(916)+n[r(948)]),[]):null==(n=n[r(623)])||null==(n=n.trim())||null==(n=n[r(971)]("\n"))?void 0:n.map(function(e){return e[r(649)]()}))}},e)}))).apply(this,arguments)}function n(){var e=t;return(n=_asyncToGenerator(_regenerator().m(function e(n){var t;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return e.n=1,a(_(["-s",n,r(890),r(511),r(1010)]));case 1:return t=e.v,e.a(2,t[r(948)]||/(\[Fail\])/[r(632)](t[r(623)])?(f[r(998)](r(750),t.err),r(515)):null==(t=t[r(623)])?void 0:t[r(649)]())}},e)})))[e(639)](this,arguments)}function l(e,r){return o[t(639)](this,arguments)}function o(){var e=t;return(o=_asyncToGenerator(_regenerator().m(function e(n,t){var o,i,u,s,c=arguments;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return i=2<c[r(585)]&&void 0!==c[2]?c[2]:0,u=Math[r(926)](64512*Math.random())+1024,e.n=1,a(_(["-s",n,"reverse",r(646)[r(765)](u),r(646)[r(765)](t)]));case 1:if((s=e.v).err)return f[r(843)](r(508)[r(765)](u,r(988))[r(765)](t),s[r(948)]),e.a(2);e.n=2;break;case 2:return e.a(2,s[r(623)]&&10!==i?null!=(o=s[r(623)])&&o[r(605)](String(u))?u:l(n,t,++i):0)}},e)})))[e(639)](this,arguments)}var i=t(695);function u(){var e=t;return(u=_asyncToGenerator(_regenerator().m(function e(n,t){return _regenerator().w(function(e){for(var r=_0x3edd;;)if(0===e.n)return e.a(2,_(["-s",n,r(890),"am",r(856),"-n",i,"-S",r(616),r(769),t]))},e)})))[e(639)](this,arguments)}function s(){var e=t;return(s=_asyncToGenerator(_regenerator().m(function e(n,t,a){return _regenerator().w(function(e){for(var r=_0x3edd;;)if(0===e.n)return e.a(2,_(["-s",n,r(890),"am",r(856),"-n",i,"-S",r(616),r(921),r(832),r(616),r(576),a,r(616),r(769),t,"--es",r(674),t.split(r(574))[1]]))},e)})))[e(639)](this,arguments)}function c(){var e=t;return(c=_asyncToGenerator(_regenerator().m(function e(n){return _regenerator().w(function(e){for(var r=_0x3edd;;)if(0===e.n)return e.a(2,_(["-s",n,"forward",r(959)],{sensitive:!0}))},e)})))[e(639)](this,arguments)}function d(){var e=t;return(d=_asyncToGenerator(_regenerator().m(function e(n,t){return _regenerator().w(function(e){for(var r=_0x3edd;;)if(0===e.n)return e.a(2,_(["-s",n,r(821),r(852),t]))},e)})))[e(639)](this,arguments)}function v(){var e=t;return(v=_asyncToGenerator(_regenerator().m(function e(n,t,a){return _regenerator().w(function(e){for(var r=_0x3edd;;)if(0===e.n)return e.a(2,_(["-s",n,r(821),t,a]))},e)})))[e(639)](this,arguments)}function h(){var e=t;return(h=_asyncToGenerator(_regenerator().m(function e(n,t,a){return _regenerator().w(function(e){for(var r=_0x3edd;;)if(0===e.n)return e.a(2,_(["-s",n,r(554),r(646)[r(765)](a),r(870)[r(765)](t)]))},e)})))[e(639)](this,arguments)}function p(){var e=t;return(p=_asyncToGenerator(_regenerator().m(function e(n,t){return _regenerator().w(function(e){for(var r=_0x3edd;;)if(0===e.n)return e.a(2,_(["-s",n,r(554),"--remove",t]))},e)})))[e(639)](this,arguments)}function g(){var e=t;return(g=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(var r=_0x3edd;;)if(0===e.n)return e.a(2,_([r(609),"-l"],{sensitive:!0}))},e)})))[e(639)](this,arguments)}function y(){var e=t;return(y=_asyncToGenerator(_regenerator().m(function e(n){return _regenerator().w(function(e){for(var r=_0x3edd;;)if(0===e.n)return e.a(2,_(["-s",n,r(890),"getprop",r(677)]))},e)})))[e(639)](this,arguments)}function m(){return(m=_asyncToGenerator(_regenerator().m(function e(n,t){var o,i;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return o=1,e.n=1,a(_(["-s",n,r(890),'"dumpsys activity activities | grep mResumedActivity"']));case 1:return i=e.v,e.a(2,(i[r(623)]&&(o=null!=(i=Number(null==(i=/AscfContainerActivity(\d+)/[r(920)](i[r(623)]))?void 0:i[1]))?i:1),_(["-s",n,r(890),'"ps -ef | grep '[r(765)](t,":ascf").concat(o,' | grep -v render | grep -v grep"')])))}},e)}))).apply(this,arguments)}return{listTargets:function(){return r[t(639)](this,arguments)},getDeviceName:function(e){return n[t(639)](this,arguments)},tryAdbPortReversing:l,startHostPkg:function(e,r){return u.apply(this,arguments)},startHostPkgUrl:function(e,r,n){return s[t(639)](this,arguments)},fportListCmd:function(e){return c[t(639)](this,arguments)},fportRmCmd:function(e,r){return d[t(639)](this,arguments)},fportCmd:function(e,r,n){return v[t(639)](this,arguments)},rportCmd:function(e,r,n){return h[t(639)](this,arguments)},rportRmCmd:function(e,r){return p[t(639)](this,arguments)},getDevicesCmd:function(){return g[t(639)](this,arguments)},getLegacyDeviceName:function(e){return y.apply(this,arguments)},getLegacyProcess:function(e,r){return m[t(639)](this,arguments)}}}function _0x3edd(e,r){var n=_0x2dd8();return(_0x3edd=function(e,r){return n[e-=456]})(e,r)}var Jr=y(_0x26760e(659));function Kr(){var e=_0x26760e;return(0,Je.platform)()===e(917)?ye.default.join(__dirname,e(637)):(0,Je[e(461)])()===e(689)?ye.default[e(969)](__dirname,e(739)):ye[e(486)][e(969)](__dirname,e(665))}function Dt(e,r){return _Dt[_0x26760e(639)](this,arguments)}function _Dt(){var e=_0x26760e;return(_Dt=_asyncToGenerator(_regenerator().m(function e(r,n){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,L(Kr(),r,n))},e)})))[e(639)](this,arguments)}var _Ye=Ye({logger:Jr,runAdbCmdAsync:Dt}),Ws=_Ye.listTargets,Ys=_Ye[_0x26760e(746)],xt=_Ye[_0x26760e(603)],St=_Ye[_0x26760e(459)],Et=_Ye[_0x26760e(899)],Ct=_Ye.fportListCmd,$t=_Ye[_0x26760e(594)],At=_Ye[_0x26760e(714)],Js=_Ye[_0x26760e(633)],Lt=_Ye[_0x26760e(785)],_t=_Ye[_0x26760e(1013)],It=_Ye[_0x26760e(997)],Tt=_Ye.getLegacyProcess;function kt(e,r){return _kt[_0x26760e(639)](this,arguments)}function _kt(){var e=_0x26760e;return(_kt=_asyncToGenerator(_regenerator().m(function e(n,t){return _regenerator().w(function(e){for(var r=_0x3edd;;)if(0===e.n)return e.a(2,Dt(["-s",n,r(890),r(697).concat(t,'"')]))},e)})))[e(639)](this,arguments)}var Ot=y(_0x26760e(513));function Ht(e,r){return _Ht[_0x26760e(639)](this,arguments)}function _Ht(){var e=_0x26760e;return(_Ht=_asyncToGenerator(_regenerator().m(function e(r,n){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,L(F(),r,n))},e)})))[e(639)](this,arguments)}function Rt(){return _Rt[_0x26760e(639)](this,arguments)}function _Rt(){return(_Rt=_asyncToGenerator(_regenerator().m(function e(){var n;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return e.n=1,a(Ht([r(961),"targets"],{sensitive:!0}));case 1:return n=e.v,e.a(2,n.err?(Ot[r(998)]("list targets error: "+n[r(948)]),[]):null==(n=n[r(623)])||null==(n=n[r(649)]())||null==(n=n[r(971)]("\n"))?void 0:n.map(function(e){return e[r(649)]()}))}},e)}))).apply(this,arguments)}function Ke(e,r){return _Ke[_0x26760e(639)](this,arguments)}function _Ke(){var e=_0x26760e;return(_Ke=_asyncToGenerator(_regenerator().m(function e(n,t){var o,i,u,s,c=arguments;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return i=2<c[r(585)]&&void 0!==c[2]?c[2]:0,u=Math[r(926)](64512*Math[r(918)]())+1024,e.n=1,a(Ht(["-t",n,r(752),r(646)[r(765)](u),"tcp:".concat(t)]));case 1:if((s=e.v).err)return Ot[r(843)](r(635)[r(765)](u," tcp:")[r(765)](t),s[r(948)]),e.a(2);e.n=2;break;case 2:return e.a(2,s.data&&10!==i?null!=(o=s[r(623)])&&o[r(605)](r(862))?u:Ke(n,t,++i):0)}},e)})))[e(639)](this,arguments)}var we=require(_0x26760e(506));function se(e){var r=_0x26760e;return e&&(e[r(585)]<4?"*"[r(754)](e.length):e.slice(0,-4)+"****")}var qr=_0x26760e(710),ze="crossAtomicService";function Qe(e){var l=_0x26760e,d=e[l(992)],v=e[l(762)],h=e[l(787)],t=e[l(944)];function p(e){var t=l;return null==e?void 0:e.replace(/--sign-pwd\s+\S+/g,"--sign-pwd ***")[t(817)](/(--deviceId|-t|-s)\s+(\S+)/g,function(e,r,n){return""[t(765)](r," ").concat(se(n))})}function u(e,r,a,o,n){function t(e){var r=c;null!=o&&o[r(545)]||d[r(480)](r(957),p(e)),f[r(934)](e)}var i,u,s,c=l,r=(d[c(480)](c(768),e," ",p(null==r?void 0:r[c(969)](" "))),!1===(null==o?void 0:o[c(890)])&&(e=e[c(817)](/"/g,"")),(0,we[c(675)])(e,r,(e=o,r=l,i=v(),u=h(r(519)),d.debug(r(707)+i),s=u+";"+(null!=(s=process[r(579)][r(913)])?s:""),Object[r(643)]({shell:!0,env:_objectSpread(_objectSpread({},process[r(579)]||{}),{},{NODE_HOME:u,PATH:s,DEVECO_SDK_HOME:i})},e)))),f=(null!=n&&n(r),[]),_=[];return r[c(490)].on(c(623),function(e){var r=c,e=e[r(837)]()[r(649)]();t(e)}),r[c(779)].on(c(623),function(e){var r=c,e=e.toString()[r(649)]();/<i> \[(webpack-dev-server)|(webpack-dev-middleware)\]/.test(e)?t(e):(r=e,/hvigor /[(e=c)(632)](r)&&/WARN/[e(632)](r)?(d[e(843)](e(957),r),f.push(r)):(d[e(998)](e(540),r),_[e(934)](r)))}),r.on(c(802),function(e){var r,n=c,t=f.join("\n");0===e||null!=o&&null!=(r=o[n(735)])&&r[n(581)](o,e)?/failed to start ability/.test(t)?null!=a&&a(n(463)):(null!=a&&a(null,t),d[n(480)](n(488))):(r=n(705)[n(765)](e,"."),d.error(r),null!=a&&a(r+n(644)+_[n(969)]("\n"),t))}),r}function o(e,r,n,t){return i.apply(this,arguments)}function i(){return(i=_asyncToGenerator(_regenerator().m(function e(r,a,o,i){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(n,t){u(r,a,function(e,r){if(e)return t(e);n(r)},o,i)}))},e)}))).apply(this,arguments)}function s(e,r){return n.apply(this,arguments)}function n(){return(n=_asyncToGenerator(_regenerator().m(function e(r,n){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,o(t(),r,n))},e)}))).apply(this,arguments)}function r(){var e=l;return(r=_asyncToGenerator(_regenerator().m(function e(n){var t;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return e.n=1,a(s(["-t",n,r(890),r(860),r(952),r(534)]));case 1:return t=e.v,e.a(2,t[r(948)]||/(\[Fail\])/[r(632)](t.data)?(d.error("get device name error",t[r(948)]),"Unknown"):null==(t=t[r(623)])?void 0:t.trim())}},e)})))[e(639)](this,arguments)}return{runCmd:u,runCmdAsync:o,runExecAsync:function(r,n,t){return new Promise(function(a,o){var i=_0x3edd,e=[r][i(765)](_toConsumableArray(n||[]))[i(969)](" ");d[i(480)](i(653),e),(0,we[i(920)])(e,_objectSpread({encoding:i(607)},t||{}),function(e,r,n){var t=i;if(e)return d[t(998)]("runExecAsync stderr",n),o(n);d[t(480)](t(891),r),a(r)})})},runHdcCmd:function(e,r,n){return u(t(),e,r,n)},runHdcCmdAsync:s,getDeviceName:function(e){return r[l(639)](this,arguments)}}}var U="legacy",oe=_0x26760e(513),ne=_createClass(function e(){var r=_0x26760e,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:oe;_classCallCheck(this,e),this[r(529)]=n}),qe=(()=>{var r,e,n,t,o,i,u,s=_0x26760e;return _createClass(function e(r){var n=_0x3edd;_classCallCheck(this,e),this[n(560)]=new Map,this[n(953)]=null,this.isInit=!1,this[n(609)]=[],this.adapter=r},[{key:s(625),value:(u=_asyncToGenerator(_regenerator().m(function e(){var n,t,a,o=arguments;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:if(n=0<o[r(585)]&&void 0!==o[0]&&o[0],t=1<o.length&&void 0!==o[1]&&o[1],!n&&this[r(662)]&&null!=(n=this[r(609)])&&n[r(585)])return e.a(2,this[r(609)]);e.n=1;break;case 1:return a=t?null:(null==(n=global[r(501)])?void 0:n[r(522)])||oe,e.n=2,this[r(523)](a);case 2:return a=e.v,e.a(2,(this[r(609)]=a,this[r(662)]=!0,a))}},e,this)})),function(){return u[_0x3edd(639)](this,arguments)})},{key:s(523),value:(i=_asyncToGenerator(_regenerator().m(function e(n){var t,a,o,i,u,s;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:if(t=[],n===oe)return e.n=1,this[r(838)]();e.n=2;break;case 1:t=e.v,e.n=4;break;case 2:if(n===U)return e.n=3,this[r(473)]();e.n=4;break;case 3:t=e.v;case 4:if(t.length){e.n=8;break}return i=Promise,e.n=5,this[r(838)]();case 5:return u=e.v,e.n=6,this[r(473)]();case 6:return s=e.v,e.n=7,i[r(857)].call(i,[u,s]);case 7:s=e.v,o=_slicedToArray(s,2),a=o[0],o=o[1],t=[].concat(_toConsumableArray(a),_toConsumableArray(o));case 8:return e.a(2,(t[r(585)]||this[r(615)][r(992)][r(480)](r(734)),t))}},e,this)})),function(e){return i[_0x3edd(639)](this,arguments)})},{key:s(838),value:(o=_asyncToGenerator(_regenerator().m(function e(){var n,t,o,i,u=this;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return e.n=1,a(this[r(615)][r(655)]());case 1:if((t=e.v)[r(948)]||null==t||null==(n=t[r(623)])||!n[r(585)]||/(\[Empty\])|(\[Fail\])/[r(632)](null==(n=t[r(623)])?void 0:n[r(969)]("\n")))return e.a(2,(this.cur=null,this[r(615)][r(992)].debug(r(577),t[r(948)]),[]));e.n=2;break;case 2:return this.adapter.logger.debug(r(514),null==(n=t[r(623)])?void 0:n.map(function(e){return se(e)})[r(969)]("\n")),o=!1,e.n=3,Promise[r(857)](t.data[r(701)]((()=>{var r=_asyncToGenerator(_regenerator().m(function e(n){var t,a;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:if(u.cur&&u[r(953)].sn===n&&(o=!0),u[r(560)][r(654)](n))return e.a(2,u[r(560)][r(952)](n));e.n=1;break;case 1:return(t=new ne(oe)).sn=n,e.n=2,u[r(615)][r(746)](n);case 2:return a=e.v,e.a(2,(t[r(727)]=r(600)[r(765)](a),u[r(560)].set(n,t),t))}},e)}));return function(e){return r[_0x3edd(639)](this,arguments)}})()));case 3:return i=e.v,e.a(2,(o||(this[r(953)]=i[r(585)]?i[0]:null),i))}},e,this)})),function(){return o[_0x3edd(639)](this,arguments)})},{key:s(473),value:(t=_asyncToGenerator(_regenerator().m(function e(){var n,t,o,i,u=this;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return e.n=1,a(this[r(615)][r(1013)]());case 1:if((n=e.v)[r(948)]||null==n||null==(t=n[r(623)])||!t.length||/^List of devices attached$/[r(632)](n[r(623)]))return e.a(2,(this[r(615)][r(992)][r(480)](r(612)),[]));e.n=2;break;case 2:return(t=n[r(623)][r(971)]("\n")).shift(),t=t[r(701)](function(e){return e[r(971)](" ")[0]}),this[r(615)][r(992)][r(480)](r(514),null==(i=t)?void 0:i.map(function(e){return se(e)}).join("\n")),o=!1,e.n=3,Promise.all(t.map((()=>{var r=_asyncToGenerator(_regenerator().m(function e(n){var t,a;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:if(u[r(953)]&&u[r(953)].sn===n&&(o=!0),u[r(560)].has(n))return e.a(2,u.cache.get(n));e.n=1;break;case 1:return(t=new ne(U)).sn=n,e.n=2,u[r(615)].getLegacyDeviceName(n);case 2:return a=e.v,e.a(2,(t[r(727)]=a,u[r(560)].set(n,t),t))}},e)}));return function(e){return r[_0x3edd(639)](this,arguments)}})()));case 3:return i=e.v,e.a(2,(o||(this[r(953)]=i[r(585)]?i[0]:null),i))}},e,this)})),function(){return t[_0x3edd(639)](this,arguments)})},{key:s(889),value:function(){return this[s(953)]}},{key:s(737),value:function(e){var r=s;e&&this[r(560)][r(654)](e)&&(r=this[r(560)][r(952)](e),this.cur=r)}},{key:s(456),value:(n=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return e.n=1,this[r(625)]();case 1:return e.a(2,this[r(889)]())}},e,this)})),function(){return n[_0x3edd(639)](this,arguments)})},{key:s(866),value:(e=_asyncToGenerator(_regenerator().m(function e(){var n;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return e.n=1,this.getDevices();case 1:if(n=null==(n=this[r(889)]())?void 0:n.sn){e.n=2;break}return this[r(615)][r(520)](this.adapter.NO_DEVICE_ERROR),e.a(2);case 2:return e.a(2,n)}},e,this)})),function(){return e[_0x3edd(639)](this,arguments)})},{key:s(692),value:(r=_asyncToGenerator(_regenerator().m(function e(n){var t,a;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return e.n=1,this[r(625)]();case 1:if(t=n?null==(t=this[r(609)])?void 0:t[r(886)](function(e){return e.sn===n}):null)return e.a(2,t[r(529)]);e.n=2;break;case 2:if(a=null==(a=this[r(889)]())?void 0:a[r(529)]){e.n=3;break}return this.adapter[r(520)](this[r(615)][r(573)]),e.a(2);case 3:return e.a(2,a)}},e,this)})),function(e){return r[_0x3edd(639)](this,arguments)})}])})();function Xe(e){var r,n=_0x26760e,t=_createClass(a,null,[{key:(r=_0x3edd)(863),value:function(){return a[r(647)]}}]);function a(){_classCallCheck(this,a)}return t[n(647)]=new qe(e),{DeviceInfo:ne,DeviceManager:t}}var ve=h(require("fs")),Nt=require(_0x26760e(570)),zr=y("json");function be(e,r){var n,t=_0x26760e;try{return(null!=(n=Nt[t(486)])?n:Nt).parse(e)}catch(e){zr.error(t(500),e)}return r}function k(e,r){var n=_0x26760e;return ve[n(773)](e)?be(ve[n(906)](e,n(882)),r):r}function Mt(e,r){var n,t,a=_0x26760e;for(n in r)_typeof(r[n])==a(760)?Array[a(717)](r[n])?(Object[a(744)][a(861)][a(581)](e,n)||(e[n]=[]),(t=e[n])[a(934)][a(639)](t,_toConsumableArray(r[n]))):(Object.prototype.hasOwnProperty[a(581)](e,n)&&"object"==_typeof(e[n])||(e[n]={}),Mt(e[n],r[n])):e[n]=r[n];return e}var Pe=h(require("fs")),Qr=y(_0x26760e(614));function De(e,r){var n=_0x26760e,e=jt(e,!0),t=e.bundleName,e=e.versionCode,a=(new Date).toISOString()[n(971)]("T")[0][n(971)]("-")[n(969)]("");return{bundleName:t,spkName:""[n(765)](t,"-")[n(765)](e,"-").concat(r,"-").concat(a,".spk")}}function jt(e){var r=_0x26760e,n={bundleName:"",versionCode:""};if(1<arguments[r(585)]&&void 0!==arguments[1]&&arguments[1]){var t=""[r(765)](e,"/ascf/ascf_src/app.json");if(Pe[r(486)][r(773)](t)){t=JSON[r(877)](Pe[r(486)][r(906)](t,r(607)));if(null!=t&&t[r(489)])return n.bundleName=null==t?void 0:t[r(489)],n[r(763)]=null==t?void 0:t.versionCode,n}}var t=""[r(765)](e,r(1004));if(Pe[r(486)][r(773)](t))return e=k(t,{}),n[r(538)]=null==e||null==(t=e[r(846)])?void 0:t[r(538)],n[r(763)]=null==e||null==(t=e[r(846)])?void 0:t[r(763)],n;if(n[r(538)]&&n[r(763)])return n;throw e=r(725),Qr.error(e),new Error(e)}function Ze(e){return k(""[_0x26760e(765)](e,"/ascf/ascf_src/ascf.config.json"),{})}var S=y(_0x26760e(1012)),_Qe=Qe({logger:S,getDevEcoSdkHome:We,getPath:T,getHdcPath:F}),z=_Qe[_0x26760e(680)],L=_Qe[_0x26760e(845)],vo=_Qe[_0x26760e(820)],bo=_Qe[_0x26760e(1009)],O=_Qe[_0x26760e(791)],Xr=_Qe.getDeviceName;function ie(e){var r,n=_0x26760e,e=""[n(765)](e,n(1004));if(tt[n(773)](e))return null==(r=k(e,{}))||null==(r=r[n(846)])?void 0:r[n(538)];throw S[n(998)](""[n(765)](e,n(504))),new Error(""[n(765)](e,n(504)))}function rt(e){var r=_0x26760e,e="".concat(e,r(795));if(tt[r(773)](e))return k(e,{});throw S[r(998)]("".concat(e,r(504))),new Error("".concat(e," is not found"))}function st(e,r){return _st.apply(this,arguments)}function _st(){return(_st=_asyncToGenerator(_regenerator().m(function e(n,t){var o,i,u;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return S.info("start startAbility under "[r(765)](n)),o=ie(n),e.n=1,a(O(["-t",t,r(890),"aa",r(828),o]));case 1:return i=["-t",t,r(890),"aa","start","-a",r(518),"-b",o,r(666)],(null==(u=Ze(n))?void 0:u.ascfDebugger)===r(505)&&i[r(934)]("--ps ascfDebugger brk"),e.n=2,a(O(i));case 2:if((u=e.v)[r(948)])return S.error(r(892),u[r(948)]),S[r(998)]("Start ability error"),e.a(2);e.n=3;break;case 3:return e.a(2)}},e)}))).apply(this,arguments)}function Bt(e){return _Bt.apply(this,arguments)}function _Bt(){var e=_0x26760e;return(_Bt=_asyncToGenerator(_regenerator().m(function e(n){var t;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return S[r(847)]("start installDeps under "[r(765)](n)),e.n=1,a(L(he(),[r(777)],{chdir:!0,cwd:n}));case 1:(t=e.v)[r(948)]&&S[r(998)](r(910),t.err);case 2:return e.a(2)}},e)})))[e(639)](this,arguments)}function Vt(e){return _Vt[_0x26760e(639)](this,arguments)}function _Vt(){return(_Vt=_asyncToGenerator(_regenerator().m(function e(n){var t;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return S[r(847)](r(757)[r(765)](n)),e.n=1,a(L(he(),[r(801)],{chdir:!0,cwd:n}));case 1:(t=e.v)[r(948)]&&S[r(998)]("ohpmClean err",t[r(948)]);case 2:return e.a(2)}},e)}))).apply(this,arguments)}function Gt(e){return _Gt[_0x26760e(639)](this,arguments)}function _Gt(){var e=_0x26760e;return(_Gt=_asyncToGenerator(_regenerator().m(function e(n){var t;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return S[r(847)](r(610)[r(765)](n)),e.n=1,a(L(A(),[r(801),r(732)],{chdir:!0,cwd:n}));case 1:(t=e.v)[r(948)]&&S.error(r(895),t[r(948)]);case 2:return e.a(2)}},e)})))[e(639)](this,arguments)}function xe(e){var r=_0x26760e;if(e){var n=process[r(461)];try{n===r(917)?(0,et[r(950)])(r(708)[r(765)](e[r(743)],r(527))):n===r(689)&&e[r(743)]?process[r(901)](e[r(743)]):e[r(901)]()}catch(e){S[r(843)]("killProcess error")}}}var _Xe=Xe({logger:S,listTargets:Rt,getDeviceName:Xr,getDevicesCmd:_t,getLegacyDeviceName:It,NO_DEVICE_ERROR:_0x26760e(584),onError:function(e){throw new Error(e)}}),Po=_Xe[_0x26760e(687)],E=_Xe[_0x26760e(925)];function Q(e){var r,n=_0x26760e,t=1<arguments[n(585)]&&void 0!==arguments[1]?arguments[1]:{};try{return null==(r=(0,et[n(950)])(e,t))?void 0:r[n(837)](n(607))}catch(e){S.warn("exec cmd error",e)}}var Se=h(require(_0x26760e(770)));function W(e){return _W.apply(this,arguments)}function _W(){var e=_0x26760e;return(_W=_asyncToGenerator(_regenerator().m(function e(i){var u,r,s,n,t=arguments;return _regenerator().w(function(e){for(var o=_0x3edd;;)switch(e.p=e.n){case 0:return n=1<t[o(585)]&&void 0!==t[1]?t[1]:{},r=n[o(758)],u=void 0===r?o(956):r,r=n[o(945)],s=void 0===r?1e3:r,n=new Promise(function(e,r){function n(){a.destroy(),r()}var t=o,a=new Se[t(818)];a[t(868)](t(998),n),a.once(t(945),n),a[t(999)](s),a[t(671)](i,u,function(){a[t(711)](),e(i)})}),e.p=1,e.n=2,n;case 2:return e.a(2,!0);case 3:return e.p=3,e.a(2,!1)}},e,null,[[1,3]])})))[e(639)](this,arguments)}function Zr(n){var t=_0x26760e,a=Se.createServer();a[t(993)](0,"127.0.0.1",function(){var e=t,r=null==(r=a[e(930)]())?void 0:r[e(965)];a[e(802)](),n(null,r)}),a.on(t(998),function(e){n(e)})}function ae(){return _ae[_0x26760e(639)](this,arguments)}function _ae(){var e=_0x26760e;return(_ae=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(n,t){Zr(function(e,r){return r?n(r):t(e)})}))},e)})))[e(639)](this,arguments)}var H="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.";function ce(e){var n=_0x26760e,f=e.logger,_=e.fportListCmd,l=e[n(594)],c=e[n(694)],d=e[n(714)];function v(e){return r[n(639)](this,arguments)}function r(){var e=n;return(r=_asyncToGenerator(_regenerator().m(function e(u){var n,s,c,t,o,i=arguments;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return s=1<i[r(585)]&&void 0!==i[1]&&i[1],c=2<i.length&&void 0!==i[2]?i[2]:"",e.n=1,a(_(u));case 1:!(t=e.v).err&&t[r(623)]?e.n=2:(f.error(r(571),H),o=[],e.n=4);break;case 2:return e.n=3,Promise[r(857)](null==(n=t.data)?void 0:n[r(649)]()[r(971)]("\n")[r(701)]((()=>{var r=_asyncToGenerator(_regenerator().m(function e(n){var t,o,i;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:if(o=n[r(971)](/\s+/),t=null==(t=o[1])?void 0:t[r(649)](),o=null==(o=o[2])?void 0:o[r(649)](),i=s&&t===r(646)[r(765)](c))return e.n=1,a(l(u,t,o));e.n=1;break;case 1:return e.a(2,{localPort:t,remotePort:o,needRm:i})}},e)}));return function(e){return r[_0x3edd(639)](this,arguments)}})()));case 3:o=e.v[r(546)](function(e){return e[r(539)]&&!e.needRm});case 4:return e.a(2,o)}},e)})))[e(639)](this,arguments)}function t(){var e=n;return(t=_asyncToGenerator(_regenerator().m(function e(o,i,u){var n,s,t;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return e.n=1,v(o);case 1:return n=e.v,s=!1,t=i[r(649)]().replace(r(646),""),e.n=2,Promise[r(857)](n[r(701)]((()=>{var r=_asyncToGenerator(_regenerator().m(function e(n){var t;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:if(n[r(539)]&&n.remotePort){e.n=1;break}return e.a(2);case 1:if(t=!1,n[r(539)]===i&&n[r(719)]===u?s=!0:n[r(539)]!==i&&n[r(719)]!==u||(t=!0),t)return e.n=2,a(l(o,i,u));e.n=2;break;case 2:return e.a(2)}},e)}));return function(e){return r[_0x3edd(639)](this,arguments)}})()));case 2:if(s)return f[r(843)]("already has forward"),e.a(2);e.n=3;break;case 3:return e.n=4,c(t);case 4:if(e.v)return f[r(998)](r(608)[r(765)](t,r(871))),e.a(2);e.n=5;break;case 5:return e.n=6,a(d(o,i,u));case 6:if(e.v[r(948)])return f[r(998)]("fport error: ",H),e.a(2);e.n=7;break;case 7:return e.a(2)}},e)})))[e(639)](this,arguments)}function o(){var e=n;return(o=_asyncToGenerator(_regenerator().m(function e(r,n){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,v(r,!0,n);case 1:return e.a(2,e.v)}},e)})))[e(639)](this,arguments)}return{fportList:v,fport:function(e,r,n){return t.apply(this,arguments)},fportRm:function(e,r){return o[n(639)](this,arguments)}}}function Ee(e){var r,n,t,o,i,u,s,c=_0x26760e,f=e.logger,_=e[c(925)],l=e[c(963)],d=e[c(712)],v=e.fport,h=e.fportRm,p=e.fportList,e=e[c(628)],g=void 0===e?9225:e,e=_createClass(function e(){var r=_0x3edd;_classCallCheck(this,e),this[r(1008)]=9222,this[r(850)]=9229},[{key:(s=c)(935),value:(u=_asyncToGenerator(_regenerator().m(function e(n,t){var o,i,u,s;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:if(s=!n)return e.n=1,_[r(863)]()[r(866)]();e.n=2;break;case 1:n=e.v,s=!n;case 2:if(s)return e.a(2);e.n=3;break;case 3:return e.n=4,a(l(n,t));case 4:if((i=e.v)[r(948)]||null==(o=i[r(623)])||!o[r(585)])return f[r(998)]("fportWeb get pid error: ",d),e.a(2);e.n=5;break;case 5:return u=null==(o=i.data)||null==(o=o.trim()[r(971)]("\n"))?void 0:o[0][r(649)]().split(/\s+/)[1].trim(),e.n=6,a(v(n,r(646)+this[r(1008)],r(776)[r(765)](u)));case 6:if(e.v[r(948)])return f[r(998)](r(572),d),e.a(2);e.n=7;break;case 7:return e.a(2)}},e,this)})),function(e,r){return u[_0x3edd(639)](this,arguments)})},{key:s(624),value:(i=_asyncToGenerator(_regenerator().m(function e(n){var t;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:if(t=!n)return e.n=1,_.getInstance().getDeviceId();e.n=2;break;case 1:n=e.v,t=!n;case 2:if(t)return e.a(2);e.n=3;break;case 3:return e.n=4,a(v(n,"tcp:"+this[r(850)],r(646)[r(765)](g)));case 4:if(e.v[r(948)])return f[r(998)](r(786),d),e.a(2);e.n=5;break;case 5:return e.a(2)}},e,this)})),function(e){return i[_0x3edd(639)](this,arguments)})},{key:s(796),value:(o=_asyncToGenerator(_regenerator().m(function e(n){return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return e.n=1,this[r(960)](n,String(this[r(850)]));case 1:return e.a(2)}},e,this)})),function(e){return o[_0x3edd(639)](this,arguments)})},{key:s(738),value:(t=_asyncToGenerator(_regenerator().m(function e(n){return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return e.n=1,this[r(960)](n,String(this.webLocalPort));case 1:return e.a(2)}},e,this)})),function(e){return t[_0x3edd(639)](this,arguments)})},{key:"fportRm",value:(n=_asyncToGenerator(_regenerator().m(function e(n,t){var a;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:if(a=!n)return e.n=1,_[r(863)]().getDeviceId();e.n=2;break;case 1:n=e.v,a=!n;case 2:if(a){e.n=3;break}return e.n=3,h(n,t);case 3:return e.a(2)}},e)})),function(e,r){return n[_0x3edd(639)](this,arguments)})},{key:"status",value:(r=_asyncToGenerator(_regenerator().m(function e(n){var t,a;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:if(t=!n)return e.n=1,_[r(863)]()[r(866)]();e.n=2;break;case 1:n=e.v,t=!n;case 2:t?(a=[],e.n=5):e.n=3;break;case 3:return e.n=4,p(n);case 4:a=e.v;case 5:return e.a(2,a)}},e)})),function(e){return r[_0x3edd(639)](this,arguments)})}],[{key:s(863),value:function(){return this[s(647)]}}]);return e[c(647)]=new e,{DebugPortManager:e}}var Ft=y(_0x26760e(767)),_ce=ce({logger:Ft,isPortReachable:W,fportListCmd:function(e){return O(["-t",e,_0x26760e(985),"ls"])},fportRmCmd:function(e,r,n){return O(["-t",e,_0x26760e(985),"rm",r,n])},fportCmd:function(e,r,n){return O(["-t",e,_0x26760e(985),r,n])}}),es=_ce.fportList,ts=_ce[_0x26760e(985)],rs=_ce[_0x26760e(960)],_Ee=Ee({logger:Ft,DeviceManager:E,ERROR_MSG:H,fport:ts,fportRm:rs,fportList:es,getPid:function(e,r){return O(["-t",e,_0x26760e(890),'"ps -ef | grep '.concat(r,' | grep -v render | grep -v grep"')])}}),Ut=_Ee[_0x26760e(767)],Wt=_0x26760e(611),Ce=_0x26760e(691),X="legacy",$e=_0x26760e(528),Y=_0x26760e(798),Yt=y(_0x26760e(498)),_ce2=ce({logger:Yt,fportListCmd:Ct,fportRmCmd:$t,isPortReachable:W,fportCmd:At}),ss=_ce2[_0x26760e(549)],os=_ce2[_0x26760e(985)],ns=_ce2.fportRm,_Ee2=Ee({logger:Yt,DeviceManager:E,ERROR_MSG:H,fport:os,fportRm:ns,fportList:ss,getPid:function(e,r){return Tt(e,Ce)},remoteV8Port:9229}),Jt=_Ee2[_0x26760e(767)],pr=h(require(_0x26760e(709))),Kt=h(require(_0x26760e(627)));function Ae(t,i){return new Promise(function(a,o){var r=_0x3edd,e=Object[r(643)]({timeout:6e3},i),n=Kt[r(486)].get(t,function(e){var n=r,t="";e.on(n(623),function(e){t+=e}),e.on("end",function(){var r=n;try{a(JSON.parse(t))}catch(e){o(new Error(r(688)))}})});n.setTimeout(e[r(945)],function(){var e=r;n[e(556)](),o(new Error(e(532)))}),n.on(r(998),o),n[r(711)]()})}function _0x2dd8(){var e=["stringify","EntryAbility","node","onError","assembleHsp","deviceType","getDevicesInner","iterator result is not an object","-EncodedCommand","Bypass"," /T /F","view","type","modules",'"`"',"Request timed out","rmdirSync","const.product.name","edge","201408fwELIW","homedir","bundleName","localPort","runCmd stderr: ","__ASCF_MIN_TOOLKIT_VERSION","PassThrough","value","Uninstall not supported.","sensitive","filter"," is exists, skip download and extract","mkdir error","fportList",".pack_cache"," success","opts","runAdbCmdAsync","reverse","https","abort","stopService","process","chrome-devtools-frontend","cache","workspace","cachedir","semver",", browser url: ","url","handle end","assembleApp","generate-p12","toPrimitive","json5","fport ls error: ","fport web error: ","NO_DEVICE_ERROR","com.atomicservice.","start assembleApp under ","pkgUrl","hos listTargets error or no devices found","The selected Atomic Service is not running properly. Please start the Atomic Service first.","env","/js_app.html","call","DEVECO_SDK_HOME is not found, please set environment DEVECO_SDK_HOME","Generator","No devices found, please connect to phone","length","tar","function","766818izCXOC","toLowerCase","js_app.html","stopDebugServer","HVIGOR_USER_HOME","-default-signed.","fportRmCmd","buildMode=","baseFolder","stopView","npmUtils","targets","[HOS] ","hasReq","ports:\n","tryAdbPortReversing","Port ","includes","this hasn't been initialised - super() hasn't been called","utf8","port ","devices","start hvigor clean under ","com.enjoy.now.hmos","legacy listTargets error or no devices found","createHash","bundle","adapter","--es","number","--deviceType","handle","resolve","startService","fileSync","data","fportV8","getDevices","%d{hh:mm:ss.SSS} > %p %c %[%m%]","http","remoteV8Port","/Applications/DevEco-Studio.app/Contents/tools","digest","signtools","test","rportCmd","Verify integrity failed","hdc rport tcp:","_invoke","../tools/platform-tools-windows/adb.exe","hsp","apply","install","devtools://devtools/bundled/js_app.html?v8only=true&ws=localhost:9229","invalid subCmd, should be ","assign"," errors:\n","readFile","tcp:","instance","--targets","trim","DevEco Studio"," error: ","/bin/ascf.js is not found for project, please install using package manager first","begin runExecAsync","has","listTargets","spkName","start assembleSpk under ","Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.","legacy","The iterator does not provide a '","assembleHap","isInit","isLegacy","getAscfDepDir under ","../tools/platform-tools-linux/adb","--ps launchMode forceUpdate","npm.cmd","_ascfCliProgram","startView","createGunzip","connect"," to ","Arguments","app_id","spawn","cpList","ro.product.model","getOwnPropertySymbols","ascf-cache","runCmd","oh_modules","build/default/outputs/default/","1594632fVmMpE","Map","GeneratorFunction","deviceId","DeviceInfo","Invalid JSON","darwin","status","com.huawei.ascf.sample","getDeviceType","next","isPortReachable","com.huawei.ascf.sample/com.huawei.ascf.main.AscfActivity","entry",'"pm list packages -f | grep ',"slice","undefined","GetHvigorDepsCachesDir","map","C:\\Windows","enumerable","bin/npm","runCmd exited with code ","openBrowser","DEVECO_SDK_HOME=","taskkill /pid ","path","atomicservice","end","ERROR_MSG","Server running at http://localhost:","fportCmd"," info --json ","start install pkg under ","isArray","open","remotePort","google-chrome","constructor","then","debug-log-file","Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.","bundleName or versionCode is not configured","SIGINT","name","start hvigorw --sync, please waiting ...","assembleApp err","--sync","endsWith","--parallel","defineProperty","listTargets error or no devices found","ignoreError","openBrowser error, please try later","setCurrent","fportRmWeb","../tools/platform-tools-darwin/adb","BuildProcess","method","Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.","pid","prototype","--disable-web-security","getDeviceName","MD5","extraArgs","get ascf dep dir failed, fallback to use global ascf","get device name error","pattern","rport","indexOf","repeat","writable","AdbBuilder","start ohpm clean under ","host","prepareAssemble","object","-NoProfile","getDevEcoSdkHome","versionCode","json","concat","@@iterator","DebugPortManager","begin runCmd: ","ascfPackageName","net","symbol","msedge","existsSync","7UmncCs","unref","localabstract:webview_devtools_remote_","update","assembleHap error","stderr","log4js","C:\\Program Files\\Huawei\\DevEco Studio\\tools","Object","3156772JxXPba","google chrome","rportRmCmd","fport v8 error: ","getPath","__proto__","Debug Server is running on http://127.0.0.1:","/bin/ascf.js","runHdcCmdAsync","http://localhost:","21891FiQCer","Server has been closed.","/build-profile.json5","fportRmV8","__esModule","service","lastDebugServer","ascf/ascf_src/node_modules/@atomicservice/ascf-toolkit/lib","clean","close","delete ascf debugger pid file error","sha512-","--no-daemon","Buffer","terminal","utf16le","getOwnPropertyDescriptors","finish","SIGTERM","string","chromium","valueOf","hdc rport error, maybe find remote port error","configurable","replace","Socket","getPrototypeOf","runExecAsync","forward","static","stop","bin","args","SYSTEMROOT","getOwnPropertyDescriptor","force-stop","assembleSpk within ","ascf toolkit version is below ","createServer","installAndRunDebugPkg","getTime","file","writeHead","deveco","toString","getHosDevices",'`""',"getDebugees ","del","getPortManager","warn","DEVECO_SDK_HOME","runCmdAsync","app","info","hvigorw","categories","v8LocalPort","/debugServer/stop","--remove","from","catch","waiting download and install package ...","start","all","/debugServer/status","extract entry error","param","hasOwnProperty","Forwardport result:OK","getInstance","project","doLog","getDeviceId","forEach","once","@@toStringTag","tcp"," is used","exports","download ","ascf.debugger.","statusCode","stopping","parse","chrome","usingTmpDir error","' method","generateSpk info","utf-8","http://127.0.0.1:","-rf","Debug Server has been stopped","find","--logging","startDebugServer error","getCurrent","shell","runExecAsync stdout","start hap error","debugger","mkdir","hvigorClean err","unshift","uninstall","start installDeps under ","startHostPkgUrl","Derived constructors may only return object or undefined","kill","setPrototypeOf","base64","@@toPrimitive must return a primitive value.","installHap","readFileSync","realpathSync","4389455mpeflV",".json","installDeps err","build","start ability under ","PATH","product=default","compile","list targets error: ","win32","random","project_caches","exec","startMode","230rvXHIh","integrity","handle error","DeviceManager","floor","cancelled","install hap error","microsoft-edge","address","--daemon","round","--allow-file-access-from-files","push","fportWeb","usingTmpDir","buildMode","fatal","dispose","assembleHap within ","startDebugServer","return","assembleSpk error","getHdcPath","timeout","Launched within ","sha512","err",".hvigor","execSync","start uninstall pkg under ","get","cur","/json","buffer","127.0.0.1","runCmd stdout: ","../sdk/default/openharmony/toolchains","--list","fportRm","list","hvigor","getPid","build.log","port","-ArgumentList","bind"," failed","join","[object Generator]","split","\\System32\\WindowsPowerShell\\v1.0\\powershell","ascf/ascf_src/package.json","exit","getAscfDepDir","ohpm","please open url in browser: ","begin to download ","startsWith","done","getLogger","uninstall hap error","handle success","version","fport","%d{yyyy-MM-dd hh:mm:ss.SSS} > %p %c %m","downloadAndExtract "," tcp:","throw","toolkit","trying to get ascf debugger server info: ","logger","listen","cmd","cacheDir removed successfully","getDebugees error","getLegacyDeviceName","error","setTimeout","options","use","start assembleHap under ","9366510gJAheh","/AppScope/app.json5","Start","convert","send","webLocalPort","runHdcCmd","ro.product.name","configure","hdc","getDevicesCmd","checkAndGetBundleName","checkAndGetCurrent","hap","crypto","startHostPkg","application/octet-stream","platform","assembleHap err","start ability error","projectRoot","getDebugUrl ","module","handle ","dist","ascfVerCmd","some","pipe","Download failed: ","getLegacyDevices","ascf","install spk error","devtools://devtools/bundled/js_app.html","-NonInteractive"," is not available, try find available","assembleSpk err","debug","chrome://inspect/#devices","assembleAndInstallHap","AscfBuilder","104UdOaOO","1.20251708.0","default","fileLogger","runCmd exited.","package","stdout","text/plain","installDeps","getSpkInfo","pop","chrome://inspect#devices","/data/local/tmp/","create","LegacyDebugPortManager","--incremental","parse json error","_ascfCliOptions","message","Extracting to "," is not found","brk","child_process","keys","Adb reverse tcp:","iterator","bin/node","getprop","construct","hos","found devices: ","Unknown","pkg"];return(_0x2dd8=function(){return e})()}var Z=h(require("fs")),_e=h(require(_0x26760e(709))),ot=h(require("express")),qt=h(require(_0x26760e(562))),Le=y("DebugServer");function zt(){var e=_0x26760e;return _e.resolve((0,qt[e(486)])(e(679)),e(874)[e(765)](process[e(743)],".json"))}function Qt(e){var r=_0x26760e;Z.writeFileSync(zt(),JSON[r(517)](e),r(607))}function Xt(e,r){return _Xt[_0x26760e(639)](this,arguments)}function _Xt(){return(_Xt=_asyncToGenerator(_regenerator().m(function e(r,n){var a,o,i,u,s,c;return _regenerator().w(function(e){for(var t=_0x3edd;;)if(0===e.n)return o=(a=!1,ot.default)(),i=_e.normalize(r),o[t(1001)](ot[t(486)][t(822)](i)),o[t(952)](t(858),function(e,r){r[t(764)]({code:0,isStart:a,port:n})}),o[t(952)](t(851),function(e,r){var n=t;c(),r[n(764)]({code:0})}),u=o[t(993)](n,t(956),function(){var e=t;Le[e(847)](e(789)[e(765)](n)),a=!0}),s=!1,c=function(){var e;s||(Le.info("Debug Server stopping ..."),e=zt(),Z.existsSync(e)&&Z.unlink(e,function(e){var r=_0x3edd;return e&&Le.warn(r(803),e)}),u.close(function(){var e=_0x3edd;Le.info(e(885)),s=!0}))},e.a(2,{port:n,stop:c})},e)}))).apply(this,arguments)}var Ie=h(require(_0x26760e(558))),er=require(_0x26760e(955)),tr=h(require(_0x26760e(506))),is={chrome:{darwin:_0x26760e(784),win32:"chrome",linux:[_0x26760e(720),"google-chrome-stable",_0x26760e(813)]},edge:{darwin:"microsoft edge",win32:_0x26760e(772),linux:[_0x26760e(929),"microsoft-edge-dev"]}};function Zt(e,r){var n=_0x26760e,t=Ie[n(461)],a=null==(a=is[e])?void 0:a[t];if(!a)throw new Error(""[n(765)](e," is not supported"));var e=n(718),o=[],i=[];t===n(689)?(e=n(718),i[n(934)]("-a",a),/^(chrome|edge):/i[n(632)](r)&&i[n(934)](n(933))):"win32"===t&&(e=""[n(765)](Ie[n(579)][n(826)]||Ie.env.windir||n(702),n(972)),i.push(n(761),n(477),"-ExecutionPolicy",n(526),n(525)),t=[n(1005)],a?(t[n(934)](n(531)[n(765)](a,n(839))),r&&(/^(chrome|edge):/i[n(632)](r)&&o[n(934)](n(745),"--allow-file-access-from-files"),o[n(934)](r))):r&&t[n(934)]('"'[n(765)](r,'"')),0<o[n(585)]&&(o=o[n(701)](function(e){var r=n;return'"`"'.concat(e,r(839))}),t.push(n(966),o.join(","))),r=er[n(806)].from(t.join(" "),n(808))[n(837)](n(903))),r&&i[n(934)](r),tr[n(675)](e,i)[n(775)]()}function pe(r){var n=_0x26760e,t=1<arguments[n(585)]&&void 0!==arguments[1]?arguments[1]:n(878);try{Zt(t,r)}catch(e){Zt(n("chrome"===t?535:878),r)}}var fr=h(require(_0x26760e(562))),rr=require(_0x26760e(555)),B=require("fs"),nt=require("path"),sr=h(require(_0x26760e(586))),or=h(require("zlib")),nr=h(require("stream")),ir=require(_0x26760e(458)),R=y(_0x26760e(598));function as(e,r){var n=_0x26760e;return(null==(e=be(Q(""[n(765)](Ue(),n(715)).concat(e,"@").concat(r)),{}))?void 0:e[n(468)])||{}}function cs(e,r,n){return _cs.apply(this,arguments)}function _cs(){var e=_0x26760e;return(_cs=_asyncToGenerator(_regenerator().m(function e(r,s,c){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(i,u){var e=_0x3edd;(0,rr.get)(r,function(e){var n,t,o=_0x3edd;200!==e.statusCode?u(new Error(o(472)[o(765)](e[o(875)]))):(n=(0,ir.createHash)(o(947)),t=[],e.on(o(623),function(e){var r=o;n.update(e),t[r(934)](e)}),e.on(o(711),function(){var e,r,a=o;a(804)[a(765)](n[a(630)]("base64"))!==c?u(a(634)):(R[a(480)](a(503)[a(765)](s)),r=Buffer[a(765)](t),(e=new nr[a(542)])[a(711)](r),(r=sr.x({cwd:s,strip:1,noChmod:!0,noMtime:!0,preserveOwner:!1,onwarn:function(e,r,n){var t=a;R[t(843)](t(859),e,r)}})).on("end",i),r.on(a(998),u),e.pipe(or[a(670)]())[a(471)](r).on(a(998),function(e){return R[a(998)]("Extract error:",e)}).on("close",i))}),e.on(o(810),i),e.on("error",u))}).on(e(998),u)}))},e)})))[e(639)](this,arguments)}var ps={pkg:"@chrome-devtools/js-app",version:_0x26760e(485),baseFolder:""};function ar(e){return _ar[_0x26760e(639)](this,arguments)}function _ar(){var e=_0x26760e;return(_ar=_asyncToGenerator(_regenerator().m(function e(n){var t,a,o,i,u,s,c,f;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.p=e.n){case 0:if(t=ps[r(516)],a=ps[r(984)],i=ps[r(596)],o=""[r(765)](t,"@")[r(765)](a),R.info(r(978)[r(765)](o)),i=(0,nt[r(969)])(n,i),u=(0,nt[r(969)])(i,r(590)),(0,B.existsSync)(u))return e.a(2,(R.debug("".concat(u,r(547))),i));e.n=1;break;case 1:if(c=as(t,a),s=c.tarball,c=c[r(923)],s){e.n=2;break}return R[r(998)](""[r(765)](o,r(504))),e.a(2);case 2:return(0,B.mkdirSync)(n,{recursive:!0}),e.p=3,e.n=4,cs(s,n,c);case 4:e.n=6;break;case 5:return e.p=5,f=e.v,R[r(998)](r(987).concat(s," error"),f),(0,B[r(773)])(n)&&(0,B[r(533)])(n,{recursive:!0}),e.a(2);case 6:if((0,B[r(773)])(u))return e.a(2,(R[r(847)](r(873)[r(765)](o," to ")[r(765)](n,r(551))),i));e.n=7;break;case 7:R.error(r(873)[r(765)](o,r(672))[r(765)](n,r(968)));case 8:return e.a(2)}},e,null,[[3,5]])})))[e(639)](this,arguments)}var C=y("DebuggerProcess"),fs=(0,fr[_0x26760e(486)])("ascf-cache"),ls=pr[_0x26760e(969)](fs,_0x26760e(559)),cr=[_0x26760e(974),_0x26760e(726),_0x26760e(811)];function it(e){return _it[_0x26760e(639)](this,arguments)}function _it(){var e=_0x26760e;return(_it=_asyncToGenerator(_regenerator().m(function e(n){var t;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.p=e.n){case 0:return t=[],e.p=1,e.n=2,Ae(r(792)[r(765)](n,r(954)),{timeout:3e3});case 2:t=e.v,e.n=4;break;case 3:e.p=3,C[r(998)](r(840).concat(n,r(651)),H);case 4:return e.a(2,t)}},e,null,[[1,3]])})))[e(639)](this,arguments)}function at(e){return _at[_0x26760e(639)](this,arguments)}function _at(){var e=_0x26760e;return(_at=_asyncToGenerator(_regenerator().m(function e(n){var t,a,o,i,u;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.p=e.n){case 0:if(n){e.n=1;break}return e.a(2,"");case 1:return e.p=1,e.n=2,it(n);case 2:if(t=e.v,o=null===t){e.n=3;break}o=void 0===t;case 3:if(a=o){e.n=4;break}a=null==(t=t[0]);case 4:a?(i=void 0,e.n=6):e.n=5;break;case 5:i=t.devtoolsFrontendUrl;case 6:return e.a(2,i);case 7:return e.p=7,u=e.v,C.error(r(465)[r(765)](n," error"),u),e.a(2,"")}},e,null,[[1,7]])})))[e(639)](this,arguments)}var Te=(()=>{var r,n,a=_0x26760e;return _createClass(function e(r){var n=_0x3edd;_classCallCheck(this,e),this[n(799)]=null,this.options=Object[n(643)]({open:""},r)},[{key:a(619),value:function(e){var n=a,r=this,t=(C[n(847)](n(467)[n(765)](e)),{status:function(){return r[n(690)]()},start:function(){return r.start()},stop:function(){return r[n(823)]()},"start-view":function(){return r.startView()},"start-service":function(){return r[n(621)]()},"stop-view":function(){return r.stopView()},"stop-service":function(){return r[n(557)]()}});t[e]?t[e]().then(function(){var e=n;return C[e(847)](e(566))})[n(854)](function(e){var r=n;return C[r(998)](r(924),e)}):C[n(998)](n(642)+Object[n(507)](t)[n(969)](","))}},{key:a(706),value:(n=_asyncToGenerator(_regenerator().m(function e(n,t){var a,o,i,u=arguments;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:o=2<u[r(585)]&&void 0!==u[2]?u[2]:"",C[r(847)](r(706),n,t),n!==Y||(null==(a=this[r(1e3)])?void 0:a[r(522)])!==U?e.n=1:(i=r(641),e.n=3);break;case 1:return e.n=2,at(t);case 2:i=e.v;case 3:if(i){e.n=4;break}return C[r(847)](r(736)),e.a(2);case 4:n===Y?this[r(941)](i):(o&&(i=o),C[r(847)](r(977),i));case 5:return e.a(2)}},e,this)})),function(e,r){return n[_0x3edd(639)](this,arguments)})},{key:"startDebugServer",value:(r=_asyncToGenerator(_regenerator().m(function e(r){var t,a,o,i,u;return _regenerator().w(function(e){for(var n=_0x3edd;;)switch(e.p=e.n){case 0:return this[n(591)](),e.p=1,e.n=2,ar(ls);case 2:if(t=e.v){e.n=3;break}return C[n(998)]("install devtools failed, please open chrome://inspect in browser(chrome/edge) to debug"),e.a(2);case 3:return e.n=4,ae();case 4:return a=e.v,o=r.replace(n(476),n(883)[n(765)](a,n(580))),o+=(o[n(605)]("?")?"&":"?")+"panel=sources",Qt({port:a,debugUrl:o}),e.n=5,Xt(t,a);case 5:i=e.v,this[n(799)]=i,cr.forEach(function(e){var r=n;process.on(e,i[r(823)])}),C[n(847)]("start debug server url: ".concat(o)),null!=(a=this[n(1e3)])&&a[n(718)]&&pe(o,this[n(1e3)][n(718)]),e.n=7;break;case 6:e.p=6,u=e.v,C[n(998)](n(888),u),this[n(591)]();case 7:return e.a(2)}},e,this,[[1,6]])})),function(e){return r[_0x3edd(639)](this,arguments)})},{key:a(591),value:function(){var n=a,t=this;this.lastDebugServer&&(cr[n(867)](function(e){var r=n;process.removeListener(e,t[r(799)][r(823)])}),this[n(799)][n(823)](),this[n(799)]=null)}}])})(),N=y("AscfDebugger"),us=_0x26760e(578),fe=(()=>{var e,r,n,t,o,i,u,s,c=_0x26760e;function f(e){return _classCallCheck(this,f),_callSuper(this,f,[e])}return _inherits(f,Te),_createClass(f,[{key:c(663),value:function(){return this[c(1e3)].deviceType===X}},{key:"getPortManager",value:function(){var e=c;return(this[e(663)]()?Jt:Ut)[e(863)]()}},{key:"status",value:(s=_asyncToGenerator(_regenerator().m(function e(){var n,u=this;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return N[r(847)](r(690)),e.n=1,this[r(1014)]();case 1:if(e.v){e.n=2;break}return e.a(2);case 2:return e.n=3,this.getPortManager()[r(690)](this[r(1e3)].deviceId);case 3:return n=e.v,e.n=4,Promise[r(857)](null==n?void 0:n[r(701)]((()=>{var r=_asyncToGenerator(_regenerator().m(function e(n){var t,a,o,i;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:n[r(539)]!==r(646)[r(765)](u[r(842)]()[r(1008)])?e.n=1:(t=$e,e.n=3);break;case 1:n.localPort!==r(646)[r(765)](u.getPortManager()[r(850)])?e.n=2:(t=Y,e.n=3);break;case 2:return e.a(2);case 3:if(a="",o=!(t===Y&&u[r(663)]()))return e.n=4,at(n[r(539)][r(817)](r(646),""));e.n=5;break;case 4:a=e.v,o=!a;case 5:o?(i="",e.n=7):e.n=6;break;case 6:t===$e&&(a=r(495)),i=""[r(765)](t," ").concat(n[r(539)]," ")[r(765)](n[r(719)],r(564)).concat(a);case 7:return e.a(2,i)}},e)}));return function(e){return r.apply(this,arguments)}})()));case 4:0!==(n=(n=e.v)[r(546)](Boolean)).length&&N[r(847)](r(602)+n[r(969)]("\n"));case 5:return e.a(2)}},e,this)})),function(){return s[_0x3edd(639)](this,arguments)})},{key:"start",value:(u=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return N[r(847)](r(856)),e.n=1,this[r(669)]();case 1:return e.n=2,this[r(621)]();case 2:return e.a(2)}},e,this)})),function(){return u[_0x3edd(639)](this,arguments)})},{key:c(823),value:(i=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return N[r(847)](r(823)),e.n=1,this[r(597)]();case 1:return e.n=2,this[r(557)]();case 2:return e.a(2)}},e,this)})),function(){return i[_0x3edd(639)](this,arguments)})},{key:c(669),value:(o=_asyncToGenerator(_regenerator().m(function e(){var n;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return N[r(847)](r(669)),e.n=1,this[r(1014)]();case 1:if(n=e.v)return e.n=2,this.getPortManager()[r(935)](this[r(1e3)][r(686)],n);e.n=3;break;case 2:return e.n=3,this[r(706)]($e,this[r(842)]()[r(1008)],r(481));case 3:return e.a(2)}},e,this)})),function(){return o[_0x3edd(639)](this,arguments)})},{key:c(621),value:(t=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return N.info(r(621)),e.n=1,this[r(1014)]();case 1:if(e.v)return e.n=2,this.getPortManager()[r(624)](this[r(1e3)][r(686)]);e.n=3;break;case 2:return e.n=3,this[r(706)](Y,this[r(842)]()[r(850)]);case 3:return e.a(2)}},e,this)})),function(){return t[_0x3edd(639)](this,arguments)})},{key:c(597),value:(n=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return N[r(847)](r(597)),e.n=1,this[r(842)]()[r(738)](this[r(1e3)][r(686)]);case 1:return e.a(2)}},e,this)})),function(){return n[_0x3edd(639)](this,arguments)})},{key:c(557),value:(r=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return N[r(847)]("stopService"),e.n=1,this.getPortManager()[r(796)](this[r(1e3)].deviceId);case 1:return e.a(2)}},e,this)})),function(){return r[_0x3edd(639)](this,arguments)})},{key:"checkAndGetBundleName",value:(e=_asyncToGenerator(_regenerator().m(function e(){var n,t,o,i,u,s,c,f,_;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:if(o=this[r(1e3)],t=o[r(522)],o=o[r(599)],o=o===ze?Wt:this[r(1e3)].bundleName,o=t===X?Ce:o||ie(process.cwd()),i=this[r(1e3)][r(686)],c=!i)return e.n=1,E[r(863)]().getDeviceId();e.n=2;break;case 1:i=e.v,c=!i;case 2:if(c)return e.a(2,!1);e.n=3;break;case 3:if(u="",t===X)return e.n=4,a(kt(i,o));e.n=5;break;case 4:s=e.v,u=!(s[r(948)]||!s[r(623)]),e.n=10;break;case 5:return e.n=6,a(O(["-t",i,r(890),"pidof",o]));case 6:if(n=e.v[r(623)],f=null===n){e.n=7;break}f=void 0===n;case 7:f?(_=void 0,e.n=9):e.n=8;break;case 8:_=n[r(649)]();case 9:u=_;case 10:return e.a(2,(u||N.error(us),o))}},e,this)})),function(){return e.apply(this,arguments)})}])})(),Pr=h(require("fs")),Dr=h(require(_0x26760e(709))),ke=h(require("fs")),ct=h(require(_0x26760e(709))),V=y(_0x26760e(740)),ee=(()=>{var e,t,n,r,o=_0x26760e;return _createClass(function e(r){var n=_0x3edd;_classCallCheck(this,e),this[n(676)]=[],this[n(807)]=null,this[n(876)]=!1,this.options=Object.assign({buildMode:"debug"},r)},[{key:o(619),value:function(e){var n=o,r=this,t=(V[n(847)]("handle ".concat(e)),{start:function(){return r[n(856)]()},installDeps:function(){return r[n(492)]()},assembleHap:function(){return r[n(661)]()},assembleApp:function(){return r[n(567)]()},installHap:function(){return r[n(905)]()},assembleAndInstallHap:function(){return r[n(482)]()},uninstall:function(){return r.uninstall()},clean:function(){return r[n(801)]()},stop:function(){return r[n(823)]()}});t[e]?t[e]()[n(722)](function(){var e=n;return V.info(e(983))})[n(854)](function(e){var r=n;return V[r(998)](r(924),e)}):V[n(998)](n(642)+Object.keys(t).join(","))}},{key:o(492),value:(r=_asyncToGenerator(_regenerator().m(function e(){var n;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return n=this.options[r(464)],V[r(847)](r(898).concat(n)),e.n=1,a(Bt(n));case 1:return e.a(2)}},e,this)})),function(){return r.apply(this,arguments)})},{key:o(759),value:(n=_asyncToGenerator(_regenerator().m(function e(n,t){return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:if(ke[r(773)](ct.resolve(n,r(681)))){e.n=1;break}return e.n=1,this[r(492)]();case 1:return V[r(847)](r(728)),e.n=2,a(this.runCmdAsync(A(),[r(730)][r(765)](_toConsumableArray(t||[])),{cwd:n}));case 2:return e.a(2)}},e,this)})),function(e,r){return n[_0x3edd(639)](this,arguments)})},{key:"add",value:function(e){var r=o;this.cpList[r(934)](e)}},{key:o(841),value:function(e){var r=o,r=this[r(676)][r(753)](e);-1!==r&&this.cpList.splice(r,1)}},{key:"stop",value:function(){var e=o;this.stopping=!0,this[e(939)]()}},{key:o(939),value:function(){for(var e=o;this.cpList[e(585)];)xe(this[e(676)][e(494)]())}},{key:"init",value:function(){}},{key:o(845),value:(t=_asyncToGenerator(_regenerator().m(function e(r,i,u){var s=this;return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(n,t){var a,o=_0x3edd;s[o(876)]?t(o(927)):(a=z(r,i,function(e,r){if(s[o(841)](a),e)return t(e);n(r)},u),s.add(a))}))},e)})),function(e,r,n){return t.apply(this,arguments)})},{key:o(801),value:(e=_asyncToGenerator(_regenerator().m(function e(){var r,t;return _regenerator().w(function(e){for(var n=_0x3edd;;)switch(e.n){case 0:if(void 0===(r=this[n(1e3)].projectRoot))return e.a(2);e.n=1;break;case 1:return e.n=2,Vt(r);case 2:return e.n=3,Gt(r);case 3:t=ct.resolve(r,n(474),n(911),n(550)),ke.rm(t,{recursive:!0,force:!0},function(e){var r=n;e?V[r(998)]("Failed to remove cacheDir:",e):V[r(847)](r(995))});case 4:return e.a(2)}},e,this)})),function(){return e[_0x3edd(639)](this,arguments)})}])})(),j=h(require(_0x26760e(709))),G=h(require("fs")),lr=h(require("os")),ur=h(require(_0x26760e(458))),mr=h(require(_0x26760e(563))),gr=h(require(_0x26760e(562))),M=y(_0x26760e(990)),ms=/ASCF_GET_HVIGOR_DEPS_CACHES_DIR=(.+)$/m;function dr(e){var r=_0x26760e,e=j[r(969)](e,"hvigor/hvigor-config.json5");return G[r(773)](e)}function gs(e){}function ds(){var e=_0x26760e;return process.env[e(592)]||j[e(620)](lr[e(537)](),e(949))}var hs=function(e){var r=_0x26760e;return ur[r(613)](r(747)).update(e)[r(630)]("hex")};function ys(r){var e=_0x26760e;try{return G[e(907)].native(r)}catch(e){return r}}function ws(e){var r=_0x26760e,e=""[r(765)](j[r(620)](ds(),r(919),hs(j[r(620)](e)),r(561)),"/node_modules/@atomicservice/ascf-toolkit/lib");return G[r(773)]("".concat(e,"/bin/ascf.js"))?e:void 0}function hr(e){return _hr[_0x26760e(639)](this,arguments)}function _hr(){var e=_0x26760e;return(_hr=_asyncToGenerator(_regenerator().m(function e(n){var t,o,i,u;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:if(M.info(r(664).concat(n)),t="",dr(n)){if(!process[r(579)].ASCF_DISABLE_CACHE_DEP_DIR&&(t=ws(n)))return e.a(2,t);e.n=1}else e.n=3;break;case 1:return e.n=2,a(L(A(),[r(700),r(805)],{chdir:!0,cwd:n}));case 2:(i=e.v)[r(948)]&&M.error("getAscfDepDir err",i[r(948)]),i=null!=(i=i.data)?i:"",t=null==(i=ms.exec(i))?void 0:i[1],e.n=6;break;case 3:if(o=j.join(n,r(973)),!G[r(773)](o)){e.n=5;break}if(t=j[r(969)](n,r(800)),G[r(773)](""[r(765)](t,r(790)))){e.n=4;break}throw i=""[r(765)](t,r(652)),M[r(998)](i),new Error(i);case 4:e.n=6;break;case 5:u=""[r(765)](o," is not found for project, will use global ascf"),M[r(998)](u);case 6:return e.a(2,(M[r(480)](r(975),t),t))}},e)})))[e(639)](this,arguments)}function yr(e,r){return _yr[_0x26760e(639)](this,arguments)}function _yr(){var e=_0x26760e;return(_yr=_asyncToGenerator(_regenerator().m(function e(n,t){var a,o,i,u;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return e.n=1,hr(n);case 1:return a=e.v,o="ascf",i=[],a?(o=Fe(),i.push(""[r(765)](a,r(790)))):M[r(843)](r(749)),u=null==(u=Ve())?void 0:u(),e.a(2,(u&&u!==r(847)&&i[r(934)](r(887),u),i.push.apply(i,_toConsumableArray((null==t?void 0:t.args)||[])),{cmd:o,args:i,ascfVerCmd:a?""[r(765)](o," ")[r(765)](i[0]," -V"):"ascf -V"}))}},e)})))[e(639)](this,arguments)}function vs(e){var r=_0x26760e,n=global[r(541)];if(n){e=Q(e);if(e&&mr.gt(n,e))throw new Error(r(830)[r(765)](n,", please upgrade ascf toolkit or hvigor plugin"))}}var ue,bs=function(e,r,n){r=e[_0x26760e(753)](r);return-1!==r&&(null==(e=e[r+1])?void 0:e.includes(n))};function me(e,r,n){return _me[_0x26760e(639)](this,arguments)}function _me(){var e=_0x26760e;return(_me=_asyncToGenerator(_regenerator().m(function e(n,t,o){var i,u,s;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return e.n=1,yr(n,t);case 1:return s=e.v,i=s[r(994)],u=s[r(825)],s=s[r(469)],bs(u,r(618),U)&&vs(s),e.n=2,a(L(i,u,_objectSpread(_objectSpread({},(null==t?void 0:t[r(552)])||{}),{},{chdir:!0,cwd:n}),o));case 2:if((s=e.v)[r(948)])throw M.error("ascf run err",s[r(948)]),s.err;e.n=3;break;case 3:return e.a(2)}},e)})))[e(639)](this,arguments)}function ft(e,r,n){return _ft[_0x26760e(639)](this,arguments)}function _ft(){var e=_0x26760e;return(_ft=_asyncToGenerator(_regenerator().m(function e(n,t,a){return _regenerator().w(function(e){for(var r=_0x3edd;;)if(0===e.n)return e.a(2,me(n,Object[r(643)]({args:[r(915),n][r(765)](_toConsumableArray((null==t?void 0:t[r(748)])||[]))},t),a))},e)})))[e(639)](this,arguments)}function Ps(e,r,n){return _Ps[_0x26760e(639)](this,arguments)}function _Ps(){return(_Ps=_asyncToGenerator(_regenerator().m(function e(n,t,a){return _regenerator().w(function(e){for(var r=_0x3edd;;)if(0===e.n)return e.a(2,me(t,Object[r(643)]({args:[r(1006),"-i",n,"-o",t][r(765)](_toConsumableArray((null==a?void 0:a[r(748)])||[]))},a)))},e)}))).apply(this,arguments)}function Ds(e,r){return _Ds[_0x26760e(639)](this,arguments)}function _Ds(){return(_Ds=_asyncToGenerator(_regenerator().m(function e(n,t){return _regenerator().w(function(e){for(var r=_0x3edd;;)if(0===e.n)return e.a(2,me(n,Object[r(643)]({args:[r(631),"generate-keypair","-r",n][r(765)](_toConsumableArray((null==t?void 0:t[r(748)])||[]))},t)))},e)}))).apply(this,arguments)}function xs(e,r){return _xs[_0x26760e(639)](this,arguments)}function _xs(){var e=_0x26760e;return(_xs=_asyncToGenerator(_regenerator().m(function e(n,t){return _regenerator().w(function(e){for(var r=_0x3edd;;)if(0===e.n)return e.a(2,me(n,Object[r(643)]({args:[r(631),r(568),"-r",n].concat(_toConsumableArray((null==t?void 0:t[r(748)])||[]))},t)))},e)})))[e(639)](this,arguments)}function Ss(e,r){return _Ss[_0x26760e(639)](this,arguments)}function _Ss(){var e=_0x26760e;return(_Ss=_asyncToGenerator(_regenerator().m(function e(r,t){var a,o,i,u;return _regenerator().w(function(e){for(var n=_0x3edd;;)switch(e.n){case 0:return wr(),a=[n(893),"start"],[n(522),n(686)][n(867)](function(e){var r=n;t[e]&&a[r(934)]("--"[r(765)](e),t[e])}),e.n=1,yr(r,{args:a});case 1:return o=e.v,i=o[n(994)],u=o.args,e.a(2,new Promise(function(t,e){z(i,u,function(e,r){},{shell:!1,chdir:!0,cwd:r,ignoreError:function(e){return!0}},function(e){var r=_0x3edd,n=vr(null==(e=ue=e)?void 0:e[r(743)]);M[r(480)](r(991)[r(765)](n)),Cs(n,function(e){t(e?k(n,{}):{})})})}))}},e)})))[e(639)](this,arguments)}function wr(){ue&&(xe(ue),ue=void 0)}function Es(e,r){return _Es[_0x26760e(639)](this,arguments)}function _Es(){var e=_0x26760e;return(_Es=_asyncToGenerator(_regenerator().m(function e(n,t){var a;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,Ae(r(883)[r(765)](n,"/")[r(765)](t),{timeout:3e3});case 1:return e.a(2,e.v);case 2:e.p=2,a=e.v,M[r(998)](r(996),a);case 3:return e.a(2)}},e,null,[[0,2]])})))[e(639)](this,arguments)}function vr(e){var r=_0x26760e;if(e)return j.resolve((0,gr[r(486)])(r(679)),r(874)[r(765)](e,r(909)))}var le=0;function Cs(n,t){var a=_0x26760e,o=2<arguments[a(585)]&&void 0!==arguments[2]?arguments[2]:500,i=3<arguments[a(585)]&&void 0!==arguments[3]?arguments[3]:6e4,u=(le&&clearInterval(le),0);le=setInterval(function(){var e=i<u,r=G[a(773)](n);(e||r)&&(clearInterval(le),le=0,t(r)),u+=o},o)}var br="debug",pt="release";function Oe(e){return e&&(!0===e||/debug|development/i[_0x26760e(632)](e))?br:pt}var $s=function(e,r,n){return r===n?[]:[e,r]},x=y(_0x26760e(483)),ge=(()=>{var e,r,n,t,o,i,u,s,c=_0x26760e;function f(e){return _classCallCheck(this,f),_callSuper(this,f,[e])}return _inherits(f,ee),_createClass(f,[{key:"runHdcCmdAsync",value:(s=_asyncToGenerator(_regenerator().m(function e(r,n){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,this.runCmdAsync(F(),r,n))},e,this)})),function(e,r){return s.apply(this,arguments)})},{key:c(856),value:(u=_asyncToGenerator(_regenerator().m(function e(){var n,t;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:if(n=this[r(1e3)][r(464)],x[r(847)](r(912)[r(765)](n)),t=this[r(1e3)][r(686)]){e.n=2;break}return e.n=1,E.getInstance()[r(866)]();case 1:t=e.v;case 2:return e.n=3,a(st(n,t));case 3:return e.a(2)}},e,this)})),function(){return u[_0x3edd(639)](this,arguments)})},{key:c(661),value:(i=_asyncToGenerator(_regenerator().m(function e(){var r,t,o,i,u;return _regenerator().w(function(e){for(var n=_0x3edd;;)switch(e.n){case 0:return o=this[n(1e3)],r=o.projectRoot,o=o[n(937)],x.info(n(1002)[n(765)](r)),t=(new Date)[n(833)](),o=["-p","buildMode=".concat(Oe(o)),n(732),n(499)],e.n=1,this.prepareAssemble(r,o);case 1:return i=null==(i=rt(r))||null==(i=i.modules)?void 0:i[n(701)](function(e){var r=n;return"".concat(e[r(727)],"@default")}),e.n=2,a(this[n(845)](A(),["-m",n(466),"-p","module=".concat(null==i?void 0:i[n(969)](","))][n(765)](o,[n(661),1<i[n(585)]?n(521):"",n(931)]),{chdir:!0,cwd:r}));case 2:(i=e.v)[n(948)]&&x[n(998)](n(462),i.err),u=Math[n(932)](((new Date)[n(833)]()-t)/1e3),x.info(n(940)[n(765)](u," s"));case 3:return e.a(2)}},e,this)})),function(){return i.apply(this,arguments)})},{key:c(567),value:(o=_asyncToGenerator(_regenerator().m(function e(){var n,t,o,i;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return o=this[r(1e3)],n=o[r(464)],o=o[r(937)],x.info(r(575)[r(765)](n)),t=(new Date)[r(833)](),o=["-p",r(914),"-p",r(595)[r(765)](Oe(o)),r(732),r(499)],e.n=1,this[r(759)](n,o);case 1:return x[r(847)]("start assembleApp, please waiting ..."),e.n=2,a(this[r(845)](A(),["-m",r(864),r(567)].concat(o,["--daemon"]),{chdir:!0,cwd:n}));case 2:(i=e.v)[r(948)]&&x[r(998)](r(729),i.err),i=Math.round(((new Date)[r(833)]()-t)/1e3),x[r(847)]("assembleApp within "[r(765)](i," s"));case 3:return e.a(2)}},e,this)})),function(){return o[_0x3edd(639)](this,arguments)})},{key:"usingTmpDir",value:(t=_asyncToGenerator(_regenerator().m(function e(n,t){var o,i;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return o=r(496)+((new Date)[r(833)]()+Math[r(932)](1e3*Math.random())),e.n=1,a(this[r(791)](["-t",n,r(890),r(894),o]));case 1:if((i=e.v)[r(948)])return x.error(r(548),i[r(948)]),e.a(2);e.n=2;break;case 2:return e.n=3,a(t(o));case 3:return(i=e.v)[r(948)]&&x.error(r(879),i[r(948)]),e.n=4,a(this[r(791)](["-t",n,"shell","rm",r(884),o]));case 4:return e.a(2)}},e,this)})),function(e,r){return t[_0x3edd(639)](this,arguments)})},{key:c(905),value:(n=_asyncToGenerator(_regenerator().m(function e(){var t,n,u,o,s=this;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:if(t=this[r(1e3)][r(464)],x[r(847)](r(716)[r(765)](t)),n=(new Date).getTime(),u=this[r(1e3)][r(686)]){e.n=2;break}return e.n=1,E[r(863)]()[r(866)]();case 1:u=e.v;case 2:return e.n=3,a(this[r(936)](u,(()=>{var r=_asyncToGenerator(_regenerator().m(function e(o){var i,r;return _regenerator().w(function(e){for(var n=_0x3edd;;)switch(e.n){case 0:return r=null==(r=rt(t))||null==(r=r[n(530)])?void 0:r[n(701)](function(e){var r=n;return Dr.resolve(t,e.srcPath,r(682)[r(765)](e[r(727)],r(593)).concat(e[r(727)]===r(696)?r(457):r(638)))}),i=!1,e.n=1,Promise[n(857)](null==r?void 0:r[n(701)]((()=>{var r=_asyncToGenerator(_regenerator().m(function e(n){var t;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:if(Pr.existsSync(n)){e.n=1;break}return x[r(998)]("hapPath is not exists",n),i=!0,e.a(2);case 1:return e.n=2,a(s.runHdcCmdAsync(["-t",u,r(834),r(1007),n,o]));case 2:(t=e.v)[r(948)]&&(x[r(998)]("send hap error",t.err),i=!0);case 3:return e.a(2)}},e)}));return function(e){return r.apply(this,arguments)}})()));case 1:if(i)return e.a(2);e.n=2;break;case 2:return e.n=3,a(s[n(791)](["-t",u,n(890),"bm",n(640),"-p",o]));case 3:if((r=e.v)[n(948)])return x.error(n(928),r[n(948)]),e.a(2);e.n=4;break;case 4:st(t,u);case 5:return e.a(2)}},e)}));return function(e){return r.apply(this,arguments)}})()));case 3:o=Math.round(((new Date)[r(833)]()-n)/1e3),x[r(847)](r(946)[r(765)](o," s"));case 4:return e.a(2)}},e,this)})),function(){return n[_0x3edd(639)](this,arguments)})},{key:c(482),value:(r=_asyncToGenerator(_regenerator().m(function e(){var n;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return this[r(876)]=!1,e.n=1,E[r(863)]()[r(866)]();case 1:if(e.v){e.n=2;break}return e.a(2);case 2:return e.n=3,a(this[r(661)]());case 3:if((n=e.v).err)return x[r(998)](r(778),n[r(948)]),e.a(2);e.n=4;break;case 4:return e.n=5,a(this.installHap());case 5:return e.a(2)}},e,this)})),function(){return r[_0x3edd(639)](this,arguments)})},{key:c(897),value:(e=_asyncToGenerator(_regenerator().m(function e(){var n,t,o;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:if(n=this[r(1e3)].projectRoot,x[r(847)](r(951).concat(n)),t=this.options.deviceId){e.n=2;break}return e.n=1,E.getInstance()[r(866)]();case 1:t=e.v;case 2:return o=ie(n),e.n=3,a(this[r(791)](["-t",t,r(897),o]));case 3:if((o=e.v)[r(948)])return x[r(998)](r(982),o[r(948)]),e.a(2);e.n=4;break;case 4:return e.a(2)}},e,this)})),function(){return e.apply(this,arguments)})}])})(),$r=h(require("path")),xr=h(require("http")),Sr=h(require("fs")),Er=h(require("path")),te=y(_0x26760e(740));function As(r,n){var u=_0x26760e,s=[],e=xr[u(831)](function(t,a){var e,o=u,i=(new Date)[o(833)]();te.debug("request "[o(765)](t[o(565)])),"GET"===t[o(741)]?(e=Er.join(n,t[o(565)]),Sr[o(645)](e,function(e,r){var n=o;e?(a[n(835)](404,{"Content-Type":"text/plain"}),a.end("File not found")):(a[n(835)](200,{"Content-Type":n(460)}),a[n(711)](r),te[n(480)]("request "[n(765)](t[n(565)]," elapsed ")[n(765)]((new Date)[n(833)]()-i," ms")),s[n(934)](t[n(565)]))})):(a[o(835)](405,{"Content-Type":o(491)}),a.end("Method not allowed"))});return e[u(993)](r,function(){var e=u;te[e(480)](e(713).concat(r,"/"))}),e.on(u(998),function(e){te[u(998)]("Server error:",e)}),{server:e,port:r,close:function(){var r=u;e[r(802)](function(){var e=r;te[e(480)](e(794))})},hasReq:function(r){var n=u;return r&&s[n(470)](function(e){return e&&r[n(731)](e)})}}}function Cr(e,r){return _Cr.apply(this,arguments)}function _Cr(){return(_Cr=_asyncToGenerator(_regenerator().m(function e(n,t){return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return e.n=1,W(n);case 1:if(e.v){e.n=3;break}return te[r(843)](r(604).concat(n,r(478))),e.n=2,ae();case 2:n=e.v;case 3:return e.a(2,As(n,t))}},e)}))).apply(this,arguments)}var _=y(_0x26760e(756));function lt(e){return _lt.apply(this,arguments)}function _lt(){var e=_0x26760e;return(_lt=_asyncToGenerator(_regenerator().m(function e(n){var t,o,i,u,s,c,f,_,l,d,v,h,p,g;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return t=n.logger,_=n[r(464)],o=n[r(686)],f=n[r(493)],c=n[r(937)],h=n.startServer,i=n[r(603)],u=n[r(899)],s=n[r(785)],t[r(847)]("start install start spk under "[r(765)](_)),f=f(_,c),c=f[r(538)],f=f[r(656)],_=$r[r(969)](_,"build/dist"),e.n=1,h(3e3,_);case 1:return l=e.v,e.n=2,i(o,l[r(965)],0);case 2:if(d=e.v){e.n=3;break}return t[r(998)](r(815)),e.a(2);case 3:return v=r(883)[r(765)](d,"/").concat(f),e.n=4,a(u(o,c,v));case 4:if((h=e.v).err)return t[r(998)](r(475),h[r(948)]),e.a(2);e.n=5;break;case 5:t.info(r(855)),p=0,g=setInterval(function(){var e=r;l[e(601)](v)||60<p?(s(o,e(646)[e(765)](d)),l[e(802)](),clearInterval(g)):p++},1e3);case 6:return e.a(2)}},e)})))[e(639)](this,arguments)}var He=(()=>{var e,r,n,t,o,i,u,s=_0x26760e;function c(e){return _classCallCheck(this,c),_callSuper(this,c,[e])}return _inherits(c,ee),_createClass(c,[{key:s(856),value:(u=_asyncToGenerator(_regenerator().m(function e(){var n,t,o,i;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return t=this[r(1e3)],n=t[r(464)],t=t[r(937)],_[r(847)](r(912)[r(765)](n)),e.n=1,this.getDeviceId();case 1:return o=e.v,i=De(n,t),i=i[r(538)],e.n=2,a(St(o,i));case 2:return e.a(2)}},e,this)})),function(){return u[_0x3edd(639)](this,arguments)})},{key:s(661),value:(i=_asyncToGenerator(_regenerator().m(function e(){var n,t,o,i;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return n=this[r(1e3)][r(464)],_[r(847)](r(657)[r(765)](n)),t=(new Date)[r(833)](),e.n=1,this[r(759)](n);case 1:return e.n=2,a(ft(n,{extraArgs:["-c",r(648),this[r(1e3)][r(599)],this[r(1e3)][r(937)]===r(480)?"-m":""]}));case 2:if((o=e.v)[r(948)])throw _[r(998)]("generateSpk err",o[r(948)]),o.err;e.n=3;break;case 3:o[r(623)]&&_[r(847)](r(881),o.data),o[r(948)]&&_[r(998)](r(479),o.err),i=Math.round(((new Date).getTime()-t)/1e3),_[r(847)](r(829)[r(765)](i," s"));case 4:return e.a(2)}},e,this)})),function(){return i.apply(this,arguments)})},{key:s(567),value:(o=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(var r=_0x3edd;;)if(0===e.n)return e.a(2,this[r(661)]())},e,this)})),function(){return o[_0x3edd(639)](this,arguments)})},{key:s(905),value:(t=_asyncToGenerator(_regenerator().m(function e(){var n,t,a;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return t=this.options,n=t[r(464)],t=t.buildMode,_.info(r(716)[r(765)](n)),e.n=1,this.getDeviceId();case 1:return a=e.v,e.a(2,lt({logger:_,projectRoot:n,deviceId:a,getSpkInfo:De,buildMode:t,startServer:Cr,tryAdbPortReversing:xt,startHostPkgUrl:Et,rportRmCmd:Lt}))}},e,this)})),function(){return t.apply(this,arguments)})},{key:"assembleAndInstallHap",value:(n=_asyncToGenerator(_regenerator().m(function e(){var n;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:return this[r(876)]=!1,e.n=1,a(this[r(661)]());case 1:if((n=e.v)[r(948)])return _[r(998)](r(943),n[r(948)]),e.a(2);e.n=2;break;case 2:return e.n=3,a(this[r(905)]());case 3:return e.a(2)}},e,this)})),function(){return n[_0x3edd(639)](this,arguments)})},{key:"uninstall",value:(r=_asyncToGenerator(_regenerator().m(function e(){return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:_[r(843)](r(544));case 1:return e.a(2)}},e)})),function(){return r[_0x3edd(639)](this,arguments)})},{key:s(866),value:(e=_asyncToGenerator(_regenerator().m(function e(){var n,t,a;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:null==(n=this[r(1e3)][r(686)])?e.n=1:(a=n,e.n=3);break;case 1:return e.n=2,E[r(863)]()[r(866)]();case 2:a=e.v;case 3:if(t=a){e.n=4;break}throw new Error("No device found.");case 4:return e.a(2,t)}},e,this)})),function(){return e[_0x3edd(639)](this,arguments)})}])})(),Ls=_defineProperty(_defineProperty({},X,function(e){return new He(e)}),_0x26760e(513),function(e){return new ge(e)});function _s(e,r){return _s3[_0x26760e(639)](this,arguments)}function _s3(){var e=_0x26760e;return(_s3=_asyncToGenerator(_regenerator().m(function e(n,t){var o,i,u,s;return _regenerator().w(function(e){for(var r=_0x3edd;;)switch(e.n){case 0:if(i=(i=n[r(522)])&&!t[i]?r(513):i){e.n=5;break}return e.n=1,a(E[r(863)]().getDeviceType(n[r(686)]));case 1:if(o=e.v.data,!(u=null!==o)){e.n=2;break}u=void 0!==o;case 2:u?(s=o,e.n=4):e.n=3;break;case 3:s=r(513);case 4:i=s;case 5:return e.a(2,t[i](n))}},e)})))[e(639)](this,arguments)}var Re=(()=>{var r;return _createClass(function e(){_classCallCheck(this,e)},null,[{key:_0x26760e(497),value:(r=_asyncToGenerator(_regenerator().m(function e(r){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,_s(r,Ls))},e)})),function(e){return r[_0x3edd(639)](this,arguments)})}])})(),Ne=(()=>{var r;return _createClass(function e(){_classCallCheck(this,e)},null,[{key:_0x26760e(497),value:(r=_asyncToGenerator(_regenerator().m(function e(r){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2,new fe(r))},e)})),function(e){return r[_0x3edd(639)](this,arguments)})}])})();
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# This file specifies the Certificate Transparency logs
|
|
2
|
-
# that are to be trusted.
|
|
3
|
-
|
|
4
|
-
# Google's list of logs can be found here:
|
|
5
|
-
# www.certificate-transparency.org/known-logs
|
|
6
|
-
# A Python program to convert the log list to OpenSSL's format can be
|
|
7
|
-
# found here:
|
|
8
|
-
# https://github.com/google/certificate-transparency/blob/master/python/utilities/log_list/print_log_list.py
|
|
9
|
-
# Use the "--openssl_output" flag.
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# This file specifies the Certificate Transparency logs
|
|
2
|
-
# that are to be trusted.
|
|
3
|
-
|
|
4
|
-
# Google's list of logs can be found here:
|
|
5
|
-
# www.certificate-transparency.org/known-logs
|
|
6
|
-
# A Python program to convert the log list to OpenSSL's format can be
|
|
7
|
-
# found here:
|
|
8
|
-
# https://github.com/google/certificate-transparency/blob/master/python/utilities/log_list/print_log_list.py
|
|
9
|
-
# Use the "--openssl_output" flag.
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env perl
|
|
2
|
-
# Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
|
|
3
|
-
#
|
|
4
|
-
# Licensed under the OpenSSL license (the "License"). You may not use
|
|
5
|
-
# this file except in compliance with the License. You can obtain a copy
|
|
6
|
-
# in the file LICENSE in the source distribution or at
|
|
7
|
-
# https://www.openssl.org/source/license.html
|
|
8
|
-
|
|
9
|
-
#
|
|
10
|
-
# Wrapper around the ca to make it easier to use
|
|
11
|
-
#
|
|
12
|
-
# WARNING: do not edit!
|
|
13
|
-
# Generated by makefile from apps\CA.pl.in
|
|
14
|
-
|
|
15
|
-
use strict;
|
|
16
|
-
use warnings;
|
|
17
|
-
|
|
18
|
-
my $openssl = "openssl";
|
|
19
|
-
if(defined $ENV{'OPENSSL'}) {
|
|
20
|
-
$openssl = $ENV{'OPENSSL'};
|
|
21
|
-
} else {
|
|
22
|
-
$ENV{'OPENSSL'} = $openssl;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
my $verbose = 1;
|
|
26
|
-
|
|
27
|
-
my $OPENSSL_CONFIG = $ENV{"OPENSSL_CONFIG"} || "";
|
|
28
|
-
my $DAYS = "-days 365";
|
|
29
|
-
my $CADAYS = "-days 1095"; # 3 years
|
|
30
|
-
my $REQ = "$openssl req $OPENSSL_CONFIG";
|
|
31
|
-
my $CA = "$openssl ca $OPENSSL_CONFIG";
|
|
32
|
-
my $VERIFY = "$openssl verify";
|
|
33
|
-
my $X509 = "$openssl x509";
|
|
34
|
-
my $PKCS12 = "$openssl pkcs12";
|
|
35
|
-
|
|
36
|
-
# default openssl.cnf file has setup as per the following
|
|
37
|
-
my $CATOP = "./demoCA";
|
|
38
|
-
my $CAKEY = "cakey.pem";
|
|
39
|
-
my $CAREQ = "careq.pem";
|
|
40
|
-
my $CACERT = "cacert.pem";
|
|
41
|
-
my $CACRL = "crl.pem";
|
|
42
|
-
my $DIRMODE = 0777;
|
|
43
|
-
|
|
44
|
-
my $NEWKEY = "newkey.pem";
|
|
45
|
-
my $NEWREQ = "newreq.pem";
|
|
46
|
-
my $NEWCERT = "newcert.pem";
|
|
47
|
-
my $NEWP12 = "newcert.p12";
|
|
48
|
-
my $RET = 0;
|
|
49
|
-
my $WHAT = shift @ARGV || "";
|
|
50
|
-
my @OPENSSL_CMDS = ("req", "ca", "pkcs12", "x509", "verify");
|
|
51
|
-
my %EXTRA = extra_args(\@ARGV, "-extra-");
|
|
52
|
-
my $FILE;
|
|
53
|
-
|
|
54
|
-
sub extra_args {
|
|
55
|
-
my ($args_ref, $arg_prefix) = @_;
|
|
56
|
-
my %eargs = map {
|
|
57
|
-
if ($_ < $#$args_ref) {
|
|
58
|
-
my ($arg, $value) = splice(@$args_ref, $_, 2);
|
|
59
|
-
$arg =~ s/$arg_prefix//;
|
|
60
|
-
($arg, $value);
|
|
61
|
-
} else {
|
|
62
|
-
();
|
|
63
|
-
}
|
|
64
|
-
} reverse grep($$args_ref[$_] =~ /$arg_prefix/, 0..$#$args_ref);
|
|
65
|
-
my %empty = map { ($_, "") } @OPENSSL_CMDS;
|
|
66
|
-
return (%empty, %eargs);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
# See if reason for a CRL entry is valid; exit if not.
|
|
70
|
-
sub crl_reason_ok
|
|
71
|
-
{
|
|
72
|
-
my $r = shift;
|
|
73
|
-
|
|
74
|
-
if ($r eq 'unspecified' || $r eq 'keyCompromise'
|
|
75
|
-
|| $r eq 'CACompromise' || $r eq 'affiliationChanged'
|
|
76
|
-
|| $r eq 'superseded' || $r eq 'cessationOfOperation'
|
|
77
|
-
|| $r eq 'certificateHold' || $r eq 'removeFromCRL') {
|
|
78
|
-
return 1;
|
|
79
|
-
}
|
|
80
|
-
print STDERR "Invalid CRL reason; must be one of:\n";
|
|
81
|
-
print STDERR " unspecified, keyCompromise, CACompromise,\n";
|
|
82
|
-
print STDERR " affiliationChanged, superseded, cessationOfOperation\n";
|
|
83
|
-
print STDERR " certificateHold, removeFromCRL";
|
|
84
|
-
exit 1;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
# Copy a PEM-format file; return like exit status (zero means ok)
|
|
88
|
-
sub copy_pemfile
|
|
89
|
-
{
|
|
90
|
-
my ($infile, $outfile, $bound) = @_;
|
|
91
|
-
my $found = 0;
|
|
92
|
-
|
|
93
|
-
open IN, $infile || die "Cannot open $infile, $!";
|
|
94
|
-
open OUT, ">$outfile" || die "Cannot write to $outfile, $!";
|
|
95
|
-
while (<IN>) {
|
|
96
|
-
$found = 1 if /^-----BEGIN.*$bound/;
|
|
97
|
-
print OUT $_ if $found;
|
|
98
|
-
$found = 2, last if /^-----END.*$bound/;
|
|
99
|
-
}
|
|
100
|
-
close IN;
|
|
101
|
-
close OUT;
|
|
102
|
-
return $found == 2 ? 0 : 1;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
# Wrapper around system; useful for debugging. Returns just the exit status
|
|
106
|
-
sub run
|
|
107
|
-
{
|
|
108
|
-
my $cmd = shift;
|
|
109
|
-
print "====\n$cmd\n" if $verbose;
|
|
110
|
-
my $status = system($cmd);
|
|
111
|
-
print "==> $status\n====\n" if $verbose;
|
|
112
|
-
return $status >> 8;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
if ( $WHAT =~ /^(-\?|-h|-help)$/ ) {
|
|
117
|
-
print STDERR "usage: CA.pl -newcert | -newreq | -newreq-nodes | -xsign | -sign | -signCA | -signcert | -crl | -newca [-extra-cmd extra-params]\n";
|
|
118
|
-
print STDERR " CA.pl -pkcs12 [-extra-pkcs12 extra-params] [certname]\n";
|
|
119
|
-
print STDERR " CA.pl -verify [-extra-verify extra-params] certfile ...\n";
|
|
120
|
-
print STDERR " CA.pl -revoke [-extra-ca extra-params] certfile [reason]\n";
|
|
121
|
-
exit 0;
|
|
122
|
-
}
|
|
123
|
-
if ($WHAT eq '-newcert' ) {
|
|
124
|
-
# create a certificate
|
|
125
|
-
$RET = run("$REQ -new -x509 -keyout $NEWKEY -out $NEWCERT $DAYS $EXTRA{req}");
|
|
126
|
-
print "Cert is in $NEWCERT, private key is in $NEWKEY\n" if $RET == 0;
|
|
127
|
-
} elsif ($WHAT eq '-precert' ) {
|
|
128
|
-
# create a pre-certificate
|
|
129
|
-
$RET = run("$REQ -x509 -precert -keyout $NEWKEY -out $NEWCERT $DAYS");
|
|
130
|
-
print "Pre-cert is in $NEWCERT, private key is in $NEWKEY\n" if $RET == 0;
|
|
131
|
-
} elsif ($WHAT =~ /^\-newreq(\-nodes)?$/ ) {
|
|
132
|
-
# create a certificate request
|
|
133
|
-
$RET = run("$REQ -new $1 -keyout $NEWKEY -out $NEWREQ $DAYS $EXTRA{req}");
|
|
134
|
-
print "Request is in $NEWREQ, private key is in $NEWKEY\n" if $RET == 0;
|
|
135
|
-
} elsif ($WHAT eq '-newca' ) {
|
|
136
|
-
# create the directory hierarchy
|
|
137
|
-
mkdir ${CATOP}, $DIRMODE;
|
|
138
|
-
mkdir "${CATOP}/certs", $DIRMODE;
|
|
139
|
-
mkdir "${CATOP}/crl", $DIRMODE ;
|
|
140
|
-
mkdir "${CATOP}/newcerts", $DIRMODE;
|
|
141
|
-
mkdir "${CATOP}/private", $DIRMODE;
|
|
142
|
-
open OUT, ">${CATOP}/index.txt";
|
|
143
|
-
close OUT;
|
|
144
|
-
open OUT, ">${CATOP}/crlnumber";
|
|
145
|
-
print OUT "01\n";
|
|
146
|
-
close OUT;
|
|
147
|
-
# ask user for existing CA certificate
|
|
148
|
-
print "CA certificate filename (or enter to create)\n";
|
|
149
|
-
$FILE = "" unless defined($FILE = <STDIN>);
|
|
150
|
-
$FILE =~ s{\R$}{};
|
|
151
|
-
if ($FILE ne "") {
|
|
152
|
-
copy_pemfile($FILE,"${CATOP}/private/$CAKEY", "PRIVATE");
|
|
153
|
-
copy_pemfile($FILE,"${CATOP}/$CACERT", "CERTIFICATE");
|
|
154
|
-
} else {
|
|
155
|
-
print "Making CA certificate ...\n";
|
|
156
|
-
$RET = run("$REQ -new -keyout"
|
|
157
|
-
. " ${CATOP}/private/$CAKEY"
|
|
158
|
-
. " -out ${CATOP}/$CAREQ $EXTRA{req}");
|
|
159
|
-
$RET = run("$CA -create_serial"
|
|
160
|
-
. " -out ${CATOP}/$CACERT $CADAYS -batch"
|
|
161
|
-
. " -keyfile ${CATOP}/private/$CAKEY -selfsign"
|
|
162
|
-
. " -extensions v3_ca $EXTRA{ca}"
|
|
163
|
-
. " -infiles ${CATOP}/$CAREQ") if $RET == 0;
|
|
164
|
-
print "CA certificate is in ${CATOP}/$CACERT\n" if $RET == 0;
|
|
165
|
-
}
|
|
166
|
-
} elsif ($WHAT eq '-pkcs12' ) {
|
|
167
|
-
my $cname = $ARGV[0];
|
|
168
|
-
$cname = "My Certificate" unless defined $cname;
|
|
169
|
-
$RET = run("$PKCS12 -in $NEWCERT -inkey $NEWKEY"
|
|
170
|
-
. " -certfile ${CATOP}/$CACERT"
|
|
171
|
-
. " -out $NEWP12"
|
|
172
|
-
. " -export -name \"$cname\" $EXTRA{pkcs12}");
|
|
173
|
-
print "PKCS #12 file is in $NEWP12\n" if $RET == 0;
|
|
174
|
-
} elsif ($WHAT eq '-xsign' ) {
|
|
175
|
-
$RET = run("$CA -policy policy_anything $EXTRA{ca} -infiles $NEWREQ");
|
|
176
|
-
} elsif ($WHAT eq '-sign' ) {
|
|
177
|
-
$RET = run("$CA -policy policy_anything -out $NEWCERT $EXTRA{ca} -infiles $NEWREQ");
|
|
178
|
-
print "Signed certificate is in $NEWCERT\n" if $RET == 0;
|
|
179
|
-
} elsif ($WHAT eq '-signCA' ) {
|
|
180
|
-
$RET = run("$CA -policy policy_anything -out $NEWCERT"
|
|
181
|
-
. " -extensions v3_ca $EXTRA{ca} -infiles $NEWREQ");
|
|
182
|
-
print "Signed CA certificate is in $NEWCERT\n" if $RET == 0;
|
|
183
|
-
} elsif ($WHAT eq '-signcert' ) {
|
|
184
|
-
$RET = run("$X509 -x509toreq -in $NEWREQ -signkey $NEWREQ"
|
|
185
|
-
. " -out tmp.pem $EXTRA{x509}");
|
|
186
|
-
$RET = run("$CA -policy policy_anything -out $NEWCERT"
|
|
187
|
-
. "$EXTRA{ca} -infiles tmp.pem") if $RET == 0;
|
|
188
|
-
print "Signed certificate is in $NEWCERT\n" if $RET == 0;
|
|
189
|
-
} elsif ($WHAT eq '-verify' ) {
|
|
190
|
-
my @files = @ARGV ? @ARGV : ( $NEWCERT );
|
|
191
|
-
my $file;
|
|
192
|
-
foreach $file (@files) {
|
|
193
|
-
my $status = run("$VERIFY \"-CAfile\" ${CATOP}/$CACERT $file $EXTRA{verify}");
|
|
194
|
-
$RET = $status if $status != 0;
|
|
195
|
-
}
|
|
196
|
-
} elsif ($WHAT eq '-crl' ) {
|
|
197
|
-
$RET = run("$CA -gencrl -out ${CATOP}/crl/$CACRL $EXTRA{ca}");
|
|
198
|
-
print "Generated CRL is in ${CATOP}/crl/$CACRL\n" if $RET == 0;
|
|
199
|
-
} elsif ($WHAT eq '-revoke' ) {
|
|
200
|
-
my $cname = $ARGV[0];
|
|
201
|
-
if (!defined $cname) {
|
|
202
|
-
print "Certificate filename is required; reason optional.\n";
|
|
203
|
-
exit 1;
|
|
204
|
-
}
|
|
205
|
-
my $reason = $ARGV[1];
|
|
206
|
-
$reason = " -crl_reason $reason"
|
|
207
|
-
if defined $reason && crl_reason_ok($reason);
|
|
208
|
-
$RET = run("$CA -revoke \"$cname\"" . $reason . $EXTRA{ca});
|
|
209
|
-
} else {
|
|
210
|
-
print STDERR "Unknown arg \"$WHAT\"\n";
|
|
211
|
-
print STDERR "Use -help for help.\n";
|
|
212
|
-
exit 1;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
exit $RET;
|