efront 4.21.0 → 4.21.3

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.
@@ -133,8 +133,11 @@ var readFile = function (names, then) {
133
133
 
134
134
  readingCount++;
135
135
  var errorcount = 0;
136
- var ok = function (res) {
137
- responseTree[name] = res;
136
+ var ok = function (text) {
137
+ if (!/\~/.test(name)) {
138
+ "use ./#decrypt_.js";
139
+ }
140
+ responseTree[name] = text;
138
141
  flushTree(loadingTree, key);
139
142
  clearTimeout(flush_to_storage_timer);
140
143
  flush_to_storage_timer = setTimeout(saveResponseTreeToStorage, 200);
@@ -246,6 +249,7 @@ var killCircle = function () {
246
249
  var multiModules = Object.create(null);
247
250
  // -->
248
251
  var hasOwnProperty = {}.hasOwnProperty;
252
+ "use ./#decrypt.js";
249
253
  var loadModule = function (url, then, prebuilds = {}) {
250
254
  var name = url.replace(/[\*~][\s\S]*$/, '');
251
255
  if (/^(?:module|exports|define|import_meta|require|window|global|undefined)$/.test(name)) return then();
@@ -340,11 +344,7 @@ var loadModule = function (url, then, prebuilds = {}) {
340
344
  }
341
345
  };
342
346
  var toRem = text => pixelDecoder && typeof text === 'string' ? text.replace(/(\:\s*)?\b((?:\d*\.)?\d+)px(\s*\))?/ig, (m, h, d, quote) => (h || "") + (d !== '1' ? h && quote ? renderPixelRatio * d + "pt" : pixelDecoder(d) : renderPixelRatio > 1 ? ".78pt" : 0.78 / devicePixelRatio + "pt") + (quote || "")) : text;
343
- "use ./#decrypt.js";
344
347
  var getArgs = function (text, aftfix) {
345
- if (!aftfix || /^\*/.test(aftfix)) {
346
- "use ./#decrypt_.js";
347
- }
348
348
  var args, functionBody;
349
349
  //依赖项名称部分的长度限制为36*36*18=23328
350
350
  var doublecount = parseInt(text.slice(0, 3), 36);
@@ -509,7 +509,6 @@ var createModule = function (exec, originNames, compiledNames, prebuilds = {}) {
509
509
  return exec.apply(_this, args);
510
510
  });
511
511
  };
512
-
513
512
  var init = function (url, then, prebuilds, keeppage) {
514
513
  // then = bindthen(then);
515
514
  var key = keyprefix + url;
@@ -901,4 +900,4 @@ var onload = function () {
901
900
  hook(--requires_count);
902
901
  };
903
902
  if (!document || document.body) onload();
904
- else window.onload = onload;
903
+ else window.onload = onload;
@@ -0,0 +1,27 @@
1
+ function* combgen() {
2
+ var total = 1;
3
+ var argsList = Array.prototype.map.call(arguments, a => {
4
+ total *= a.length;
5
+ return a;
6
+ });
7
+ var temp = total;
8
+ var ratioList = argsList.map(a => temp = temp / a.length);
9
+ var i = 0;
10
+ for (var cx = 0, dx = total; cx < dx; cx++) {
11
+ var temp = cx;
12
+ var res = yield argsList.map(function (a, cx) {
13
+ var index = temp / ratioList[cx] | 0;
14
+ temp = temp - index * ratioList[cx];
15
+ return a[index];
16
+ });
17
+ if (res === false) {
18
+ i++;
19
+ if (i > argsList.length) break;
20
+ var tx = argsList[argsList.length - i].length;
21
+ cx += tx - cx % tx - 1;
22
+ }
23
+ else {
24
+ i = 0;
25
+ }
26
+ }
27
+ }
@@ -891,17 +891,14 @@ var data = {
891
891
  },
892
892
  fromApi(api, params, parse) {
893
893
  var p = privates.fromApi(api, params);
894
- if (isEmpty(params)) p.id = api.id;
895
894
  return this.createResponse(p, parse);
896
895
  },
897
896
  postURL(url, data, parse) {
898
897
  var p = privates.loadIgnoreConfig("post", url, data);
899
- p.id = url;
900
898
  return this.createResponse(p, parse);
901
899
  },
902
900
  fromURL(url, parse) {
903
901
  var p = privates.loadIgnoreConfig('get', url);
904
- p.id = url;
905
902
  return this.createResponse(p, parse);
906
903
  },
907
904
  createResponse(p, parse) {
@@ -1170,6 +1167,7 @@ var fireListener = function (instanceId, data) {
1170
1167
  };
1171
1168
  data.setItem = data.setInstance;
1172
1169
  data.getItem = data.getInstance;
1170
+ data.seekResponse = seekResponse;
1173
1171
  data.removeItem = data.removeInstance;
1174
1172
  extend(dataSourceMap, loadInstance(localStorage, sourceDataId));
1175
1173
  extend(dataSourceMap, loadInstance(sessionStorage, sourceDataId));
@@ -1 +1 @@
1
- Object.assign;
1
+ &extend;
@@ -4,7 +4,7 @@ class Generator {
4
4
  this.exec = f.bind(this, this.return.bind(this), this.throw.bind(this), function (value, next) {
5
5
  this.exec = next;
6
6
  this.value = value;
7
- });
7
+ }.bind(this));
8
8
  };
9
9
  throw(e) {
10
10
  delete this.exec;
@@ -16,7 +16,7 @@ function Main(dataid, datapath, titleid) {
16
16
  zimoli.go(datapath, s);
17
17
  }
18
18
  },
19
- png: img,
19
+ png: pic,
20
20
  config: {},
21
21
  player: kugou$player,
22
22
  datas: []
@@ -5,7 +5,7 @@ function main(elem) {
5
5
  elem = elem || document.createElement("song");
6
6
  var $scope = {
7
7
  filterTime,
8
- png: img,
8
+ png: pic,
9
9
  bg,
10
10
  play(s) {
11
11
  if (!s) s = this.song.items ? this.song.items[0] : this.song;
@@ -19,6 +19,9 @@ function decodeHttpResponse(response) {
19
19
  default:
20
20
  console.warn(i18n`内容格式不支持:`, response.headers["content-encoding"]);
21
21
  }
22
- if (decoder) response = response.pipe(decoder);
22
+ if (decoder) {
23
+ delete headers["content-encoding"];
24
+ response = response.pipe(decoder);
25
+ }
23
26
  return response;
24
27
  }
@@ -1,4 +1,5 @@
1
1
  return globalThis.localStorage || {
2
2
  getItem() { },
3
- setItem() { }
3
+ setItem() { },
4
+ removeItem() { },
4
5
  }
@@ -1 +1 @@
1
- return globalThis.sessionStorage || { getItem() { }, setItem() { } };
1
+ return globalThis.sessionStorage || { getItem() { }, setItem() { }, removeItem() { } };
@@ -4,7 +4,7 @@ var setsrc = function (src) {
4
4
  });
5
5
  };
6
6
 
7
- function img() {
7
+ function main() {
8
8
  var image = document.createElement("png");
9
9
  care(image, setsrc);
10
10
  return image;
@@ -34,7 +34,7 @@ extend(renderDefaults, {
34
34
  delete: drop,
35
35
  close: drop,
36
36
  remove: drop,
37
- pic: img,
37
+ pic,
38
38
  image,
39
39
  back,
40
40
  success,
@@ -20,7 +20,7 @@
20
20
  <mask></mask>
21
21
  <model -if="!isEmpty(f.key)" :field=f :data=d readonly></model>
22
22
  <template -else>&nbsp;</template>
23
- <a on-click="o.do(d)" -if="isEmpty(f.key)&&f.options&&(!o.when||o.when(d))"
23
+ <a on-click="o.do(d,event)" -if="isEmpty(f.key)&&f.options&&(!o.when||o.when(d))"
24
24
  _type="o.type instanceof Function?o.type(d):o.type" -repeat="o in f.options">
25
25
  <span -text="o.name instanceof Function?o.name(d):o.name"></span>
26
26
  </a>
@@ -136,9 +136,6 @@ function go(pagepath, args, history_name, oldpagepath) {
136
136
  if (realpath.length > 1) var [pgpath, args0] = realpath;
137
137
  else pgpath = pagepath;
138
138
  setZimoliParams(pagepath, { data: args, from: oldpagepath, options, roles, id });
139
- prepare(pgpath, function (res) {
140
- if (!res.roles || res.roles === true) res.roles = !!roles;
141
- });
142
139
  if (!page_generators[pgpath]) {
143
140
  return zimoli(pagepath, args, history_name, oldpagepath);
144
141
  }
@@ -349,36 +346,27 @@ function prepare(pgpath, ok) {
349
346
  }
350
347
  };
351
348
  var emit = function (pg) {
352
- if (pg) {
353
- page_generators[pgpath] = {
354
- pg,
355
- roles,
356
- state,
357
- with: _with_elements,
358
- onback: _pageback_listener,
359
- prepares
360
- };
361
- }
349
+ page_generators[pgpath] = {
350
+ pg,
351
+ roles,
352
+ state,
353
+ with: _with_elements,
354
+ onback: _pageback_listener,
355
+ prepares
356
+ };
362
357
  var res = page_generators[pgpath];
363
358
  var emiters = loading_tree[pgpath];
364
359
  delete loading_tree[pgpath];
365
- if (emiters) {
366
- var noRoles = !res.roles;
367
- if (noRoles && res.roles) {
368
- prepare(user.loginPath, () => emit());
369
- return;
370
- }
371
- while (emiters.length) {
372
- var ok = emiters.shift();
373
- if (isFunction(ok)) {
374
- ok(res);
375
- }
360
+ if (emiters) while (emiters.length) {
361
+ var ok = emiters.shift();
362
+ if (isFunction(ok)) {
363
+ ok(res);
376
364
  }
377
365
  }
366
+
378
367
  };
379
368
  return init(pgpath, function (pg) {
380
- if (!pg) return;
381
- extendIfNeeded(pg, state);
369
+ if (pg) extendIfNeeded(pg, state);
382
370
  if (roles) return prepare(user.loginPath, () => emit(pg));
383
371
  emit(pg);
384
372
  }, state, true);
@@ -402,6 +390,7 @@ function create(pagepath, args, from, needroles) {
402
390
  }
403
391
  return alert(i18n`没有权限!`, 0);
404
392
  }
393
+ if (!pg) return;
405
394
  var _with_length = _with_elements.length;
406
395
  state.onback = function (handler) {
407
396
  _pageback_listener = handler;
@@ -442,7 +431,7 @@ function create(pagepath, args, from, needroles) {
442
431
  var zimoliid = 0, zimoliad = 0;
443
432
  function zimoli(pagepath, args, history_name, oldpagepath) {
444
433
  if (arguments.length === 0) {
445
- if (zimoliid !== zimoliad) return;
434
+ if (zimoliid !== zimoliad && zimoli.caller === go) return;
446
435
  history_name = current_history;
447
436
  var _history = history[history_name] || [];
448
437
  root_path = _history[0] || "/main";
@@ -1 +1,5 @@
1
+ // 之前一直以为赤匪习是中国走向衰败的罪魁祸首,可是随着了解的史料越来越多,越发觉得之前以为的是错的,赤匪习不过是泱泱赤匪的一个代表,赤匪从根上就是长了四只脚的土匪,他们任人唯亲,见利忘义,睚眦必报,是盘踞在华夏大地的邪恶力量的化身。他们不辨是非,做事一轰而上,唯上级马屁是瞻,遇到问题首先想到的是封锁消息,问题爆发又会选择性失聪,顾左右而言其他。
2
+ // 赤匪犯境时,河南大学为了保护师资,举校万里迁徙,赤匪看不见这其中的民族大义,篡权后将将北大清华那种墙头草视为香饽饽,倾斜各种资源重点培养,助长他们的墙头草作风。你看那清华北大,为国外培养了多少高科技人才啊,他们之前是墙头草,如今也还是墙头草。
3
+ // 儿时那清凉可口的井水,如今散发着浓郁的农药味。儿时那干净透亮的空气,晴天可以看到白云,阴天可以看到乌云,晚上还有月牙和群星同晖,如今已长年雾蒙蒙一片。可怜我华夏大地被赤匪汲取精华拱手送人,忍受各国糟粕还要强颜欢笑。
4
+
1
5
  return "\u0080";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "efront",
3
- "version": "4.21.0",
3
+ "version": "4.21.3",
4
4
  "description": "一个开发环境,提供一种自由的前端开发模式,也可作为辅助工具使用。",
5
5
  "main": "public/efront.js",
6
6
  "directories": {