var t = require; var e = module; var i = exports; e = (this && this.__decorate) || function(t, e, i, s) { var o, a = arguments.length, n = a < 3 ? e : null === s ? (s = Object.getOwnPropertyDescriptor(e, i)) : s; if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n = Reflect.decorate(t, e, i, s); else for (var r = t.length - 1; 0 <= r; r--) (o = t[r]) && (n = (a < 3 ? o(n) : 3 < a ? o(e, i, n) : o(e, i)) || n); return 3 < a && n && Object.defineProperty(e, i, n), n; }; Object.defineProperty(i, "__esModule", { value: !0 }); const u = t("App"), p = t("GameText"), s = t("BaseView"), f = (t("ViewConst"), t("GameConst")), g = t("MapService"), { ccclass: o, property: a, menu: n } = cc._decorator; t = class extends s.default { constructor() { super(...arguments), (this.scrollView = null), (this.mask = null), (this.dianContent = null), (this.lineContent = null), (this.nameBgContent = null), (this.nameLabContent = null), (this.mapIconContent = null), (this.mapId = -1), (this.bgType = 1); } initUI() { super.initUI(); } open(i = !1) { i && u.default.ViewManager.close(20), (this.mask.active = !1), (this.mapId = g.default.ins.curId); const s = g.default.ins.getCurRegionCfgs(), o = this.mapIconContent.children, e = this.lineContent.children, a = this.dianContent.children, n = this.nameBgContent.children, r = this.nameLabContent.children; let l = 0, h = 0; for (let t = 0; t < s.length; t++) { const i = s[t]; var c = parseInt(i.stage); if (c <= this.mapId) { (a[t].active = !0), (r[t].active = !0), (n[t].active = !0), (r[t].getComponent(cc.Label).string = t + 1 + "." + p.GameText.getTextByStr(s[t].stage_name)); const i = o[t].getComponent(cc.Sprite); u.default.CommonUtils.setSpriteFrameByBundle(f.BundleType.MAP_ICON, "stage/" + s[t].stage_icon, i); var d = o[t].position; (h = o[t + 1].position.sub(d).len() - 25), (e[t].width = h), c == this.mapId && ((e[t].width = 0), (l = t + 1)); } } if ((4 < l && (this.scrollView.content.y = -o[l - 1].y - 700), i)) { const i = u.default.ConfigManager.getConfig("Region")[s[0].region + 1]; cc.tween(e[l - 1]) .delay(1) .to(2, { width: h }) .call(() => { (a[l].active = !0), (r[l].active = !0), (n[l].active = !0); const t = o[l].getComponent(cc.Sprite), e = r[l].getComponent(cc.Label); 7 == l ? ((e.string = l + "." + p.GameText.getTextByStr(i.region_name)), u.default.CommonUtils.setSpriteFrameByBundle( f.BundleType.MAP_ICON, "region/" + i.region_icon, t )) : ((e.string = l + "." + p.GameText.getTextByStr(s[l].stage_name)), u.default.CommonUtils.setSpriteFrameByBundle( f.BundleType.MAP_ICON, "stage/" + s[l].stage_icon, t )); }) .delay(3) .call(() => { g.default.ins.switchMap(), this.closeView(); }) .start(); } } }; e([a(cc.ScrollView)], t.prototype, "scrollView", void 0), e([a(cc.Node)], t.prototype, "mask", void 0), e([a(cc.Node)], t.prototype, "dianContent", void 0), e([a(cc.Node)], t.prototype, "lineContent", void 0), e([a(cc.Node)], t.prototype, "nameBgContent", void 0), e([a(cc.Node)], t.prototype, "nameLabContent", void 0), e([a(cc.Node)], t.prototype, "mapIconContent", void 0), (t = e([o], t)), (i.default = t);