efront 4.35.6 → 4.35.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/apps/_index.html +41 -41
  2. package/apps/blank/index.html +20 -20
  3. package/apps/noice/index.html +42 -42
  4. package/apps/pivot/menu.yml +1 -6
  5. package/apps/pivot//344/270/273/351/241/265.html +42 -42
  6. package/coms/basic/JSAM.js +259 -259
  7. package/coms/basic/Matrix.js +1 -1
  8. package/coms/basic/check.js +42 -42
  9. package/coms/basic/color.js +696 -696
  10. package/coms/basic/crc.js +39 -39
  11. package/coms/basic/getIndexFromOrderedArray.js +39 -39
  12. package/coms/basic/isObject.js +3 -3
  13. package/coms/basic/keys.js +4 -4
  14. package/coms/basic/lazy.js +78 -78
  15. package/coms/basic/math.js +3 -3
  16. package/coms/basic/refilm.js +96 -96
  17. package/coms/basic/saveToOrderedArray.js +11 -11
  18. package/coms/compile/autoeval.js +8 -2
  19. package/coms/compile/autoeval_test.js +10 -8
  20. package/coms/compile/scanner.js +653 -653
  21. package/coms/compile/scanner2.js +0 -23
  22. package/coms/compile/wraphtml.js +1 -1
  23. package/coms/compile//347/256/227/345/274/217.js +1 -1
  24. package/coms/compile//347/256/227/345/274/217_test.js +4 -2
  25. package/coms/docs/getMimeData_test.js +19 -19
  26. package/coms/docs/md5.js +173 -173
  27. package/coms/frame/chat.js +2 -1
  28. package/coms/frame/top.less +190 -190
  29. package/coms/zimoli/AudioContext_test.html +5 -5
  30. package/coms/zimoli/AudioContext_test.js +92 -92
  31. package/coms/zimoli/AudioContext_test.less +114 -114
  32. package/coms/zimoli/alert_test.js +11 -11
  33. package/coms/zimoli/bggrid-func.less +2 -2
  34. package/coms/zimoli/dispatch.js +50 -50
  35. package/coms/zimoli/drag.js +11 -6
  36. package/coms/zimoli/extendTouchEvent.js +8 -8
  37. package/coms/zimoli/fullscreen.js +52 -52
  38. package/coms/zimoli/gallery.less +13 -13
  39. package/coms/zimoli/gallery_test.html +2 -2
  40. package/coms/zimoli/gallery_test.js +14 -14
  41. package/coms/zimoli/gallery_test.less +17 -17
  42. package/coms/zimoli/getChanged.js +7 -7
  43. package/coms/zimoli/getChanges.js +13 -13
  44. package/coms/zimoli/lattice.js +109 -109
  45. package/coms/zimoli/lattice_test.less +23 -23
  46. package/coms/zimoli/moveupon.js +26 -1
  47. package/coms/zimoli/picture.less +54 -71
  48. package/coms/zimoli/refilm_test.html +41 -41
  49. package/coms/zimoli/refilm_test.less +102 -102
  50. package/coms/zimoli/xml.js +131 -131
  51. package/data/keystore/cross-cert.pem +21 -21
  52. package/data/keystore/cross-key.pem +27 -27
  53. package/package.json +1 -1
  54. package/public/efront.js +1 -1
  55. package/public//346/226/207/344/273/266/347/263/273/347/273/237//344/270/273/351/241/265.jsp +2 -2
  56. package/apps/pay/paypal.jsp +0 -0
  57. package/apps/pay/wxpay.jsp +0 -32
  58. package/apps/pivot/dht/rent.html +0 -14
  59. package/apps/pivot/dht/rent.js +0 -148
  60. package/apps/pivot/dht/rent.less +0 -46
  61. package/apps/pivot/home/desktop.xht +0 -0
  62. package/apps/pivot/shop/goods/list.xht +0 -183
  63. package/apps/pivot/shop/home.xht +0 -20
  64. package/apps/pivot/shop/mind/list.xht +0 -1
  65. package/apps/pivot/shop/order/create.xht +0 -49
  66. package/apps/pivot/shop/order/list.xht +0 -1
  67. package/apps/pivot/shop/paypal.jsp +0 -23
  68. package/apps/pivot/soft/list.html +0 -0
  69. package/apps/pivot/soft/list.js +0 -9
  70. package/apps/pivot/soft/list.less +0 -0
  71. package/coms/7z_temp/Java.js +0 -93
  72. package/coms/7z_temp/LzmaBench.java +0 -392
  73. package/coms/7z_temp/read-from-java-code.js +0 -28
  74. package/coms/7z_temp//350/257/264/346/230/216.md +0 -1
  75. package/coms/basic_/&pget.js +0 -1
  76. package/coms/basic_/&pset.js +0 -1
  77. package/coms/basic_/Proxy.js +0 -6
  78. package/coms/basic_/Reflect.js +0 -55
  79. package/coms/compile/bracket.js +0 -51
  80. package/coms/compile/bracket_test.js +0 -9
  81. package/coms/compile/createvm.js +0 -35
  82. package/coms/compile/createvm_test.js +0 -7
  83. package/coms/pivot/DB.js +0 -9
  84. package/coms/pivot/paypal-var.js +0 -1
  85. package/coms/pivot//345/225/206/345/223/201.js +0 -1
  86. /package/apps/pivot/{ticket → tick}/list.js +0 -0
File without changes
@@ -1,32 +0,0 @@
1
- <script>
2
- var host = "https://api.mch.weixin.qq.com";
3
- var auth = function (method, url, params) {
4
- var data = [];
5
- method = method.toUpperCase();
6
- if (method === 'GET') {
7
- if (typeof params === "object") params = serialize(params);
8
- if (isHandled(params)) {
9
- url += /\?/.test(url) ? "&" : "?";
10
- url += params;
11
- }
12
- params = "";
13
- }
14
- else {
15
- if (typeof params === 'object') params = JSON.stringify(params);
16
- }
17
- var mask = Math.random().toString(36).slice(2);
18
- data.push(method, url, new Date / 1000 | 0, params)
19
- data = data.join("\n") + "\n";
20
-
21
- }
22
- </script>
23
- <!doctype html>
24
- <html>
25
-
26
- <head>
27
- <title>微信js支付</title>
28
- </head>
29
-
30
- <body></body>
31
-
32
- </html>
@@ -1,14 +0,0 @@
1
- <div head>${i18n`文件`}</div>
2
- <div body>
3
- <loading -if="pending"></loading>
4
- <tree arrow #t1 -src="o in opened">
5
- <c>
6
- <span -html="o"></span>&nbsp;<a -if="o.url" -pending="testing[o.url]" @click="test(o.url,o)">${i18n`测试`}</a>
7
- </c>
8
- </tree>
9
- </div>
10
- <scrollbar target="t1"></scrollbar>
11
- <div foot>
12
- <a style="float: left" @click="testAll">${i18n`全部测试`}</a>
13
- <btn @click="addTested">${i18n`添加可用链接`}</btn>
14
- </div>
@@ -1,148 +0,0 @@
1
- var peer_id = [];
2
- for (var cx = 0, dx = 20; cx < dx; cx++)peer_id.push(256 * Math.random() | 0);
3
- peer_id = peer_id.map(a => String.fromCharCode(a)).join('');
4
- var encodeid = a => {
5
- var res = [];
6
-
7
- for (var a of a) {
8
- if (
9
- a >= 65 && a <= 90 || // A-Z
10
- a >= 97 && a <= 122 || // a-z
11
- a >= 48 && a <= 57 || // 0-9
12
- a === 45 || // -
13
- a === 46 || // .
14
- a === 95 || // _
15
- a === 126 // ~
16
- ) {
17
- res.push(String.fromCharCode(a));
18
- }
19
- else {
20
- res.push(a < 16 ? "%0" : "%", a.toString(16).toUpperCase());
21
- }
22
- }
23
- return res.join('');
24
- };
25
-
26
- var toString = function () { return this.name };
27
- var createTree = function (data, item, info) {
28
- var count = item.count;
29
- var rest = [];
30
- if (typeof data !== "object" || data === null) {
31
- console.log(data, info)
32
- var item1 = new Item({ name: String(data), info, toString });
33
- if (/^\w+%3A/.test(data)) data = decodeURI(data);
34
-
35
- Tree.appendTo(item, [item1]);
36
- if (/^(http|udp)\:/.test(data)) count++, item1.value = { name: data.replace(/^(http|udp)\:/, '<b>$&</b>'), toString, url: data, info };
37
- }
38
- else if (data instanceof ArrayBuffer || data instanceof Uint8Array) {
39
- var item1 = new Item(`buffer(${data.length || data.size})[......]`);
40
- Tree.appendTo(item, item1);
41
- }
42
- else if (data instanceof Array) {
43
- var items = data.map(o => {
44
- if (typeof o !== 'object' || o === null) {
45
- if (/^\w+%3A/.test(o)) o = decodeURI(o);
46
- var item1 = new Item(String(o));
47
- if (/^(http|udp)\:/.test(o)) count++, item1.value = { name: o.replace(/^(http|udp)\:/, '<b>$&</b>'), toString, url: o, info };
48
- return item1;
49
- }
50
- if (o instanceof Array) {
51
- var item1 = new Item(`Array(${o.length})`);
52
- item1.tab = item.tab + 1;
53
- rest.push(o, item1);
54
- return item1;
55
- }
56
- if (o instanceof ArrayBuffer || o instanceof Uint8Array) return new Item(`buffer(${data.size || data.length})[......]`);
57
- var item1 = new Item(`{}`);
58
- item1.tab = item.tab + 1;
59
- rest.push(o, item1);
60
- return item1;
61
- });
62
- Tree.appendTo(item, items);
63
- }
64
- else {
65
- var items = Object.keys(data).map(k => {
66
- var d = data[k];
67
- var item1 = new Item(k);
68
- item1.tab = item.tab + 1;
69
- rest.push(d, item1);
70
- item1.closed = true;
71
- return item1;
72
- });
73
-
74
- Tree.appendTo(item, items)
75
- }
76
- while (rest.length) {
77
- var o = rest.shift();
78
- var item1 = rest.shift();
79
- createTree(o, item1, info);
80
- count += item1.count;
81
- }
82
- item.count = count;
83
- }
84
- function main() {
85
- var page = view();
86
- page.innerHTML = template;
87
- renderWithDefaults(page, {
88
- torrents: [],
89
- loading,
90
- pending: true,
91
- tested: {},
92
- opened: new Tree,
93
- testing: {},
94
- scrollbar,
95
- tree,
96
- async load(t) {
97
- this.torrents.push(t);
98
- var item = new Item(t.info ? t.info["name.utf-8"] || t.info.name : '<span style="color:#666">(未命名)</span>');
99
- createTree(t, item, t.info);
100
- Tree.appendTo(this.opened, item);
101
- item.closed = true;
102
- },
103
-
104
- async testAll() {
105
- this.tested = {};
106
- for (var t of this.torrents) {
107
- if (t.announce in this.tested) continue;
108
- if (t.announce) await this.test(t.announce, t);
109
- if (t["announce-list"]) for (var a of t["announce-list"]) {
110
- if (a[0] in this.tested) continue;
111
- await this.test(a[0], t);
112
- }
113
- }
114
- },
115
-
116
- async test(url, info) {
117
- if (!/^http/i.test(url)) return;
118
- this.testing[url] = true;
119
- var info_hash = info.info.pieces.slice(0, 20);
120
- console.log(info_hash, encodeid(info_hash))
121
- try {
122
- var r = cross('get', url).send(serialize({ info_hash: encodeid(info_hash) }, null));
123
- r.timeout = 6000;
124
- r.responseType = 'arraybuffer';
125
- await r;
126
- r = bdecode2(r.response);
127
- console.log(r);
128
- this.tested[url] = !r["failure reason"];
129
- } catch {
130
- this.tested[url] = false;
131
- }
132
- this.testing[url] = false;
133
- render.refresh();
134
- },
135
-
136
- async addTested() {
137
- for (var k in this.tested) {
138
- if (!this.tested[k]) continue;
139
- var url = parseURL(k);
140
- await pedit.send('nodes', `name`, { name: `${url.protocol}//${url.host}${url.port ? ':' + url.port : url.port}`, host: url.host, port: url.port });
141
- render.refresh();
142
- }
143
- },
144
- });
145
- drag.on(page, page.firstChild);
146
- resize.on(page);
147
- return page;
148
- }
@@ -1,46 +0,0 @@
1
- .name {
2
- background-color: #fff;
3
- padding: 10px 20px;
4
- }
5
-
6
- .item {
7
- border: 1px solid #0003;
8
- }
9
-
10
- .announce {
11
- padding: 10px 20px;
12
- }
13
-
14
- & {
15
- height: 300px;
16
- position: absolute;
17
- }
18
-
19
- loading {
20
- margin-top: 0;
21
- position: relative;
22
- font-size: 6px;
23
- }
24
-
25
- .fail:after {
26
- color: #c24;
27
- content: "❌";
28
- }
29
-
30
- .pass:after {
31
- color: #092;
32
- content: "✔️";
33
- }
34
-
35
-
36
- tree {
37
- height: 100%;
38
-
39
- >a {
40
- background: inherit !important;
41
- }
42
- }
43
-
44
- b {
45
- color: #29c;
46
- }
File without changes
@@ -1,183 +0,0 @@
1
- <style>
2
- [g-name] {
3
- font-size: 20px;
4
- font-weight: 600;
5
- font-family: 宋体, sans-serif;
6
- padding-bottom: 20px;
7
- }
8
-
9
- [g-description] {
10
- padding: 2px 0px;
11
- color: #ccc;
12
- }
13
-
14
- [g-id] {
15
- color: #ccc;
16
- font-size: 10px;
17
- padding: 10px 0;
18
- }
19
-
20
- [price] {
21
- color: #d26;
22
- font-family: 楷书, sans-serif;
23
- font-size: 20px;
24
- float: right;
25
- }
26
-
27
- [tags] {
28
- padding: 16px 0;
29
- }
30
-
31
- [tag] {
32
- display: inline-block;
33
- padding: 0 6px;
34
- background: #666;
35
- color: #fff;
36
- font-size: 16px;
37
- vertical-align: middle;
38
- border-radius: 4px;
39
- font-family: 宋体, sans-serif;
40
- }
41
-
42
- a {
43
- font-size: 16px;
44
- }
45
-
46
- [buy] {
47
- float: right;
48
- display: block;
49
- }
50
-
51
-
52
- & {
53
- padding: 10px;
54
- height: 100%;
55
- }
56
-
57
- .goodsitem {
58
- perspective: 1200px;
59
-
60
- >[face],
61
- >[back] {
62
- transition: transform .3s;
63
- padding: 10px 20px;
64
- color: #fff;
65
- transform-style: preserve-3d;
66
- backface-visibility: hidden;
67
- overflow: hidden;
68
- border-radius: 12px;
69
- box-shadow: 0 0 10px -6px #000c;
70
-
71
- >* {
72
- position: relative;
73
- }
74
-
75
- img {
76
- position: absolute;
77
- left: 0;
78
- top: 90%;
79
- height: 120px;
80
- width: auto;
81
- margin: -60px 0;
82
- opacity: .2;
83
- }
84
-
85
-
86
- [dot] {
87
- position: absolute;
88
- color: #fff9;
89
- right: 20px;
90
- top: 10px;
91
- width: 20px;
92
- height: 20px;
93
- text-align: center;
94
- line-height: 20px;
95
- margin: 0 -10px;
96
- content: "";
97
- display: block;
98
- cursor: pointer;
99
- z-index: 1;
100
-
101
- &:active {
102
- color: #fff;
103
- }
104
- }
105
- }
106
-
107
- >[back] {
108
- position: absolute;
109
- left: 0;
110
- right: 0;
111
- top: 0;
112
- bottom: 0;
113
- transform: rotateY(180deg) rotateX(30deg);
114
- background: #333;
115
- font-family: 仿宋, sans-serif;
116
- }
117
-
118
- >[face] {
119
- background: #000;
120
- transform: rotateY(0deg) rotateX(30deg);
121
- }
122
-
123
- &.turned {
124
-
125
- [face] {
126
- transform: rotateY(180deg) rotateX(30deg);
127
- }
128
-
129
- [back] {
130
- transform: rotateY(360deg) rotateX(30deg);
131
- }
132
-
133
- }
134
- }
135
- </style>
136
- <lattice a-src="g in goods" renderid=goodslist>
137
- <padding .goodsitem -class="{turned:g.turned}">
138
- <div back a-style="g.back">
139
- <div dot @click="turn(g)">⋮</div>
140
- <div>
141
- <span g.id?></span><br />
142
- <span g.name?></span><br />
143
- <span g.description?></span>
144
- </div>
145
- <div tags -if="g.content?.length">
146
- 包含: <span tag -bind="c" -repeat="c in g.content"></span>
147
- </div>
148
- </div>
149
- <div face a-style="g.face">
150
- <img draggable="false" -src="g.logo" />
151
- <div g.id?></div>
152
- <div dot @click="turn(g)">⋮</div>
153
- <div price>
154
- ¥<span -bind=g.price.toFixed(2)></span>
155
- </div>
156
- <div g.name?> </div>
157
- <div>
158
- <a buy @click="buy(g)">购买</a>
159
- </div>
160
- <div style="clear:both"></div>
161
- </div>
162
- </padding>
163
- </lattice>
164
- <script>
165
- var goods = 商品(`,10`);
166
- var a = button;
167
- on('append')(this, function () {
168
- console.log(goodslist)
169
- });
170
- var buy = function (data) {
171
- return go('/order/create', data);
172
- };
173
- var turned = {
174
- value: false,
175
- writable: true,
176
- configurable: true,
177
- enumerable: false,
178
- };
179
- var turn = function (g) {
180
- turned.value = !g.turned;
181
- Object.defineProperty(g, 'turned', turned);
182
- };
183
- </script>
@@ -1,20 +0,0 @@
1
- <style>
2
- & {
3
- height: 100%;
4
- }
5
- </style>
6
- <template -if="serverStatus.userid">
7
- <xmenu tag #tg class="navbar" -src="m of menus">
8
- </xmenu>
9
- <container -src="tg.selected?.path"></container>
10
- </template>
11
- <template -else>${i18n`拥有注册号的用户可查看商品`}</template>
12
- <script>
13
- data.from("/:version")
14
- var xmenu = menu;
15
- var menus = [
16
- { name: i18n`商店`, path: "/shop/goods/list" },
17
- { name: i18n`订单`, path: "/order/list" },
18
- { name: i18n`留言`, path: '/mind/list' },
19
- ];
20
- </script>
@@ -1 +0,0 @@
1
- <script></script>
@@ -1,49 +0,0 @@
1
- <style>
2
- & {
3
- height: 100%;
4
- width: 100%;
5
- }
6
-
7
- [head] {
8
- span {
9
- vertical-align: top;
10
- }
11
- }
12
-
13
- [content] {
14
- display: inline-block;
15
- padding: 2px 12px;
16
- border-radius: 3px;
17
- background: #ddd;
18
- }
19
-
20
- .button {
21
- padding: 0 16px;
22
- }
23
- </style>
24
- <div head>
25
- 您正在购买<span -bind="goodsinfo.name"></span>
26
- </div>
27
- <div body>
28
- <field -src="[f,goodsinfo]" readonly -repeat="f in fields"></field>
29
- </div>
30
- <div foot>
31
- <btn @click="pay()">支付</btn>
32
- </div>
33
- <script>
34
- view(this);
35
- var goodsinfo = Object.assign({}, state.data, arguments[0]);
36
- var fields = refilm`
37
- 商品id/id gen
38
- 商品名称/name input
39
- 包含/content text
40
- 商品简述/description text
41
- 商品展示/present text
42
- `;
43
- fields[fields.length - 1].break = true;
44
- var btn = button;
45
- var pay = async function () {
46
- await data.postURL('shop/paypal/', goodsinfo);
47
- zimoli.go('/order/list');
48
- };
49
- </script>
@@ -1 +0,0 @@
1
- <script></script>
@@ -1,23 +0,0 @@
1
- <script serverside>
2
- if (req.method !== 'POST') throw i18n`请求方法错误`;
3
- var info = await readdata(req);
4
- info = JSON.parse(info);
5
- info = [].concat(info);
6
- var list = [];
7
- var cost = 0;
8
- var limit = 8796093022207.999;
9
- if (info.length > 60) throw new Error(i18n`商品数量过多,无法完成交易!`);
10
- for (var a of info) {
11
- var data = await db.get("商品", a.id);
12
- if (!deepEqual(data, a)) throw new Error(i18n`商品信息已变更,请刷新页面后重新购买!`);
13
- var p = +a.price;
14
- if (p > limit) throw new Error(i18n`商品金额过大,交易无法进行`);
15
- cost += p;
16
- if (cost > limit) throw new Error(i18n`商品总价值过大,交易无法进行`);
17
- cost = +cost.toFixed(2);
18
- list.push(a);
19
- }
20
- cost = cost.toFixed(2);
21
- var order = await db.add('订单', { list, cost });
22
- return order;
23
- </script>
File without changes
@@ -1,9 +0,0 @@
1
- var fields = refilm`
2
- *标识/key 100
3
- *应用名/name 100
4
- *是否启用/status radio [不启用/0/#ccc,启用/1/#29c]`;
5
- function main() {
6
- var page = document.createElement("一种莫名其秒的冲动_让我继续追寻");
7
- page.innerHTML = template;
8
- return page;
9
- }
File without changes
@@ -1,93 +0,0 @@
1
- var {
2
- STRAP,
3
- SPACE,
4
- COMMENT,
5
- SCOPED,
6
- STAMP,
7
- EXPRESS,
8
- skipAssignment,
9
- createScoped
10
- } = require("../compile/common");
11
- var Program = require("../compile/Program");
12
- var straps = `abstract,assert,boolean,break,byte,case,catch,char,class,const
13
- continue,default,do,double,else,enum,extends,final,finally,float,for,goto,if,implements,import
14
- instanceof,int,interface,long,native,new,package,private,protected,public,return,strictfp
15
- short,static,super,switch,synchronized,this,throw,throws,transient,try,void,volatile,while`.trim().split(/[,\s]+/);
16
- class Java extends Program {
17
- straps = straps;
18
- value_reg = /^(false|true|null)$/;
19
- transive_reg = /^(new|int|double|float|long|byte|char|const|class|instanceof|interface|return|short|void|throws?|implements|extends|import|abstract)$/;
20
- strapexp_reg = /^(new|void|class)$/;
21
- forceend_reg = /^(return|break|continue)$/;
22
- classstrap_reg = /^class$/;
23
- }
24
- var transfrom_function = function (c) {
25
- return []
26
- }
27
- var transfrom_class = function (c) {
28
- while (c && c.type !== SCOPED) c = c.next;
29
- var statics = Object.create(null);
30
- var protos = Object.create(null);
31
- var o = c.first;
32
- while (o) {
33
- var defs = Object.create(null);
34
- while (o.next && o.type === STRAP && o.next.type !== EXPRESS) {
35
- defs[o.text] = true;
36
- o = o.next;
37
- }
38
- defs.type = o.text;
39
- defs.name = o.next.text;
40
- if (defs.static) {
41
- statics[defs.name] = defs;
42
- }
43
- else {
44
- protos[defs.name] = defs;
45
- }
46
- o = o.next;
47
- if (defs.type === "class") {
48
- var [body] = transfrom_class(o);
49
- defs.body = body;
50
- o = o.next;
51
- }
52
- else if (o.type === SCOPED && o.entry === "(") {
53
- var [body] = transfrom_function(o)
54
- }
55
- else {
56
- o = skipAssignment(o);
57
- }
58
- if (o.type === STAMP && o.text === ';') o = o.next;
59
- }
60
- console.log(protos, statics)
61
- return [];
62
- }
63
- var transform = function (code) {
64
- for (var cx = 0; cx < code.length; cx++) {
65
- var c = code[cx];
66
- if (c.type === SPACE || c.type === COMMENT) continue;
67
- switch (c.text) {
68
- case "public":
69
- case "private":
70
- case "final":
71
- case "protected":
72
- code.splice(cx, 1);
73
- cx--;
74
- break;
75
- case "package":
76
- c.text = "//" + c.text;
77
- break;
78
- case "class":
79
- transfrom_class(c);
80
- break;
81
- default:
82
- // console.log(c);
83
- // throw new Error("转换失败!");
84
- }
85
- }
86
- }
87
-
88
- Java.prototype.js = function (code) {
89
- transform(code);
90
- code.relink();
91
- return code.toString();
92
- }
93
- module.exports = Java;