@shimotsuki/core 3.0.42 → 3.0.43

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.
@@ -1,6 +1,6 @@
1
1
  import e from "@babel/runtime-corejs3/core-js/global-this";
2
2
 
3
- import { AudioSource as t, _decorator as i, AudioClip as n, error as o, Node as s, director as r, log as a, Component as l, Prefab as c, instantiate as h, isValid as u, Layers as d, view as p, Widget as f, v3 as m, tween as _, Enum as y, game as g, Label as b, UIOpacity as v, Tween as C, BlockInputEvents as E, Button as S, Game as w, Director as A, assetManager as I, warn as O, AsyncDelegate as T, Asset as k, resources as R, sys as M, SpriteFrame as U, Sprite as N } from "cc";
3
+ import { AudioSource as t, _decorator as i, AudioClip as n, error as o, Node as s, director as r, log as a, Component as l, Prefab as c, instantiate as h, isValid as u, Layers as d, view as p, Widget as f, v3 as m, tween as _, Enum as g, game as y, Label as b, UIOpacity as v, Tween as C, BlockInputEvents as E, Button as S, Game as w, Director as A, assetManager as I, warn as O, AsyncDelegate as T, Asset as k, resources as R, sys as M, SpriteFrame as U, Sprite as N } from "cc";
4
4
 
5
5
  import D from "@babel/runtime-corejs3/core-js-stable/reflect/get";
6
6
 
@@ -36,17 +36,17 @@ import Z from "@babel/runtime-corejs3/core-js-stable/instance/map";
36
36
 
37
37
  import Y from "@babel/runtime-corejs3/core-js-stable/array/from";
38
38
 
39
- import ee from "@babel/runtime-corejs3/core-js-stable/date/now";
39
+ import ee from "@babel/runtime-corejs3/core-js-stable/instance/every";
40
40
 
41
- import te from "@babel/runtime-corejs3/core-js-stable/instance/every";
41
+ import { SocketConnectStatus as te } from "pitayaclient";
42
42
 
43
- import { SocketConnectStatus as ie } from "pitayaclient";
43
+ import { DEBUG as ie, WECHAT as ne, PREVIEW as oe } from "cc/env";
44
44
 
45
- import { DEBUG as ne, WECHAT as oe, PREVIEW as se } from "cc/env";
45
+ import { SocialGameClient as se } from "sgc";
46
46
 
47
- import { SocialGameClient as re } from "sgc";
47
+ import re from "crypto-es";
48
48
 
49
- import ae from "crypto-es";
49
+ import ae from "@babel/runtime-corejs3/core-js-stable/date/now";
50
50
 
51
51
  import le from "@babel/runtime-corejs3/core-js-stable/set-interval";
52
52
 
@@ -334,13 +334,13 @@ class AudioManager extends BaseManager {
334
334
  }
335
335
  }
336
336
 
337
- function ye(e, t, i, n) {
337
+ function ge(e, t, i, n) {
338
338
  var o = arguments.length, s = o < 3 ? t : n === null ? n = Object.getOwnPropertyDescriptor(t, i) : n, r;
339
339
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") s = Reflect.decorate(e, t, i, n); else for (var a = e.length - 1; a >= 0; a--) if (r = e[a]) s = (o < 3 ? r(s) : o > 3 ? r(t, i, s) : r(t, i)) || s;
340
340
  return o > 3 && s && Object.defineProperty(t, i, s), s;
341
341
  }
342
342
 
343
- function ge(e, t) {
343
+ function ye(e, t) {
344
344
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(e, t);
345
345
  }
346
346
 
@@ -670,7 +670,7 @@ class AudioSourceBaseComponent extends BaseComponent {
670
670
  }
671
671
  playAudio() {
672
672
  const {switchEffect: e, switchMusic: t} = this.cat.audio;
673
- if (!this.audioSource.playing && (this.type === Se.BGM ? t : e) && !g._paused) this.audioSource.play();
673
+ if (!this.audioSource.playing && (this.type === Se.BGM ? t : e) && !y._paused) this.audioSource.play();
674
674
  }
675
675
  onPlayEffectHandler() {}
676
676
  onStopEffectHandler() {
@@ -686,27 +686,27 @@ class AudioSourceBaseComponent extends BaseComponent {
686
686
  }
687
687
  }
688
688
 
689
- ye([ Ee({
689
+ ge([ Ee({
690
690
  tooltip: `类型:\n EFFECT 音效\n BGM 音乐`,
691
- type: y(Se)
692
- }), ge("design:type", Number) ], AudioSourceBaseComponent.prototype, "type", void 0);
691
+ type: g(Se)
692
+ }), ye("design:type", Number) ], AudioSourceBaseComponent.prototype, "type", void 0);
693
693
 
694
- ye([ Ee({
694
+ ge([ Ee({
695
695
  tooltip: "音源",
696
696
  type: n
697
- }), ge("design:type", typeof (ve = typeof n !== "undefined" && n) === "function" ? ve : Object) ], AudioSourceBaseComponent.prototype, "clip", void 0);
697
+ }), ye("design:type", typeof (ve = typeof n !== "undefined" && n) === "function" ? ve : Object) ], AudioSourceBaseComponent.prototype, "clip", void 0);
698
698
 
699
- ye([ Ee({
699
+ ge([ Ee({
700
700
  tooltip: "循环"
701
- }), ge("design:type", Boolean) ], AudioSourceBaseComponent.prototype, "loop", void 0);
701
+ }), ye("design:type", Boolean) ], AudioSourceBaseComponent.prototype, "loop", void 0);
702
702
 
703
- ye([ Ee({
703
+ ge([ Ee({
704
704
  tooltip: "音量"
705
- }), ge("design:type", Number) ], AudioSourceBaseComponent.prototype, "volume", void 0);
705
+ }), ye("design:type", Number) ], AudioSourceBaseComponent.prototype, "volume", void 0);
706
706
 
707
- ye([ Ee({
707
+ ge([ Ee({
708
708
  tooltip: "是否启用自动播放"
709
- }), ge("design:type", Boolean) ], AudioSourceBaseComponent.prototype, "playOnAwake", void 0);
709
+ }), ye("design:type", Boolean) ], AudioSourceBaseComponent.prototype, "playOnAwake", void 0);
710
710
 
711
711
  var we;
712
712
 
@@ -737,7 +737,7 @@ class AudioSourceUILayer extends UILayer {
737
737
  }
738
738
  playAudio() {
739
739
  const {switchEffect: e, switchMusic: t} = this.cat.audio;
740
- if (!this.audioSource.playing && (this.type === Se.BGM ? t : e) && !g._paused) this.audioSource.play();
740
+ if (!this.audioSource.playing && (this.type === Se.BGM ? t : e) && !y._paused) this.audioSource.play();
741
741
  }
742
742
  onPlayEffectHandler() {}
743
743
  onStopEffectHandler() {
@@ -753,27 +753,27 @@ class AudioSourceUILayer extends UILayer {
753
753
  }
754
754
  }
755
755
 
756
- ye([ Ie({
756
+ ge([ Ie({
757
757
  tooltip: `类型:\n EFFECT 音效\n BGM 音乐`,
758
- type: y(Se)
759
- }), ge("design:type", Number) ], AudioSourceUILayer.prototype, "type", void 0);
758
+ type: g(Se)
759
+ }), ye("design:type", Number) ], AudioSourceUILayer.prototype, "type", void 0);
760
760
 
761
- ye([ Ie({
761
+ ge([ Ie({
762
762
  tooltip: "音源",
763
763
  type: n
764
- }), ge("design:type", typeof (we = typeof n !== "undefined" && n) === "function" ? we : Object) ], AudioSourceUILayer.prototype, "clip", void 0);
764
+ }), ye("design:type", typeof (we = typeof n !== "undefined" && n) === "function" ? we : Object) ], AudioSourceUILayer.prototype, "clip", void 0);
765
765
 
766
- ye([ Ie({
766
+ ge([ Ie({
767
767
  tooltip: "循环"
768
- }), ge("design:type", Boolean) ], AudioSourceUILayer.prototype, "loop", void 0);
768
+ }), ye("design:type", Boolean) ], AudioSourceUILayer.prototype, "loop", void 0);
769
769
 
770
- ye([ Ie({
770
+ ge([ Ie({
771
771
  tooltip: "音量"
772
- }), ge("design:type", Number) ], AudioSourceUILayer.prototype, "volume", void 0);
772
+ }), ye("design:type", Number) ], AudioSourceUILayer.prototype, "volume", void 0);
773
773
 
774
- ye([ Ie({
774
+ ge([ Ie({
775
775
  tooltip: "是否启用自动播放"
776
- }), ge("design:type", Boolean) ], AudioSourceUILayer.prototype, "playOnAwake", void 0);
776
+ }), ye("design:type", Boolean) ], AudioSourceUILayer.prototype, "playOnAwake", void 0);
777
777
 
778
778
  var Oe, Te, ke, Re;
779
779
 
@@ -841,27 +841,27 @@ let xe = class CoreToast extends BaseComponent {
841
841
  }
842
842
  };
843
843
 
844
- ye([ Ue({
844
+ ge([ Ue({
845
845
  type: s,
846
846
  tooltip: "固定节点"
847
- }), ge("design:type", typeof (Oe = typeof s !== "undefined" && s) === "function" ? Oe : Object) ], xe.prototype, "fixed_node", void 0);
847
+ }), ye("design:type", typeof (Oe = typeof s !== "undefined" && s) === "function" ? Oe : Object) ], xe.prototype, "fixed_node", void 0);
848
848
 
849
- ye([ Ue({
849
+ ge([ Ue({
850
850
  type: s,
851
851
  tooltip: "滑动节点"
852
- }), ge("design:type", typeof (Te = typeof s !== "undefined" && s) === "function" ? Te : Object) ], xe.prototype, "slide_node", void 0);
852
+ }), ye("design:type", typeof (Te = typeof s !== "undefined" && s) === "function" ? Te : Object) ], xe.prototype, "slide_node", void 0);
853
853
 
854
- ye([ Ue({
854
+ ge([ Ue({
855
855
  type: b,
856
856
  tooltip: "固定标签节点"
857
- }), ge("design:type", typeof (ke = typeof b !== "undefined" && b) === "function" ? ke : Object) ], xe.prototype, "fixed_label", void 0);
857
+ }), ye("design:type", typeof (ke = typeof b !== "undefined" && b) === "function" ? ke : Object) ], xe.prototype, "fixed_label", void 0);
858
858
 
859
- ye([ Ue({
859
+ ge([ Ue({
860
860
  type: b,
861
861
  tooltip: "滑动标签节点"
862
- }), ge("design:type", typeof (Re = typeof b !== "undefined" && b) === "function" ? Re : Object) ], xe.prototype, "slide_label", void 0);
862
+ }), ye("design:type", typeof (Re = typeof b !== "undefined" && b) === "function" ? Re : Object) ], xe.prototype, "slide_label", void 0);
863
863
 
864
- xe = ye([ Me("CoreToast"), Ne("CATCORE/CoreToast") ], xe);
864
+ xe = ge([ Me("CoreToast"), Ne("CATCORE/CoreToast") ], xe);
865
865
 
866
866
  var je;
867
867
 
@@ -884,12 +884,12 @@ let Ge = class CoreBlackMask extends BaseComponent {
884
884
  tween;
885
885
  };
886
886
 
887
- ye([ Be({
887
+ ge([ Be({
888
888
  type: s,
889
889
  tooltip: "动画节点"
890
- }), ge("design:type", typeof (Fe = typeof s !== "undefined" && s) === "function" ? Fe : Object) ], Ge.prototype, "tween", void 0);
890
+ }), ye("design:type", typeof (Fe = typeof s !== "undefined" && s) === "function" ? Fe : Object) ], Ge.prototype, "tween", void 0);
891
891
 
892
- Ge = ye([ Le("CoreBlackMask"), Pe("CATCORE/CoreBlackMask") ], Ge);
892
+ Ge = ge([ Le("CoreBlackMask"), Pe("CATCORE/CoreBlackMask") ], Ge);
893
893
 
894
894
  var He, $e;
895
895
 
@@ -951,15 +951,15 @@ let ze = class CoreUIContainer extends UILayer {
951
951
  }
952
952
  };
953
953
 
954
- ye([ We({
954
+ ge([ We({
955
955
  type: s
956
- }), ge("design:type", typeof (He = typeof s !== "undefined" && s) === "function" ? He : Object) ], ze.prototype, "scene_mask_node", void 0);
956
+ }), ye("design:type", typeof (He = typeof s !== "undefined" && s) === "function" ? He : Object) ], ze.prototype, "scene_mask_node", void 0);
957
957
 
958
- ye([ We({
958
+ ge([ We({
959
959
  type: s
960
- }), ge("design:type", typeof ($e = typeof s !== "undefined" && s) === "function" ? $e : Object) ], ze.prototype, "ui_container", void 0);
960
+ }), ye("design:type", typeof ($e = typeof s !== "undefined" && s) === "function" ? $e : Object) ], ze.prototype, "ui_container", void 0);
961
961
 
962
- ze = ye([ Ke("CoreUIContainer"), Ve("CATCORE/CoreUIContainer") ], ze);
962
+ ze = ge([ Ke("CoreUIContainer"), Ve("CATCORE/CoreUIContainer") ], ze);
963
963
 
964
964
  class RootUILayer extends UILayer {
965
965
  onEnable() {
@@ -1002,17 +1002,17 @@ let Ye = class CoreShowLoading extends RootUILayer {
1002
1002
  }
1003
1003
  };
1004
1004
 
1005
- ye([ Xe({
1005
+ ge([ Xe({
1006
1006
  type: b,
1007
1007
  tooltip: "标题"
1008
- }), ge("design:type", typeof (qe = typeof b !== "undefined" && b) === "function" ? qe : Object) ], Ye.prototype, "title", void 0);
1008
+ }), ye("design:type", typeof (qe = typeof b !== "undefined" && b) === "function" ? qe : Object) ], Ye.prototype, "title", void 0);
1009
1009
 
1010
- ye([ Xe({
1010
+ ge([ Xe({
1011
1011
  type: s,
1012
1012
  tooltip: "动画"
1013
- }), ge("design:type", typeof (Qe = typeof s !== "undefined" && s) === "function" ? Qe : Object) ], Ye.prototype, "loadingTween", void 0);
1013
+ }), ye("design:type", typeof (Qe = typeof s !== "undefined" && s) === "function" ? Qe : Object) ], Ye.prototype, "loadingTween", void 0);
1014
1014
 
1015
- Ye = ye([ Je("CoreShowLoading"), Ze("CATCORE/CoreShowLoading") ], Ye);
1015
+ Ye = ge([ Je("CoreShowLoading"), Ze("CATCORE/CoreShowLoading") ], Ye);
1016
1016
 
1017
1017
  var et;
1018
1018
 
@@ -1074,22 +1074,22 @@ let at = class CoreReconnection extends RootUILayer {
1074
1074
  }
1075
1075
  };
1076
1076
 
1077
- ye([ st({
1077
+ ge([ st({
1078
1078
  type: b,
1079
1079
  tooltip: "通用提示文本"
1080
- }), ge("design:type", typeof (tt = typeof b !== "undefined" && b) === "function" ? tt : Object) ], at.prototype, "common_prompt_text", void 0);
1080
+ }), ye("design:type", typeof (tt = typeof b !== "undefined" && b) === "function" ? tt : Object) ], at.prototype, "common_prompt_text", void 0);
1081
1081
 
1082
- ye([ st({
1082
+ ge([ st({
1083
1083
  type: S,
1084
1084
  tooltip: "确定按钮"
1085
- }), ge("design:type", typeof (it = typeof S !== "undefined" && S) === "function" ? it : Object) ], at.prototype, "btn_confirm", void 0);
1085
+ }), ye("design:type", typeof (it = typeof S !== "undefined" && S) === "function" ? it : Object) ], at.prototype, "btn_confirm", void 0);
1086
1086
 
1087
- ye([ st({
1087
+ ge([ st({
1088
1088
  type: S,
1089
1089
  tooltip: "关闭按钮"
1090
- }), ge("design:type", typeof (nt = typeof S !== "undefined" && S) === "function" ? nt : Object) ], at.prototype, "btn_close", void 0);
1090
+ }), ye("design:type", typeof (nt = typeof S !== "undefined" && S) === "function" ? nt : Object) ], at.prototype, "btn_close", void 0);
1091
1091
 
1092
- at = ye([ ot("CoreReconnection"), rt("CATCORE/CoreReconnection") ], at);
1092
+ at = ge([ ot("CoreReconnection"), rt("CATCORE/CoreReconnection") ], at);
1093
1093
 
1094
1094
  var lt, ct, ht;
1095
1095
 
@@ -1119,28 +1119,28 @@ let ft = class CoreNotice extends RootUILayer {
1119
1119
  }
1120
1120
  };
1121
1121
 
1122
- ye([ dt({
1122
+ ge([ dt({
1123
1123
  type: b,
1124
1124
  tooltip: "提示文本"
1125
- }), ge("design:type", typeof (lt = typeof b !== "undefined" && b) === "function" ? lt : Object) ], ft.prototype, "text", void 0);
1125
+ }), ye("design:type", typeof (lt = typeof b !== "undefined" && b) === "function" ? lt : Object) ], ft.prototype, "text", void 0);
1126
1126
 
1127
- ye([ dt({
1127
+ ge([ dt({
1128
1128
  type: S,
1129
1129
  tooltip: "确定按钮"
1130
- }), ge("design:type", typeof (ct = typeof S !== "undefined" && S) === "function" ? ct : Object) ], ft.prototype, "btn_confirm", void 0);
1130
+ }), ye("design:type", typeof (ct = typeof S !== "undefined" && S) === "function" ? ct : Object) ], ft.prototype, "btn_confirm", void 0);
1131
1131
 
1132
- ye([ dt({
1132
+ ge([ dt({
1133
1133
  type: S,
1134
1134
  tooltip: "关闭按钮"
1135
- }), ge("design:type", typeof (ht = typeof S !== "undefined" && S) === "function" ? ht : Object) ], ft.prototype, "btn_close", void 0);
1135
+ }), ye("design:type", typeof (ht = typeof S !== "undefined" && S) === "function" ? ht : Object) ], ft.prototype, "btn_close", void 0);
1136
1136
 
1137
- ft = ye([ ut("CoreNotice"), pt("CATCORE/CoreNotice") ], ft);
1137
+ ft = ge([ ut("CoreNotice"), pt("CATCORE/CoreNotice") ], ft);
1138
1138
 
1139
1139
  class SceneLayer extends BaseComponent {
1140
1140
  isReload;
1141
1141
  }
1142
1142
 
1143
- var mt, _t, yt, gt, bt, vt, Ct, Et;
1143
+ var mt, _t, gt, yt, bt, vt, Ct, Et;
1144
1144
 
1145
1145
  const {ccclass: St, property: wt, menu: At} = i;
1146
1146
 
@@ -1179,7 +1179,7 @@ let Ot = class Gui extends BaseComponent {
1179
1179
  _scene=null;
1180
1180
  init(e) {
1181
1181
  this.cat = e;
1182
- g.once(w.EVENT_ENGINE_INITED, () => {
1182
+ y.once(w.EVENT_ENGINE_INITED, () => {
1183
1183
  this.engineReady = true;
1184
1184
  this.tryInit();
1185
1185
  });
@@ -1384,10 +1384,13 @@ let Ot = class Gui extends BaseComponent {
1384
1384
  this.ui_container_component?.removeAndDestroy();
1385
1385
  this.ui_container_component = null;
1386
1386
  const t = h(this.ui_prefab);
1387
+ console.log("node", u(t), t.uuid, t);
1388
+ console.log("isValid(this.node)", u(this.node), this.node.uuid, this.node);
1387
1389
  if (u(this.node)) {
1388
1390
  this.ui_container_component = t.getComponent(ze);
1389
1391
  this.ui_container_component?.setGui(this).addToParent(e, this.node.getSiblingIndex());
1390
1392
  }
1393
+ console.log("this.ui_container_component", this.ui_container_component);
1391
1394
  }
1392
1395
  reloadScene() {
1393
1396
  let e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : () => {};
@@ -1466,47 +1469,47 @@ let Ot = class Gui extends BaseComponent {
1466
1469
  }
1467
1470
  };
1468
1471
 
1469
- ye([ wt({
1472
+ ge([ wt({
1470
1473
  type: c,
1471
1474
  tooltip: "断线重连UI预制体"
1472
- }), ge("design:type", typeof (mt = typeof c !== "undefined" && c) === "function" ? mt : Object) ], Ot.prototype, "reconnection_ui_prefab", void 0);
1475
+ }), ye("design:type", typeof (mt = typeof c !== "undefined" && c) === "function" ? mt : Object) ], Ot.prototype, "reconnection_ui_prefab", void 0);
1473
1476
 
1474
- ye([ wt({
1477
+ ge([ wt({
1475
1478
  type: c,
1476
1479
  tooltip: "提示UI预制体"
1477
- }), ge("design:type", typeof (_t = typeof c !== "undefined" && c) === "function" ? _t : Object) ], Ot.prototype, "toast_ui_prefab", void 0);
1480
+ }), ye("design:type", typeof (_t = typeof c !== "undefined" && c) === "function" ? _t : Object) ], Ot.prototype, "toast_ui_prefab", void 0);
1478
1481
 
1479
- ye([ wt({
1482
+ ge([ wt({
1480
1483
  type: c,
1481
1484
  tooltip: "加载UI预制体"
1482
- }), ge("design:type", typeof (yt = typeof c !== "undefined" && c) === "function" ? yt : Object) ], Ot.prototype, "loading_ui_prefab", void 0);
1485
+ }), ye("design:type", typeof (gt = typeof c !== "undefined" && c) === "function" ? gt : Object) ], Ot.prototype, "loading_ui_prefab", void 0);
1483
1486
 
1484
- ye([ wt({
1487
+ ge([ wt({
1485
1488
  type: c,
1486
1489
  tooltip: "公告UI预制体"
1487
- }), ge("design:type", typeof (gt = typeof c !== "undefined" && c) === "function" ? gt : Object) ], Ot.prototype, "notice_ui_prefab", void 0);
1490
+ }), ye("design:type", typeof (yt = typeof c !== "undefined" && c) === "function" ? yt : Object) ], Ot.prototype, "notice_ui_prefab", void 0);
1488
1491
 
1489
- ye([ wt({
1492
+ ge([ wt({
1490
1493
  type: c,
1491
1494
  tooltip: "UI层预制体"
1492
- }), ge("design:type", typeof (bt = typeof c !== "undefined" && c) === "function" ? bt : Object) ], Ot.prototype, "ui_prefab", void 0);
1495
+ }), ye("design:type", typeof (bt = typeof c !== "undefined" && c) === "function" ? bt : Object) ], Ot.prototype, "ui_prefab", void 0);
1493
1496
 
1494
- ye([ wt({
1497
+ ge([ wt({
1495
1498
  type: s,
1496
1499
  tooltip: "root-UI层"
1497
- }), ge("design:type", typeof (vt = typeof s !== "undefined" && s) === "function" ? vt : Object) ], Ot.prototype, "root_ui", void 0);
1500
+ }), ye("design:type", typeof (vt = typeof s !== "undefined" && s) === "function" ? vt : Object) ], Ot.prototype, "root_ui", void 0);
1498
1501
 
1499
- ye([ wt({
1502
+ ge([ wt({
1500
1503
  type: s,
1501
1504
  tooltip: "root-组件层"
1502
- }), ge("design:type", typeof (Ct = typeof s !== "undefined" && s) === "function" ? Ct : Object) ], Ot.prototype, "root_toast", void 0);
1505
+ }), ye("design:type", typeof (Ct = typeof s !== "undefined" && s) === "function" ? Ct : Object) ], Ot.prototype, "root_toast", void 0);
1503
1506
 
1504
- ye([ wt({
1507
+ ge([ wt({
1505
1508
  type: s,
1506
1509
  tooltip: "root-mask"
1507
- }), ge("design:type", typeof (Et = typeof s !== "undefined" && s) === "function" ? Et : Object) ], Ot.prototype, "root_mask", void 0);
1510
+ }), ye("design:type", typeof (Et = typeof s !== "undefined" && s) === "function" ? Et : Object) ], Ot.prototype, "root_mask", void 0);
1508
1511
 
1509
- Ot = ye([ St("Gui"), At("CATCORE/Gui") ], Ot);
1512
+ Ot = ge([ St("Gui"), At("CATCORE/Gui") ], Ot);
1510
1513
 
1511
1514
  var Tt;
1512
1515
 
@@ -1542,7 +1545,7 @@ class GuiManager extends BaseManager {
1542
1545
  }
1543
1546
  }
1544
1547
 
1545
- class WrapperSocialGameClient extends re {
1548
+ class WrapperSocialGameClient extends se {
1546
1549
  showRequestErrInfo=false;
1547
1550
  logBlackList=[];
1548
1551
  ignore=e => {
@@ -1564,7 +1567,7 @@ class WrapperSocialGameClient extends re {
1564
1567
  forwardReq: s,
1565
1568
  forwardResp: r
1566
1569
  }).then(e => {
1567
- if (ne) {
1570
+ if (ie) {
1568
1571
  a(`%c ws服务端消息 %c [Response][${new Date}] %c ${t} %c`, "background:#ff00ff ; padding: 1px; border-radius: 3px 0 0 3px; color: #fff", "background:#3d7daa ; padding: 1px; color: #fff", "background:#ff00ff ; padding: 1px; border-radius: 0 3px 3px 0; color: #fff", "background:transparent", i);
1569
1572
  }
1570
1573
  l(e);
@@ -1579,7 +1582,7 @@ class WrapperSocialGameClient extends re {
1579
1582
  }
1580
1583
  subscribe(t, i, n) {
1581
1584
  super.subscribe(t, i, i => {
1582
- if (ne && !this.ignore(t)) {
1585
+ if (ie && !this.ignore(t)) {
1583
1586
  a(`%c ws服务端消息:[subscribe][${new Date}] %c ${t} %c`, "background:#35495e ; padding: 1px; border-radius: 3px 0 0 3px; color: #fff", "background:#410083 ; padding: 1px; border-radius: 0 3px 3px 0; color: #fff", "background:transparent", i);
1584
1587
  }
1585
1588
  e._cat.event.emit(t, i);
@@ -1631,7 +1634,7 @@ class SocialGameClientManager extends BaseManager {
1631
1634
  reconnectMaxAttempts: Infinity
1632
1635
  }, {
1633
1636
  isAutoConnect: false,
1634
- isArrayBuffer: oe,
1637
+ isArrayBuffer: ne,
1635
1638
  ...t
1636
1639
  }));
1637
1640
  this.register(o);
@@ -1651,7 +1654,7 @@ class SocialGameClientManager extends BaseManager {
1651
1654
  }
1652
1655
  initGlobalListeners() {
1653
1656
  this.cat.event.on(je.ONLINE, () => this.handleGlobalStateChange("online"), this).on(je.OFFLINE, () => this.handleGlobalStateChange("offline"), this);
1654
- if (oe) {
1657
+ if (ne) {
1655
1658
  wx.onShow(e => {
1656
1659
  this.handleGlobalStateChange("show", e);
1657
1660
  });
@@ -1659,8 +1662,8 @@ class SocialGameClientManager extends BaseManager {
1659
1662
  this.handleGlobalStateChange("hide", e);
1660
1663
  });
1661
1664
  } else {
1662
- g.on(w.EVENT_SHOW, () => this.handleGlobalStateChange("show"));
1663
- g.on(w.EVENT_HIDE, () => this.handleGlobalStateChange("hide"));
1665
+ y.on(w.EVENT_SHOW, () => this.handleGlobalStateChange("show"));
1666
+ y.on(w.EVENT_HIDE, () => this.handleGlobalStateChange("hide"));
1664
1667
  }
1665
1668
  }
1666
1669
  async handleGlobalStateChange(e, t) {
@@ -1697,7 +1700,6 @@ class SocialGameClientManager extends BaseManager {
1697
1700
  }
1698
1701
  }
1699
1702
  async safeTriggerReconnectAll() {
1700
- ee();
1701
1703
  if (this.reconnecting || !this.isGlobalOnline || this.isInBackground || this.managedClients.size === 0) {
1702
1704
  console.log("[safeTriggerReconnectAll] 没有需要重连的客户端,直接 dispatch");
1703
1705
  await this.dispatchReloadAndShow();
@@ -1735,7 +1737,7 @@ class SocialGameClientManager extends BaseManager {
1735
1737
  o(`${e.name}服重连失败`, t);
1736
1738
  }
1737
1739
  }));
1738
- const i = $(t = this.activeClients).call(t, e => e.socketConnectStatus !== ie.CONNECTED);
1740
+ const i = $(t = this.activeClients).call(t, e => e.socketConnectStatus !== te.CONNECTED);
1739
1741
  if (i.length > 0) {
1740
1742
  Z(i).call(i, e => {
1741
1743
  console.error("部分WS重连失败:", e);
@@ -1753,7 +1755,7 @@ class SocialGameClientManager extends BaseManager {
1753
1755
  }
1754
1756
  disconnectAll(e) {
1755
1757
  var t, i;
1756
- if (te(t = this.activeClients).call(t, e => e.socket?.readyState !== WebSocket.OPEN)) return;
1758
+ if (ee(t = this.activeClients).call(t, e => e.socket?.readyState !== WebSocket.OPEN)) return;
1757
1759
  H(i = this.managedClients).call(i, t => {
1758
1760
  a("断开连接", t.name, e, t.socket);
1759
1761
  t.disconnect(e);
@@ -1767,7 +1769,7 @@ class SocialGameClientManager extends BaseManager {
1767
1769
  };
1768
1770
  handleSingleReconnect=async () => {
1769
1771
  var e;
1770
- if (te(e = this.activeClients).call(e, e => e.socketConnectStatus === ie.CONNECTED)) {
1772
+ if (ee(e = this.activeClients).call(e, e => e.socketConnectStatus === te.CONNECTED)) {
1771
1773
  var t;
1772
1774
  a("单个WS重连成功回调===", this.managedClients);
1773
1775
  await F.allSettled(Z(t = this.activeClients).call(t, async e => {
@@ -1991,29 +1993,29 @@ class CoreStore extends BaseManager {}
1991
1993
 
1992
1994
  let kt = null;
1993
1995
 
1994
- const Rt = e => ae.MD5(e).toString();
1996
+ const Rt = e => re.MD5(e).toString();
1995
1997
 
1996
1998
  const Mt = (e, t) => {
1997
- kt = ae.enc.Hex.parse(t);
1999
+ kt = re.enc.Hex.parse(t);
1998
2000
  };
1999
2001
 
2000
- const Ut = (e, t, i) => ae.AES.encrypt(e, t, {
2002
+ const Ut = (e, t, i) => re.AES.encrypt(e, t, {
2001
2003
  iv: kt,
2002
2004
  format: Dt
2003
2005
  }).toString();
2004
2006
 
2005
2007
  const Nt = (e, t, i) => {
2006
- const n = ae.AES.decrypt(e, t, {
2008
+ const n = re.AES.decrypt(e, t, {
2007
2009
  iv: kt,
2008
2010
  format: Dt
2009
2011
  });
2010
- return n.toString(ae.enc.Utf8);
2012
+ return n.toString(re.enc.Utf8);
2011
2013
  };
2012
2014
 
2013
2015
  const Dt = {
2014
2016
  stringify: e => {
2015
2017
  const t = {
2016
- ct: e.ciphertext.toString(ae.enc.Base64)
2018
+ ct: e.ciphertext.toString(re.enc.Base64)
2017
2019
  };
2018
2020
  if (e.iv) {
2019
2021
  t.iv = e.iv.toString();
@@ -2025,14 +2027,14 @@ const Dt = {
2025
2027
  },
2026
2028
  parse: e => {
2027
2029
  const t = JSON.parse(e);
2028
- const i = ae.lib.CipherParams.create({
2029
- ciphertext: ae.enc.Base64.parse(t.ct)
2030
+ const i = re.lib.CipherParams.create({
2031
+ ciphertext: re.enc.Base64.parse(t.ct)
2030
2032
  });
2031
2033
  if (t.iv) {
2032
- i.iv = ae.enc.Hex.parse(t.iv);
2034
+ i.iv = re.enc.Hex.parse(t.iv);
2033
2035
  }
2034
2036
  if (t.s) {
2035
- i.salt = ae.enc.Hex.parse(t.s);
2037
+ i.salt = re.enc.Hex.parse(t.s);
2036
2038
  }
2037
2039
  return i;
2038
2040
  }
@@ -2069,7 +2071,7 @@ class StorageManager extends BaseManager {
2069
2071
  console.error("存储的key不能为空");
2070
2072
  return;
2071
2073
  }
2072
- if (!se) {
2074
+ if (!oe) {
2073
2075
  e = this.cat.util.encryptUtil.md5(e);
2074
2076
  }
2075
2077
  if (null == t) {
@@ -2091,7 +2093,7 @@ class StorageManager extends BaseManager {
2091
2093
  } else if (typeof t === "number") {
2092
2094
  t = t + "";
2093
2095
  }
2094
- if (!se && null != this._key && null != this._iv) {
2096
+ if (!oe && null != this._key && null != this._iv) {
2095
2097
  t = this.cat.util.encryptUtil.aesEncrypt(`${t}`, this._key, this._iv);
2096
2098
  }
2097
2099
  M.localStorage.setItem(e, t);
@@ -2102,11 +2104,11 @@ class StorageManager extends BaseManager {
2102
2104
  return null;
2103
2105
  }
2104
2106
  e = `${e}_${this._id}`;
2105
- if (!se) {
2107
+ if (!oe) {
2106
2108
  e = this.cat.util.encryptUtil.md5(e);
2107
2109
  }
2108
2110
  let i = M.localStorage.getItem(e);
2109
- if (null != i && "" !== i && !se && null != this._key && null != this._iv) {
2111
+ if (null != i && "" !== i && !oe && null != this._key && null != this._iv) {
2110
2112
  i = this.cat.util.encryptUtil.aesDecrypt(i, this._key, this._iv);
2111
2113
  }
2112
2114
  if (null === i) {
@@ -2133,7 +2135,7 @@ class StorageManager extends BaseManager {
2133
2135
  return;
2134
2136
  }
2135
2137
  e = `${e}_${this._id}`;
2136
- if (!se) {
2138
+ if (!oe) {
2137
2139
  e = this.cat.util.encryptUtil.md5(e);
2138
2140
  }
2139
2141
  M.localStorage.removeItem(e);
@@ -2321,52 +2323,52 @@ let qt = class CoreUIModal extends UILayer {
2321
2323
  }
2322
2324
  };
2323
2325
 
2324
- ye([ Vt({
2326
+ ge([ Vt({
2325
2327
  type: U,
2326
2328
  tooltip: "默认标题"
2327
- }), ge("design:type", typeof (jt = typeof U !== "undefined" && U) === "function" ? jt : Object) ], qt.prototype, "default_title", void 0);
2329
+ }), ye("design:type", typeof (jt = typeof U !== "undefined" && U) === "function" ? jt : Object) ], qt.prototype, "default_title", void 0);
2328
2330
 
2329
- ye([ Vt({
2331
+ ge([ Vt({
2330
2332
  type: N,
2331
2333
  tooltip: "标题节点"
2332
- }), ge("design:type", typeof (Ft = typeof N !== "undefined" && N) === "function" ? Ft : Object) ], qt.prototype, "title", void 0);
2334
+ }), ye("design:type", typeof (Ft = typeof N !== "undefined" && N) === "function" ? Ft : Object) ], qt.prototype, "title", void 0);
2333
2335
 
2334
- ye([ Vt({
2336
+ ge([ Vt({
2335
2337
  type: b,
2336
2338
  tooltip: "字符串内容按钮"
2337
- }), ge("design:type", typeof (Lt = typeof b !== "undefined" && b) === "function" ? Lt : Object) ], qt.prototype, "prompt_content_str", void 0);
2339
+ }), ye("design:type", typeof (Lt = typeof b !== "undefined" && b) === "function" ? Lt : Object) ], qt.prototype, "prompt_content_str", void 0);
2338
2340
 
2339
- ye([ Vt({
2341
+ ge([ Vt({
2340
2342
  type: N,
2341
2343
  tooltip: "图片精灵内容按钮"
2342
- }), ge("design:type", typeof (Bt = typeof N !== "undefined" && N) === "function" ? Bt : Object) ], qt.prototype, "prompt_content_spriteFrame", void 0);
2344
+ }), ye("design:type", typeof (Bt = typeof N !== "undefined" && N) === "function" ? Bt : Object) ], qt.prototype, "prompt_content_spriteFrame", void 0);
2343
2345
 
2344
- ye([ Vt({
2346
+ ge([ Vt({
2345
2347
  type: S,
2346
2348
  tooltip: "确认按钮"
2347
- }), ge("design:type", typeof (Pt = typeof S !== "undefined" && S) === "function" ? Pt : Object) ], qt.prototype, "btn_confirm", void 0);
2349
+ }), ye("design:type", typeof (Pt = typeof S !== "undefined" && S) === "function" ? Pt : Object) ], qt.prototype, "btn_confirm", void 0);
2348
2350
 
2349
- ye([ Vt({
2351
+ ge([ Vt({
2350
2352
  type: U,
2351
2353
  tooltip: "确认按钮精灵图"
2352
- }), ge("design:type", typeof (Gt = typeof U !== "undefined" && U) === "function" ? Gt : Object) ], qt.prototype, "confirm_spriteFrame", void 0);
2354
+ }), ye("design:type", typeof (Gt = typeof U !== "undefined" && U) === "function" ? Gt : Object) ], qt.prototype, "confirm_spriteFrame", void 0);
2353
2355
 
2354
- ye([ Vt({
2356
+ ge([ Vt({
2355
2357
  type: S,
2356
2358
  tooltip: "取消按钮"
2357
- }), ge("design:type", typeof (Ht = typeof S !== "undefined" && S) === "function" ? Ht : Object) ], qt.prototype, "btn_cancel", void 0);
2359
+ }), ye("design:type", typeof (Ht = typeof S !== "undefined" && S) === "function" ? Ht : Object) ], qt.prototype, "btn_cancel", void 0);
2358
2360
 
2359
- ye([ Vt({
2361
+ ge([ Vt({
2360
2362
  type: U,
2361
2363
  tooltip: "取消按钮精灵图"
2362
- }), ge("design:type", typeof ($t = typeof U !== "undefined" && U) === "function" ? $t : Object) ], qt.prototype, "cancel_spriteFrame", void 0);
2364
+ }), ye("design:type", typeof ($t = typeof U !== "undefined" && U) === "function" ? $t : Object) ], qt.prototype, "cancel_spriteFrame", void 0);
2363
2365
 
2364
- ye([ Vt({
2366
+ ge([ Vt({
2365
2367
  type: S,
2366
2368
  tooltip: "关闭按钮"
2367
- }), ge("design:type", typeof (Kt = typeof S !== "undefined" && S) === "function" ? Kt : Object) ], qt.prototype, "btn_close", void 0);
2369
+ }), ye("design:type", typeof (Kt = typeof S !== "undefined" && S) === "function" ? Kt : Object) ], qt.prototype, "btn_close", void 0);
2368
2370
 
2369
- qt = ye([ Wt("CoreUIModal"), zt("CATCORE/CoreUIModal") ], qt);
2371
+ qt = ge([ Wt("CoreUIModal"), zt("CATCORE/CoreUIModal") ], qt);
2370
2372
 
2371
2373
  var Qt;
2372
2374
 
@@ -2393,7 +2395,7 @@ class TimerEntry {
2393
2395
 
2394
2396
  class TimerManager extends BaseManager {
2395
2397
  timers=(() => new G)();
2396
- lastUpdateTime=(() => ee())();
2398
+ lastUpdateTime=(() => ae())();
2397
2399
  constructor(e) {
2398
2400
  var t;
2399
2401
  super(e);
@@ -2402,10 +2404,10 @@ class TimerManager extends BaseManager {
2402
2404
  le(V(t = this.update).call(t, this), 1e3);
2403
2405
  }
2404
2406
  onHandleAppBackground() {
2405
- this.lastUpdateTime = ee();
2407
+ this.lastUpdateTime = ae();
2406
2408
  }
2407
2409
  onHandleAppForeground() {
2408
- const e = ee();
2410
+ const e = ae();
2409
2411
  const t = e - this.lastUpdateTime;
2410
2412
  a("elapsedTime", t);
2411
2413
  for (const e of ce(i = this.timers).call(i)) {
@@ -2510,7 +2512,7 @@ const Xt = function() {
2510
2512
 
2511
2513
  const Zt = e._cat ??= Manager.instance;
2512
2514
 
2513
- g.onPostProjectInitDelegate.add(async () => {
2515
+ y.onPostProjectInitDelegate.add(async () => {
2514
2516
  console.time("[Init App]");
2515
2517
  try {
2516
2518
  await Zt.boot();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shimotsuki/core",
3
- "version": "3.0.42",
3
+ "version": "3.0.43",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "main": "dist/shimotsuki_core.js",