@atomicservice/ascf-toolkit 1.0.8 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/lib/ascf-base/index.js +1 -1
  2. package/lib/ascf-common/index.js +1 -1
  3. package/lib/ascf-compiler/appjson-loader.js +1 -1
  4. package/lib/ascf-compiler/common/appjson-validator.js +1 -1
  5. package/lib/ascf-compiler/common/ascf-define.js +1 -1
  6. package/lib/ascf-compiler/common/ascf-file-cache.js +1 -0
  7. package/lib/ascf-compiler/common/beforeLoaderProcess.js +1 -1
  8. package/lib/ascf-compiler/common/css-runtime-api.js +1 -1
  9. package/lib/ascf-compiler/common/eventHappenHjs.js +1 -1
  10. package/lib/ascf-compiler/common/exp-utils.js +1 -1
  11. package/lib/ascf-compiler/common/hash-sum.js +1 -1
  12. package/lib/ascf-compiler/common/hdc-executor.js +1 -1
  13. package/lib/ascf-compiler/common/hjs-utils.js +1 -1
  14. package/lib/ascf-compiler/common/hxml-validator.js +1 -1
  15. package/lib/ascf-compiler/common/logUndefined.js +1 -1
  16. package/lib/ascf-compiler/common/manifest-handler.js +1 -1
  17. package/lib/ascf-compiler/common/manifest-manager.js +1 -1
  18. package/lib/ascf-compiler/common/merge-tpl-cmps.js +1 -1
  19. package/lib/ascf-compiler/common/packoptions-utils.js +1 -1
  20. package/lib/ascf-compiler/common/quick-generate-subpackage.js +1 -1
  21. package/lib/ascf-compiler/common/utils.js +1 -1
  22. package/lib/ascf-compiler/css-process-loader.js +1 -1
  23. package/lib/ascf-compiler/extract-loader.js +1 -1
  24. package/lib/ascf-compiler/hcss-loader.js +1 -1
  25. package/lib/ascf-compiler/hjs-loader.js +1 -1
  26. package/lib/ascf-compiler/hxml-loader.js +1 -1
  27. package/lib/ascf-compiler/js-parser/parser-babel.js +1 -1
  28. package/lib/ascf-compiler/js-parser/parser-swc.js +1 -1
  29. package/lib/ascf-compiler/js-parser/parser.js +1 -1
  30. package/lib/ascf-compiler/loader-utils.js +1 -1
  31. package/lib/ascf-compiler/path-process-loader.js +1 -1
  32. package/lib/ascf-compiler/plugin/before-loader-plugin.js +1 -1
  33. package/lib/ascf-compiler/plugin/copy-bundle-plugin.js +1 -1
  34. package/lib/ascf-compiler/plugin/dynamic-entry-plugin.js +1 -1
  35. package/lib/ascf-compiler/plugin/extConfig-plugin.js +1 -1
  36. package/lib/ascf-compiler/plugin/html-generator-plugin.js +1 -1
  37. package/lib/ascf-compiler/plugin/i18n-transform-plugin.js +1 -1
  38. package/lib/ascf-compiler/plugin/manifest-generator-plugin.js +1 -1
  39. package/lib/ascf-compiler/plugin/quick-service-build-plugin.js +1 -1
  40. package/lib/ascf-compiler/plugin/replace-module-id-plugin.js +1 -1
  41. package/lib/ascf-compiler/plugin/resource-plugin.js +1 -1
  42. package/lib/ascf-compiler/plugin/webpack-target/index.js +1 -1
  43. package/lib/ascf-compiler/plugin/webpack-target/jsonpChunkLoadingRuntimeModule.js +1 -1
  44. package/lib/ascf-compiler/plugin/webpack-target/jsonpHelpers.js +1 -1
  45. package/lib/ascf-compiler/plugin/webpack-target/jsonpTemplatePlugin.js +1 -1
  46. package/lib/ascf-compiler/require-loader.js +1 -1
  47. package/lib/ascf-compiler/server/dev-server.js +1 -1
  48. package/lib/ascf-compiler/server/port-manager.js +1 -1
  49. package/lib/ascf-compiler/swc-loader.js +1 -1
  50. package/lib/ascf-compiler/template/attr-utils.js +1 -1
  51. package/lib/ascf-compiler/template/implicit-model-config.js +1 -1
  52. package/lib/ascf-compiler/template/node-name-utils.js +1 -1
  53. package/lib/ascf-compiler/template-compiler/index.js +1 -0
  54. package/lib/ascf-compiler/trustlist-hxml-verify-loader.js +1 -1
  55. package/lib/ascf-compiler/trustlist-js-verify-loader.js +1 -1
  56. package/lib/ascf-compiler/trustlist-verify/config.js +1 -1
  57. package/lib/ascf-compiler/trustlist-verify/utils.js +1 -1
  58. package/lib/ascf-compiler/trustlist-verify/verify-ignore-files.js +1 -1
  59. package/lib/ascf-compiler/vue-compiler/vue-compiler.d.ts +8 -0
  60. package/lib/ascf-compiler/vue-compiler/vue-compiler.js +1 -0
  61. package/lib/ascf-compiler/vue-compiler/vue.bundle.js +1 -1
  62. package/lib/ascf-compiler/web.webpack.config.js +1 -1
  63. package/lib/ascf-converter/ascfApisDiff.json +1 -1
  64. package/lib/ascf-converter/common/commonConfig.js +1 -1
  65. package/lib/ascf-converter/common/commonUtils.js +1 -1
  66. package/lib/ascf-converter/common/path-validator.js +1 -1
  67. package/lib/ascf-converter/common/textDocument.js +1 -1
  68. package/lib/ascf-converter/compiler-utils/parse5.bundle.js +1 -1
  69. package/lib/ascf-converter/convertManager.js +1 -1
  70. package/lib/ascf-converter/features/converter.js +1 -1
  71. package/lib/ascf-converter/features/fileHandle.js +1 -1
  72. package/lib/ascf-converter/features/transformReport.js +1 -1
  73. package/lib/ascf-converter/lib/apiadapter4alipay.js +1 -1
  74. package/lib/ascf-converter/parse/babelParser.js +1 -1
  75. package/lib/ascf-converter/parse/importVisitor.js +1 -1
  76. package/lib/ascf-converter/parse/wxssParser.js +1 -1
  77. package/lib/ascf-converter/report/js/index.js +1 -1
  78. package/lib/ascf-sign-tools/cli.js +1 -1
  79. package/lib/ascf-sign-tools/index.js +1 -1
  80. package/lib/bin/ascf.js +1 -1
  81. package/lib/commands/ascfbuild/index.js +1 -1
  82. package/lib/commands/build-npm/index.js +1 -1
  83. package/lib/commands/compile.js +1 -1
  84. package/lib/commands/convert.js +1 -1
  85. package/lib/commands/debugger/index.js +1 -1
  86. package/lib/commands/quickservice/index.js +1 -1
  87. package/lib/common/config.js +1 -1
  88. package/lib/common/constants.js +1 -1
  89. package/lib/common/log4js.js +1 -1
  90. package/lib/common/logger-plugin.js +1 -1
  91. package/lib/common/remove-strict-mode-plugin.js +1 -1
  92. package/lib/common/string-utils.js +1 -1
  93. package/lib/common/utils.js +1 -1
  94. package/lib/common/version-check.js +1 -1
  95. package/lib/index.d.ts +1 -1
  96. package/lib/index.js +1 -1
  97. package/package.json +7 -2
  98. package/lib/ascf-base/index.d.ts +0 -79
  99. package/lib/tools/release_64/SSL/ct_log_list.cnf +0 -9
  100. package/lib/tools/release_64/SSL/ct_log_list.cnf.dist +0 -9
  101. package/lib/tools/release_64/SSL/misc/CA.pl +0 -215
  102. package/lib/tools/release_64/SSL/misc/tsget.pl +0 -200
  103. package/lib/tools/release_64/SSL/openssl.cnf +0 -350
  104. package/lib/tools/release_64/SSL/openssl.cnf.dist +0 -350
  105. package/lib/tools/release_64/bin/c_rehash.pl +0 -251
  106. package/lib/tools/release_64/bin/libcrypto-1_1-x64.dll +0 -0
  107. package/lib/tools/release_64/bin/libssl-1_1-x64.dll +0 -0
  108. package/lib/tools/release_64/bin/openssl.exe +0 -0
@@ -1 +1 @@
1
- var _0x4c02f8=_0x12fe;function _typeof(t){var r=_0x12fe;return(_typeof=r(323)==typeof Symbol&&r(351)==typeof Symbol[r(321)]?function(t){return typeof t}:function(t){var e=r;return t&&e(323)==typeof Symbol&&t.constructor===Symbol&&t!==Symbol[e(383)]?e(351):typeof t})(t)}function _0x12fe(t,e){var r=_0x1945();return(_0x12fe=function(t,e){return r[t-=303]})(t,e)}function _classCallCheck(t,e){var r=_0x12fe;if(!(t instanceof e))throw new TypeError(r(342))}function _defineProperties(t,e){for(var r=_0x12fe,n=0;n<e[r(308)];n++){var o=e[n];o.enumerable=o[r(334)]||!1,o.configurable=!0,r(341)in o&&(o[r(344)]=!0),Object[r(303)](t,_toPropertyKey(o[r(311)]),o)}}function _createClass(t,e,r){var n=_0x12fe;return e&&_defineProperties(t[n(383)],e),r&&_defineProperties(t,r),Object[n(303)](t,n(383),{writable:!1}),t}function _toPropertyKey(t){var e=_0x12fe,t=_toPrimitive(t,e(335));return e(351)==_typeof(t)?t:t+""}function _0x1945(){var t=["attrs","concept","let pageData = ","ASCF","406428RVIrYN","getTime","stringify","transformTemplate","js/data.js","iterator","copyDir","function","transformJs","./ascfApisDiff.json","keys","report result: ","目标输出路径","12GBIbrQ","2NfPBqk","modelAll","文件总数","源项目路径","enumerable","string","wxssModular","@@toPrimitive must return a primitive value.","relative","values","api","value","Cannot call a class as a function","completely","writable","options",".json","transforms","version","lastIndexOf","transform","symbol","outputPath","components","838023AGeNOC","系统环境","jsonModular","939252ivqwRh","1559790MSyPFB","419097IsyOcL","getLogger","writeFileSync","87016lmpsuD","transformOther","otherModular","object",".css","templete","toPrimitive","init","转换耗时","call","platform","component","beginTime","status","assign","inputPath","info","utf8","306SdnzDq","7DuQFHv","tableInfo","prototype","forEach","defineProperty","resolve","pageData","15nRctZh","jsModular","length","10375057dYgQMw","concat","key"];return(_0x1945=function(){return t})()}function _toPrimitive(t,e){var r=_0x12fe;if(r(365)!=_typeof(t)||!t)return t;var n=t[Symbol[r(368)]];if(void 0===n)return(r(335)===e?String:Number)(t);n=n[r(371)](t,e||"default");if(r(365)!=_typeof(n))return n;throw new TypeError(r(337))}(()=>{for(var t=_0x12fe,e=_0x1945();;)try{if(430453==+parseInt(t(359))+parseInt(t(330))/2*(parseInt(t(354))/3)+parseInt(t(316))/4*(parseInt(t(306))/5)+parseInt(t(357))/6*(parseInt(t(381))/7)+-parseInt(t(362))/8*(-parseInt(t(380))/9)+-parseInt(t(358))/10+parseInt(t(309))/11*(-parseInt(t(329))/12))break;e.push(e.shift())}catch(t){e.push(e.shift())}})();var fs=require("fs"),path=require("path"),commonUtils=require("./common/commonUtils"),HAS_APIS=require(_0x4c02f8(325)),log4js=require("../common/log4js.js"),logger=log4js[_0x4c02f8(360)]("ConvertManager"),ConvertManager=(()=>{var s=_0x4c02f8;return _createClass(function t(){_classCallCheck(this,t)},[{key:s(369),value:function(t){var e=s,t=(this[e(345)]=Object[e(376)]({},t),this[e(305)]={transforms:{},configs:{},plugins:[],surroundings:{pcSystem:{name:e(355),val:process[e(372)]},nodeVersion:{name:"Node.js版本",val:process[e(348)]},version:{name:e(315),val:require("../../package.json")[e(348)]}},tableInfo:{"文件总数":0},opening:{},concept:{modelAll:0,completely:0,partial:0,notsupport:0}},this[e(305)][e(382)]);t[e(333)]=this[e(345)][e(377)],t[e(328)]=this.options.outputPath,this[e(374)]=(new Date)[e(317)]()}},{key:s(319),value:function(t,e){var r=s,n={status:1};e&&(n=HAS_APIS[r(373)][e]?Object[r(376)]({name:e},HAS_APIS[r(373)][e]):{status:3}),this[r(350)](r(367),t,n)}},{key:s(324),value:function(t,e){var r=s,e=HAS_APIS[r(340)][e]?Object[r(376)]({name:e},HAS_APIS.api[e]):{status:3};this[r(350)](r(307),t,e)}},{key:s(363),value:function(t){var e=s,r=(e(308),{".css":e(336),".json":e(356)}),n=t.substring(t[e(349)](".")),r=null!=(r=r[n])?r:e(364);n!==e(366)&&n!==e(346)&&r!==e(364)||this[e(350)](r,t,{status:1})}},{key:s(350),value:function(t,e,r){var n=s,e=path[n(338)](this[n(345)][n(352)],e);this[n(305)].transforms[e]=this[n(305)][n(347)][e]||{status:r[n(375)],components:[],type:t},null!=r&&r[n(312)]&&this[n(305)][n(347)][e][n(353)].push(r)}},{key:"report",value:function(){var n=s,o=this,t=((new Date)[n(317)]()-this.beginTime)/1e3+"s",e=this[n(305)].tableInfo,a=(e[n(370)]=t,e["文件总数"]=Object[n(326)](this[n(305)][n(347)])[n(308)],{1:n(343),2:"partial",3:"notsupport"}),t=(Object[n(339)](this[n(305)][n(347)])[n(384)](function(t){var e,r=n;null!=(e=t.components)&&e[r(308)]||(t.status=1),o[r(305)][r(313)][a[t[r(375)]]]+=1}),this[n(305)][n(313)][n(331)]=e[n(332)],n(314)+JSON[n(318)](this[n(305)],null," ")),e=path.resolve(this[n(345)][n(352)],"__ascfConvertReport"),t=(commonUtils[n(322)](path[n(304)](__dirname,"report"),e),fs[n(361)](path.resolve(e,n(320)),t,n(379)),path[n(304)](e,"index.html"));logger[n(378)](n(327)[n(310)](t))}}])})(),convertManager=new ConvertManager;module.exports=convertManager;
1
+ function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var o=0;o<e.length;o++){var a=e[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _createClass(t,e,o){return e&&_defineProperties(t.prototype,e),o&&_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function _toPropertyKey(t){t=_toPrimitive(t,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(t,e){if("object"!=_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0===o)return("string"===e?String:Number)(t);o=o.call(t,e||"default");if("object"!=_typeof(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}var fs=require("fs"),path=require("path"),commonUtils=require("./common/commonUtils"),HAS_APIS=require("./ascfApisDiff.json"),log4js=require("../common/log4js.js"),logger=log4js.getLogger("ConvertManager");function isExists(t,e){for(var o=0;o<t.length;o++)if(t[o].name===e)return!0;return!1}var ConvertManager=_createClass(function t(){_classCallCheck(this,t)},[{key:"init",value:function(t){this.options=Object.assign({},t),this.pageData={transforms:{},configs:{},plugins:[],surroundings:{pcSystem:{name:"系统环境",val:process.platform},nodeVersion:{name:"Node.js版本",val:process.version},version:{name:"ASCF",val:require("../../package.json").version}},tableInfo:{"文件总数":0},opening:{},concept:{modelAll:0,completely:0,partial:0,notsupport:0}};t=this.pageData.tableInfo;t["源项目路径"]=this.options.inputPath,t["目标输出路径"]=this.options.outputPath,this.beginTime=(new Date).getTime()}},{key:"transformTemplate",value:function(t,e){var o={status:1};e&&(o=HAS_APIS.component[e]?Object.assign({name:e},HAS_APIS.component[e]):{name:e,attrs:["此组件在ASCF框架中不支持,请先参考链接屏蔽,后续手动检查并实现等效功能"],doc:"https://developer.huawei.com/consumer/cn/doc/atomic-ascf/faqs-others-running-abnormally",status:3}),this.transform("templete",t,o)}},{key:"transformJs",value:function(t,e){e=HAS_APIS.api[e]?Object.assign({name:e},HAS_APIS.api[e]):{name:e,attrs:["此API在ASCF框架中不支持,请先参考链接屏蔽,后续手动检查并实现等效功能"],doc:"https://developer.huawei.com/consumer/cn/doc/atomic-ascf/faqs-others-running-abnormally",status:3};this.transform("jsModular",t,e)}},{key:"transformOther",value:function(t){var e=t.substring(t.lastIndexOf(".")),o=null!=(o={".css":"wxssModular",".json":"jsonModular"}[e])?o:"otherModular";".css"!==e&&".json"!==e&&"otherModular"!==o||this.transform(o,t,{status:1})}},{key:"transform",value:function(t,e,o){e=path.relative(this.options.outputPath,e);this.pageData.transforms[e]=this.pageData.transforms[e]||{status:o.status,components:[],type:t},o.status>this.pageData.transforms[e].status&&(this.pageData.transforms[e].status=o.status),null!=o&&o.attrs&&!isExists(this.pageData.transforms[e].components,o.name)&&this.pageData.transforms[e].components.push(o)}},{key:"report",value:function(){var o=this,t=((new Date).getTime()-this.beginTime)/1e3+"s",e=this.pageData.tableInfo,a=(e["转换耗时"]=t,e["文件总数"]=Object.keys(this.pageData.transforms).length,{1:"completely",2:"partial",3:"notsupport"}),t=(Object.values(this.pageData.transforms).forEach(function(t){var e;null!=(e=t.components)&&e.length||(t.status=1),o.pageData.concept[a[t.status]]+=1}),this.pageData.concept.modelAll=e["文件总数"],"let pageData = "+JSON.stringify(this.pageData,null," ")),e=path.resolve(this.options.outputPath,"__ascfConvertReport"),t=(commonUtils.copyDir(path.resolve(__dirname,"report"),e),fs.writeFileSync(path.resolve(e,"js/data.js"),t,"utf8"),path.resolve(e,"index.html"));logger.info("report result: ".concat(t))}}]),convertManager=new ConvertManager;module.exports=convertManager;
@@ -1 +1 @@
1
- var _0xcdaa16=_0xb29e;function _regenerator(){var g,v=_0xb29e,r=v(504)==typeof Symbol?Symbol:{},e=r[v(427)]||v(419),n=r[v(469)]||v(508);function t(r,e,n,t){var o,a,i,c,s,f,u,m,p,_,l=v,e=e&&e[l(481)]instanceof y?e:y,e=Object[l(457)](e[l(481)]);return _regeneratorDefine2(e,"_invoke",(o=r,a=n,m=t||[],p=!1,_={p:u=0,n:0,v:g,a:h,f:h[(f=l)(444)](g,4),d:function(r,e){return i=r,c=0,s=g,_.n=e,d}},function(r,e,n){var t=f;if(1<u)throw TypeError(t(507));for(p&&1===e&&h(e,n),c=e,s=n;(x=c<2?g:s)||!p;){i||(c?c<3?(1<c&&(_.n=-1),h(c,s)):_.n=s:_.v=s);try{if(u=2,i){if(c||(r=t(426)),x=i[r]){if(!(x=x[t(417)](i,s)))throw TypeError(t(446));if(!x[t(471)])return x;s=x[t(435)],c<2&&(c=0)}else 1===c&&(x=i[t(460)])&&x[t(417)](i),c<2&&(s=TypeError(t(480)+r+t(463)),c=1);i=g}else if((x=(p=_.n<0)?s:o.call(a,_))!==d)break}catch(r){i=g,c=1,s=r}finally{u=1}}return{value:x,done:p}}),!0),e;function h(r,e){var n=f;for(c=r,s=e,x=0;!p&&u&&!t&&x<m[n(514)];x++){var t,o=m[x],a=_.p,i=o[2];3<r?(t=i===e)&&(s=o[(c=o[4])?5:c=3],o[4]=o[5]=g):o[0]<=a&&((t=r<2&&a<o[1])?(c=0,_.v=e,_.n=o[1]):a<i&&(t=r<3||o[0]>e||i<e)&&(o[4]=r,o[5]=e,_.n=i,c=0))}if(t||1<r)return d;throw p=!0,e}}var d={};function y(){}function o(){}function a(){}var x=Object[v(513)],r=[][e]?x(x([][e]())):(_regeneratorDefine2(x={},e,function(){return this}),x),i=a[v(481)]=y[v(481)]=Object.create(r);function c(r){var e=v;return Object[e(423)]?Object.setPrototypeOf(r,a):(r[e(475)]=a,_regeneratorDefine2(r,n,e(501))),r[e(481)]=Object[e(457)](i),r}return o.prototype=a,_regeneratorDefine2(i,v(503),a),_regeneratorDefine2(a,v(503),o),o[v(494)]=v(501),_regeneratorDefine2(a,n,v(501)),_regeneratorDefine2(i),_regeneratorDefine2(i,n,"Generator"),_regeneratorDefine2(i,e,function(){return this}),_regeneratorDefine2(i,v(428),function(){return v(465)}),(_regenerator=function(){return{w:t,m:c}})()}function _regeneratorDefine2(r,e,n,t){var a=Object.defineProperty;try{a({},"",{})}catch(r){a=0}(_regeneratorDefine2=function(r,e,n,t){var o=_0xb29e;e?a?a(r,e,{value:n,enumerable:!t,configurable:!t,writable:!t}):r[e]=n:((t=function(e,n){_regeneratorDefine2(r,e,function(r){return this[_0xb29e(436)](e,n,r)})})(o(426),0),t("throw",1),t(o(460),2))})(r,e,n,t)}function asyncGeneratorStep(r,e,n,t,o,a,i){var c=_0xb29e;try{var s=r[a](i),f=s[c(435)]}catch(r){return void n(r)}s[c(471)]?e(f):Promise[c(500)](f)[c(441)](t,o)}function _asyncToGenerator(s){return function(){var r=this,c=arguments;return new Promise(function(e,n){var t=_0xb29e,o=s[t(492)](r,c);function a(r){asyncGeneratorStep(o,e,n,a,i,t(426),r)}function i(r){asyncGeneratorStep(o,e,n,a,i,"throw",r)}a(void 0)})}}(()=>{for(var r=_0xb29e,e=_0x29af();;)try{if(127549==-parseInt(r(488))+-parseInt(r(420))/2+parseInt(r(466))/3+parseInt(r(450))/4+parseInt(r(464))/5*(parseInt(r(489))/6)+-parseInt(r(459))/7*(parseInt(r(456))/8)+parseInt(r(430))/9*(parseInt(r(496))/10))break;e.push(e.shift())}catch(r){e.push(e.shift())}})(),Object.defineProperty(exports,_0xcdaa16(479),{value:!0}),exports[_0xcdaa16(511)]=exports[_0xcdaa16(485)]=exports[_0xcdaa16(438)]=void 0;var commonConfig_1=require(_0xcdaa16(422)),path=require("path"),fs=require("fs"),commonUtils_1=require(_0xcdaa16(491)),_require=require("../../common/utils"),clearResource=_require[_0xcdaa16(437)],log4js=require("../../common/log4js.js"),logger=log4js.getLogger("converter"),_require2=require("../features/transformReport"),addTransformUrl=_require2.addTransformUrl,convertManager=require(_0xcdaa16(506));function confirmConverterFun(r,e){return _confirmConverterFun[_0xcdaa16(492)](this,arguments)}function _confirmConverterFun(){var r=_0xcdaa16;return(_confirmConverterFun=_asyncToGenerator(_regenerator().m(function r(n,t){var o,a;return _regenerator().w(function(r){for(var e=_0xb29e;;)switch(r.p=r.n){case 0:if(r.p=0,o=path.resolve(n[e(476)],e(425)),a=path.resolve(n[e(476)],"project.config.json"),fs[e(473)](a)||!fs[e(473)](o)||n[e(452)]){r.n=1;break}return r.a(2,{command:e(468)});case 1:return r.n=2,doConvert(n,t);case 2:return r.a(2,r.v);case 3:r.n=5;break;case 4:return r.p=4,a=r.v,logger[e(487)](a),r.a(2,{command:e(495),errorMessage:a[e(493)]});case 5:return r.a(2)}},r,null,[[0,4]])})))[r(492)](this,arguments)}function confirmConverterH5Fun(r,e){var n=_0xcdaa16,t=path[n(499)](r.outPath,r[n(442)]);try{return commonUtils_1[n(478)](t,n(454),!0),commonUtils_1[n(509)](path[n(499)](__filename,"../lib","src"),path[n(499)](t,n(454)),!1,!0),commonUtils_1[n(467)](r,path[n(499)](t,n(454))),{command:n(510)}}catch(r){return logger[n(487)](r),{command:n(495),errorMessage:r[n(493)]}}}function checkConvertOutput(r,e){var n=_0xcdaa16,r=path.resolve(r),e=path.resolve(e);if(fs[n(473)](e))throw new Error("Output path "[n(470)](e,n(455)));if(e[n(424)](r+path[n(443)]))throw new Error(n(486))}function doConvert(r,e){return _doConvert[_0xcdaa16(492)](this,arguments)}function _doConvert(){var r=_0xcdaa16;return(_doConvert=_asyncToGenerator(_regenerator().m(function r(n,e){var t,o,a;return _regenerator().w(function(r){for(var e=_0xb29e;;)switch(r.p=r.n){case 0:if(t=path[e(500)](n.outPath,e(429)),process[e(474)][e(437)]===e(434))return r.n=1,clearResource([t]);r.n=1;break;case 1:return checkConvertOutput(n[e(476)],t),o=commonConfig_1.Applets[e(449)],convertManager[e(482)]({appletType:commonConfig_1[e(421)].appletType,inputPath:n[e(476)],outputPath:t}),r.p=2,commonUtils_1.createDirs(t,o),commonUtils_1[e(433)](t,n[e(476)]),a=path[e(499)](t,o),"./"===o||""===o?(commonUtils_1[e(498)](n[e(476)],a),commonUtils_1[e(509)](n[e(476)],a)):(commonUtils_1[e(498)](path[e(499)](n[e(476)],o),a),commonUtils_1[e(509)](path.join(n.inputPath,o),a),commonUtils_1[e(445)](path[e(499)](n[e(476)]),t)),commonUtils_1[e(431)](),commonUtils_1[e(448)](path[e(499)](t,o),n),commonUtils_1[e(440)](path[e(499)](t)),"my"===commonConfig_1.Applets.appletType&&commonUtils_1.adaptApiFile(t,path[e(499)](__filename,e(432))),addTransformUrl(),convertManager[e(451)](),r.a(2,{command:"completeTransform",folderUrl:t});case 3:return r.p=3,a=r.v,logger[e(487)](a),removePromise(t)[e(461)](),r.a(2,{command:e(495),errorMessage:a[e(493)]})}},r,null,[[2,3]])})))[r(492)](this,arguments)}function _0xb29e(r,e){var n=_0x29af();return(_0xb29e=function(r,e){return n[r-=416]})(r,e)}function removePromise(a){return new Promise(function(o,r){fs.stat(a,function(r,e){var t=_0xb29e;e[t(453)]()?fs.readdir(a,function(r,e){var n=t,e=(e=e[n(472)](function(r){return path[n(499)](a,r)})).map(function(r){return removePromise(r)});Promise.all(e).then(function(){fs[n(484)](a,o)})}):fs[t(439)](a,o)})})}function checkInputPathFun(r){var e=_0xcdaa16,r=path.resolve(r),n=checkMiniProgram(r);return{command:e(458),data:{returnCode:n,outPath:path[e(502)](r)}}}function _0x29af(){var r=["projectFileSuffix","setOriginPtahObject","join","resolve","GeneratorFunction","dirname","constructor","function","readFileSync","../convertManager.js","Generator is already running","@@toStringTag","copyDir","completeTransform","checkInputPathFun","isArray","getPrototypeOf","length","pages","keys","call","hxml","@@iterator","365850nViFVc","Applets","../common/commonConfig","setPrototypeOf","startsWith","app.json","next","iterator","toString","ascf/ascf_src","523512PboAml","transformNodeModuleComponent","../../","createTransformReportFile","yes","value","_invoke","clearResource","confirmConverterFun","unlink","projectConfigFile","then","packageName","sep","bind","copyConfigFiles","iterator result is not an object","smartProgramRoot","appJsonFile","srcRootPath","788524PoGoXy","report","confirmAddConfig","isDirectory","src"," is exists. Use the -c parameter to clear.","120JwwCAc","create","postInputPath","48895XwzSjT","return","finally","miniprogramRoot","' method","991195SVUxcA","[object Generator]","466314KWEeRZ","handleConfigInfo","notifyConfig","toStringTag","concat","done","map","existsSync","env","__proto__","inputPath","parse","createDirs","__esModule","The iterator does not provide a '","prototype","init","configBasenameArray","rmdir","confirmConverterH5Fun","Output directory cannot be a subdirectory of the input directory.","error","193727SMNovJ","6sGZCTQ","appletType","../common/commonUtils","apply","message","displayName","failedTransform","10DMcREI"];return(_0x29af=function(){return r})()}function checkMiniProgram(r){var e=_0xcdaa16,n=!0,t=path[e(499)](r,"app.json");return n=fs[e(473)](t)&&identifyProgram(r)?n:!1}function identifyProgram(r){var e=_0xcdaa16;try{var n=path.join(r,e(425)),t=JSON[e(477)](fs[e(505)](n)[e(428)]());if(t&&t[e(515)]&&Array[e(512)](t[e(515)])&&0<t[e(515)].length)for(var o=getSrcRootPath(r),a=0,i=Object[e(416)](commonConfig_1.projectFileSuffix);a<i[e(514)];a++){var c=i[a],s=path[e(499)](r,o,t[e(515)][0]+commonConfig_1[e(497)][c][e(418)]);if(fs.existsSync(s))return commonConfig_1[e(421)][e(490)]="wx"===c?"tt":c,!0}return!1}catch(r){return!1}}function getSrcRootPath(r){var e=_0xcdaa16;commonConfig_1.Applets[e(449)]="./";for(var n=0;n<commonConfig_1[e(483)][e(514)];n++){var t=commonConfig_1.configBasenameArray[n],t=path[e(499)](r,t);fs[e(473)](t)&&((t=JSON.parse(fs.readFileSync(t)[e(428)]())).miniprogramRoot?commonConfig_1[e(421)][e(449)]=t[e(462)]:t[e(447)]?commonConfig_1[e(421)][e(449)]=t[e(447)]:commonConfig_1.Applets[e(449)]="./")}return commonConfig_1[e(421)].srcRootPath}exports[_0xcdaa16(438)]=confirmConverterFun,exports[_0xcdaa16(485)]=confirmConverterH5Fun,exports[_0xcdaa16(511)]=checkInputPathFun;
1
+ function _regenerator(){var h,r="function"==typeof Symbol?Symbol:{},e=r.iterator||"@@iterator",n=r.toStringTag||"@@toStringTag";function t(r,e,n,t){var o,a,i,c,s,u,p,f,m,e=e&&e.prototype instanceof _?e:_,e=Object.create(e.prototype);return _regeneratorDefine2(e,"_invoke",(o=r,a=n,p=t||[],f=!1,m={p:u=0,n:0,v:h,a:l,f:l.bind(h,4),d:function(r,e){return i=r,c=0,s=h,m.n=e,g}},function(r,e,n){if(1<u)throw TypeError("Generator is already running");for(f&&1===e&&l(e,n),c=e,s=n;(v=c<2?h:s)||!f;){i||(c?c<3?(1<c&&(m.n=-1),l(c,s)):m.n=s:m.v=s);try{if(u=2,i){if(v=i[r=c?r:"next"]){if(!(v=v.call(i,s)))throw TypeError("iterator result is not an object");if(!v.done)return v;s=v.value,c<2&&(c=0)}else 1===c&&(v=i.return)&&v.call(i),c<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),c=1);i=h}else if((v=(f=m.n<0)?s:o.call(a,m))!==g)break}catch(r){i=h,c=1,s=r}finally{u=1}}return{value:v,done:f}}),!0),e;function l(r,e){for(c=r,s=e,v=0;!f&&u&&!n&&v<p.length;v++){var n,t=p[v],o=m.p,a=t[2];3<r?(n=a===e)&&(s=t[(c=t[4])?5:c=3],t[4]=t[5]=h):t[0]<=o&&((n=r<2&&o<t[1])?(c=0,m.v=e,m.n=t[1]):o<a&&(n=r<3||t[0]>e||a<e)&&(t[4]=r,t[5]=e,m.n=a,c=0))}if(n||1<r)return g;throw f=!0,e}}var g={};function _(){}function o(){}function a(){}var v=Object.getPrototypeOf,r=[][e]?v(v([][e]())):(_regeneratorDefine2(v={},e,function(){return this}),v),i=a.prototype=_.prototype=Object.create(r);function c(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,a):(r.__proto__=a,_regeneratorDefine2(r,n,"GeneratorFunction")),r.prototype=Object.create(i),r}return _regeneratorDefine2(i,"constructor",o.prototype=a),_regeneratorDefine2(a,"constructor",o),_regeneratorDefine2(a,n,o.displayName="GeneratorFunction"),_regeneratorDefine2(i),_regeneratorDefine2(i,n,"Generator"),_regeneratorDefine2(i,e,function(){return this}),_regeneratorDefine2(i,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:t,m:c}})()}function _regeneratorDefine2(r,e,n,t){var a=Object.defineProperty;try{a({},"",{})}catch(r){a=0}(_regeneratorDefine2=function(r,e,n,t){function o(e,n){_regeneratorDefine2(r,e,function(r){return this._invoke(e,n,r)})}e?a?a(r,e,{value:n,enumerable:!t,configurable:!t,writable:!t}):r[e]=n:(o("next",0),o("throw",1),o("return",2))})(r,e,n,t)}function asyncGeneratorStep(r,e,n,t,o,a,i){try{var c=r[a](i),s=c.value}catch(r){return void n(r)}c.done?e(s):Promise.resolve(s).then(t,o)}function _asyncToGenerator(c){return function(){var r=this,i=arguments;return new Promise(function(e,n){var t=c.apply(r,i);function o(r){asyncGeneratorStep(t,e,n,o,a,"next",r)}function a(r){asyncGeneratorStep(t,e,n,o,a,"throw",r)}o(void 0)})}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkInputPathFun=exports.confirmConverterH5Fun=exports.confirmConverterFun=void 0;var commonConfig_1=require("../common/commonConfig"),path=require("path"),fs=require("fs"),commonUtils_1=require("../common/commonUtils"),_require=require("../../common/utils"),clearResource=_require.clearResource,log4js=require("../../common/log4js.js"),logger=log4js.getLogger("converter"),_require2=require("../features/transformReport"),addTransformUrl=_require2.addTransformUrl,convertManager=require("../convertManager.js");function confirmConverterFun(r,e){return _confirmConverterFun.apply(this,arguments)}function _confirmConverterFun(){return(_confirmConverterFun=_asyncToGenerator(_regenerator().m(function r(e,n){var t,o;return _regenerator().w(function(r){for(;;)switch(r.p=r.n){case 0:if(r.p=0,t=path.resolve(e.inputPath,"app.json"),o=path.resolve(e.inputPath,"project.config.json"),fs.existsSync(o)||!fs.existsSync(t)||e.confirmAddConfig){r.n=1;break}return r.a(2,{command:"notifyConfig"});case 1:return r.n=2,doConvert(e,n);case 2:return r.a(2,r.v);case 3:r.n=5;break;case 4:return r.p=4,o=r.v,logger.error(o),r.a(2,{command:"failedTransform",errorMessage:o.message});case 5:return r.a(2)}},r,null,[[0,4]])}))).apply(this,arguments)}function confirmConverterH5Fun(r,e){var n=path.join(r.outPath,r.packageName);try{return commonUtils_1.createDirs(n,"src",!0),commonUtils_1.copyDir(path.join(__filename,"../lib","src"),path.join(n,"src"),!1,!0),commonUtils_1.handleConfigInfo(r,path.join(n,"src")),{command:"completeTransform"}}catch(r){return logger.error(r),{command:"failedTransform",errorMessage:r.message}}}function checkConvertOutput(r,e){r=path.resolve(r),e=path.resolve(e);if(fs.existsSync(e))throw new Error("Output path ".concat(e," is exists. Use the -c parameter to clear."));if(e.startsWith(r+path.sep))throw new Error("Output directory cannot be a subdirectory of the input directory.")}function doConvert(r,e){return _doConvert.apply(this,arguments)}function _doConvert(){return(_doConvert=_asyncToGenerator(_regenerator().m(function r(e,n){var t,o,a;return _regenerator().w(function(r){for(;;)switch(r.p=r.n){case 0:if(t=path.resolve(e.outPath,"ascf/ascf_src"),"yes"===process.env.clearResource)return r.n=1,clearResource([t]);r.n=1;break;case 1:return checkConvertOutput(e.inputPath,t),o=commonConfig_1.Applets.srcRootPath,convertManager.init({appletType:commonConfig_1.Applets.appletType,inputPath:e.inputPath,outputPath:t}),r.p=2,commonUtils_1.createDirs(t,o),commonUtils_1.createTransformReportFile(t,e.inputPath),a=path.join(t,o),"./"===o||""===o?(commonUtils_1.setOriginPtahObject(e.inputPath,a),commonUtils_1.copyDir(e.inputPath,a)):(commonUtils_1.setOriginPtahObject(path.join(e.inputPath,o),a),commonUtils_1.copyDir(path.join(e.inputPath,o),a),commonUtils_1.copyConfigFiles(path.join(e.inputPath),t)),commonUtils_1.transformNodeModuleComponent(),commonUtils_1.appJsonFile(path.join(t,o),e),commonUtils_1.projectConfigFile(path.join(t)),"my"===commonConfig_1.Applets.appletType&&commonUtils_1.adaptApiFile(t,path.join(__filename,"../../")),addTransformUrl(),convertManager.report(),r.a(2,{command:"completeTransform",folderUrl:t});case 3:return r.p=3,a=r.v,logger.error(a),removePromise(t).finally(),r.a(2,{command:"failedTransform",errorMessage:a.message})}},r,null,[[2,3]])}))).apply(this,arguments)}function removePromise(t){return new Promise(function(n,r){fs.stat(t,function(r,e){e.isDirectory()?fs.readdir(t,function(r,e){e=(e=e.map(function(r){return path.join(t,r)})).map(function(r){return removePromise(r)});Promise.all(e).then(function(){fs.rmdir(t,n)})}):fs.unlink(t,n)})})}function checkInputPathFun(r){r=path.resolve(r);return{command:"postInputPath",data:{returnCode:checkMiniProgram(r),outPath:path.dirname(r)}}}function checkMiniProgram(r){var e=!0,n=path.join(r,"app.json");return e=fs.existsSync(n)&&identifyProgram(r)?e:!1}function identifyProgram(r){try{var e=path.join(r,"app.json"),n=JSON.parse(fs.readFileSync(e).toString());if(n&&n.pages&&Array.isArray(n.pages)&&0<n.pages.length)for(var t=getSrcRootPath(r),o=0,a=Object.keys(commonConfig_1.projectFileSuffix);o<a.length;o++){var i=a[o],c=path.join(r,t,n.pages[0]+commonConfig_1.projectFileSuffix[i].hxml);if(fs.existsSync(c))return commonConfig_1.Applets.appletType="wx"===i?"tt":i,!0}return!1}catch(r){return!1}}function getSrcRootPath(r){commonConfig_1.Applets.srcRootPath="./";for(var e=0;e<commonConfig_1.configBasenameArray.length;e++){var n=commonConfig_1.configBasenameArray[e],n=path.join(r,n);fs.existsSync(n)&&((n=JSON.parse(fs.readFileSync(n).toString())).miniprogramRoot?commonConfig_1.Applets.srcRootPath=n.miniprogramRoot:n.smartProgramRoot?commonConfig_1.Applets.srcRootPath=n.smartProgramRoot:commonConfig_1.Applets.srcRootPath="./")}return commonConfig_1.Applets.srcRootPath}exports.confirmConverterFun=confirmConverterFun,exports.confirmConverterH5Fun=confirmConverterH5Fun,exports.checkInputPathFun=checkInputPathFun;
@@ -1 +1 @@
1
- var globalDistanceCount,globalJsLine,_0x358e95=_0x3ead,path=((()=>{for(var e=_0x3ead,t=_0x378f();;)try{if(635914==+parseInt(e(236))*(-parseInt(e(193))/2)+parseInt(e(245))/3*(parseInt(e(195))/4)+-parseInt(e(223))/5*(parseInt(e(186))/6)+parseInt(e(201))/7*(parseInt(e(225))/8)+parseInt(e(204))/9+parseInt(e(250))/10+-parseInt(e(231))/11*(parseInt(e(252))/12))break;t.push(t.shift())}catch(e){t.push(t.shift())}})(),Object[_0x358e95(220)](exports,_0x358e95(218),{value:!0}),exports.transformJsPath=exports.transformJsFile=exports[_0x358e95(198)]=exports[_0x358e95(247)]=exports[_0x358e95(196)]=void 0,require(_0x358e95(199))),fs=require("fs"),_require=require(_0x358e95(240)),create=_require[_0x358e95(214)],fileHandle_1=require(_0x358e95(194)),commonConfig_1=require(_0x358e95(192)),commonUtils_1=require("../common/commonUtils"),importVisitor_1=require(_0x358e95(222)),wxssParser_1=require(_0x358e95(226)),commonConfig_2=require("../common/commonConfig"),TransformReport=require(_0x358e95(224)),parse5=require(_0x358e95(262)),_require2=require(_0x358e95(258)),configs=_require2.configs,convertManager=require(_0x358e95(251)),insertedApiObj={},insertedApiCountObj={},excessOffsets={},DEST_API_NAME=_0x358e95(221),DEST_API_LEN=DEST_API_NAME[_0x358e95(203)];function handleWxssImport(e,r,n){var o=_0x358e95,s=commonConfig_1.projectFileSuffix[n],e=create(e,r),e=(r=e[o(239)](),wxssParser_1[o(207)](r,e,s.css,n)),a=0;return e[o(197)](function(e){var t=o;e[t(235)]===t(232)?(";"!==r[e.endOffset+1-a]&&(e.endOffset=e.endOffset+1),r=commonUtils_1.replacepos(r,e[t(254)]-s.css[t(203)]-a,e[t(254)]-a,".css"),a+=s.css[t(203)]-4):(r=commonUtils_1[t(189)](r,e[t(233)]-a,e[t(233)]+n.length+1-a,""),a+=n.length+1)}),r}function handleWxmlFile(e,t,r,n){var o=_0x358e95,t=create(e,t),t=parse5[o(227)](t[o(239)](),{}),e={filePath:e,srcPath:r,appType:n,utils:{commonConfig:commonConfig_1,importVisitor:importVisitor_1,textDocument:{create:create},fileHandle:fileHandle_1}};return parse5[o(200)](t,{convertOptions:e})}function transformWxSchemas(e,t,r){var n=_0x358e95,o=e.moduleRange.start,t=t[n(249)]({line:o.line-1,character:o[n(185)]+1});return r=commonUtils_1[n(189)](r,t+globalDistanceCount,t+e[n(234)].length+globalDistanceCount,n(260)),globalDistanceCount-=e[n(234)][n(203)]-4,r}function transformWxmlWxsFilePath(e,t,r){var n=_0x358e95,o=e[n(243)].start,t=t.offsetAt({line:o.line-1,character:o[n(185)]});return r=commonUtils_1[n(189)](r,t+globalDistanceCount,t+globalDistanceCount+e[n(234)][n(203)]-1,4===e[n(234)][n(203)]?"hjs":n(191))}function transformWxsFilePath(e,a,i,c,t){var l=_0x358e95,f=0,m=commonConfig_1[l(246)][t];return e[l(197)](function(e){var t=l;if(path[t(259)](e.module)===m[t(212)]){var r=e[t(234)],n=e[t(243)][t(213)],n=a.offsetAt({line:n[t(238)]-1,character:n[t(185)]-1})+f,o=e[t(234)][t(228)](0,e[t(234)][t(203)]-(m[t(212)][t(203)]-1))+t(212);if(r&&!r[t(244)]("./")&&!r[t(244)]("../")){var s=path.join(c,"..",r);if(!path[t(259)](s))return;fs[t(230)](s)&&(s=".",r[t(244)]("/")?f+=1:(s="./",f+=2),o=s+o)}i=commonUtils_1[t(189)](i,n,n+e[t(234)][t(203)],o)}}),i}function calProcessedApis(e,t){e[t]?e[t]++:e[t]=1}function notDealtWith(e,t){var r=_0x358e95;return-1!==commonConfig_2[r(255)][r(253)](e[r(242)])&&!(-1!==Object.keys(insertedApiObj)[r(253)](t)&&insertedApiObj[t]===e[r(242)])}function insertTodoInline(e,t,r,n){var o=_0x358e95,s=1,n="// ".concat(commonUtils_1[o(190)](o(216)),"api ")[o(210)](DEST_API_NAME,".")[o(210)](n[o(242)],o(241)),r=(1===insertedApiCountObj[t]&&(s=0,n+="\n",globalJsLine++),r+globalDistanceCount-excessOffsets[t]-s);return e=commonUtils_1.insertStr(e,r,n),globalDistanceCount+=n[o(203)],e}function _0x3ead(e,t){var r=_0x378f();return(_0x3ead=function(e,t){return r[e-=185]})(e,t)}function transformWxInterface(e,t,r,n){var o=_0x358e95,s=e[o(243)][o(213)],a=t[o(219)]()+"-"+s[o(238)],i=t[o(249)]({line:s.line-1,character:s[o(185)]}),c=i+globalDistanceCount;return r=commonUtils_1[o(189)](r,c,c+n[o(203)],DEST_API_NAME),globalDistanceCount+=DEST_API_LEN-n.length,calProcessedApis(excessOffsets,a),commonConfig_2[o(188)][e[o(242)]]?(c=i+globalDistanceCount+n[o(203)]+1,r=commonUtils_1[o(189)](r,c,c+e[o(242)].length,commonConfig_2[o(188)][e[o(242)]]),i=e[o(242)].length-commonConfig_2[o(188)][e[o(242)]][o(203)],globalDistanceCount-=i,excessOffsets[a]-=i):notDealtWith(e,a)&&(calProcessedApis(insertedApiCountObj,a),n=t.offsetAt({line:s[o(238)]-1,character:0}),c=s[o(238)],configs[o(202)]||(r=insertTodoInline(r,a,n,e)),i=t[o(219)]()+' {"line":'+(c+globalJsLine)+',"column":'+s.character+"}",TransformReport[o(261)](""[o(210)](commonUtils_1[o(190)](o(216)),o(208))[o(210)](DEST_API_NAME,".")[o(210)](e[o(242)]),i),insertedApiObj[a]=e[o(242)]),r}function transformJsFile(r,n,o,s){var a=_0x358e95,i=create(r,o),e=(o=i[a(239)](),importVisitor_1[a(205)](o,null,null,s));return globalJsLine=globalDistanceCount=0,e[a(197)](function(e){var t=a;switch(e[t(235)]){case t(217):o=transformJsPath(e,n,o,i);break;case t(256):o=transformWxInterface(e,i,o,s),convertManager[t(206)](r,"".concat(DEST_API_NAME,".")[t(210)](e[t(242)]));break;case t(257):o=transformWxmlWxsFilePath(e,i,o);break;case t(248):o=transformWxSchemas(e,i,o);break;case t(229):o=transformComponentMixins(e,i,o)}}),o}function _0x378f(){var e=["startOffset","module","type","3683hziZGG","../","line","getText","../common/textDocument"," TODO","property","moduleRange","startsWith","101028DtIgiQ","projectFileSuffix","handleWxmlFile","wxSchema","offsetAt","7748480YeepEh","../convertManager","29568cWAJOw","indexOf","endOffset","invalidApis","wxInterface","filePath","../../common/config","extname","has:","writeInfo","../compiler-utils/parse5.bundle","character","7303488SAeAxk","behaviors","interfacesForTransform","replacepos","setLanguage","hxml","../common/commonConfig","634LVKVWS","../features/fileHandle","64WuAgeR","handleWxssImport","forEach","transformWxsFilePath","path","serialize","7wJLkmY","notaddtodo","length","10033938NfqPlY","getImportRules","transformJs","wxssParser","api ","join","concat","transformJsFile","hjs","start","create","transformJsPath","notSupport","fileImport","__esModule","uri","defineProperty","has","../parse/importVisitor","5VvlgdK","./transformReport","5900024PlDLoI","../parse/wxssParser","parseFragment","substring","mixins","existsSync","649oPPmBI","import"];return(_0x378f=function(){return e})()}function transformComponentMixins(e,t,r){var n=_0x358e95,o=e.moduleRange.start,t=t.offsetAt({line:o[n(238)]-1,character:o[n(185)]});return r=commonUtils_1[n(189)](r,t+globalDistanceCount,t+e[n(234)][n(203)]+globalDistanceCount,n(187)),globalDistanceCount-=e[n(234)][n(203)]-9,r}function transformJsPath(e,t,r,n){var o=_0x358e95,s=e[o(234)];return!s||s.startsWith("./")||s.startsWith(o(237))||(t=path[o(209)](t,"..",s),path[o(259)](t)||(t+=".js"),fs[o(230)](t)&&(t=e[o(243)].start,e=n[o(249)]({line:t[o(238)]-1,character:t[o(185)]-1})+globalDistanceCount,n=".",s[o(244)]("/")?globalDistanceCount+=1:(n="./",globalDistanceCount+=2),r=commonUtils_1.insertStr(r,e,n))),r}exports[_0x358e95(196)]=handleWxssImport,exports[_0x358e95(247)]=handleWxmlFile,exports[_0x358e95(198)]=transformWxsFilePath,exports[_0x358e95(211)]=transformJsFile,exports[_0x358e95(215)]=transformJsPath;
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.transformJsPath=exports.transformJsFile=exports.transformWxsFilePath=exports.handleWxmlFile=exports.handleWxssImport=void 0;var globalDistanceCount,globalJsLine,path=require("path"),fs=require("fs"),_require=require("../common/textDocument"),create=_require.create,fileHandle_1=require("../features/fileHandle"),commonConfig_1=require("../common/commonConfig"),commonUtils_1=require("../common/commonUtils"),importVisitor_1=require("../parse/importVisitor"),wxssParser_1=require("../parse/wxssParser"),commonConfig_2=require("../common/commonConfig"),TransformReport=require("./transformReport"),parse5=require("../compiler-utils/parse5.bundle"),_require2=require("../../common/config"),configs=_require2.configs,convertManager=require("../convertManager"),insertedApiObj={},insertedApiCountObj={},excessOffsets={},DEST_API_NAME="has",DEST_API_LEN=DEST_API_NAME.length;function handleWxssImport(e,t,r){var n=commonConfig_1.projectFileSuffix[r],e=create(e,t),e=(t=e.getText(),wxssParser_1.wxssParser(t,e,n.css,r)),o=0;return e.forEach(function(e){"import"===e.type?(";"!==t[e.endOffset+1-o]&&(e.endOffset=e.endOffset+1),t=commonUtils_1.replacepos(t,e.endOffset-n.css.length-o,e.endOffset-o,".css"),o+=n.css.length-4):(t=commonUtils_1.replacepos(t,e.startOffset-o,e.startOffset+r.length+1-o,""),o+=r.length+1)}),t}function handleWxmlFile(e,t,r,n){t=create(e,t),t=parse5.parseFragment(t.getText(),{});return parse5.serialize(t,{convertOptions:{filePath:e,srcPath:r,appType:n,utils:{commonConfig:commonConfig_1,importVisitor:importVisitor_1,textDocument:{create:create},fileHandle:fileHandle_1}}})}function transformWxSchemas(e,t,r){var n=e.moduleRange.start,t=t.offsetAt({line:n.line-1,character:n.character+1});return r=commonUtils_1.replacepos(r,t+globalDistanceCount,t+e.module.length+globalDistanceCount,"has:"),globalDistanceCount-=e.module.length-4,r}function transformWxmlWxsFilePath(e,t,r){var n=e.moduleRange.start,t=t.offsetAt({line:n.line-1,character:n.character});return r=commonUtils_1.replacepos(r,t+globalDistanceCount,t+globalDistanceCount+e.module.length-1,4===e.module.length?"hjs":"hxml")}function transformWxsFilePath(e,s,a,i,t){var l=0,c=commonConfig_1.projectFileSuffix[t];return e.forEach(function(e){if(path.extname(e.module)===c.hjs){var t=e.module,r=e.moduleRange.start,r=s.offsetAt({line:r.line-1,character:r.character-1})+l,n=e.module.substring(0,e.module.length-(c.hjs.length-1))+"hjs";if(t&&!t.startsWith("./")&&!t.startsWith("../")){var o=path.join(i,"..",t);if(!path.extname(o))return;fs.existsSync(o)&&(o=".",t.startsWith("/")?l+=1:(o="./",l+=2),n=o+n)}a=commonUtils_1.replacepos(a,r,r+e.module.length,n)}}),a}function calProcessedApis(e,t){e[t]?e[t]++:e[t]=1}function notDealtWith(e,t){return-1!==commonConfig_2.invalidApis.indexOf(e.property)&&!(-1!==Object.keys(insertedApiObj).indexOf(t)&&insertedApiObj[t]===e.property)}function insertTodoInline(e,t,r,n){var o=1,n="// ".concat(commonUtils_1.setLanguage("notSupport"),"api ").concat(DEST_API_NAME,".").concat(n.property," TODO"),r=(1===insertedApiCountObj[t]&&(o=0,n+="\n",globalJsLine++),r+globalDistanceCount-excessOffsets[t]-o);return e=commonUtils_1.insertStr(e,r,n),globalDistanceCount+=n.length,e}function transformWxInterface(e,t,r,n){var o=e.moduleRange.start,s=t.uri()+"-"+o.line,a=t.offsetAt({line:o.line-1,character:o.character}),i=a+globalDistanceCount;return r=commonUtils_1.replacepos(r,i,i+n.length,DEST_API_NAME),globalDistanceCount+=DEST_API_LEN-n.length,calProcessedApis(excessOffsets,s),commonConfig_2.interfacesForTransform[e.property]?(i=a+globalDistanceCount+n.length+1,r=commonUtils_1.replacepos(r,i,i+e.property.length,commonConfig_2.interfacesForTransform[e.property]),a=e.property.length-commonConfig_2.interfacesForTransform[e.property].length,globalDistanceCount-=a,excessOffsets[s]-=a):notDealtWith(e,s)&&(calProcessedApis(insertedApiCountObj,s),n=t.offsetAt({line:o.line-1,character:0}),i=o.line,configs.notaddtodo||(r=insertTodoInline(r,s,n,e)),a=t.uri()+' {"line":'+(i+globalJsLine)+',"column":'+o.character+"}",TransformReport.writeInfo("".concat(commonUtils_1.setLanguage("notSupport"),"api ").concat(DEST_API_NAME,".").concat(e.property),a),insertedApiObj[s]=e.property),r}function transformJsFile(t,r,n,o){var s=create(t,n),e=(n=s.getText(),importVisitor_1.getImportRules(n,null,null,o));return globalJsLine=globalDistanceCount=0,e.forEach(function(e){switch(e.type){case"fileImport":n=transformJsPath(e,r,n,s);break;case"wxInterface":n=transformWxInterface(e,s,n,o),convertManager.transformJs(t,"".concat(DEST_API_NAME,".").concat(e.property));break;case"filePath":n=transformWxmlWxsFilePath(e,s,n);break;case"wxSchema":n=transformWxSchemas(e,s,n);break;case"mixins":n=transformComponentMixins(e,s,n)}}),n}function transformComponentMixins(e,t,r){var n=e.moduleRange.start,t=t.offsetAt({line:n.line-1,character:n.character});return r=commonUtils_1.replacepos(r,t+globalDistanceCount,t+e.module.length+globalDistanceCount,"behaviors"),globalDistanceCount-=e.module.length-9,r}function transformJsPath(e,t,r,n){var o=e.module;return!o||o.startsWith("./")||o.startsWith("../")||(t=path.join(t,"..",o),path.extname(t)||(t+=".js"),fs.existsSync(t)&&(t=e.moduleRange.start,e=n.offsetAt({line:t.line-1,character:t.character-1})+globalDistanceCount,n=".",o.startsWith("/")?globalDistanceCount+=1:(n="./",globalDistanceCount+=2),r=commonUtils_1.insertStr(r,e,n))),r}exports.handleWxssImport=handleWxssImport,exports.handleWxmlFile=handleWxmlFile,exports.transformWxsFilePath=transformWxsFilePath,exports.transformJsFile=transformJsFile,exports.transformJsPath=transformJsPath;
@@ -1 +1 @@
1
- var _0x2604dc=_0x593d,commonUtils_1=((()=>{for(var r=_0x593d,n=_0x7089();;)try{if(240140==+parseInt(r(232))*(parseInt(r(228))/2)+-parseInt(r(217))/3+-parseInt(r(223))/4+parseInt(r(219))/5+parseInt(r(221))/6+parseInt(r(238))/7+-parseInt(r(214))/8)break;n.push(n.shift())}catch(r){n.push(n.shift())}})(),Object[_0x2604dc(215)](exports,_0x2604dc(218),{value:!0}),exports.insertInfo=exports[_0x2604dc(233)]=void 0,require(_0x2604dc(222))),fs=require("fs"),path=require(_0x2604dc(216)),unsupportedApis=[];function addTransformUrl(){var r=_0x2604dc,n=path[r(227)](__dirname,r(212)),n=JSON.parse(fs[r(210)](n)[r(231)]());0<unsupportedApis[r(226)]&&(unsupportedApis[r(213)](r(234)+n[r(224)]),write(unsupportedApis[r(239)]("")))}function writeInfo(r,n){var t=_0x2604dc,r=[t(235),r,"\n",commonUtils_1.setLanguage(t(237)),n,t(220)][t(239)]("");unsupportedApis[t(213)](r)}function _0x593d(r,n){var t=_0x7089();return(_0x593d=function(r,n){return t[r-=210]})(r,n)}function insertInfo(r){var n=_0x2604dc,t=fs[n(210)](commonUtils_1[n(225)]())[n(231)]();fs[n(211)](commonUtils_1[n(225)](),r),write(t)}function write(r){var n=_0x2604dc;r&&fs.appendFile(commonUtils_1[n(225)](),r,function(r){if(r)throw r})}function _0x7089(){var r=["../common/commonUtils","1688160QodUaa","transformLogUrl","getGlobleOutPutPath","length","resolve","2IYwgdZ","insertInfo","addTransformUrl","toString","325555xMogps","writeInfo","以上接口当前版本暂不支持,请期待后续更新。\n如有需要使用请参考官方文档获取暂不支持的接口处理方式:","Error: ","write","position","1194081IyOBOL","join","readFileSync","writeFileSync","../../common/url.json","push","912896SmKJdU","defineProperty","path","1320156SrAeBF","__esModule","1529175ymJOLn","\n\n\n","2486226rWtojz"];return(_0x7089=function(){return r})()}exports[_0x2604dc(230)]=addTransformUrl,exports[_0x2604dc(233)]=writeInfo,exports[_0x2604dc(229)]=insertInfo,exports[_0x2604dc(236)]=write;
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.insertInfo=exports.writeInfo=void 0;var commonUtils_1=require("../common/commonUtils"),fs=require("fs"),path=require("path"),unsupportedApis=[];function addTransformUrl(){var t=path.resolve(__dirname,"../../common/url.json"),t=JSON.parse(fs.readFileSync(t).toString());0<unsupportedApis.length&&(unsupportedApis.push("以上接口当前版本暂不支持,请期待后续更新。\n如有需要使用请参考官方文档获取暂不支持的接口处理方式:"+t.transformLogUrl),write(unsupportedApis.join("")))}function writeInfo(t,o){t=["Error: ",t,"\n",commonUtils_1.setLanguage("position"),o,"\n\n\n"].join("");unsupportedApis.push(t)}function insertInfo(t){var o=fs.readFileSync(commonUtils_1.getGlobleOutPutPath()).toString();fs.writeFileSync(commonUtils_1.getGlobleOutPutPath(),t),write(o)}function write(t){t&&fs.appendFile(commonUtils_1.getGlobleOutPutPath(),t,function(t){if(t)throw t})}exports.addTransformUrl=addTransformUrl,exports.writeInfo=writeInfo,exports.insertInfo=insertInfo,exports.write=write;
@@ -1 +1 @@
1
- function _typeof(a){var t=_0x2565;return(_typeof=t(411)==typeof Symbol&&t(393)==typeof Symbol.iterator?function(a){return typeof a}:function(a){var e=t;return a&&e(411)==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?e(393):typeof a})(a)}function _0x2565(a,e){var t=_0x378a();return(_0x2565=function(a,e){return t[a-=360]})(a,e)}function _defineProperty(a,e,t){var r=_0x2565;return(e=_toPropertyKey(e))in a?Object[r(363)](a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function _toPropertyKey(a){a=_toPrimitive(a,_0x2565(386));return"symbol"==_typeof(a)?a:a+""}function _toPrimitive(a,e){var t=_0x2565;if(t(418)!=_typeof(a)||!a)return a;var r=a[Symbol[t(421)]];if(void 0===r)return(t(386)===e?String:Number)(a);r=r[t(381)](a,e||t(360));if("object"!=_typeof(r))return r;throw new TypeError(t(424))}function _0x378a(){var a=["symbol","defaultImgVuality","onlyFromCamera","callBack","sort","src","name","apFilePaths","apFilePath","removeSavedFile","1079281mAzSxZ","20fquTdw","3006216ECgcrt","title","4afCgrY","setClipboardData","success","1606209lFBGxC","function","brightness","apiName","__apiAdapterConverted","forEach","eventName","itemList","object","params","length","toPrimitive","data","getStorageSync","@@toPrimitive must return a primitive value.","apply","level","chooseImage","code","default","31398raZjuk","compressImage","defineProperty","toFixed","phoneNumber","showActionSheet","concat","2818917IiGqmK","282771AqJbof","filePath","value","downloadFile","setScreenBrightness","uploadFile","setStorageSync","12SZeAcl","keys","3367895tHxkzq","isArray","tempFilePath","call","removeStorageSync","clearStorageSync","push","123grCOzi","string","saveImageToPhotosAlbum","index","getFileInfo","quality","text","returnVal"];return(_0x378a=function(){return a})()}(()=>{for(var a=_0x2565,e=_0x378a();;)try{if(359971==-parseInt(a(369))+-parseInt(a(361))/2*(-parseInt(a(385))/3)+parseInt(a(407))/4*(-parseInt(a(378))/5)+-parseInt(a(376))/6*(parseInt(a(403))/7)+parseInt(a(405))/8+parseInt(a(368))/9+parseInt(a(404))/10*(parseInt(a(410))/11))break;e.push(e.shift())}catch(a){e.push(e.shift())}})(),(()=>{var a,e,m,n=_0x2565;function i(e,t){e&&Object[n(377)](e).forEach(function(a){t[a]&&(t[e[a]]=t[a],delete t[a])})}has.__apiAdapterConverted||(has[n(414)]=!0,a=[{apiName:n(427),callBack:[{eventName:n(409),params:{tempFilePaths:n(400)}}]},{apiName:"saveFile",params:{apFilePath:n(380)},callBack:[{eventName:n(409),params:{savedFilePath:n(401)}}]},{apiName:n(389),params:{apFilePath:n(370)}},{apiName:"getSavedFileInfo",params:{apFilePath:n(370)}},{apiName:n(402),params:{apFilePath:n(370)}},{apiName:n(408),params:{text:n(422)}},{apiName:"getClipboardData",callBack:[{eventName:n(409),params:{data:n(391)}}]},{apiName:n(387),params:{url:n(370)}},{apiName:"showLoading",params:{content:n(406)}},{apiName:n(366),params:{items:n(417)},callBack:[{eventName:n(409),params:{tapIndex:n(388)}}]},{apiName:n(374),params:{fileName:n(399)}},{apiName:n(373),params:{brightness:n(371)}},{apiName:"getScreenBrightness",callBack:[{eventName:n(409),params:{value:n(412)}}]},{apiName:"scanCode",params:{hideAlbum:n(395)},callBack:[{eventName:n(409),params:{result:n(428)}}]},{apiName:"makePhoneCall",params:{number:n(365)}},{apiName:"showToast",params:{content:n(406)}},{apiName:n(372),callBack:[{eventName:n(409),params:{tempFilePath:"apFilePath"}}]}],e=[{apiName:n(423),params:{key:1},returnVal:"data"},{apiName:n(375),params:{key:1,data:2}},{apiName:n(382),params:{key:1}},{apiName:n(383)}],m={},a[n(367)](e).forEach(function(a){a=a[n(413)];m[a]=has[a]}),a[n(415)](function(e){var t=n,r=e[t(413)];has[r]=function(){var a=t,n=0<arguments[a(420)]&&void 0!==arguments[0]?arguments[0]:{};return i(e[a(419)],n),e[a(396)]&&e[a(396)].forEach(function(e){var t=a,r=n[e[t(416)]];n[e.eventName]=function(a){i(e[t(419)],a),r(a)}}),m[r](n)}}),e.forEach(function(e){var o=n,p=e[o(413)];has[p]=function(){var t=o,r=0<arguments[t(420)]&&void 0!==arguments[0]?arguments[0]:{},n=[],i=e[t(419)]&&Object[t(377)](e[t(419)])||[],a=(i[t(397)](function(a,e){return i[a]-i[e]}),i[t(415)](function(a){var e=t;r[a]&&n[e(384)](r[a])}),m[p][t(425)](m,n));return e[t(392)]?_defineProperty({},e[t(392)],a):{}}}),m[n(362)]=has[n(362)],has[n(362)]=function(){var t=n,a=0<arguments[t(420)]&&void 0!==arguments[0]?arguments[0]:{},e=(a[t(398)]=Array[t(379)](a[t(400)])?a[t(400)][0]:"",Number(a[t(426)])),r=(e<=3?a[t(390)]=(100/3*e)[t(364)](0):a[t(394)]=80,a.quality=Number(a[t(390)]),a[t(409)]);return a[t(409)]=function(a){var e=t;a[e(400)]=[a[e(380)]],r(a)},m.compressImage(a)})})();
1
+ function _typeof(a){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(a)}function _defineProperty(a,e,t){return(e=_toPropertyKey(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function _toPropertyKey(a){a=_toPrimitive(a,"string");return"symbol"==_typeof(a)?a:a+""}function _toPrimitive(a,e){if("object"!=_typeof(a)||!a)return a;var t=a[Symbol.toPrimitive];if(void 0===t)return("string"===e?String:Number)(a);t=t.call(a,e||"default");if("object"!=_typeof(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(()=>{var a,e,n;function r(e,t){e&&Object.keys(e).forEach(function(a){t[a]&&(t[e[a]]=t[a],delete t[a])})}has.__apiAdapterConverted||(has.__apiAdapterConverted=!0,n={},(a=[{apiName:"chooseImage",callBack:[{eventName:"success",params:{tempFilePaths:"apFilePaths"}}]},{apiName:"saveFile",params:{apFilePath:"tempFilePath"},callBack:[{eventName:"success",params:{savedFilePath:"apFilePath"}}]},{apiName:"getFileInfo",params:{apFilePath:"filePath"}},{apiName:"getSavedFileInfo",params:{apFilePath:"filePath"}},{apiName:"removeSavedFile",params:{apFilePath:"filePath"}},{apiName:"setClipboardData",params:{text:"data"}},{apiName:"getClipboardData",callBack:[{eventName:"success",params:{data:"text"}}]},{apiName:"saveImageToPhotosAlbum",params:{url:"filePath"}},{apiName:"showLoading",params:{content:"title"}},{apiName:"showActionSheet",params:{items:"itemList"},callBack:[{eventName:"success",params:{tapIndex:"index"}}]},{apiName:"uploadFile",params:{fileName:"name"}},{apiName:"setScreenBrightness",params:{brightness:"value"}},{apiName:"getScreenBrightness",callBack:[{eventName:"success",params:{value:"brightness"}}]},{apiName:"scanCode",params:{hideAlbum:"onlyFromCamera"},callBack:[{eventName:"success",params:{result:"code"}}]},{apiName:"makePhoneCall",params:{number:"phoneNumber"}},{apiName:"showToast",params:{content:"title"}},{apiName:"downloadFile",callBack:[{eventName:"success",params:{tempFilePath:"apFilePath"}}]}]).concat(e=[{apiName:"getStorageSync",params:{key:1},returnVal:"data"},{apiName:"setStorageSync",params:{key:1,data:2}},{apiName:"removeStorageSync",params:{key:1}},{apiName:"clearStorageSync"}]).forEach(function(a){a=a.apiName;n[a]=has[a]}),a.forEach(function(e){var t=e.apiName;has[t]=function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return r(e.params,a),e.callBack&&e.callBack.forEach(function(e){var t=a[e.eventName];a[e.eventName]=function(a){r(e.params,a),t(a)}}),n[t](a)}}),e.forEach(function(i){var o=i.apiName;has[o]=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=[],r=i.params&&Object.keys(i.params)||[],a=(r.sort(function(a,e){return r[a]-r[e]}),r.forEach(function(a){e[a]&&t.push(e[a])}),n[o].apply(n,t));return i.returnVal?_defineProperty({},i.returnVal,a):{}}}),n.compressImage=has.compressImage,has.compressImage=function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=(a.src=Array.isArray(a.apFilePaths)?a.apFilePaths[0]:"",Number(a.level)),t=(e<=3?a.quality=(100/3*e).toFixed(0):a.defaultImgVuality=80,a.quality=Number(a.quality),a.success);return a.success=function(a){a.apFilePaths=[a.tempFilePath],t(a)},n.compressImage(a)})})();
@@ -1 +1 @@
1
- var _0x3eb9ea=_0x5603;function _0x5603(r,e){var a=_0x5f55();return(_0x5603=function(r,e){return a[r-=267]})(r,e)}(()=>{for(var r=_0x5603,e=_0x5f55();;)try{if(926764==+parseInt(r(276))+-parseInt(r(275))/2+-parseInt(r(281))/3*(-parseInt(r(278))/4)+parseInt(r(280))/5*(-parseInt(r(284))/6)+parseInt(r(286))/7+parseInt(r(272))/8*(-parseInt(r(267))/9)+parseInt(r(271))/10*(parseInt(r(270))/11))break;e.push(e.shift())}catch(r){e.push(e.shift())}})(),Object[_0x3eb9ea(283)](exports,_0x3eb9ea(277),{value:!0}),exports[_0x3eb9ea(269)]=void 0;var babelParser=require(_0x3eb9ea(273)),parseTryCount=0;function babelTransform(e,a){var n=_0x3eb9ea;try{var t=babelParser[n(285)](e,{sourceType:n(279),allowReturnOutsideFunction:!0,plugins:[n(268)]});return parseTryCount=0,t}catch(r){if(a){if(0===parseTryCount)return t=e[n(274)](0,a-1)+e.substring(a,e[n(282)]),parseTryCount++,babelTransform(t,a);if(parseTryCount<3)return n=e.substring(0,a)+","+e.substring(a,e.length),parseTryCount++,babelTransform(n,a);parseTryCount=0}return null}}function _0x5f55(){var r=["49690RAQWxh","3SeCnsE","length","defineProperty","42WJCkSm","parse","1357993dmBPXt","90Tzmtos","classProperties","babelTransform","969452vlAGLd","140bDhZGc","700208XGEulD","@babel/parser","substring","774748icYjxg","237752wuCysT","__esModule","2373460ybGKBt","unambiguous"];return(_0x5f55=function(){return r})()}exports[_0x3eb9ea(269)]=babelTransform;
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.babelTransform=void 0;var babelParser=require("@babel/parser"),parseTryCount=0;function babelTransform(e,s){try{var a=babelParser.parse(e,{sourceType:"unambiguous",allowReturnOutsideFunction:!0,plugins:["classProperties"]});return parseTryCount=0,a}catch(r){if(s){if(0===parseTryCount)return a=e.substring(0,s-1)+e.substring(s,e.length),parseTryCount++,babelTransform(a,s);if(parseTryCount<3)return a=e.substring(0,s)+","+e.substring(s,e.length),parseTryCount++,babelTransform(a,s);parseTryCount=0}return null}}exports.babelTransform=babelTransform;
@@ -1 +1 @@
1
- var _0x3b73e2=_0x1b02;function _0x3267(){var e=["extname","isObjectProperty","MemberExpression","findParent","getImportRules","3409160ltUKqL","node","wxSchema","Identifier","start","6ncsoTb","types","mixins","ImportDeclaration","arguments","test","5315fdAGNM","hjs","column","splice","fileImport","363lNtIKE","source","192mKonsI","length","forEach","getStatementParent","callee","line","://","properties","StringLiteral","default","property","loc","4043900anStaf","wxInterface","./babelParser","projectFileSuffix","name","12838653PNOHmD","CallExpression","Component","@babel/traverse","value","47116ZgrwVG","push","babelTransform","defineProperty","object","isObjectExpression","end","31898757rzRsZa","scope","key","10Nufyvh","path","concat","79240oXVdoO"];return(_0x3267=function(){return e})()}(()=>{for(var e=_0x1b02,r=_0x3267();;)try{if(833444==+parseInt(e(392))*(parseInt(e(399))/2)+-parseInt(e(397))/3*(-parseInt(e(421))/4)+parseInt(e(411))/5+-parseInt(e(386))/6*(parseInt(e(375))/7)+-parseInt(e(381))/8+-parseInt(e(416))/9*(-parseInt(e(372))/10)+-parseInt(e(369))/11)break;r.push(r.shift())}catch(e){r.push(r.shift())}})(),Object[_0x3b73e2(365)](exports,"__esModule",{value:!0}),exports[_0x3b73e2(380)]=void 0;var babelParser_1=require(_0x3b73e2(413)),babel_traverse_1=require(_0x3b73e2(419)),pathTool=require(_0x3b73e2(373)),commonConfig_1=require("../common/commonConfig"),babelTypes=require("@babel/core")[_0x3b73e2(387)];function _0x1b02(e,r){var t=_0x3267();return(_0x1b02=function(e,r){return t[e-=363]})(e,r)}function getQaSchemasReg(e){var r=_0x3b73e2;return new RegExp("^"[r(374)](e,r(405)))}var currentType,suffixs,importRules=[],visitor={ImportDeclaration:function(e){var r=_0x3b73e2;importRules[r(363)]({type:r(396),module:e[r(382)][r(398)][r(420)],moduleRange:{start:{line:e[r(382)][r(398)][r(410)][r(385)][r(404)],character:e[r(382)][r(398)][r(410)].start[r(394)]+2},end:{line:e[r(382)][r(398)][r(410)][r(368)][r(404)],character:e.node[r(398)][r(410)][r(368)].column+2}}})},CallExpression:function(e){var t=_0x3b73e2;e.node[t(403)]&&e[t(382)][t(390)]&&"require"===e[t(382)][t(403)].name&&1===e[t(382)][t(390)][t(400)]&&importRules[t(363)]({type:t(396),module:e[t(382)][t(390)][0][t(420)],moduleRange:{start:{line:e[t(382)].arguments[0][t(410)][t(385)][t(404)],character:e[t(382)][t(390)][0].loc[t(385)][t(394)]+2},end:{line:e[t(382)][t(390)][0][t(410)].end.line,character:e[t(382)].arguments[0][t(410)][t(368)][t(394)]+2}}}),e[t(382)][t(403)]&&e[t(382)][t(390)]&&e.node.callee[t(415)]===t(418)&&1===e[t(382)].arguments[t(400)]&&babelTypes[t(367)](e[t(382)][t(390)][0])&&e.node[t(390)][0][t(406)]&&0<e.node.arguments[0][t(406)].length&&e[t(382)][t(390)][0][t(406)][t(401)](function(e){var r=t;babelTypes[r(377)](e)&&babelTypes.isIdentifier(e[r(371)])&&"mixins"===e[r(371)][r(415)]&&importRules[r(363)]({type:r(388),module:e[r(371)][r(415)],moduleRange:{start:{line:e[r(410)][r(385)][r(404)],character:e[r(410)].start[r(394)]},end:{line:e[r(371)][r(410)][r(368)][r(404)],character:e[r(371)][r(410)].end.column}}})})},MemberExpression:function(e){var r=_0x3b73e2;e[r(382)][r(366)]&&e[r(382)][r(409)]&&e[r(382)][r(366)][r(415)]===currentType&&!hasParent(e,e[r(382)].object[r(415)])&&importRules[r(363)]({type:r(412),module:e[r(382)][r(366)][r(415)],moduleRange:{start:{line:e[r(382)][r(366)].loc[r(385)][r(404)],character:e[r(382)].object[r(410)][r(385)].column},end:{line:e[r(382)].object[r(410)][r(368)][r(404)],character:e.node[r(366)][r(410)][r(368)][r(394)]}},property:e[r(382)].property[r(415)]})},Identifier:function(e){var r=_0x3b73e2;e[r(382)][r(415)]!==currentType||0!==e[r(371)]||hasParent(e,e[r(382)][r(415)])||importRules[r(363)]({type:r(412),module:e[r(382)].name,moduleRange:{start:{line:e[r(382)][r(410)].start.line,character:e.node.loc[r(385)][r(394)]},end:{line:e[r(382)][r(410)][r(368)][r(404)],character:e.node.loc[r(368)][r(394)]}},property:null})},StringLiteral:function(e){var r,t=_0x3b73e2;!e[t(382)][t(420)]||pathTool[t(376)](e[t(382)][t(420)])!==suffixs.hxml&&pathTool[t(376)](e[t(382)].value)!==suffixs[t(393)]||(r=pathTool.extname(e.node.value),importRules.push({type:"filePath",module:r,moduleRange:{start:{line:e[t(382)][t(410)][t(368)][t(404)],character:e[t(382)].loc[t(368)][t(394)]-r[t(400)]},end:{line:e[t(382)][t(410)][t(368)][t(404)],character:e[t(382)].loc[t(368)][t(394)]}}})),e.node[t(420)]&&getQaSchemasReg(currentType)[t(391)](e[t(382)].value)&&importRules.push({type:t(383),module:""[t(374)](currentType,":"),moduleRange:{start:{line:e.node[t(410)][t(385)][t(404)],character:e[t(382)][t(410)].start[t(394)]},end:{line:e[t(382)][t(410)].start[t(404)],character:e[t(382)][t(410)][t(385)][t(394)]+5}}})}};function hasParent(e,r){var t=_0x3b73e2,n=!1;return e[t(402)]()[t(379)](function(e){n||e[t(370)].getOwnBinding(r)&&(n=!0)}),n}function clear(){importRules[_0x3b73e2(395)](0,importRules.length)}function getImportRules(e,r){var t=_0x3b73e2,n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],a=3<arguments.length?arguments[3]:void 0,n=(currentType=a,suffixs=commonConfig_1[t(414)][a],a=n?{CallExpression:visitor[t(417)],ImportDeclaration:visitor[t(389)]}:{MemberExpression:visitor[t(378)],StringLiteral:visitor[t(407)],Identifier:visitor[t(384)],CallExpression:visitor[t(417)]},babelParser_1[t(364)](e,r));return clear(),babel_traverse_1[t(408)](n,a),importRules}exports[_0x3b73e2(380)]=getImportRules;
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.getImportRules=void 0;var babelParser_1=require("./babelParser"),babel_traverse_1=require("@babel/traverse"),pathTool=require("path"),commonConfig_1=require("../common/commonConfig"),babelTypes=require("@babel/core").types;function getQaSchemasReg(e){return new RegExp("^".concat(e,"://"))}var currentType,suffixs,importRules=[],visitor={ImportDeclaration:function(e){importRules.push({type:"fileImport",module:e.node.source.value,moduleRange:{start:{line:e.node.source.loc.start.line,character:e.node.source.loc.start.column+2},end:{line:e.node.source.loc.end.line,character:e.node.source.loc.end.column+2}}})},CallExpression:function(e){e.node.callee&&e.node.arguments&&"require"===e.node.callee.name&&1===e.node.arguments.length&&importRules.push({type:"fileImport",module:e.node.arguments[0].value,moduleRange:{start:{line:e.node.arguments[0].loc.start.line,character:e.node.arguments[0].loc.start.column+2},end:{line:e.node.arguments[0].loc.end.line,character:e.node.arguments[0].loc.end.column+2}}}),e.node.callee&&e.node.arguments&&"Component"===e.node.callee.name&&1===e.node.arguments.length&&babelTypes.isObjectExpression(e.node.arguments[0])&&e.node.arguments[0].properties&&0<e.node.arguments[0].properties.length&&e.node.arguments[0].properties.forEach(function(e){babelTypes.isObjectProperty(e)&&babelTypes.isIdentifier(e.key)&&"mixins"===e.key.name&&importRules.push({type:"mixins",module:e.key.name,moduleRange:{start:{line:e.loc.start.line,character:e.loc.start.column},end:{line:e.key.loc.end.line,character:e.key.loc.end.column}}})})},MemberExpression:function(e){e.node.object&&e.node.property&&e.node.object.name===currentType&&!hasParent(e,e.node.object.name)&&importRules.push({type:"wxInterface",module:e.node.object.name,moduleRange:{start:{line:e.node.object.loc.start.line,character:e.node.object.loc.start.column},end:{line:e.node.object.loc.end.line,character:e.node.object.loc.end.column}},property:e.node.property.name})},Identifier:function(e){e.node.name!==currentType||0!==e.key||hasParent(e,e.node.name)||importRules.push({type:"wxInterface",module:e.node.name,moduleRange:{start:{line:e.node.loc.start.line,character:e.node.loc.start.column},end:{line:e.node.loc.end.line,character:e.node.loc.end.column}},property:null})},StringLiteral:function(e){var n;!e.node.value||pathTool.extname(e.node.value)!==suffixs.hxml&&pathTool.extname(e.node.value)!==suffixs.hjs||(n=pathTool.extname(e.node.value),importRules.push({type:"filePath",module:n,moduleRange:{start:{line:e.node.loc.end.line,character:e.node.loc.end.column-n.length},end:{line:e.node.loc.end.line,character:e.node.loc.end.column}}})),e.node.value&&getQaSchemasReg(currentType).test(e.node.value)&&importRules.push({type:"wxSchema",module:"".concat(currentType,":"),moduleRange:{start:{line:e.node.loc.start.line,character:e.node.loc.start.column},end:{line:e.node.loc.start.line,character:e.node.loc.start.column+5}}})}};function hasParent(e,n){var o=!1;return e.getStatementParent().findParent(function(e){o||e.scope.getOwnBinding(n)&&(o=!0)}),o}function clear(){importRules.splice(0,importRules.length)}function getImportRules(e,n){var o=2<arguments.length&&void 0!==arguments[2]&&arguments[2],t=3<arguments.length?arguments[3]:void 0,o=(currentType=t,suffixs=commonConfig_1.projectFileSuffix[t],t=o?{CallExpression:visitor.CallExpression,ImportDeclaration:visitor.ImportDeclaration}:{MemberExpression:visitor.MemberExpression,StringLiteral:visitor.StringLiteral,Identifier:visitor.Identifier,CallExpression:visitor.CallExpression},babelParser_1.babelTransform(e,n));return clear(),babel_traverse_1.default(o,t),importRules}exports.getImportRules=getImportRules;
@@ -1 +1 @@
1
- function _0x4cd4(){var e=["[\\s\\S]*?\\*\\/\\s*(?:\\r|\\n|$)|((?:^|\\n|\\r)\\s*\\/\\/.*","selector","start","169887QTBifu","indexOf","importFileReg","character","map","2hTmNFV","postcss","offsetAt","swan","915033bpcmSg","3383128MXQzmb","restLength","2050662QyNPCT","line","isInComment","3894200nVxJRi","extname","substring","__esModule","getText","params","replace","media","forEach","wxssParser","concat","column","parse","import","test","rule","name","exec","selectors","position","rules","filter","importReg","source","push","uri","index","match","split","type","length","3805956lvcIps","446830AIlgQw","end"];return(_0x4cd4=function(){return e})()}var _0x27e443=_0x157d,postcss=((()=>{for(var e=_0x157d,t=_0x4cd4();;)try{if(521019==+parseInt(e(376))*(parseInt(e(381))/2)+-parseInt(e(388))/3+parseInt(e(386))/4+-parseInt(e(371))/5+parseInt(e(370))/6+parseInt(e(385))/7+-parseInt(e(391))/8)break;t.push(t.shift())}catch(e){t.push(t.shift())}})(),Object.defineProperty(exports,_0x27e443(394),{value:!0}),exports.wxssParser=exports[_0x27e443(378)]=exports[_0x27e443(361)]=void 0,require(_0x27e443(382))),path=require("path");function wxssParser(t,r,a,p){var c=_0x27e443,n=[];try{n=postcss[c(403)](t).nodes[c(360)](function(e){var t=c;return"atrule"===e[t(368)]&&e[t(355)]===t(404)})[c(380)](function(e){var t=c;return{type:t(404),import:e[t(396)],position:{start:e[t(362)].start,end:e[t(362)][t(372)]}}})}catch(e){for(var s=t[c(366)](exports.importReg),o=0,i=0;s=exports[c(361)][c(356)](t);){var u,i=t[c(377)](s[0],i),x=checkIsInComment(s[0],t,o,s[c(365)]);x[c(390)]?(o=s.index+x[c(387)],i+=x.restLength):(o=s.index+s[0].length,(x=s[0][c(366)](exports[c(378)]))&&(u=r.positionAt(i+x[c(365)]),n[c(363)]({type:"import",uri:r[c(364)],position:{start:{line:u[c(389)]+1,column:u[c(379)]},end:{line:u[c(389)]+1,column:u[c(379)]+x[0][c(369)]+2}},value:x?x[1]:"",import:x[0]})),i+=s[0].length)}}var l=[];return n[c(399)](function(n){var s,e,o,i=c;n[i(368)]===i(404)?(e={line:n[i(358)][i(372)][i(389)]-1,character:n.position[i(372)][i(402)]-2},s=r[i(383)](e),e=n.import[i(397)](/[\r\n]/gi," ")[i(367)](" "),o=0,e[i(399)](function(e){var t,r=i,e=e.substring(1,e[r(369)]-1);path[r(392)](e)===a&&(t=n[r(404)].indexOf(e,o),o=t,l[r(363)]({type:"import",import:e,endOffset:s-(n[r(404)][r(369)]-t-e[r(369)])+1}))})):p===i(384)&&getSelectorRule(n,r,p,l)}),l}function handleSelectors(e,r,n,s,o){e[_0x27e443(399)](function(e){e.split(/\s+/).forEach(function(e){var t=_0x157d;r=n[t(377)](e,r),s[t(405)](e)&&o[t(363)]({type:t(374),selector:e,startOffset:r}),r+=e[t(369)]})})}function getSelectorRule(e,t,r,n){var s,o,i,a,p=_0x27e443;e.type===p(354)?(s=t[p(395)](),o=new RegExp("^"[p(401)](r,"-")),i=e[p(357)],a={line:e.position[p(375)][p(389)]-1,character:e[p(358)].start[p(402)]-1},a=t[p(383)](a),i&&handleSelectors(i,a,s,o,n)):e[p(368)]===p(398)&&e[p(359)][p(399)](function(e){getSelectorRule(e,t,r,n)})}function _0x157d(e,t){var r=_0x4cd4();return(_0x157d=function(e,t){return r[e-=354]})(e,t)}function checkIsInComment(e,t,r,n){for(var s,o=_0x27e443,i=new RegExp("((?:^|\\n|\\r)\\s*\\/\\*[\\s\\S]*?".concat(e,o(373))[o(401)](e,".*(?:\\r|\\n|$)))"),"g");s=i[o(356)](t[o(393)](r));){if(s.index+r<n&&s[o(365)]+r+s[0].length>n)return{isInComment:!0,restLength:s.index+r+s[0].length-n};if(s[o(365)]+r>n)break}return{isInComment:!1,restLength:0}}exports.importReg=/\@import\s+[\'\"].*[\'\"](\s+.*(\s*[and|not|only|or|\,]\s*\(.*\))*)?\s*\;?/g,exports[_0x27e443(378)]=/['"]\s*([^()]+?)\s*['"]/,exports[_0x27e443(400)]=wxssParser;
1
+ Object.defineProperty(exports,"__esModule",{value:!0}),exports.wxssParser=exports.importFileReg=exports.importReg=void 0;var postcss=require("postcss"),path=require("path");function wxssParser(t,s,i,p){var r=[];try{r=postcss.parse(t).nodes.filter(function(e){return"atrule"===e.type&&"import"===e.name}).map(function(e){return{type:"import",import:e.params,position:{start:e.source.start,end:e.source.end}}})}catch(e){for(var n=t.match(exports.importReg),o=0,c=0;n=exports.importReg.exec(t);){var a,c=t.indexOf(n[0],c),l=checkIsInComment(n[0],t,o,n.index);l.isInComment?(o=n.index+l.restLength,c+=l.restLength):(o=n.index+n[0].length,(l=n[0].match(exports.importFileReg))&&(a=s.positionAt(c+l.index),r.push({type:"import",uri:s.uri,position:{start:{line:a.line+1,column:a.character},end:{line:a.line+1,column:a.character+l[0].length+2}},value:l?l[1]:"",import:l[0]})),c+=n[0].length)}}var m=[];return r.forEach(function(r){var n,e,o;"import"===r.type?(e={line:r.position.end.line-1,character:r.position.end.column-2},n=s.offsetAt(e),e=r.import.replace(/[\r\n]/gi," ").split(" "),o=0,e.forEach(function(e){var t,e=e.substring(1,e.length-1);path.extname(e)===i&&(t=r.import.indexOf(e,o),o=t,m.push({type:"import",import:e,endOffset:n-(r.import.length-t-e.length)+1}))})):"swan"===p&&getSelectorRule(r,s,p,m)}),m}function handleSelectors(e,t,r,n,o){e.forEach(function(e){e.split(/\s+/).forEach(function(e){t=r.indexOf(e,t),n.test(e)&&o.push({type:"selector",selector:e,startOffset:t}),t+=e.length})})}function getSelectorRule(e,t,r,n){var o,s,i,p;"rule"===e.type?(o=t.getText(),s=new RegExp("^".concat(r,"-")),i=e.selectors,p={line:e.position.start.line-1,character:e.position.start.column-1},p=t.offsetAt(p),i&&handleSelectors(i,p,o,s,n)):"media"===e.type&&e.rules.forEach(function(e){getSelectorRule(e,t,r,n)})}function checkIsInComment(e,t,r,n){for(var o,s=new RegExp("((?:^|\\n|\\r)\\s*\\/\\*[\\s\\S]*?".concat(e,"[\\s\\S]*?\\*\\/\\s*(?:\\r|\\n|$)|((?:^|\\n|\\r)\\s*\\/\\/.*").concat(e,".*(?:\\r|\\n|$)))"),"g");o=s.exec(t.substring(r));){if(o.index+r<n&&o.index+r+o[0].length>n)return{isInComment:!0,restLength:o.index+r+o[0].length-n};if(n<o.index+r)break}return{isInComment:!1,restLength:0}}exports.importReg=/\@import\s+[\'\"].*[\'\"](\s+.*(\s*[and|not|only|or|\,]\s*\(.*\))*)?\s*\;?/g,exports.importFileReg=/['"]\s*([^()]+?)\s*['"]/,exports.wxssParser=wxssParser;
@@ -1 +1 @@
1
- var _0xfa8bcb=_0x257b;function _0x4afd(){var t=["table-head","className","\n </td>\n </tr>","jsonModular","31649100GxsheR","join","querySelectorAll","querySelector","tableInfo","thead","tab-item","@@iterator","469WvpBjv","hide","cardBox","onload","num ","enumerable",".mask","29144iEOnUU","#col1",".card-box","tbody",".ul","defineProperty","不支持文件","actived","cls",'">\n 查看相关能力\n </div>\n </td>\n <td class="apges">',"span","supportType",'<tr>\n <td class="apges">\n ',"next",'</div>\n <div class="topname">无法转换</div>\n </div>',"doc","innerText","dataSources","pagePaths","ERROR",'">帮助文档</td>',"none","modularWxs","length","values","toString","textContent","concept","slice","constructor","createElement",'<i class="iconfont ',"open","style","setAttribute","endsWith","type","object",'\n <tr>\n <td class="name">',"#project tbody","api/生命周期","getOwnPropertyDescriptor","样式文件","partial","\n </tr>\n </thead>\n <tbody></tbody>\n ","wxssModular","getOwnPropertyDescriptors","1042683zKBBoX","num","</td>\n ","supportPart","data-type","closest","innerHTML","tabBox","defineProperties","li:first-child","from","completely","app.json","notsupport","transforms","function","4TWVRoS",'<td class="unsupported">暂不支持,请尝试其他实现方式</td>',"icon-zhengque","push","prepend",'</div>\n <div class="topname">文件总数</div>\n </div>\n <div class="itembox itembox_completely">\n <div class="botval">',".tab-box","5648931hDrRJQ","surroundings",".file-path","</tbody>\n ","开放能力","modelAll","assign","如何解决","docpath","path","prototype",'<tr class="pages">\n <th>文件路径</th>\n <th>转换结果</th>\n </tr>',"forEach","199716qXGgKj","\n <tr>\n <td>","entries","closeBtn","其他文件","symbol","name","table-info openability actived",".table-info:first-child",".mask .table-box","</th>",'<div class="opation-item">',"apply","4EAwedn","不支持",' header" id="col1">','<th class="',"test",".mask .close","unsupportedNum","map","opening","display","classList","call","Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.","location","icon-warning","openability","mask","isArray","result",'<tr><td colspan="3">完整支持</td></tr>',"@@toPrimitive must return a primitive value.","string",'</td>\n <td class="text-right">',"projectTable","tableBox","filter",".show-instruct","default","templete","getOwnPropertySymbols","支持程度","部分支持",'</td>\n <td>\n <div class="show-instruct" data-path="',"不支持子属性","add","appendChild","</td>\n <td>",".rep-allbox","\n </tr>\n ","ulBox","jsModular","opations","CORRECT",".result","组件名",".table-info","attrs","return","otherModular","属性名称",".js","click","keys",'<span class="status-icon success-icon">✓</span>',"iterator","pathArr","模板文件","concat","dataset",'"></i>',"val","undefined","err","addEventListener","unsupported","2846345CbEAQV","4687854EmhPsn","getAttribute","不支持的部分(参数/返回值)","WARNING","</td>\n </tr>\n ","Set","remove","table","icon-cuowu","maskTitle","value","status","json文件","div","tab-item actived","href"];return(_0x4afd=function(){return t})()}function _typeof(t){var r=_0x257b;return(_typeof=r(188)==typeof Symbol&&r(214)==typeof Symbol.iterator?function(t){return typeof t}:function(t){var e=r;return t&&e(188)==typeof Symbol&&t.constructor===Symbol&&t!==Symbol[e(206)]?e(214):typeof t})(t)}function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(_0x257b(234))}function _iterableToArrayLimit(t,e){var r=_0x257b,n=null==t?null:r(283)!=typeof Symbol&&t[Symbol[r(276)]]||t[r(315)];if(null!=n){var a,o,i,s,c=[],u=!0,l=!1;try{if(i=(n=n.call(t))[r(336)],0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(a=i[r(233)](n)).done)&&(c[r(192)](a[r(298)]),c[r(346)]!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=n.return&&(s=n[r(269)](),Object(s)!==s))return}finally{if(l)throw o}}return c}}function _arrayWithHoles(t){if(Array[_0x257b(239)](t))return t}function ownKeys(r,t){var e,n=_0x257b,a=Object.keys(r);return Object[n(251)]&&(e=Object[n(251)](r),t&&(e=e[n(247)](function(t){var e=n;return Object[e(364)](r,t)[e(321)]})),a[n(192)][n(221)](a,e)),a}function _objectSpread(r){for(var n=_0x257b,t=1;t<arguments[n(346)];t++){var a=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(a),!0)[n(208)](function(t){_defineProperty(r,t,a[t])}):Object.getOwnPropertyDescriptors?Object[n(181)](r,Object[n(172)](a)):ownKeys(Object(a))[n(208)](function(t){var e=n;Object[e(328)](r,t,Object[e(364)](a,t))})}return r}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,e){var r,n=_0x257b;if(t)return n(243)==typeof t?_arrayLikeToArray(t,e):"Map"===(r="Object"===(r={}[n(348)][n(233)](t)[n(351)](8,-1))&&t[n(352)]?t[n(352)][n(215)]:r)||n(293)===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/[n(226)](r)?_arrayLikeToArray(t,e):void 0}function _iterableToArray(t){var e=_0x257b;if(e(283)!=typeof Symbol&&null!=t[Symbol[e(276)]]||null!=t[e(315)])return Array[e(183)](t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _0x257b(t,e){var r=_0x4afd();return(_0x257b=function(t,e){return r[t-=171]})(t,e)}function _arrayLikeToArray(t,e){var r=_0x257b;(null==e||e>t.length)&&(e=t[r(346)]);for(var n=0,a=Array(e);n<e;n++)a[n]=t[n];return a}function _defineProperty(t,e,r){var n=_0x257b;return(e=_toPropertyKey(e))in t?Object[n(328)](t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _toPropertyKey(t){t=_toPrimitive(t,_0x257b(243));return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(t,e){var r=_0x257b;if(r(360)!=_typeof(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n[r(233)](t,e||r(249));if(r(360)!=_typeof(n))return n;throw new TypeError(r(242))}function concepteleMade(){var t=_0xfa8bcb,e='<div class="itembox itembox_completely">\n <div class="botval">'[t(279)](pageData[t(350)][t(201)],t(194))[t(279)](pageData[t(350)][t(184)],'</div>\n <div class="topname">完全转换</div>\n </div>\n <div class="itembox itembox_portion">\n <div class="botval">')[t(279)](pageData[t(350)][t(366)],'</div>\n <div class="topname">部分转换</div>\n </div>\n <div class="itembox itembox_failed">\n <div class="botval">')[t(279)](pageData[t(350)][t(186)],t(337));document.querySelector(t(259)).innerHTML=e}function fileDetails(o,t){var i=_0xfa8bcb,e={templete:i(278),jsonModular:i(300),otherModular:i(213),jsModular:"脚本文件",wxssModular:i(365),modularWxs:"自定义脚本",unsupported:i(329),supportPart:i(253)};if(0===(v=Object.keys(o))[i(346)])return!1;function r(r){var n=i,a=[];return v[n(208)](function(t){var e=n;o[t][e(299)]===r&&a[e(192)](t)}),a}var n,a,s=document.querySelector(i(195)),c=s[i(311)](i(327)),u=c[i(310)]("li")[0],l=(u&&u.classList.add(i(330)),document[i(353)]("li")),d=(l[i(232)][i(256)](i(314)),l[i(357)](i(177),t),l[i(179)]=e[t],c.appendChild(l),s[i(311)](".card-box")),u=d[i(310)](i(267))[0],e=(u&&u[i(232)][i(256)](i(330)),document[i(353)](i(301))),s=(e[i(232)][i(256)]("table-info"),e.classList[i(256)](t),document[i(353)](i(295))),u=(s[i(232)][i(256)](i(295)),document[i(353)](i(313))),t=(u[i(232)][i(256)](i(304)),u[i(179)]=i(207),document.createElement(i(326))),p="",b=0,f=r(1),y=r(2),v=r(3)[i(279)](y)[i(279)](f),m="warn";v[i(208)](function(t){var e=i,r="";1===o[t][e(299)]?r=e(275):2===o[t][e(299)]?r='<span class="status-icon warning-icon">⚠</span>':3===o[t].status&&(r='<span class="status-icon danger-icon">✕</span>'),p="".concat(p,e(335))[e(279)](r,'\n </td>\n <td class="file-path">\n ')[e(279)](t,e(306)),o[t][e(334)]&&1!==o[t][e(334)]&&b++,3===o[t][e(334)]&&(m="err")}),t[i(179)]=p;l[i(257)]((y=b||"",f=b?m:"none",n=i,(a=document[n(353)](n(333))).classList[n(256)](n(174)),a.innerHTML=y,a[n(232)].add(f),a)),s[i(257)](u),s[i(257)](t),e[i(257)](s),d[i(257)](e),l.addEventListener(i(273),function(){var r=i,t=(c[r(310)]("li").forEach(function(t){var e=r;t[e(232)].remove(e(330))}),d[r(310)](".table-info").forEach(function(t){t.classList.remove("actived")}),l[r(289)]("data-type"));d[r(311)](".".concat(t))[r(232)][r(256)](r(330)),l[r(232)][r(256)](r(330))})}function openingMade(){var o=_0xfa8bcb,i=pageData[o(230)];if(0===Object[o(274)](i).length)return!1;var t,e,r,n,a,s,c,u,l={tabBox:document[o(311)](o(195)),get ulBox(){var t=o;return this[t(180)].querySelector(t(327))},get cardBox(){var t=o;return this[t(180)][t(311)](t(325))}},d={CORRECT:1,WARNING:2,ERROR:3};t=l[(e=o)(261)].querySelector(e(182)),u=l[e(318)][e(311)](e(217)),null!=t&&t[e(232)][e(256)](e(330)),null!=u&&u[e(232)][e(256)](e(330)),t=o,u=(()=>{var r=o,n=0,a=r(344);return Object[r(347)](i)[r(208)](function(t){var e=r;t.status!==d[e(264)]&&n++,t[e(299)]===d[e(342)]?a=e(284):n&&a!==e(284)&&(a="warn")}),{unsupportedNum:n,statusClass:a}})(),e=u[t(228)],u=u.statusClass,(r=document[t(353)]("li"))[t(305)]=t(302),r[t(280)][t(359)]=t(237),(n=document[t(353)](t(333)))[t(305)]=t(320)[t(279)](u),n[t(349)]=e||"",r[t(179)]=t(200),r[t(193)](n),l[t(261)].appendChild(r),u=r,e=o,(n=document[e(353)](e(301)))[e(305)]=e(216),(t=document[e(353)](e(295)))[e(305)]="table",t[e(179)]='\n <thead class="table-head">\n <tr>\n <th>能力名称</th>\n <th>页面路径</th>\n <th>如何解决</th>\n <th>转换结果</th>\n </tr>\n </thead>\n <tbody>'[e(279)]((()=>{var a=o;return(()=>{var r=o,n=_defineProperty(_defineProperty(_defineProperty({},d[r(342)],[]),d.WARNING,[]),d[r(264)],[]);return Object[r(274)](i).forEach(function(t){var e=r;return n[i[t][e(299)]].push(t)}),[][r(279)](_toConsumableArray(n[d[r(342)]]),_toConsumableArray(n[d.WARNING]),_toConsumableArray(n[d[r(264)]]))})()[a(229)](function(t){var e,r=a,n=i[t];return r(210)[r(279)](t,r(258))[r(279)](n[r(277)][r(309)]("、"),r(254)).concat(n[r(204)],r(332))[r(279)]((t=n[r(299)],e=_defineProperty(_defineProperty(_defineProperty({},d[(n=o)(264)],n(191)),d[n(291)],n(236)),d.ERROR,n(296)),n(354)[n(279)](e[t],n(281))),r(292))})[a(309)]("")})(),e(199)),n[e(257)](t),l[e(318)].appendChild(n),s=n,(a=u)[(c=o)(285)](c(273),function(){var r=c;l[r(261)][r(310)]("li")[r(208)](function(t){var e=r;return t.classList[e(294)](e(330))}),l[r(318)][r(310)](r(267)).forEach(function(t){var e=r;return t[e(232)].remove(e(330))}),a[r(232)][r(256)]("actived"),s[r(232)][r(256)](r(330))}),l[c(318)][c(285)](c(273),function(t){var e=c,t=t.target[e(178)](e(248));t&&(window[e(235)][e(303)]=t.dataset[e(205)])})}(()=>{for(var t=_0x257b,e=_0x4afd();;)try{if(535916==-parseInt(t(209))+-parseInt(t(222))/2*(parseInt(t(173))/3)+parseInt(t(189))/4*(-parseInt(t(287))/5)+-parseInt(t(288))/6+parseInt(t(316))/7*(parseInt(t(323))/8)+-parseInt(t(196))/9+parseInt(t(308))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}})(),window[_0xfa8bcb(319)]=function(){projectResult(),concepteleMade(),temelatetable(),openingMade(),supportiveness(),fileInfo(),maskClose()};var byStatus=function(r){var n=_0xfa8bcb,a={};return Object[n(274)](pageData[n(187)])[n(208)](function(t){var e=n;pageData[e(187)][t].status===r&&(a[t]=pageData[e(187)][t])}),a};function supportiveness(){var t=_0xfa8bcb;fileDetails(byStatus(2),t(176)),fileDetails(byStatus(3),t(286))}var byType=function(t){var e,r=_0xfa8bcb,n={};for(e in pageData[r(187)])pageData[r(187)][e][r(359)]===t&&(n[e]=Object[r(202)]({},pageData[r(187)][e]),n[e][r(334)]=n[e][r(299)]);fileDetails(n,t)};function temelatetable(){var t=_0xfa8bcb;byType(t(250)),byType(t(262)),byType(t(171)),byType(t(307)),byType(t(270)),byType(t(345))}function fileInfo(){var e,u=_0xfa8bcb,l={mask:document.querySelector(".mask"),maskTitle:document[u(311)](".mask .title"),tableBox:document.querySelector(u(218)),pagePaths:document[u(310)](u(198))},d={getTransformData:function(t){return pageData[u(187)][t]}};function p(t){var e=u;l[e(246)][e(311)](e(324))[e(339)]=t}function b(t){var r=u,e=t[r(268)][r(229)](function(t){var e=r;return e(220)[e(279)](t,"</div>")})[r(309)]("");return r(361)[r(279)](t[r(215)],'</td>\n <td class="opations">')[r(279)](e,r(175))[r(279)](!(e=t)[(t=u)(338)]||"无"===e[t(338)]?t(190):'<td class="result" path="'[t(279)](e[t(338)],t(343)),r(260))}l[(e=u)(341)][e(208)](function(c){var t=e;c[t(285)](t(273),function(){var t,e,n,a,r,o,i,s;t=(t=c)[(i=u)(339)],(s=d.getTransformData(t))&&(i=s[i(359)],e=t,n=u,(a=l.tableBox.querySelectorAll("th"))[n(208)](function(t){var e=n;return t.style[e(231)]=""}),null!=(i=(r={templete:function(){var t=n;return p(t(266),t(223))},jsModular:function(){return p("api/生命周期",n(290))},otherModular:function(){var r=n;return e[r(358)](r(272))?p(r(363)):a[r(208)](function(t){var e=r;return t[e(356)][e(231)]=e(344)})},jsonModular:function(){var t=n;return p(t(271),e===t(185)?t(255):t(252))}})[i])&&i[n(233)](r),i=t,l[u(297)].innerText=i,r=s.components,t=u,l.tableBox.querySelector(t(326))[t(179)]=0<r[t(346)]?r[t(229)](b)[t(309)](""):t(241),l[(i=u)(238)][i(232)][i(294)](i(317)),o=u,l.mask[o(310)](o(265))[o(208)](function(e){var r=o;e[r(285)](r(273),function(){var t=r;window[t(355)](e.getAttribute(t(205)))})}))})})}var createTable=function(t){var r=_0xfa8bcb;return["\n <thead>\n <tr>\n ",t[r(229)](function(t){var e=r;return e(225)[e(279)](t[e(331)],e(224))[e(279)](t.title,e(219))}),r(367)][r(309)]("\n")};function maskClose(){var t,e=_0xfa8bcb,r={mask:document[e(311)](e(322)),closeBtn:document[e(311)](e(227)),table:document[e(311)](".mask .table-box table")},n=createTable([{cls:e(215),title:e(266)},{cls:e(263),title:e(223)},{cls:e(240),title:e(203)}]);function a(){var t;r[e(295)].innerHTML=n,r[(t=e)(238)][t(232)][t(256)]("hide")}r[(t=e)(212)][t(285)](t(273),a)}function projectResult(){var a,t,e=_0xfa8bcb,r={projectTable:document.querySelector(e(362)),dataSources:{surroundings:pageData[e(197)],tableInfo:pageData[e(312)]}};a=e,t=Object[a(347)](r[a(340)][a(197)]).reduce(function(t,e){var r=a,n=e[r(215)],e=e[r(282)];return _objectSpread(_objectSpread({},t),{},_defineProperty({},n,e))},{}),t=t=_objectSpread(_objectSpread({},r.dataSources[a(312)]),t),r[e(245)].innerHTML=(t=>{var n=e;return Object[n(211)](t)[n(229)](function(t){var e=n,t=_slicedToArray(t,2),r=t[0],t=t[1];return'\n <tr>\n <td class="text-left">'.concat(r,e(244))[e(279)](t,"</td>\n </tr>\n ")})[n(309)]("")})(t)}
1
+ function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,a,o,c,i=[],s=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(i.push(r.value),i.length!==e);s=!0);}catch(t){l=!0,a=t}finally{try{if(!s&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw a}}return i}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function ownKeys(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _toConsumableArray(t){return _arrayWithoutHoles(t)||_iterableToArray(t)||_unsupportedIterableToArray(t)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(t,e){var n;if(t)return"string"==typeof t?_arrayLikeToArray(t,e):"Map"===(n="Object"===(n={}.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(t,e):void 0}function _iterableToArray(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}function _arrayLikeToArray(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function _defineProperty(t,e,n){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _toPropertyKey(t){t=_toPrimitive(t,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(t,e){if("object"!=_typeof(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function concepteleMade(){var t='<div class="itembox itembox_completely">\n <div class="botval">'.concat(pageData.concept.modelAll,'</div>\n <div class="topname">文件总数</div>\n </div>\n <div class="itembox itembox_completely">\n <div class="botval">').concat(pageData.concept.completely,'</div>\n <div class="topname">完全转换</div>\n </div>\n <div class="itembox itembox_portion">\n <div class="botval">').concat(pageData.concept.partial,'</div>\n <div class="topname">部分转换</div>\n </div>\n <div class="itembox itembox_failed">\n <div class="botval">').concat(pageData.concept.notsupport,'</div>\n <div class="topname">无法转换</div>\n </div>');document.querySelector(".rep-allbox").innerHTML=t}function fileDetails(r,t){if(0===(f=Object.keys(r)).length)return!1;function e(e){var n=[];return f.forEach(function(t){r[t].status===e&&n.push(t)}),n}var n,a=document.querySelector(".tab-box"),o=a.querySelector(".ul"),c=o.querySelectorAll("li")[0],i=(c&&c.classList.add("actived"),document.createElement("li")),s=(i.classList.add("tab-item"),i.setAttribute("data-type",t),i.innerHTML={templete:"模板文件",jsonModular:"json文件",otherModular:"其他文件",jsModular:"脚本文件",wxssModular:"样式文件",modularWxs:"自定义脚本",unsupported:"不支持文件",supportPart:"部分支持"}[t],o.appendChild(i),a.querySelector(".card-box")),c=s.querySelectorAll(".table-info")[0],a=(c&&c.classList.add("actived"),document.createElement("div")),c=(a.classList.add("table-info"),a.classList.add(t),document.createElement("table")),t=(c.classList.add("table"),document.createElement("thead")),l=(t.classList.add("table-head"),t.innerHTML='<tr class="pages">\n <th>文件路径</th>\n <th>转换结果</th>\n </tr>',document.createElement("tbody")),u="",d=0,p=e(1),y=e(2),f=e(3).concat(y).concat(p),b="warn";f.forEach(function(t){var e="";1===r[t].status?e='<span class="status-icon success-icon">✓</span>':2===r[t].status?e='<span class="status-icon warning-icon">⚠</span>':3===r[t].status&&(e='<span class="status-icon danger-icon">✕</span>'),u="".concat(u,'<tr>\n <td class="apges">\n ').concat(e,'\n </td>\n <td class="file-path">\n ').concat(t,"\n </td>\n </tr>"),r[t].supportType&&1!==r[t].supportType&&d++,3===r[t].supportType&&(b="err")}),l.innerHTML=u;i.appendChild((y=d||"",p=d?b:"none",(n=document.createElement("span")).classList.add("num"),n.innerHTML=y,n.classList.add(p),n)),c.appendChild(t),c.appendChild(l),a.appendChild(c),s.appendChild(a),i.addEventListener("click",function(){o.querySelectorAll("li").forEach(function(t){t.classList.remove("actived")}),s.querySelectorAll(".table-info").forEach(function(t){t.classList.remove("actived")});var t=i.getAttribute("data-type");s.querySelector(".".concat(t)).classList.add("actived"),i.classList.add("actived")})}function openingMade(){var r=pageData.opening;if(0===Object.keys(r).length)return!1;var t,e,n,a,o,c,i={tabBox:document.querySelector(".tab-box"),get ulBox(){return this.tabBox.querySelector(".ul")},get cardBox(){return this.tabBox.querySelector(".card-box")}},s={CORRECT:1,WARNING:2,ERROR:3};c=i.ulBox.querySelector("li:first-child"),t=i.cardBox.querySelector(".table-info:first-child"),null!=c&&c.classList.add("actived"),null!=t&&t.classList.add("actived"),c=(()=>{var e=0,n="none";return Object.values(r).forEach(function(t){t.status!==s.CORRECT&&e++,t.status===s.ERROR?n="err":e&&"err"!==n&&(n="warn")}),{unsupportedNum:e,statusClass:n}})(),t=c.unsupportedNum,c=c.statusClass,(e=document.createElement("li")).className="tab-item actived",e.dataset.type="openability",(n=document.createElement("span")).className="num ".concat(c),n.textContent=t||"",e.innerHTML="开放能力",e.prepend(n),i.ulBox.appendChild(e),c=e,(t=document.createElement("div")).className="table-info openability actived",(n=document.createElement("table")).className="table",n.innerHTML='\n <thead class="table-head">\n <tr>\n <th>能力名称</th>\n <th>页面路径</th>\n <th>如何解决</th>\n <th>转换结果</th>\n </tr>\n </thead>\n <tbody>'.concat((()=>{var e=_defineProperty(_defineProperty(_defineProperty({},s.ERROR,[]),s.WARNING,[]),s.CORRECT,[]);return Object.keys(r).forEach(function(t){return e[r[t].status].push(t)}),[].concat(_toConsumableArray(e[s.ERROR]),_toConsumableArray(e[s.WARNING]),_toConsumableArray(e[s.CORRECT]))})().map(function(t){var e=r[t];return"\n <tr>\n <td>".concat(t,"</td>\n <td>").concat(e.pathArr.join("、"),'</td>\n <td>\n <div class="show-instruct" data-path="').concat(e.docpath,'">\n 查看相关能力\n </div>\n </td>\n <td class="apges">').concat((t=e.status,e=_defineProperty(_defineProperty(_defineProperty({},s.CORRECT,"icon-zhengque"),s.WARNING,"icon-warning"),s.ERROR,"icon-cuowu"),'<i class="iconfont '.concat(e[t],'"></i>')),"</td>\n </tr>\n ")}).join(""),"</tbody>\n "),t.appendChild(n),i.cardBox.appendChild(t),o=t,(a=c).addEventListener("click",function(){i.ulBox.querySelectorAll("li").forEach(function(t){return t.classList.remove("actived")}),i.cardBox.querySelectorAll(".table-info").forEach(function(t){return t.classList.remove("actived")}),a.classList.add("actived"),o.classList.add("actived")}),i.cardBox.addEventListener("click",function(t){t=t.target.closest(".show-instruct");t&&(window.location.href=t.dataset.path)})}window.onload=function(){projectResult(),concepteleMade(),temelatetable(),openingMade(),supportiveness(),fileInfo(),maskClose()};var byStatus=function(e){var n={};return Object.keys(pageData.transforms).forEach(function(t){pageData.transforms[t].status===e&&(n[t]=pageData.transforms[t])}),n};function supportiveness(){fileDetails(byStatus(2),"supportPart"),fileDetails(byStatus(3),"unsupported")}var byType=function(t){var e,n={};for(e in pageData.transforms)pageData.transforms[e].type===t&&(n[e]=Object.assign({},pageData.transforms[e]),n[e].supportType=n[e].status);fileDetails(n,t)};function temelatetable(){byType("templete"),byType("jsModular"),byType("wxssModular"),byType("jsonModular"),byType("otherModular"),byType("modularWxs")}function fileInfo(){var i={mask:document.querySelector(".mask"),maskTitle:document.querySelector(".mask .title"),tableBox:document.querySelector(".mask .table-box"),pagePaths:document.querySelectorAll(".file-path")},s={getTransformData:function(t){return pageData.transforms[t]}};function l(t){i.tableBox.querySelector("#col1").innerText=t}function u(t){var e=t.attrs.map(function(t){return'<div class="opation-item">'.concat(t,"</div>")}).join("");return'\n <tr>\n <td class="name">'.concat(t.name,'</td>\n <td class="opations">').concat(e,"</td>\n ").concat(!(e=t).doc||"无"===e.doc?'<td class="unsupported">暂不支持,请尝试其他实现方式</td>':'<td class="result" path="'.concat(e.doc,'">帮助文档</td>'),"\n </tr>\n ")}i.pagePaths.forEach(function(c){c.addEventListener("click",function(){var t,e,n,r,a,o;t=(t=c).innerText,(o=s.getTransformData(t))&&(a=o.type,e=t,(n=i.tableBox.querySelectorAll("th")).forEach(function(t){return t.style.display=""}),null!=(a=(r={templete:function(){return l("组件名")},jsModular:function(){return l("api/生命周期")},otherModular:function(){return e.endsWith(".js")?l("api/生命周期"):n.forEach(function(t){return t.style.display="none"})},jsonModular:function(){return l("属性名称")}})[a])&&a.call(r),i.maskTitle.innerText=t,a=o.components,i.tableBox.querySelector("tbody").innerHTML=0<a.length?a.map(u).join(""):'<tr><td colspan="3">完整支持</td></tr>',i.mask.classList.remove("hide"),i.mask.querySelectorAll(".result").forEach(function(t){t.addEventListener("click",function(){window.open(t.getAttribute("path"))})}))})})}var createTable=function(t){return["\n <thead>\n <tr>\n ",t.map(function(t){return'<th class="'.concat(t.cls,' header" id="col1">').concat(t.title,"</th>")}),"\n </tr>\n </thead>\n <tbody></tbody>\n "].join("\n")};function maskClose(){var t={mask:document.querySelector(".mask"),closeBtn:document.querySelector(".mask .close"),table:document.querySelector(".mask .table-box table")},e=createTable([{cls:"name",title:"组件名"},{cls:"opations",title:"不支持"},{cls:"result",title:"如何解决"}]);function n(){t.table.innerHTML=e,t.mask.classList.add("hide")}t.closeBtn.addEventListener("click",n)}function projectResult(){var t,e={projectTable:document.querySelector("#project tbody"),dataSources:{surroundings:pageData.surroundings,tableInfo:pageData.tableInfo}};t=Object.values(e.dataSources.surroundings).reduce(function(t,e){var n=e.name,e=e.val;return _objectSpread(_objectSpread({},t),{},_defineProperty({},n,e))},{}),t=_objectSpread(_objectSpread({},e.dataSources.tableInfo),t),e.projectTable.innerHTML=(t=>Object.entries(t).map(function(t){var t=_slicedToArray(t,2),e=t[0],t=t[1];return'\n <tr>\n <td class="text-left">'.concat(e,'</td>\n <td class="text-right">').concat(t,"</td>\n </tr>\n ")}).join(""))(t)}