├── iqiyi ├── cmd.txt ├── test.js └── webpack_mixer.js ├── 猿人学16 ├── cmd.txt ├── test.js └── webpack_mixer.js ├── whatsapp ├── cmd.txt ├── test.js ├── webpack_mixer.js └── runtime.js ├── wwwgm99com ├── cmd.txt ├── test.js └── webpack_mixer.js ├── 美食优惠聚合 ├── cmd.txt ├── test.js └── webpack_mixer.js ├── m934033com ├── cmd.txt ├── test.js └── webpack_mixer.js ├── tiebabaidu ├── test.js ├── cmd.txt ├── utils.f6706911.js └── webpack_mixer.js ├── README.md ├── qq音乐 ├── cmd.txt ├── test.js ├── runtime_Page.8070bd8b2e010619dd4b.js └── webpack_mixer.js ├── sfrzshaanxigovcn ├── cmd.txt ├── test.js └── webpack_mixer.js ├── 酷我音乐 ├── cmd.txt ├── test.js ├── runtime.62249a5.js ├── search.cfd9038.js └── webpack_mixer.js ├── 天翼云 ├── cmd.txt ├── test.js ├── auth.3575011e.js ├── webpack_mixer.js └── login.82cd5927.js ├── aiscore ├── cmd.txt ├── test.js ├── 5ef8102.js ├── webpack_mixer.js └── 045b45a.js ├── 天安保险超市 ├── cmd.txt ├── test.js ├── runtime.f14829991e28826b88df.js └── webpack_mixer.js ├── 球探 ├── cmd.txt ├── test.js ├── ffa43f3bc74cf5925a35.js ├── webpack_mixer.js └── 52f1b607ac09687a535a.js └── webpack_mixer.js /iqiyi/cmd.txt: -------------------------------------------------------------------------------- 1 | node webpack_mixer.js -l pcweb.js -o webpack_out.js -------------------------------------------------------------------------------- /猿人学16/cmd.txt: -------------------------------------------------------------------------------- 1 | node webpack_mixer.js -l webpack.js -o webpack_out.js -------------------------------------------------------------------------------- /whatsapp/cmd.txt: -------------------------------------------------------------------------------- 1 | node webpack_mixer.js -l runtime.js -o webpack_out.js -------------------------------------------------------------------------------- /wwwgm99com/cmd.txt: -------------------------------------------------------------------------------- 1 | node webpack_mixer.js -l home.min.js -o webpack_out.js -------------------------------------------------------------------------------- /美食优惠聚合/cmd.txt: -------------------------------------------------------------------------------- 1 | node webpack_mixer.js -l app.bundle.js -o webpack_out.js -------------------------------------------------------------------------------- /m934033com/cmd.txt: -------------------------------------------------------------------------------- 1 | node webpack_mixer.js -l app.ce662e86.js -o webpack_out.js -------------------------------------------------------------------------------- /tiebabaidu/test.js: -------------------------------------------------------------------------------- 1 | 2 | let n = require('./webpack_out'); 3 | console.log(n); 4 | 5 | -------------------------------------------------------------------------------- /whatsapp/test.js: -------------------------------------------------------------------------------- 1 | 2 | let n = require('./webpack_out'); 3 | 4 | 5 | console.log(n); -------------------------------------------------------------------------------- /m934033com/test.js: -------------------------------------------------------------------------------- 1 | 2 | let a = require('./webpack_out'); 3 | console.log(a("xqW7")); 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # webpack_ast 2 | web逆向AST自动扣webpack 3 | 4 | Forked from 5 | -------------------------------------------------------------------------------- /qq音乐/cmd.txt: -------------------------------------------------------------------------------- 1 | node webpack_mixer.js -l runtime_Page.8070bd8b2e010619dd4b.js -m vendor.chunk.9a1ccc7ef30852dbe5bb.js -o webpack_out.js -------------------------------------------------------------------------------- /sfrzshaanxigovcn/cmd.txt: -------------------------------------------------------------------------------- 1 | node webpack_mixer.js -l app.f24d08e9.js -m login.5170f665.js -m chunk-vendors.bb13f90f.js -o webpack_out.js -------------------------------------------------------------------------------- /酷我音乐/cmd.txt: -------------------------------------------------------------------------------- 1 | node webpack_mixer.js -l runtime.62249a5.js -m app.597640f.js -m search.cfd9038.js -m commons.1e71338.js -o webpack_out.js -------------------------------------------------------------------------------- /天翼云/cmd.txt: -------------------------------------------------------------------------------- 1 | node webpack_mixer.js -l main.b8aece68.js -m auth.3575011e.js -m login.82cd5927.js -m chunk-vendors.e373842f.js -o webpack_out.js -------------------------------------------------------------------------------- /酷我音乐/test.js: -------------------------------------------------------------------------------- 1 | 2 | let n = require('./webpack_out'); 3 | 4 | var l = n(109); 5 | var c = n.n(l); 6 | var reqId = c()(); 7 | 8 | console.log(reqId); -------------------------------------------------------------------------------- /tiebabaidu/cmd.txt: -------------------------------------------------------------------------------- 1 | node webpack_mixer.js -l tieba_promise.1e7c6aac.js -m common.f6f2d4d3.js -m utils.f6706911.js -m vendors.a4eb29bc.js -o webpack_out.js -------------------------------------------------------------------------------- /aiscore/cmd.txt: -------------------------------------------------------------------------------- 1 | node webpack_mixer.js -l 045b45a.js -m 0d02486.js -m 5ef8102.js -m 8f3d56b.js -m 9da73d9.js -m 74b8c43.js -m 496ebf5.js -m f3e1976.js -m f244215.js -o webpack_out.js -------------------------------------------------------------------------------- /天安保险超市/cmd.txt: -------------------------------------------------------------------------------- 1 | node webpack_mixer.js -l runtime.f14829991e28826b88df.js -m polyfills.e375cefe300714a6da33.js -m vendor.7e178057f36014b4b175.js -m main.f0409bc0315ca30a178d.js -o webpack_out.js -------------------------------------------------------------------------------- /球探/cmd.txt: -------------------------------------------------------------------------------- 1 | node webpack_mixer.js -l ffa43f3bc74cf5925a35.js -m 42eea894c639c8655feb.js -m 01b18bd4edbfc16a1f2a.js -m 52f1b607ac09687a535a.js -m ae003ad8d6cbf21f404b.js -m b91e54701379309c0e11.js -o webpack_out.js -------------------------------------------------------------------------------- /球探/test.js: -------------------------------------------------------------------------------- 1 | 2 | let n = require('./webpack_out'); 3 | var t; 4 | var a = n(156); 5 | var i = n.n(a); 6 | var c = n(157); 7 | var s = n.n(c); 8 | 9 | a = (t = "1212121212121", n = i()(t), s.a.stringify(n)); 10 | console.log(a); -------------------------------------------------------------------------------- /天翼云/test.js: -------------------------------------------------------------------------------- 1 | 2 | window = { 3 | location: { 4 | origin: 'https://m.ctyun.cn' 5 | }, 6 | navigator: { 7 | userAgent: 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36' 8 | } 9 | }; 10 | 11 | let t = require('./webpack_out'); 12 | console.log(t('7f6d').k()); 13 | -------------------------------------------------------------------------------- /天翼云/auth.3575011e.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["auth"],{9150:function(t,e,n){"use strict";var a=n("ce85"),c=n.n(a);c.a},ce85:function(t,e,n){},e9eb:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"auth"},[n("router-view",{staticClass:"router-view"})],1)},c=[],s={name:"auth"},u=s,i=(n("9150"),n("2877")),r=Object(i["a"])(u,a,c,!1,null,"076c5cbd",null);e["default"]=r.exports}}]); -------------------------------------------------------------------------------- /wwwgm99com/test.js: -------------------------------------------------------------------------------- 1 | const {JSDOM} = require('jsdom'); 2 | window = (new JSDOM('')).window; 3 | document = window.document; 4 | navigator = { 5 | userAgent: 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36' 6 | }; 7 | window.navigator = navigator; 8 | 9 | 10 | 11 | 12 | let i = require('./webpack_out'); 13 | let a = i(3); 14 | console.log((new a).encode("a123456", 1641473447987)); 15 | 16 | -------------------------------------------------------------------------------- /猿人学16/test.js: -------------------------------------------------------------------------------- 1 | 2 | $ = require('jquery')((new (require("jsdom").JSDOM)("

hello word

", {url: 'https://match.yuanrenxue.com/'})).window.document.defaultView); 3 | let _ajax = $.ajax; 4 | 5 | $.ajax = function (a) { 6 | a.success = function(t){ 7 | t = t["data"]; 8 | console.log(t); 9 | }; 10 | _ajax(a); 11 | }; 12 | 13 | 14 | let n = require('./webpack_out'); 15 | 16 | n(127); // 初始化 md5 17 | try{ 18 | n(732) // 初始化 btoa 19 | }catch (e) {} 20 | 21 | n(58); // 初始化 request 22 | 23 | for (page = 1; page < 4; page++) { 24 | request(); 25 | } 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /aiscore/test.js: -------------------------------------------------------------------------------- 1 | 2 | const request = require('request'); 3 | const n = require('./webpack_out'); 4 | const l = n(82); 5 | const m = l.Root.fromJSON(n(97)).lookup("onescore.app.v1.Response"); 6 | const M = l.Root.fromJSON(n(97)).lookup("onescore.app.v1.PlayerStats"); 7 | 8 | 9 | request({uri: 'https://api.aiscore.com/v1/web/api/football/comp/stats?lang=3&season_id=5wv78xirr3fekrj&team_id=&type=3&n=2&kind=0', encoding:'binary'}, function (error, response, body) { 10 | if (!error && response.statusCode === 200) { 11 | let d = new Uint8Array(body.length); 12 | for (let i = 0; i < body.length; i++) { 13 | d[i] = body.charCodeAt(i) 14 | } 15 | let h = m.decode(d); 16 | let data = M.decode(h.data); 17 | console.log(JSON.stringify(data)); 18 | } 19 | }); 20 | 21 | 22 | -------------------------------------------------------------------------------- /sfrzshaanxigovcn/test.js: -------------------------------------------------------------------------------- 1 | 2 | let n = require('./webpack_out'); 3 | let DCSAPPClientAPI = require('./DCSAPPClientAPI-0.0.0.7'); 4 | 5 | let password_enc = n('56f2'); 6 | let u = "kcn071805buj05k313ql" , c = "4sig52dR0Xxw2raF0v37dngO3DiiR1PaITXS4ddJiRb1xfjSjAUQ6P9VuyxfaiZ8gElGKMcSskm70yGY0ZrQEQ=="; 7 | 8 | let data = { 9 | "txnCommCom":{"txnIttChnlId":"C0081234567890987654321","txnIttChnlCgyCode":"BC01C101"}, 10 | "txnBodyCom":{ 11 | "loginType":"AU01","loginNo":"13088888888", 12 | "loginPassword":password_enc.a("a123456"), 13 | "acctType":"10","vcodeId":"1641482664426","vcode":"y9sb", 14 | "sessionId":"fe823fd1-cb32-453f-a037-b4800037767d","clientId":"000000000" 15 | } 16 | }; 17 | let t = DCSAPPClientAPI.parseUtf8StringToArray(JSON.stringify(data)); 18 | let n2 = DCSAPPClientAPI.workKey_nego_and_data_encrypt_cpa(false, u, c, t, false); 19 | let paypload = n2.keySM2Cipher; 20 | 21 | console.log(paypload); -------------------------------------------------------------------------------- /iqiyi/test.js: -------------------------------------------------------------------------------- 1 | const { JSDOM } = require("jsdom"); 2 | const dom = new JSDOM("

hello word

"); 3 | global.window = dom.window; 4 | global.document = window.document; 5 | global.self = window; 6 | 7 | 8 | const n = require('./webpack_out'); 9 | const i = n('295'); 10 | console.log(i.cmd5x('/dash?tvid=114869400&bid=300&vid=eac5b7e5c7d6c471a6635725f0173fdc&src=01010031010000000000&vt=0&rs=1&uid=1626142844&ori=pcw&ps=0&k_uid=49c360579e9a7cf874d599de913c6bff&pt=0&d=0&s=&lid=&cf=&ct=&authKey=b66ff0001e1568368db1f0827830ffeb&k_tag=1&ost=0&ppt=0&dfp=a11d64e2e196534268a0b9ab3908bffd86cec25e335c3269344667023b08b60afe&locale=zh_cn&prio=%7B%22ff%22%3A%22f4v%22%2C%22code%22%3A2%7D&pck=4aT95ShhWNgoEXxVzhFwU28qb6fXgiMIWS7d3DjB1t2KBKGj8m1Npt3LUz3KQauw35i99&k_err_retries=0&up=&qd_v=2&tm=1637337797663&qdy=a&qds=0&k_ft1=706436220846084&k_ft4=1162183859249156&k_ft5=262145&bop=%7B%22version%22%3A%2210.0%22%2C%22dfp%22%3A%22a11d64e2e196534268a0b9ab3908bffd86cec25e335c3269344667023b08b60afe%22%7D&ut=1')); 11 | 12 | 13 | -------------------------------------------------------------------------------- /天安保险超市/test.js: -------------------------------------------------------------------------------- 1 | window = this; 2 | navigator = { 3 | appName: 'Netscape' 4 | }; 5 | localStorage = { 6 | getItem: function () { 7 | return null; 8 | } 9 | }; 10 | sessionStorage = { 11 | getItem: function () { 12 | return null; 13 | } 14 | }; 15 | 16 | document = { 17 | cookie: "" 18 | }; 19 | 20 | const t = require('./webpack_out'); 21 | const request = require('request'); 22 | 23 | let dutO = t('dutO').a; 24 | // console.log(dutO); 25 | let aaa = dutO.prototype.post('https://tianaw.95505.cn/tacpc/tiananapp/customer_login/taPcLogin', {loginMethod: "1", name: "13800000000", password: "a123456789"}); 26 | console.log(aaa); 27 | 28 | request({ 29 | url: aaa[1], 30 | method: "POST", 31 | json: true, 32 | headers: { 33 | "key": aaa[0], 34 | "content-type": "application/json", 35 | }, 36 | body: JSON.stringify({ 37 | jsonKey: aaa[1].split('=')[1] 38 | }) 39 | }, function(error, response, body) { 40 | if (!error && response.statusCode == 200) { 41 | console.log(body) // 请求成功的处理逻辑 42 | } 43 | }); 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /qq音乐/test.js: -------------------------------------------------------------------------------- 1 | window = this; 2 | navigator = { 3 | userAgent: 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36' 4 | }; 5 | window.navigator = navigator; 6 | location = { 7 | host: 'y.qq.com' 8 | }; 9 | window.location = location; 10 | let n = require('./webpack_out'); 11 | let o = n('350').default; 12 | let data = `{"comm":{"cv":4747474,"ct":24,"format":"json","inCharset":"utf-8","outCharset":"utf-8","notice":0,"platform":"yqq.json","needNewCode":1,"uin":0,"g_tk_new_20200303":5381,"g_tk":5381},"req_1":{"method":"GetCommentCount","module":"GlobalComment.GlobalCommentReadServer","param":{"request_list":[{"biz_type":1,"biz_id":"336542568","biz_sub_type":0}]}},"req_2":{"module":"music.globalComment.CommentReadServer","method":"GetNewCommentList","param":{"BizType":1,"BizId":"336542568","LastCommentSeqNo":"","PageSize":25,"PageNum":0,"FromCommentId":"","WithHot":1}},"req_3":{"module":"music.globalComment.CommentReadServer","method":"GetHotCommentList","param":{"BizType":1,"BizId":"336542568","LastCommentSeqNo":"","PageSize":15,"PageNum":0,"HotType":2,"WithAirborne":1}}}`; 13 | console.log(data); 14 | console.log(o(data)); 15 | -------------------------------------------------------------------------------- /天安保险超市/runtime.f14829991e28826b88df.js: -------------------------------------------------------------------------------- 1 | !function(e){function r(r){for(var n,a,c=r[0],u=r[1],i=r[2],l=0,p=[];l\n .content {\n width: 100%;\n position: absolute;\n top: 0%;\n bottom: 0;\n left: 0;\n right: 0;\n }\n .emotion {\n display: block;\n margin: 0 auto 42px;\n width: 144px;\n height: 144px;\n padding-top: 10%;\n text-align: center;\n }\n p {\n margin-bottom: 2px;\n text-align: center;\n color: #8F8E94;\n font-size: 14px;\n line-height: 14px;\n }\n \n
\n \n

网络出错了

\n
\n'},270:function(e,a,t){"use strict";var n=t(2),d=t(0);t(80),t(10),t(39),n(a,"__esModule",{value:!0}),a.deepClone=r,a.resHook=function(e){var a=String(void 0!==e.no?e.no:e.errno),t=e.errmsg||e.msg||e.errormsg;e.data||(e.data=r(e));return{errno:a,errmsg:t,data:e.data}},a.getQueryString=function(e,a){var t="",n=new RegExp("(\\?|&)"+a+"=([^&#]*)(#|&|$)","ig").exec(e);n&&(t=n[2]);return t};var o=d(t(30)),i=d(t(72));function r(e){var a=(0,i.default)(e)?[]:{};if(e&&"object"===(0,o.default)(e))for(var t in e)e.hasOwnProperty(t)&&(e[t]&&"object"===(0,o.default)(e[t])?a[t]=r(e[t]):a[t]=e[t]);return a}},680:function(e,a,t){"use strict";t(2)(a,"__esModule",{value:!0}),a.default=void 0;var n,d=t(681),o=t(270),i={baseURL:"",tbs:(null===(n=window.TBCONFIG)||void 0===n?void 0:n.tbs)||"",resHook:o.resHook};d.Http.useConfig(i);var r=d.Http;a.default=r}}]); -------------------------------------------------------------------------------- /酷我音乐/runtime.62249a5.js: -------------------------------------------------------------------------------- 1 | !function(e){function n(data){for(var n,t,d=data[0],l=data[1],f=data[2],i=0,m=[];i(t=this.array[i]).x1&&rt.y1&&l6&&(r="".concat(r.substring(0,6),"...")),n.fillText(r,t.x+20,t.y+55))}},{key:"drawRate",value:function(e,t){if(0!=e.player.rating){var n=this.ctx;this.players;n.font="normal 10px Rubik",this.fillRoundRect(n,t.x+30,t.y+20,19,19,3,this.formatRateColor(e.player.rating)),n.fillStyle="#fff",n.fillText(parseFloat(e.player.rating).toFixed(1),t.x+39,t.y+33)}}},{key:"drawNumber",value:function(e,t){var n=this.ctx;this.players;n.font="normal 10px Rubik",n.fillStyle="#fff",n.fillText("#"+e.player.shirtNumber,t.x-9,t.y+10)}},{key:"clearCanvas",value:function(){this.ctx.clearRect(0,0,320,507)}},{key:"reloadCanvas",value:function(){this.clearCanvas(),this.array=[],this.setBg()}},{key:"transformXY",value:function(e,t){return{y:507*(1-t/100),x:e/100*320-20}}},{key:"formatRateColor",value:function(e){return e<6?f[0]:e<=6.49&&e>=6?f[1]:e<=6.99&&e>=6.5?f[2]:e<=7.99&&e>=7?f[3]:e<=8.99&&e>=8?f[4]:e>=9?f[5]:void 0}},{key:"fillRoundRect",value:function(e,t,n,r,l,o,c){if(2*o>r||2*o>l)return!1;e.save(),e.translate(t,n),this.drawRoundRectPath(e,r,l,o),e.fillStyle=c||"#000",e.fill(),e.restore()}},{key:"drawRoundRectPath",value:function(e,t,n,r){e.beginPath(0),e.arc(t-r,n-r,r,0,Math.PI/2),e.lineTo(r,n),e.arc(r,n-r,r,Math.PI/2,Math.PI),e.lineTo(0,r),e.arc(r,r,r,Math.PI,3*Math.PI/2),e.lineTo(t-r,0),e.arc(t-r,r,r,3*Math.PI/2,2*Math.PI),e.lineTo(t,n-r),e.closePath()}}]),e}()},1417:function(e,t,n){var r=n(42);r(r.P,"Array",{fill:n(284)}),n(192)("fill")},2358:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},2359:function(e,t,n){"use strict";function r(e,t){for(var i=0;i=0&&(this.active=e);var n=this.$route.query.key;this.key=n||""}},mounted:function(){this.$store.commit("downloadurl/set",{windows:"http://down.kuwo.cn/mbox/kwmusic_web_6.exe"})},methods:{switchTab:function(t){t!==this.route&&(this.route=t,this.$router.push({path:t,query:{key:this.key}}))}}},h=(n(601),n(2)),component=Object(h.a)(o,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"search_page"},[n("div",{staticClass:"search_out"},[n("div",{staticClass:"bg"}),t._v(" "),n("div",{staticClass:"search_inn"},[n("search",{attrs:{keyquery:t.key,type:"search_page"}})],1)]),t._v(" "),n("div",[n("div",{staticClass:"tabs"},[n("span",{staticClass:"text"},[t._v("搜索结果")]),t._v(" "),n("Subnav",{attrs:{subnav:t.subnav,active:t.active},on:{getdata:t.switchTab}})],1),t._v(" "),n("nuxt-child",{staticClass:"child_view",attrs:{keystr:t.key}})],1)])}),[],!1,null,"71e59797",null);e.default=component.exports}}]); -------------------------------------------------------------------------------- /美食优惠聚合/test.js: -------------------------------------------------------------------------------- 1 | 2 | navigator = { 3 | userAgent: 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36' 4 | }; 5 | 6 | let n = require('./webpack_out'); 7 | 8 | 9 | let a = n(29); 10 | console.log(a); 11 | let data = `ZTA4NDVlYjE5Nnic7VzZctu4Ev0aPVqFHd2PlGz/hgsbHd/Ykq8lZybz9bcB 12 | LqIlUqG3OFN1qxSaIiGwsZ1zutHMwq4WQuz2bv+8o5OFrOi4/Z5PxZqOD2m3 13 | c7epv9XfeEq75/t9e71Ucn+3677rVXPpLjYXuAKjUTe/jHdu83i3ub3p7tKR 14 | c27Bcs37+u+3m9u7/XNsH825XCrJmdGADLlE1RZz+0EpIZYclTIWgTHFuWkK 15 | bdzDoAVXelGpRVXlkxUuVnJxZRYrtYBVvoJigaacUDEyB/I5XC7gqpxcL5CX 16 | 8iz/JNcgFqtSZlUt0C4EHrrubnPz5Pbtk9mybf7jt+3mYA0YsAoOzf4r3d1+ 17 | a7sRltRtXDY3dtvnp5CGfSZqraNIQjmBKsQaUdRok1cgEYz1fZ3e7RJZsvne 18 | WcK0Nsra9i7diW/tnc5qd/fg7m52zw8P7ulnU9nm+f6+uRvu9j9vjsbA5q6s 19 | WKmcHmT7qtyP25vHp7vQFlZiydoO2LundopiWzRGmoW7c7W2raETXFAvo5QA 20 | 0A5kvj02kKeDjaVYWxeW5q/pylosl8ve8EBDfbt9OmnpSaflmq8WoPtfUt/d 21 | ppvnp/v+V9/2+8ddOb2mz93D7ZJ6eJ//Pbqfy7B9oKvhm6MJVkbv5i5sN6Ws 22 | psqFJjPpUHVfaRjpIPNXk8/yXRrO9i5ZRwfTfy0V8OV/Hm97AyOtbLcJh1bJ 23 | JXx/ONi/u/nh7u/izWb7V1Nk//ScOpggax+yjT+2z+Fb6obwBCLoiB7A1CBM 24 | 0Dpwaa133kvFNFfeJl33D2yrovn2+Hh/Rycvuvyf3e5bX5TQ4X44GmqxWi0q 25 | WeaDLcNLowF55HNxpvNwA61kyKXtZb56bGaKKrAUJVjGnDIgo45GMo7aBpS1 26 | nWnm8+Zuu6HhPGfqOhuSLZJlVquyIlk7SVs8ZWZpZ1iNzom6VjxqnmoFgVtr 27 | a52U0cJyU+uZVtMyj27j3butxqWa09eyji5IVkfrMSqu0KOrMTIRCOdCnGk1 28 | zc5zPV2WOqyLqVX+5BNoIS/DATUHcoFVWcaVzkhPM4jWGbLWeH05MeF7kwYz 29 | /8Sik8lw0s/drO6eQ2sybJ83+wHF6KM7+5+PLwaur+vUxn36e7/4uFXCFROI 30 | Vhs2TfnWCJTEU7I3a4TypTFZE4wzvSY0H2d4zDjbjyOBNQ1fdVUmoV2srgq+ 31 | Y24gXg+oe4K3iTTkGHVzDYyayInAD0Q4oG+xNIy4fYq+mQ4otOYGnQEmvdKS 32 | Q5IuJR1UnQ51HtH3BV+StOnqPWbvd7X882g8G31C4zBN40iIcZltJ+sq1VJv 33 | w9MEIDTqbfuq0j4idks/kwtgxPJzSLnXB5h5H9cHLnsTF/+Tnnc39KyWgwvL 34 | Fua1+Wuh38Kya7l83JzhVfUpvJpqi7SYrAoyuGBj1NYEqAOoUDMRDzLuPIh2 35 | i/gDoF8eA8gr0XNoyhlAzA/6QEh8a+NO0REUMHPGG2IgmZXigAFj0EiySJPf 36 | RC6EsZMQqQ2CQvqroSt1tBSI2MSiatDgqtXMBA6EDI3vk9HDtDI2c2S52wjk 37 | t7k8ijEUjJG3t7BrMoyRszYKoLC0GrSaBFAmpZMkvJxLyjvyhkJtvI5WeC5J 38 | M0wBKF8KJZQcx88zvfHpIGnGfJ0zIHnq66yK+Y3H0kiUjJ+NV7MutGDypG28 39 | kdV1nsnUYvptdU1TaugYEUeYrhynSjn50xkC6e8cfIUskugBQ5H08b4OZEcm 40 | A2vVuz40aB3sFm8m31hV570ZsxSfgLrkukQfRYwRfZYKgWytk60NIXBI7rC2 41 | v9qbSYwWDaKSVksBjpnIvENGskbIQRThj/JmnMSQjBeaNCTpQG/QJ5MM8Gi4 42 | iwxnWj3HmznXwbCc1cUsOksAHJlxxL4xMBMiIZuG4B2LYaaxmSXc5q2m4gxD 43 | TfQQBFgvQHseHUjLPGM8WqRJLOd6tv/8/XN6yk4DbL6V9VuLVhm/ij9WrYtM 44 | Kzqv+TlgO2naCM9Lf+zqOk+11md7fYVi1YrL6rIg6WVr7XEUp3kKLt4kYOb7 45 | ew2Bvhz6roP/Hb6gESCVmlY7aBG0UGfFjpKEDMoAcFRmMvKrwaLiggmjxUTk 46 | tw3umaxpqs6NADsQOqrMy+u2mTncB/k66APBzg8KUw1gZkil3j16KZWyf3kB 47 | 5IByfgjQDCWSXIocKJuSSAa80+iscgpjSsH4EK11mJD++vqcj6ms7Zzr0wjx 48 | x/Ti13id5oOCx2vNxMAfJVUlC4odT4x5cum4b67HuvDYX//wwDFZToer3ofN 49 | h6qEhnPMeFX0Vq+tqquuSHO3fD1UlQvnSH0j00q5HPNuZVoj3c7rMvUJqsyK 50 | qPL2h3feMi68VNHbGgMXXHPD56qys1zcqpyCiae6Z5J9ScnUNfl9HkC6WCsu 51 | XQ6AknjgzBqXZpr2SyXWCzDIaFVdXpQZpjs/IUsxXMIJrr+X4Q5ddoa26Hhx 52 | iEeMs1d4nk9eb2zrCYdxkObM9iXJe5paB3Afj2SC5FJrDsDkpL9OcK65QKFp 53 | kk5QWHXd+uEtKpgiVoqvBUWm0JXsfR2CWicRTRgjGysMsSyQU86lQWuRSQWj 54 | rKOIHZgVk445emcYSceYqZ+b7OEnWmnO+Zo5dtC7p6xDK7Dr55F9yVc3/POo 55 | hXMc4RY9xS0miyhiijwPr/KnUaKwPvjf8k+OW/IvCVwqb/JyIbliok6AHhx3 56 | yQcZPCYp5+7+fGDgEt6JirMDl/AFgcuTxo0ELo3h9kzgEgi7bA5tngFCRVCq 57 | rJLKcpgMXErDBCBJfqFtl+txssmTfblGXV9m9ZXbU+WMBVF8v7yHUFACm4hX 58 | I1JZv+LeHsG0tCSAjQctkUAcOU5hY3Z0TGLAauW0ic7T1LY8cRcSYaQ5bIad 59 | JG0onolhHBvPdMXnIyG8RmSXoGLjKbQyucO/JkKBqzxds6yWBPN/TqixYGHV 60 | y+ECklkso+wFb1WyLM5LWru0n4CTTgSpvTWElVowT9NJok5MxJg8q/WhS742 61 | 1BhrU3tEiMlIRVI3r2xdR4kyKA7azTTzdydOQK0wkDbyMmZP2uhE/ONrUoSJ 62 | ezk31Hg+ekeDmj1ILPGrErsnh0lfwgxP4r26fCLQ9K+ILRnk3JJLeibNgBxR 63 | axUbbAeNchKnkpNclGX7CAWtt+ttMV2Wzeri7+ediDJE1WVpWPE2mvBinoLX 64 | XfJY9Xb24VIKQ/raDObekIH00jJt9RQDKcN5NF5LjcyiT+DrGHQtam0Yd4Po 65 | wrE6Z0uplTajFBS2YbQr3sw+Jkdcqr7f5GnY6JiG1AgNcTYd7MmMKdrF1u6V 66 | 6QMz5Ss2jxeJj46ich5IF/3h1xezsv8ws1N11TEab+PVOUTWZRR9OF+VwWg5 67 | C2THVA1JXZfdsvMkBUv+GVkIlnMmIWt4FZNIHhLL27YmK0GwH5mAdn7L5gT0 68 | X4mgQwvOoGR+0G/CyZE2nUh3Wru0eJmCaajkXCEhnYSzWdiS8MPAFFZyCTge 69 | e+8Tkpp8WmzXRoOEhJZYUpRyZuyqQGjf1FJ4dTUWch9EX3vkeSOoAhDfaEVn 70 | C7u2YLTE8axss1SZLabg1Qk01jJnalkjOGdtcrUywGvtQ1SHJNYReAVaIhN5 71 | Xa/qvU/X/Eq/Jiu7cbywVM8L9PVYOxxkUWB+kLdWQNcK9iIt4S2Tot/O65Me 72 | 2gzuF4mehNJNqtnxrd5xbHMhLhmf5Zn0Tem3H6HY+N6ozYSL0ofo8wOaYE5J 73 | 6y7p34UMKt15MU0AvzgwLH+1XdwfVl/hwEQmEsS6NiFYEaBOKXprpZEgeQQ9 74 | N0Pt7MbzLzFUzHAGtLUxMuN99JqQUmFUaKStUTKjGJ+bLfF+EvtlrGaRt/Oj 75 | Co4jARJ3PkggMAIh6hRAJ0hfED5776bCiSmn2+a/3hrPI/3biPmXk4pLQ8Nj 76 | UJ0Jq9kcVBNK/SJVOucCTvKykmw8V7pPkjDZSFi3J4QVLcWsv4KOpdCMWcIA 77 | 6Ol4PN5GTjxIORlvS05jTrSpayuc0h6BuBuVsMZEVIOYwykda0HPnKDjOZ32 78 | 6Sxs5WvyBf84Fq7aLMMmQQJX+dNRbCUYV/mgv5Joj7ZHjgi2+FP5DG2fjHjd 79 | 7Jac3yz5pCBgsNoClyzRqnFccl07wYiolKgDstlBwE/nUCZ5HaWTIdKs8oks 80 | ZGAQyUhMhsu5r3n9Hg7ViqzSxoGWtcQahJNRsEBUChEA5vbq/zn0Uzk0v2eD 81 | 0/yJedtl8MLlKHvq/CqcQm71dIYZUQL50EyAsqLLujoJXPVvi+a0Rhy8gHOy 82 | eXtIMDIZPNsdbJ47o0kx6zPt24hU/z5M2dSauYWFowSrwWojhOQib/jrnFgH 83 | SK0aJVm1JAXSpcyfkmwNMnIdNTpg+Q094aXVdfL0FHqIOcTsjklWLknks4kN 84 | /4/qyc/fAWNjscdJIj4dxPYVJgX/ineY8FepAPgJ7FZj7ZiLKgUiCxW5E4Zr 85 | L2QQEWs52HH+XTj8mxIBPhJlP6hhg3Z097653U1MtXu+39/8SJu47Ro7HOz/ 86 | Pqfd/sV/YGCRRR/ggsdgL5SK6QIA2YWQDoRKTNUDMfA9/fxr+zTAh355PD89 87 | Jeqax/6/qWhfGN1v9+6+XG6NEcPrpT8HKEAttZf/A89/GVg=`; 88 | console.log(a.decodeData(data)); 89 | process.exit(0); 90 | -------------------------------------------------------------------------------- /天翼云/webpack_mixer.js: -------------------------------------------------------------------------------- 1 | const parser = require("@babel/parser"); 2 | const t = require("@babel/types"); 3 | const generator = require("@babel/generator"); 4 | const fs = require("fs"); 5 | 6 | function wtofile(path, flags, code) { 7 | var fd = fs.openSync(path,flags); 8 | fs.writeSync(fd, code); 9 | fs.closeSync(fd); 10 | } 11 | 12 | function run(loader_path, out_path, modular_path) { 13 | let js_code = fs.readFileSync(loader_path, { 14 | encoding: "utf-8" 15 | }); 16 | 17 | // 转换为AST语法树 18 | let loader_ast = parser.parse(js_code); 19 | 20 | // 获取加载器代码 21 | let loader_body; 22 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 23 | loader_body = loader_ast.program.body[0].expression.argument.callee.body.body; 24 | }else{ 25 | loader_body = loader_ast.program.body[0].expression.callee.body.body; 26 | } 27 | for (let i = 0; i < loader_body.length; i++){ 28 | if (loader_body[i].type === 'VariableDeclaration'){ 29 | let j = i + 1; 30 | while (j < loader_body.length){ 31 | if (loader_body[j].type === 'VariableDeclaration'){ 32 | loader_body.splice(j, (loader_body.length - j)); 33 | loader_body.splice(0, i); 34 | let tempname = ''; 35 | loader_body.forEach(function (item, index) { 36 | if (item.type === 'FunctionDeclaration'){ 37 | tempname = item.id.name; 38 | } 39 | }); 40 | loader_body.push(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(tempname))); 41 | }else { 42 | j++; 43 | } 44 | } 45 | break; 46 | } 47 | } 48 | 49 | // 导入加载器中的函数体 50 | let loader_arguments; 51 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 52 | loader_arguments = loader_ast.program.body[0].expression.argument.arguments[0]; 53 | }else{ 54 | loader_arguments = loader_ast.program.body[0].expression.arguments[0]; 55 | } 56 | if (loader_arguments.type === 'ArrayExpression'){ 57 | let tempobjectexpression = t.objectExpression([]); 58 | loader_arguments.elements.forEach(function (item, index) { 59 | if (item && item.type === 'FunctionExpression'){ 60 | tempobjectexpression.properties.push(t.objectProperty( 61 | t.numericLiteral(index), 62 | item, 63 | false, 64 | false 65 | )); 66 | } 67 | }); 68 | loader_arguments = tempobjectexpression; 69 | } 70 | 71 | // 加载外部函数体 72 | modular_path.forEach(function (item, index) { 73 | 74 | var jscode = fs.readFileSync(item, { 75 | encoding: "utf-8" 76 | }); 77 | 78 | let modular_ast = parser.parse(jscode); 79 | modular_ast.program.body[0].expression.arguments[0].elements.forEach(function (item2, index2) { 80 | if (item2.type === 'ArrayExpression'){ 81 | item2.elements.forEach(function (item3, index3) { 82 | if (item3 && item3.type === 'FunctionExpression'){ 83 | loader_arguments.properties.push(t.objectProperty( 84 | t.numericLiteral(index3), 85 | item3, 86 | false, 87 | false 88 | )); 89 | } 90 | }); 91 | }else { 92 | item2.properties.forEach(function (item3, index3) { 93 | loader_arguments.properties.push(item3) 94 | }) 95 | } 96 | }); 97 | }); 98 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 99 | loader_ast.program.body[0].expression.argument.arguments[0] = loader_arguments; 100 | }else{ 101 | loader_ast.program.body[0].expression.arguments[0] = loader_arguments; 102 | } 103 | 104 | // 申请全局导出函数 105 | loader_ast.program.body.splice(0, 0, t.variableDeclaration("var",[t.variableDeclarator(t.identifier("export_function"))])); 106 | // 导出函数 107 | loader_ast.program.body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(t.identifier("module"), t.identifier("exports"), false), t.identifier("export_function")))); 108 | 109 | let code = generator.default(loader_ast, { 110 | compact: false, // 压缩格式 111 | comments: false, // 注释 112 | jsescOption: { 113 | minimal: false // 转义 114 | } 115 | }).code; 116 | wtofile(out_path, 'w', code); 117 | } 118 | 119 | !function () { 120 | let loader_path, out_path; 121 | let modular_path = []; 122 | for(let i = 0; i < process.argv.length; i++){ 123 | if (process.argv[i] === '-l'){ 124 | loader_path = process.argv[i + 1]; 125 | i += 1; 126 | }else if(process.argv[i] === '-m'){ 127 | modular_path.push(process.argv[i + 1]); 128 | i += 1; 129 | }else if(process.argv[i] === '-o'){ 130 | out_path = process.argv[i + 1]; 131 | i += 1; 132 | } 133 | } 134 | if (loader_path && out_path){ 135 | run(loader_path, out_path, modular_path) 136 | } 137 | }(); 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | -------------------------------------------------------------------------------- /球探/webpack_mixer.js: -------------------------------------------------------------------------------- 1 | const parser = require("@babel/parser"); 2 | const t = require("@babel/types"); 3 | const generator = require("@babel/generator"); 4 | const fs = require("fs"); 5 | 6 | function wtofile(path, flags, code) { 7 | var fd = fs.openSync(path,flags); 8 | fs.writeSync(fd, code); 9 | fs.closeSync(fd); 10 | } 11 | 12 | function run(loader_path, out_path, modular_path) { 13 | let js_code = fs.readFileSync(loader_path, { 14 | encoding: "utf-8" 15 | }); 16 | 17 | // 转换为AST语法树 18 | let loader_ast = parser.parse(js_code); 19 | 20 | // 获取加载器代码 21 | let loader_body; 22 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 23 | loader_body = loader_ast.program.body[0].expression.argument.callee.body.body; 24 | }else{ 25 | loader_body = loader_ast.program.body[0].expression.callee.body.body; 26 | } 27 | for (let i = 0; i < loader_body.length; i++){ 28 | if (loader_body[i].type === 'VariableDeclaration'){ 29 | let j = i + 1; 30 | while (j < loader_body.length){ 31 | if (loader_body[j].type === 'VariableDeclaration'){ 32 | loader_body.splice(j, (loader_body.length - j)); 33 | loader_body.splice(0, i); 34 | let tempname = ''; 35 | loader_body.forEach(function (item, index) { 36 | if (item.type === 'FunctionDeclaration'){ 37 | tempname = item.id.name; 38 | } 39 | }); 40 | loader_body.push(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(tempname))); 41 | }else { 42 | j++; 43 | } 44 | } 45 | break; 46 | } 47 | } 48 | 49 | // 导入加载器中的函数体 50 | let loader_arguments; 51 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 52 | loader_arguments = loader_ast.program.body[0].expression.argument.arguments[0]; 53 | }else{ 54 | loader_arguments = loader_ast.program.body[0].expression.arguments[0]; 55 | } 56 | if (loader_arguments.type === 'ArrayExpression'){ 57 | let tempobjectexpression = t.objectExpression([]); 58 | loader_arguments.elements.forEach(function (item, index) { 59 | if (item && item.type === 'FunctionExpression'){ 60 | tempobjectexpression.properties.push(t.objectProperty( 61 | t.numericLiteral(index), 62 | item, 63 | false, 64 | false 65 | )); 66 | } 67 | }); 68 | loader_arguments = tempobjectexpression; 69 | } 70 | 71 | // 加载外部函数体 72 | modular_path.forEach(function (item, index) { 73 | 74 | var jscode = fs.readFileSync(item, { 75 | encoding: "utf-8" 76 | }); 77 | 78 | let modular_ast = parser.parse(jscode); 79 | modular_ast.program.body[0].expression.arguments[0].elements.forEach(function (item2, index2) { 80 | if (item2.type === 'ArrayExpression'){ 81 | item2.elements.forEach(function (item3, index3) { 82 | if (item3 && item3.type === 'FunctionExpression'){ 83 | loader_arguments.properties.push(t.objectProperty( 84 | t.numericLiteral(index3), 85 | item3, 86 | false, 87 | false 88 | )); 89 | } 90 | }); 91 | }else { 92 | item2.properties.forEach(function (item3, index3) { 93 | loader_arguments.properties.push(item3) 94 | }) 95 | } 96 | }); 97 | }); 98 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 99 | loader_ast.program.body[0].expression.argument.arguments[0] = loader_arguments; 100 | }else{ 101 | loader_ast.program.body[0].expression.arguments[0] = loader_arguments; 102 | } 103 | 104 | // 申请全局导出函数 105 | loader_ast.program.body.splice(0, 0, t.variableDeclaration("var",[t.variableDeclarator(t.identifier("export_function"))])); 106 | // 导出函数 107 | loader_ast.program.body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(t.identifier("module"), t.identifier("exports"), false), t.identifier("export_function")))); 108 | 109 | let code = generator.default(loader_ast, { 110 | compact: false, // 压缩格式 111 | comments: false, // 注释 112 | jsescOption: { 113 | minimal: false // 转义 114 | } 115 | }).code; 116 | wtofile(out_path, 'w', code); 117 | } 118 | 119 | !function () { 120 | let loader_path, out_path; 121 | let modular_path = []; 122 | for(let i = 0; i < process.argv.length; i++){ 123 | if (process.argv[i] === '-l'){ 124 | loader_path = process.argv[i + 1]; 125 | i += 1; 126 | }else if(process.argv[i] === '-m'){ 127 | modular_path.push(process.argv[i + 1]); 128 | i += 1; 129 | }else if(process.argv[i] === '-o'){ 130 | out_path = process.argv[i + 1]; 131 | i += 1; 132 | } 133 | } 134 | if (loader_path && out_path){ 135 | run(loader_path, out_path, modular_path) 136 | } 137 | }(); 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | -------------------------------------------------------------------------------- /m934033com/webpack_mixer.js: -------------------------------------------------------------------------------- 1 | const parser = require("@babel/parser"); 2 | const t = require("@babel/types"); 3 | const generator = require("@babel/generator"); 4 | const fs = require("fs"); 5 | 6 | function wtofile(path, flags, code) { 7 | var fd = fs.openSync(path,flags); 8 | fs.writeSync(fd, code); 9 | fs.closeSync(fd); 10 | } 11 | 12 | function run(loader_path, out_path, modular_path) { 13 | let js_code = fs.readFileSync(loader_path, { 14 | encoding: "utf-8" 15 | }); 16 | 17 | // 转换为AST语法树 18 | let loader_ast = parser.parse(js_code); 19 | 20 | // 获取加载器代码 21 | let loader_body; 22 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 23 | loader_body = loader_ast.program.body[0].expression.argument.callee.body.body; 24 | }else{ 25 | loader_body = loader_ast.program.body[0].expression.callee.body.body; 26 | } 27 | for (let i = 0; i < loader_body.length; i++){ 28 | if (loader_body[i].type === 'VariableDeclaration'){ 29 | let j = i + 1; 30 | while (j < loader_body.length){ 31 | if (loader_body[j].type === 'VariableDeclaration'){ 32 | loader_body.splice(j, (loader_body.length - j)); 33 | loader_body.splice(0, i); 34 | let tempname = ''; 35 | loader_body.forEach(function (item, index) { 36 | if (item.type === 'FunctionDeclaration'){ 37 | tempname = item.id.name; 38 | } 39 | }); 40 | loader_body.push(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(tempname))); 41 | }else { 42 | j++; 43 | } 44 | } 45 | break; 46 | } 47 | } 48 | 49 | // 导入加载器中的函数体 50 | let loader_arguments; 51 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 52 | loader_arguments = loader_ast.program.body[0].expression.argument.arguments[0]; 53 | }else{ 54 | loader_arguments = loader_ast.program.body[0].expression.arguments[0]; 55 | } 56 | if (loader_arguments.type === 'ArrayExpression'){ 57 | let tempobjectexpression = t.objectExpression([]); 58 | loader_arguments.elements.forEach(function (item, index) { 59 | if (item && item.type === 'FunctionExpression'){ 60 | tempobjectexpression.properties.push(t.objectProperty( 61 | t.numericLiteral(index), 62 | item, 63 | false, 64 | false 65 | )); 66 | } 67 | }); 68 | loader_arguments = tempobjectexpression; 69 | } 70 | 71 | // 加载外部函数体 72 | modular_path.forEach(function (item, index) { 73 | 74 | var jscode = fs.readFileSync(item, { 75 | encoding: "utf-8" 76 | }); 77 | 78 | let modular_ast = parser.parse(jscode); 79 | modular_ast.program.body[0].expression.arguments[0].elements.forEach(function (item2, index2) { 80 | if (item2.type === 'ArrayExpression'){ 81 | item2.elements.forEach(function (item3, index3) { 82 | if (item3 && item3.type === 'FunctionExpression'){ 83 | loader_arguments.properties.push(t.objectProperty( 84 | t.numericLiteral(index3), 85 | item3, 86 | false, 87 | false 88 | )); 89 | } 90 | }); 91 | }else { 92 | item2.properties.forEach(function (item3, index3) { 93 | loader_arguments.properties.push(item3) 94 | }) 95 | } 96 | }); 97 | }); 98 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 99 | loader_ast.program.body[0].expression.argument.arguments[0] = loader_arguments; 100 | }else{ 101 | loader_ast.program.body[0].expression.arguments[0] = loader_arguments; 102 | } 103 | 104 | // 申请全局导出函数 105 | loader_ast.program.body.splice(0, 0, t.variableDeclaration("var",[t.variableDeclarator(t.identifier("export_function"))])); 106 | // 导出函数 107 | loader_ast.program.body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(t.identifier("module"), t.identifier("exports"), false), t.identifier("export_function")))); 108 | 109 | let code = generator.default(loader_ast, { 110 | compact: false, // 压缩格式 111 | comments: false, // 注释 112 | jsescOption: { 113 | minimal: false // 转义 114 | } 115 | }).code; 116 | wtofile(out_path, 'w', code); 117 | } 118 | 119 | !function () { 120 | let loader_path, out_path; 121 | let modular_path = []; 122 | for(let i = 0; i < process.argv.length; i++){ 123 | if (process.argv[i] === '-l'){ 124 | loader_path = process.argv[i + 1]; 125 | i += 1; 126 | }else if(process.argv[i] === '-m'){ 127 | modular_path.push(process.argv[i + 1]); 128 | i += 1; 129 | }else if(process.argv[i] === '-o'){ 130 | out_path = process.argv[i + 1]; 131 | i += 1; 132 | } 133 | } 134 | if (loader_path && out_path){ 135 | run(loader_path, out_path, modular_path) 136 | } 137 | }(); 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | -------------------------------------------------------------------------------- /iqiyi/webpack_mixer.js: -------------------------------------------------------------------------------- 1 | const parser = require("@babel/parser"); 2 | const t = require("@babel/types"); 3 | const generator = require("@babel/generator"); 4 | const traverse = require("@babel/traverse").default; 5 | const fs = require("fs"); 6 | 7 | function wtofile(path, flags, code) { 8 | var fd = fs.openSync(path,flags); 9 | fs.writeSync(fd, code); 10 | fs.closeSync(fd); 11 | } 12 | 13 | function run(loader_path, out_path, modular_path) { 14 | let js_code = fs.readFileSync(loader_path, { 15 | encoding: "utf-8" 16 | }); 17 | 18 | // 转换为AST语法树 19 | let loader_ast = parser.parse(js_code); 20 | 21 | // 获取加载器代码 22 | let loader_body; 23 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 24 | loader_body = loader_ast.program.body[0].expression.argument.callee.body.body; 25 | }else{ 26 | loader_body = loader_ast.program.body[0].expression.callee.body.body; 27 | } 28 | for (let i = 0; i < loader_body.length; i++){ 29 | if (loader_body[i].type === 'VariableDeclaration'){ 30 | let j = i + 1; 31 | while (j < loader_body.length){ 32 | if (loader_body[j].type === 'VariableDeclaration'){ 33 | loader_body.splice(j, (loader_body.length - j)); 34 | loader_body.splice(0, i); 35 | let tempname = ''; 36 | loader_body.forEach(function (item, index) { 37 | if (item.type === 'FunctionDeclaration'){ 38 | tempname = item.id.name; 39 | } 40 | }); 41 | loader_body.push(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(tempname))); 42 | }else { 43 | j++; 44 | } 45 | } 46 | break; 47 | } 48 | } 49 | 50 | // 导入加载器中的函数体 51 | let loader_arguments; 52 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 53 | loader_arguments = loader_ast.program.body[0].expression.argument.arguments[0]; 54 | }else{ 55 | loader_arguments = loader_ast.program.body[0].expression.arguments[0]; 56 | } 57 | if (loader_arguments.type === 'ArrayExpression'){ 58 | let tempobjectexpression = t.objectExpression([]); 59 | loader_arguments.elements.forEach(function (item, index) { 60 | if (item && item.type === 'FunctionExpression'){ 61 | tempobjectexpression.properties.push(t.objectProperty( 62 | t.numericLiteral(index), 63 | item, 64 | false, 65 | false 66 | )); 67 | } 68 | }); 69 | loader_arguments = tempobjectexpression; 70 | } 71 | 72 | // 加载外部函数体 73 | modular_path.forEach(function (item, index) { 74 | 75 | var jscode = fs.readFileSync(item, { 76 | encoding: "utf-8" 77 | }); 78 | 79 | let modular_ast = parser.parse(jscode); 80 | modular_ast.program.body[0].expression.arguments[0].elements.forEach(function (item2, index2) { 81 | if (item2.type === 'ArrayExpression'){ 82 | item2.elements.forEach(function (item3, index3) { 83 | if (item3 && item3.type === 'FunctionExpression'){ 84 | loader_arguments.properties.push(t.objectProperty( 85 | t.numericLiteral(index3), 86 | item3, 87 | false, 88 | false 89 | )); 90 | } 91 | }); 92 | }else { 93 | item2.properties.forEach(function (item3, index3) { 94 | loader_arguments.properties.push(item3) 95 | }) 96 | } 97 | }); 98 | }); 99 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 100 | loader_ast.program.body[0].expression.argument.arguments[0] = loader_arguments; 101 | }else{ 102 | loader_ast.program.body[0].expression.arguments[0] = loader_arguments; 103 | } 104 | 105 | // 申请全局导出函数 106 | loader_ast.program.body.splice(0, 0, t.variableDeclaration("var",[t.variableDeclarator(t.identifier("export_function"))])); 107 | // 导出函数 108 | loader_ast.program.body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(t.identifier("module"), t.identifier("exports"), false), t.identifier("export_function")))); 109 | 110 | 111 | 112 | let code = generator.default(loader_ast, { 113 | compact: false, // 压缩格式 114 | comments: false, // 注释 115 | jsescOption: { 116 | minimal: false // 转义 117 | } 118 | }).code; 119 | 120 | wtofile(out_path, 'w', code); 121 | } 122 | 123 | !function () { 124 | let loader_path, out_path; 125 | let modular_path = []; 126 | for(let i = 0; i < process.argv.length; i++){ 127 | if (process.argv[i] === '-l'){ 128 | loader_path = process.argv[i + 1]; 129 | i += 1; 130 | }else if(process.argv[i] === '-m'){ 131 | modular_path.push(process.argv[i + 1]); 132 | i += 1; 133 | }else if(process.argv[i] === '-o'){ 134 | out_path = process.argv[i + 1]; 135 | i += 1; 136 | } 137 | } 138 | if (loader_path && out_path){ 139 | run(loader_path, out_path, modular_path) 140 | } 141 | }(); 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /qq音乐/webpack_mixer.js: -------------------------------------------------------------------------------- 1 | const parser = require("@babel/parser"); 2 | const t = require("@babel/types"); 3 | const generator = require("@babel/generator"); 4 | const traverse = require("@babel/traverse").default; 5 | const fs = require("fs"); 6 | 7 | function wtofile(path, flags, code) { 8 | var fd = fs.openSync(path,flags); 9 | fs.writeSync(fd, code); 10 | fs.closeSync(fd); 11 | } 12 | 13 | function run(loader_path, out_path, modular_path) { 14 | let js_code = fs.readFileSync(loader_path, { 15 | encoding: "utf-8" 16 | }); 17 | 18 | // 转换为AST语法树 19 | let loader_ast = parser.parse(js_code); 20 | 21 | // 获取加载器代码 22 | let loader_body; 23 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 24 | loader_body = loader_ast.program.body[0].expression.argument.callee.body.body; 25 | }else{ 26 | loader_body = loader_ast.program.body[0].expression.callee.body.body; 27 | } 28 | for (let i = 0; i < loader_body.length; i++){ 29 | if (loader_body[i].type === 'VariableDeclaration'){ 30 | let j = i + 1; 31 | while (j < loader_body.length){ 32 | if (loader_body[j].type === 'VariableDeclaration'){ 33 | loader_body.splice(j, (loader_body.length - j)); 34 | loader_body.splice(0, i); 35 | let tempname = ''; 36 | loader_body.forEach(function (item, index) { 37 | if (item.type === 'FunctionDeclaration'){ 38 | tempname = item.id.name; 39 | } 40 | }); 41 | loader_body.push(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(tempname))); 42 | }else { 43 | j++; 44 | } 45 | } 46 | break; 47 | } 48 | } 49 | 50 | // 导入加载器中的函数体 51 | let loader_arguments; 52 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 53 | loader_arguments = loader_ast.program.body[0].expression.argument.arguments[0]; 54 | }else{ 55 | loader_arguments = loader_ast.program.body[0].expression.arguments[0]; 56 | } 57 | if (loader_arguments.type === 'ArrayExpression'){ 58 | let tempobjectexpression = t.objectExpression([]); 59 | loader_arguments.elements.forEach(function (item, index) { 60 | if (item && item.type === 'FunctionExpression'){ 61 | tempobjectexpression.properties.push(t.objectProperty( 62 | t.numericLiteral(index), 63 | item, 64 | false, 65 | false 66 | )); 67 | } 68 | }); 69 | loader_arguments = tempobjectexpression; 70 | } 71 | 72 | // 加载外部函数体 73 | modular_path.forEach(function (item, index) { 74 | 75 | var jscode = fs.readFileSync(item, { 76 | encoding: "utf-8" 77 | }); 78 | 79 | let modular_ast = parser.parse(jscode); 80 | modular_ast.program.body[0].expression.arguments[0].elements.forEach(function (item2, index2) { 81 | if (item2.type === 'ArrayExpression'){ 82 | item2.elements.forEach(function (item3, index3) { 83 | if (item3 && item3.type === 'FunctionExpression'){ 84 | loader_arguments.properties.push(t.objectProperty( 85 | t.numericLiteral(index3), 86 | item3, 87 | false, 88 | false 89 | )); 90 | } 91 | }); 92 | }else { 93 | item2.properties.forEach(function (item3, index3) { 94 | loader_arguments.properties.push(item3) 95 | }) 96 | } 97 | }); 98 | }); 99 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 100 | loader_ast.program.body[0].expression.argument.arguments[0] = loader_arguments; 101 | }else{ 102 | loader_ast.program.body[0].expression.arguments[0] = loader_arguments; 103 | } 104 | 105 | // 申请全局导出函数 106 | loader_ast.program.body.splice(0, 0, t.variableDeclaration("var",[t.variableDeclarator(t.identifier("export_function"))])); 107 | // 导出函数 108 | loader_ast.program.body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(t.identifier("module"), t.identifier("exports"), false), t.identifier("export_function")))); 109 | 110 | 111 | 112 | let code = generator.default(loader_ast, { 113 | compact: false, // 压缩格式 114 | comments: false, // 注释 115 | jsescOption: { 116 | minimal: false // 转义 117 | } 118 | }).code; 119 | 120 | wtofile(out_path, 'w', code); 121 | } 122 | 123 | !function () { 124 | let loader_path, out_path; 125 | let modular_path = []; 126 | for(let i = 0; i < process.argv.length; i++){ 127 | if (process.argv[i] === '-l'){ 128 | loader_path = process.argv[i + 1]; 129 | i += 1; 130 | }else if(process.argv[i] === '-m'){ 131 | modular_path.push(process.argv[i + 1]); 132 | i += 1; 133 | }else if(process.argv[i] === '-o'){ 134 | out_path = process.argv[i + 1]; 135 | i += 1; 136 | } 137 | } 138 | if (loader_path && out_path){ 139 | run(loader_path, out_path, modular_path) 140 | } 141 | }(); 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /天安保险超市/webpack_mixer.js: -------------------------------------------------------------------------------- 1 | const parser = require("@babel/parser"); 2 | const t = require("@babel/types"); 3 | const generator = require("@babel/generator"); 4 | const traverse = require("@babel/traverse").default; 5 | const fs = require("fs"); 6 | 7 | function wtofile(path, flags, code) { 8 | var fd = fs.openSync(path,flags); 9 | fs.writeSync(fd, code); 10 | fs.closeSync(fd); 11 | } 12 | 13 | function run(loader_path, out_path, modular_path) { 14 | let js_code = fs.readFileSync(loader_path, { 15 | encoding: "utf-8" 16 | }); 17 | 18 | // 转换为AST语法树 19 | let loader_ast = parser.parse(js_code); 20 | 21 | // 获取加载器代码 22 | let loader_body; 23 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 24 | loader_body = loader_ast.program.body[0].expression.argument.callee.body.body; 25 | }else{ 26 | loader_body = loader_ast.program.body[0].expression.callee.body.body; 27 | } 28 | for (let i = 0; i < loader_body.length; i++){ 29 | if (loader_body[i].type === 'VariableDeclaration'){ 30 | let j = i + 1; 31 | while (j < loader_body.length){ 32 | if (loader_body[j].type === 'VariableDeclaration'){ 33 | loader_body.splice(j, (loader_body.length - j)); 34 | loader_body.splice(0, i); 35 | let tempname = ''; 36 | loader_body.forEach(function (item, index) { 37 | if (item.type === 'FunctionDeclaration'){ 38 | tempname = item.id.name; 39 | } 40 | }); 41 | loader_body.push(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(tempname))); 42 | }else { 43 | j++; 44 | } 45 | } 46 | break; 47 | } 48 | } 49 | 50 | // 导入加载器中的函数体 51 | let loader_arguments; 52 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 53 | loader_arguments = loader_ast.program.body[0].expression.argument.arguments[0]; 54 | }else{ 55 | loader_arguments = loader_ast.program.body[0].expression.arguments[0]; 56 | } 57 | if (loader_arguments.type === 'ArrayExpression'){ 58 | let tempobjectexpression = t.objectExpression([]); 59 | loader_arguments.elements.forEach(function (item, index) { 60 | if (item && item.type === 'FunctionExpression'){ 61 | tempobjectexpression.properties.push(t.objectProperty( 62 | t.numericLiteral(index), 63 | item, 64 | false, 65 | false 66 | )); 67 | } 68 | }); 69 | loader_arguments = tempobjectexpression; 70 | } 71 | 72 | // 加载外部函数体 73 | modular_path.forEach(function (item, index) { 74 | 75 | var jscode = fs.readFileSync(item, { 76 | encoding: "utf-8" 77 | }); 78 | 79 | let modular_ast = parser.parse(jscode); 80 | modular_ast.program.body[0].expression.arguments[0].elements.forEach(function (item2, index2) { 81 | if (item2.type === 'ArrayExpression'){ 82 | item2.elements.forEach(function (item3, index3) { 83 | if (item3 && item3.type === 'FunctionExpression'){ 84 | loader_arguments.properties.push(t.objectProperty( 85 | t.numericLiteral(index3), 86 | item3, 87 | false, 88 | false 89 | )); 90 | } 91 | }); 92 | }else { 93 | item2.properties.forEach(function (item3, index3) { 94 | loader_arguments.properties.push(item3) 95 | }) 96 | } 97 | }); 98 | }); 99 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 100 | loader_ast.program.body[0].expression.argument.arguments[0] = loader_arguments; 101 | }else{ 102 | loader_ast.program.body[0].expression.arguments[0] = loader_arguments; 103 | } 104 | 105 | // 申请全局导出函数 106 | loader_ast.program.body.splice(0, 0, t.variableDeclaration("var",[t.variableDeclarator(t.identifier("export_function"))])); 107 | // 导出函数 108 | loader_ast.program.body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(t.identifier("module"), t.identifier("exports"), false), t.identifier("export_function")))); 109 | 110 | 111 | 112 | let code = generator.default(loader_ast, { 113 | compact: false, // 压缩格式 114 | comments: false, // 注释 115 | jsescOption: { 116 | minimal: false // 转义 117 | } 118 | }).code; 119 | 120 | wtofile(out_path, 'w', code); 121 | } 122 | 123 | !function () { 124 | let loader_path, out_path; 125 | let modular_path = []; 126 | for(let i = 0; i < process.argv.length; i++){ 127 | if (process.argv[i] === '-l'){ 128 | loader_path = process.argv[i + 1]; 129 | i += 1; 130 | }else if(process.argv[i] === '-m'){ 131 | modular_path.push(process.argv[i + 1]); 132 | i += 1; 133 | }else if(process.argv[i] === '-o'){ 134 | out_path = process.argv[i + 1]; 135 | i += 1; 136 | } 137 | } 138 | if (loader_path && out_path){ 139 | run(loader_path, out_path, modular_path) 140 | } 141 | }(); 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /wwwgm99com/webpack_mixer.js: -------------------------------------------------------------------------------- 1 | const parser = require("@babel/parser"); 2 | const t = require("@babel/types"); 3 | const generator = require("@babel/generator"); 4 | const traverse = require("@babel/traverse").default; 5 | const fs = require("fs"); 6 | 7 | function wtofile(path, flags, code) { 8 | var fd = fs.openSync(path,flags); 9 | fs.writeSync(fd, code); 10 | fs.closeSync(fd); 11 | } 12 | 13 | function run(loader_path, out_path, modular_path) { 14 | let js_code = fs.readFileSync(loader_path, { 15 | encoding: "utf-8" 16 | }); 17 | 18 | // 转换为AST语法树 19 | let loader_ast = parser.parse(js_code); 20 | 21 | // 获取加载器代码 22 | let loader_body; 23 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 24 | loader_body = loader_ast.program.body[0].expression.argument.callee.body.body; 25 | }else{ 26 | loader_body = loader_ast.program.body[0].expression.callee.body.body; 27 | } 28 | let export_function = null; 29 | traverse(loader_ast, { 30 | FunctionDeclaration(path){ 31 | if(path.toString().includes("exports:")){ 32 | export_function = path.node.id.name 33 | } 34 | } 35 | }); 36 | if(export_function == null){ 37 | throw "未找到导出函数错误" 38 | } 39 | 40 | for (let i = 0; i < loader_body.length; i++){ 41 | let item = loader_body[i]; 42 | if(item.type === 'ExpressionStatement'){ 43 | if(item.expression.type === 'SequenceExpression' && item.expression.expressions[0].left.type === 'MemberExpression' && item.expression.expressions[0].left.object.type === 'Identifier' && item.expression.expressions[0].left.object.name === export_function){ 44 | let j = 1; 45 | while (j < item.expression.expressions.length){ 46 | let item2 = item.expression.expressions[j]; 47 | if(item2.left &&item2.left.type === 'MemberExpression' && item2.left.object.type === 'Identifier' && item2.left.object.name === export_function){ 48 | j++ 49 | }else{ 50 | item.expression.expressions.splice(j, item.expression.expressions.length - j); 51 | break 52 | } 53 | } 54 | loader_body.splice(i + 1, loader_body.length - i - 1); 55 | loader_body.push(t.expressionStatement(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(export_function)))); 56 | } 57 | }else if(item.type === 'ReturnStatement'){ 58 | loader_body[i] = t.expressionStatement(item.argument); 59 | let j = 0; 60 | while (j < loader_body[i].expression.expressions.length){ 61 | let item2 = loader_body[i].expression.expressions[j]; 62 | if(item2.left &&item2.left.type === 'MemberExpression' && item2.left.object.type === 'Identifier' && item2.left.object.name === export_function){ 63 | j++ 64 | }else{ 65 | loader_body[i].expression.expressions.splice(j, loader_body[i].expression.expressions.length - j); 66 | break 67 | } 68 | } 69 | loader_body.push(t.expressionStatement(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(export_function)))); 70 | } 71 | } 72 | 73 | // 导入加载器中的函数体 74 | let loader_arguments; 75 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 76 | loader_arguments = loader_ast.program.body[0].expression.argument.arguments[0]; 77 | }else{ 78 | loader_arguments = loader_ast.program.body[0].expression.arguments[0]; 79 | } 80 | if (loader_arguments.type === 'ArrayExpression'){ 81 | let tempobjectexpression = t.objectExpression([]); 82 | loader_arguments.elements.forEach(function (item, index) { 83 | if (item && item.type === 'FunctionExpression'){ 84 | tempobjectexpression.properties.push(t.objectProperty( 85 | t.numericLiteral(index), 86 | item, 87 | false, 88 | false 89 | )); 90 | } 91 | }); 92 | loader_arguments = tempobjectexpression; 93 | } 94 | 95 | // 加载外部函数体 96 | modular_path.forEach(function (item, index) { 97 | 98 | var jscode = fs.readFileSync(item, { 99 | encoding: "utf-8" 100 | }); 101 | 102 | let modular_ast = parser.parse(jscode); 103 | modular_ast.program.body[0].expression.arguments[0].elements.forEach(function (item2, index2) { 104 | if (item2.type === 'ArrayExpression'){ 105 | item2.elements.forEach(function (item3, index3) { 106 | if (item3 && item3.type === 'FunctionExpression'){ 107 | loader_arguments.properties.push(t.objectProperty( 108 | t.numericLiteral(index3), 109 | item3, 110 | false, 111 | false 112 | )); 113 | } 114 | }); 115 | }else { 116 | item2.properties.forEach(function (item3, index3) { 117 | loader_arguments.properties.push(item3) 118 | }) 119 | } 120 | }); 121 | }); 122 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 123 | loader_ast.program.body[0].expression.argument.arguments[0] = loader_arguments; 124 | }else{ 125 | loader_ast.program.body[0].expression.arguments[0] = loader_arguments; 126 | } 127 | 128 | // 申请全局导出函数 129 | loader_ast.program.body.splice(0, 0, t.variableDeclaration("var",[t.variableDeclarator(t.identifier("export_function"))])); 130 | // 导出函数 131 | loader_ast.program.body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(t.identifier("module"), t.identifier("exports"), false), t.identifier("export_function")))); 132 | 133 | let code = generator.default(loader_ast, { 134 | compact: false, // 压缩格式 135 | comments: false, // 注释 136 | jsescOption: { 137 | minimal: false // 转义 138 | } 139 | }).code; 140 | wtofile(out_path, 'w', code); 141 | } 142 | 143 | !function () { 144 | let loader_path, out_path; 145 | let modular_path = []; 146 | for(let i = 0; i < process.argv.length; i++){ 147 | if (process.argv[i] === '-l'){ 148 | loader_path = process.argv[i + 1]; 149 | i += 1; 150 | }else if(process.argv[i] === '-m'){ 151 | modular_path.push(process.argv[i + 1]); 152 | i += 1; 153 | }else if(process.argv[i] === '-o'){ 154 | out_path = process.argv[i + 1]; 155 | i += 1; 156 | } 157 | } 158 | if (loader_path && out_path){ 159 | run(loader_path, out_path, modular_path) 160 | } 161 | }(); 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /美食优惠聚合/webpack_mixer.js: -------------------------------------------------------------------------------- 1 | const parser = require("@babel/parser"); 2 | const t = require("@babel/types"); 3 | const generator = require("@babel/generator"); 4 | const traverse = require("@babel/traverse").default; 5 | const fs = require("fs"); 6 | 7 | function wtofile(path, flags, code) { 8 | var fd = fs.openSync(path,flags); 9 | fs.writeSync(fd, code); 10 | fs.closeSync(fd); 11 | } 12 | 13 | function run(loader_path, out_path, modular_path) { 14 | let js_code = fs.readFileSync(loader_path, { 15 | encoding: "utf-8" 16 | }); 17 | 18 | // 转换为AST语法树 19 | let loader_ast = parser.parse(js_code); 20 | 21 | // 获取加载器代码 22 | let loader_body; 23 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 24 | loader_body = loader_ast.program.body[0].expression.argument.callee.body.body; 25 | }else{ 26 | loader_body = loader_ast.program.body[0].expression.callee.body.body; 27 | } 28 | let export_function = null; 29 | traverse(loader_ast, { 30 | FunctionDeclaration(path){ 31 | if(path.toString().includes("exports:") && export_function == null){ 32 | export_function = path.node.id.name 33 | } 34 | } 35 | }); 36 | if(export_function == null){ 37 | throw "未找到导出函数错误" 38 | } 39 | 40 | for (let i = 0; i < loader_body.length; i++){ 41 | let item = loader_body[i]; 42 | if(item.type === 'ExpressionStatement'){ 43 | if(item.expression.type === 'SequenceExpression' && item.expression.expressions[0].type === 'AssignmentExpression' && item.expression.expressions[0].left.type === 'MemberExpression' && item.expression.expressions[0].left.object.type === 'Identifier' && item.expression.expressions[0].left.object.name === export_function){ 44 | let j = 1; 45 | while (j < item.expression.expressions.length){ 46 | let item2 = item.expression.expressions[j]; 47 | if(item2.left &&item2.left.type === 'MemberExpression' && item2.left.object.type === 'Identifier' && item2.left.object.name === export_function){ 48 | j++ 49 | }else{ 50 | item.expression.expressions.splice(j, item.expression.expressions.length - j); 51 | break 52 | } 53 | } 54 | loader_body.splice(i + 1, loader_body.length - i - 1); 55 | loader_body.push(t.expressionStatement(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(export_function)))); 56 | } 57 | }else if(item.type === 'ReturnStatement'){ 58 | loader_body[i] = t.expressionStatement(item.argument); 59 | let j = 0; 60 | while (j < loader_body[i].expression.expressions.length){ 61 | let item2 = loader_body[i].expression.expressions[j]; 62 | if(item2.left &&item2.left.type === 'MemberExpression' && item2.left.object.type === 'Identifier' && item2.left.object.name === export_function){ 63 | j++ 64 | }else{ 65 | loader_body[i].expression.expressions.splice(j, loader_body[i].expression.expressions.length - j); 66 | break 67 | } 68 | } 69 | loader_body.push(t.expressionStatement(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(export_function)))); 70 | } 71 | } 72 | 73 | // 导入加载器中的函数体 74 | let loader_arguments; 75 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 76 | loader_arguments = loader_ast.program.body[0].expression.argument.arguments[0]; 77 | }else{ 78 | loader_arguments = loader_ast.program.body[0].expression.arguments[0]; 79 | } 80 | if (loader_arguments.type === 'ArrayExpression'){ 81 | let tempobjectexpression = t.objectExpression([]); 82 | loader_arguments.elements.forEach(function (item, index) { 83 | if (item && item.type === 'FunctionExpression'){ 84 | tempobjectexpression.properties.push(t.objectProperty( 85 | t.numericLiteral(index), 86 | item, 87 | false, 88 | false 89 | )); 90 | } 91 | }); 92 | loader_arguments = tempobjectexpression; 93 | } 94 | 95 | // 加载外部函数体 96 | modular_path.forEach(function (item, index) { 97 | 98 | var jscode = fs.readFileSync(item, { 99 | encoding: "utf-8" 100 | }); 101 | 102 | let modular_ast = parser.parse(jscode); 103 | modular_ast.program.body[0].expression.arguments[0].elements.forEach(function (item2, index2) { 104 | if (item2.type === 'ArrayExpression'){ 105 | item2.elements.forEach(function (item3, index3) { 106 | if (item3 && item3.type === 'FunctionExpression'){ 107 | loader_arguments.properties.push(t.objectProperty( 108 | t.numericLiteral(index3), 109 | item3, 110 | false, 111 | false 112 | )); 113 | } 114 | }); 115 | }else { 116 | item2.properties.forEach(function (item3, index3) { 117 | loader_arguments.properties.push(item3) 118 | }) 119 | } 120 | }); 121 | }); 122 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 123 | loader_ast.program.body[0].expression.argument.arguments[0] = loader_arguments; 124 | }else{ 125 | loader_ast.program.body[0].expression.arguments[0] = loader_arguments; 126 | } 127 | 128 | // 申请全局导出函数 129 | loader_ast.program.body.splice(0, 0, t.variableDeclaration("var",[t.variableDeclarator(t.identifier("export_function"))])); 130 | // 导出函数 131 | loader_ast.program.body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(t.identifier("module"), t.identifier("exports"), false), t.identifier("export_function")))); 132 | 133 | let code = generator.default(loader_ast, { 134 | compact: false, // 压缩格式 135 | comments: false, // 注释 136 | jsescOption: { 137 | minimal: false // 转义 138 | } 139 | }).code; 140 | wtofile(out_path, 'w', code); 141 | } 142 | 143 | !function () { 144 | let loader_path, out_path; 145 | let modular_path = []; 146 | for(let i = 0; i < process.argv.length; i++){ 147 | if (process.argv[i] === '-l'){ 148 | loader_path = process.argv[i + 1]; 149 | i += 1; 150 | }else if(process.argv[i] === '-m'){ 151 | modular_path.push(process.argv[i + 1]); 152 | i += 1; 153 | }else if(process.argv[i] === '-o'){ 154 | out_path = process.argv[i + 1]; 155 | i += 1; 156 | } 157 | } 158 | if (loader_path && out_path){ 159 | run(loader_path, out_path, modular_path) 160 | } 161 | }(); 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /tiebabaidu/webpack_mixer.js: -------------------------------------------------------------------------------- 1 | const parser = require("@babel/parser"); 2 | const t = require("@babel/types"); 3 | const generator = require("@babel/generator"); 4 | const traverse = require("@babel/traverse").default; 5 | const fs = require("fs"); 6 | 7 | function wtofile(path, flags, code) { 8 | var fd = fs.openSync(path,flags); 9 | fs.writeSync(fd, code); 10 | fs.closeSync(fd); 11 | } 12 | 13 | function run(loader_path, out_path, modular_path) { 14 | let js_code = fs.readFileSync(loader_path, { 15 | encoding: "utf-8" 16 | }); 17 | 18 | // 转换为AST语法树 19 | let loader_ast = parser.parse(js_code); 20 | 21 | // 获取加载器代码 22 | let loader_body; 23 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 24 | loader_body = loader_ast.program.body[0].expression.argument.callee.body.body; 25 | }else{ 26 | loader_body = loader_ast.program.body[0].expression.callee.body.body; 27 | } 28 | let export_function = null; 29 | traverse(loader_ast, { 30 | FunctionDeclaration(path){ 31 | if(path.toString().includes("exports:") && export_function == null){ 32 | export_function = path.node.id.name 33 | } 34 | } 35 | }); 36 | if(export_function == null){ 37 | throw "未找到导出函数错误" 38 | } 39 | 40 | for (let i = 0; i < loader_body.length; i++){ 41 | let item = loader_body[i]; 42 | if(item.type === 'ExpressionStatement'){ 43 | if(item.expression.type === 'SequenceExpression' && item.expression.expressions[0].type === 'AssignmentExpression' && item.expression.expressions[0].left.type === 'MemberExpression' && item.expression.expressions[0].left.object.type === 'Identifier' && item.expression.expressions[0].left.object.name === export_function){ 44 | let j = 1; 45 | while (j < item.expression.expressions.length){ 46 | let item2 = item.expression.expressions[j]; 47 | if(item2.left &&item2.left.type === 'MemberExpression' && item2.left.object.type === 'Identifier' && item2.left.object.name === export_function){ 48 | j++ 49 | }else{ 50 | item.expression.expressions.splice(j, item.expression.expressions.length - j); 51 | break 52 | } 53 | } 54 | loader_body.splice(i + 1, loader_body.length - i - 1); 55 | loader_body.push(t.expressionStatement(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(export_function)))); 56 | } 57 | }else if(item.type === 'ReturnStatement'){ 58 | loader_body[i] = t.expressionStatement(item.argument); 59 | let j = 0; 60 | while (j < loader_body[i].expression.expressions.length){ 61 | let item2 = loader_body[i].expression.expressions[j]; 62 | if(item2.left &&item2.left.type === 'MemberExpression' && item2.left.object.type === 'Identifier' && item2.left.object.name === export_function){ 63 | j++ 64 | }else{ 65 | loader_body[i].expression.expressions.splice(j, loader_body[i].expression.expressions.length - j); 66 | break 67 | } 68 | } 69 | loader_body.push(t.expressionStatement(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(export_function)))); 70 | } 71 | } 72 | 73 | // 导入加载器中的函数体 74 | let loader_arguments; 75 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 76 | loader_arguments = loader_ast.program.body[0].expression.argument.arguments[0]; 77 | }else{ 78 | loader_arguments = loader_ast.program.body[0].expression.arguments[0]; 79 | } 80 | if (loader_arguments.type === 'ArrayExpression'){ 81 | let tempobjectexpression = t.objectExpression([]); 82 | loader_arguments.elements.forEach(function (item, index) { 83 | if (item && item.type === 'FunctionExpression'){ 84 | tempobjectexpression.properties.push(t.objectProperty( 85 | t.numericLiteral(index), 86 | item, 87 | false, 88 | false 89 | )); 90 | } 91 | }); 92 | loader_arguments = tempobjectexpression; 93 | } 94 | 95 | // 加载外部函数体 96 | modular_path.forEach(function (item, index) { 97 | 98 | var jscode = fs.readFileSync(item, { 99 | encoding: "utf-8" 100 | }); 101 | 102 | let modular_ast = parser.parse(jscode); 103 | modular_ast.program.body[0].expression.arguments[0].elements.forEach(function (item2, index2) { 104 | if (item2.type === 'ArrayExpression'){ 105 | item2.elements.forEach(function (item3, index3) { 106 | if (item3 && item3.type === 'FunctionExpression'){ 107 | loader_arguments.properties.push(t.objectProperty( 108 | t.numericLiteral(index3), 109 | item3, 110 | false, 111 | false 112 | )); 113 | } 114 | }); 115 | }else { 116 | item2.properties.forEach(function (item3, index3) { 117 | loader_arguments.properties.push(item3) 118 | }) 119 | } 120 | }); 121 | }); 122 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 123 | loader_ast.program.body[0].expression.argument.arguments[0] = loader_arguments; 124 | }else{ 125 | loader_ast.program.body[0].expression.arguments[0] = loader_arguments; 126 | } 127 | 128 | // 申请全局导出函数 129 | loader_ast.program.body.splice(0, 0, t.variableDeclaration("var",[t.variableDeclarator(t.identifier("export_function"))])); 130 | // 导出函数 131 | loader_ast.program.body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(t.identifier("module"), t.identifier("exports"), false), t.identifier("export_function")))); 132 | 133 | let code = generator.default(loader_ast, { 134 | compact: false, // 压缩格式 135 | comments: false, // 注释 136 | jsescOption: { 137 | minimal: false // 转义 138 | } 139 | }).code; 140 | wtofile(out_path, 'w', code); 141 | } 142 | 143 | !function () { 144 | let loader_path, out_path; 145 | let modular_path = []; 146 | for(let i = 0; i < process.argv.length; i++){ 147 | if (process.argv[i] === '-l'){ 148 | loader_path = process.argv[i + 1]; 149 | i += 1; 150 | }else if(process.argv[i] === '-m'){ 151 | modular_path.push(process.argv[i + 1]); 152 | i += 1; 153 | }else if(process.argv[i] === '-o'){ 154 | out_path = process.argv[i + 1]; 155 | i += 1; 156 | } 157 | } 158 | if (loader_path && out_path){ 159 | run(loader_path, out_path, modular_path) 160 | } 161 | }(); 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /sfrzshaanxigovcn/webpack_mixer.js: -------------------------------------------------------------------------------- 1 | const parser = require("@babel/parser"); 2 | const t = require("@babel/types"); 3 | const generator = require("@babel/generator"); 4 | const traverse = require("@babel/traverse").default; 5 | const fs = require("fs"); 6 | 7 | function wtofile(path, flags, code) { 8 | var fd = fs.openSync(path,flags); 9 | fs.writeSync(fd, code); 10 | fs.closeSync(fd); 11 | } 12 | 13 | function run(loader_path, out_path, modular_path) { 14 | let js_code = fs.readFileSync(loader_path, { 15 | encoding: "utf-8" 16 | }); 17 | 18 | // 转换为AST语法树 19 | let loader_ast = parser.parse(js_code); 20 | 21 | // 获取加载器代码 22 | let loader_body; 23 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 24 | loader_body = loader_ast.program.body[0].expression.argument.callee.body.body; 25 | }else{ 26 | loader_body = loader_ast.program.body[0].expression.callee.body.body; 27 | } 28 | let export_function = null; 29 | traverse(loader_ast, { 30 | FunctionDeclaration(path){ 31 | if(path.toString().includes("exports:") && export_function == null){ 32 | export_function = path.node.id.name 33 | } 34 | } 35 | }); 36 | if(export_function == null){ 37 | throw "未找到导出函数错误" 38 | } 39 | 40 | for (let i = 0; i < loader_body.length; i++){ 41 | let item = loader_body[i]; 42 | if(item.type === 'ExpressionStatement'){ 43 | if(item.expression.type === 'SequenceExpression' && item.expression.expressions[0].type === 'AssignmentExpression' && item.expression.expressions[0].left.type === 'MemberExpression' && item.expression.expressions[0].left.object.type === 'Identifier' && item.expression.expressions[0].left.object.name === export_function){ 44 | let j = 1; 45 | while (j < item.expression.expressions.length){ 46 | let item2 = item.expression.expressions[j]; 47 | if(item2.left &&item2.left.type === 'MemberExpression' && item2.left.object.type === 'Identifier' && item2.left.object.name === export_function){ 48 | j++ 49 | }else{ 50 | item.expression.expressions.splice(j, item.expression.expressions.length - j); 51 | break 52 | } 53 | } 54 | loader_body.splice(i + 1, loader_body.length - i - 1); 55 | loader_body.push(t.expressionStatement(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(export_function)))); 56 | } 57 | }else if(item.type === 'ReturnStatement'){ 58 | loader_body[i] = t.expressionStatement(item.argument); 59 | let j = 0; 60 | while (j < loader_body[i].expression.expressions.length){ 61 | let item2 = loader_body[i].expression.expressions[j]; 62 | if(item2.left &&item2.left.type === 'MemberExpression' && item2.left.object.type === 'Identifier' && item2.left.object.name === export_function){ 63 | j++ 64 | }else{ 65 | loader_body[i].expression.expressions.splice(j, loader_body[i].expression.expressions.length - j); 66 | break 67 | } 68 | } 69 | loader_body.push(t.expressionStatement(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(export_function)))); 70 | } 71 | } 72 | 73 | // 导入加载器中的函数体 74 | let loader_arguments; 75 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 76 | loader_arguments = loader_ast.program.body[0].expression.argument.arguments[0]; 77 | }else{ 78 | loader_arguments = loader_ast.program.body[0].expression.arguments[0]; 79 | } 80 | if (loader_arguments.type === 'ArrayExpression'){ 81 | let tempobjectexpression = t.objectExpression([]); 82 | loader_arguments.elements.forEach(function (item, index) { 83 | if (item && item.type === 'FunctionExpression'){ 84 | tempobjectexpression.properties.push(t.objectProperty( 85 | t.numericLiteral(index), 86 | item, 87 | false, 88 | false 89 | )); 90 | } 91 | }); 92 | loader_arguments = tempobjectexpression; 93 | } 94 | 95 | // 加载外部函数体 96 | modular_path.forEach(function (item, index) { 97 | 98 | var jscode = fs.readFileSync(item, { 99 | encoding: "utf-8" 100 | }); 101 | 102 | let modular_ast = parser.parse(jscode); 103 | modular_ast.program.body[0].expression.arguments[0].elements.forEach(function (item2, index2) { 104 | if (item2.type === 'ArrayExpression'){ 105 | item2.elements.forEach(function (item3, index3) { 106 | if (item3 && item3.type === 'FunctionExpression'){ 107 | loader_arguments.properties.push(t.objectProperty( 108 | t.numericLiteral(index3), 109 | item3, 110 | false, 111 | false 112 | )); 113 | } 114 | }); 115 | }else { 116 | item2.properties.forEach(function (item3, index3) { 117 | loader_arguments.properties.push(item3) 118 | }) 119 | } 120 | }); 121 | }); 122 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 123 | loader_ast.program.body[0].expression.argument.arguments[0] = loader_arguments; 124 | }else{ 125 | loader_ast.program.body[0].expression.arguments[0] = loader_arguments; 126 | } 127 | 128 | // 申请全局导出函数 129 | loader_ast.program.body.splice(0, 0, t.variableDeclaration("var",[t.variableDeclarator(t.identifier("export_function"))])); 130 | // 导出函数 131 | loader_ast.program.body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(t.identifier("module"), t.identifier("exports"), false), t.identifier("export_function")))); 132 | 133 | let code = generator.default(loader_ast, { 134 | compact: false, // 压缩格式 135 | comments: false, // 注释 136 | jsescOption: { 137 | minimal: false // 转义 138 | } 139 | }).code; 140 | wtofile(out_path, 'w', code); 141 | } 142 | 143 | !function () { 144 | let loader_path, out_path; 145 | let modular_path = []; 146 | for(let i = 0; i < process.argv.length; i++){ 147 | if (process.argv[i] === '-l'){ 148 | loader_path = process.argv[i + 1]; 149 | i += 1; 150 | }else if(process.argv[i] === '-m'){ 151 | modular_path.push(process.argv[i + 1]); 152 | i += 1; 153 | }else if(process.argv[i] === '-o'){ 154 | out_path = process.argv[i + 1]; 155 | i += 1; 156 | } 157 | } 158 | if (loader_path && out_path){ 159 | run(loader_path, out_path, modular_path) 160 | } 161 | }(); 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /酷我音乐/webpack_mixer.js: -------------------------------------------------------------------------------- 1 | const parser = require("@babel/parser"); 2 | const t = require("@babel/types"); 3 | const generator = require("@babel/generator"); 4 | const traverse = require("@babel/traverse").default; 5 | const fs = require("fs"); 6 | 7 | function wtofile(path, flags, code) { 8 | var fd = fs.openSync(path,flags); 9 | fs.writeSync(fd, code); 10 | fs.closeSync(fd); 11 | } 12 | 13 | function run(loader_path, out_path, modular_path) { 14 | let js_code = fs.readFileSync(loader_path, { 15 | encoding: "utf-8" 16 | }); 17 | 18 | // 转换为AST语法树 19 | let loader_ast = parser.parse(js_code); 20 | 21 | // 获取加载器代码 22 | let loader_body; 23 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 24 | loader_body = loader_ast.program.body[0].expression.argument.callee.body.body; 25 | }else{ 26 | loader_body = loader_ast.program.body[0].expression.callee.body.body; 27 | } 28 | let export_function = null; 29 | traverse(loader_ast, { 30 | FunctionDeclaration(path){ 31 | if(path.toString().includes("exports:")){ 32 | export_function = path.node.id.name 33 | } 34 | } 35 | }); 36 | if(export_function == null){ 37 | throw "未找到导出函数错误" 38 | } 39 | for (let i = 0; i < loader_body.length; i++){ 40 | let item = loader_body[i]; 41 | if(item.type === 'ExpressionStatement'){ 42 | if(item.expression.type === 'SequenceExpression' && item.expression.expressions[0].left.type === 'MemberExpression' && item.expression.expressions[0].left.object.type === 'Identifier' && item.expression.expressions[0].left.object.name === export_function){ 43 | let j = 1; 44 | while (j < item.expression.expressions.length){ 45 | let item2 = item.expression.expressions[j]; 46 | if(item2.left.type === 'MemberExpression' && item2.left.object.type === 'Identifier' && item2.left.object.name === export_function){ 47 | j++ 48 | }else{ 49 | item.expression.expressions.splice(j, item.expression.expressions.length - j); 50 | break 51 | } 52 | } 53 | loader_body.splice(i + 1, loader_body.length - i - 1); 54 | loader_body.push(t.expressionStatement(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(export_function)))); 55 | } 56 | }else if(item.type === 'ReturnStatement'){ 57 | 58 | } 59 | 60 | // if (loader_body[i].type === 'VariableDeclaration'){ 61 | // let j = i + 1; 62 | // while (j < loader_body.length){ 63 | // if (loader_body[j].type === 'VariableDeclaration' || loader_body[j].type === 'ReturnStatement'){ 64 | // loader_body.splice(j, (loader_body.length - j)); 65 | // loader_body.splice(0, i); 66 | // let tempname = ''; 67 | // loader_body.forEach(function (item, index) { 68 | // if (item.type === 'FunctionDeclaration'){ 69 | // tempname = item.id.name; 70 | // } 71 | // }); 72 | // loader_body.push(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(tempname))); 73 | // }else { 74 | // j++; 75 | // } 76 | // } 77 | // break; 78 | // } 79 | } 80 | 81 | // 导入加载器中的函数体 82 | let loader_arguments; 83 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 84 | loader_arguments = loader_ast.program.body[0].expression.argument.arguments[0]; 85 | }else{ 86 | loader_arguments = loader_ast.program.body[0].expression.arguments[0]; 87 | } 88 | if (loader_arguments.type === 'ArrayExpression'){ 89 | let tempobjectexpression = t.objectExpression([]); 90 | loader_arguments.elements.forEach(function (item, index) { 91 | if (item && item.type === 'FunctionExpression'){ 92 | tempobjectexpression.properties.push(t.objectProperty( 93 | t.numericLiteral(index), 94 | item, 95 | false, 96 | false 97 | )); 98 | } 99 | }); 100 | loader_arguments = tempobjectexpression; 101 | } 102 | 103 | // 加载外部函数体 104 | modular_path.forEach(function (item, index) { 105 | 106 | var jscode = fs.readFileSync(item, { 107 | encoding: "utf-8" 108 | }); 109 | 110 | let modular_ast = parser.parse(jscode); 111 | modular_ast.program.body[0].expression.arguments[0].elements.forEach(function (item2, index2) { 112 | if (item2.type === 'ArrayExpression'){ 113 | item2.elements.forEach(function (item3, index3) { 114 | if (item3 && item3.type === 'FunctionExpression'){ 115 | loader_arguments.properties.push(t.objectProperty( 116 | t.numericLiteral(index3), 117 | item3, 118 | false, 119 | false 120 | )); 121 | } 122 | }); 123 | }else { 124 | item2.properties.forEach(function (item3, index3) { 125 | loader_arguments.properties.push(item3) 126 | }) 127 | } 128 | }); 129 | }); 130 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 131 | loader_ast.program.body[0].expression.argument.arguments[0] = loader_arguments; 132 | }else{ 133 | loader_ast.program.body[0].expression.arguments[0] = loader_arguments; 134 | } 135 | 136 | // 申请全局导出函数 137 | loader_ast.program.body.splice(0, 0, t.variableDeclaration("var",[t.variableDeclarator(t.identifier("export_function"))])); 138 | // 导出函数 139 | loader_ast.program.body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(t.identifier("module"), t.identifier("exports"), false), t.identifier("export_function")))); 140 | 141 | let code = generator.default(loader_ast, { 142 | compact: false, // 压缩格式 143 | comments: false, // 注释 144 | jsescOption: { 145 | minimal: false // 转义 146 | } 147 | }).code; 148 | wtofile(out_path, 'w', code); 149 | } 150 | 151 | !function () { 152 | let loader_path, out_path; 153 | let modular_path = []; 154 | for(let i = 0; i < process.argv.length; i++){ 155 | if (process.argv[i] === '-l'){ 156 | loader_path = process.argv[i + 1]; 157 | i += 1; 158 | }else if(process.argv[i] === '-m'){ 159 | modular_path.push(process.argv[i + 1]); 160 | i += 1; 161 | }else if(process.argv[i] === '-o'){ 162 | out_path = process.argv[i + 1]; 163 | i += 1; 164 | } 165 | } 166 | if (loader_path && out_path){ 167 | run(loader_path, out_path, modular_path) 168 | } 169 | }(); 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | -------------------------------------------------------------------------------- /webpack_mixer.js: -------------------------------------------------------------------------------- 1 | const parser = require("@babel/parser"); 2 | const t = require("@babel/types"); 3 | const generator = require("@babel/generator"); 4 | const traverse = require("@babel/traverse").default; 5 | const fs = require("fs"); 6 | 7 | function wtofile(path, flags, code) { 8 | var fd = fs.openSync(path,flags); 9 | fs.writeSync(fd, code); 10 | fs.closeSync(fd); 11 | } 12 | 13 | function run(loader_path, out_path, modular_path) { 14 | let js_code = fs.readFileSync(loader_path, { 15 | encoding: "utf-8" 16 | }); 17 | 18 | // 转换为AST语法树 19 | let loader_ast = parser.parse(js_code); 20 | 21 | // 获取加载器代码 22 | let loader_body; 23 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 24 | loader_body = loader_ast.program.body[0].expression.argument.callee.body.body; 25 | }else{ 26 | loader_body = loader_ast.program.body[0].expression.callee.body.body; 27 | } 28 | let export_function = null; 29 | traverse(loader_ast, { 30 | FunctionDeclaration(path){ 31 | if(path.toString().includes("exports:") && export_function == null){ 32 | export_function = path.node.id.name 33 | } 34 | } 35 | }); 36 | if(export_function == null){ 37 | throw "未找到导出函数错误" 38 | } 39 | 40 | for (let i = 0; i < loader_body.length; i++){ 41 | let item = loader_body[i]; 42 | if(item.type === 'ExpressionStatement'){ 43 | if(item.expression.type === 'SequenceExpression' && item.expression.expressions[0].type === 'AssignmentExpression' && item.expression.expressions[0].left.type === 'MemberExpression' && item.expression.expressions[0].left.object.type === 'Identifier' && item.expression.expressions[0].left.object.name === export_function){ 44 | let j = item.expression.expressions.length - 1; 45 | while (j >= 0){ 46 | let item2 = item.expression.expressions[j]; 47 | if(item2.left && item2.left.type === 'MemberExpression' && ((item2.left.object.type === 'Identifier' && item2.left.object.name === export_function) || (item2.left.object.type === 'MemberExpression' && item2.left.object.object.type === 'Identifier' && item2.left.object.object.name === export_function))){ 48 | item.expression.expressions.splice(j + 1, item.expression.expressions.length - j - 1); 49 | break 50 | }else{ 51 | j--; 52 | } 53 | } 54 | loader_body.splice(i + 1, loader_body.length - i - 1); 55 | loader_body.push(t.expressionStatement(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(export_function)))); 56 | } 57 | }else if(item.type === 'ReturnStatement'){ 58 | loader_body[i] = t.expressionStatement(item.argument); 59 | let j = 0; 60 | while (j < loader_body[i].expression.expressions.length){ 61 | let item2 = loader_body[i].expression.expressions[j]; 62 | if(item2.left &&item2.left.type === 'MemberExpression' && item2.left.object.type === 'Identifier' && item2.left.object.name === export_function){ 63 | j++ 64 | }else{ 65 | loader_body[i].expression.expressions.splice(j, loader_body[i].expression.expressions.length - j); 66 | break 67 | } 68 | } 69 | loader_body.push(t.expressionStatement(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(export_function)))); 70 | } 71 | } 72 | 73 | // 导入加载器中的函数体 74 | let loader_arguments; 75 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 76 | loader_arguments = loader_ast.program.body[0].expression.argument.arguments[0]; 77 | }else{ 78 | loader_arguments = loader_ast.program.body[0].expression.arguments[0]; 79 | } 80 | if (loader_arguments.type === 'ArrayExpression'){ 81 | let tempobjectexpression = t.objectExpression([]); 82 | loader_arguments.elements.forEach(function (item, index) { 83 | if (item && item.type === 'FunctionExpression'){ 84 | tempobjectexpression.properties.push(t.objectProperty( 85 | t.numericLiteral(index), 86 | item, 87 | false, 88 | false 89 | )); 90 | } 91 | }); 92 | loader_arguments = tempobjectexpression; 93 | } 94 | 95 | // 加载外部函数体 96 | modular_path.forEach(function (item, index) { 97 | 98 | var jscode = fs.readFileSync(item, { 99 | encoding: "utf-8" 100 | }); 101 | 102 | let modular_ast = parser.parse(jscode); 103 | modular_ast.program.body[0].expression.arguments[0].elements.forEach(function (item2, index2) { 104 | if (item2.type === 'ArrayExpression'){ 105 | item2.elements.forEach(function (item3, index3) { 106 | if (item3 && item3.type === 'FunctionExpression'){ 107 | loader_arguments.properties.push(t.objectProperty( 108 | t.numericLiteral(index3), 109 | item3, 110 | false, 111 | false 112 | )); 113 | } 114 | }); 115 | }else { 116 | item2.properties.forEach(function (item3, index3) { 117 | loader_arguments.properties.push(item3) 118 | }) 119 | } 120 | }); 121 | }); 122 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 123 | loader_ast.program.body[0].expression.argument.arguments[0] = loader_arguments; 124 | }else{ 125 | loader_ast.program.body[0].expression.arguments[0] = loader_arguments; 126 | } 127 | 128 | // 申请全局导出函数 129 | loader_ast.program.body.splice(0, 0, t.variableDeclaration("var",[t.variableDeclarator(t.identifier("export_function"))])); 130 | // 导出函数 131 | loader_ast.program.body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(t.identifier("module"), t.identifier("exports"), false), t.identifier("export_function")))); 132 | 133 | let code = generator.default(loader_ast, { 134 | compact: false, // 压缩格式 135 | comments: false, // 注释 136 | jsescOption: { 137 | minimal: false // 转义 138 | } 139 | }).code; 140 | wtofile(out_path, 'w', code); 141 | } 142 | 143 | !function () { 144 | let loader_path, out_path; 145 | let modular_path = []; 146 | for(let i = 0; i < process.argv.length; i++){ 147 | if (process.argv[i] === '-l'){ 148 | loader_path = process.argv[i + 1]; 149 | i += 1; 150 | }else if(process.argv[i] === '-m'){ 151 | modular_path.push(process.argv[i + 1]); 152 | i += 1; 153 | }else if(process.argv[i] === '-o'){ 154 | out_path = process.argv[i + 1]; 155 | i += 1; 156 | } 157 | } 158 | if (loader_path && out_path){ 159 | run(loader_path, out_path, modular_path) 160 | } 161 | }(); 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /aiscore/webpack_mixer.js: -------------------------------------------------------------------------------- 1 | const parser = require("@babel/parser"); 2 | const t = require("@babel/types"); 3 | const generator = require("@babel/generator"); 4 | const traverse = require("@babel/traverse").default; 5 | const fs = require("fs"); 6 | 7 | function wtofile(path, flags, code) { 8 | var fd = fs.openSync(path,flags); 9 | fs.writeSync(fd, code); 10 | fs.closeSync(fd); 11 | } 12 | 13 | function run(loader_path, out_path, modular_path) { 14 | let js_code = fs.readFileSync(loader_path, { 15 | encoding: "utf-8" 16 | }); 17 | 18 | // 转换为AST语法树 19 | let loader_ast = parser.parse(js_code); 20 | 21 | // 获取加载器代码 22 | let loader_body; 23 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 24 | loader_body = loader_ast.program.body[0].expression.argument.callee.body.body; 25 | }else{ 26 | loader_body = loader_ast.program.body[0].expression.callee.body.body; 27 | } 28 | let export_function = null; 29 | traverse(loader_ast, { 30 | FunctionDeclaration(path){ 31 | if(path.toString().includes("exports:") && export_function == null){ 32 | export_function = path.node.id.name 33 | } 34 | } 35 | }); 36 | if(export_function == null){ 37 | throw "未找到导出函数错误" 38 | } 39 | 40 | for (let i = 0; i < loader_body.length; i++){ 41 | let item = loader_body[i]; 42 | if(item.type === 'ExpressionStatement'){ 43 | if(item.expression.type === 'SequenceExpression' && item.expression.expressions[0].type === 'AssignmentExpression' && item.expression.expressions[0].left.type === 'MemberExpression' && item.expression.expressions[0].left.object.type === 'Identifier' && item.expression.expressions[0].left.object.name === export_function){ 44 | let j = item.expression.expressions.length - 1; 45 | while (j >= 0){ 46 | let item2 = item.expression.expressions[j]; 47 | if(item2.left && item2.left.type === 'MemberExpression' && ((item2.left.object.type === 'Identifier' && item2.left.object.name === export_function) || (item2.left.object.type === 'MemberExpression' && item2.left.object.object.type === 'Identifier' && item2.left.object.object.name === export_function))){ 48 | item.expression.expressions.splice(j + 1, item.expression.expressions.length - j - 1); 49 | break 50 | }else{ 51 | j--; 52 | } 53 | } 54 | loader_body.splice(i + 1, loader_body.length - i - 1); 55 | loader_body.push(t.expressionStatement(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(export_function)))); 56 | } 57 | }else if(item.type === 'ReturnStatement'){ 58 | loader_body[i] = t.expressionStatement(item.argument); 59 | let j = 0; 60 | while (j < loader_body[i].expression.expressions.length){ 61 | let item2 = loader_body[i].expression.expressions[j]; 62 | if(item2.left &&item2.left.type === 'MemberExpression' && item2.left.object.type === 'Identifier' && item2.left.object.name === export_function){ 63 | j++ 64 | }else{ 65 | loader_body[i].expression.expressions.splice(j, loader_body[i].expression.expressions.length - j); 66 | break 67 | } 68 | } 69 | loader_body.push(t.expressionStatement(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(export_function)))); 70 | } 71 | } 72 | 73 | // 导入加载器中的函数体 74 | let loader_arguments; 75 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 76 | loader_arguments = loader_ast.program.body[0].expression.argument.arguments[0]; 77 | }else{ 78 | loader_arguments = loader_ast.program.body[0].expression.arguments[0]; 79 | } 80 | if (loader_arguments.type === 'ArrayExpression'){ 81 | let tempobjectexpression = t.objectExpression([]); 82 | loader_arguments.elements.forEach(function (item, index) { 83 | if (item && item.type === 'FunctionExpression'){ 84 | tempobjectexpression.properties.push(t.objectProperty( 85 | t.numericLiteral(index), 86 | item, 87 | false, 88 | false 89 | )); 90 | } 91 | }); 92 | loader_arguments = tempobjectexpression; 93 | } 94 | 95 | // 加载外部函数体 96 | modular_path.forEach(function (item, index) { 97 | 98 | var jscode = fs.readFileSync(item, { 99 | encoding: "utf-8" 100 | }); 101 | 102 | let modular_ast = parser.parse(jscode); 103 | modular_ast.program.body[0].expression.arguments[0].elements.forEach(function (item2, index2) { 104 | if (item2.type === 'ArrayExpression'){ 105 | item2.elements.forEach(function (item3, index3) { 106 | if (item3 && item3.type === 'FunctionExpression'){ 107 | loader_arguments.properties.push(t.objectProperty( 108 | t.numericLiteral(index3), 109 | item3, 110 | false, 111 | false 112 | )); 113 | } 114 | }); 115 | }else { 116 | item2.properties.forEach(function (item3, index3) { 117 | loader_arguments.properties.push(item3) 118 | }) 119 | } 120 | }); 121 | }); 122 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 123 | loader_ast.program.body[0].expression.argument.arguments[0] = loader_arguments; 124 | }else{ 125 | loader_ast.program.body[0].expression.arguments[0] = loader_arguments; 126 | } 127 | 128 | // 申请全局导出函数 129 | loader_ast.program.body.splice(0, 0, t.variableDeclaration("var",[t.variableDeclarator(t.identifier("export_function"))])); 130 | // 导出函数 131 | loader_ast.program.body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(t.identifier("module"), t.identifier("exports"), false), t.identifier("export_function")))); 132 | 133 | let code = generator.default(loader_ast, { 134 | compact: false, // 压缩格式 135 | comments: false, // 注释 136 | jsescOption: { 137 | minimal: false // 转义 138 | } 139 | }).code; 140 | wtofile(out_path, 'w', code); 141 | } 142 | 143 | !function () { 144 | let loader_path, out_path; 145 | let modular_path = []; 146 | for(let i = 0; i < process.argv.length; i++){ 147 | if (process.argv[i] === '-l'){ 148 | loader_path = process.argv[i + 1]; 149 | i += 1; 150 | }else if(process.argv[i] === '-m'){ 151 | modular_path.push(process.argv[i + 1]); 152 | i += 1; 153 | }else if(process.argv[i] === '-o'){ 154 | out_path = process.argv[i + 1]; 155 | i += 1; 156 | } 157 | } 158 | if (loader_path && out_path){ 159 | run(loader_path, out_path, modular_path) 160 | } 161 | }(); 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /whatsapp/webpack_mixer.js: -------------------------------------------------------------------------------- 1 | const parser = require("@babel/parser"); 2 | const t = require("@babel/types"); 3 | const generator = require("@babel/generator"); 4 | const traverse = require("@babel/traverse").default; 5 | const fs = require("fs"); 6 | 7 | function wtofile(path, flags, code) { 8 | var fd = fs.openSync(path,flags); 9 | fs.writeSync(fd, code); 10 | fs.closeSync(fd); 11 | } 12 | 13 | function run(loader_path, out_path, modular_path) { 14 | let js_code = fs.readFileSync(loader_path, { 15 | encoding: "utf-8" 16 | }); 17 | 18 | // 转换为AST语法树 19 | let loader_ast = parser.parse(js_code); 20 | 21 | // 获取加载器代码 22 | let loader_body; 23 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 24 | loader_body = loader_ast.program.body[0].expression.argument.callee.body.body; 25 | }else{ 26 | loader_body = loader_ast.program.body[0].expression.callee.body.body; 27 | } 28 | let export_function = null; 29 | traverse(loader_ast, { 30 | FunctionDeclaration(path){ 31 | if(path.toString().includes("exports:") && export_function == null){ 32 | export_function = path.node.id.name 33 | } 34 | } 35 | }); 36 | if(export_function == null){ 37 | throw "未找到导出函数错误" 38 | } 39 | 40 | for (let i = 0; i < loader_body.length; i++){ 41 | let item = loader_body[i]; 42 | if(item.type === 'ExpressionStatement'){ 43 | if(item.expression.type === 'SequenceExpression' && item.expression.expressions[0].type === 'AssignmentExpression' && item.expression.expressions[0].left.type === 'MemberExpression' && item.expression.expressions[0].left.object.type === 'Identifier' && item.expression.expressions[0].left.object.name === export_function){ 44 | let j = item.expression.expressions.length - 1; 45 | while (j >= 0){ 46 | let item2 = item.expression.expressions[j]; 47 | if(item2.left && item2.left.type === 'MemberExpression' && ((item2.left.object.type === 'Identifier' && item2.left.object.name === export_function) || (item2.left.object.type === 'MemberExpression' && item2.left.object.object.type === 'Identifier' && item2.left.object.object.name === export_function))){ 48 | item.expression.expressions.splice(j + 1, item.expression.expressions.length - j - 1); 49 | break 50 | }else{ 51 | j--; 52 | } 53 | } 54 | loader_body.splice(i + 1, loader_body.length - i - 1); 55 | loader_body.push(t.expressionStatement(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(export_function)))); 56 | } 57 | }else if(item.type === 'ReturnStatement'){ 58 | loader_body[i] = t.expressionStatement(item.argument); 59 | let j = 0; 60 | while (j < loader_body[i].expression.expressions.length){ 61 | let item2 = loader_body[i].expression.expressions[j]; 62 | if(item2.left &&item2.left.type === 'MemberExpression' && item2.left.object.type === 'Identifier' && item2.left.object.name === export_function){ 63 | j++ 64 | }else{ 65 | loader_body[i].expression.expressions.splice(j, loader_body[i].expression.expressions.length - j); 66 | break 67 | } 68 | } 69 | loader_body.push(t.expressionStatement(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(export_function)))); 70 | } 71 | } 72 | 73 | // 导入加载器中的函数体 74 | let loader_arguments; 75 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 76 | loader_arguments = loader_ast.program.body[0].expression.argument.arguments[0]; 77 | }else{ 78 | loader_arguments = loader_ast.program.body[0].expression.arguments[0]; 79 | } 80 | if (loader_arguments.type === 'ArrayExpression'){ 81 | let tempobjectexpression = t.objectExpression([]); 82 | loader_arguments.elements.forEach(function (item, index) { 83 | if (item && item.type === 'FunctionExpression'){ 84 | tempobjectexpression.properties.push(t.objectProperty( 85 | t.numericLiteral(index), 86 | item, 87 | false, 88 | false 89 | )); 90 | } 91 | }); 92 | loader_arguments = tempobjectexpression; 93 | } 94 | 95 | // 加载外部函数体 96 | modular_path.forEach(function (item, index) { 97 | 98 | var jscode = fs.readFileSync(item, { 99 | encoding: "utf-8" 100 | }); 101 | 102 | let modular_ast = parser.parse(jscode); 103 | modular_ast.program.body[0].expression.arguments[0].elements.forEach(function (item2, index2) { 104 | if (item2.type === 'ArrayExpression'){ 105 | item2.elements.forEach(function (item3, index3) { 106 | if (item3 && item3.type === 'FunctionExpression'){ 107 | loader_arguments.properties.push(t.objectProperty( 108 | t.numericLiteral(index3), 109 | item3, 110 | false, 111 | false 112 | )); 113 | } 114 | }); 115 | }else { 116 | item2.properties.forEach(function (item3, index3) { 117 | loader_arguments.properties.push(item3) 118 | }) 119 | } 120 | }); 121 | }); 122 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 123 | loader_ast.program.body[0].expression.argument.arguments[0] = loader_arguments; 124 | }else{ 125 | loader_ast.program.body[0].expression.arguments[0] = loader_arguments; 126 | } 127 | 128 | // 申请全局导出函数 129 | loader_ast.program.body.splice(0, 0, t.variableDeclaration("var",[t.variableDeclarator(t.identifier("export_function"))])); 130 | // 导出函数 131 | loader_ast.program.body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(t.identifier("module"), t.identifier("exports"), false), t.identifier("export_function")))); 132 | 133 | let code = generator.default(loader_ast, { 134 | compact: false, // 压缩格式 135 | comments: false, // 注释 136 | jsescOption: { 137 | minimal: false // 转义 138 | } 139 | }).code; 140 | wtofile(out_path, 'w', code); 141 | } 142 | 143 | !function () { 144 | let loader_path, out_path; 145 | let modular_path = []; 146 | for(let i = 0; i < process.argv.length; i++){ 147 | if (process.argv[i] === '-l'){ 148 | loader_path = process.argv[i + 1]; 149 | i += 1; 150 | }else if(process.argv[i] === '-m'){ 151 | modular_path.push(process.argv[i + 1]); 152 | i += 1; 153 | }else if(process.argv[i] === '-o'){ 154 | out_path = process.argv[i + 1]; 155 | i += 1; 156 | } 157 | } 158 | if (loader_path && out_path){ 159 | run(loader_path, out_path, modular_path) 160 | } 161 | }(); 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /猿人学16/webpack_mixer.js: -------------------------------------------------------------------------------- 1 | const parser = require("@babel/parser"); 2 | const t = require("@babel/types"); 3 | const generator = require("@babel/generator"); 4 | const traverse = require("@babel/traverse").default; 5 | const fs = require("fs"); 6 | 7 | function wtofile(path, flags, code) { 8 | var fd = fs.openSync(path,flags); 9 | fs.writeSync(fd, code); 10 | fs.closeSync(fd); 11 | } 12 | 13 | function run(loader_path, out_path, modular_path) { 14 | let js_code = fs.readFileSync(loader_path, { 15 | encoding: "utf-8" 16 | }); 17 | 18 | // 转换为AST语法树 19 | let loader_ast = parser.parse(js_code); 20 | 21 | // 获取加载器代码 22 | let loader_body; 23 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 24 | loader_body = loader_ast.program.body[0].expression.argument.callee.body.body; 25 | }else{ 26 | loader_body = loader_ast.program.body[0].expression.callee.body.body; 27 | } 28 | let export_function = null; 29 | traverse(loader_ast, { 30 | FunctionDeclaration(path){ 31 | if(path.toString().includes("exports:") && export_function == null){ 32 | export_function = path.node.id.name 33 | } 34 | } 35 | }); 36 | if(export_function == null){ 37 | throw "未找到导出函数错误" 38 | } 39 | 40 | for (let i = 0; i < loader_body.length; i++){ 41 | let item = loader_body[i]; 42 | if(item.type === 'ExpressionStatement'){ 43 | if(item.expression.type === 'SequenceExpression' && item.expression.expressions[0].type === 'AssignmentExpression' && item.expression.expressions[0].left.type === 'MemberExpression' && item.expression.expressions[0].left.object.type === 'Identifier' && item.expression.expressions[0].left.object.name === export_function){ 44 | let j = item.expression.expressions.length - 1; 45 | while (j >= 0){ 46 | let item2 = item.expression.expressions[j]; 47 | if(item2.left && item2.left.type === 'MemberExpression' && ((item2.left.object.type === 'Identifier' && item2.left.object.name === export_function) || (item2.left.object.type === 'MemberExpression' && item2.left.object.object.type === 'Identifier' && item2.left.object.object.name === export_function))){ 48 | item.expression.expressions.splice(j + 1, item.expression.expressions.length - j - 1); 49 | break 50 | }else{ 51 | j--; 52 | } 53 | } 54 | loader_body.splice(i + 1, loader_body.length - i - 1); 55 | loader_body.push(t.expressionStatement(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(export_function)))); 56 | } 57 | }else if(item.type === 'ReturnStatement'){ 58 | loader_body[i] = t.expressionStatement(item.argument); 59 | let j = 0; 60 | while (j < loader_body[i].expression.expressions.length){ 61 | let item2 = loader_body[i].expression.expressions[j]; 62 | if(item2.left &&item2.left.type === 'MemberExpression' && item2.left.object.type === 'Identifier' && item2.left.object.name === export_function){ 63 | j++ 64 | }else{ 65 | loader_body[i].expression.expressions.splice(j, loader_body[i].expression.expressions.length - j); 66 | break 67 | } 68 | } 69 | loader_body.push(t.expressionStatement(t.assignmentExpression("=", t.identifier("export_function"), t.identifier(export_function)))); 70 | } 71 | } 72 | 73 | // 导入加载器中的函数体 74 | let loader_arguments; 75 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 76 | loader_arguments = loader_ast.program.body[0].expression.argument.arguments[0]; 77 | }else{ 78 | loader_arguments = loader_ast.program.body[0].expression.arguments[0]; 79 | } 80 | if (loader_arguments.type === 'ArrayExpression'){ 81 | let tempobjectexpression = t.objectExpression([]); 82 | loader_arguments.elements.forEach(function (item, index) { 83 | if (item && item.type === 'FunctionExpression'){ 84 | tempobjectexpression.properties.push(t.objectProperty( 85 | t.numericLiteral(index), 86 | item, 87 | false, 88 | false 89 | )); 90 | } 91 | }); 92 | loader_arguments = tempobjectexpression; 93 | } 94 | 95 | // 加载外部函数体 96 | modular_path.forEach(function (item, index) { 97 | 98 | var jscode = fs.readFileSync(item, { 99 | encoding: "utf-8" 100 | }); 101 | 102 | let modular_ast = parser.parse(jscode); 103 | modular_ast.program.body[0].expression.arguments[0].elements.forEach(function (item2, index2) { 104 | if (item2.type === 'ArrayExpression'){ 105 | item2.elements.forEach(function (item3, index3) { 106 | if (item3 && item3.type === 'FunctionExpression'){ 107 | loader_arguments.properties.push(t.objectProperty( 108 | t.numericLiteral(index3), 109 | item3, 110 | false, 111 | false 112 | )); 113 | } 114 | }); 115 | }else { 116 | item2.properties.forEach(function (item3, index3) { 117 | loader_arguments.properties.push(item3) 118 | }) 119 | } 120 | }); 121 | }); 122 | if (loader_ast.program.body[0].expression.type === 'UnaryExpression'){ 123 | loader_ast.program.body[0].expression.argument.arguments[0] = loader_arguments; 124 | }else{ 125 | loader_ast.program.body[0].expression.arguments[0] = loader_arguments; 126 | } 127 | 128 | // 申请全局导出函数 129 | loader_ast.program.body.splice(0, 0, t.variableDeclaration("var",[t.variableDeclarator(t.identifier("export_function"))])); 130 | // 导出函数 131 | loader_ast.program.body.push(t.expressionStatement(t.assignmentExpression("=", t.memberExpression(t.identifier("module"), t.identifier("exports"), false), t.identifier("export_function")))); 132 | 133 | let code = generator.default(loader_ast, { 134 | compact: true, // 压缩格式 135 | comments: false, // 注释 136 | jsescOption: { 137 | minimal: false // 转义 138 | } 139 | }).code; 140 | wtofile(out_path, 'w', code); 141 | } 142 | 143 | !function () { 144 | let loader_path, out_path; 145 | let modular_path = []; 146 | for(let i = 0; i < process.argv.length; i++){ 147 | if (process.argv[i] === '-l'){ 148 | loader_path = process.argv[i + 1]; 149 | i += 1; 150 | }else if(process.argv[i] === '-m'){ 151 | modular_path.push(process.argv[i + 1]); 152 | i += 1; 153 | }else if(process.argv[i] === '-o'){ 154 | out_path = process.argv[i + 1]; 155 | i += 1; 156 | } 157 | } 158 | if (loader_path && out_path){ 159 | run(loader_path, out_path, modular_path) 160 | } 161 | }(); 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /天翼云/login.82cd5927.js: -------------------------------------------------------------------------------- 1 | (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["login"],{"1f3a4":function(e,t,a){"use strict";var r=a("323e"),s=a.n(r);s.a},"323e":function(e,t,a){},"51e0":function(e,t,a){e.exports=a.p+"img/ctyunlogo.620efe82.png"},ebb0:function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"login-page"},[r("header",[r("i",{staticClass:"iconfont icon-close",on:{click:e.closeLoginPage}})]),r("main",[r("img",{staticClass:"logo",attrs:{alt:"",src:a("51e0")}}),r("div",{staticClass:"form"},[r("div",{staticClass:"form-cell account"},[r("div",{staticClass:"input-wrapper"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.form.account.value,expression:"form.account.value"}],attrs:{placeholder:e.form.account.placeholder,type:"text"},domProps:{value:e.form.account.value},on:{blur:e.hideAssist,focus:e.changeAccount,input:[function(t){t.target.composing||e.$set(e.form.account,"value",t.target.value)},e.changeAccount]}}),r("div",{directives:[{name:"show",rawName:"v-show",value:e.assist.show&&e.assist.list.length,expression:"assist.show && assist.list.length"}],staticClass:"assist-wrapper"},[r("ul",{staticClass:"emails-wrapper"},e._l(e.assist.list,(function(t,a){return r("li",{key:a,on:{click:function(a){return e.handleSelectEmail(t)}}},[e._v(e._s(e.getVal(e.form.account.value))+e._s(t))])})),0)]),e.isShowClearIcon?r("i",{staticClass:"iconfont icon-reject",on:{click:function(t){e.form.account.value=""}}}):e._e()])]),r("div",{staticClass:"form-cell password"},[r("div",{staticClass:"input-wrapper"},["checkbox"===e.form.password.type?r("input",{directives:[{name:"model",rawName:"v-model",value:e.form.password.value,expression:"form.password.value"}],attrs:{placeholder:e.form.password.placeholder,type:"checkbox"},domProps:{checked:Array.isArray(e.form.password.value)?e._i(e.form.password.value,null)>-1:e.form.password.value},on:{change:function(t){var a=e.form.password.value,r=t.target,s=!!r.checked;if(Array.isArray(a)){var o=null,n=e._i(a,o);r.checked?n<0&&e.$set(e.form.password,"value",a.concat([o])):n>-1&&e.$set(e.form.password,"value",a.slice(0,n).concat(a.slice(n+1)))}else e.$set(e.form.password,"value",s)}}}):"radio"===e.form.password.type?r("input",{directives:[{name:"model",rawName:"v-model",value:e.form.password.value,expression:"form.password.value"}],attrs:{placeholder:e.form.password.placeholder,type:"radio"},domProps:{checked:e._q(e.form.password.value,null)},on:{change:function(t){return e.$set(e.form.password,"value",null)}}}):r("input",{directives:[{name:"model",rawName:"v-model",value:e.form.password.value,expression:"form.password.value"}],attrs:{placeholder:e.form.password.placeholder,type:e.form.password.type},domProps:{value:e.form.password.value},on:{input:function(t){t.target.composing||e.$set(e.form.password,"value",t.target.value)}}}),""!==e.form.password.value?r("i",{staticClass:"iconfont icon-reject icon-x",on:{click:function(t){e.form.password.value=""}}}):e._e(),r("i",{staticClass:"iconfont",class:{"icon-eye-close":e.isPasswordType,"icon-eye-open":!e.isPasswordType},on:{click:e.changePasswordInputType}})])]),r("button",{staticClass:"submit",on:{click:e.login}},[e._v("登录")])]),r("ul",{staticClass:"skip-list"},e._l(e.skip.list,(function(t,a){return r("li",{key:a,staticClass:"item",on:{click:function(a){return e.handleSkipItemClick(t)}}},[e._v(e._s(t.text))])})),0)]),r("footer",[e._m(0),r("div",{staticClass:"third-login"},e._l(e.filterThirdLogin(e.thirdLogin),(function(t,a){return r("i",{key:a,staticClass:"iconfont",class:t.icon,on:{click:function(a){return e.handleThirdLoginClick(t)}}})})),0)])])},s=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"title-wrapper"},[a("span",{staticClass:"line"}),a("span",{staticClass:"title"},[e._v("其他方式登录")]),a("span",{staticClass:"line"})])}],o=(a("6762"),a("2fdb"),a("b54a"),a("a4bb")),n=a.n(o),i=(a("ac6a"),a("ceaa"),a("b2fb")),c=a.n(i),l=(a("96cf"),a("3b8d")),u=a("db0c"),d=a.n(u),f=(a("a481"),a("7f7f"),a("7306")),p=a("7f6d"),m=a("4328"),h=a.n(m),v={name:"login",inject:["reload","onProtocolModal"],data:function(){return{referrer:{},assist:{show:!1,list:[],emails:["@163.com","@126.com","@sina.com","@189.cn","@139.com","@qq.com","@gmail.com","@hotmail.com"]},form:{account:{value:"",placeholder:"请输入天翼云账号",rule:p["M"].email,errorMsg:"请您输入正确的电子邮箱"},password:{value:"",placeholder:"请输入密码",rule:"",errorMsg:"请您输入正确的密码",type:"password"}},skip:{list:[{text:"忘记密码",link:"/auth/reset"},{text:"免费注册",link:"/auth/register"}]},thirdLogin:{wechat:{icon:"icon-wechat",key:"wechat",show:Object(p["B"])()},qq:{icon:"icon-qq",key:"qq",show:!Object(p["B"])()}}}},computed:{isShowClearIcon:function(){return this.form.account.value.length},isPasswordType:function(){return"password"===this.form.password.type}},beforeRouteEnter:function(e,t,a){a((function(e){e.referrer=t}))},created:function(){this.handleQueryEmail()},methods:{closeLoginPage:function(){var e=this,t=e.$route.query.redirect;t&&null!==e.referrer.name?e.$router.go(-1):e.$router.replace("/")},getVal:function(e){return-1!==e.indexOf("@")?e.substring(0,e.indexOf("@")):e},handleSelectEmail:function(e){var t=this;t.form.account.value=t.getVal(t.form.account.value)+e},changeAccount:function(){var e=this,t=e.form.account;if(""===t.value)return e.assist.show=!1,!1;e.assist.show=!0;var a=t.value.indexOf("@");if(-1===a)e.assist.list=e.assist.emails;else{var r=t.value.substring(a,t.value.length);e.assist.list=[],e.assist.list=e.assist.emails.filter((function(e){return-1!==e.indexOf(r)}))}},hideAssist:function(){var e=this;setTimeout((function(){e.assist.show=!1}),0)},changePasswordInputType:function(){var e=this;e.form.password.type=e.isPasswordType?"text":"password"},checkForm:function(){var e=this,t=d()(e.form).every((function(t){return!(t.rule&&!t.rule(t.value))||(e.toast(t.errorMsg),!1)}));return t},login:function(){var e=Object(l["a"])(regeneratorRuntime.mark((function e(){var t,a,r,s,o,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t=this,t.form.password.value){e.next=4;break}return t.toast("请您输入密码"),e.abrupt("return",!1);case 4:if(!t.checkForm()){e.next=25;break}return a=t.form,r=a.account,s=a.password,e.prev=6,c.a.open({spinnerType:"fading-circle"}),e.next=10,Object(f["q"])({userName:Object(p["g"])(r.value),password:encodeURI(Object(p["c"])(s.value,Object(p["f"])(Object(p["g"])(r.value))))});case 10:return o=e.sent,e.next=13,t.$store.dispatch("auth/login",o.data.userInfo);case 13:return e.next=15,t.onProtocolModal({cancelCallback:t.resetFormValue,confirmCallback:t.handleRedirect});case 15:n=e.sent,n||t.handleRedirect(),e.next=22;break;case 19:e.prev=19,e.t0=e["catch"](6),t.errorCallback(e.t0);case 22:return e.prev=22,c.a.close(),e.finish(22);case 25:case"end":return e.stop()}}),e,this,[[6,19,22,25]])})));function t(){return e.apply(this,arguments)}return t}(),resetFormValue:function(){var e=this;n()(e.form).forEach((function(t){e.form[t].value=""}))},handleRedirect:function(){var e=this;e.reload(),e.$router.replace(e.$route.query.redirect||"/")},handleSkipItemClick:function(e){this.$router.push({path:e.link})},filterThirdLogin:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.thirdLogin;return d()(e).filter((function(e){return e.show}))},handleThirdLoginClick:function(e){var t=this,a=t.$route.query.redirect||"",r=a.includes("?")||a.includes("%3F");a=r?"/my":a;var s=encodeURIComponent(a||"/my");window.open("/thirdLogin/".concat("wap","/login/").concat(e.key,"?type=0&redirect=").concat(s),"_self")},handleQueryEmail:function(){var e="";try{var t=this.$route.query.redirect,a=h.a.parse(t,{ignoreQueryPrefix:!0});a.email&&(e=window.atob(a.email))}catch(r){console.warn("incorrect email")}finally{this.form.account.value=e}}}},w=v,g=(a("1f3a4"),a("2877")),y=Object(g["a"])(w,r,s,!1,null,"89fdeff6",null);t["default"]=y.exports}}]); -------------------------------------------------------------------------------- /aiscore/045b45a.js: -------------------------------------------------------------------------------- 1 | !function(e){function c(data){for(var c,d,f=data[0],t=data[1],r=data[2],i=0,m=[];i2&&void 0!==arguments[2]?arguments[2]:"short",a=e.length?e.reduce((function(e,t){return e.pubgProperty.rank>t.pubgProperty.rank?t:e})):{},i=a.shortName,r=a.englishName,s=a.name;return"short"===n?i||r||s||t||"TBD":s||r||i||t||"TBD"},getPlayerName:function(e){return e&&(e.nickname||e.realName)||"player"},getBattleSidesName:function(e,t){var n=this.isPlayerGameTypes?"homeTeam"===t?"playerA":"playerB":t;return([{status:this.isPlayerGameTypes,name:this.isPlayerGameTypes&&(e.matchId?this.getPlayerName(e[n]):this.getPlayerName(e))},{status:this.isPubgGameType,name:e.pubgProperty&&e.pubgProperty.title||"title"},{status:this.isOtherGameTypes,name:this.isOtherGameTypes&&this.getTeamName(e,n)}].find((function(e){return e.status}))||{}).name},judgeGameType:function(e){return(this.gameType||this.match&&this.match.gameType)===i.PBGameType[e]},isHasBattles:function(e){return e.battles&&e.battles.length},getAchievements:function(e,t){var n=this,a=this.latestBattle?this.latestBattle:this.battle,i=t&&t.gameType?t:a;return i[e]?this.gameAchievementMap.filter((function(t){return i[e][n.gameProperty]&&i[e][n.gameProperty][t.key]})):[]}}}},263:function(e,t,n){"use strict";var a=n(29);t.a={methods:{handleOpen:function(e,t){window.open("".concat(t.href),e?"_blank":"_self")},actionMatchDetail:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"data",t=arguments.length>1?arguments[1]:void 0,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.$router.resolve({name:"detail-battle-type-gameType-id",params:{type:e,gameType:this.encodeGameType(t.gameType),id:this.encodeMatchId(t.matchId)}});this.handleOpen(n,a)},encodeGameType:function(e){var t=(a.GAME_TYPE_EN[e]||"").toLowerCase();return"".concat(t,"-").concat(e)},encodeMatchId:function(e){return"match-".concat(e,".html")},encodeLeagueId:function(e,t){var n=(a.GAME_TYPE_EN[e]||"").toLowerCase();return"league-".concat(n,"-").concat(t,".html")},actionLeagueDetail:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=this.$router.resolve({name:"detail-league-gameType-id",params:{gameType:this.encodeGameType(e.gameType),id:this.encodeLeagueId(e.gameType,e.leagueId)}});this.handleOpen(t,n)}}}},265:function(e,t,n){"use strict";n(275);var a=n(55),i=(n(54),n(111),n(14)),r=n(263),s=n(255),o=n(15),c=n(94);t.a={mixins:[r.a,s.a],computed:{gameType:function(){return this.match&&this.match.gameType},status:function(){return this.match&&this.match.status},latestBattle:function(){return this.isHasBattle?this.match.battles[this.match.battles.length-1]:{}},isHasBattle:function(){return this.match&&this.match.battles&&this.match.battles.length>0},digitsStr:function(){return["一","二","三","四","五","六","七","八","九","十","十一","十二"]},battlesSize:function(){return this.isHasBattle&&!this.oneEndNoStart?"第".concat(this.digitsStr[this.match.battles.length-1],"局"):"进行中"},oneEndNoStart:function(){return this.match.homeTeam.score+this.match.awayTeam.score===this.match.battles.length},hasBetData:function(){return this.match.bet&&this.match.bet.options.length>0}},methods:{moneyGap:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.latestBattle,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e[this.gameProperty]&&e[this.gameProperty].ecoDiff||[],a=this.getFieldVal("homeTeam","money",e)-this.getFieldVal("awayTeam","money",e)||null,i=n.length?n[n.length-1].diff:a,r=this.judgeGameType("GT_DOTA")||this.judgeGameType("GT_LOL"),s=r?i:a;if(null==s)return"-";var o=Math.abs(s)>0&&Math.abs(s)<100;return o?Math.abs(s):t?s&&Object(c.b)(s):s},moneyGapImg:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.latestBattle,t=this.moneyGap(e,!1),n=Math.abs(t);return!(!n||"-"===t)&&this.qiniuSizeImg("webpc/1.5/icon_money_new_".concat(t>0?"increase":"decrease",".png"))},getFieldVal:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.latestBattle;return n[e]&&n[e][this.gameProperty]&&n[e][this.gameProperty][t]},handleZeroLine:function(e){return Number(e)>=0?e:"-"},raiseArrNum:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,n=e||[],i=this.qiniuSizeImg("icon_hero_".concat(this.gameTypeLowerText,"_circular_grey_default.png")),r=n.length;return ro?"increase":r0?"score-win-color":0===a?"score-equal-color":"score-lose-color"},getCampTypeTipText:function(e,t){return Object(u.c)(e,t)},showCampIcon:function(e,t){var n=["反恐精英","恐怖分子","蓝方","红方","夜魇","天辉"].findIndex((function(n){return n===Object(u.c)(e,t)}));return-1===n?n:this.qiniuSizeImg(["/webpc/1.3/icon_cs_ct@2x.png","/webpc/1.3/icon_cs_t@2x.png","/webpc/1.3/icon_lol_blue@2x.png","/webpc/1.3/icon_lol_red@2x.png","/webpc/1.3/icon_dota_tianhui@2x.png","/webpc/1.3/icon_dota_yeyan@2x.png"][n])}}}},270:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"h",(function(){return r})),n.d(t,"m",(function(){return s})),n.d(t,"f",(function(){return o})),n.d(t,"b",(function(){return c})),n.d(t,"d",(function(){return u})),n.d(t,"k",(function(){return m})),n.d(t,"i",(function(){return h})),n.d(t,"g",(function(){return l})),n.d(t,"j",(function(){return p})),n.d(t,"e",(function(){return g})),n.d(t,"l",(function(){return d})),n.d(t,"c",(function(){return y}));var a=n(26);function i(e){return a.a.post("/match/bet/multi/search",{params:e}).then((function(e){return e.data}))}function r(e){return a.a.get("/match/matchDailyCount",{params:e}).then((function(e){return e.data}))}function s(e){return a.a.get("/match/recentMatchAndBetChange",{params:e}).then((function(e){return e.data}))}function o(e){return a.a.get("/match/matchAndBetGet",{params:e}).then((function(e){return e.data}))}function c(e){return a.a.get("/match/bet/search",{params:e}).then((function(e){return e.data}))}function u(e){return a.a.get("/match/index/recent/match/change",{params:e}).then((function(e){return e.data}))}function m(e){return a.a.get("/match/list",{params:e}).then((function(e){return e.data}))}function h(e){return a.a.get("/match/get",{params:e}).then((function(e){return e.data}))}function l(e){return a.a.get("/match/list/count",{params:e}).then((function(e){return e.data}))}function p(e){return a.a.get("/match/performance/get",{params:e}).then((function(e){return e.data}))}function g(e){return a.a.get("/match/analysis/get",{params:e}).then((function(e){return e.data})).catch((function(){return{}}))}function d(e){return a.a.get("/match/teamLeagueStatistic/get",{params:e}).then((function(e){return e.data}))}function y(e){return a.a.get("/match/csgoGameLogRange",{params:e}).then((function(e){return e.data}))}},271:function(e,t,n){"use strict";var a=n(16),i=n(169)(6),r="findIndex",s=!0;r in[]&&Array(1)[r]((function(){s=!1})),a(a.P+a.F*s,"Array",{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(91)(r)},275:function(e,t,n){var a=n(16);a(a.P,"Array",{fill:n(286)}),n(91)("fill")},286:function(e,t,n){"use strict";var a=n(49),i=n(168),r=n(42);e.exports=function(e){for(var t=a(this),n=r(t.length),s=arguments.length,o=i(s>1?arguments[1]:void 0,n),c=s>2?arguments[2]:void 0,u=void 0===c?n:i(c,n);u>o;)t[o++]=e;return t}}}]); -------------------------------------------------------------------------------- /whatsapp/runtime.js: -------------------------------------------------------------------------------- 1 | /*! Copyright (c) 2022 WhatsApp Inc. All Rights Reserved. */ 2 | ((b)=>{ 3 | "use strict"; 4 | var e, a, c, l, o, s, d, t = {}; 5 | function f(e) { 6 | var a = t[e]; 7 | if (void 0 !== a) 8 | return a.exports; 9 | var c = t[e] = { 10 | id: e, 11 | loaded: !1, 12 | exports: {} 13 | }; 14 | return b[e].call(c.exports, c, c.exports, f), 15 | c.loaded = !0, 16 | c.exports 17 | } 18 | f.m = b, 19 | f.amdO = {}, 20 | e = [], 21 | f.O = (a,c,l,o)=>{ 22 | if (!c) { 23 | var s = 1 / 0; 24 | for (t = 0; t < e.length; t++) { 25 | for (var [c,l,o] = e[t], d = !0, b = 0; b < c.length; b++) 26 | (!1 & o || s >= o) && Object.keys(f.O).every((e=>f.O[e](c[b]))) ? c.splice(b--, 1) : (d = !1, 27 | o < s && (s = o)); 28 | d && (e.splice(t--, 1), 29 | a = l()) 30 | } 31 | return a 32 | } 33 | o = o || 0; 34 | for (var t = e.length; t > 0 && e[t - 1][2] > o; t--) 35 | e[t] = e[t - 1]; 36 | e[t] = [c, l, o] 37 | } 38 | , 39 | f.n = e=>{ 40 | var a = e && e.__esModule ? ()=>e.default : ()=>e; 41 | return f.d(a, { 42 | a 43 | }), 44 | a 45 | } 46 | , 47 | c = Object.getPrototypeOf ? e=>Object.getPrototypeOf(e) : e=>e.__proto__, 48 | f.t = function(e, l) { 49 | if (1 & l && (e = this(e)), 50 | 8 & l) 51 | return e; 52 | if ("object" == typeof e && e) { 53 | if (4 & l && e.__esModule) 54 | return e; 55 | if (16 & l && "function" == typeof e.then) 56 | return e 57 | } 58 | var o = Object.create(null); 59 | f.r(o); 60 | var s = {}; 61 | a = a || [null, c({}), c([]), c(c)]; 62 | for (var d = 2 & l && e; "object" == typeof d && !~a.indexOf(d); d = c(d)) 63 | Object.getOwnPropertyNames(d).forEach((a=>s[a] = ()=>e[a])); 64 | return s.default = ()=>e, 65 | f.d(o, s), 66 | o 67 | } 68 | , 69 | f.d = (e,a)=>{ 70 | for (var c in a) 71 | f.o(a, c) && !f.o(e, c) && Object.defineProperty(e, c, { 72 | enumerable: !0, 73 | get: a[c] 74 | }) 75 | } 76 | , 77 | f.f = {}, 78 | f.e = e=>Promise.all(Object.keys(f.f).reduce(((a,c)=>(f.f[c](e, a), 79 | a)), [])), 80 | f.u = e=>(({ 81 | 88: "locales/de-json", 82 | 155: "locales/kn", 83 | 165: "locales/cs", 84 | 239: "lazy_loaded_ca_root_certificates", 85 | 248: "locales/tr", 86 | 275: "lazy_loaded_low_priority_components", 87 | 319: "moment_locales/nl", 88 | 673: "locales/es", 89 | 677: "locales/bn-json", 90 | 792: "locales/et", 91 | 820: "locales/ko", 92 | 887: "locales/ru-json", 93 | 906: "locales/uk", 94 | 907: "locales/fil", 95 | 951: "moment_locales/th", 96 | 1055: "moment_locales/el", 97 | 1069: "moment_locales/sv", 98 | 1081: "locales/zh-HK", 99 | 1204: "locales/el", 100 | 1234: "locales/bg-json", 101 | 1244: "locales/gu-json", 102 | 1248: "locales/mr", 103 | 1381: "moment_locales/hr", 104 | 1389: "locales/hu-json", 105 | 1473: "moment_locales/ar", 106 | 1520: "moment_locales/ms-MY", 107 | 1529: "locales/lt", 108 | 1592: "locales/mk-json", 109 | 1628: "locales/da", 110 | 1702: "vendors~lazy_loaded_low_priority_components", 111 | 1770: "locales/sk", 112 | 1791: "moment_locales/es", 113 | 1967: "locales/az-json", 114 | 1992: "locales/pt-json", 115 | 2017: "moment_locales/sw", 116 | 2023: "moment_locales/cs", 117 | 2091: "locales/pt-BR", 118 | 2101: "vendors~bootstrap_main", 119 | 2135: "locales/th", 120 | 2394: "moment_locales/es-DO", 121 | 2422: "locales/he-json", 122 | 2445: "moment_locales/fr", 123 | 2556: "locales/hu", 124 | 2619: "locales/ur-json", 125 | 2739: "locales/ta", 126 | 2771: "locales/mr-json", 127 | 2790: "lazy_loaded_low_priority_components~", 128 | 2830: "locales/it", 129 | 2944: "locales/sv", 130 | 2957: "moment_locales/ru", 131 | 2966: "moment_locales/ar-MA", 132 | 2967: "locales/sr-json", 133 | 2974: "vendors~pdf", 134 | 2979: "moment_locales/en-IE", 135 | 3004: "locales/el-json", 136 | 3017: "moment_locales/uz", 137 | 3047: "moment_locales/zh-CN", 138 | 3113: "moment_locales/ml", 139 | 3370: "moment_locales/te", 140 | 3421: "locales/zh-TW-json", 141 | 3422: "moment_locales/mr", 142 | 3501: "moment_locales/sl", 143 | 3539: "locales/cs-json", 144 | 3565: "locales/fil-json", 145 | 3569: "moment_locales/ro", 146 | 3721: "locales/ta-json", 147 | 3722: "locales/hi", 148 | 3748: "moment_locales/af", 149 | 3853: "locales/hr-json", 150 | 3892: "moment_locales/en-NZ", 151 | 3934: "moment_locales/ar-XB", 152 | 3998: "locales/sw", 153 | 4046: "locales/nb-json", 154 | 4132: "locales/id-json", 155 | 4169: "locales/lt-json", 156 | 4259: "locales/sl", 157 | 4260: "locales/kk-json", 158 | 4339: "moment_locales/hu", 159 | 4361: "locales/ur", 160 | 4451: "locales/ca-json", 161 | 4468: "moment_locales/gu", 162 | 4473: "moment_locales/et", 163 | 4616: "moment_locales/en-CA", 164 | 4680: "locales/zh-CN-json", 165 | 4708: "locales/lv", 166 | 4739: "locales/es-json", 167 | 4768: "locales/sv-json", 168 | 4771: "locales/te-json", 169 | 4794: "locales/ml-json", 170 | 4815: "vendors~lazy_loaded_relay", 171 | 4818: "moment_locales/ko", 172 | 4853: "locales/fa-json", 173 | 4873: "locales/uz", 174 | 4980: "moment_locales/pl", 175 | 5027: "moment_locales/he", 176 | 5125: "moment_locales/zh-TW", 177 | 5128: "locales/id", 178 | 5170: "moment_locales/sr", 179 | 5182: "locales/ja", 180 | 5211: "locales/[request]", 181 | 5247: "moment_locales/it", 182 | 5282: "locales/uk-json", 183 | 5315: "locales/vi-json", 184 | 5443: "locales/ms", 185 | 5512: "svg", 186 | 5608: "locales/ja-json", 187 | 5632: "locales/ca", 188 | 5650: "locales/te", 189 | 5671: "moment_locales/ar-LY", 190 | 5708: "locales/hr", 191 | 5729: "locales/he", 192 | 5740: "moment_locales/az", 193 | 5790: "moment_locales/sr-CYRL", 194 | 5862: "moment_locales/de", 195 | 5881: "locales/it-json", 196 | 5955: "locales/th-json", 197 | 5959: "moment_locales/nb", 198 | 5965: "moment_locales/sk", 199 | 6032: "locales/pa-json", 200 | 6038: "locales/gu", 201 | 6098: "locales/sq-json", 202 | 6163: "moment_locales/ur", 203 | 6282: "moment_locales/ar-KW", 204 | 6293: "locales/fr", 205 | 6331: "locales/sr", 206 | 6352: "vendors~lazy_loaded_business_direct_utils", 207 | 6365: "locales/af", 208 | 6483: "locales/zh-CN", 209 | 6496: "moment_locales/sq", 210 | 6511: "moment_locales/id", 211 | 6547: "moment_locales/pt-BR", 212 | 6568: "moment_locales/kn", 213 | 6606: "locales/sw-json", 214 | 6651: "locales/mk", 215 | 6655: "locales/ml", 216 | 6700: "locales/kn-json", 217 | 6709: "moment_locales/hi", 218 | 6884: "moment_locales/ar-DZ", 219 | 6920: "moment_locales/lt", 220 | 6933: "locales/en", 221 | 6953: "locales/pt", 222 | 7020: "locales/ko-json", 223 | 7055: "locales/nl-json", 224 | 7072: "locales/az", 225 | 7074: "moment_locales/kk", 226 | 7102: "locales/bg", 227 | 7162: "locales/ro", 228 | 7163: "locales/sk-json", 229 | 7205: "lazy_loaded_high_priority_components", 230 | 7216: "locales/de", 231 | 7315: "moment_locales/da", 232 | 7334: "locales/fr-json", 233 | 7386: "moment_locales/fi", 234 | 7494: "locales/en-json", 235 | 7542: "locales/zh-TW", 236 | 7626: "locales/sl-json", 237 | 7654: "locales/uz-json", 238 | 7662: "moment_locales/fa", 239 | 7728: "moment_locales/bn", 240 | 7739: "moment_locales/ms", 241 | 7749: "locales/nb", 242 | 7920: "locales/zh-HK-json", 243 | 7938: "locales/lv-json", 244 | 7964: "bootstrap_main", 245 | 8054: "locales/ar", 246 | 8117: "moment_locales/uz-LATN", 247 | 8132: "moment_locales/pa-IN", 248 | 8288: "locales/af-json", 249 | 8292: "locales/ru", 250 | 8295: "vendors~lazy_loaded_high_priority_components~lazy_loaded_low_priority_components", 251 | 8598: "locales/vi", 252 | 8606: "locales/hi-json", 253 | 8628: "locales/pl", 254 | 8634: "moment_locales/ta", 255 | 8678: "moment_locales/en-AU", 256 | 8700: "locales/bn", 257 | 8799: "moment_locales/fr-CH", 258 | 8801: "locales/ar-json", 259 | 8945: "locales/ro-json", 260 | 8962: "locales/tr-json", 261 | 9116: "moment_locales/pt", 262 | 9227: "moment_locales/en-GB", 263 | 9289: "moment_locales/ar-TN", 264 | 9313: "moment_locales/tr", 265 | 9488: "lazy_loaded_high_priority_components~lazy_loaded_low_priority_components", 266 | 9545: "moment_locales/mk", 267 | 9566: "locales/pl-json", 268 | 9599: "locales/et-json", 269 | 9613: "locales/fi", 270 | 9626: "locales/da-json", 271 | 9646: "moment_locales/ar-SA", 272 | 9682: "moment_locales/uk", 273 | 9719: "locales/kk", 274 | 9737: "locales/sq", 275 | 9750: "locales/nl", 276 | 9765: "moment_locales/fr-CA", 277 | 9789: "locales/fi-json", 278 | 9815: "locales/pa", 279 | 9817: "moment_locales/ca", 280 | 9911: "locales/ms-json", 281 | 9995: "locales/ar-XB", 282 | 9999: "locales/fa" 283 | }[e] || e) + "." + { 284 | 88: "0fe95a85cfaf2758728a", 285 | 155: "fd23f59459191eb15692", 286 | 165: "93a7fb1c779c3fa20541", 287 | 239: "d832e68824d797594421", 288 | 248: "24e7ce27c106f5634c91", 289 | 275: "abd28a3a814336b76ce4", 290 | 319: "83cbe9831383610b7fdc", 291 | 673: "ea2332a95a5bb56dc8ae", 292 | 677: "55d7841c07166b488b7a", 293 | 792: "c8b0e52d6a31d597e2d8", 294 | 820: "23d135405e453ac59776", 295 | 887: "b5843855a4b1cfcd612e", 296 | 906: "757a82c6ddbc6d28ad47", 297 | 907: "e2feec89e0f5779734eb", 298 | 951: "81c8248690c3bee6b89b", 299 | 1055: "1148c38ebfc9461ef42c", 300 | 1069: "9b20d36ab6457d7240b9", 301 | 1081: "3d40501389d5400a2c0c", 302 | 1204: "a7795f266190ee4888dd", 303 | 1234: "8431a9334b8f7d7a9a49", 304 | 1244: "7c7cce7bde23bfb90486", 305 | 1248: "b75703dc0cb0f363ce32", 306 | 1381: "1bd84052102c0eebfe3d", 307 | 1389: "a1b86c1bdd6085ef18ff", 308 | 1473: "c6a578a0f882665ccfce", 309 | 1505: "12a73233b91e2daa4ed6", 310 | 1520: "96c8b7c223ac076145c0", 311 | 1529: "c1dd074551ea1fcf7be1", 312 | 1592: "0162226b92bbdcb60ab9", 313 | 1628: "f68d496ca600faaada5b", 314 | 1702: "1f1eb49c3fa9aea80ccf", 315 | 1770: "4bae0dff5872377fc7f5", 316 | 1791: "5d00d5442a0b32975cd9", 317 | 1967: "b31321e5a588eb4aff81", 318 | 1992: "b8422b30842307551651", 319 | 2017: "25389f8f2f5a19c26478", 320 | 2023: "58fd9b1d7ca7e6232553", 321 | 2091: "83e207a12ddfcb367f42", 322 | 2101: "c8e7af1e3df9523b5d83", 323 | 2135: "6568da0c02f23009a0ff", 324 | 2394: "fe9d41487fadadf19a5a", 325 | 2422: "52fdba749be5c673ba20", 326 | 2445: "7afc6c4e863b0ff716d7", 327 | 2556: "615618d278fcb70b9157", 328 | 2619: "f942e320640c0162112e", 329 | 2739: "d5641cbdf4ef248f0112", 330 | 2771: "8fed762e3f437e6c7ba4", 331 | 2776: "b87d45215fd3a1ecafe1", 332 | 2790: "0022d28f7a056c25695a", 333 | 2830: "0262317c35de5facdd3a", 334 | 2944: "9cfb672758b5927b9b31", 335 | 2957: "458f6a3df28a64ebf1a7", 336 | 2966: "60849ece5618cb0cf09a", 337 | 2967: "362478e5832aab688048", 338 | 2974: "08cac1e0a1538c215d2f", 339 | 2979: "52fcca7fb9e57d1beef6", 340 | 3004: "64ad3245b85a972ed12b", 341 | 3017: "534f6909aa3db3adaaa5", 342 | 3047: "59fba06a85f8e7691979", 343 | 3113: "9ddd84a938cb211b9477", 344 | 3370: "7ce9f5f4d6cbd1bb4443", 345 | 3421: "546b58d96147e07bbafa", 346 | 3422: "5aacc295735c44379936", 347 | 3501: "ebfd88cb856507d33d2a", 348 | 3539: "25b67b4705a74630fb56", 349 | 3565: "b2a178e055a6ffef8fe7", 350 | 3569: "cb41d71c20427b9ac758", 351 | 3721: "53db1f0b64aa334ce9da", 352 | 3722: "41e768bfa2aa5a2520b8", 353 | 3748: "0787cfbffd5dbf589a49", 354 | 3770: "cdf94478824fc927dc67", 355 | 3853: "9007042fa9356179f299", 356 | 3892: "c0f28e17ef21ad0b5a30", 357 | 3934: "06d983df1641abe18dcd", 358 | 3998: "e150e12728eb5bdd499f", 359 | 4046: "732f54324513f3078d7e", 360 | 4132: "7faa70151aaba9901acd", 361 | 4169: "117da77847a8aad558b7", 362 | 4259: "ee46613385ea9bcc9a70", 363 | 4260: "5893bc57c14688e0235c", 364 | 4339: "078d265cf68ba68bb2fc", 365 | 4361: "85ee5ae55bf42a28ced1", 366 | 4451: "9cc574005d1ddf6ffc49", 367 | 4468: "3330aad871a099a01520", 368 | 4473: "fb2a5df5221f9cf5adf2", 369 | 4616: "348e57fa93cc3320c3e8", 370 | 4680: "656c9f1358a26db8ef5d", 371 | 4708: "43e606f89d1438bb836e", 372 | 4739: "e7089a12e030c2a7740a", 373 | 4768: "98b4c10b45ad5abe6975", 374 | 4771: "2a2d81c7502dd7b5216f", 375 | 4794: "68c5449a30f9800625b1", 376 | 4815: "57e278f8f34ad27827d7", 377 | 4818: "4b55fd4538f536760276", 378 | 4853: "7fd5a0f706e447718fca", 379 | 4873: "0494cc67efdfe9f81165", 380 | 4980: "88275de5b031b65f02dc", 381 | 5027: "de975a0a0955aca74cc9", 382 | 5125: "824a10ee19179e755fbd", 383 | 5128: "4349cd0fa9dbaa541de3", 384 | 5170: "cdb251f1f98085c1d39c", 385 | 5179: "40b8618e121ba96c086b", 386 | 5182: "b468a4fd895a42055d52", 387 | 5211: "49ef4442675cc104fdef", 388 | 5247: "4dcdd410752430c77a68", 389 | 5282: "31467173492e95981b34", 390 | 5315: "624b6415f12ff5dea8e9", 391 | 5377: "a49fd012f0a1fae75e4e", 392 | 5443: "32ca517ebc6ae568079a", 393 | 5512: "de0add3e0e99c64f7309", 394 | 5608: "a87508c2769b6db3a659", 395 | 5632: "9c7dcd129c695bbb2c24", 396 | 5650: "dc59025134ec228e9da5", 397 | 5671: "bafe64d2ade59a1cdd15", 398 | 5708: "5a418e9a62b273b180a6", 399 | 5729: "f66c92dd6a4a75427f54", 400 | 5740: "b13c09008e768b87eff3", 401 | 5790: "9dd140c0c794c6d993a7", 402 | 5862: "b9b860d9df89d21ebc49", 403 | 5881: "ec7c008b558749467d24", 404 | 5955: "be1860e73edfba23d140", 405 | 5959: "7137d0039d6f44600aba", 406 | 5965: "739dd3227233835d66d3", 407 | 6032: "bccd4187d3396b3d50c7", 408 | 6038: "89f2a04fcba20cce3db5", 409 | 6098: "62e75d820f33a05b067e", 410 | 6163: "1fb662c3e9270cc9afff", 411 | 6282: "95e2e311cceae5491629", 412 | 6293: "33e9bd7ba6efdea3273c", 413 | 6331: "e2639de666c8ddb4c253", 414 | 6352: "c53bdffbefee8c18f4d8", 415 | 6365: "85347d3c9152880e5459", 416 | 6483: "28cbc0e102338ce7a6ba", 417 | 6496: "edaf0fbff256f1ff24b0", 418 | 6511: "65ead3da9b608e7d6244", 419 | 6547: "0f0ddf3cecd2fb5016e5", 420 | 6568: "fca20c539a28c8805726", 421 | 6606: "d7c5b0478ddeb73f78a6", 422 | 6651: "25a7910d8d25e7b8e577", 423 | 6655: "7866308ddbe565e81fe6", 424 | 6700: "0e1f50faa2a5b4020ca1", 425 | 6709: "f3ea45fa423a925f6fd2", 426 | 6801: "9d005c194f06afd54289", 427 | 6884: "37c2493c1b20c4fcb765", 428 | 6920: "5e3c1daecff112dac5f7", 429 | 6933: "b8b5c579eeb25c8c70ad", 430 | 6953: "55287593f2c2a95f5d50", 431 | 7020: "0533eb0b19a1c603894a", 432 | 7055: "2cbb0f18c20963fb08a0", 433 | 7072: "ddf29242e3a2bd56c5ff", 434 | 7074: "4b629c2ab0992918e3fc", 435 | 7102: "eec3ba2841cd3f05d3a4", 436 | 7162: "3cd66f9b30720ea24326", 437 | 7163: "ac2e118301cdf1751516", 438 | 7205: "848a0efeb72cb0c66cff", 439 | 7216: "98766fd8c753b1d1a40d", 440 | 7315: "452c45210a3cf5fd8f3b", 441 | 7334: "9327eb254ed6a6b76045", 442 | 7386: "5c03655a00dde9807e4b", 443 | 7494: "3502305bdcc68358f1ae", 444 | 7542: "80da24f0dfa1d84522ab", 445 | 7626: "1518868413beee6a52df", 446 | 7654: "ee2b33004d8892aa057f", 447 | 7662: "471a0023c83377170f6a", 448 | 7728: "3c394a08e77be7dda173", 449 | 7739: "9692e22766ee7855ca38", 450 | 7749: "6d0b768b1c528c70e2d4", 451 | 7920: "e56b99ad3f09e2e10706", 452 | 7938: "4fbe825a03d10b036dc6", 453 | 7964: "c62fbbc905c14131281e", 454 | 8054: "b4c2ca8b24e9e40666a6", 455 | 8117: "efe51522cd6c58e85c22", 456 | 8132: "7fcc95ecf5b8ca57690b", 457 | 8288: "49c02defe7920d1a1900", 458 | 8292: "5bdeccb24163a2e395bf", 459 | 8295: "b6bfad225483e6d4abb9", 460 | 8578: "9ada29005e4bffbcea54", 461 | 8598: "2526246daea184e87a76", 462 | 8606: "25cd52b470c3aae9b338", 463 | 8628: "2e9ce16b9c1de498fa9b", 464 | 8634: "723b489842ff8e8b22d8", 465 | 8678: "2ed99a24ca30b04c6090", 466 | 8700: "8fdad62657e2b4d3ba32", 467 | 8799: "25d9eab9f465d3f713e0", 468 | 8801: "4daf55985cf5ed8c3b69", 469 | 8945: "6161265d60631c95c3a5", 470 | 8962: "b1c0ae548ecd17de08ff", 471 | 9116: "215029cfbea8c785c1e7", 472 | 9227: "1956b2b30e98812cc5cb", 473 | 9289: "d37c589c8d66bbc2adeb", 474 | 9313: "d785c5094ddd778054e5", 475 | 9488: "ad08b3f8f08a23546ea9", 476 | 9545: "b63d96194bf4fcff122a", 477 | 9566: "ee7b764ede1c4c2a18de", 478 | 9599: "4b67ae581c85a6cf6cd2", 479 | 9613: "1e1cb8d5e33bcee17508", 480 | 9626: "d7ff59af4f22e87b2c27", 481 | 9646: "edf30e0eeade1450698c", 482 | 9682: "1bbacc26ec9ff0efafff", 483 | 9719: "d2ed873d734bcdf50605", 484 | 9737: "a70effd1c72e2d75fb48", 485 | 9750: "294aa31bd4d4463fa5f2", 486 | 9765: "d59390277327cefe8b13", 487 | 9789: "4708336c0ada8a34f3d7", 488 | 9815: "5af284b732f16e1a063d", 489 | 9817: "2d8acd348b0498b326e9", 490 | 9911: "94089f0df43c868ba4a2", 491 | 9995: "36d50282356bea448ad9", 492 | 9999: "1b64f4de8bbd7415e68a" 493 | }[e] + ".js"), 494 | f.miniCssF = e=>({ 495 | 275: "lazy_loaded_low_priority_components", 496 | 7205: "lazy_loaded_high_priority_components", 497 | 7964: "bootstrap_main", 498 | 9488: "lazy_loaded_high_priority_components~lazy_loaded_low_priority_components" 499 | }[e] + "." + { 500 | 275: "5ce8b3a67bcb380b7c20", 501 | 7205: "d5bd1a799da6861a7f90", 502 | 7964: "4d3d9a9e6d89a20cf9e1", 503 | 9488: "bdc40abd622062cd88d1" 504 | }[e] + ".css"), 505 | f.g = function() { 506 | if ("object" == typeof globalThis) 507 | return globalThis; 508 | try { 509 | return this || new Function("return this")() 510 | } catch (e) { 511 | if ("object" == typeof window) 512 | return window 513 | } 514 | }(), 515 | f.hmd = e=>((e = Object.create(e)).children || (e.children = []), 516 | Object.defineProperty(e, "exports", { 517 | enumerable: !0, 518 | set: ()=>{ 519 | throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: " + e.id) 520 | } 521 | }), 522 | e), 523 | f.o = (e,a)=>Object.prototype.hasOwnProperty.call(e, a), 524 | l = {}, 525 | o = "whatsapp-web-client:", 526 | f.l = (e,a,c,s)=>{ 527 | if (l[e]) 528 | l[e].push(a); 529 | else { 530 | var d, b; 531 | if (void 0 !== c) 532 | for (var t = document.getElementsByTagName("script"), n = 0; n < t.length; n++) { 533 | var r = t[n]; 534 | if (r.getAttribute("src") == e || r.getAttribute("data-webpack") == o + c) { 535 | d = r; 536 | break 537 | } 538 | } 539 | d || (b = !0, 540 | (d = document.createElement("script")).charset = "utf-8", 541 | d.timeout = 120, 542 | f.nc && d.setAttribute("nonce", f.nc), 543 | d.setAttribute("data-webpack", o + c), 544 | d.src = e), 545 | l[e] = [a]; 546 | var m = (a,c)=>{ 547 | d.onerror = d.onload = null, 548 | clearTimeout(i); 549 | var o = l[e]; 550 | if (delete l[e], 551 | d.parentNode && d.parentNode.removeChild(d), 552 | o && o.forEach((e=>e(c))), 553 | a) 554 | return a(c) 555 | } 556 | , i = setTimeout(m.bind(null, void 0, { 557 | type: "timeout", 558 | target: d 559 | }), 12e4); 560 | d.onerror = m.bind(null, d.onerror), 561 | d.onload = m.bind(null, d.onload), 562 | b && document.head.appendChild(d) 563 | } 564 | } 565 | , 566 | f.r = e=>{ 567 | "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { 568 | value: "Module" 569 | }), 570 | Object.defineProperty(e, "__esModule", { 571 | value: !0 572 | }) 573 | } 574 | , 575 | f.nmd = e=>(e.paths = [], 576 | e.children || (e.children = []), 577 | e), 578 | f.p = "/", 579 | s = e=>new Promise(((a,c)=>{ 580 | var l = f.miniCssF(e) 581 | , o = f.p + l; 582 | if (((e,a)=>{ 583 | for (var c = document.getElementsByTagName("link"), l = 0; l < c.length; l++) { 584 | var o = (d = c[l]).getAttribute("data-href") || d.getAttribute("href"); 585 | if ("stylesheet" === d.rel && (o === e || o === a)) 586 | return d 587 | } 588 | var s = document.getElementsByTagName("style"); 589 | for (l = 0; l < s.length; l++) { 590 | var d; 591 | if ((o = (d = s[l]).getAttribute("data-href")) === e || o === a) 592 | return d 593 | } 594 | } 595 | )(l, o)) 596 | return a(); 597 | ((e,a,c,l)=>{ 598 | var o = document.createElement("link"); 599 | o.rel = "stylesheet", 600 | o.type = "text/css", 601 | o.onerror = o.onload = s=>{ 602 | if (o.onerror = o.onload = null, 603 | "load" === s.type) 604 | c(); 605 | else { 606 | var d = s && ("load" === s.type ? "missing" : s.type) 607 | , b = s && s.target && s.target.href || a 608 | , t = new Error("Loading CSS chunk " + e + " failed.\n(" + b + ")"); 609 | t.code = "CSS_CHUNK_LOAD_FAILED", 610 | t.type = d, 611 | t.request = b, 612 | o.parentNode.removeChild(o), 613 | l(t) 614 | } 615 | } 616 | , 617 | o.href = a, 618 | document.head.appendChild(o) 619 | } 620 | )(e, o, a, c) 621 | } 622 | )), 623 | d = { 624 | 3666: 0 625 | }, 626 | f.f.miniCss = (e,a)=>{ 627 | d[e] ? a.push(d[e]) : 0 !== d[e] && { 628 | 275: 1, 629 | 7205: 1, 630 | 7964: 1, 631 | 9488: 1 632 | }[e] && a.push(d[e] = s(e).then((()=>{ 633 | d[e] = 0 634 | } 635 | ), (a=>{ 636 | throw delete d[e], 637 | a 638 | } 639 | ))) 640 | } 641 | , 642 | (()=>{ 643 | var e = { 644 | 3666: 0 645 | }; 646 | f.f.j = (a,c)=>{ 647 | var l = f.o(e, a) ? e[a] : void 0; 648 | if (0 !== l) 649 | if (l) 650 | c.push(l[2]); 651 | else if (3666 != a) { 652 | var o = new Promise(((c,o)=>l = e[a] = [c, o])); 653 | c.push(l[2] = o); 654 | var s = f.p + f.u(a) 655 | , d = new Error; 656 | f.l(s, (c=>{ 657 | if (f.o(e, a) && (0 !== (l = e[a]) && (e[a] = void 0), 658 | l)) { 659 | var o = c && ("load" === c.type ? "missing" : c.type) 660 | , s = c && c.target && c.target.src; 661 | d.message = "Loading chunk " + a + " failed.\n(" + o + ": " + s + ")", 662 | d.name = "ChunkLoadError", 663 | d.type = o, 664 | d.request = s, 665 | l[1](d) 666 | } 667 | } 668 | ), "chunk-" + a, a) 669 | } else 670 | e[a] = 0 671 | } 672 | , 673 | f.O.j = a=>0 === e[a]; 674 | var a = (a,c)=>{ 675 | var l, o, [s,d,b] = c, t = 0; 676 | for (l in d) 677 | f.o(d, l) && (f.m[l] = d[l]); 678 | if (b) 679 | var n = b(f); 680 | for (a && a(c); t < s.length; t++) 681 | o = s[t], 682 | f.o(e, o) && e[o] && e[o][0](), 683 | e[s[t]] = 0; 684 | return f.O(n) 685 | } 686 | , c = self.webpackChunkwhatsapp_web_client = self.webpackChunkwhatsapp_web_client || []; 687 | c.forEach(a.bind(null, 0)), 688 | c.push = a.bind(null, c.push.bind(c)) 689 | } 690 | )() 691 | } 692 | )({}); 693 | //# sourceMappingURL=https://web.whatsapp.com/runtime.91a58a189a5093ecc0b0.js.map 694 | --------------------------------------------------------------------------------