System.register(["__unresolved_0", "cc", "__unresolved_1", "__unresolved_2", "__unresolved_3", "__unresolved_4", "__unresolved_5", "__unresolved_6", "__unresolved_7", "__unresolved_8"], function (_export, _context) {
  "use strict";

  var _reporterNs, _cclegacy, __checkObsolete__, __checkObsoleteInNamespace__, _decorator, Component, director, Utils, PoolMgr, Data, BusyLoadingManager, audioManager, localConfig, platformSystem, settingData, _dec, _class, _crd, ccclass, property, Loading;

  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }

  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }

  function _reportPossibleCrUseOfUtils(extras) {
    _reporterNs.report("Utils", "../../../core/utils/Utils", _context.meta, extras);
  }

  function _reportPossibleCrUseOfPoolMgr(extras) {
    _reporterNs.report("PoolMgr", "../../../core/manager/PoolMgr", _context.meta, extras);
  }

  function _reportPossibleCrUseOfData(extras) {
    _reporterNs.report("Data", "../../../core/manager/Data", _context.meta, extras);
  }

  function _reportPossibleCrUseOfBusyLoadingManager(extras) {
    _reporterNs.report("BusyLoadingManager", "../../../core/manager/BusyLoadingManager", _context.meta, extras);
  }

  function _reportPossibleCrUseOfaudioManager(extras) {
    _reporterNs.report("audioManager", "db://assets/manager/audioManager", _context.meta, extras);
  }

  function _reportPossibleCrUseOflocalConfig(extras) {
    _reporterNs.report("localConfig", "db://assets/manager/localConfig", _context.meta, extras);
  }

  function _reportPossibleCrUseOfplatformSystem(extras) {
    _reporterNs.report("platformSystem", "db://assets/platform/platformSystem", _context.meta, extras);
  }

  function _reportPossibleCrUseOfsettingData(extras) {
    _reporterNs.report("settingData", "db://assets/data/settingData", _context.meta, extras);
  }

  return {
    setters: [function (_unresolved_) {
      _reporterNs = _unresolved_;
    }, function (_cc) {
      _cclegacy = _cc.cclegacy;
      __checkObsolete__ = _cc.__checkObsolete__;
      __checkObsoleteInNamespace__ = _cc.__checkObsoleteInNamespace__;
      _decorator = _cc._decorator;
      Component = _cc.Component;
      director = _cc.director;
    }, function (_unresolved_2) {
      Utils = _unresolved_2.default;
    }, function (_unresolved_3) {
      PoolMgr = _unresolved_3.default;
    }, function (_unresolved_4) {
      Data = _unresolved_4.default;
    }, function (_unresolved_5) {
      BusyLoadingManager = _unresolved_5.default;
    }, function (_unresolved_6) {
      audioManager = _unresolved_6.default;
    }, function (_unresolved_7) {
      localConfig = _unresolved_7.localConfig;
    }, function (_unresolved_8) {
      platformSystem = _unresolved_8.default;
    }, function (_unresolved_9) {
      settingData = _unresolved_9.default;
    }],
    execute: function () {
      _crd = true;

      _cclegacy._RF.push({}, "3e27bLpQV9LjZgHxH5Nb2U0", "Loading", undefined);

      __checkObsolete__(['_decorator', 'Component', 'director']);

      ({
        ccclass,
        property
      } = _decorator);

      _export("Loading", Loading = (_dec = ccclass('Loading'), _dec(_class = class Loading extends Component {
        start() {
          var _this = this;

          return _asyncToGenerator(function* () {
            //加载音效
            yield (_crd && audioManager === void 0 ? (_reportPossibleCrUseOfaudioManager({
              error: Error()
            }), audioManager) : audioManager).initialize(); //设置

            (_crd && settingData === void 0 ? (_reportPossibleCrUseOfsettingData({
              error: Error()
            }), settingData) : settingData).loadFromCache(); //初始化平台接口

            (_crd && platformSystem === void 0 ? (_reportPossibleCrUseOfplatformSystem({
              error: Error()
            }), platformSystem) : platformSystem).initialize(); //加载CSV相关配置

            (_crd && localConfig === void 0 ? (_reportPossibleCrUseOflocalConfig({
              error: Error()
            }), localConfig) : localConfig).instance.loadConfig(() => {
              _this.subpackagecomplete();
            });
          })();
        }

        subpackagecomplete() {
          return _asyncToGenerator(function* () {
            (_crd && Data === void 0 ? (_reportPossibleCrUseOfData({
              error: Error()
            }), Data) : Data).loadData();
            yield (_crd && Utils === void 0 ? (_reportPossibleCrUseOfUtils({
              error: Error()
            }), Utils) : Utils).loadBundler("item_bundle");
            yield (_crd && Utils === void 0 ? (_reportPossibleCrUseOfUtils({
              error: Error()
            }), Utils) : Utils).loadBundler("prefabs");
            yield (_crd && Utils === void 0 ? (_reportPossibleCrUseOfUtils({
              error: Error()
            }), Utils) : Utils).loadBundler("spine");
            yield (_crd && PoolMgr === void 0 ? (_reportPossibleCrUseOfPoolMgr({
              error: Error()
            }), PoolMgr) : PoolMgr).Instance().loadPrefabs();
            (_crd && BusyLoadingManager === void 0 ? (_reportPossibleCrUseOfBusyLoadingManager({
              error: Error()
            }), BusyLoadingManager) : BusyLoadingManager).ins;
            director.loadScene("main");
          })();
        }

      }) || _class));

      _cclegacy._RF.pop();

      _crd = false;
    }
  };
});
//# sourceMappingURL=c0ee0d44afd801215e548c70885b70c1ef74d5fc.js.map