"use strict";

var igc, __extends = this && this.__extends || function() {
var e = function(t, a) {
return (e = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(t, a);
};
return function(t, a) {
function o() {
this.constructor = t;
}
e(t, a), t.prototype = null === a ? Object.create(a) : (o.prototype = a.prototype, 
new o());
};
}();

!function(e) {
!function(e) {
e[e.user = 1] = "user", e[e.pay = 2] = "pay", e[e.push = 3] = "push", e[e.share = 4] = "share", 
e[e.analytics = 5] = "analytics", e[e.droidplugin = 6] = "droidplugin", e[e.pluginpay = 7] = "pluginpay", 
e[e.ad = 8] = "ad", e[e.plugindownload = 9] = "plugindownload", e[e.system = 100] = "system";
}(e.e_facade_type || (e.e_facade_type = {})), function(e) {
e[e.login = 1] = "login", e[e.pay = 2] = "pay", e[e.create_ad = 3] = "create_ad", 
e[e.destroy_ad = 4] = "destroy_ad", e[e.show_ad = 5] = "show_ad", e[e.hide_ad = 6] = "hide_ad", 
e[e.get_user_info = 7] = "get_user_info", e[e.share = 8] = "share", e[e.show_loading = 9] = "show_loading", 
e[e.show_toast = 10] = "show_toast", e[e.show_modal = 11] = "show_modal", e[e.on_show = 12] = "on_show", 
e[e.navigate_to_mini_program = 13] = "navigate_to_mini_program", e[e.get_system_info_sync = 14] = "get_system_info_sync", 
e[e.create_inner_audio_context = 15] = "create_inner_audio_context", e[e.post_message = 16] = "post_message", 
e[e.set_user_cloud_storage = 17] = "set_user_cloud_storage", e[e.get_setting = 18] = "get_setting", 
e[e.create_user_info_button = 19] = "create_user_info_button", e[e.open_setting = 20] = "open_setting", 
e[e.authorize = 21] = "authorize", e[e.get_device = 22] = "get_device", e[e.has_ad = 23] = "has_ad", 
e[e.report_ad_show = 24] = "report_ad_show", e[e.report_ad_click = 25] = "report_ad_click", 
e[e.load_ad_just = 26] = "load_ad_just", e[e.show_ad_just = 27] = "show_ad_just", 
e[e.device_shake = 28] = "device_shake", e[e.check_can_add_desktop = 29] = "check_can_add_desktop", 
e[e.check_is_add_desktop = 30] = "check_is_add_desktop", e[e.add_desktop = 31] = "add_desktop", 
e[e.get_launch_options_sync = 32] = "get_launch_options_sync", e[e.show_more_game_modal = 33] = "show_more_game_modal", 
e[e.check_show_more_game = 34] = "check_show_more_game", e[e.more_game_btn_tap = 35] = "more_game_btn_tap", 
e[e.more_game_btn_show = 36] = "more_game_btn_show", e[e.more_game_btn_hide = 37] = "more_game_btn_hide", 
e[e.get_invite_query = 38] = "get_invite_query", e[e.set_show_share_menu = 39] = "set_show_share_menu", 
e[e.on_hide = 40] = "on_hide", e[e.report_ad_close = 41] = "report_ad_close", e[e.set_ad_position = 42] = "set_ad_position", 
e[e.ad_apk_result = 43] = "ad_apk_result", e[e.login_apk_result = 44] = "login_apk_result", 
e[e.on_share_app_message = 1e3] = "on_share_app_message", e[e.start_record_screen = 1001] = "start_record_screen", 
e[e.stop_record_screen = 1002] = "stop_record_screen", e[e.pause_record_screen = 1003] = "pause_record_screen", 
e[e.resume_record_screen = 1004] = "resume_record_screen", e[e.share_record_screen = 1005] = "share_record_screen", 
e[e.get_record_video = 1006] = "get_record_video", e[e.exit_mini_program = 1100] = "exit_mini_program", 
e[e.jump_leisure_subject = 1200] = "jump_leisure_subject";
}(e.e_method_type || (e.e_method_type = {})), function(e) {
e[e.interstitial = 1] = "interstitial", e[e.video = 2] = "video", e[e.native = 3] = "native", 
e[e.banner = 4] = "banner", e[e.splash = 5] = "splash", e[e.app_box = 6] = "app_box", 
e[e.feed = 7] = "feed", e[e.full_screen_video = 8] = "full_screen_video", e[e.block = 9] = "block", 
e[e.open_screen = 10] = "open_screen", e[e.interstitial_video = 11] = "interstitial_video", 
e[e.native_custom = 12] = "native_custom";
}(e.e_ad_type || (e.e_ad_type = {})), function(e) {
e[e.native_inter = 1] = "native_inter", e[e.native_list = 2] = "native_list", e[e.native_banner_dialog = 3] = "native_banner_dialog", 
e[e.native_banner_normal = 4] = "native_banner_normal";
}(e.e_ad_native_type || (e.e_ad_native_type = {})), function(e) {
e[e.banner_box = 6] = "banner_box", e[e.portal_box = 7] = "portal_box", e[e.drawer = 8] = "drawer";
}(e.e_ad_app_box_type || (e.e_ad_app_box_type = {})), function(e) {
e[e.splash = 1] = "splash", e[e.banner = 2] = "banner", e[e.interstitial = 3] = "interstitial", 
e[e.native = 4] = "native", e[e.video = 5] = "video", e[e.feed = 6] = "feed", e[e.full_screen_video = 7] = "full_screen_video", 
e[e.native_advance = 8] = "native_advance", e[e.interstitial_video = 9] = "interstitial_video";
}(e.e_apk_ad_type || (e.e_apk_ad_type = {})), function(e) {
e[e.banner = 1] = "banner", e[e.interstitial = 2] = "interstitial", e[e.inner_interstitial = 3] = "inner_interstitial";
}(e.e_native_advance_sub_type || (e.e_native_advance_sub_type = {})), function(e) {
e[e.none = 0] = "none", e[e.create = 1] = "create", e[e.load = 2] = "load", e[e.show = 3] = "show", 
e[e.hide = 4] = "hide", e[e.click = 5] = "click", e[e.close = 6] = "close", e[e.destroy = 7] = "destroy";
}(e.e_ad_op || (e.e_ad_op = {})), function(e) {
e[e.none = 0] = "none", e[e.init = 1] = "init", e[e.load_success = 2] = "load_success", 
e[e.show = 3] = "show", e[e.close = 4] = "close";
}(e.e_ad_status || (e.e_ad_status = {})), function(e) {
e[e.none = 0] = "none", e[e.visible = 1] = "visible", e[e.click = 2] = "click", 
e[e.req = 3] = "req", e[e.show = 4] = "show", e[e.hide = 5] = "hide", e[e.onload = 6] = "onload", 
e[e.onshow = 7] = "onshow", e[e.onhide = 8] = "onhide", e[e.onclick = 9] = "onclick", 
e[e.onclose = 10] = "onclose", e[e.onerror = 11] = "onerror";
}(e.e_ad_event || (e.e_ad_event = {})), function(e) {
e[e.uncomplete = 0] = "uncomplete", e[e.complete = 1] = "complete";
}(e.e_ad_video_close || (e.e_ad_video_close = {})), function(e) {
e[e.start_req = 0] = "start_req", e[e.create_ok = 1] = "create_ok", e[e.create_err = 2] = "create_err", 
e[e.load_ok = 3] = "load_ok", e[e.load_err = 4] = "load_err", e[e.show_ok = 5] = "show_ok", 
e[e.show_err = 6] = "show_err", e[e.reward_complete = 7] = "reward_complete", e[e.reward_uncomplete = 8] = "reward_uncomplete", 
e[e.native_show = 9] = "native_show", e[e.native_click = 10] = "native_click", e[e.interstitial_close = 11] = "interstitial_close", 
e[e.start_show_interstitial = 12] = "start_show_interstitial";
}(e.e_ad_result || (e.e_ad_result = {})), function(e) {
e[e.login_success = 4] = "login_success", e[e.login_fail = 5] = "login_fail", e[e.login_timeout = 6] = "login_timeout", 
e[e.login_cancel = 7] = "login_cancel", e[e.logoff_success = 8] = "logoff_success", 
e[e.logoff_fail = 9] = "logoff_fail", e[e.pay_success = 10] = "pay_success", e[e.pay_fail = 11] = "pay_fail", 
e[e.pay_param_error = -4] = "pay_param_error", e[e.exit_success = 33] = "exit_success", 
e[e.exit_cancel = 34] = "exit_cancel", e[e.pay_request_repeat = 35] = "pay_request_repeat", 
e[e.pre_order_success = 47] = "pre_order_success", e[e.pre_order_fail = 48] = "pre_order_fail", 
e[e.query_order_success = 49] = "query_order_success", e[e.query_order_fail = 50] = "query_order_fail", 
e[e.send_item_success = 51] = "send_item_success", e[e.send_item_fail = 52] = "send_item_fail", 
e[e.ad_load_success = 10030] = "ad_load_success", e[e.ad_show_success = 10031] = "ad_show_success", 
e[e.ad_clicked = 10032] = "ad_clicked", e[e.ad_video_complete = 10033] = "ad_video_complete", 
e[e.ad_video_complete_reward = 10034] = "ad_video_complete_reward", e[e.ad_closed = 10035] = "ad_closed", 
e[e.ad_show_fail = 10036] = "ad_show_fail", e[e.ad_load_fail = 10037] = "ad_load_fail";
}(e.e_apk_error_code || (e.e_apk_error_code = {})), function(e) {
e[e.test = 0] = "test", e[e.web = 1] = "web", e[e.oppo_qg = 2] = "oppo_qg", e[e.wx = 3] = "wx", 
e[e.vivo_qg = 4] = "vivo_qg", e[e.qq = 5] = "qq", e[e.ddz = 6] = "ddz", e[e.apk = 7] = "apk", 
e[e.tt = 8] = "tt", e[e.ipa = 9] = "ipa", e[e.hw_qg = 10] = "hw_qg";
}(e.e_channel_type || (e.e_channel_type = {})), function(e) {
e[e.none = 0] = "none", e[e.man = 1] = "man", e[e.female = 2] = "female";
}(e.e_channel_sex || (e.e_channel_sex = {})), function(e) {
e[e.test = 0] = "test", e[e.oppo = 1] = "oppo", e[e.vivo = 2] = "vivo", e[e.oppo_activity = 3] = "oppo_activity", 
e[e.wx = 4] = "wx", e[e.doudizhu = 5] = "doudizhu", e[e.ali = 6] = "ali", e[e.oppo_spring_festival = 7] = "oppo_spring_festival", 
e[e.qq = 8] = "qq", e[e.qq_ios = 9] = "qq_ios", e[e.tt = 10] = "tt", e[e.oppo_apk = 11] = "oppo_apk", 
e[e.vivo_apk = 12] = "vivo_apk", e[e.huawei_apk = 13] = "huawei_apk", e[e.hw_qg = 1e3] = "hw_qg", 
e[e.meizu_apk = 19] = "meizu_apk", e[e.lenovo_apk = 20] = "lenovo_apk", e[e.kupai_apk = 21] = "kupai_apk", 
e[e.jinli_apk = 22] = "jinli_apk", e[e.apk = 607e3] = "apk", e[e.ipa = 609e3] = "ipa", 
e[e.jdw_oppo_apk = 607010] = "jdw_oppo_apk", e[e.jdw_vivo_apk = 607020] = "jdw_vivo_apk", 
e[e.jdw_xm_apk = 607030] = "jdw_xm_apk", e[e.jdw_233_apk = 607233] = "jdw_233_apk";
}(e.e_channel_id || (e.e_channel_id = {})), function(e) {
e[e.oppo = 1001] = "oppo", e[e.oppo_qg = 1002] = "oppo_qg";
}(e.e_sub_channel_id || (e.e_sub_channel_id = {})), function(e) {
e[e.unknown = 0] = "unknown", e[e.ios = 1] = "ios", e[e.android = 2] = "android", 
e[e.desktop = 3] = "desktop";
}(e.e_device || (e.e_device = {})), function(e) {
e[e.normal = 0] = "normal", e[e.invite = 1] = "invite", e[e.card = 2] = "card", 
e[e.record = 3] = "record";
}(e.e_share_type || (e.e_share_type = {})), function(e) {
e[e.click_multual_push_icon = 30001] = "click_multual_push_icon", e[e.show_more_game_modal = 30002] = "show_more_game_modal", 
e[e.more_game_btn_tap = 30003] = "more_game_btn_tap", e[e.on_navigate_to_miniProgram = 30004] = "on_navigate_to_miniProgram", 
e[e.on_more_games_modal_close = 30005] = "on_more_games_modal_close", e[e.on_show_more_game_modal_success = 30006] = "on_show_more_game_modal_success", 
e[e.on_show_more_game_modal_fail = 30007] = "on_show_more_game_modal_fail";
}(e.e_multual_push_report || (e.e_multual_push_report = {})), function(e) {
e[e.share_record_success = 500001] = "share_record_success", e[e.share_record_less_time = 500002] = "share_record_less_time", 
e[e.share_record_fail = 500003] = "share_record_fail";
}(e.e_inner_video_result || (e.e_inner_video_result = {})), function(e) {
e[e.share = 11e3] = "share";
}(e.e_share_event_type || (e.e_share_event_type = {})), function(e) {
e[e.click = 1] = "click", e[e.new_player = 2] = "new_player", e[e.old_player = 3] = "old_player", 
e[e.click_record = 4] = "click_record", e[e.share_record_success = 5] = "share_record_success", 
e[e.share_record_less_time = 6] = "share_record_less_time", e[e.share_record_fail = 7] = "share_record_fail";
}(e.e_share_event_id || (e.e_share_event_id = {})), function(e) {
e[e.result_sign = 40001] = "result_sign", e[e.result_turntable = 40002] = "result_turntable", 
e[e.result_key = 40003] = "result_key", e[e.result_box = 40004] = "result_box";
}(e.e_general_report || (e.e_general_report = {})), function(e) {
e.EVENT_TYPE_LOGIN = "EVENT_TYPE_LOGIN", e.EVENT_TYPE_LOGOUT = "EVENT_TYPE_LOGOUT", 
e.EVENT_TYPE_PAY = "EVENT_TYPE_PAY", e.EVENT_TYPE_EXIT = "EVENT_TYPE_EXIT", e.EVENT_TYPE_AD = "EVENT_TYPE_AD", 
e.EVENT_TYPE_COMMON = "EVENT_TYPE_COMMON";
}(e.e_apk_event_key || (e.e_apk_event_key = {})), function(e) {
e.CommonEventKey_SwitchLogin = "CommonEventKey_SwitchLogin", e.CommonEventKey_Prepay = "CommonEventKey_Prepay", 
e.CommonEventKey_QueryOrder = "CommonEventKey_QueryOrder", e.CommonEventKey_QueryOrderList = "CommonEventKey_QueryOrderList", 
e.CommonEventKey_ConfirmOrder = "CommonEventKey_ConfirmOrder", e.CommonEventKey_GetUserInfo = "CommonEventKey_GetUserInfo", 
e.CommonEventKey_AgreePrivacy = "CommonEventKey_AgreePrivacy";
}(e.e_comm_event_key || (e.e_comm_event_key = {}));
}(igc || (igc = {})), function(e) {
!function(e) {
e[e.cocos = 1] = "cocos", e[e.laya = 2] = "laya", e[e.egret = 3] = "egret";
}(e.e_engine_type || (e.e_engine_type = {})), function(e) {
e[e.login_channle = 0] = "login_channle", e[e.login_tpf = 1] = "login_tpf", e[e.login_plat = 2] = "login_plat", 
e[e.login_plat_re = 3] = "login_plat_re", e[e.login_without_http = 4] = "login_without_http";
}(e.igc_login_level || (e.igc_login_level = {})), function(e) {
e[e.none = 0] = "none", e[e.error = 1] = "error", e[e.warn = 2] = "warn", e[e.log = 3] = "log";
}(e.e_log_level || (e.e_log_level = {})), e.igc_config = {
release: {
game_param: {},
channel_config: {
1: {
channel_type: e.e_channel_type.web,
app_id: 6e5,
pkg_name: 345,
facade: {
1: "channel_user_web",
2: "channel_pay_web",
8: "channel_ad_web",
4: "channel_share_web",
100: "channel_system_web"
}
},
2: {
channel_type: e.e_channel_type.oppo_qg,
facade: {
1: "channel_user_oppo_qg",
8: "channel_ad_oppo_qg",
100: "channel_system_oppo_qg"
}
},
3: {
channel_type: e.e_channel_type.wx,
facade: {
1: "channel_user_wx",
8: "channel_ad_wx",
4: "channel_share_wx",
100: "channel_system_wx"
}
},
4: {
channel_type: e.e_channel_type.vivo_qg,
facade: {
1: "channel_user_vivo_qg",
8: "channel_ad_vivo_qg",
100: "channel_system_vivo_qg"
}
},
5: {
channel_type: e.e_channel_type.qq,
facade: {
1: "channel_user_qq",
4: "channel_share_qq",
8: "channel_ad_qq",
100: "channel_system_qq"
}
},
7: {
channel_type: e.e_channel_type.apk,
facade: {
1: "channel_user_apk",
8: "channel_ad_apk",
100: "channel_system_apk"
}
},
8: {
channel_type: e.e_channel_type.tt,
facade: {
1: "channel_user_tt",
4: "channel_share_tt",
8: "channel_ad_tt",
100: "channel_system_tt"
}
},
10: {
channel_type: e.e_channel_type.hw_qg,
facade: {
1: "channel_user_hw_qg",
8: "channel_ad_hw_qg",
100: "channel_system_hw_qg"
}
}
}
},
debug: {
game_param: {},
channel_config: {}
}
};
}(igc || (igc = {})), function(e) {
var t = function() {
function t() {
this.storage_keys = [ "igc_nick_name", "igc_avatar" ], this.apk_exit_finish_cb = null, 
this._init = !1, this._channel_type = 0, this.retry_connect_count = 0, this.retry_channel_login = 0, 
this.is_new_player = !1, this.tpf_user_id = "", this.channel_user_id = "", this.tpf_token = "", 
this._tpf_sdk = void 0, this._release = !1, this._force_offline = !1, this._apk_user_info = void 0, 
this._privacy_callback = void 0;
}
return Object.defineProperty(t, "instance", {
get: function() {
return t._instances || (t._instances = new this()), t._instances;
},
enumerable: !1,
configurable: !0
}), Object.defineProperty(t.prototype, "tpf_sdk", {
get: function() {
return t.instance._tpf_sdk;
},
set: function(e) {
t.instance._tpf_sdk = e;
},
enumerable: !1,
configurable: !0
}), Object.defineProperty(t.prototype, "app_config", {
get: function() {
return t.instance._release ? e.igc_config.release : e.igc_config.debug;
},
enumerable: !1,
configurable: !0
}), t.prototype.Update = function() {}, t.prototype.init_wrap = function(a, o) {
console.log("igc igc_main init_wrap"), this._channel_type = a;
var n = {};
for (var _ in o) n[e.e_channel_type[_]] = o[_];
var i = n[a];
console.log("igc igc_main init_warp game_config:" + JSON.stringify(i)), e.igc_main.instance.init_param(i), 
e.igc_main.instance.init(!0), t.instance._init = !0;
}, t.prototype.init = function(e) {
t.instance._release = e, t.instance.init_tpf(t.instance.app_config.game_param), 
t.instance.init_log();
}, t.prototype.set_on_exit_finish = function(e) {
this.apk_exit_finish_cb = e;
}, t.prototype.set_privacy_callback = function(e) {
this._privacy_callback = e;
}, t.prototype.call_from_java = function(t) {
console.log("igc_main call_from_java Run " + JSON.stringify(t)), t.calling_method_params.EventKey === e.e_apk_event_key.EVENT_TYPE_LOGIN ? (this._apk_user_info = t.calling_method_params.Extra, 
e.channel_sdk.instance.login_apk_result(t.calling_method_params)) : t.calling_method_params.EventKey === e.e_apk_event_key.EVENT_TYPE_AD ? e.channel_sdk.instance.ad_apk_result(t.calling_method_params) : t.calling_method_params.EventKey === e.e_apk_event_key.EVENT_TYPE_COMMON ? t.calling_method_params.CommonEventKey === e.e_comm_event_key.CommonEventKey_GetUserInfo ? e.channel_sdk.instance.channel_user_info.nickName = t.calling_method_params.Extra.userName : t.calling_method_params.CommonEventKey === e.e_comm_event_key.CommonEventKey_AgreePrivacy && (console.log("igc ------ do privacy callback"), 
this._privacy_callback && this._privacy_callback()) : t.calling_method_params.EventKey === e.e_apk_event_key.EVENT_TYPE_EXIT && (33 !== t.calling_method_params.ErrorCode && "33" !== t.calling_method_params.ErrorCode || (this.apk_exit_finish_cb && this.apk_exit_finish_cb(), 
e.utils_manager.callJava("org/cocos2dx/javascript/CoCosJSBridge", "exit_finish", "()V")));
}, t.prototype.call_from_java_laya = function(a) {
t.instance.app_config.game_param.channel_type !== e.e_channel_type.apk && t.instance.app_config.game_param.channel_type !== e.e_channel_type.ipa || this.call_from_java(JSON.parse(a.args));
}, t.prototype.call_exit_apk_game = function() {}, t.prototype.call_exit_game_ad = function() {}, 
t.prototype.init_param = function(t) {
console.log("igc_main init_param run -> ", JSON.stringify(t)), e.igc_config.release.game_param = t, 
e.igc_config.debug.game_param = t;
}, t.prototype.init_log = function() {}, t.prototype.login_wrap_without_http = function(e) {
t.instance.tpf_sdk.loginWithoutHttp(e);
}, t.prototype.login_wrap = function() {
t.instance.app_config.game_param.channel_type;
t.instance.app_config.game_param.is_login_soon = !1;
}, t.prototype.init_ad_param = function() {}, t.prototype.navigate_to_mini_program = function(t) {
return e.channel_sdk.instance.navigate_to_mini_program(t);
}, t.prototype.get_plat_type = function(t) {
return t == e.e_channel_type.test ? "test" : t == e.e_channel_type.web ? "web" : t == e.e_channel_type.oppo_qg ? "OPPO_QG" : t == e.e_channel_type.wx ? "WECHAT" : t == e.e_channel_type.vivo_qg ? "VIVO_QG" : t == e.e_channel_type.ddz ? "DDZ" : t == e.e_channel_type.qq ? "QQ_NEW" : t == e.e_channel_type.apk ? "APK" : t == e.e_channel_type.tt ? "TT" : t == e.e_channel_type.ipa ? "ipa" : "test";
}, t.prototype.init_tpf = function(a) {
t.instance.tpf_sdk = window.tpfclientsdk.getBuilder().setParam("appId", a.app_id).setParam("channelId", a.channel_id).setParam("appKey", a.login_key).setParam("platType", t.instance.get_plat_type(a.channel_type)).setParam("version", a.app_version).setParam("statAppKey", a.stat_key).setParam("statEventUrl", a.stat_event_url).setParam("wsCertUrl", a.ws_cert_url).setParam("batchStatEventUrl", a.batch_stat_event_url).setParam("configUrl", a.configUrl).setParam("configAppSecKey", a.configAppSecKey).build(), 
t.instance.tpf_sdk.init(), t.instance.init_config(), t.instance.init_channel(t.instance.app_config), 
e.stat_manager.instance.init(), e.stat_manager.instance.send_app_start();
}, t.prototype.init_channel = function(t) {
var a = t.game_param.channel_type, o = t.channel_config[a];
e.channel_sdk.instance.init(t.game_param, o);
}, t.prototype.init_config = function() {}, t.prototype.only_login_channel = function(t) {
var a = this;
e.channel_sdk.instance.login({}, function(o) {
if (o.errorcode !== e.e_channel_code.login_success) console.error("igc_main:only_errorin_channel", "login channel failed", o), 
a.retry_channel_login < 5 && (a.retry_channel_login++, setTimeout(function() {
a.only_login_channel(t);
}, 1e3)), console.log("igc_main:login", "login channel failed", o); else {
if (a.retry_channel_login = 0, o.channel_user_info.uid) a.tpf_user_id = o.channel_user_info.uid, 
a.channel_user_id = o.channel_user_info.uid, a.tpf_token = ""; else {
var n = localStorage.getItem("igc_random_uid");
if (n && "" != n) a.tpf_user_id = n, a.channel_user_id = n, a.tpf_token = ""; else {
var _ = e.utils_manager.get_random_name();
a.tpf_user_id = _, a.channel_user_id = _, a.tpf_token = "", localStorage.setItem("igc_random_uid", _);
}
o.channel_user_info.uid = a.tpf_user_id;
}
e.stat_manager.instance.set_uid(a.tpf_user_id, a.tpf_user_id, 1), e.stat_manager.instance._account = a.tpf_user_id, 
t && t(o);
}
});
}, t.prototype.create_ad = function(t) {
return e.channel_sdk.instance.create_ad(t);
}, t.prototype.destroy_ad = function(t) {
return e.channel_sdk.instance.destroy_ad(t);
}, t.prototype.show_ad = function(t) {
return e.channel_sdk.instance.show_ad(t);
}, t.prototype.hide_ad = function(t) {
return e.channel_sdk.instance.hide_ad(t);
}, t.prototype.has_ad = function(t) {
return e.channel_sdk.instance.has_ad(t);
}, t.prototype.set_ad_position = function(t) {
return e.channel_sdk.instance.set_ad_position(t);
}, t.prototype.report_ad_show = function(t) {
return e.channel_sdk.instance.report_ad_show(t);
}, t.prototype.report_ad_click = function(t) {
return e.channel_sdk.instance.report_ad_click(t);
}, t.prototype.report_ad_close = function(t) {
return e.channel_sdk.instance.report_ad_close(t);
}, t.prototype.device_shake = function(t) {
return e.channel_sdk.instance.device_shake(t);
}, t.prototype.check_can_add_desktop = function(t) {
return e.channel_sdk.instance.check_can_add_desktop(t);
}, t.prototype.check_is_add_desktop = function(t) {
return e.channel_sdk.instance.check_is_add_desktop(t);
}, t.prototype.add_desktop = function(t) {
return e.channel_sdk.instance.add_desktop(t);
}, t.prototype.on_show = function(t) {
return e.channel_sdk.instance.on_show(t);
}, t.prototype.on_hide = function(t) {
return e.channel_sdk.instance.on_hide(t);
}, t.prototype.get_system_info_sync = function() {
return e.channel_sdk.instance.get_system_info_sync();
}, t.prototype.share = function(t) {
return e.channel_sdk.instance.share(t);
}, t.prototype.on_share_app_message = function(t) {
return e.channel_sdk.instance.on_share_app_message(t);
}, t.prototype.start_record_screen = function(t) {
return e.channel_sdk.instance.start_record_screen(t);
}, t.prototype.stop_record_screen = function() {
return e.channel_sdk.instance.stop_record_screen();
}, t.prototype.pause_record_screen = function() {
return e.channel_sdk.instance.pause_record_screen();
}, t.prototype.resume_record_screen = function() {
return e.channel_sdk.instance.resume_record_screen();
}, t.prototype.share_record_screen = function(t) {
return e.channel_sdk.instance.share_record_screen(t);
}, t.prototype.get_record_video = function() {
return e.channel_sdk.instance.get_record_video();
}, t.prototype.get_launch_options_sync = function() {
return e.channel_sdk.instance.get_launch_options_sync();
}, t.prototype.exit_mini_program = function() {
return e.channel_sdk.instance.exit_mini_program();
}, t.prototype.jump_leisure_subject = function() {
return e.channel_sdk.instance.jump_leisure_subject();
}, t._instances = void 0, t;
}();
e.igc_main = t;
}(igc || (igc = {})), window && (window.igc = igc), function(e) {
!function(e) {
e[e.support_error = -5] = "support_error", e[e.param_error = -4] = "param_error", 
e[e.param_not_complete = -3] = "param_not_complete", e[e.network_error = -2] = "network_error", 
e[e.fail = -1] = "fail", e[e.success = 0] = "success", e[e.init_success = 1] = "init_success", 
e[e.init_fail = 2] = "init_fail", e[e.uninit = 3] = "uninit", e[e.login_success = 4] = "login_success", 
e[e.login_fail = 5] = "login_fail", e[e.login_timeout = 6] = "login_timeout", e[e.unlogin = 7] = "unlogin", 
e[e.logout_success = 8] = "logout_success", e[e.logout_fail = 9] = "logout_fail", 
e[e.pay_success = 10] = "pay_success", e[e.pay_fail = 11] = "pay_fail", e[e.share_success = 12] = "share_success", 
e[e.share_failed = 13] = "share_failed";
}(e.e_channel_code || (e.e_channel_code = {}));
}(igc || (igc = {})), function(e) {
var t = function() {
function e() {}
return e.init = function(t, a) {
e.config.game_param = t, e.config.channel_param = a;
}, e.config = {}, e;
}();
e.channel_config = t;
}(igc || (igc = {})), function(e) {
var t = function() {
function t() {
this.channel_config = {};
}
return Object.defineProperty(t, "instance", {
get: function() {
return t._instances || (t._instances = new this()), t._instances;
},
enumerable: !1,
configurable: !0
}), t.prototype.init = function(e) {
this.channel_config = e;
}, t.prototype.check_support_facade = function(t) {
return !(!e.channel_config.config.channel_param.facade || !e.channel_config.config.channel_param.facade[t]);
}, t.prototype.get_facade_name = function(t) {
if (e.channel_config.config.channel_param.facade[t]) return e.channel_config.config.channel_param.facade[t];
}, t.prototype.init_facade = function(t) {
if (this.check_support_facade(t)) {
var a = this.get_facade_name(t);
return null != a && e[a] ? new e[a]() : void 0;
}
}, t.prototype.diy_eval = function(e) {
return new Function("return " + e);
}, t._instances = void 0, t;
}();
e.channel_facade_manager = t;
}(igc || (igc = {})), function(e) {
var t = function() {
function t() {
this._channel_user_info = {}, this._is_login = !1;
}
return Object.defineProperty(t, "instance", {
get: function() {
return t._instances || (t._instances = new this()), t._instances;
},
enumerable: !1,
configurable: !0
}), Object.defineProperty(t.prototype, "channel_user_info", {
get: function() {
return t.instance._channel_user_info;
},
set: function(e) {
t.instance._channel_user_info = e, t.instance._is_login = !0;
},
enumerable: !1,
configurable: !0
}), t.prototype.init = function(t, a) {
e.channel_config.init(t, a), e.channel_facade_manager.instance.init(a), e.channel_module_user.instance.init(), 
e.channel_module_pay.instance.init(), e.channel_module_ad_xx.instance.init(), e.channel_module_share.instance.init(), 
e.channel_module_system.instance.init();
}, t.prototype.login = function(a, o) {
t.instance._is_login ? o && o({
errorcode: e.e_channel_code.login_success,
errormsg: "",
sdk_errorcode: 0,
sdk_errormsg: "",
channel_user_info: t.instance.channel_user_info
}) : e.channel_module_user.instance.login(a, o);
}, t.prototype.pay = function(a, o) {
t.instance._is_login ? e.channel_module_pay.instance.pay(a, o) : o && o({
errorcode: e.e_channel_code.unlogin,
errormsg: "fail",
sdk_errorcode: -1,
sdk_errormsg: {}
});
}, t.prototype.login_apk_result = function(t) {
return e.channel_module_user.instance.login_apk_result(t);
}, t.prototype.ad_apk_result = function(t) {
return e.channel_module_ad_xx.instance.ad_apk_result(t);
}, t.prototype.create_ad = function(t) {
return e.channel_module_ad_xx.instance.create_ad(t);
}, t.prototype.destroy_ad = function(t) {
return e.channel_module_ad_xx.instance.destroy_ad(t);
}, t.prototype.show_ad = function(t) {
return e.channel_module_ad_xx.instance.show_ad(t);
}, t.prototype.hide_ad = function(t) {
return e.channel_module_ad_xx.instance.hide_ad(t);
}, t.prototype.has_ad = function(t) {
return e.channel_module_ad_xx.instance.has_ad(t);
}, t.prototype.set_ad_position = function(t) {
return e.channel_module_ad_xx.instance.set_ad_position(t);
}, t.prototype.report_ad_show = function(t) {
return e.channel_module_ad_xx.instance.report_ad_show(t);
}, t.prototype.report_ad_click = function(t) {
return e.channel_module_ad_xx.instance.report_ad_click(t);
}, t.prototype.report_ad_close = function(t) {
return e.channel_module_ad_xx.instance.report_ad_close(t);
}, t.prototype.load_ad_just = function(t) {
return e.channel_module_ad_xx.instance.load_ad_just(t);
}, t.prototype.show_ad_just = function(t) {
return e.channel_module_ad_xx.instance.show_ad_just(t);
}, t.prototype.show_loading = function(t) {
return e.channel_module_user.instance.show_loading(t);
}, t.prototype.show_toast = function(t) {
return e.channel_module_user.instance.show_toast(t);
}, t.prototype.show_modal = function(t) {
return e.channel_module_user.instance.show_modal(t);
}, t.prototype.on_show = function(t) {
return e.channel_module_system.instance.on_show(t);
}, t.prototype.on_hide = function(t) {
return e.channel_module_system.instance.on_hide(t);
}, t.prototype.navigate_to_mini_program = function(t) {
return e.channel_module_system.instance.navigate_to_mini_program(t);
}, t.prototype.get_launch_options_sync = function() {
return e.channel_module_system.instance.get_launch_options_sync();
}, t.prototype.exit_mini_program = function() {
return e.channel_module_system.instance.exit_mini_program();
}, t.prototype.jump_leisure_subject = function() {
return e.channel_module_system.instance.jump_leisure_subject();
}, t.prototype.show_more_game_modal = function() {
return e.channel_module_user.instance.show_more_game_modal();
}, t.prototype.check_show_more_game = function(t) {
return e.channel_module_user.instance.check_show_more_game(t);
}, t.prototype.more_game_btn_tap = function() {
return e.channel_module_user.instance.more_game_btn_tap();
}, t.prototype.more_game_btn_show = function() {
return e.channel_module_user.instance.more_game_btn_show();
}, t.prototype.more_game_btn_hide = function() {
return e.channel_module_user.instance.more_game_btn_hide();
}, t.prototype.get_invite_query = function() {
return e.channel_module_user.instance.get_invite_query();
}, t.prototype.set_show_share_menu = function(t) {
return e.channel_module_user.instance.set_show_share_menu(t);
}, t.prototype.get_system_info_sync = function() {
return e.channel_module_system.instance.get_system_info_sync();
}, t.prototype.create_inner_audio_context = function(t) {
return e.channel_module_user.instance.create_inner_audio_context(t);
}, t.prototype.post_message = function(t) {
return e.channel_module_user.instance.post_message(t);
}, t.prototype.set_user_cloud_storage = function(t) {
return e.channel_module_user.instance.set_user_cloud_storage(t);
}, t.prototype.get_setting = function(t) {
return e.channel_module_user.instance.get_setting(t);
}, t.prototype.create_user_info_button = function(t) {
return e.channel_module_user.instance.create_user_info_button(t);
}, t.prototype.open_setting = function(t) {
return e.channel_module_user.instance.open_setting(t);
}, t.prototype.authorize = function(t) {
return e.channel_module_user.instance.authorize(t);
}, t.prototype.get_device = function(t) {
return e.channel_module_user.instance.get_device(t);
}, t.prototype.device_shake = function(t) {
return e.channel_module_user.instance.device_shake(t);
}, t.prototype.check_can_add_desktop = function(t) {
return e.channel_module_user.instance.check_can_add_desktop(t);
}, t.prototype.check_is_add_desktop = function(t) {
return e.channel_module_user.instance.check_is_add_desktop(t);
}, t.prototype.add_desktop = function(t) {
return e.channel_module_user.instance.add_desktop(t);
}, t.prototype.share = function(t) {
return e.channel_module_share.instance.share(t);
}, t.prototype.on_share_app_message = function(t) {
return e.channel_module_share.instance.on_share_app_message(t);
}, t.prototype.start_record_screen = function(t) {
return e.channel_module_share.instance.start_record_screen(t);
}, t.prototype.stop_record_screen = function() {
return e.channel_module_share.instance.stop_record_screen();
}, t.prototype.pause_record_screen = function() {
return e.channel_module_share.instance.pause_record_screen();
}, t.prototype.resume_record_screen = function() {
return e.channel_module_share.instance.resume_record_screen();
}, t.prototype.share_record_screen = function(t) {
return e.channel_module_share.instance.share_record_screen(t);
}, t.prototype.get_record_video = function() {
return e.channel_module_share.instance.get_record_video();
}, t._instances = void 0, t;
}();
e.channel_sdk = t;
}(igc || (igc = {})), function(e) {
var t = function() {
function e() {
this.support_method = {};
}
return e.prototype.init = function() {}, e.prototype.check_support_method = function(e) {
return !!this.support_method[e];
}, e.prototype.check_param = function() {
return !1;
}, e;
}();
e.channel_facade_aa_base = t;
}(igc || (igc = {})), function(e) {
var t = function(e) {
function t() {
var t = null !== e && e.apply(this, arguments) || this;
return t.ad_queue = {}, t;
}
return __extends(t, e), t.prototype.create_ad = function() {}, t.prototype.destroy_ad = function() {}, 
t.prototype.show_ad = function() {}, t.prototype.hide_ad = function() {}, t.prototype.set_ad_position = function() {}, 
t.prototype.report_ad_show = function() {}, t.prototype.report_ad_click = function() {}, 
t.prototype.load_ad_just = function() {}, t.prototype.show_ad_just = function() {}, 
t.prototype.has_ad = function(e) {
var t = this.ad_queue[e.ad_id];
return void 0 !== t && void 0 !== t.ad_instance;
}, t;
}(e.channel_facade_aa_base);
e.channel_facade_ad_base = t;
}(igc || (igc = {})), function(e) {
var t = [ "appID", "userID", "orderID", "thirdUserID", "roleID", "channelID", "pkgID", "isp", "payType", "productID", "productName", "productDesc", "productPrice", "productCount", "productTotalPrice", "currency", "payCallback", "imsi", "imei", "iccid", "ip", "net", "extension", "timestamp" ], a = function(a) {
function o() {
return null !== a && a.apply(this, arguments) || this;
}
return __extends(o, a), o.prototype.check_param = function(e) {
return !!(e.product_id && e.product_price && e.product_count && e.product_total_price);
}, o.prototype.signPart = function(e, t) {
for (var a = "", o = "", n = Object.keys(e).sort(), _ = 0; _ < n.length; ++_) {
var i = n[_];
t.indexOf(i) > -1 && ("" != a && (a += "&"), a += i + "=" + e[i]), "" != o && (o += "&"), 
o += i + "=" + e[i];
}
return o + "&sign=" + window.md5(a).toUpperCase();
}, o.prototype.submit_order = function(a, o, n) {
if (!this.check_param(a)) return n({
retcode: e.e_channel_code.param_error,
param: {}
}), !1;
var _ = a.pay_debug ? a.channel_id_debug : e.channel_config.config.game_param.channel_id, i = a.pay_debug ? a.product_price_debug : a.product_price, s = a.pay_debug ? a.product_total_price_debug : a.product_total_price, d = {
appID: e.channel_config.config.game_param.app_id,
userID: a.tpf_user_id,
thirdUserID: e.channel_sdk.instance.channel_user_info.uid,
roleID: "",
channelID: _,
pkgID: "",
isp: 1,
payType: 1,
productID: a.product_id,
productName: a.product_name,
productDesc: a.product_desc,
productPrice: i,
productCount: a.product_count,
productTotalPrice: s,
currency: "CNY",
payCallback: "",
imsi: "",
imei: "",
iccid: "",
ip: "",
net: "",
extension: o,
timestamp: Date.now() + "",
cliVersion: e.channel_config.config.game_param.app_version
}, r = this.signPart(d, t);
window.HttpUtils.http_request("POST", e.channel_config.config.game_param.pay_url, {
"Content-Type": "application/x-www-form-urlencoded"
}, r, !1, function(t, a) {
if (200 == t) if (0 == (a = JSON.parse(a)).errorCode && "" !== a.extension) {
var o = {
retcode: e.e_channel_code.success,
param: {
order_id: a.orderID,
callback_url: JSON.parse(a.extension).callbackUrl,
orderNo: JSON.parse(a.extension).orderNo,
timestamp: JSON.parse(a.extension).timestamp,
paySign: JSON.parse(a.extension).paySign
}
};
n(o);
} else n({
retcode: e.e_channel_code.fail,
param: {}
}); else n({
retcode: e.e_channel_code.fail,
param: {}
});
});
}, o.prototype.retry_query_order = function(e, t, a, o) {
var n = this;
return 0 < e.retry_times && (--e.retry_times, setTimeout(function() {
n.query_order(e, t, a, o);
}, e.retry_inteval), !0);
}, o.prototype.query_order = function(a, o, n, _) {
var i = this, s = a.pay_debug ? a.channel_id_debug : e.channel_config.config.game_param.channel_id, d = (a.pay_debug ? a.product_price_debug : a.product_price, 
a.pay_debug ? a.product_total_price_debug : a.product_total_price, {
appID: e.channel_config.config.game_param.app_id,
userID: a.tpf_user_id,
orderID: o.order_id,
channelID: s,
extension: n,
timestamp: Date.now() + ""
}), r = this.signPart(d, t);
window.HttpUtils.http_request("POST", e.channel_config.config.game_param.pay_query_url, {
"Content-Type": "application/x-www-form-urlencoded"
}, r, !1, function(t, s) {
if (200 == t) {
if (0 == (s = JSON.parse(s)).errorCode) {
if (0 == s.payResult) {
if (_) {
var d = {
retcode: e.e_channel_code.pay_success,
param: {
orderID: o.order_id,
productID: s.productID,
productCount: s.productCount,
payMoney: s.payMoney
}
};
_(d);
}
} else if (!i.retry_query_order(a, o, n, _)) {
e.e_channel_code.pay_fail, o.order_id;
_(d);
}
} else if (!i.retry_query_order(a, o, n, _)) {
e.e_channel_code.pay_fail, o.order_id;
_(d);
}
} else if (!i.retry_query_order(a, o, n, _)) {
e.e_channel_code.pay_fail, o.order_id;
_(d);
}
});
}, o.prototype.pay = function() {}, o.prototype.on_pay_result = function() {}, o;
}(e.channel_facade_aa_base);
e.channel_facade_pay_base = a;
}(igc || (igc = {})), function(e) {
var t = function(e) {
function t() {
return null !== e && e.apply(this, arguments) || this;
}
return __extends(t, e), t.prototype.share = function() {}, t.prototype.on_share_app_message = function() {}, 
t.prototype.start_record_screen = function() {}, t.prototype.stop_record_screen = function() {}, 
t.prototype.pause_record_screen = function() {}, t.prototype.resume_record_screen = function() {}, 
t.prototype.share_record_screen = function() {}, t.prototype.get_record_video = function() {}, 
t;
}(e.channel_facade_aa_base);
e.channel_facade_share_base = t;
}(igc || (igc = {})), function(e) {
var t = function(e) {
function t() {
return null !== e && e.apply(this, arguments) || this;
}
return __extends(t, e), t.prototype.get_system_info_sync = function() {}, t.prototype.get_launch_options_sync = function() {}, 
t.prototype.on_show = function() {}, t.prototype.on_hide = function() {}, t.prototype.exit_mini_program = function() {}, 
t.prototype.jump_leisure_subject = function() {}, t.prototype.navigate_to_mini_program = function() {}, 
t;
}(e.channel_facade_aa_base);
e.channel_facade_system_base = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.login = function() {}, a.prototype.share = function() {}, 
a.prototype.on_login_result = function() {}, a.prototype.create_channel_user_info = function() {
return "";
}, a.prototype.config_channel_user_info = function(t, a) {
var o = a(t);
return e.channel_sdk.instance.channel_user_info = o, o;
}, a.prototype.get_random_name = function() {
for (var e = "role_", t = [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" ], a = 0; a < 8; a++) e += t[Math.round(Math.random() * (t.length - 1))];
return e;
}, a;
}(e.channel_facade_aa_base);
e.channel_facade_user_base = t;
}(igc || (igc = {})), function(e) {
var t = function() {
function t() {
this.facade_obj = void 0;
}
return Object.defineProperty(t, "instance", {
get: function() {
return t._instances || (t._instances = new this()), t._instances;
},
enumerable: !1,
configurable: !0
}), t.prototype.init = function() {
this.facade_obj = e.channel_facade_manager.instance.init_facade(e.e_facade_type.ad), 
this.facade_obj && this.facade_obj.init();
}, t.prototype.check_support_method = function(e) {
return void 0 !== this.facade_obj && this.facade_obj.check_support_method(e);
}, t.prototype.ad_apk_result = function(t) {
return !!this.check_support_method(e.e_method_type.ad_apk_result) && this.facade_obj.ad_apk_result(t);
}, t.prototype.create_ad = function(t) {
return !!this.check_support_method(e.e_method_type.create_ad) && this.facade_obj.create_ad(t);
}, t.prototype.destroy_ad = function(t) {
return !!this.check_support_method(e.e_method_type.destroy_ad) && this.facade_obj.destroy_ad(t);
}, t.prototype.show_ad = function(t) {
return !!this.check_support_method(e.e_method_type.show_ad) && this.facade_obj.show_ad(t);
}, t.prototype.hide_ad = function(t) {
return !!this.check_support_method(e.e_method_type.hide_ad) && this.facade_obj.hide_ad(t);
}, t.prototype.has_ad = function(t) {
return !!this.check_support_method(e.e_method_type.has_ad) && this.facade_obj.has_ad(t);
}, t.prototype.set_ad_position = function(t) {
return !!this.check_support_method(e.e_method_type.set_ad_position) && this.facade_obj.set_ad_position(t);
}, t.prototype.report_ad_show = function(t) {
return !!this.check_support_method(e.e_method_type.report_ad_show) && this.facade_obj.report_ad_show(t);
}, t.prototype.report_ad_click = function(t) {
return !!this.check_support_method(e.e_method_type.report_ad_click) && this.facade_obj.report_ad_click(t);
}, t.prototype.report_ad_close = function(t) {
return !!this.check_support_method(e.e_method_type.report_ad_close) && this.facade_obj.report_ad_close(t);
}, t.prototype.load_ad_just = function(t) {
return !!this.check_support_method(e.e_method_type.load_ad_just) && this.facade_obj.load_ad_just(t);
}, t.prototype.show_ad_just = function(t) {
return !!this.check_support_method(e.e_method_type.show_ad_just) && this.facade_obj.show_ad_just(t);
}, t._instances = void 0, t;
}();
e.channel_module_ad_xx = t;
}(igc || (igc = {})), function(e) {
var t = function() {
function t() {
this.facade_obj = void 0;
}
return Object.defineProperty(t, "instance", {
get: function() {
return t._instances || (t._instances = new this()), t._instances;
},
enumerable: !1,
configurable: !0
}), t.prototype.init = function() {
this.facade_obj = e.channel_facade_manager.instance.init_facade(e.e_facade_type.pay), 
this.facade_obj && this.facade_obj.init();
}, t.prototype.check_support_method = function(e) {
return null != this.facade_obj && this.facade_obj.check_support_method(e);
}, t.prototype.pay = function(t, a) {
this.check_support_method(e.e_method_type.login) ? this.facade_obj.pay(t, a) : a && a({
errorcode: e.e_channel_code.support_error,
errormsg: "",
sdk_errorcode: -1,
sdk_errormsg: ""
});
}, t._instances = void 0, t;
}();
e.channel_module_pay = t;
}(igc || (igc = {})), function(e) {
var t = function() {
function t() {
this.facade_obj = void 0;
}
return Object.defineProperty(t, "instance", {
get: function() {
return t._instances || (t._instances = new this()), t._instances;
},
enumerable: !1,
configurable: !0
}), t.prototype.init = function() {
this.facade_obj = e.channel_facade_manager.instance.init_facade(e.e_facade_type.share), 
this.facade_obj && this.facade_obj.init();
}, t.prototype.check_support_method = function(e) {
return void 0 !== this.facade_obj && this.facade_obj.check_support_method(e);
}, t.prototype.share = function(t) {
return !!this.check_support_method(e.e_method_type.share) && (e.stat_manager.instance.send_user_event(e.e_share_event_id.click, e.e_share_event_type.share, 0, 0, ""), 
this.facade_obj.share(t));
}, t.prototype.on_share_app_message = function(t) {
return !!this.check_support_method(e.e_method_type.on_share_app_message) && this.facade_obj.on_share_app_message(t);
}, t.prototype.start_record_screen = function(t) {
return !!this.check_support_method(e.e_method_type.start_record_screen) && this.facade_obj.start_record_screen(t);
}, t.prototype.stop_record_screen = function() {
return !!this.check_support_method(e.e_method_type.stop_record_screen) && this.facade_obj.stop_record_screen();
}, t.prototype.pause_record_screen = function() {
return !!this.check_support_method(e.e_method_type.pause_record_screen) && this.facade_obj.pause_record_screen();
}, t.prototype.resume_record_screen = function() {
return !!this.check_support_method(e.e_method_type.resume_record_screen) && this.facade_obj.resume_record_screen();
}, t.prototype.share_record_screen = function(t) {
return !!this.check_support_method(e.e_method_type.share_record_screen) && this.facade_obj.share_record_screen(t);
}, t.prototype.get_record_video = function() {
return !!this.check_support_method(e.e_method_type.get_record_video) && this.facade_obj.get_record_video();
}, t._instances = void 0, t;
}();
e.channel_module_share = t;
}(igc || (igc = {})), function(e) {
var t = function() {
function t() {
this.facade_obj = void 0;
}
return Object.defineProperty(t, "instance", {
get: function() {
return t._instances || (t._instances = new this()), t._instances;
},
enumerable: !1,
configurable: !0
}), t.prototype.init = function() {
this.facade_obj = e.channel_facade_manager.instance.init_facade(e.e_facade_type.system), 
this.facade_obj && this.facade_obj.init();
}, t.prototype.check_support_method = function(e) {
return void 0 !== this.facade_obj && this.facade_obj.check_support_method(e);
}, t.prototype.get_system_info_sync = function() {
return !!this.check_support_method(e.e_method_type.get_system_info_sync) && this.facade_obj.get_system_info_sync();
}, t.prototype.get_launch_options_sync = function() {
return !!this.check_support_method(e.e_method_type.get_launch_options_sync) && this.facade_obj.get_launch_options_sync();
}, t.prototype.on_show = function(t) {
return !!this.check_support_method(e.e_method_type.on_show) && this.facade_obj.on_show(t);
}, t.prototype.on_hide = function(t) {
return !!this.check_support_method(e.e_method_type.on_hide) && this.facade_obj.on_hide(t);
}, t.prototype.exit_mini_program = function() {
return !!this.check_support_method(e.e_method_type.exit_mini_program) && this.facade_obj.exit_mini_program();
}, t.prototype.jump_leisure_subject = function() {
return !!this.check_support_method(e.e_method_type.jump_leisure_subject) && this.facade_obj.jump_leisure_subject();
}, t.prototype.navigate_to_mini_program = function(t) {
return !!this.check_support_method(e.e_method_type.navigate_to_mini_program) && this.facade_obj.navigate_to_mini_program(t);
}, t._instances = void 0, t;
}();
e.channel_module_system = t;
}(igc || (igc = {})), function(e) {
var t = function() {
function t() {
this.facade_obj = void 0;
}
return Object.defineProperty(t, "instance", {
get: function() {
return t._instances || (t._instances = new this()), t._instances;
},
enumerable: !1,
configurable: !0
}), t.prototype.init = function() {
this.facade_obj = e.channel_facade_manager.instance.init_facade(e.e_facade_type.user), 
this.facade_obj && this.facade_obj.init();
}, t.prototype.share = function(t) {
return !!this.check_support_method(e.e_method_type.share) && this.facade_obj.share(t);
}, t.prototype.show_loading = function(t) {
return !!this.check_support_method(e.e_method_type.show_loading) && this.facade_obj.show_loading(t);
}, t.prototype.show_toast = function(t) {
return !!this.check_support_method(e.e_method_type.show_toast) && this.facade_obj.show_toast(t);
}, t.prototype.show_modal = function(t) {
return !!this.check_support_method(e.e_method_type.show_modal) && this.facade_obj.show_modal(t);
}, t.prototype.on_show = function(t) {
return !!this.check_support_method(e.e_method_type.on_show) && this.facade_obj.on_show(t);
}, t.prototype.on_hide = function(t) {
return !!this.check_support_method(e.e_method_type.on_hide) && this.facade_obj.on_hide(t);
}, t.prototype.navigate_to_mini_program = function(t) {
return !!this.check_support_method(e.e_method_type.navigate_to_mini_program) && this.facade_obj.navigate_to_mini_program(t);
}, t.prototype.get_launch_options_sync = function() {
return !!this.check_support_method(e.e_method_type.get_launch_options_sync) && this.facade_obj.get_launch_options_sync();
}, t.prototype.show_more_game_modal = function() {
return !!this.check_support_method(e.e_method_type.show_more_game_modal) && this.facade_obj.show_more_game_modal();
}, t.prototype.check_show_more_game = function(t) {
return !!this.check_support_method(e.e_method_type.check_show_more_game) && this.facade_obj.check_show_more_game(t);
}, t.prototype.more_game_btn_tap = function() {
return !!this.check_support_method(e.e_method_type.more_game_btn_tap) && this.facade_obj.more_game_btn_tap();
}, t.prototype.more_game_btn_show = function() {
return !!this.check_support_method(e.e_method_type.more_game_btn_show) && this.facade_obj.more_game_btn_show();
}, t.prototype.more_game_btn_hide = function() {
return !!this.check_support_method(e.e_method_type.more_game_btn_hide) && this.facade_obj.more_game_btn_hide();
}, t.prototype.get_invite_query = function() {
return !!this.check_support_method(e.e_method_type.get_invite_query) && this.facade_obj.get_invite_query();
}, t.prototype.set_show_share_menu = function(t) {
return !!this.check_support_method(e.e_method_type.set_show_share_menu) && this.facade_obj.set_show_share_menu(t);
}, t.prototype.get_system_info_sync = function(t) {
return !!this.check_support_method(e.e_method_type.get_system_info_sync) && this.facade_obj.get_system_info_sync(t);
}, t.prototype.create_inner_audio_context = function(t) {
return !!this.check_support_method(e.e_method_type.create_inner_audio_context) && this.facade_obj.create_inner_audio_context(t);
}, t.prototype.post_message = function(t) {
return !!this.check_support_method(e.e_method_type.post_message) && this.facade_obj.post_message(t);
}, t.prototype.set_user_cloud_storage = function(t) {
return !!this.check_support_method(e.e_method_type.set_user_cloud_storage) && this.facade_obj.set_user_cloud_storage(t);
}, t.prototype.get_setting = function(t) {
return !!this.check_support_method(e.e_method_type.get_setting) && this.facade_obj.get_setting(t);
}, t.prototype.create_user_info_button = function(t) {
return !!this.check_support_method(e.e_method_type.create_user_info_button) && this.facade_obj.create_user_info_button(t);
}, t.prototype.open_setting = function(t) {
return !!this.check_support_method(e.e_method_type.open_setting) && this.facade_obj.open_setting(t);
}, t.prototype.authorize = function(t) {
return !!this.check_support_method(e.e_method_type.authorize) && this.facade_obj.authorize(t);
}, t.prototype.get_device = function(t) {
return !!this.check_support_method(e.e_method_type.get_device) && this.facade_obj.get_device(t);
}, t.prototype.check_support_method = function(e) {
return null != this.facade_obj && this.facade_obj.check_support_method(e);
}, t.prototype.login = function(t, a) {
this.check_support_method(e.e_method_type.login) ? this.facade_obj.login(t, a) : a && a({
errorcode: e.e_channel_code.support_error,
errormsg: "",
sdk_errorcode: -1,
sdk_errormsg: ""
});
}, t.prototype.login_apk_result = function(t) {
return this.check_support_method(e.e_method_type.login_apk_result) ? (console.log("igc ----- login success"), 
this.facade_obj.login_apk_result(t)) : (console.log("igc ----- do not support login"), 
!1);
}, t.prototype.device_shake = function(t) {
return !!this.check_support_method(e.e_method_type.device_shake) && this.facade_obj.device_shake(t);
}, t.prototype.check_can_add_desktop = function(t) {
return !!this.check_support_method(e.e_method_type.check_can_add_desktop) && this.facade_obj.check_can_add_desktop(t);
}, t.prototype.check_is_add_desktop = function(t) {
return !!this.check_support_method(e.e_method_type.check_is_add_desktop) && this.facade_obj.check_is_add_desktop(t);
}, t.prototype.add_desktop = function(t) {
return !!this.check_support_method(e.e_method_type.add_desktop) && this.facade_obj.add_desktop(t);
}, t._instances = void 0, t;
}();
e.channel_module_user = t;
}(igc || (igc = {})), function(e) {
var t = function() {
function t() {
this.ad_instance = null, this.ad_param = null, this.ad_status = e.e_ad_status.none, 
this.ad_op = e.e_ad_op.none;
}
return t.prototype.get_ad_type_name = function(t) {
switch (t) {
case e.e_ad_type.interstitial:
return "interstitial";

case e.e_ad_type.video:
return "video";

case e.e_ad_type.native:
return "native";

case e.e_ad_type.banner:
return "banner";

case e.e_ad_type.splash:
return "splash";

case e.e_ad_type.app_box:
return "app_box";

case e.e_ad_type.feed:
return "feed";

case e.e_ad_type.full_screen_video:
return "full_screen_video";
}
return "";
}, t.prototype.get_ad_event_name = function(t) {
switch (t) {
case e.e_ad_event.visible:
return "visible";

case e.e_ad_event.click:
return "click";

case e.e_ad_event.req:
return "req";

case e.e_ad_event.show:
return "show";

case e.e_ad_event.click:
return "click";

case e.e_ad_event.hide:
return "hide";

case e.e_ad_event.onload:
return "onload";

case e.e_ad_event.onshow:
return "onshow";

case e.e_ad_event.onhide:
return "onhide";

case e.e_ad_event.onclose:
return "onclose";

case e.e_ad_event.onerror:
return "onerror";
}
return t + "";
}, t.prototype.release = function() {
this.ad_instance = null, this.ad_param = null, this.ad_status = e.e_ad_status.none, 
this.ad_op = e.e_ad_op.none;
}, t.prototype.create = function() {}, t.prototype.hide_ad = function() {}, t.prototype.show_ad = function() {}, 
t.prototype.set_ad_position = function() {}, t.prototype.destroy_ad = function() {}, 
t.prototype.report_ad_close = function() {}, t.prototype.report_ad_show = function() {}, 
t.prototype.report_ad_click = function() {}, t.prototype.check_param = function(e) {
this.ad_instance || console.log("igc ad_type_name:" + this.get_ad_type_name(e.ad_type) + ",ad_type:" + e.ad_type + ",ad_id:" + e.ad_id + " ad_instance null"), 
this.ad_param ? e.ad_id !== this.ad_param.ad_id && console.log("igc ad_type_name:" + this.get_ad_type_name(e.ad_type) + ",ad_type:" + e.ad_type + ",ad_id:" + e.ad_id + " ad_param error") : console.log("igc ad_type_name:" + this.get_ad_type_name(e.ad_type) + ",ad_type:" + e.ad_type + ",ad_id:" + e.ad_id + " ad_param null");
}, t.prototype.on_load = function(t, a) {
if (t && t.ad_type && t.ad_id) {
console.log("igc ad_type_name:" + this.get_ad_type_name(t.ad_type) + ",ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " on_load"), 
this.check_param(t), this.ad_status = e.e_ad_status.load_success;
t.ad_type !== e.e_ad_type.banner && this.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.onload, "", "", t.ad_scene, "0", this.ad_op), 
t && t.onLoad && t.onLoad(t, a);
}
}, t.prototype.on_close = function(t) {
t && t.ad_type && t.ad_id && (console.log("igc ad_type_name:" + this.get_ad_type_name(t.ad_type) + ",ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " on_close"), 
this.check_param(t), this.ad_status = e.e_ad_status.close);
}, t.prototype.on_error = function(e, t) {
e && e.ad_type && e.ad_id && (console.log("igc ad_type_name:" + this.get_ad_type_name(e.ad_type) + ",ad_type:" + e.ad_type + ",ad_id:" + e.ad_id + " on_error"), 
this.check_param(e), e.onError && e.onError(e, {
error: t
}));
}, t.prototype.on_show = function(t) {
t && t.ad_type && t.ad_id && (console.log("igc ad_type_name:" + this.get_ad_type_name(t.ad_type) + ",ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " on_show"), 
this.check_param(t), this.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.onshow, "", "", t.ad_scene, "0", this.ad_op), 
this.ad_status = e.e_ad_status.show, t.onShow && t.onShow(t));
}, t.prototype.on_hide = function(t) {
t && t.ad_type && t.ad_id && (console.log("igc ad_type_name:" + this.get_ad_type_name(t.ad_type) + ",ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " on_hide"), 
this.check_param(t), this.ad_status = e.e_ad_status.load_success, this.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.onhide, "", "", t.ad_scene, "0", this.ad_op), 
t.onHide && t.onHide(t));
}, t.prototype.send_dot = function(e, t, a, o, n, _, i, s) {
console.log("igc send_dot-> ad_pos_id:" + e + ",ad_type_name:" + this.get_ad_type_name(t) + ",ad_type:" + t + ",ad_event:" + this.get_ad_event_name(a) + ",extra:" + o + ",extra2:" + n + ",ad_scene:" + _ + ",ad_package_id:" + i + ",ad_op:" + s);
}, t;
}();
e.ad_base = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e._has_get_reward = {}, e._loading_ad = {}, e._has_load_ad = {}, e._param_map = {}, 
e;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.support_method[e.e_method_type.create_ad] = !0, 
this.support_method[e.e_method_type.load_ad_just] = !0, this.support_method[e.e_method_type.show_ad] = !0, 
this.support_method[e.e_method_type.hide_ad] = !0, this.support_method[e.e_method_type.has_ad] = !0, 
this.support_method[e.e_method_type.destroy_ad] = !0, this.support_method[e.e_method_type.report_ad_show] = !0, 
this.support_method[e.e_method_type.report_ad_click] = !0, this.support_method[e.e_method_type.report_ad_close] = !0, 
this.support_method[e.e_method_type.ad_apk_result] = !0;
}, a.prototype.get_ad_type = function(t) {
return t.ad_type === e.e_ad_type.banner ? e.e_apk_ad_type.banner : t.ad_type === e.e_ad_type.interstitial ? e.e_apk_ad_type.interstitial : t.ad_type === e.e_ad_type.native ? e.e_apk_ad_type.native_advance : t.ad_type === e.e_ad_type.splash ? e.e_apk_ad_type.splash : t.ad_type === e.e_ad_type.video ? e.e_apk_ad_type.video : t.ad_type === e.e_ad_type.feed ? e.e_apk_ad_type.feed : t.ad_type === e.e_ad_type.full_screen_video ? e.e_apk_ad_type.full_screen_video : t.ad_type === e.e_ad_type.interstitial_video ? e.e_apk_ad_type.interstitial_video : void console.error("channel_ad_apk input ad_type error -> ", t);
}, a.prototype.ad_apk_result = function(t) {
if (t && t.Extra && t.Extra.AdId && t.Extra.AdPosId && this._param_map[t.Extra.AdPosId] && this._param_map[t.Extra.AdPosId].ad_pos_id) if (console.log("channel_ad_apk ad_apk_result run 1 -> " + JSON.stringify(t)), 
console.log("channel_ad_apk ad_apk_result run 2 -> " + JSON.stringify(this._param_map[t.Extra.AdPosId])), 
parseInt(t.ErrorCode) === e.e_apk_error_code.ad_load_success) this._has_load_ad[t.Extra.AdPosId] = !0, 
this.on_load(t.Extra.AdType, this._param_map[t.Extra.AdPosId], !0, t.Extra); else if (parseInt(t.ErrorCode) === e.e_apk_error_code.ad_load_fail) this._has_load_ad[t.Extra.AdPosId] = !1, 
this.on_load(t.Extra.AdType, this._param_map[t.Extra.AdPosId], !1), (a = this._param_map[t.Extra.AdPosId]) && this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onerror, e.e_apk_error_code.ad_load_fail, "", a.ad_scene, "0", "0"); else if (parseInt(t.ErrorCode) === e.e_apk_error_code.ad_show_success) this.on_show(t.Extra.AdType, this._param_map[t.Extra.AdPosId], !0); else if (parseInt(t.ErrorCode) === e.e_apk_error_code.ad_show_fail) {
var a;
this.on_show(t.Extra.AdType, this._param_map[t.Extra.AdPosId], !1), (a = this._param_map[t.Extra.AdPosId]) && this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onerror, e.e_apk_error_code.ad_show_fail, "", a.ad_scene, "0", "0");
} else parseInt(t.ErrorCode) === e.e_apk_error_code.ad_video_complete_reward ? this.on_video_reward(t.Extra.AdType, this._param_map[t.Extra.AdPosId], !0) : parseInt(t.ErrorCode) === e.e_apk_error_code.ad_video_complete || (parseInt(t.ErrorCode) === e.e_apk_error_code.ad_closed ? this.on_close(t.Extra.AdType, this._param_map[t.Extra.AdPosId], !1) : parseInt(t.ErrorCode) === e.e_apk_error_code.ad_clicked && this.on_click(t.Extra.AdType, this._param_map[t.Extra.AdPosId], !1));
}, a.prototype.on_load = function(t, a, o, n) {
if (a && (this._loading_ad[a.ad_pos_id] = !1), o) {
if (parseInt(t) === e.e_apk_ad_type.native_advance) {
console.log("load_ad_complete run ", JSON.stringify(n));
var _ = [], i = {
adUnitId: n.AdId,
title: n.AdTitle,
desc: n.AdDesc,
iconUrlList: [ n.AdIconFile ],
imgUrlList: [ n.AdImgFile ],
logoUrl: n.AdLogoFile,
clickBtnTxt: n.AdClickText,
interactionType: n.AdInteractionType
};
_.push(i), a && this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onload, _.length, "", a.ad_scene, "0", "0"), 
a && a.onLoad && a.onLoad(a, _);
} else this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onload, "", "", a.ad_scene, "0", "0"), 
a && a.onLoad && a.onLoad(a, {});
a && !1 !== a.auto_show && this.show_ad_inter(a);
} else console.error("channel_ad_apk ad_apk_result load_ad_error -> ", JSON.stringify(a)), 
a && a.onError && a.onError(a, {});
}, a.prototype.on_show = function(t, a, o) {
console.log("channel_ad_apk show_ad_complete run -> ", a), a && (this._loading_ad[a.ad_pos_id] = !1), 
o ? parseInt(t) === e.e_apk_ad_type.banner ? a.on_show_ret || (this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onshow, "", "", a.ad_scene, "0", "0"), 
a.on_show_ret = !0, a.onShow && a.onShow(a)) : a.onShow && a.onShow(a) : (console.error("channel_ad_apk show_ad_complete show_ad_error -> ", a), 
a && a.onError && a.onError(a, {}));
}, a.prototype.on_video_reward = function(t, a, o) {
a && (this._has_get_reward[a.ad_pos_id] = !0, a && this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onclose, e.e_ad_video_close.complete, "", a.ad_scene, "0", "0"), 
a && a.onClose && a.onClose(a, {
isEnded: o
}), a && a.ad_pos_id && this._param_map[a.ad_pos_id] && (this._has_load_ad[a.ad_pos_id] = !1));
}, a.prototype.ad_video_complete = function() {}, a.prototype.on_close = function(t, a, o) {
a && a.ad_pos_id && !this._has_get_reward[a.ad_pos_id] && (parseInt(t) === e.e_apk_ad_type.video ? (a && this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onclose, e.e_ad_video_close.uncomplete, "", a.ad_scene, "0", "0"), 
a && a.onClose && a.onClose(a, {
isEnded: o
})) : (a && this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onclose, "", "", a.ad_scene, "0", "0"), 
a && a.onClose && a.onClose(a, {}))), a && a.ad_pos_id && this._param_map[a.ad_pos_id] && (this._has_load_ad[a.ad_pos_id] = !1);
}, a.prototype.on_click = function(e, t) {
console.log("channel_ad_apk on_click run -> ", t), t && t.ad_pos_id && this._param_map[t.ad_pos_id] && (this._has_load_ad[t.ad_pos_id] = !1), 
t && t.onClick && t.onClick();
}, a.prototype.create_ad = function(t) {
var a = this;
if (!this._loading_ad[t.ad_pos_id]) {
if (!e.channel_sdk.instance._is_login && e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.jdw_xm_apk) return console.log("igc ----- channel is not login success"), 
void (t && t.on_error && t.on_error(t, {}));
if (this._has_load_ad[t.ad_pos_id] && t.ad_type != e.e_ad_type.native) t && t.ad_type == e.e_ad_type.video && (t.onLoad && t.onLoad(), 
this.show_ad(t)); else {
t && this.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", "0"), 
this._loading_ad[t.ad_pos_id] = !0, setTimeout(function() {
a._loading_ad && 1 == a._loading_ad[t.ad_pos_id] && (a._loading_ad[t.ad_pos_id] = !1);
}, 4e3), this._param_map[t.ad_pos_id] = t;
var o = {};
o.type = this.get_ad_type(t), e.igc_main.instance.app_config.game_param.channel_type === e.e_channel_type.ipa ? (console.log("igc channel_ad_apk ipa :create_ad" + t.ad_id), 
o.extra = {
AdId: t.ad_id,
AdPosId: t.ad_pos_id
}) : (console.log("igc channel_ad_apk apk :create_ad" + t), e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.apk || e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.jdw_vivo_apk || e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.jdw_xm_apk || e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.jdw_oppo_apk ? t.ad_type == e.e_ad_type.splash ? o.extra = {
AdId: t.ad_id,
AdPosId: t.ad_pos_id,
AdTitle: t.ad_title,
AdDesc: t.ad_desc,
Orientation: t.ad_orientation
} : o.extra = {
AdId: t.ad_id,
AdPosId: t.ad_pos_id,
NativeSubType: t.apk_sub_ad_type || "0"
} : e.igc_main.instance.app_config.game_param.channel_id ? o.extra = {
AdId: "",
AdPosId: t.ad_pos_id
} : o.extra = {
AdId: "fake" + t.ad_pos_id,
AdPosId: t.ad_pos_id,
NativeSubType: t.apk_sub_ad_type || "0"
}, console.log("channel_ad_apk do:" + JSON.stringify(o)), e.utils_manager.callJava("org/cocos2dx/javascript/CoCosJSBridge", "loadAd", "(Ljava/lang/String;)V", JSON.stringify(o)));
}
}
}, a.prototype.show_ad = function(t) {
!0 !== this._has_load_ad[t.ad_pos_id] && t.ad_type !== e.e_ad_type.native || this.show_ad_inter(t);
}, a.prototype.show_ad_inter = function(t) {
if (console.log("show_ad_inter-------:", t.ad_type), !e.channel_sdk.instance._is_login && e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.jdw_xm_apk) return console.log("igc ----- channel is not login success"), 
void (t && t.on_error && t.on_error(t, {}));
t && this.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.show, "", "", t.ad_scene, "0", "0"), 
this._has_get_reward[t.ad_pos_id] = !1, this._param_map[t.ad_pos_id] = t;
var a = {};
a.type = this.get_ad_type(t), e.igc_main.instance.app_config.game_param.channel_type === e.e_channel_type.ipa ? (console.log("igc channel_ad_apk ipa :show_ad_inter" + t.ad_id), 
a.extra = {
AdId: t.ad_id,
AdPosId: t.ad_pos_id,
PosX: t.posx || 0,
PosY: t.posy || 0,
Width: t.width || 375,
Height: t.height || 100
}) : e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.apk || e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.jdw_vivo_apk || e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.jdw_xm_apk || e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.jdw_oppo_apk ? a.extra = {
AdId: t.ad_id,
AdPosId: t.ad_pos_id,
AttrSet: t.attrSet,
NativeSubType: t.apk_sub_ad_type || "0",
Parameter: t.parameter
} : e.igc_main.instance.app_config.game_param.channel_id ? a.extra = {
AdId: "",
AdPosId: t.ad_pos_id
} : a.extra = {
AdId: "fake" + t.ad_pos_id,
AdPosId: t.ad_pos_id,
AttrSet: t.attrSet,
NativeSubType: t.apk_sub_ad_type || "0",
Parameter: t.parameter
}, e.utils_manager.callJava("org/cocos2dx/javascript/CoCosJSBridge", "showAd", "(Ljava/lang/String;)V", JSON.stringify(a));
}, a.prototype.hide_ad = function(t) {
console.log("hide_ad-------:", t.ad_type), t && this.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.hide, "", "", t.ad_scene, "0", "0");
var a = {};
a.type = this.get_ad_type(t), e.igc_main.instance.app_config.game_param.channel_type === e.e_channel_type.ipa ? a.extra = {
AdId: t.ad_id,
AdPosId: t.ad_pos_id
} : e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.apk || e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.jdw_vivo_apk || e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.jdw_xm_apk || e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.jdw_oppo_apk ? a.extra = {
AdId: t.ad_id,
AdPosId: t.ad_pos_id
} : e.igc_main.instance.app_config.game_param.channel_id ? a.extra = {
AdId: "",
AdPosId: t.ad_pos_id
} : a.extra = {
AdId: "fake" + t.ad_pos_id,
AdPosId: t.ad_pos_id,
AttrSet: t.attrSet,
NativeSubType: t.apk_sub_ad_type || "0",
Parameter: t.parameter
}, this._param_map[t.ad_pos_id], e.utils_manager.callJava("org/cocos2dx/javascript/CoCosJSBridge", "hideAd", "(Ljava/lang/String;)V", JSON.stringify(a));
}, a.prototype.destroy_ad = function(t) {
var a = {};
a.type = this.get_ad_type(t), e.igc_main.instance.app_config.game_param.channel_type === e.e_channel_type.ipa ? a.extra = {
AdId: t.ad_id,
AdPosId: t.ad_pos_id
} : e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.apk || e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.jdw_vivo_apk || e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.jdw_xm_apk || e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.jdw_oppo_apk ? a.extra = {
AdId: t.ad_id,
AdPosId: t.ad_pos_id,
NativeSubType: t.apk_sub_ad_type || 0
} : e.igc_main.instance.app_config.game_param.channel_id ? a.extra = {
AdId: "",
AdPosId: t.ad_pos_id
} : a.extra = {
AdId: "fake" + t.ad_pos_id,
AdPosId: t.ad_pos_id
}, t && t.ad_id && t.ad_pos_id && this._param_map[t.ad_pos_id] && (this._has_load_ad[t.ad_pos_id] = !1, 
this._loading_ad[t.ad_pos_id] = !1, delete this._param_map[t.ad_pos_id]), e.utils_manager.callJava("org/cocos2dx/javascript/CoCosJSBridge", "destroyAd", "(Ljava/lang/String;)V", JSON.stringify(a));
}, a.prototype.report_ad_show = function(t) {
return !!(t.ad_id && t.ad_type && t.ad_pos_id) && t.ad_type == e.e_ad_type.native && this.report_ad_show_native(t);
}, a.prototype.report_ad_show_native = function(e) {
return !!this._param_map[e.ad_pos_id];
}, a.prototype.report_ad_click = function(t) {
return !!(t.ad_id && t.ad_type && t.ad_pos_id) && (t.ad_type, e.e_ad_type.native, 
!1);
}, a.prototype.report_ad_click_native = function(t) {
if (this._param_map[t.ad_pos_id]) {
var a = {};
return e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.apk || e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.jdw_vivo_apk || e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.jdw_xm_apk || e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.jdw_oppo_apk ? a.extra = {
AdId: t.ad_id,
AdPosId: t.ad_pos_id
} : a.extra = {
AdId: "",
AdPosId: t.ad_pos_id
}, e.utils_manager.callJava("org/cocos2dx/javascript/CoCosJSBridge", "clickAd", "(Ljava/lang/String;)V", JSON.stringify(a)), 
!0;
}
return !1;
}, a.prototype.has_ad = function() {
return !0;
}, a.prototype.report_ad_close = function(t) {
return !(!t.ad_id || !t.ad_type || (t.ad_type, e.e_ad_type.native, 1));
}, a.prototype.get_ad_type_name = function(t) {
switch (t) {
case e.e_ad_type.interstitial:
return "interstitial";

case e.e_ad_type.video:
return "video";

case e.e_ad_type.native:
return "native";

case e.e_ad_type.banner:
return "banner";

case e.e_ad_type.splash:
return "splash";

case e.e_ad_type.app_box:
return "app_box";

case e.e_ad_type.feed:
return "feed";

case e.e_ad_type.full_screen_video:
return "full_screen_video";

case e.e_ad_type.interstitial_video:
return "interstitial_video";
}
return "";
}, a.prototype.get_ad_event_name = function(t) {
switch (t) {
case e.e_ad_event.visible:
return "visible";

case e.e_ad_event.click:
return "click";

case e.e_ad_event.req:
return "req";

case e.e_ad_event.show:
return "show";

case e.e_ad_event.click:
return "click";

case e.e_ad_event.hide:
return "hide";

case e.e_ad_event.onload:
return "onload";

case e.e_ad_event.onshow:
return "onshow";

case e.e_ad_event.onhide:
return "onhide";

case e.e_ad_event.onclose:
return "onclose";

case e.e_ad_event.onerror:
return "onerror";
}
return t + "";
}, a.prototype.send_dot = function(e, t, a, o, n, _, i, s) {
console.log("igc send_dot-> ad_pos_id:" + e + ",ad_type_name:" + this.get_ad_type_name(t) + ",ad_type:" + t + ",ad_event:" + this.get_ad_event_name(a) + ",extra:" + o + ",extra2:" + n + ",ad_scene:" + _ + ",ad_package_id:" + i + ",ad_op:" + s);
}, a;
}(e.channel_facade_ad_base);
e.channel_ad_apk = t, window.channel_ad_apk = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.support_method[e.e_method_type.pay] = !0;
}, a.prototype.get_extension = function() {
return JSON.stringify({
token: e.channel_sdk.instance.channel_user_info.token,
app_engine_version: e.channel_config.config.game_param.engin_version
});
}, a.prototype.pay = function(t, a) {
var o = this;
this.submit_order(t, this.get_extension(), function(t) {
t.retcode !== e.e_channel_code.success ? o.on_pay_result(t.retcode, {
code: -1,
msg: "fail"
}, a) : o.on_pay_result(e.e_channel_code.pay_success, t, a);
});
}, a.prototype.on_pay_result = function(t, a, o) {
t === e.e_channel_code.pay_success ? o({
errorcode: t,
errormsg: "success",
sdk_errorcode: a.code,
sdk_errormsg: a.msg
}) : o({
errorcode: t,
errormsg: "fail",
sdk_errorcode: a.code,
sdk_errormsg: a.msg
});
}, a;
}(e.channel_facade_pay_base);
e.channel_pay_apk = t, window.channel_pay_apk = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.register_listener(), this.support_method[e.e_method_type.jump_leisure_subject] = !0;
}, a.prototype.register_listener = function() {}, a.prototype.jump_leisure_subject = function() {
e.utils_manager.callJava("org/cocos2dx/javascript/CoCosJSBridge", "jumpLeisureSubject", "()V");
}, a;
}(e.channel_facade_share_base);
e.channel_system_apk = t, window.channel_system_apk = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.register_listener(), this.support_method[e.e_method_type.login] = !0, 
this.support_method[e.e_method_type.device_shake] = !0, this.support_method[e.e_method_type.login_apk_result] = !0;
}, a.prototype.register_listener = function() {
e.igc_main.instance.app_config.game_param.channel_type === e.e_channel_type.apk || (e.igc_main.instance.app_config.game_param.channel_type, 
e.e_channel_type.ipa);
}, a.prototype.login_apk_result = function(t) {
if (console.log("channel_user_apk:login_apk_result  run -> ", JSON.stringify(t)), 
parseInt(t.ErrorCode) === e.e_apk_error_code.login_success) {
console.log("channel_user_apk:login_apk_result success run -> ", JSON.stringify(t.Extra));
var a = this.config_channel_user_info(t.Extra, function(t) {
var a = e.e_channel_sex.none;
return a = "M" == t.sex ? e.e_channel_sex.man : e.e_channel_sex.female, {
uid: t.UserId,
token: t.SdkToken,
nickName: t.UserId,
avatar: "",
sex: a,
birthday: t.birthday,
phoneNum: t.phoneNum,
location: t.location,
extra: ""
};
});
this._finish_callbck && this._finish_callbck({
errorcode: e.e_channel_code.login_success,
errormsg: "success",
sdk_errorcode: 0,
sdk_errormsg: "",
channel_user_info: a
}), e.utils_manager.callJava("org/cocos2dx/javascript/CoCosJSBridge", "loginComplete", "()V");
} else console.log("channel_user_oppo_apk:login_apk_result fail run -> ", t.ErrorMsg), 
this._finish_callbck && this._finish_callbck({
errorcode: e.e_channel_code.login_fail,
errormsg: "fail",
sdk_errorcode: -1,
sdk_errormsg: t.ErrorMsg,
channel_user_info: {}
});
}, a.prototype.login = function(t, a) {
if (e.igc_main.instance.app_config.game_param.channel_id == e.e_channel_id.jdw_xm_apk) this._finish_callbck = a, 
e.utils_manager.callJava("org/cocos2dx/javascript/CoCosJSBridge", "login", "()V"); else {
var o = localStorage.getItem("igc_random_name");
o || (o = this.get_random_name(), localStorage.setItem("igc_random_name", o));
var n = {
uid: o,
token: "test_token",
nickName: o,
avatar: "",
sex: e.e_channel_sex.none,
birthday: "",
phoneNum: "110",
location: "",
extra: ""
};
a({
errorcode: e.e_channel_code.login_success,
errormsg: "success",
sdk_errorcode: 0,
sdk_errormsg: "",
channel_user_info: n
});
}
}, a.prototype.device_shake = function() {
e.utils_manager.callJava("org/cocos2dx/javascript/CoCosJSBridge", "deviceShake", "()V");
}, a;
}(e.channel_facade_user_base);
e.channel_user_apk = t, window.channel_user_apk = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.can_ad = !1, e.can_video = !1, e.can_native = !1, e.ad_native_map = {}, 
e.platformVersionCode = 0, e;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this);
var a = 0;
window.hbs && window.hbs.getSystemInfo({
success: function(e) {
console.log("getSystemInfo success "), a = e.version, console.log("igc app qg code---\x3e", a);
},
fail: function() {
console.log("getSystemInfo fail");
},
complete: function() {
console.log("getSystemInfo complete");
}
}), this.can_ad = !0, this.can_video = !0, this.can_native = !0, this.support_method[e.e_method_type.create_ad] = this.can_ad, 
this.support_method[e.e_method_type.show_ad] = this.can_ad, this.support_method[e.e_method_type.hide_ad] = this.can_ad, 
this.support_method[e.e_method_type.has_ad] = this.can_ad, this.support_method[e.e_method_type.destroy_ad] = this.can_ad, 
this.support_method[e.e_method_type.report_ad_show] = this.can_ad, this.support_method[e.e_method_type.report_ad_click] = this.can_ad, 
this.support_method[e.e_method_type.load_ad_just] = !1, this.support_method[e.e_method_type.show_ad_just] = !1;
}, a.prototype.has_ad = function(t) {
return !!this.can_ad && (t && t.ad_type === e.e_ad_type.video ? this.can_video : !t || t.ad_type !== e.e_ad_type.native || this.can_native);
}, a.prototype.create_ad = function(t) {
return !!this.can_ad && !(!t.ad_id || !t.ad_type) && !!this.has_ad(t) && (t.ad_type == e.e_ad_type.video ? (console.log("igc channel_ad_hw_qg:create_ad", "create_ad_video"), 
this.create_ad_video(t)) : t.ad_type == e.e_ad_type.native && this.create_ad_native(t));
}, a.prototype.create_ad_video = function(t) {
return !!this.can_video && (console.log("igc ----- create hw_ad_video"), this.ad_video ? this.ad_video.create(t) : (this.ad_video = new e.ad_video_hw_qg(), 
this.ad_video.create(t)), !0);
}, a.prototype.create_ad_native = function(t) {
if (!this.can_native) return !1;
console.log("igc ----- create hw_ad_native"), this.ad_native_map[t.ad_id] ? this.ad_native_map[t.ad_id].update_show(t) : (this.ad_native_map[t.ad_id] = new e.ad_native_hw_qg(), 
this.ad_native_map[t.ad_id].create(t));
}, a.prototype.show_ad = function(t) {
if (!t.ad_id || !t.ad_type) return !1;
if (t.ad_type == e.e_ad_type.banner) ; else if (t.ad_type == e.e_ad_type.video) this.show_ad_video(t); else if (t.ad_type == e.e_ad_type.interstitial) ; else {
if (t.ad_type != e.e_ad_type.native) return !1;
this.show_ad_native(t);
}
return !0;
}, a.prototype.show_ad_video = function(e) {
return !!this.ad_video && (this.ad_video.show_ad(e), !0);
}, a.prototype.show_ad_native = function(e) {
return !!this.ad_native_map[e.ad_id] && (this.ad_native_map[e.ad_id].show_ad(e), 
!0);
}, a.prototype.hide_ad = function(t) {
return !(!t.ad_id || !t.ad_type) && (t.ad_type == e.e_ad_type.video ? this.hide_ad_video(t) : t.ad_type == e.e_ad_type.native && this.hide_ad_native(t));
}, a.prototype.hide_ad_video = function(e) {
return !!this.ad_video && (this.ad_video.hide_ad(e), !0);
}, a.prototype.hide_ad_native = function(e) {
return !!this.ad_native_map[e.ad_id] && (this.ad_native_map[e.ad_id].hide_ad(e), 
!0);
}, a.prototype.destroy_ad = function(t) {
return !(!t.ad_id || !t.ad_type) && (t.ad_type == e.e_ad_type.video ? this.destroy_ad_video(t) : t.ad_type == e.e_ad_type.native && this.destroy_ad_native(t));
}, a.prototype.destroy_ad_video = function(e) {
return !!this.ad_video && (this.ad_video.destroy_ad(e), !0);
}, a.prototype.destroy_ad_native = function(e) {
return !!this.ad_native_map[e.ad_id] && (this.ad_native_map[e.ad_id].destroy_ad(e), 
!0);
}, a.prototype.report_ad_show = function(e) {
return !!this.ad_native_map[e.ad_id] && (this.ad_native_map[e.ad_id].report_ad_show(e), 
!0);
}, a.prototype.report_ad_click = function(e) {
return !!this.ad_native_map[e.ad_id] && (this.ad_native_map[e.ad_id].report_ad_click(e), 
!0);
}, a.prototype.report_ad_close = function(e) {
return !!this.ad_native_map[e.ad_id] && (this.ad_native_map[e.ad_id].report_ad_close(e), 
!0);
}, a;
}(e.channel_facade_ad_base);
e.channel_ad_hw_qg = t, window.channel_ad_hw_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.register_listener(), this.support_method[e.e_method_type.get_system_info_sync] = !1, 
this.support_method[e.e_method_type.exit_mini_program] = !0, this.support_method[e.e_method_type.on_show] = !0, 
this.support_method[e.e_method_type.on_hide] = !0;
}, a.prototype.register_listener = function() {}, a.prototype.get_system_info_sync = function() {}, 
a.prototype.exit_mini_program = function() {
return window.hbs.exitApplication({
success: function() {
console.log("exitApplication success");
},
fail: function() {
console.log("exitApplication fail");
},
complete: function() {
console.log("exitApplication complete");
}
});
}, a.prototype.on_show = function(e) {
return window.hbs.onShow(function(t) {
e.on_show && e.on_show(t);
});
}, a.prototype.on_hide = function(e) {
return window.hbs.onHide(function(t) {
e.on_hide && e.on_hide(t);
});
}, a;
}(e.channel_facade_share_base);
e.channel_system_hw_qg = t, window.channel_system_hw_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.token = null, e.deviceId = null, e.callback = null, e.needAuth = !0, e.is_old = !1, 
e.playId = null, e;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this);
this.support_method[e.e_method_type.login] = !0, this.support_method[e.e_method_type.get_user_info] = !0, 
this.support_method[e.e_method_type.device_shake] = !0, this.support_method[e.e_method_type.check_can_add_desktop] = !1, 
this.support_method[e.e_method_type.check_is_add_desktop] = !0, this.support_method[e.e_method_type.add_desktop] = !0, 
window.hbs && window.hbs.getSystemInfo({
success: function(t) {
console.log("getSystemInfo success res = " + t), e.stat_manager.instance._osInfo = t.model || "", 
e.stat_manager.instance._opInfo = t.platform, console.log("mijia -- huawei手机型号", e.stat_manager.instance._osInfo);
},
fail: function() {
console.log("getSystemInfo fail");
},
complete: function() {
console.log("getSystemInfo complete");
}
});
}, a.prototype.login = function(t, a) {
console.log("mijia -- huawei run login()");
var o = this;
0 == e.igc_main.instance.app_config.game_param.needAuth && (this.needAuth = !1), 
console.log("该游戏是否需要授权", this.needAuth), this.callback = a, window.hbs.gameLogin({
forceLogin: 0,
appid: e.channel_config.config.game_param.channel_app_id,
success: function(e) {
o.playId = e.playerId, console.log("igc ----- only playId is " + o.playId), console.log("game login: success");
},
fail: function(e, t) {
console.log("on gameLogin fail: " + e + "," + t);
},
complete: function() {
console.log("on gameLogin: complete");
}
}), this.token = localStorage.getItem("hwToken"), null != this.token && "" != this.token && (this.is_old = !0, 
localStorage.setItem("is_old", "is_old")), "is_old" == localStorage.getItem("is_old") && (this.is_old = !0), 
console.log("appId is " + e.channel_config.config.game_param.channel_app_id), o.initHW();
}, a.prototype.initHW = function() {
console.log("mijia -- channel_user_hw local_save_token = ", this.token), null != this.token && "" != this.token ? this.initHWInfo(this.token) : this.initHWByAuth();
}, a.prototype.initHWByAuth = function() {
var t = this;
console.log("hw_qg sdk channel_user_hw_qg initHWByAuth Run ", this.needAuth), (this.needAuth || this.is_old) && window.hbs && window.hbs.authorize({
scope: "userInfo",
params: {
appid: e.channel_config.config.game_param.channel_app_id + "",
type: "token",
scope: "scope.baseProfile"
},
success: function(e) {
var a = JSON.parse(e[1]);
console.log("mijia channel_user_hw_qg hbs.authorize success", a.accessToken), t.token = a.accessToken, 
localStorage.setItem("hwToken", a.accessToken), t.initHWInfo(a.accessToken);
},
fail: function() {
console.log("mijia channel_user_hw_qg hbs.authorize fali"), t.token = "", localStorage.setItem("hwToken", "");
var a = {
userId: t.deviceId,
avatar: "",
userName: t.deviceId,
hasAuth: !1
};
t.on_login_result(e.e_channel_code.login_success, a, t.callback);
}
});
}, a.prototype.initHWInfo = function(t) {
console.log("vivoqgsdk channel_user_hw_qg initHWInfo Run ");
var a = this, o = this.callback || function() {};
window.hbs && window.hbs.getUserInfo({
appid: e.channel_config.config.game_param.channel_app_id,
token: t,
success: function(t) {
console.log("mijia channel_user_hw_qg getProfile success", t.openid, t.nickname), 
t.hasAuth = !0, a.on_login_result(e.e_channel_code.login_success, t, o);
},
fail: function() {
console.log("mijia channel_user_hw_qg getProfile fail"), a.token = "", localStorage.setItem("hwToken", ""), 
a.initHW();
}
});
}, a.prototype.on_login_result = function(t, a, o) {
var n = this;
if (t == e.e_channel_code.login_success) {
var _ = this.config_channel_user_info(a, function(e) {
return e.hasAuth ? {
uid: e.openid,
token: n.token,
nickName: e.nickname,
avatar: e.avatar,
sex: "",
birthday: "",
phoneNum: "",
location: "",
hasAuth: !0,
extra: ""
} : {
uid: n.deviceId,
token: n.deviceId,
nickName: e.userName,
avatar: "",
sex: "",
birthday: "",
phoneNum: "",
location: "",
hasAuth: !1,
extra: ""
};
});
o({
errorcode: e.e_channel_code.login_success,
errormsg: "success",
sdk_errorcode: 0,
sdk_errormsg: "",
channel_user_info: _
});
} else o({
errorcode: e.e_channel_code.login_fail,
errormsg: "fail",
sdk_errorcode: -1,
sdk_errormsg: JSON.stringify(a),
channel_user_info: {}
});
}, a.prototype.get_tourise_info = function() {
var e = localStorage.getItem("hw_username");
return e || (e = this.get_random_name(), localStorage.setItem("hw_username", e)), 
{
userId: e,
userName: e,
avatar: ""
};
}, a.prototype.device_shake = function(e) {
window.hbs && window.hbs.vibrateShort({
success: function() {
console.log("vibrateShort success");
},
fail: function() {
console.log("vibrateShort fail");
},
complete: function() {
console.log("vibrateShort complete"), e.on_complete && e.on_complete();
}
});
}, a.prototype.check_is_add_desktop = function(e) {
window.hbs.hasInstalled({
success: function(t) {
0 == t ? e.can_add && e.can_add() : e.has_add && e.has_add();
},
fail: function() {},
complete: function() {
console.log("hasInstalled complete");
}
});
}, a.prototype.add_desktop = function(e) {
console.log("igc add_desktop begin-------------------"), window.hbs.hasInstalled({
success: function(t) {
console.log("igc add_desktop hasShortcutInstalled success-------------------"), 
0 == t ? (console.log("igc add_desktop hasShortcutInstalled success res false-------------------"), 
e.can_create && e.can_create(), window.hbs.install({
success: function() {
console.log("igc add_desktop installShortcut success-------------------"), e.on_success && e.on_success();
},
fail: function(t, a) {
console.log("igc add_desktop installShortcut fail:" + JSON.stringify(t) + ", errocode: " + a), 
e.on_failed_back && e.on_failed_back();
},
complete: function() {
console.log("igc add_desktop installShortcut complete-------------------");
}
})) : (console.log("igc add_desktop installShortcut has-------------------"), console.log("mijia 图标已创建"), 
e.has_create && e.has_create());
},
fail: function(e) {
console.log("igc add_desktop hasShortcutInstalled fail:" + JSON.stringify(e));
},
complete: function() {
console.log("igc add_desktop hasShortcutInstalled complete-------------------");
}
});
}, a;
}(e.channel_facade_user_base);
e.channel_user_hw_qg = t, window.channel_user_hw_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.release = function() {}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
console.log("igc native ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
var a = this;
this.ad_param = t, this.ad_instance || (a.ad_op = e.e_ad_op.create, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", a.ad_op), 
this.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", this.ad_op), 
this.ad_instance = window.hbs.createNativeAd({
adUnitId: t.ad_id,
success: function() {
console.log("loadNativeAd loadNativeAd : success");
},
fail: function(e, t) {
console.log("loadNativeAd loadNativeAd fail: " + e + "," + t);
},
complete: function() {
console.log("loadNativeAd loadNativeAd : complete"), a.ad_instance.onLoad(function(e) {
a.on_load(t, e);
}), a.ad_instance.onError(function(e) {
a.on_error(t, e);
}), a.ad_op = e.e_ad_op.load, a.ad_instance.load();
}
}));
}
}, a.prototype.update_show = function(t) {
if (t && t.ad_type && t.ad_id) if (this.ad_instance) {
console.log("igc native ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " update_show");
var a = this;
this.ad_param = t, a.ad_op = e.e_ad_op.create, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", a.ad_op), 
a.ad_op = e.e_ad_op.load;
var o = this.ad_instance.load();
o && o.then(function() {
console.log("igc native update_show load_ad succ result");
}).catch(function(e) {
console.log("igc native update_show load_ad err result"), a.on_error(t, e);
});
} else console.log("igc native ad_type ad_native_hw_qg update_show this.ad_instance is null");
}, a.prototype.on_load = function(t, a) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
if (this.check_param(t), this.ad_instance && this.ad_instance.offLoad && this.ad_instance.offLoad(), 
!a || !a.adList) return this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onload, "0", "", this.ad_param.ad_scene, "0", this.ad_op), 
this.ad_param.onLoad(this.ad_param, []), this.ad_status = e.e_ad_status.none, this.release(), 
void console.log("igc native on_load fail");
console.log("igc native on_load length:", a.adList.length, JSON.stringify(a.adList)), 
this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onload, a.adList.length, "", this.ad_param.ad_scene, "0", this.ad_op);
for (var o = [], n = 0; n < a.adList.length; n++) {
var _ = {
adUnitId: a.adList[n].adId,
title: a.adList[n].title,
desc: a.adList[n].clickBtnTxt,
iconUrlList: a.adList[n].iconUrlList,
icon: a.adList[n].icon,
imgUrlList: a.adList[n].imgUrlList,
logoUrl: a.adList[n].logoUrl,
videoUrlList: a.adList[n].videoUrlList,
clickBtnTxt: a.adList[n].clickBtnTxt,
creativeType: a.adList[n].creativeType,
interactionType: a.adList[n].interactionType
};
o.push(_);
}
this.ad_param && this.ad_param.onLoad ? (console.log("igc native self.ad_param.onLoad(ad_data_list,self.ad_param)"), 
this.ad_param.onLoad(this.ad_param, o)) : console.log("igc native dont self.ad_param && self.ad_param.onLoad");
}
}, a.prototype.on_error = function(a, o) {
if (console.log("igc native on_error res.code = ", o.code), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) {
t.prototype.on_error.call(this, a, o);
var n = "";
console.log("igc ---- native error " + JSON.stringify(o)), o.errMsg ? n = o.errMsg : o.data && (n = JSON.stringify(o.data)), 
this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onerror, o.code, n, this.ad_param.ad_scene, "0", this.ad_op), 
this.release();
}
}, a.prototype.report_ad_close = function(a) {
if (a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) {
console.log("igc native ad_type:" + a.ad_type + ",ad_id:" + a.ad_id + ",ad_unit_id:" + a.ad_unit_id + " report_ad_close"), 
console.log("igc native report_ad_close "), t.prototype.check_param.call(this, a);
this.ad_op = e.e_ad_op.close, this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onclose, "", "", a.ad_scene, "0", this.ad_op), 
this.ad_status = e.e_ad_status.close, this.release();
}
}, a.prototype.report_ad_show = function(a) {
console.log("igc native report_ad_show "), t.prototype.check_param.call(this, a);
return this.ad_instance || console.log("igc native report_ad_click !self.ad_instance"), 
a || console.log("igc native report_ad_click igc !param"), a && !a.ad_unit_id && console.log("igc native report_ad_click igc !param.ad_unit_id"), 
!(!this.ad_instance || !a || void 0 === a.ad_unit_id || (this.ad_instance.reportAdShow({
adId: a.ad_unit_id
}), a.ad_pos_id && a.ad_type && a.ad_scene && a.sub_ad_type && (this.ad_op = e.e_ad_op.show, 
this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onshow, "", "", a.ad_scene, "0", this.ad_op), 
a.ad_id && console.log("igc native ad_type:" + a.ad_type + ",ad_id:" + a.ad_id + ",ad_unit_id:" + a.ad_unit_id + " report_ad_show")), 
0));
}, a.prototype.report_ad_click = function(a) {
console.log("igc native report_ad_click "), t.prototype.check_param.call(this, a);
return this.ad_instance || console.log("igc native report_ad_click !self.ad_instance"), 
a || console.log("igc native report_ad_click igc !param"), a && !a.ad_unit_id && console.log("igc native report_ad_click igc !param.ad_unit_id"), 
this.ad_instance && a && void 0 !== a.ad_unit_id ? (console.log("igc native do reportAdClick: ad_unit_id:" + a.ad_unit_id), 
this.ad_instance.reportAdClick({
adId: a.ad_unit_id
}), a.ad_pos_id && a.ad_type && a.ad_scene && a.sub_ad_type && (this.ad_op = e.e_ad_op.click, 
this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onclick, "", "", a.ad_scene, "0", this.ad_op), 
a.ad_id && console.log("igc native ad_type:" + a.ad_type + ",ad_id:" + a.ad_id + ",ad_unit_id:" + a.ad_unit_id + " report_ad_click")), 
!0) : (console.log("igc native do reportAdClick: error"), !1);
}, a;
}(e.ad_base);
e.ad_native_hw_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.has_load_tag = !1, e.video_tag = !1, e;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc video ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release");
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
console.log("igc video ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
var a = this;
this.ad_param = t, this.has_load_tag = !1, a.ad_op = e.e_ad_op.create, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", a.ad_op);
var o = t.extra || "";
return e.stat_manager.instance.send_user_event(t.ad_pos_id + "", e.igc_stat_ids.video_click, "", "", o, "", "", "", ""), 
this.ad_instance = window.hbs.createRewardedVideoAd({
adUnitId: t.ad_id,
success: function() {
console.log("ad demo : loadAndShowVideoAd createRewardedVideoAd: success");
},
fail: function(e, t) {
console.log("ad demo : loadAndShowVideoAd createRewardedVideoAd fail: " + e + "," + t);
},
complete: function() {
console.log("ad demo : loadAndShowVideoAd createRewardedVideoAd complete"), a.ad_instance.offError(function() {}), 
a.ad_instance.offClose(function(e) {
a.on_close(t, e);
}), a.ad_instance.offLoad(function() {
a.on_load(t, {});
}), a.ad_instance.onError(function(e) {
t.need_show_delay || (console.log("igc ---- video need show error"), a.on_error(t, e));
}), a.ad_instance.onClose(function(e) {
a.on_close(t, e);
}), a.ad_instance.onLoad(function() {
a.on_load(t, {});
}), a.ad_op = e.e_ad_op.load, a.ad_instance.load();
}
}), this.ad_instance ? void 0 : (this.ad_instance = null, this.release(), void console.log("igc create native fail"));
}
}, a.prototype.on_load = function(e) {
e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (this.check_param(e), 
this.has_load_tag = !0);
}, a.prototype.on_error = function(a, o) {
(console.log("igc video on_err res = ", JSON.stringify(o)), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) && (t.prototype.on_error.call(this, a, o), 
this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onerror, o.errCode, o.errMsg, this.ad_param.ad_scene, "0", this.ad_op), 
o && o.errCode && (-3 == o.errCode || o.errCode));
}, a.prototype.on_close = function(a, o) {
(console.log("igc video on_close res = ", JSON.stringify(o)), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) && (t.prototype.on_close.call(this, a, o), 
o && o.isEnded ? (this.ad_param.onClose && this.ad_param.onClose(this.ad_param, {
isEnded: o.isEnded
}), this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onclose, e.e_ad_video_close.complete, "", this.ad_param.ad_scene, "0", this.ad_op)) : (this.ad_param.onClose && this.ad_param.onClose(this.ad_param, {
isEnded: !1
}), this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onclose, e.e_ad_video_close.uncomplete, "", this.ad_param.ad_scene, "0", this.ad_op)), 
this.create({
ad_type: a.ad_type,
ad_id: a.ad_id,
ad_pos_id: a.ad_pos_id,
ad_event: a.ad_id,
ad_scene: a.ad_id,
sub_ad_type: a.sub_ad_type || e.e_ad_native_type.native_banner_normal,
onLoad: a.onLoad,
onShow: a.onShow,
onClose: a.onClose,
onError: a.onError,
extra: a.extra
}));
}, a.prototype.show_ad = function(t) {
var a = this;
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
if (console.log("mijia -- jj2"), this.video_tag) return console.log("igc ----- do not click video so fast "), 
void this.on_error(t, {
errMsg: "igc---- video ad load fail to show"
});
if (this.video_tag = !0, this.show_ad_id && clearTimeout(this.show_ad_id), this.show_ad_id = setTimeout(function() {
a.video_tag = !1;
}, 2e3), this.has_load_tag) {
console.log("igc ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " show_ad");
var o = this;
if (t.ad_id === o.ad_param.ad_id) {
try {
this.ad_param = t, o.ad_op = e.e_ad_op.show;
var n = t.extra || "";
e.stat_manager.instance.send_user_event(t.ad_pos_id + "", e.igc_stat_ids.video_click, "", "", n, "", "", "", ""), 
o.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.show, "", "", t.ad_scene, "0", o.ad_op), 
this.ad_instance.offError(), this.ad_instance.offClose(), this.ad_instance.onError(function(e) {
console.log("" + e), console.log("igc video show err cache err:" + e), o.on_error(t, e);
}), this.ad_instance.onClose(function(e) {
o.on_close(t, e);
}), this.ad_instance.show && this.ad_instance.show();
} catch (e) {
o.on_error(t, e), console.log("" + e), console.log("igc video update_show load err cache err:" + e);
}
console.log("igc banner show_ad ad_status: ", this.ad_status);
} else o.on_error(t, {});
} else this.on_error(t, {
errMsg: "igc---- video ad load fail to show"
}), this.create({
ad_type: t.ad_type,
ad_id: t.ad_id,
ad_pos_id: t.ad_pos_id,
ad_event: t.ad_id,
ad_scene: t.ad_id,
sub_ad_type: t.sub_ad_type || e.e_ad_native_type.native_banner_normal,
onLoad: t.onLoad,
onShow: t.onShow,
onClose: t.onClose,
onError: t.onError,
extra: t.extra,
need_show_delay: !0
});
} else console.log("mijia -- jj1");
}, a;
}(e.ad_base);
e.ad_video_hw_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.can_ad = !1, e.can_interstitial = !1, e.can_multualpush_box = !1, e.ad_native_map = {}, 
e.platformVersionCode = 0, e;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this);
var a = window.qg && window.qg.getSystemInfoSync().platformVersion;
this.platformVersionCode = a, console.log("igc platformVersion:" + a), this.can_ad = a >= 1051, 
this.can_interstitial = a >= 1061, this.can_multualpush_box = a >= 1076, this.support_method[e.e_method_type.create_ad] = this.can_ad, 
this.support_method[e.e_method_type.destroy_ad] = this.can_ad, this.support_method[e.e_method_type.show_ad] = this.can_ad, 
this.support_method[e.e_method_type.hide_ad] = this.can_ad, this.support_method[e.e_method_type.has_ad] = this.can_ad, 
this.support_method[e.e_method_type.report_ad_show] = this.can_ad, this.support_method[e.e_method_type.report_ad_click] = this.can_ad, 
this.support_method[e.e_method_type.report_ad_close] = this.can_ad, this.support_method[e.e_method_type.load_ad_just] = !1, 
this.support_method[e.e_method_type.show_ad_just] = !1;
}, a.prototype.has_ad = function() {
return this.can_ad;
}, a.prototype.create_ad = function(t) {
return !(!t.ad_id || !t.ad_type) && !!this.has_ad(t) && (t.platformVersionCode = this.platformVersionCode, 
t.ad_type == e.e_ad_type.banner ? (console.log("channel_ad_oppo_qg:create_ad", "create_ad_banner"), 
this.create_ad_banner(t)) : t.ad_type == e.e_ad_type.video ? (console.log("channel_ad_oppo_qg:create_ad", "create_ad_video"), 
this.create_ad_video(t)) : t.ad_type == e.e_ad_type.interstitial ? (console.log("channel_ad_oppo_qg:create_ad", "create_ad_interstitial"), 
this.create_ad_interstitial(t)) : t.ad_type == e.e_ad_type.native ? (console.log("channel_ad_oppo_qg:create_ad", "create_ad_native"), 
this.create_ad_native(t)) : t.ad_type == e.e_ad_type.app_box ? (console.log("channel_ad_oppo_qg:create_ad", "create_ad_app_box"), 
this.create_ad_app_box(t)) : t.ad_type == e.e_ad_type.native_custom && (console.log("channel_ad_oppo_qg:create_ad", "create_ad_native_custom"), 
this.create_ad_native_custom(t)));
}, a.prototype.create_ad_banner = function(t) {
return this.ad_banner = new e.ad_banner_oppo_qg(), this.ad_banner.create(t), !0;
}, a.prototype.create_ad_video = function(t) {
return this.ad_video && (this.ad_video.release(), this.ad_video = null), this.ad_video = new e.ad_video_oppo_qg(), 
this.ad_video.create(t), !0;
}, a.prototype.create_ad_interstitial = function(t) {
return this.ad_interstitial && (this.ad_interstitial.release(), this.ad_interstitial = null), 
this.ad_interstitial = new e.ad_interstitial_oppo_qg(), this.ad_interstitial.create(t), 
!0;
}, a.prototype.create_ad_native = function(t) {
t && t.sub_ad_type && (t.sub_ad_type, e.e_ad_native_type.native_inter), this.ad_native_map[t.ad_id] = new e.ad_native_oppo_qg(), 
this.ad_native_map[t.ad_id].create(t);
}, a.prototype.create_ad_native_custom = function(t) {
this.ad_custom && (this.ad_custom.release(), this.ad_custom = null), this.ad_custom = new e.ad_native_custom_oppo_qg(), 
this.ad_custom.create(t);
}, a.prototype.create_ad_app_box = function(t) {
if (!this.can_multualpush_box) return console.log("igc 快应用版本不支持互推盒子"), !1;
if (t.sub_ad_type == e.e_ad_app_box_type.banner_box) this.ad_bannerbox = new e.ad_bannerbox_oppo_qg(), 
this.ad_bannerbox.create(t); else if (t.sub_ad_type == e.e_ad_app_box_type.portal_box) this.ad_portalbox = new e.ad_portalbox_oppo_qg(), 
this.ad_portalbox.create(t); else if (t.sub_ad_type == e.e_ad_app_box_type.drawer) {
if (!(this.platformVersionCode >= 1090)) return console.log("igc ad_drawer_oppo_qg is not allowed in this version"), 
!1;
this.ad_drawer = new e.ad_drawer_oppo_qg(), this.ad_drawer.create(t);
}
return !0;
}, a.prototype.show_ad = function(t) {
if (!t.ad_id || !t.ad_type) return !1;
if (t.platformVersionCode = this.platformVersionCode, t.ad_type == e.e_ad_type.banner) this.show_ad_banner(t); else if (t.ad_type == e.e_ad_type.video) this.show_ad_video(t); else if (t.ad_type == e.e_ad_type.interstitial) this.show_ad_interstitial(t); else {
if (t.ad_type != e.e_ad_type.native) return t.ad_type == e.e_ad_type.app_box ? this.show_ad_app_box(t) : t.ad_type == e.e_ad_type.native_custom && this.show_ad_native_custom(t);
this.show_ad_native(t);
}
return !0;
}, a.prototype.show_ad_banner = function(e) {
return !!this.ad_banner && (this.ad_banner.show_ad(e), !0);
}, a.prototype.show_ad_video = function(e) {
return !!this.ad_video && (this.ad_video.show_ad(e), !0);
}, a.prototype.show_ad_interstitial = function(e) {
return !!this.ad_interstitial && (this.ad_interstitial.show_ad(e), !0);
}, a.prototype.show_ad_native_custom = function(e) {
return !!this.ad_custom && (this.ad_custom.show_ad(e), !0);
}, a.prototype.show_ad_native = function(e) {
return !!this.ad_native_map[e.ad_id] && (this.ad_native_map[e.ad_id].show_ad(e), 
!0);
}, a.prototype.show_ad_app_box = function(t) {
return t.sub_ad_type == e.e_ad_app_box_type.portal_box && (this.ad_portalbox || (this.ad_portalbox = new e.ad_portalbox_oppo_qg()), 
this.ad_portalbox.show_ad(t)), !0;
}, a.prototype.hide_ad = function(t) {
return !(!t.ad_id || !t.ad_type) && (t.platformVersionCode = this.platformVersionCode, 
t.ad_type == e.e_ad_type.banner ? this.hide_ad_banner(t) : t.ad_type == e.e_ad_type.video ? this.hide_ad_video(t) : t.ad_type == e.e_ad_type.interstitial ? this.hide_ad_interstitial(t) : t.ad_type == e.e_ad_type.native ? this.hide_ad_native(t) : t.ad_type == e.e_ad_type.app_box && this.hide_ad_app_box(t));
}, a.prototype.hide_ad_banner = function(e) {
return !!this.ad_banner && (this.ad_banner.hide_ad(e), !0);
}, a.prototype.hide_ad_video = function(e) {
return !!this.ad_video && (this.ad_video.hide_ad(e), !0);
}, a.prototype.hide_ad_interstitial = function(e) {
return !!this.ad_interstitial && (this.ad_interstitial.hide_ad(e), !0);
}, a.prototype.hide_ad_native_custom = function(e) {
return !!this.ad_custom && (this.ad_custom.hide_ad(e), !0);
}, a.prototype.hide_ad_native = function(e) {
return !!this.ad_native_map[e.ad_id] && (this.ad_native_map[e.ad_id].hide_ad(e), 
!0);
}, a.prototype.hide_ad_app_box = function() {
return !0;
}, a.prototype.destroy_ad = function(t) {
return !(!t.ad_id || !t.ad_type) && (t.platformVersionCode = this.platformVersionCode, 
t.ad_type == e.e_ad_type.banner ? this.destroy_ad_banner(t) : t.ad_type == e.e_ad_type.video ? this.destroy_ad_video(t) : t.ad_type == e.e_ad_type.interstitial ? this.destroy_ad_interstitial(t) : t.ad_type == e.e_ad_type.interstitial ? this.destroy_ad_native(t) : t.ad_type == e.e_ad_type.app_box ? this.destroy_ad_app_box(t) : t.ad_type == e.e_ad_type.native_custom && this.destroy_ad_native_custom(t));
}, a.prototype.destroy_ad_banner = function(e) {
return !!this.ad_banner && (this.ad_banner.destroy_ad(e), this.ad_banner = null, 
!0);
}, a.prototype.destroy_ad_video = function(e) {
return !!this.ad_video && (this.ad_video.destroy_ad(e), !0);
}, a.prototype.destroy_ad_interstitial = function(e) {
return !!this.ad_interstitial && (this.ad_interstitial.destroy_ad(e), this.ad_interstitial = null, 
!0);
}, a.prototype.destroy_ad_native_custom = function(e) {
return !!this.ad_custom && (this.ad_custom.destroy_ad(e), this.ad_custom = null, 
!0);
}, a.prototype.destroy_ad_native = function(e) {
return !!this.ad_native_map[e.ad_id] && (this.ad_native_map[e.ad_id].destroy_ad(e), 
!0);
}, a.prototype.destroy_ad_app_box = function(t) {
t.sub_ad_type == e.e_ad_app_box_type.banner_box ? this.ad_bannerbox && this.ad_bannerbox.destroy_ad(t) : t.sub_ad_type == e.e_ad_app_box_type.portal_box ? this.ad_portalbox && this.ad_portalbox.destroy_ad(t) : t.sub_ad_type == e.e_ad_app_box_type.drawer && this.ad_drawer && this.ad_drawer.destroy_ad(t);
}, a.prototype.report_ad_show = function(e) {
return e.platformVersionCode = this.platformVersionCode, !!this.ad_native_map[e.ad_id] && (this.ad_native_map[e.ad_id].report_ad_show(e), 
!0);
}, a.prototype.report_ad_click = function(e) {
return e.platformVersionCode = this.platformVersionCode, !!this.ad_native_map[e.ad_id] && (this.ad_native_map[e.ad_id].report_ad_click(e), 
!0);
}, a.prototype.report_ad_close = function(e) {
return e.platformVersionCode = this.platformVersionCode, !!this.ad_native_map[e.ad_id] && (this.ad_native_map[e.ad_id].report_ad_close(e), 
!0);
}, a;
}(e.channel_facade_ad_base);
e.channel_ad_oppo_qg = t, window.channel_ad_oppo_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.register_listener(), this.support_method[e.e_method_type.get_system_info_sync] = !0, 
this.support_method[e.e_method_type.get_launch_options_sync] = !0, this.support_method[e.e_method_type.exit_mini_program] = !0, 
this.support_method[e.e_method_type.navigate_to_mini_program] = !0, this.support_method[e.e_method_type.on_show] = !0, 
this.support_method[e.e_method_type.on_hide] = !0;
}, a.prototype.register_listener = function() {}, a.prototype.get_system_info_sync = function() {
var e = window.qg.getSystemInfoSync();
return {
brand: e.brand,
model: e.model,
pixelRatio: e.pixelRatio,
screenWidth: e.screenWidth,
screenHeight: e.screenHeight,
windowWidth: e.windowWidth,
windowHeight: e.windowHeight,
statusBarHeight: e.statusBarHeight,
language: e.language,
version: e.COREVersion,
platform: e.platform,
system: e.system,
platformVersion: e.platformVersion,
extra: e
};
}, a.prototype.get_launch_options_sync = function() {
var e = window.qg.getLaunchOptionsSync();
return {
query: e.query,
referrerInfo: e.referrerInfo
};
}, a.prototype.exit_mini_program = function() {
return window.qg.exitApplication();
}, a.prototype.on_show = function(e) {
return window.qg.onShow(function(t) {
e.on_show && e.on_show(t);
});
}, a.prototype.on_hide = function(e) {
return window.qg.onHide(function(t) {
e.on_hide && e.on_hide(t);
});
}, a.prototype.navigate_to_mini_program = function(e) {
return window.qg.navigateToMiniGame({
pkgName: e.app_id,
extraData: {
userId: e.userId || "",
pushView: e.eventId || "1",
syyxAppId: e.syyxAppId || "1"
},
success: e.on_succeed
});
}, a;
}(e.channel_facade_share_base);
e.channel_system_oppo_qg = t, window.channel_system_oppo_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.platformVersion = 0, e;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.support_method[e.e_method_type.login] = !0, this.support_method[e.e_method_type.on_show] = !0, 
this.support_method[e.e_method_type.on_hide] = !0, this.support_method[e.e_method_type.navigate_to_mini_program] = !0, 
this.support_method[e.e_method_type.device_shake] = !0, this.support_method[e.e_method_type.check_can_add_desktop] = !0, 
this.support_method[e.e_method_type.check_is_add_desktop] = !0, this.support_method[e.e_method_type.add_desktop] = !0, 
console.log("igc 开始请求oppo手机型号");
var a = this;
window.qg && window.qg.getSystemInfo({
success: function(t) {
console.log("手机型号和平台号", t.model, t.platformVersion), e.stat_manager.instance._osInfo = t.model || "", 
a.platformVersion = t.platformVersion, e.stat_manager.instance._opInfo = t.platformVersion + "";
},
fail: function() {}
});
}, a.prototype.login = function(t, a) {
var o = this, n = "";
e.channel_config.config.game_param && e.channel_config.config.game_param.pkg_name ? (n = e.channel_config.config.game_param.pkg_name, 
window.qg && window.qg.login({
pkgName: n,
success: function(t) {
o.on_login_result(e.e_channel_code.login_success, t, a);
},
fail: function(t) {
o.on_login_result(e.e_channel_code.login_fail, t, a);
}
})) : a({
errorcode: e.e_channel_code.param_error,
errormsg: "fail",
sdk_errorcode: -1,
sdk_errormsg: "error",
channel_user_info: {}
});
}, a.prototype.on_login_result = function(t, a, o) {
if (t == e.e_channel_code.login_success) {
var n = this.config_channel_user_info(a, function(t) {
var a = e.e_channel_sex.none;
return a = "M" == t.sex ? e.e_channel_sex.man : e.e_channel_sex.female, {
uid: t.uid,
token: t.token,
nickName: t.nickName,
avatar: t.avatar,
sex: a,
birthday: t.birthday,
phoneNum: t.phoneNum,
location: t.location,
extra: ""
};
});
o({
errorcode: e.e_channel_code.login_success,
errormsg: "success",
sdk_errorcode: 0,
sdk_errormsg: "",
channel_user_info: n
});
} else o({
errorcode: e.e_channel_code.login_fail,
errormsg: "fail",
sdk_errorcode: -1,
sdk_errormsg: JSON.stringify(a),
channel_user_info: {}
});
}, a.prototype.navigate_to_mini_program = function(e) {
return window.qg.navigateToMiniGame({
pkgName: e.app_id,
success: e.on_succeed
});
}, a.prototype.device_shake = function(e) {
window.qg.vibrateShort({
success: function() {
e.on_success && e.on_success();
},
fail: function() {
e.on_failed && e.on_failed();
},
complete: function() {
e.on_complete && e.on_complete();
}
});
}, a.prototype.check_can_add_desktop = function() {
return this.platformVersion >= 1044;
}, a.prototype.check_is_add_desktop = function(e) {
window.qg && window.qg.hasShortcutInstalled && window.qg.hasShortcutInstalled({
success: function(t) {
0 == t ? e.can_add && e.can_add() : e.has_add && e.has_add();
},
fail: function() {},
complete: function() {}
});
}, a.prototype.on_show = function(e) {
return window.qg.onShow(function(t) {
e.on_show && e.on_show(t);
});
}, a.prototype.on_hide = function(e) {
return window.qg.onHide(function(t) {
e.on_hide && e.on_hide(t);
});
}, a.prototype.add_desktop = function(e) {
if (!this.check_can_add_desktop()) return e.on_failed && e.on_failed(), !1;
window.qg && window.qg.hasShortcutInstalled && window.qg.hasShortcutInstalled({
success: function(t) {
0 == t ? (e.can_create && e.can_create(), window.qg.installShortcut({
success: function() {
e.on_success && e.on_success();
},
fail: function() {
e.on_failed_back && e.on_failed_back();
},
complete: function() {}
})) : (console.log("igc 图标已创建"), e.has_create && e.has_create());
},
fail: function() {},
complete: function() {}
});
}, a;
}(e.channel_facade_user_base);
e.channel_user_oppo_qg = t, window.channel_user_oppo_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.show_num = 0, e.ad_hide_op = !1, e;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc banner ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
this.ad_instance && (this.ad_instance.offShow(), this.ad_instance.offLoad(), this.ad_instance.offHide(), 
this.ad_instance.offError(), this.ad_instance && (this.ad_instance.destroy(), this.ad_instance = null)), 
t.prototype.release.call(this);
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
var a = this;
this.ad_param = t, a.ad_op = e.e_ad_op.create, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", a.ad_op), 
this.ad_instance = window.qg.createBannerAd({
adUnitId: t.ad_id,
style: {}
}), this.ad_instance.onLoad(function() {
a.ad_instance && a.ad_instance.offLoad && a.ad_instance.offLoad(), a.on_load(t, {});
}), this.ad_instance.onHide(function() {
a.ad_instance && a.ad_instance.offHide && a.ad_instance.offHide(), 0 == a.ad_hide_op ? a.on_close(t, {}) : a.on_hide(t), 
a.ad_hide_op = !1;
}), this.ad_instance.offError(), this.ad_instance.onError(function(e) {
a.on_error(t, e);
}), t.platformVersionCode < 1061 && this.ad_instance.onShow(function() {
console.log("igc banner show succ --- onShow "), a.on_show(t), a.ad_instance && a.ad_instance.offShow && a.ad_instance.offShow();
}), this.show_ad(t);
}
}, a.prototype.show_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " show_ad");
var a = this;
if (this.ad_instance && a.ad_param && t && t.ad_id === a.ad_param.ad_id) {
console.log("igc banner show_ad ad_status: ", this.ad_status), a.ad_op = e.e_ad_op.show, 
a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.show, "", "", t.ad_scene, "0", a.ad_op);
var o = this.ad_instance.show();
o ? console.log("igc banner show adshow:", JSON.stringify(o)) : console.log("igc banner show adshow null"), 
a.ad_hide_op = !1, o && o.then(function() {
console.log("igc banner show succ --- return "), a.ad_hide_op = !1, a.on_show(t);
}).catch(function() {
console.log("igc banner show_ad err --- return ");
});
}
}
}, a.prototype.hide_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " hide_ad");
if (this.ad_instance && this.ad_param && t && t.ad_id === this.ad_param.ad_id) {
if (console.log("igc banner hide_ad ad_status: ", this.ad_status), this.ad_status < e.e_ad_status.show) return;
this.ad_op = e.e_ad_op.hide, this.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.hide, "", "", t.ad_scene, "0", this.ad_op), 
this.ad_hide_op = !0, this.ad_instance.hide();
}
}
}, a.prototype.destroy_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_param && this.ad_instance) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " destroy_ad");
this.ad_instance && this.ad_param && t && t.ad_id === this.ad_param.ad_id && (this.ad_op = e.e_ad_op.destroy, 
this.release());
}
}, a.prototype.on_error = function(a, o) {
if (a && a.ad_type && a.ad_id && this.ad_param && this.ad_param && this.ad_instance) {
console.log("igc banner on_error res = ", JSON.stringify(o)), t.prototype.on_error.call(this, a, o);
this.ad_instance && (this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onerror, o.errCode, o.errMsg, a.ad_scene, "0", this.ad_op), 
this.release());
}
}, a.prototype.on_close = function(a, o) {
if (a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) {
t.prototype.on_close.call(this, a, o);
this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onclose, "", "", a.ad_scene, "0", this.ad_op), 
a && a.onClose && a.onClose(a, {}), this.ad_status = e.e_ad_status.close, this.release();
}
}, a;
}(e.ad_base);
e.ad_banner_oppo_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc gamebannerbox ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
this.ad_instance && (this.ad_instance.offLoad(), this.ad_instance.offError(), this.ad_instance && (this.ad_instance.destroy(), 
this.ad_instance = null)), this.ad_param = null, t.prototype.release.call(this);
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id && window.qg.createGameBannerAd) {
console.log("igc gamebannerbox ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create"), 
e.stat_manager.instance.send_user_event(e.e_ad_app_box_type.banner_box + "", e.igc_stat_ids.multual_push_click, "", "", "", "", "", "", "");
var a = this;
this.ad_param = t, a.ad_op = e.e_ad_op.create, this.ad_instance = window.qg.createGameBannerAd({
adUnitId: t.ad_id
}), this.ad_instance.onLoad(a.on_load_callback.bind(a)), this.ad_instance.onError(a.on_error_callback.bind(a)), 
a.ad_op = e.e_ad_op.load, this.ad_instance.show().then(function() {
console.log("igc gamebannerbox show success"), e.stat_manager.instance.send_user_event(e.e_ad_app_box_type.banner_box + "", e.igc_stat_ids.multual_push_show, "", "", "", "", "", "", ""), 
a.on_show(t);
}).catch(function(e) {
console.log("igc gamebannerbox show fail"), a.on_error(t, e);
});
}
}, a.prototype.on_load_callback = function() {
this.on_load(this.ad_param, {});
}, a.prototype.on_error_callback = function(e) {
console.log("igc gamebannerbox error back", e);
}, a.prototype.on_error = function(e, a) {
console.log("igc gamebannerbox on_err res = ", JSON.stringify(a)), e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (t.prototype.on_error.call(this, e, a), 
this.release());
}, a.prototype.on_close = function(e, a) {
console.log("igc gamebannerbox on_close res = ", JSON.stringify(a)), e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (t.prototype.on_close.call(this, e, a), 
e && e.onClose && e.onClose(e, {}), this.release());
}, a.prototype.destroy_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " destroy_ad");
this.ad_instance && this.ad_param && t && t.ad_id === this.ad_param.ad_id && (this.on_close(this.ad_param, {}), 
this.ad_op = e.e_ad_op.destroy, this.release());
}
}, a;
}(e.ad_base);
e.ad_bannerbox_oppo_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc drawer ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
this.ad_instance && (this.ad_instance.offError(), this.ad_instance && (this.ad_instance.destroy(), 
this.ad_instance = null)), this.ad_param = null, t.prototype.release.call(this);
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id && window.qg.createGameDrawerAd) {
console.log("igc drawer ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create"), 
e.stat_manager.instance.send_user_event(e.e_ad_app_box_type.drawer + "", e.igc_stat_ids.multual_push_click, "", "", "", "", "", "", "");
var a = this;
this.ad_param = t, a.ad_op = e.e_ad_op.create, this.ad_instance = window.qg.createGameDrawerAd({
adUnitId: t.ad_id
}), this.ad_instance.onError(a.on_error_callback.bind(a)), a.ad_op = e.e_ad_op.load, 
this.ad_instance.show().then(function() {
console.log("igc drawer show success"), e.stat_manager.instance.send_user_event(e.e_ad_app_box_type.drawer + "", e.igc_stat_ids.multual_push_show, "", "", "", "", "", "", ""), 
a.on_show(t);
}).catch(function(e) {
console.log("igc drawer show fail"), a.on_error(t, e);
});
}
}, a.prototype.on_load_callback = function() {
this.on_load(this.ad_param, {});
}, a.prototype.on_error_callback = function(e) {
console.log("igc drawer error back", e);
}, a.prototype.on_error = function(e, a) {
console.log("igc drawer on_err res = ", JSON.stringify(a)), e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (t.prototype.on_error.call(this, e, a), 
this.release());
}, a.prototype.on_close = function(e, a) {
console.log("igc drawer on_close res = ", JSON.stringify(a)), e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (t.prototype.on_close.call(this, e, a), 
e && e.onClose && e.onClose(e, {}), this.release());
}, a.prototype.destroy_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc drawer ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " destroy_ad");
this.ad_instance && this.ad_param && t && t.ad_id === this.ad_param.ad_id && (this.on_close(this.ad_param, {}), 
this.ad_op = e.e_ad_op.destroy, this.release());
}
}, a;
}(e.ad_base);
e.ad_drawer_oppo_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc interstitial ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
this.ad_instance && (this.ad_instance.offError(), this.ad_instance.offClose(), this.ad_instance.offLoad(), 
this.ad_instance.offShow(), this.ad_instance.destroy(), this.ad_instance = null), 
t.prototype.release.call(this);
}, a.prototype.create_low = function(t) {
if (t && t.ad_type && t.ad_id) {
console.log("igc interstitial ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create_low");
var a = this;
this.ad_instance = window.qg.createInsertAd({
posId: t.ad_id
}), this.ad_instance.onError(function(e) {
a.ad_instance && a.ad_instance.offShow && a.ad_instance.offShow(), a.on_error(t, e);
}), this.ad_instance.onLoad(function() {
a.ad_instance && a.ad_instance.offLoad && a.ad_instance.offLoad(), a.on_load(t, {});
}), this.ad_instance.onShow(function() {
a.ad_instance && a.ad_instance.offShow && a.ad_instance.offShow(), console.log("igc interstitial show_ad succ --- onShow"), 
a.on_show(t);
}), this.ad_instance.onClose(function() {
a.ad_instance && a.ad_instance.offClose && a.ad_instance.offClose(), a.on_close(t, {});
}), a.ad_op = e.e_ad_op.load, this.ad_instance.load();
}
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
console.log("igc interstitial ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
var a = this;
this.ad_param = t, a.ad_op = e.e_ad_op.create, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", a.ad_op), 
t.platformVersionCode < 1061 ? this.create_low(t) : (this.ad_instance = window.qg.createInterstitialAd({
adUnitId: t.ad_id
}), this.ad_instance.onLoad(function() {
a.ad_instance && a.ad_instance.offLoad && a.ad_instance.offLoad(), a.on_load(t, {});
}), this.ad_instance.onError(function(e) {
a.on_error(t, e);
}), this.ad_instance.onClose && this.ad_instance.onClose(function() {
a.ad_instance && a.ad_instance.offClose && a.ad_instance.offClose(), a.on_close(t, {});
}), a.ad_op = e.e_ad_op.load, this.ad_instance.load());
}
}, a.prototype.show_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc interstitial ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " show_ad"), 
console.log("igc interstitial show_ad");
var a = this;
if (this.ad_instance && a.ad_param && t && t.ad_id === a.ad_param.ad_id) {
a.ad_op = e.e_ad_op.show, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.show, "", "", t.ad_scene, "0", a.ad_op);
var o = this.ad_instance.show();
o ? console.log("igc interstitial show adshow:", JSON.stringify(o)) : console.log("igc interstitial show adshow null"), 
o && o.then(function() {
console.log("igc interstitial show_ad succ --- return"), a.on_show(t);
}).catch(function() {
console.log("igc interstitial show_ad err --- return ");
});
}
}
}, a.prototype.on_load = function(e, a) {
e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && this.ad_instance && (this.ad_instance.offLoad(), 
t.prototype.on_load.call(this, e, a), console.log("igc interstitial on_load"), this.ad_param && !1 !== this.ad_param.auto_show && this.show_ad(this.ad_param));
}, a.prototype.on_close = function(a, o) {
a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance && (console.log("igc interstitial on_close res = ", JSON.stringify(o)), 
t.prototype.on_close.call(this, a, o), this.ad_instance) && (this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onclose, "", "", this.ad_param.ad_scene, "0", this.ad_op), 
this.ad_param && this.ad_param.onClose && this.ad_param.onClose(this.ad_param, {}), 
this.ad_status = e.e_ad_status.close, this.release());
}, a.prototype.on_error = function(a, o) {
if (a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) {
console.log("igc interstitial on_error res = ", JSON.stringify(o));
this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onerror, o.errCode, o.errMsg, this.ad_param.ad_scene, "0", this.ad_op), 
t.prototype.on_error.call(this, a, o), this.release();
}
}, a.prototype.on_show = function(e) {
e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (console.log("igc interstitial on_show succ"), 
this.ad_instance && this.ad_instance.offShow && this.ad_instance.offShow(), t.prototype.on_show.call(this, e));
}, a;
}(e.ad_base);
e.ad_interstitial_oppo_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc interstitial ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
this.ad_instance && (this.ad_instance.offError(), this.ad_instance.offClose(), this.ad_instance.offLoad(), 
this.ad_instance.offShow(), this.ad_instance.destroy(), this.ad_instance = null), 
t.prototype.release.call(this);
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
console.log("igc native custom ad_type: " + t.ad_type + ",ad_id:" + t.ad_id + " create");
var a = this;
this.ad_param = t, a.ad_op = e.e_ad_op.create, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", a.ad_op), 
this.ad_instance = window.qg.createCustomAd({
adUnitId: t.ad_id,
style: t.extra || {}
}), this.ad_instance.onLoad(function() {
a.ad_instance && a.ad_instance.offLoad && a.ad_instance.offLoad(), a.on_load(t, {});
}), this.ad_instance.onError(function(e) {
a.on_error(t, e);
}), this.ad_instance.onHide && this.ad_instance.onHide(function() {
a.ad_instance && a.ad_instance.offHide && a.ad_instance.offHide();
}), a.ad_op = e.e_ad_op.load;
}
}, a.prototype.show_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc native custom ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " show_ad"), 
console.log("igc native custom show_ad");
var a = this;
if (this.ad_instance && this.ad_param && t && t.ad_id === a.ad_param.ad_id) {
a.ad_op = e.e_ad_op.show, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.show, "", "", t.ad_scene, "0", a.ad_op);
var o = this.ad_instance.show();
o ? console.log("igc native custom show adshow:", JSON.stringify(o)) : console.log("igc native custom show adshow null"), 
o && o.then(function() {
console.log("igc native custom show_ad succ --- return"), a.on_show(t);
}).catch(function(e) {
console.log("igc native custom show_ad err --- return " + e), a.on_error(t, e);
});
}
}
}, a.prototype.on_load = function(e, a) {
e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && this.ad_instance && (this.ad_instance.offLoad(), 
t.prototype.on_load.call(this, e, a), console.log("igc native custom on_load"), 
this.ad_param && !1 !== this.ad_param.auto_show && this.show_ad(this.ad_param));
}, a.prototype.on_close = function(a, o) {
a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance && (console.log("igc native custom on_close res = ", JSON.stringify(o)), 
t.prototype.on_close.call(this, a, o), this.ad_instance) && (this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onclose, "", "", this.ad_param.ad_scene, "0", this.ad_op), 
this.ad_param && this.ad_param.onClose && this.ad_param.onClose(this.ad_param, {}), 
this.ad_status = e.e_ad_status.close, this.release());
}, a.prototype.on_error = function(a, o) {
if (a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) {
console.log("igc native custom on_error res = ", JSON.stringify(o));
this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onerror, o.errCode, o.errMsg, this.ad_param.ad_scene, "0", this.ad_op), 
t.prototype.on_error.call(this, a, o), this.release();
}
}, a.prototype.on_show = function(e) {
e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (console.log("igc native custom on_show succ"), 
this.ad_instance && this.ad_instance.offShow && this.ad_instance.offShow(), t.prototype.on_show.call(this, e));
}, a;
}(e.ad_base);
e.ad_native_custom_oppo_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc native ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
this.ad_instance && (this.ad_instance.offError(), this.ad_instance.offLoad());
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
console.log("igc native ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
var a = this;
if (this.ad_param = t, a.ad_op = e.e_ad_op.create, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", a.ad_op), 
this.ad_instance = window.qg.createNativeAd({
adUnitId: t.ad_id
}), !this.ad_instance) return this.release(), void console.log("igc create native fail");
this.ad_instance.onError(function(e) {
a.on_error(t, e);
}), this.ad_instance.onLoad(function(e) {
a.on_load(t, e);
}), a.ad_op = e.e_ad_op.load, this.ad_instance.load();
}
}, a.prototype.on_load = function(t, a) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
if (this.check_param(t), this.ad_instance && this.ad_instance.offLoad && this.ad_instance.offLoad(), 
!a || !a.adList) return this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onload, "0", "", this.ad_param.ad_scene, "0", this.ad_op), 
this.ad_param.onLoad(this.ad_param, []), this.ad_status = e.e_ad_status.none, this.release(), 
void console.log("igc native on_load fail");
console.log("igc native on_load length:", a.adList.length, JSON.stringify(a.adList)), 
this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onload, a.adList.length, "", this.ad_param.ad_scene, "0", this.ad_op);
for (var o = [], n = 0; n < a.adList.length; n++) {
var _ = {
adUnitId: a.adList[n].adId,
title: a.adList[n].title,
desc: a.adList[n].desc,
iconUrlList: a.adList[n].iconUrlList || a.adList[n].icon,
icon: a.adList[n].icon,
imgUrlList: a.adList[n].imgUrlList,
logoUrl: a.adList[n].logoUrl,
clickBtnTxt: a.adList[n].clickBtnTxt,
creativeType: a.adList[n].creativeType,
interactionType: a.adList[n].interactionType
};
a.adList[n].iconUrlList ? _.iconUrlList = a.adList[n].iconUrlList : (_.iconUrlList = [], 
_.iconUrlList.push(a.adList[n].icon)), o.push(_);
}
this.ad_param && this.ad_param.onLoad ? (console.log("igc native self.ad_param.onLoad(ad_data_list,self.ad_param)"), 
this.ad_param.onLoad(this.ad_param, o)) : console.log("igc native dont self.ad_param && self.ad_param.onLoad");
}
}, a.prototype.on_error = function(a, o) {
if (a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) {
console.log("igc native on_error:", JSON.stringify(o));
t.prototype.on_error.call(this, a, o), this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onerror, o.errorCode, o.errorMsg, this.ad_param.ad_scene, "0", this.ad_op), 
this.release();
}
}, a.prototype.report_ad_close = function(a) {
if (a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) {
console.log("igc native ad_type:" + a.ad_type + ",ad_id:" + a.ad_id + ",ad_unit_id:" + a.ad_unit_id + " report_ad_close"), 
console.log("igc native report_ad_close "), t.prototype.check_param.call(this, a);
this.ad_op = e.e_ad_op.close, this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onclose, "", "", a.ad_scene, "0", this.ad_op), 
this.ad_status = e.e_ad_status.close, this.release();
}
}, a.prototype.report_ad_show = function(a) {
console.log("igc native report_ad_show "), t.prototype.check_param.call(this, a);
return !(!this.ad_instance || !a || void 0 === a.ad_unit_id || (this.ad_instance.reportAdShow({
adId: a.ad_unit_id + ""
}), a.ad_pos_id && a.ad_type && a.ad_scene && a.sub_ad_type && (this.ad_op = e.e_ad_op.show, 
this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onshow, "", "", a.ad_scene, "0", this.ad_op), 
a.ad_id && console.log("igc native ad_type:" + a.ad_type + ",ad_id:" + a.ad_id + ",ad_unit_id:" + a.ad_unit_id + " report_ad_show")), 
0));
}, a.prototype.report_ad_click = function(a) {
console.log("igc native report_ad_click "), t.prototype.check_param.call(this, a);
return !(!this.ad_instance || !a || void 0 === a.ad_unit_id || (this.ad_instance.reportAdClick({
adId: a.ad_unit_id + ""
}), a.ad_pos_id && a.ad_type && a.ad_scene && a.sub_ad_type && (this.ad_op = e.e_ad_op.click, 
this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onclick, "", "", a.ad_scene, "0", this.ad_op), 
a.ad_id && console.log("igc native ad_type:" + a.ad_type + ",ad_id:" + a.ad_id + ",ad_unit_id:" + a.ad_unit_id + " report_ad_click")), 
0));
}, a;
}(e.ad_base);
e.ad_native_oppo_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.load_success = !1, e;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc portalbox ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
this.ad_instance && (this.ad_instance = null), this.load_success = !1, t.prototype.release.call(this);
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id && window.qg.createGamePortalAd) {
console.log("igc portalbox ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
var a = this;
this.ad_param = t, a.ad_op = e.e_ad_op.create, this.ad_instance = window.qg.createGamePortalAd({
adUnitId: t.ad_id
}), this.ad_instance.onLoad(a.on_load_callback.bind(a)), this.ad_instance.onClose(a.on_close_callback.bind(a)), 
this.ad_instance.onError(a.on_error_callback.bind(a)), a.ad_op = e.e_ad_op.load, 
this.ad_instance.load().then(function() {
console.log("igc gameportalbox load success"), a.on_load(t, {});
}).catch(function(e) {
console.log("igc gameportalbox load fail"), a.on_error(t, e);
});
}
}, a.prototype.on_load_callback = function() {}, a.prototype.on_error_callback = function(e) {
console.log("igc gameportalbox error back", e);
}, a.prototype.on_close_callback = function() {
console.log("igc gameportalbox close back"), this.ad_param.onClose(this.ad_param, {}), 
this.on_close(this.ad_param, {});
}, a.prototype.on_load = function(e, a) {
this.ad_instance && this.ad_param && e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (this.load_success = !0, 
t.prototype.on_load.call(this, e, a), e.auto_show && (e.auto_show = !1, this.show_ad(e)));
}, a.prototype.show_ad = function(t) {
var a = this;
e.stat_manager.instance.send_user_event(e.e_ad_app_box_type.portal_box + "", e.igc_stat_ids.multual_push_click, "", "", "", "", "", "", ""), 
this.ad_param = t, this.ad_instance && this.load_success ? (this.ad_op = e.e_ad_op.show, 
this.ad_instance.show().then(function() {
console.log("igc portalbox show success"), e.stat_manager.instance.send_user_event(e.e_ad_app_box_type.portal_box + "", e.igc_stat_ids.multual_push_show, "", "", "", "", "", "", ""), 
a.on_show(t);
}).catch(function(e) {
console.log("igc portalbox show fail"), a.on_error(t, e);
})) : (this.release(), t.auto_show = !0, this.create(t));
}, a.prototype.on_error = function(e, a) {
console.log("igc portalbox on_err res = ", JSON.stringify(a)), e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (t.prototype.on_error.call(this, e, a), 
this.release());
}, a.prototype.on_close = function(e, a) {
console.log("igc portalbox on_close res = ", JSON.stringify(a)), e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (t.prototype.on_close.call(this, e, a), 
e && e.onClose && e.onClose(e, {}), this.release());
}, a.prototype.destroy_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " destroy_ad");
this.ad_instance && this.ad_param && t && t.ad_id === this.ad_param.ad_id && (this.ad_op = e.e_ad_op.destroy, 
this.release());
}
}, a;
}(e.ad_base);
e.ad_portalbox_oppo_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc video ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
this.ad_instance && (this.ad_instance.offLoad(), this.ad_instance.offClose(), this.ad_instance.offError(), 
this.ad_instance.destroy()), t.prototype.release.call(this);
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
console.log("igc video ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
var a = this;
this.ad_param = t, a.ad_op = e.e_ad_op.create, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", a.ad_op);
var o = t.extra || "";
e.stat_manager.instance.send_user_event(t.ad_pos_id + "", e.igc_stat_ids.video_click, "", "", o, "", "", "", ""), 
this.ad_instance = window.qg.createRewardedVideoAd({
adUnitId: t.ad_id
}), this.ad_instance.onLoad(function() {
a.ad_instance && a.ad_instance.offLoad && a.ad_instance.offLoad(), a.on_load(t, {});
}), this.ad_instance.onError(function(e) {
a.on_error(t, e);
}), this.ad_instance.onClose(function(e) {
a.ad_instance && a.ad_instance.offClose && a.ad_instance.offClose(), a.on_close(t, e);
}), a.ad_op = e.e_ad_op.load, this.ad_instance.load();
}
}, a.prototype.on_load = function(a, o) {
if (a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance && this.ad_instance && this.ad_param) {
var n = this;
this.ad_instance.offLoad && this.ad_instance.offLoad(), t.prototype.on_load.call(this, a, o);
try {
n.ad_op = e.e_ad_op.show, n.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.show, "", "", a.ad_scene, "0", n.ad_op);
var _ = this.ad_instance.show();
a.platformVersionCode < 1061 && (console.log("video fake onshow succ ---------"), 
n.on_show(a)), _ ? console.log("igc video show adshow:", JSON.stringify(_)) : console.log("igc video show adshow null"), 
_ && _.then(function() {
console.log("igc video show succ result"), n.on_show(a);
});
} catch (e) {
console.log("" + e);
}
}
}, a.prototype.on_error = function(a, o) {
if (a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) {
console.log("igc video on_err res = ", JSON.stringify(o));
t.prototype.on_error.call(this, a, o), this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onerror, o.errCode, o.errMsg, this.ad_param.ad_scene, "0", this.ad_op), 
this.release();
}
}, a.prototype.on_close = function(a, o) {
if (a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) {
console.log("igc video on_close res = ", JSON.stringify(o));
t.prototype.on_close.call(this, a, o), o && o.isEnded ? (this.ad_param.onClose && this.ad_param.onClose(this.ad_param, {
isEnded: o.isEnded
}), this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onclose, e.e_ad_video_close.complete, "", this.ad_param.ad_scene, "0", this.ad_op), 
e.stat_manager.instance.send_user_event(this.ad_param.ad_pos_id + "", e.igc_stat_ids.video_compelete, "", "", "", "", "", "", "")) : (this.ad_param.onClose && this.ad_param.onClose(this.ad_param, {
isEnded: !1
}), this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onclose, e.e_ad_video_close.uncomplete, "", this.ad_param.ad_scene, "0", this.ad_op), 
e.stat_manager.instance.send_user_event(this.ad_param.ad_pos_id + "", e.igc_stat_ids.video_uncompelete, "", "", "", "", "", "", "")), 
this.release();
}
}, a;
}(e.ad_base);
e.ad_video_oppo_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.ad_block_map = {}, e.ad_sysInfo = null, e.banner_top_offset = 0, e.can_video = !0, 
e.can_banner = !0, e.can_appbox = !0, e.can_inter = !0, e.can_block = !0, e;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.ad_sysInfo = window.qq.getSystemInfoSync(), -1 == e.utils_manager.compare_version(this.ad_sysInfo.SDKVersion, "1.7.1") && (this.can_appbox = !1), 
-1 == e.utils_manager.compare_version(this.ad_sysInfo.SDKVersion, "1.12.0") && (this.can_inter = !1), 
-1 == e.utils_manager.compare_version(this.ad_sysInfo.SDKVersion, "1.15.0") && (this.can_block = !1), 
this.support_method[e.e_method_type.create_ad] = !0, this.support_method[e.e_method_type.destroy_ad] = !0, 
this.support_method[e.e_method_type.show_ad] = !0, this.support_method[e.e_method_type.hide_ad] = !0, 
this.support_method[e.e_method_type.has_ad] = !0, this.support_method[e.e_method_type.set_ad_position] = !0;
}, a.prototype.has_ad = function(t) {
return t && t.ad_type === e.e_ad_type.app_box ? this.can_appbox : !t || t.ad_type !== e.e_ad_type.interstitial || this.can_inter;
}, a.prototype.create_ad = function(t) {
return !(!t.ad_id || !t.ad_type) && !!this.has_ad(t) && (t.ad_type == e.e_ad_type.banner ? this.create_ad_banner(t) : t.ad_type == e.e_ad_type.video ? this.create_ad_video(t) : t.ad_type == e.e_ad_type.app_box ? this.create_ad_app_box(t) : t.ad_type == e.e_ad_type.interstitial ? this.create_ad_interstitial(t) : t.ad_type == e.e_ad_type.block && this.create_ad_block(t));
}, a.prototype.create_ad_banner = function(t) {
this.ad_banner && (this.ad_banner.destroy_ad(t), this.ad_banner = null), t.windowWidth = this.ad_sysInfo.screenWidth, 
t.windowHeight = this.ad_sysInfo.screenHeight;
var a = t.width || 300;
a > t.windowWidth ? a = t.windowWidth : a < 300 && (a = 300);
var o = (t.windowWidth - a) / 2, n = t.windowHeight - 80;
console.log("igc create_banner left:" + o + ",top:" + n + ",width:" + a), t.width = a, 
this.banner_top_offset > 0 ? (t.top_offset = this.banner_top_offset, t.is_set_position = !0, 
t.style = {
left: o,
top: this.banner_top_offset,
width: a
}) : (t.style = {
left: o,
top: n,
width: a
}, t.is_set_position = !1), this.ad_banner = new e.ad_banner_qq(), this.ad_banner.create(t);
}, a.prototype.create_ad_video = function(t) {
this.ad_video ? this.ad_video.create(t) : (this.ad_video = new e.ad_video_qq(), 
this.ad_video.create(t));
}, a.prototype.create_ad_app_box = function(t) {
return !(!this.can_appbox || !window.qq.createAppBox || (this.ad_appbox ? this.ad_appbox.create(t) : (this.ad_appbox = new e.ad_appbox_qq(), 
this.ad_appbox.create(t)), 0));
}, a.prototype.create_ad_interstitial = function(t) {
if (!this.can_inter || !window.qq.createInterstitialAd) return !1;
this.ad_interstitial ? this.ad_interstitial.create(t) : (this.ad_interstitial = new e.ad_interstitial_qq(), 
this.ad_interstitial.create(t));
}, a.prototype.create_ad_block = function(t) {
if (!this.can_block || !window.qq.createBlockAd) return !1;
t.windowWidth = this.ad_sysInfo.screenWidth, t.windowHeight = this.ad_sysInfo.screenHeight, 
this.banner_top_offset > 0 ? (t.is_set_position = !0, t.top_offset = this.banner_top_offset) : t.is_set_position = !1, 
this.ad_block_map[t.ad_id] ? this.ad_block_map[t.ad_id].create(t) : (this.ad_block_map[t.ad_id] = new e.ad_block_qq(), 
this.ad_block_map[t.ad_id].create(t));
}, a.prototype.set_ad_position = function(t) {
if (t.ad_type == e.e_ad_type.banner) for (var a in this.banner_top_offset = t.top_offset, 
this.ad_banner ? this.ad_banner.set_ad_position(t) : console.log("channel_ad_qq  move_ad  ad_banner_instance is null"), 
this.ad_block_map) this.ad_block_map[a] && this.ad_block_map[a].set_ad_position(t); else if (t && t.ad_id) for (var a in this.ad_block_map) t.ad_id == a && this.ad_block_map[a] && this.ad_block_map[a].set_ad_position(t);
}, a.prototype.show_ad = function(t) {
return !(!t.ad_id || !t.ad_type) && (t.ad_type == e.e_ad_type.banner ? this.show_ad_banner(t) : t.ad_type == e.e_ad_type.video ? this.show_ad_video(t) : t.ad_type == e.e_ad_type.app_box ? this.show_ad_app_box(t) : t.ad_type == e.e_ad_type.interstitial ? this.show_ad_interstitial(t) : t.ad_type == e.e_ad_type.block && this.show_ad_block(t));
}, a.prototype.show_ad_banner = function(e) {
return !!this.ad_banner && (this.ad_banner.show_ad(e), !0);
}, a.prototype.show_ad_video = function(e) {
return !!this.ad_video && (this.ad_video.show_ad(e), !0);
}, a.prototype.show_ad_app_box = function(e) {
return !!this.ad_appbox && (this.ad_appbox.show_ad(e), !0);
}, a.prototype.show_ad_interstitial = function(e) {
return !!this.ad_interstitial && (this.ad_interstitial.show_ad(e), !0);
}, a.prototype.show_ad_block = function(e) {
return !!this.ad_block_map[e.ad_id] && (this.ad_block_map[e.ad_id].show_ad(e), !0);
}, a.prototype.hide_ad = function(t) {
return !(!t.ad_id || !t.ad_type) && (t.ad_type == e.e_ad_type.banner ? this.hide_ad_banner(t) : t.ad_type == e.e_ad_type.video ? this.hide_ad_video(t) : t.ad_type == e.e_ad_type.app_box ? this.hide_ad_appbox(t) : t.ad_type == e.e_ad_type.interstitial ? this.hide_ad_interstitial(t) : t.ad_type == e.e_ad_type.block && this.hide_ad_block(t));
}, a.prototype.hide_ad_banner = function(e) {
this.ad_banner && this.ad_banner.hide_ad(e);
}, a.prototype.hide_ad_video = function(e) {
this.ad_video && this.ad_video.hide_ad(e);
}, a.prototype.hide_ad_appbox = function(e) {
this.ad_appbox && this.ad_appbox.hide_ad(e);
}, a.prototype.hide_ad_interstitial = function(e) {
this.ad_interstitial && this.ad_interstitial.hide_ad(e);
}, a.prototype.hide_ad_block = function(e) {
return !!this.ad_block_map[e.ad_id] && (this.ad_block_map[e.ad_id].hide_ad(e), !0);
}, a.prototype.destroy_ad = function(t) {
return !(!t.ad_id || !t.ad_type) && (t.ad_type == e.e_ad_type.banner ? this.destroy_ad_banner(t) : t.ad_type == e.e_ad_type.video ? this.destroy_ad_video(t) : t.ad_type == e.e_ad_type.app_box ? this.destroy_ad_app_box(t) : t.ad_type == e.e_ad_type.interstitial ? this.destroy_ad_interstitial(t) : t.ad_type == e.e_ad_type.block && this.destroy_ad_block(t));
}, a.prototype.destroy_ad_banner = function(e) {
this.ad_banner && (this.ad_banner.destroy_ad(e), this.ad_banner = null);
}, a.prototype.destroy_ad_video = function(e) {
this.ad_video && this.ad_video.destroy_ad(e);
}, a.prototype.destroy_ad_app_box = function(e) {
this.ad_appbox && (this.ad_appbox.destroy_ad(e), this.ad_appbox = null);
}, a.prototype.destroy_ad_interstitial = function(e) {
this.ad_interstitial && this.ad_interstitial.destroy_ad(e);
}, a.prototype.destroy_ad_block = function(e) {
return !!this.ad_block_map[e.ad_id] && (this.ad_block_map[e.ad_id].destroy_ad(e), 
!0);
}, a;
}(e.channel_facade_ad_base);
e.channel_ad_qq = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.register_listener(), this.support_method[e.e_method_type.share] = !0, 
this.support_method[e.e_method_type.on_share_app_message] = !0, this.support_method[e.e_method_type.start_record_screen] = !1, 
this.support_method[e.e_method_type.stop_record_screen] = !1, this.support_method[e.e_method_type.pause_record_screen] = !1, 
this.support_method[e.e_method_type.resume_record_screen] = !1, this.support_method[e.e_method_type.share_record_screen] = !1, 
this.support_method[e.e_method_type.get_record_video] = !1;
}, a.prototype.register_listener = function() {}, a.prototype.on_share_app_message = function(t) {
var a = "type=" + e.e_share_type.card + "&k2=v2";
t && t.userId && "" != t.userId && (a = "type=" + e.e_share_type.card + "&userId=" + t.userId), 
window.qq.showShareMenu({
showShareItems: [ "qq", "qzone", "wechatFriends", "wechatMoment" ]
}), window.qq.onShareAppMessage(function() {
return {
title: t.title,
imageUrl: t.imageUrl,
query: a
};
});
}, a.prototype.share = function(t) {
var a = "type=" + e.e_share_type.card + "&k2=v2";
t && t.userId && "" != t.userId && (a = "type=" + e.e_share_type.card + "&userId=" + t.userId), 
window.qq.shareAppMessage({
title: t.title || "",
imageUrl: t.imageUrl || "",
query: a,
shareAppType: t.shareAppType || "",
success: function(e) {
t.success && t.success(e);
},
fail: function(e) {
t.success && t.success(e);
}
});
}, a;
}(e.channel_facade_share_base);
e.channel_share_qq = t, window.channel_share_qq = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.register_listener(), this.support_method[e.e_method_type.get_system_info_sync] = !0, 
this.support_method[e.e_method_type.get_launch_options_sync] = !0, this.support_method[e.e_method_type.exit_mini_program] = !0, 
this.support_method[e.e_method_type.on_show] = !0, this.support_method[e.e_method_type.on_hide] = !0;
}, a.prototype.register_listener = function() {}, a.prototype.get_system_info_sync = function() {
var e = window.qq.getSystemInfoSync();
return {
brand: e.brand,
model: e.model,
pixelRatio: e.pixelRatio,
screenWidth: e.screenWidth,
screenHeight: e.screenHeight,
windowWidth: e.windowWidth,
windowHeight: e.windowHeight,
statusBarHeight: e.statusBarHeight,
language: e.language,
version: e.version,
platform: e.platform,
system: e.system,
platformVersion: e.SDKVersion,
extra: e
};
}, a.prototype.get_launch_options_sync = function() {
var e = window.qq.getLaunchOptionsSync();
return {
scene: e.scene,
query: e.query,
shareTicket: e.shareTicket,
referrerInfo: e.referrerInfo,
entryDataHash: e.entryDataHash
};
}, a.prototype.exit_mini_program = function() {
return window.qq.exitMiniProgram();
}, a.prototype.on_show = function(e) {
return window.qq.onShow(function(t) {
e.on_show && e.on_show(t);
});
}, a.prototype.on_hide = function(e) {
return window.qq.onHide(function(t) {
e.on_hide && e.on_hide(t);
});
}, a;
}(e.channel_facade_share_base);
e.channel_system_qq = t, window.channel_system_qq = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.button = void 0, e;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.support_method[e.e_method_type.login] = !0, this.support_method[e.e_method_type.share] = !0, 
this.support_method[e.e_method_type.show_loading] = !0, this.support_method[e.e_method_type.show_toast] = !0, 
this.support_method[e.e_method_type.show_modal] = !0, this.support_method[e.e_method_type.on_show] = !0, 
this.support_method[e.e_method_type.on_hide] = !0, this.support_method[e.e_method_type.navigate_to_mini_program] = !0, 
this.support_method[e.e_method_type.get_system_info_sync] = !0, this.support_method[e.e_method_type.create_inner_audio_context] = !0, 
this.support_method[e.e_method_type.post_message] = !0, this.support_method[e.e_method_type.set_user_cloud_storage] = !0, 
this.support_method[e.e_method_type.get_setting] = !0, this.support_method[e.e_method_type.create_user_info_button] = !0, 
this.support_method[e.e_method_type.open_setting] = !0, this.support_method[e.e_method_type.authorize] = !0, 
this.support_method[e.e_method_type.get_device] = !0, this.support_method[e.e_method_type.get_invite_query] = !0, 
this.support_method[e.e_method_type.set_show_share_menu] = !0, this.support_method[e.e_method_type.get_launch_options_sync] = !0;
var a = window.qq.getSystemInfoSync();
a && (e.stat_manager.instance._osInfo = a.model || "", e.stat_manager.instance._opInfo = a.SDKVersion), 
console.log("xiejinhui qq手机型号", e.stat_manager.instance._osInfo);
}, a.prototype.login = function(t, a) {
var o = this;
window.qq && window.qq.login({
success: function(t) {
o.getSetting(function(n) {
if (!0 === n) o.getUserInfo(function(n, _) {
if (!0 === n) {
var i = {
code: t.code,
user_data: _
};
o.on_login_result(e.e_channel_code.login_success, i, a);
} else {
i = {
code: t.code
};
o.on_login_result(e.e_channel_code.login_success, i, a);
}
}); else {
var _ = {
code: t.code
};
o.on_login_result(e.e_channel_code.login_success, _, a);
}
});
},
fail: function(t) {
window.qq.hideLoading(), window.qq.showToast({
title: "QQ登录失败!",
icon: "",
image: "",
duration: 2e3
}), o.on_login_result(e.e_channel_code.login_fail, t, a);
}
});
}, a.prototype.getSetting = function(e) {
window.qq && window.qq.getSetting({
success: function(t) {
return !0 === t.authSetting["scope.userInfo"] ? void (e && e(!0)) : void (e && e(!1));
}
});
}, a.prototype.getUserInfo = function(e) {
window.qq && window.qq.getUserInfo({
success: function(t) {
e && e(!0, t);
},
fail: function() {
e && e(!1, {});
}
});
}, a.prototype.get_user_info = function(e) {
var t = this;
return t.getSetting(function(a) {
!0 === a ? t.getUserInfo(function(a, o) {
if (!0 === a) {
var n = {
user_data: o
}, _ = t.config_channel_user_info_ex(n);
e.on_user_info && e.on_user_info(_), e.success && e.success(_);
} else e.on_user_info && e.on_user_info(void 0);
}) : (t.create_button(e), e.fail && e.fail());
}), !0;
}, a.prototype.create_button = function(e) {
var t = this;
t.button = window.qq.createUserInfoButton({
type: e.type,
image: e.image,
style: {
left: e.left,
top: e.top,
width: e.width,
height: e.height,
lineHeight: e.lineHeight,
backgroundColor: e.backgroundColor,
color: e.color,
textAlign: e.textAlign,
fontSize: e.fontSize,
borderRadius: e.borderRadius
}
}), t.button.onTap(function() {
t.getSetting(function(a) {
1 == a && t.getUserInfo(function(a, o) {
if (!0 === a) {
var n = {
user_data: o
}, _ = t.config_channel_user_info_ex(n);
e.on_user_info && e.on_user_info(_);
} else e.on_user_info && e.on_user_info(void 0);
}), t.button && (t.button.destroy(), t.button = void 0);
});
});
}, a.prototype.config_channel_user_info_ex = function(e) {
var t = localStorage.getItem("igc_random_qq_name");
return t || (t = this.get_random_name(), localStorage.setItem("igc_random_qq_name", t)), 
this.config_channel_user_info(e, function(e) {
if (e.user_data) {
var a = e.user_data.userInfo;
return {
uid: t,
token: e.code,
hasAuth: !0,
nickName: t,
avatar: a.avatarUrl,
sex: a.gender,
birthday: "",
phoneNum: "",
location: "",
extra: ""
};
}
return {
uid: t,
token: e.code,
hasAuth: !1,
nickName: t,
avatar: "",
sex: "",
birthday: "",
phoneNum: "",
location: "",
extra: ""
};
});
}, a.prototype.on_login_result = function(t, a, o) {
if (t == e.e_channel_code.login_success) {
var n = this.config_channel_user_info_ex(a);
o({
errorcode: e.e_channel_code.login_success,
errormsg: "success",
sdk_errorcode: 0,
sdk_errormsg: "",
channel_user_info: n
});
} else o({
errorcode: e.e_channel_code.login_fail,
errormsg: "fail",
sdk_errorcode: -1,
sdk_errormsg: JSON.stringify(a),
channel_user_info: {}
});
}, a.prototype.share = function(e) {
if (void 0 !== window.qq && window.qq.shareAppMessage) return window.qq.shareAppMessage({
withShareTicket: e.with_share_ticket,
title: e.title,
imageUrl: e.image_url,
query: "type=" + e.query_type + "&userId=" + e.user_id,
success: function(t) {
e.on_succeed && e.on_succeed(t);
},
fail: function(t) {
e.on_failed && e.on_failed(t);
}
});
}, a.prototype.show_loading = function(e) {
return e.is_show ? window.qq.showLoading({
title: e.title,
mask: e.mask
}) : window.qq.hideLoading();
}, a.prototype.show_toast = function(e) {
return window.qq.showToast({
title: e.title,
icon: e.icon,
image: e.image,
duration: e.duration
});
}, a.prototype.show_modal = function(e) {
return window.qq.showModal({
title: e.title,
content: e.content,
showCancel: e.show_cancel,
cancelText: e.cancel_text,
cancelColor: e.cancel_color,
confirmText: e.confirm_text,
confirmColor: e.confirm_color,
success: e.on_succeed,
fail: e.on_failed,
complete: e.on_complete
});
}, a.prototype.on_show = function(e) {
return window.qq.onShow(function(t) {
e.on_show && e.on_show(t);
});
}, a.prototype.on_hide = function(e) {
return window.qq.onHide(function(t) {
e.on_hide && e.on_hide(t);
});
}, a.prototype.navigate_to_mini_program = function(e) {
return window.qq.navigateToMiniProgram({
appId: e.app_id,
path: e.path,
extraData: e.extra_data,
success: e.on_succeed
});
}, a.prototype.get_system_info_sync = function() {
return window.qq.getSystemInfoSync();
}, a.prototype.create_inner_audio_context = function() {
return window.qq.createInnerAudioContext();
}, a.prototype.post_message = function(e) {
return window.qq.postMessage({
messageType: e.message_type,
data: e.data
});
}, a.prototype.set_user_cloud_storage = function(e) {
return window.qq.setUserCloudStorage({
KVDataList: e.kv_data_list,
success: e.on_succeed,
fail: e.on_failed
});
}, a.prototype.get_setting = function(e) {
return window.qq.getSetting({
success: e.on_succeed
});
}, a.prototype.create_user_info_button = function(e) {
return window.qq.createUserInfoButton({
type: e.type,
image: e.image,
style: e.style
});
}, a.prototype.open_setting = function() {
return window.qq.openSetting();
}, a.prototype.authorize = function(e) {
return window.qq.authorize({
scope: e.score,
success: e.on_succeed,
fail: e.on_failed
});
}, a.prototype.get_device = function() {
return window.qq.getSystemInfo({
success: function(t) {
return "devtools" == t.platform ? e.e_device.desktop : "ios" == t.platform ? e.e_device.ios : "android" == t.platform ? e.e_device.android : e.e_device.unknown;
}
}), e.e_device.unknown;
}, a.prototype.get_invite_query = function() {
var e = window.qq.getLaunchOptionsSync();
return console.log("qq游戏启动参数-----------------\x3e", e), e.query;
}, a.prototype.set_show_share_menu = function(e) {
window.qq.showShareMenu({
showShareItems: [ "qq", "qzone", "wechatFriends", "wechatMoment" ]
}), window.qq.onShareAppMessage(function() {
return {
title: e.txt,
imageUrl: e.url
};
});
}, a.prototype.get_launch_options_sync = function() {
return window.qq.getLaunchOptionsSync();
}, a;
}(e.channel_facade_user_base);
e.channel_user_qq = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.is_first = !0, e;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc appbox ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
this.ad_param = null;
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
console.log("igc appbox ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
var a = this;
this.ad_param = t, a.ad_op = e.e_ad_op.create, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", a.ad_op), 
this.ad_instance = window.qq.createAppBox({
adUnitId: t.ad_id
}), !0 === this.is_first && (this.ad_instance.onClose(a.on_close_callback.bind(a)), 
this.is_first = !1), a.ad_op = e.e_ad_op.load, this.ad_instance.load().then(function() {
a.on_load(t, {});
}).catch(function(e) {
a.on_error(t, e);
});
}
}, a.prototype.on_close_callback = function() {
this.ad_instance || console.log("igc on_load_callback self.ad_instance null"), this.ad_instance.offClose || console.log("igc on_load_callback self.ad_instance.offClose null"), 
this.on_close(this.ad_param, {});
}, a.prototype.on_load = function(a, o) {
if (this.ad_instance && this.ad_param && a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) {
var n = this;
t.prototype.on_load.call(this, a, o), n.ad_op = e.e_ad_op.show, n.ad_instance.show().then(function() {
n.on_show(a);
}).catch(function(e) {
n.on_error(a, e);
});
}
}, a.prototype.on_error = function(a, o) {
(console.log("igc appbox on_err res = ", JSON.stringify(o)), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) && (t.prototype.on_error.call(this, a, o), 
this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onerror, o.errCode, o.errMsg, this.ad_param.ad_scene, "0", this.ad_op), 
this.release());
}, a.prototype.on_close = function(a, o) {
(console.log("igc appbox on_close res = ", JSON.stringify(o)), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) && (t.prototype.on_close.call(this, a, o), 
this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onclose, "", "", this.ad_param.ad_scene, "0", this.ad_op), 
this.release());
}, a.prototype.destroy_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " destroy_ad");
this.ad_instance && this.ad_param && t && t.ad_id === this.ad_param.ad_id && (this.ad_op = e.e_ad_op.destroy, 
this.ad_instance.destroy(), this.release(), this.ad_instance = null, this.is_first = !1);
}
}, a;
}(e.ad_base);
e.ad_appbox_qq = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.show_num = 0, e.is_resize_back = !1, e.top_offset = 0, e;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc banner ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
this.ad_instance && (this.ad_instance.offLoad && this.ad_instance.offLoad(), this.ad_instance.offError && this.ad_instance.offError(), 
this.ad_instance.offResize && this.ad_instance.offResize(), this.ad_instance.destroy(), 
this.ad_instance = null, this.ad_param = null), t.prototype.release.call(this);
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
this.ad_param = t, this.ad_op = e.e_ad_op.create, this.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", this.ad_op), 
this.is_resize_back = !1;
var a = t.style || {};
this.ad_instance = window.qq.createBannerAd({
adUnitId: t.ad_id,
style: a
}), this.ad_instance.onError(this.on_error_callback.bind(this)), this.ad_instance.onLoad(this.on_load_callback.bind(this)), 
this.ad_instance.onResize(this.on_resize_callback.bind(this));
}
}, a.prototype.on_error_callback = function(e) {
this.on_error(this.ad_param, e);
}, a.prototype.on_load_callback = function() {
this || console.log("igc banner on_load_callback self null"), this.ad_instance || console.log("igc banner on_load_callback self.ad_instance null"), 
this.ad_instance.offLoad || console.log("igc banner on_load_callback self.ad_instance.offLoad null"), 
this.ad_instance && this.ad_instance.offLoad && this.ad_instance.offLoad(this.on_load_callback), 
this.on_load(this.ad_param, {});
}, a.prototype.on_resize_callback = function(e) {
console.log("igc on_resize_callback:", e.width, e.height), this.is_resize_back = !0;
this.banner_size = e, this.ad_param.width = e.width, this.ad_param.is_set_position ? this.top_offset > 0 ? this.ad_instance.style.top = this.top_offset : this.ad_instance.style.top = this.ad_param.top_offset : this.ad_instance.style.top = this.ad_param.windowHeight - e.height - this.ad_param.top_offset, 
this.ad_instance.style.left = (this.ad_param.windowWidth - this.ad_param.width) / 2, 
console.log("igc on_resize_callback left:" + this.ad_instance.style.left + ",top:" + this.ad_instance.style.top + ",width:" + this.ad_instance.style.width);
}, a.prototype.set_ad_position = function(e) {
this.ad_param && (this.ad_param.is_set_position = e.top_offset > 0);
var t = e.top_offset > 0 ? e.top_offset : 0;
this.top_offset = t, this.is_resize_back ? (this.ad_instance && this.ad_instance.style && t > 0 && (this.ad_instance.style.top = t), 
this.ad_instance && this.ad_instance.style && this.banner_size && t <= 0 && this.banner_size && this.ad_param && (this.ad_instance.style.top = this.ad_param.windowHeight - this.banner_size.height - 20)) : console.error("igc ----- ad_banner_qq is no run on_resize_callback");
}, a.prototype.show_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " show_ad");
var a = this;
if (this.ad_instance && a.ad_param && t && t.ad_id === a.ad_param.ad_id) {
console.log("igc banner show_ad ad_status: ", this.ad_status), a.ad_op = e.e_ad_op.show, 
a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.show, "", "", t.ad_scene, "0", a.ad_op);
var o = this.ad_instance.show();
o && o.then(function() {
console.log("igc banner show succ result"), a.on_show(t);
}).catch(function(e) {
console.log("igc banner show error result:", JSON.stringify(e));
});
}
}
}, a.prototype.hide_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " hide_ad");
if (this.ad_instance && this.ad_param && t && t.ad_id === this.ad_param.ad_id) {
if (console.log("igc banner hide_ad ad_status: ", this.ad_status), this.ad_status < e.e_ad_status.show) return;
this.ad_op = e.e_ad_op.hide, this.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.hide, "", "", t.ad_scene, "0", this.ad_op), 
this.ad_instance.hide(), this.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.onhide, "", "", t.ad_scene, "0", this.ad_op);
}
}
}, a.prototype.destroy_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " destroy_ad");
this.ad_instance && this.ad_param && t && t.ad_id === this.ad_param.ad_id && (this.ad_op = e.e_ad_op.destroy, 
this.release());
}
}, a.prototype.on_load = function(e, a) {
e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (t.prototype.on_load.call(this, e, a), 
this.show_ad(e));
}, a.prototype.on_error = function(a, o) {
(console.log("igc banner on_error res = ", JSON.stringify(o)), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) && (t.prototype.on_error.call(this, a, o), 
this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onerror, o.errCode, o.errMsg, a.ad_scene, "0", this.ad_op), 
this.release());
}, a;
}(e.ad_base);
e.ad_banner_qq = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.is_showing = !1, e.is_resize_back = !1, e.top_offset = 0, e.landscape_center_y = 0, 
e.load_compelete = !1, e;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc block ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release");
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
console.log("igc block ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
this.ad_param = t, this.landscape_center_y = t.landscape_center_y, this.ad_op = e.e_ad_op.create, 
this.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", this.ad_op);
var a = t.style || {}, o = t.size || 5;
(o < 1 || o > 5) && (o = 5);
var n = t.orientation || "landscape";
console.log("igc block style:" + JSON.stringify(a) + " ,size:" + o + " ,orientation" + n), 
this.load_compelete ? t && !t.is_preload && this.show_ad(t) : (this.is_resize_back = !1, 
this.ad_instance = window.qq.createBlockAd({
adUnitId: t.ad_id,
style: a,
size: o,
orientation: n
}), this.ad_instance.offLoad && this.ad_instance.offLoad(), this.ad_instance.offError && this.ad_instance.offError(), 
this.ad_instance.offResize && this.ad_instance.offResize(), this.ad_instance.onError(this.on_error_callback.bind(this)), 
this.ad_instance.onLoad(this.on_load_callback.bind(this)), this.ad_instance.onResize(this.on_resize_callback.bind(this)));
}
}, a.prototype.set_ad_position = function(e) {
if (this.ad_param && this.ad_param.landscape_center_y > -88888) return this.landscape_center_y = e.landscape_center_y, 
this.is_resize_back ? void (e.ad_id == this.ad_param.ad_id && this.ad_instance && (this.ad_instance.style.top = (this.ad_param.windowHeight - this.block_size.height) / 2 + this.landscape_center_y)) : void console.error("igc ----- ad_block_qq is no run on_resize_callback");
if ("landscape" == this.ad_param.orientation && this.ad_instance) {
console.log("igc ad_block_qq set_ad_position"), this.ad_param && (this.ad_param.is_set_position = e.top_offset > 0);
var t = e.top_offset > 0 ? e.top_offset : 0;
if (this.top_offset = t, !this.is_resize_back) return void console.error("igc ----- ad_block_qq is no run on_resize_callback");
this.ad_instance && this.ad_instance.style && t > 0 && (this.ad_instance.style.top = t), 
this.ad_instance && this.ad_instance.style && this.block_size && (t > 0 || this.block_size && this.ad_param && (this.ad_instance.style.top = this.ad_param.windowHeight - this.block_size.height - 20));
}
}, a.prototype.on_error_callback = function(e) {
this.on_error(this.ad_param, e);
}, a.prototype.on_load_callback = function() {
this || console.log("igc block on_load_callback self null"), this.ad_instance || console.log("igc block on_load_callback self.ad_instance null"), 
this.ad_instance.offLoad || console.log("igc block on_load_callback self.ad_instance.offLoad null"), 
this.ad_instance && this.ad_instance.offLoad && this.ad_instance.offLoad(this.on_load_callback), 
this.on_load(this.ad_param, {});
}, a.prototype.on_resize_callback = function(e) {
console.log("igc block on_resize_callback:", e.width, e.height);
this.is_resize_back = !0, this.ad_param.width = e.width, this.block_size = e, "landscape" == this.ad_param.orientation ? (this.ad_instance.style.left = Math.floor((this.ad_param.windowWidth - e.width) / 2) - 2, 
this.landscape_center_y > -8888888 ? this.ad_instance.style.top = (this.ad_param.windowHeight - e.height) / 2 + this.landscape_center_y : this.ad_param.is_set_position ? this.top_offset > 0 ? this.ad_instance.style.top = this.top_offset : this.ad_instance.style.top = this.ad_param.top_offset : this.ad_instance.style.top = this.ad_param.windowHeight - e.height - this.ad_param.bottom_offset - 20) : "vertical" == this.ad_param.orientation && (this.ad_param.vertical_center_y && this.ad_param.vertical_center_y > -8888888 && (this.ad_instance.style.top = (this.ad_param.windowHeight - e.height) / 2 + this.ad_param.vertical_center_y), 
this.ad_param.vertical_right && this.ad_param.vertical_right > 0 && (this.ad_instance.style.left = this.ad_param.windowWidth - e.width - this.ad_param.vertical_right)), 
console.log("igc on_resize_callback left:" + this.ad_instance.style.left + ",top:" + this.ad_instance.style.top + ",width:" + this.ad_instance.style.width);
}, a.prototype.show_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc block ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " show_ad");
var a = this;
if (this.ad_instance && a.ad_param && t && t.ad_id === a.ad_param.ad_id) {
console.log("igc block show_ad ad_status: ", this.ad_status), a.ad_op = e.e_ad_op.show, 
a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.show, "", "", t.ad_scene, "0", a.ad_op);
var o = this.ad_instance.show();
o && o.then(function() {
console.log("igc block show succ result"), a.on_show(t), a.is_showing = !0;
}).catch(function(e) {
console.log("igc block show error result:", JSON.stringify(e));
});
}
}
}, a.prototype.hide_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc block ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " hide_ad");
if (this.ad_instance && this.ad_param && t && t.ad_id === this.ad_param.ad_id) {
if (console.log("igc block hide_ad ad_status: ", this.ad_status), this.ad_status < e.e_ad_status.show) return;
this.ad_op = e.e_ad_op.hide, this.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.hide, "", "", t.ad_scene, "0", this.ad_op), 
this.ad_instance.hide(), this.is_showing = !1, this.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.onhide, "", "", t.ad_scene, "0", this.ad_op);
}
}
}, a.prototype.destroy_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc block ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " destroy_ad");
this.is_showing = !1, this.ad_instance && this.ad_param && t && t.ad_id === this.ad_param.ad_id && (this.ad_op = e.e_ad_op.destroy, 
this.release());
}
}, a.prototype.on_load = function(e, a) {
e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (this.load_compelete = !0, 
t.prototype.on_load.call(this, e, a), e && !e.is_preload && this.show_ad(e));
}, a.prototype.on_error = function(a, o) {
(console.log("igc block on_error res = ", JSON.stringify(o)), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) && (this.load_compelete = !1, 
this.is_showing = !1, t.prototype.on_error.call(this, a, o), this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onerror, o.errCode, o.errMsg, a.ad_scene, "0", this.ad_op), 
this.release());
}, a;
}(e.ad_base);
e.ad_block_qq = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.is_first = !0, e;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc interstitial ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
this.ad_instance && (this.ad_instance.offClose(this.on_close_callback.bind(this)), 
this.ad_instance = null, this.ad_param = null), t.prototype.release.call(this);
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
console.log("igc interstitial ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
var a = this;
this.ad_param = t, a.ad_op = e.e_ad_op.create, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", a.ad_op), 
this.ad_instance = window.qq.createInterstitialAd({
adUnitId: t.ad_id
}), !0 === this.is_first && (this.ad_instance.onError(this.on_error_callback.bind(this)), 
this.is_first = !1), this.ad_instance.onClose(this.on_close_callback.bind(this)), 
a.ad_op = e.e_ad_op.load, this.ad_instance.load().then(function() {
console.log("igc 加载qq插屏成功，调用展示show", t.ad_id), a.on_load(t, {}), a.ad_param && !1 !== a.ad_param.auto_show && a.show_ad(a.ad_param);
}).catch(function(e) {
console.log("igc 加载头条插屏失败，调用展示show", t.ad_id), console.log(e);
});
}
}, a.prototype.on_error_callback = function(e) {
this.on_error(this.ad_param, e);
}, a.prototype.on_close_callback = function() {
this.on_close(this.ad_param, {});
}, a.prototype.show_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc interstitial ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " show_ad"), 
console.log("igc interstitial show_ad");
var a = this;
this.ad_instance && a.ad_param && t && t.ad_id === a.ad_param.ad_id && (a.ad_op = e.e_ad_op.show, 
a.send_dot(a.ad_param.ad_pos_id, a.ad_param.ad_type, e.e_ad_event.show, "", "", a.ad_param.ad_scene, "0", a.ad_op), 
this.ad_instance.show().then(function() {
console.log("igc show succ 1"), a.on_show(t);
}).catch(function() {
console.log("igc show cache err");
}));
}
}, a.prototype.on_close = function(a, o) {
(console.log("igc interstitial on_close res = ", JSON.stringify(o)), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance && (t.prototype.on_close.call(this, a, o), 
this.ad_instance)) && (this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onclose, "", "", this.ad_param.ad_scene, "0", this.ad_op), 
this.ad_param && this.ad_param.onClose && this.ad_param.onClose(this.ad_param, {}), 
this.ad_status = e.e_ad_status.close, this.release());
}, a.prototype.on_error = function(a, o) {
(console.log("igc interstitial on_error res = ", JSON.stringify(o)), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) && (this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onerror, o.errCode, o.errMsg, this.ad_param.ad_scene, "0", this.ad_op), 
t.prototype.on_error.call(this, a, o), this.release());
}, a.prototype.on_show = function(e) {
console.log("igc interstitial on_show succ"), e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && t.prototype.on_show.call(this, e);
}, a;
}(e.ad_base);
e.ad_interstitial_qq = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.load_compelete = !1, e.is_first = !0, e;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc video ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
this.ad_param = null;
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
console.log("igc video ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
var a = this;
this.ad_param = t, a.ad_op = e.e_ad_op.create, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", a.ad_op);
var o = t.extra || "";
e.stat_manager.instance.send_user_event(t.ad_pos_id + "", e.igc_stat_ids.video_click, "", "", o, "", "", "", ""), 
this.load_compelete || (this.ad_instance = window.qq.createRewardedVideoAd({
adUnitId: t.ad_id
})), !0 === this.is_first && this.ad_instance && (this.ad_instance.onError(a.on_error_callback.bind(a)), 
this.ad_instance.onClose(a.on_close_callback.bind(a)), this.ad_instance.onLoad(a.on_load_callback.bind(a)), 
this.is_first = !1), console.log("11111111111111111111111111111111111"), a.ad_op = e.e_ad_op.load, 
t && t.is_preload ? a.ad_instance.load().then(function() {
a.ad_op = e.e_ad_op.show;
}) : a.ad_instance.show().then(function() {
console.log("广告显示成功"), a.on_load(t, {}), a.ad_op = e.e_ad_op.show, a.on_show(t);
}).catch(function(o) {
console.log("广告组件出现问题", o), a.ad_op = e.e_ad_op.load, a.ad_instance.load().then(function() {
console.log("手动加载成功"), a.on_load(t, {}), a.ad_op = e.e_ad_op.show, a.ad_instance.show().then(function() {
console.log("广告显示成功 2"), a.ad_op = e.e_ad_op.show, a.on_show(t);
}).catch(function() {
console.log("广告显示error 2-----------");
});
});
});
}
}, a.prototype.on_load_callback = function() {
this.load_compelete = !0;
}, a.prototype.on_error_callback = function(e) {
this.on_error(this.ad_param, e);
}, a.prototype.on_close_callback = function(e) {
this.ad_instance || console.log("igc on_load_callback self.ad_instance null"), this.ad_instance.offClose || console.log("igc on_load_callback self.ad_instance.offClose null"), 
this.ad_instance && this.ad_instance.offClose && this.ad_instance.offClose(this.on_close_callback.bind(this)), 
this.on_close(this.ad_param, e);
}, a.prototype.on_load = function(e, a) {
this.ad_instance && this.ad_param && e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && t.prototype.on_load.call(this, e, a);
}, a.prototype.on_error = function(a, o) {
(console.log("igc video on_err res = ", JSON.stringify(o)), this.load_compelete = !1, 
a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) && (t.prototype.on_error.call(this, a, o), 
this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onerror, o.errCode, o.errMsg, this.ad_param.ad_scene, "0", this.ad_op), 
this.release());
}, a.prototype.on_close = function(a, o) {
(console.log("igc video on_close res = ", JSON.stringify(o)), this.load_compelete = !1, 
a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) && (t.prototype.on_close.call(this, a, o), 
o && o.isEnded ? (this.ad_param.onClose && this.ad_param.onClose(this.ad_param, {
isEnded: o.isEnded
}), this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onclose, e.e_ad_video_close.complete, "", this.ad_param.ad_scene, "0", this.ad_op), 
e.stat_manager.instance.send_user_event(this.ad_param.ad_pos_id + "", e.igc_stat_ids.video_compelete, "", "", "", "", "", "", "")) : (this.ad_param.onClose && this.ad_param.onClose(this.ad_param, {
isEnded: !1
}), this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onclose, e.e_ad_video_close.uncomplete, "", this.ad_param.ad_scene, "0", this.ad_op), 
e.stat_manager.instance.send_user_event(this.ad_param.ad_pos_id + "", e.igc_stat_ids.video_uncompelete, "", "", "", "", "", "", "")), 
this.release());
}, a;
}(e.ad_base);
e.ad_video_qq = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.ad_sysInfo = null, e.can_inter = !0, e.can_ad = !0, e;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.ad_sysInfo = window.tt.getSystemInfoSync(), "Toutiao" === window.tt.getSystemInfoSync().appName || (this.can_inter = !1), 
-1 == e.utils_manager.compare_version(this.ad_sysInfo.SDKVersion, "1.3.0") && (this.can_ad = !1), 
this.support_method[e.e_method_type.create_ad] = !0, this.support_method[e.e_method_type.destroy_ad] = !0, 
this.support_method[e.e_method_type.show_ad] = !0, this.support_method[e.e_method_type.hide_ad] = !0, 
this.support_method[e.e_method_type.has_ad] = !0;
}, a.prototype.has_ad = function(t) {
return !!this.can_ad && (!t || t.ad_type !== e.e_ad_type.interstitial || this.can_inter);
}, a.prototype.create_ad = function(t) {
return !(!t.ad_id || !t.ad_type) && !!this.has_ad(t) && (t.ad_type == e.e_ad_type.banner ? this.create_ad_banner(t) : t.ad_type == e.e_ad_type.video ? this.create_ad_video(t) : t.ad_type == e.e_ad_type.interstitial && this.create_ad_interstitial(t));
}, a.prototype.create_ad_banner = function(t) {
this.ad_banner && (this.ad_banner.destroy_ad(t), this.ad_banner = null);
var a = t.width || 200;
a > 208 ? a = 208 : a < 128 && (a = 128);
var o = (this.ad_sysInfo.windowWidth - a) / 2, n = this.ad_sysInfo.windowHeight - a / 16 * 9;
t.style = {
left: o,
top: n,
width: a
}, t.width = a, t.windowHeight = this.ad_sysInfo.windowHeight, t.windowWidth = this.ad_sysInfo.windowWidth, 
this.ad_banner = new e.ad_banner_tt(), this.ad_banner.create(t);
}, a.prototype.create_ad_video = function(t) {
this.ad_video ? this.ad_video.create(t) : (this.ad_video = new e.ad_video_tt(), 
this.ad_video.create(t));
}, a.prototype.create_ad_interstitial = function(t) {
"Toutiao" === window.tt.getSystemInfoSync().appName ? (this.ad_interstitial = new e.ad_interstitial_tt(), 
this.ad_interstitial.create(t)) : console.log("不是头条不支持插屏", window.tt.getSystemInfoSync().appName);
}, a.prototype.show_ad = function(t) {
return !(!t.ad_id || !t.ad_type) && (t.ad_type == e.e_ad_type.banner ? this.show_ad_banner(t) : t.ad_type == e.e_ad_type.video ? this.show_ad_video(t) : t.ad_type == e.e_ad_type.interstitial && this.show_ad_interstitial(t));
}, a.prototype.show_ad_banner = function(e) {
return !!this.ad_banner && (this.ad_banner.show_ad(e), !0);
}, a.prototype.show_ad_video = function(e) {
return !!this.ad_video && (this.ad_video.show_ad(e), !0);
}, a.prototype.show_ad_interstitial = function(e) {
return !!this.ad_interstitial && (this.ad_interstitial.show_ad(e), !0);
}, a.prototype.hide_ad = function(t) {
return !(!t.ad_id || !t.ad_type) && (t.ad_type == e.e_ad_type.banner ? this.hide_ad_banner(t) : t.ad_type == e.e_ad_type.video ? this.hide_ad_video(t) : t.ad_type == e.e_ad_type.interstitial && this.hide_ad_interstitial(t));
}, a.prototype.hide_ad_banner = function(e) {
this.ad_banner && this.ad_banner.hide_ad(e);
}, a.prototype.hide_ad_video = function(e) {
this.ad_video && this.ad_video.hide_ad(e);
}, a.prototype.hide_ad_interstitial = function(e) {
this.ad_interstitial && this.ad_interstitial.hide_ad(e);
}, a.prototype.destroy_ad = function(t) {
return !(!t.ad_id || !t.ad_type) && (t.ad_type == e.e_ad_type.banner ? this.destroy_ad_banner(t) : t.ad_type == e.e_ad_type.video ? this.destroy_ad_video(t) : t.ad_type == e.e_ad_type.interstitial && this.destroy_ad_interstitial(t));
}, a.prototype.destroy_ad_banner = function(e) {
this.ad_banner && (this.ad_banner.destroy_ad(e), this.ad_banner = null);
}, a.prototype.destroy_ad_video = function(e) {
this.ad_video && this.ad_video.destroy_ad(e);
}, a.prototype.destroy_ad_interstitial = function(e) {
this.ad_interstitial && this.ad_interstitial.destroy_ad(e);
}, a;
}(e.channel_facade_ad_base);
e.channel_ad_tt = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e._isStart = !1, e._isPause = !1, e._inner_time = 0, e.timer_func = null, 
e._max_time = 300, e;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.register_listener(), this.support_method[e.e_method_type.share] = !0, 
this.support_method[e.e_method_type.on_share_app_message] = !0, this.support_method[e.e_method_type.start_record_screen] = !0, 
this.support_method[e.e_method_type.stop_record_screen] = !0, this.support_method[e.e_method_type.pause_record_screen] = !0, 
this.support_method[e.e_method_type.resume_record_screen] = !0, this.support_method[e.e_method_type.share_record_screen] = !0, 
this.support_method[e.e_method_type.get_record_video] = !0;
}, a.prototype.register_listener = function() {}, a.prototype.on_share_app_message = function(t) {
var a = "type=" + e.e_share_type.card + "&k2=v2";
t && t.userId && "" != t.userId && (a = "type=" + e.e_share_type.card + "&userId=" + t.userId), 
window.tt.showShareMenu({
withShareTicket: !0
}), window.tt.onShareAppMessage(function() {
return {
title: t.title,
imageUrl: t.imageUrl,
query: a
};
});
}, a.prototype.share = function(t) {
var a = "type=" + e.e_share_type.card + "&k2=v2";
t && t.userId && "" != t.userId && (a = "type=" + e.e_share_type.card + "&userId=" + t.userId), 
window.tt.shareAppMessage({
channel: t.channel || "",
templateId: t.templateId || "",
desc: t.desc || "",
title: t.title || "",
imageUrl: t.imageUrl || "",
query: a,
extra: t.extra || {},
success: function(e) {
t.success && t.success(e);
},
fail: function(e) {
t.success && t.success(e);
}
});
}, a.prototype.start_record_screen = function(e) {
if (window.tt) if (this._isStart) console.log("record 已经在录屏，请勿重复录制"); else if (window.tt.getGameRecorderManager) {
var t = this, a = t._max_time;
e && e.time && (a = e.time, t._max_time = e.time), t._recorder || (t._recorder = window.tt.getGameRecorderManager(), 
t._recorder.onStart(function() {
console.log("record 开始录屏"), t._isStart = !0, t._inner_time = 0;
}), t._recorder.onPause(function() {
console.log("record 暂停录屏"), t._isPause = !0;
}), t._recorder.onResume(function() {
console.log("record 恢复录屏"), t._isPause = !1;
}), t._recorder.onStop(function(a) {
e.is_clip_end ? t.clipVideo({
videoPath: a.videoPath,
time: Math.min(e.clip_time, t._inner_time),
call_back: function(a) {
t._videoPath = a.videoPath, console.log("record 录屏结束 录屏时长", Math.min(e.clip_time, t._inner_time)), 
t._isStart = !1, t._isPause = !1;
}
}) : (t._videoPath = a.videoPath, console.log("record 录屏结束", t._videoPath), t._isStart = !1, 
t._isPause = !1);
}), t._recorder.onError(function(e) {
console.log("record 录屏发生错误", e);
})), t._recorder.start({
duration: a
}), this.start_timer();
} else console.log("record 当前环境没有录屏接口"); else console.log("record 当前渠道不支持录屏");
}, a.prototype.start_timer = function() {
var e = this;
this.timer_func = function() {
e._isStart && !e._isPause && (e._inner_time++, e._inner_time >= e._max_time && e.stop_record_screen());
}, window.Laya.timer.loop(1e3, this, this.timer_func);
}, a.prototype.stop_record_screen = function() {
this._isStart && window.tt ? (window.Laya.timer.clear(this, this.timer_func), this._recorder && this._recorder.stop()) : console.log("record 录屏没开始不能结束");
}, a.prototype.pause_record_screen = function() {
this._isStart && window.tt ? this._recorder && this._recorder.pause() : console.log("record 录屏没开始不能暂停");
}, a.prototype.resume_record_screen = function() {
this._isStart && this._isPause && window.tt ? this._recorder && this._recorder.resume() : console.log("record 录屏没有开始 或者 没有暂停", this._isStart, this._isPause);
}, a.prototype.share_record_screen = function(t) {
if (window.tt) if (this._videoPath) {
if (this._inner_time <= 3) return e.stat_manager.instance.send_user_event(e.e_share_event_id.share_record_less_time, e.e_share_event_type.share, 0, 0, ""), 
void (t.fail && t.fail());
e.stat_manager.instance.send_user_event(e.e_share_event_id.click_record, e.e_share_event_type.share, 0, 0, "");
var a = "type=" + e.e_share_type.record + "&k2=v2";
t && t.userId && "" != t.userId && (a = "type=" + e.e_share_type.record + "&userId=" + t.userId), 
window.tt.shareAppMessage({
channel: "video",
title: t.title,
desc: t.desc,
imageUrl: "",
templateId: "",
query: a,
extra: {
videoPath: this._videoPath,
videoTopics: t.videoTopics,
hashtag_list: t.videoTopics,
video_title: t.video_title || ""
},
success: function() {
console.log("record 分享视频成功"), t.success && t.success(), e.stat_manager.instance.send_user_event(e.e_share_event_id.share_record_success, e.e_share_event_type.share, 0, 0, "");
},
fail: function() {
console.log("record 分享视频失败"), e.stat_manager.instance.send_user_event(e.e_share_event_id.share_record_fail, e.e_share_event_type.share, 0, 0, ""), 
t.fail && t.fail();
}
});
} else console.log("record 视频录制失败,请重新录制！"); else console.log("record 当前渠道不支持头条分享");
}, a.prototype.get_record_video = function() {
if (this._videoPath && this._inner_time <= 3) return this._videoPath;
}, a.prototype.clipVideo = function(e) {
this._isStart && window.tt ? this._recorder && this._recorder.clipVideo({
path: e.videoPath,
timeRange: [ e.time, 0 ],
success: function(t) {
e.call_back && e.call_back(t);
}
}) : console.log("record 录屏没开始不能截取拼接录屏");
}, a;
}(e.channel_facade_share_base);
e.channel_share_tt = t, window.channel_share_tt = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.register_listener(), this.support_method[e.e_method_type.get_system_info_sync] = !0, 
this.support_method[e.e_method_type.get_launch_options_sync] = !0, this.support_method[e.e_method_type.exit_mini_program] = !0, 
this.support_method[e.e_method_type.on_show] = !0, this.support_method[e.e_method_type.on_hide] = !0;
}, a.prototype.register_listener = function() {}, a.prototype.get_system_info_sync = function() {
var e = window.tt.getSystemInfoSync();
return {
brand: e.brand,
model: e.model,
pixelRatio: e.pixelRatio,
screenWidth: e.screenWidth,
screenHeight: e.screenHeight,
windowWidth: e.windowWidth,
windowHeight: e.windowHeight,
statusBarHeight: e.statusBarHeight,
language: e.language,
version: e.version,
platform: e.platform,
system: e.system,
platformVersion: e.SDKVersion,
extra: e
};
}, a.prototype.get_launch_options_sync = function() {
var e = window.tt.getLaunchOptionsSync();
return {
query: e.query,
extra: e.extra
};
}, a.prototype.exit_mini_program = function() {
return window.tt.exitMiniProgram();
}, a.prototype.on_show = function(e) {
return window.tt.onShow(function(t) {
e.on_show && e.on_show(t);
});
}, a.prototype.on_hide = function(e) {
return window.tt.onHide(function(t) {
e.on_hide && e.on_hide(t);
});
}, a;
}(e.channel_facade_share_base);
e.channel_system_tt = t, window.channel_system_tt = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.isLogin = !1, e.code = "", e.anonymousCode = "", e.needAuth = !0, e.app_launch_options = [], 
e.more_game_btn = null, e.show_more_game_modal_init = !1, e;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.support_method[e.e_method_type.login] = !0, this.support_method[e.e_method_type.share] = !0, 
this.support_method[e.e_method_type.show_loading] = !0, this.support_method[e.e_method_type.show_toast] = !0, 
this.support_method[e.e_method_type.show_modal] = !0, this.support_method[e.e_method_type.on_show] = !0, 
this.support_method[e.e_method_type.on_hide] = !0, this.support_method[e.e_method_type.navigate_to_mini_program] = !0, 
this.support_method[e.e_method_type.get_system_info_sync] = !0, this.support_method[e.e_method_type.create_inner_audio_context] = !0, 
this.support_method[e.e_method_type.post_message] = !0, this.support_method[e.e_method_type.set_user_cloud_storage] = !0, 
this.support_method[e.e_method_type.get_setting] = !0, this.support_method[e.e_method_type.create_user_info_button] = !0, 
this.support_method[e.e_method_type.open_setting] = !0, this.support_method[e.e_method_type.authorize] = !0, 
this.support_method[e.e_method_type.get_device] = !0, this.support_method[e.e_method_type.device_shake] = !0, 
this.support_method[e.e_method_type.check_can_add_desktop] = !1, this.support_method[e.e_method_type.check_is_add_desktop] = !1, 
this.support_method[e.e_method_type.add_desktop] = !1, this.support_method[e.e_method_type.get_launch_options_sync] = !0, 
this.support_method[e.e_method_type.get_invite_query] = !0, window.tt.getSystemInfo({
success: function(t) {
console.log("igc xiejinhui tt手机型号为 " + t.model), e.stat_manager.instance._osInfo = t.model || "", 
e.stat_manager.instance._opInfo = t.SDKVersion;
},
fail: function() {
console.log("获取系统信息失败");
}
}), this.support_method[e.e_method_type.show_more_game_modal] = !0, this.support_method[e.e_method_type.check_show_more_game] = !0, 
this.support_method[e.e_method_type.more_game_btn_tap] = !0, this.support_method[e.e_method_type.more_game_btn_show] = !0, 
this.support_method[e.e_method_type.more_game_btn_hide] = !0;
}, a.prototype.login = function(t, a) {
console.log("start tt login");
var o = this;
window.tt && window.tt.login({
force: !1,
success: function(t) {
console.log("xiejinhui tt 是否处于登陆状态：", t.isLogin), console.log("xiejinhui tt 临时登陆凭证", t.code), 
console.log("xiejinhui tt 用于标识设备的code：", t.anonymousCode), o.isLogin = t.isLogin, 
o.code = t.code, o.anonymousCode = t.anonymousCode, !1 === e.igc_main.instance.app_config.game_param.needAuth && (o.needAuth = !1), 
o.isLogin && o.needAuth ? o.get_tt_user_info(a) : o.on_login_result(e.e_channel_code.login_success, {}, a);
},
fail: function(t) {
console.log("tt login调用失败"), o.on_login_result(e.e_channel_code.login_fail, t, a);
}
});
}, a.prototype.get_tt_user_info = function(t) {
var a = this;
window.tt && window.tt.getUserInfo({
withCredentials: !1,
success: function(o) {
console.log("getUserInfo调用成功", o.userInfo), a.on_login_result(e.e_channel_code.login_success, o.userInfo, t);
},
fail: function() {
console.log("getUserInfo调用失败"), a.on_login_result(e.e_channel_code.login_success, {}, t);
}
});
}, a.prototype.on_login_result = function(t, a, o) {
var n = this;
if (t == e.e_channel_code.login_success) {
var _ = this.config_channel_user_info(a, function(e) {
var t = n.isLogin ? n.code : "", a = n.isLogin ? "" : n.anonymousCode;
console.log("xiejinhui channel_user_tt login_result", t, a);
return n.isLogin && e && e.avatarUrl ? {
uid: t,
token: a,
nickName: e.nickName,
avatar: e.avatarUrl,
sex: e.gender,
birthday: "",
phoneNum: "",
location: e.city,
isLogin: n.isLogin,
extra: ""
} : {
uid: t,
token: a,
nickName: n.get_tourise_info().userName,
avatar: "",
sex: "",
birthday: "",
phoneNum: "",
location: "",
extra: ""
};
});
o({
errorcode: e.e_channel_code.login_success,
errormsg: "success",
sdk_errorcode: 0,
sdk_errormsg: "",
channel_user_info: _
});
} else o({
errorcode: e.e_channel_code.login_fail,
errormsg: "fail",
sdk_errorcode: -1,
sdk_errormsg: JSON.stringify(a),
channel_user_info: {}
});
}, a.prototype.share = function(e) {
if (void 0 !== window.tt && window.tt.shareAppMessage) return window.tt.shareAppMessage({
templateId: e.templateId,
success: function(t) {
e.on_succeed && e.on_succeed(t);
},
fail: function(t) {
e.on_failed && e.on_failed(t);
}
});
}, a.prototype.show_loading = function(e) {
return e.is_show ? window.tt.showLoading({
title: e.title,
mask: e.mask
}) : window.tt.hideLoading();
}, a.prototype.show_toast = function(e) {
return window.tt.showToast({
title: e.title,
icon: e.icon,
duration: e.duration
});
}, a.prototype.show_modal = function(e) {
return window.tt.showModal({
title: e.title,
content: e.content,
showCancel: e.show_cancel,
cancelText: e.cancel_text,
confirmText: e.confirm_text,
success: function(t) {
t.confirm ? e.on_succeed && e.on_succeed() : t.cancel && console.log("cancel, cold");
},
fail: function(t) {
console.log("showModal调用失败"), e.on_failed && e.on_failed(t);
}
});
}, a.prototype.on_show = function(e) {
return window.tt.onShow(function(t) {
e.on_show && e.on_show(t);
});
}, a.prototype.on_hide = function(e) {
return window.tt.onHide(function(t) {
e.on_hide && e.on_hide(t);
});
}, a.prototype.navigate_to_mini_program = function(e) {
return window.tt.navigateToMiniProgram({
appId: e.app_id,
extraData: {
src_app_id: e.cur_app_id,
src_pkg_name: e.cur_pkg_name,
src_tpf_pid: e.tpf_pid,
src_tpf_uid: e.tpf_uid
},
success: e.on_succeed,
fail: e.fail
});
}, a.prototype.get_launch_options_sync = function() {
return window.tt.getLaunchOptionsSync();
}, a.prototype.check_appLaunchOptions = function(t) {
for (var a = 0; a < t.app_list.length; ++a) {
var o = {
appId: t.app_list[a],
query: "foo=bar&baz=qux",
extraData: {
src_app_id: e.igc_main.instance.app_config.game_param.app_id,
src_pkg_name: e.igc_main.instance.app_config.game_param.pkg_name,
src_tpf_pid: "0",
src_tpf_uid: e.stat_manager.instance._account + ""
}
};
this.app_launch_options.push(o);
}
t.btn_info.appLaunchOptions = this.app_launch_options;
}, a.prototype.check_show_more_game = function(t) {
var a = window.tt.getSystemInfoSync();
return "ios" !== a.platform ? (this.check_appLaunchOptions(t), -1 == e.utils_manager.compare_version(a.SDKVersion, "1.33.0") ? 0 : 1) : 0;
}, a.prototype.create_more_games_button = function(e) {
return e && e.btn_info ? (this.more_game_btn = window.tt.createMoreGamesButton({
type: e.btn_info.type,
image: e.btn_info.image,
style: e.btn_info.style,
appLaunchOptions: e.btn_info.appLaunchOptions,
onNavigateToMiniGame: function(e) {
console.log("跳转其他小游戏", e);
}
}), this.more_game_btn) : null;
}, a.prototype.more_game_btn_tap = function() {
this.more_game_btn && this.more_game_btn.onTap(function() {
console.log("more_game_btn_tap"), e.stat_manager.instance.send_user_event(1, e.e_multual_push_report.more_game_btn_tap, 1, 1, "");
});
}, a.prototype.more_game_btn_show = function() {
this.more_game_btn && this.more_game_btn.show();
}, a.prototype.more_game_btn_hide = function() {
this.more_game_btn && this.more_game_btn.hide();
}, a.prototype.show_more_game_modal = function() {
0 == this.show_more_game_modal_init && (window.tt.onMoreGamesModalClose(function(t) {
console.log("modal closed", t), e.stat_manager.instance.send_user_event(1, e.e_multual_push_report.on_more_games_modal_close, 1, 1, "");
}), window.tt.onNavigateToMiniProgram(function(t) {
console.log(t.errCode), console.log(t.errMsg), e.stat_manager.instance.send_user_event(1, e.e_multual_push_report.on_navigate_to_miniProgram, 1, 1, t.errCode + "", t.errMsg);
}), this.show_more_game_modal_init = !0);
var t = window.tt.getSystemInfoSync();
return console.log("tt systeminfo version:", t.version), console.log("tt systeminfo SDKVersion:", t.SDKVersion), 
"ios" !== t.platform && -1 != e.utils_manager.compare_version(t.SDKVersion, "1.33.0") && (e.stat_manager.instance.send_user_event(1, e.e_multual_push_report.show_more_game_modal, 1, 1, ""), 
window.tt.showMoreGamesModal({
appLaunchOptions: this.app_launch_options,
success: function(t) {
console.log("success", t.errMsg), e.stat_manager.instance.send_user_event(1, e.e_multual_push_report.on_show_more_game_modal_success, 1, 1, t.errMsg);
},
fail: function(t) {
console.log("fail", t.errMsg), e.stat_manager.instance.send_user_event(1, e.e_multual_push_report.on_show_more_game_modal_fail, 1, 1, t.errMsg);
}
}), !0);
}, a.prototype.get_system_info_sync = function() {
return window.tt.getSystemInfoSync();
}, a.prototype.create_inner_audio_context = function() {
return window.tt.createInnerAudioContext();
}, a.prototype.post_message = function(e) {
return window.tt.postMessage({
messageType: e.message_type,
data: e.data
});
}, a.prototype.set_user_cloud_storage = function(e) {
return window.tt.setUserCloudStorage({
KVDataList: e.kv_data_list,
success: e.on_succeed,
fail: e.on_failed
});
}, a.prototype.get_setting = function(e) {
return window.tt.getSetting({
success: e.on_succeed
});
}, a.prototype.create_user_info_button = function(e) {
return window.tt.createUserInfoButton({
type: e.type,
image: e.image,
style: e.style
});
}, a.prototype.open_setting = function() {
return window.tt.openSetting();
}, a.prototype.authorize = function(e) {
return window.tt.authorize({
scope: e.score,
success: e.on_succeed,
fail: e.on_failed
});
}, a.prototype.get_device = function() {
return window.tt.getSystemInfo({
success: function(t) {
return "devtools" == t.platform ? e.e_device.desktop : "ios" == t.platform ? e.e_device.ios : "android" == t.platform ? e.e_device.android : e.e_device.unknown;
}
}), e.e_device.unknown;
}, a.prototype.get_tourise_info = function() {
var e = localStorage.getItem("tt_username");
return e || (e = this.get_random_name(), localStorage.setItem("tt_username", e)), 
{
userId: e,
userName: e,
avatar: ""
};
}, a.prototype.device_shake = function(e) {
window.tt.vibrateShort({
success: function() {
e.on_success && e.on_success();
},
fail: function() {
e.on_failed && e.on_failed();
},
complete: function() {
e.on_complete && e.on_complete();
}
});
}, a.prototype.get_invite_query = function() {
var e = window.wx.getLaunchOptionsSync();
return console.error("tt游戏启动参数-----------------\x3e", e), e.query;
}, a;
}(e.channel_facade_user_base);
e.channel_user_tt = t, window.channel_user_tt = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.show_num = 0, e.is_show_banner = !0, e;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc banner ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
this.ad_instance && (this.ad_instance.offLoad && this.ad_instance.offLoad(this.on_load_callback.bind(this)), 
this.ad_instance.offError && this.ad_instance.offError(this.on_error_callback.bind(this)), 
this.ad_instance.offResize && this.ad_instance.offResize(this.on_resize_callback.bind(this)), 
this.ad_instance.destroy(), this.ad_instance = null, this.ad_param = null), t.prototype.release.call(this);
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
this.ad_param = t, this.ad_op = e.e_ad_op.create, this.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", this.ad_op);
var a = t.style || {};
this.ad_instance = window.tt.createBannerAd({
adUnitId: t.ad_id,
adIntervals: 30,
style: a
}), this.ad_instance.onError(this.on_error_callback.bind(this)), this.ad_instance.onLoad(this.on_load_callback.bind(this)), 
this.ad_instance.onResize(this.on_resize_callback.bind(this));
}
}, a.prototype.on_error_callback = function(e) {
this.on_error(this.ad_param, e);
}, a.prototype.on_load_callback = function() {
this || console.log("igc banner on_load_callback self null"), this.ad_instance || console.log("igc banner on_load_callback self.ad_instance null"), 
this.ad_instance.offLoad || console.log("igc banner on_load_callback self.ad_instance.offLoad null"), 
this.ad_instance && this.ad_instance.offLoad && this.ad_instance.offLoad(this.on_load_callback), 
this.on_load(this.ad_param, {});
}, a.prototype.on_resize_callback = function(e) {
console.log("igc on_resize_callback:", e.width, e.height);
this.ad_param.width != e.width && e.width > 0 && (this.ad_param.width = e.width, 
this.ad_instance.style.top = this.ad_param.windowHeight - e.height, this.ad_instance.style.left = (this.ad_param.windowWidth - this.ad_param.width) / 2);
}, a.prototype.show_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " show_ad");
var a = this;
if (this.ad_instance && a.ad_param && t && t.ad_id === a.ad_param.ad_id) {
console.log("igc banner show_ad ad_status: ", this.ad_status), a.is_show_banner = !0, 
a.ad_op = e.e_ad_op.show, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.show, "", "", t.ad_scene, "0", a.ad_op);
var o = this.ad_instance.show();
o && o.then(function() {
console.log("igc banner show succ result"), !0 === a.is_show_banner ? a.on_show(t) : a.hide_ad(t);
}).catch(function(e) {
console.log("igc banner show error result:", JSON.stringify(e));
});
}
}
}, a.prototype.hide_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " hide_ad");
if (this.ad_instance && this.ad_param && t && t.ad_id === this.ad_param.ad_id) {
if (console.log("igc banner hide_ad ad_status: ", this.ad_status), this.ad_status < e.e_ad_status.show) return;
this.ad_op = e.e_ad_op.hide, this.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.hide, "", "", t.ad_scene, "0", this.ad_op), 
this.is_show_banner = !1, this.ad_instance.hide(), this.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.onhide, "", "", t.ad_scene, "0", this.ad_op);
}
}
}, a.prototype.destroy_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " destroy_ad");
this.ad_instance && this.ad_param && t && t.ad_id === this.ad_param.ad_id && (this.ad_op = e.e_ad_op.destroy, 
this.release());
}
}, a.prototype.on_load = function(e, a) {
e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (t.prototype.on_load.call(this, e, a), 
this.is_show_banner ? this.show_ad(e) : this.hide_ad(e));
}, a.prototype.on_error = function(a, o) {
(console.log("igc banner on_error res = ", JSON.stringify(o)), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) && (t.prototype.on_error.call(this, a, o), 
this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onerror, o.errCode, o.errMsg, a.ad_scene, "0", this.ad_op), 
this.release());
}, a;
}(e.ad_base);
e.ad_banner_tt = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc interstitial ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
this.ad_instance && (this.ad_instance.offError(this.on_error_callback.bind(this)), 
this.ad_instance.offClose(this.on_close_callback.bind(this)), this.ad_instance.offLoad(this.on_load_callback.bind(this)), 
this.ad_instance.destroy(), this.ad_instance = null, this.ad_param = null), t.prototype.release.call(this);
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
console.log("igc interstitial ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
var a = this;
this.ad_param = t, a.ad_op = e.e_ad_op.create, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", a.ad_op), 
this.ad_instance = window.tt.createInterstitialAd({
adUnitId: t.ad_id
}), this.ad_instance.onLoad(this.on_load_callback.bind(this)), this.ad_instance.onError(this.on_error_callback.bind(this)), 
this.ad_instance.onClose(this.on_close_callback.bind(this)), a.ad_op = e.e_ad_op.load, 
this.ad_instance.load().then(function() {
console.log("igc 加载头条插屏成功，调用展示show", t.ad_id), a.ad_param && !1 !== a.ad_param.auto_show && a.show_ad(a.ad_param);
}).catch(function(e) {
console.log("igc 加载头条插屏失败，调用展示show", t.ad_id), console.log(e);
});
}
}, a.prototype.on_load_callback = function() {
this.on_load(this.ad_param, {});
}, a.prototype.on_error_callback = function(e) {
this.on_error(this.ad_param, e);
}, a.prototype.on_close_callback = function() {
this.on_close(this.ad_param, {});
}, a.prototype.show_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc interstitial ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " show_ad"), 
console.log("igc interstitial show_ad");
this.ad_instance && this.ad_param && t && t.ad_id === this.ad_param.ad_id && (this.ad_op = e.e_ad_op.show, 
this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.show, "", "", this.ad_param.ad_scene, "0", this.ad_op), 
this.ad_instance.show(), this.on_show(t));
}
}, a.prototype.on_load = function(e, a) {
e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (this.ad_instance.offLoad(), 
t.prototype.on_load.call(this, e, a), console.log("igc interstitial on_load"));
}, a.prototype.on_close = function(a, o) {
(console.log("igc interstitial on_close res = ", JSON.stringify(o)), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance && (t.prototype.on_close.call(this, a, o), 
this.ad_instance)) && (this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onclose, "", "", this.ad_param.ad_scene, "0", this.ad_op), 
this.ad_param && this.ad_param.onClose && this.ad_param.onClose(this.ad_param, {}), 
this.ad_status = e.e_ad_status.close, this.release());
}, a.prototype.on_error = function(a, o) {
(console.log("igc interstitial on_error res = ", JSON.stringify(o)), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) && (this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onerror, o.errCode, o.errMsg, this.ad_param.ad_scene, "0", this.ad_op), 
t.prototype.on_error.call(this, a, o), this.release());
}, a.prototype.on_show = function(e) {
console.log("igc interstitial on_show succ"), e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && t.prototype.on_show.call(this, e);
}, a;
}(e.ad_base);
e.ad_interstitial_tt = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.is_first = !0, e;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc video ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release");
}, a.prototype.create = function(t) {
var a = this;
if (t && t.ad_type && t.ad_id) {
console.log("igc video ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
var o = this;
this.ad_param = t, o.ad_op = e.e_ad_op.create, o.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", o.ad_op);
var n = t.extra || "";
e.stat_manager.instance.send_user_event(t.ad_pos_id + "", e.igc_stat_ids.video_click, "", "", n, "", "", "", ""), 
this.ad_instance = window.tt.createRewardedVideoAd({
adUnitId: t.ad_id
}), !0 === this.is_first && (this.ad_instance.onError(o.on_error_callback.bind(o)), 
this.ad_instance.onClose(o.on_close_callback.bind(o)), this.is_first = !1), console.log("11111111111111111111111111111111111"), 
o.ad_op = e.e_ad_op.load, console.log("test 11111111111111111111111111111111"), 
o.ad_op = e.e_ad_op.load, o.ad_instance.load().then(function() {
console.log("test 3333333333333333333333333333333"), o.on_load(t, {}), o.ad_op = e.e_ad_op.show, 
console.log("test 44444444444444444444444444444444"), a.ad_instance.show().then(function() {
console.log("igc show succ 1"), o.on_show(t);
}).catch(function(a) {
console.log("igc show err:", a), o.ad_op = e.e_ad_op.load, o.ad_instance.load().then(function() {
return console.log("igc 手动加载成功"), o.on_load(t, {}), o.ad_op = e.e_ad_op.show, o.on_show(t), 
o.ad_instance.show();
});
});
}).catch(function(a) {
console.log("igc load err:", a), o.ad_op = e.e_ad_op.load, o.ad_instance.load().then(function() {
return console.log("igc 手动加载成功 2"), o.on_load(t, {}), o.ad_op = e.e_ad_op.show, 
o.on_show(t), o.ad_instance.show();
});
}), console.log("test 222222222222222222222222222222222");
}
}, a.prototype.on_load_callback = function() {
this || console.log("igc video on_load_callback self null"), this.ad_instance || console.log("igc video on_load_callback self.ad_instance null"), 
this.ad_instance.offLoad || console.log("igc video on_load_callback self.ad_instance.offLoad null"), 
this.ad_instance && this.ad_instance.offLoad && this.ad_instance.offLoad(this.on_load_callback.bind(this)), 
this.on_load(this.ad_param, {});
}, a.prototype.on_error_callback = function(e) {
this.on_error(this.ad_param, e);
}, a.prototype.on_close_callback = function(e) {
this.ad_instance || console.log("igc on_load_callback self.ad_instance null"), this.ad_instance.offClose || console.log("igc on_load_callback self.ad_instance.offClose null"), 
this.on_close(this.ad_param, e);
}, a.prototype.on_load = function(e, a) {
this.ad_instance && this.ad_param && e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && t.prototype.on_load.call(this, e, a);
}, a.prototype.on_error = function(a, o) {
(console.log("igc video on_err res = ", JSON.stringify(o)), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) && (t.prototype.on_error.call(this, a, o), 
this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onerror, o.errCode, o.errMsg, this.ad_param.ad_scene, "0", this.ad_op), 
this.release());
}, a.prototype.on_close = function(a, o) {
(console.log("igc video on_close res = ", JSON.stringify(o)), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) && (t.prototype.on_close.call(this, a, o), 
o && o.isEnded ? (this.ad_param.onClose && this.ad_param.onClose(this.ad_param, {
isEnded: o.isEnded
}), this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onclose, e.e_ad_video_close.complete, "", this.ad_param.ad_scene, "0", this.ad_op), 
e.stat_manager.instance.send_user_event(this.ad_param.ad_pos_id + "", e.igc_stat_ids.video_compelete, "", "", "", "", "", "", "")) : (this.ad_param.onClose && this.ad_param.onClose(this.ad_param, {
isEnded: !1
}), this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onclose, e.e_ad_video_close.uncomplete, "", this.ad_param.ad_scene, "0", this.ad_op), 
e.stat_manager.instance.send_user_event(this.ad_param.ad_pos_id + "", e.igc_stat_ids.video_uncompelete, "", "", "", "", "", "", "")), 
this.release());
}, a;
}(e.ad_base);
e.ad_video_tt = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.can_ad = !1, e.can_video = !1, e.can_native = !1, e.can_multualpush_box = !1, 
e.ad_native_map = {}, e.ad_banner_release_time = 0, e.ad_banner_create_time = 0, 
e.platformVersionCode = 0, e;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this);
var a = window.qg && window.qg.getSystemInfoSync().platformVersionCode;
console.log("igc app qg code---\x3e", a), this.platformVersionCode = a, this.can_ad = a >= 1031, 
this.can_video = a >= 1041, this.can_native = a >= 1053, this.can_multualpush_box = a >= 1092, 
this.support_method[e.e_method_type.create_ad] = this.can_ad, this.support_method[e.e_method_type.show_ad] = this.can_ad, 
this.support_method[e.e_method_type.hide_ad] = this.can_ad, this.support_method[e.e_method_type.has_ad] = this.can_ad, 
this.support_method[e.e_method_type.destroy_ad] = this.can_ad, this.support_method[e.e_method_type.report_ad_show] = this.can_ad, 
this.support_method[e.e_method_type.report_ad_click] = this.can_ad, this.support_method[e.e_method_type.report_ad_close] = this.can_ad, 
this.support_method[e.e_method_type.load_ad_just] = !1, this.support_method[e.e_method_type.show_ad_just] = !1;
}, a.prototype.has_ad = function(t) {
return !!this.can_ad && (t && t.ad_type === e.e_ad_type.video ? this.can_video : !t || t.ad_type !== e.e_ad_type.native || this.can_native);
}, a.prototype.create_ad = function(t) {
return !!this.can_ad && !(!t.ad_id || !t.ad_type) && !!this.has_ad(t) && (t.platformVersionCode = this.platformVersionCode, 
t.ad_type == e.e_ad_type.banner ? (console.log("igc channel_ad_vivo_qg:create_ad", "create_ad_banner"), 
this.create_ad_banner(t)) : t.ad_type == e.e_ad_type.video ? (console.log("igc channel_ad_vivo_qg:create_ad", "create_ad_video"), 
this.create_ad_video(t)) : t.ad_type == e.e_ad_type.interstitial ? (console.log("igc channel_ad_vivo_qg:create_ad", "create_ad_interstitial"), 
this.create_ad_interstitial(t)) : t.ad_type == e.e_ad_type.native ? this.create_ad_native(t) : t.ad_type == e.e_ad_type.app_box && (console.log("channel_ad_vivo_qg:create_ad", "create_ad_app_box"), 
this.create_ad_app_box(t)));
}, a.prototype.create_ad_banner = function(t) {
var a = Date.now();
if (this.ad_banner) {
if (console.log("igc create_ad_banner release req begin"), a - this.ad_banner_release_time <= 1e4) return console.log("igc create_ad_banner release time error"), 
!1;
console.log("igc create_ad_banner release now_timestamp：", a), this.ad_banner_release_time = a, 
console.log("igc create_ad_banner release ad_banner_release_time", this.ad_banner_release_time), 
this.ad_banner.release(), this.ad_banner = null, console.log("igc create_ad_banner release req end");
}
return a - this.ad_banner_create_time <= 1e4 ? (console.log("igc create_ad_banner create time error"), 
!1) : (this.ad_banner_release_time = a, this.ad_banner_create_time = a, this.ad_banner = new e.ad_banner_vivo_qg(), 
this.ad_banner.create(t), !0);
}, a.prototype.create_ad_video = function(t) {
return !!this.can_video && (this.ad_video ? this.ad_video.update_show(t) : (this.ad_video = new e.ad_video_vivo_qg(), 
this.ad_video.create(t)), !0);
}, a.prototype.create_ad_interstitial = function(t) {
return this.ad_interstitial && (this.ad_interstitial.release(), this.ad_interstitial = null), 
this.ad_interstitial = new e.ad_interstitial_vivo_qg(), this.ad_interstitial.create(t), 
!0;
}, a.prototype.create_ad_native = function(t) {
if (!this.can_native) return !1;
this.ad_native_map[t.ad_id] ? this.ad_native_map[t.ad_id].update_show(t) : (this.ad_native_map[t.ad_id] = new e.ad_native_vivo_qg(), 
this.ad_native_map[t.ad_id].create(t));
}, a.prototype.create_ad_app_box = function(t) {
return this.can_multualpush_box ? (t.sub_ad_type == e.e_ad_app_box_type.banner_box ? (this.ad_bannerbox = new e.ad_bannerbox_vivo_qg(), 
this.ad_bannerbox.create(t)) : t.sub_ad_type == e.e_ad_app_box_type.portal_box && (this.ad_portalbox = new e.ad_portalbox_vivo_qg(), 
this.ad_portalbox.create(t)), !0) : (console.log("igc 快应用版本不支持互推盒子"), !1);
}, a.prototype.show_ad_app_box = function(t) {
return t.sub_ad_type == e.e_ad_app_box_type.portal_box ? (this.ad_portalbox || (this.ad_portalbox = new e.ad_portalbox_vivo_qg()), 
this.ad_portalbox.show_ad(t)) : t.sub_ad_type == e.e_ad_app_box_type.banner_box && (this.ad_bannerbox || (this.ad_bannerbox = new e.ad_bannerbox_vivo_qg()), 
this.ad_bannerbox.show_ad(t)), !0;
}, a.prototype.destroy_ad_app_box = function(t) {
t.sub_ad_type == e.e_ad_app_box_type.banner_box ? this.ad_bannerbox && this.ad_bannerbox.destroy_ad(t) : t.sub_ad_type == e.e_ad_app_box_type.portal_box && this.ad_portalbox && this.ad_portalbox.destroy_ad(t);
}, a.prototype.show_ad = function(t) {
if (!t.ad_id || !t.ad_type) return !1;
if (t.platformVersionCode = this.platformVersionCode, t.ad_type == e.e_ad_type.banner) this.show_ad_banner(t); else if (t.ad_type == e.e_ad_type.video) this.show_ad_video(t); else if (t.ad_type == e.e_ad_type.interstitial) this.show_ad_interstitial(t); else {
if (t.ad_type != e.e_ad_type.native) return t.ad_type == e.e_ad_type.app_box && this.show_ad_app_box(t);
this.show_ad_native(t);
}
return !0;
}, a.prototype.show_ad_banner = function(e) {
return !!this.ad_banner && (this.ad_banner.show_ad(e), !0);
}, a.prototype.show_ad_video = function(e) {
return !!this.ad_video && (this.ad_video.show_ad(e), !0);
}, a.prototype.show_ad_interstitial = function(e) {
return !!this.ad_interstitial && (this.ad_interstitial.show_ad(e), !0);
}, a.prototype.show_ad_native = function(e) {
return !!this.ad_native_map[e.ad_id] && (this.ad_native_map[e.ad_id].show_ad(e), 
!0);
}, a.prototype.hide_ad = function(t) {
return !(!t.ad_id || !t.ad_type) && (t.platformVersionCode = this.platformVersionCode, 
t.ad_type == e.e_ad_type.banner ? this.hide_ad_banner(t) : t.ad_type == e.e_ad_type.video ? this.hide_ad_video(t) : t.ad_type == e.e_ad_type.interstitial ? this.hide_ad_interstitial(t) : t.ad_type == e.e_ad_type.native ? this.hide_ad_native(t) : t.ad_type == e.e_ad_type.app_box && this.hide_ad_app_box(t));
}, a.prototype.hide_ad_banner = function(e) {
return !!this.ad_banner && (this.ad_banner.hide_ad(e), !0);
}, a.prototype.hide_ad_video = function(e) {
return !!this.ad_video && (this.ad_video.hide_ad(e), !0);
}, a.prototype.hide_ad_interstitial = function(e) {
return !!this.ad_interstitial && (this.ad_interstitial.hide_ad(e), !0);
}, a.prototype.hide_ad_native = function(e) {
return !!this.ad_native_map[e.ad_id] && (this.ad_native_map[e.ad_id].hide_ad(e), 
!0);
}, a.prototype.hide_ad_app_box = function() {
return !0;
}, a.prototype.destroy_ad = function(t) {
return !(!t.ad_id || !t.ad_type) && (t.platformVersionCode = this.platformVersionCode, 
t.ad_type == e.e_ad_type.banner ? this.destroy_ad_banner(t) : t.ad_type == e.e_ad_type.video ? this.destroy_ad_video(t) : t.ad_type == e.e_ad_type.interstitial ? this.destroy_ad_interstitial(t) : t.ad_type == e.e_ad_type.native ? this.destroy_ad_native(t) : t.ad_type == e.e_ad_type.app_box && this.destroy_ad_app_box(t));
}, a.prototype.destroy_ad_banner = function(e) {
return !!this.ad_banner && (this.ad_banner.destroy_ad(e), this.ad_banner = null, 
!0);
}, a.prototype.destroy_ad_video = function(e) {
return !!this.ad_video && (this.ad_video.destroy_ad(e), !0);
}, a.prototype.destroy_ad_interstitial = function(e) {
return !!this.ad_interstitial && (this.ad_interstitial.destroy_ad(e), this.ad_interstitial = null, 
!0);
}, a.prototype.destroy_ad_native = function(e) {
return !!this.ad_native_map[e.ad_id] && (this.ad_native_map[e.ad_id].destroy_ad(e), 
!0);
}, a.prototype.report_ad_show = function(e) {
return e.platformVersionCode = this.platformVersionCode, !!this.ad_native_map[e.ad_id] && (this.ad_native_map[e.ad_id].report_ad_show(e), 
!0);
}, a.prototype.report_ad_click = function(e) {
return e.platformVersionCode = this.platformVersionCode, !!this.ad_native_map[e.ad_id] && (this.ad_native_map[e.ad_id].report_ad_click(e), 
!0);
}, a.prototype.report_ad_close = function(e) {
return e.platformVersionCode = this.platformVersionCode, !!this.ad_native_map[e.ad_id] && (this.ad_native_map[e.ad_id].report_ad_close(e), 
!0);
}, a;
}(e.channel_facade_ad_base);
e.channel_ad_vivo_qg = t, window.channel_ad_vivo_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.register_listener(), this.support_method[e.e_method_type.get_system_info_sync] = !0, 
this.support_method[e.e_method_type.exit_mini_program] = !0, this.support_method[e.e_method_type.on_show] = !0, 
this.support_method[e.e_method_type.on_hide] = !0;
}, a.prototype.register_listener = function() {}, a.prototype.get_system_info_sync = function() {
return window.qg.getSystemInfoSync();
}, a.prototype.exit_mini_program = function() {
return window.qg.exitApplication();
}, a.prototype.on_show = function(e) {
return window.qg.onShow(function(t) {
e.on_show && e.on_show(t);
});
}, a.prototype.on_hide = function(e) {
return window.qg.onHide(function(t) {
e.on_hide && e.on_hide(t);
});
}, a;
}(e.channel_facade_share_base);
e.channel_system_vivo_qg = t, window.channel_system_vivo_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.token = null, e.deviceId = null, e.callback = null, e.needAuth = !0, e.is_old = !1, 
e.platformVersionCode = 0, e;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.support_method[e.e_method_type.login] = !0, this.support_method[e.e_method_type.device_shake] = !0, 
this.support_method[e.e_method_type.check_can_add_desktop] = !0, this.support_method[e.e_method_type.check_is_add_desktop] = !0, 
this.support_method[e.e_method_type.add_desktop] = !0, this.platformVersionCode = window.qg && window.qg.getSystemInfoSync().platformVersionCode, 
e.stat_manager.instance._opInfo = this.platformVersionCode + "", e.stat_manager.instance._osInfo = window.qg && window.qg.getSystemInfoSync().model || "", 
console.log("igc vivo手机型号", e.stat_manager.instance._osInfo);
}, a.prototype.login = function(t, a) {
console.log("igc vivo run login()");
var o = this;
0 == e.igc_main.instance.app_config.game_param.needAuth && (this.needAuth = !1), 
console.log("该游戏是否需要授权", this.needAuth), this.callback = a, this.token = localStorage.getItem("vivoToken"), 
null != this.token && "" != this.token && (this.is_old = !0, localStorage.setItem("is_old", "is_old")), 
"is_old" == localStorage.getItem("is_old") && (this.is_old = !0), window.qg && window.qg.getUserId({
success: function(e) {
if (console.log("igc 设备id", e.userId), o.deviceId = e.userId, null == o.deviceId) {
var t = o.get_tourise_info();
o.deviceId = t.userId;
}
o.initVivo();
},
fail: function() {
console.log("igc 设备id获取失败");
var e = o.get_tourise_info();
o.deviceId = e.userId, o.initVivo();
}
});
}, a.prototype.initVivo = function() {
console.log("igc channel_user_vivo_qg local_save_token = ", this.token), null != this.token && "" != this.token ? this.initVivoInfo(this.token) : this.initVivoByAuth();
}, a.prototype.initVivoByAuth = function() {
var t = this;
if (console.log("vivoqgsdk channel_user_vivo_qg initVivoByAuth Run ", this.needAuth), 
this.needAuth || this.is_old) window.qg && window.qg.authorize({
type: "token",
success: function(e) {
console.log("igc channel_user_vivo_qg qg.authorize success", e.accessToken), t.token = e.accessToken, 
localStorage.setItem("vivoToken", e.accessToken), t.initVivoInfo(e.accessToken);
},
fail: function() {
console.log("igc channel_user_vivo_qg qg.authorize fali"), t.token = "", localStorage.setItem("vivoToken", "");
var a = {
userId: t.deviceId,
avatar: "",
userName: t.deviceId,
hasAuth: !1
};
t.on_login_result(e.e_channel_code.login_success, a, t.callback);
}
}); else {
console.log("igc initVivoByAuth dont need auth"), t.token = "", localStorage.setItem("vivoToken", "");
var a = {
userId: t.deviceId,
avatar: "",
userName: t.deviceId,
hasAuth: !1
};
t.on_login_result(e.e_channel_code.login_success, a, t.callback);
}
}, a.prototype.initVivoInfo = function(t) {
console.log("vivoqgsdk channel_user_vivo_qg initVivoInfo Run ");
var a = this, o = this.callback || function() {};
window.qg && window.qg.getProfile({
token: t,
success: function(t) {
console.log("igc channel_user_vivo_qg getProfile success", t.openid, t.nickname), 
t.hasAuth = !0, a.on_login_result(e.e_channel_code.login_success, t, o);
},
fail: function(e, t) {
console.log("igc channel_user_vivo_qg getProfile fail, code:", t), a.token = "", 
localStorage.setItem("vivoToken", ""), a.initVivo();
}
});
}, a.prototype.on_login_result = function(t, a, o) {
var n = this;
if (t == e.e_channel_code.login_success) {
var _ = this.config_channel_user_info(a, function(e) {
return e.hasAuth ? {
uid: e.openid,
token: n.token,
nickName: e.nickname,
avatar: e.avatar,
sex: "",
birthday: "",
phoneNum: "",
location: "",
hasAuth: !0,
extra: ""
} : {
uid: n.deviceId,
token: n.deviceId,
nickName: e.userName,
avatar: "",
sex: "",
birthday: "",
phoneNum: "",
location: "",
hasAuth: !1,
extra: ""
};
});
o({
errorcode: e.e_channel_code.login_success,
errormsg: "success",
sdk_errorcode: 0,
sdk_errormsg: "",
channel_user_info: _
});
} else o({
errorcode: e.e_channel_code.login_fail,
errormsg: "fail",
sdk_errorcode: -1,
sdk_errormsg: JSON.stringify(a),
channel_user_info: {}
});
}, a.prototype.get_tourise_info = function() {
var e = localStorage.getItem("tt_username");
return e || (e = this.get_random_name(), localStorage.setItem("tt_username", e)), 
{
userId: e,
userName: e,
avatar: ""
};
}, a.prototype.device_shake = function() {
window.qg && window.qg.vibrateShort();
}, a.prototype.check_can_add_desktop = function() {
return this.platformVersionCode >= 1041;
}, a.prototype.check_is_add_desktop = function(e) {
window.qg && window.qg.hasShortcutInstalled && window.qg.hasShortcutInstalled({
success: function(t) {
0 == t ? e.can_add && e.can_add() : e.has_add && e.has_add();
},
fail: function() {},
complete: function() {}
});
}, a.prototype.add_desktop = function(e) {
if (console.log("igc add_desktop begin-------------------"), !this.check_can_add_desktop()) return console.log("igc add_desktop !this.check_can_add_desktop()-------------------"), 
e.on_failed && e.on_failed(), !1;
window.qg && window.qg.hasShortcutInstalled ? (console.log("igc add_desktop hasShortcutInstalled have-------------------"), 
window.qg.hasShortcutInstalled({
success: function(t) {
console.log("igc add_desktop hasShortcutInstalled success-------------------"), 
0 == t ? (console.log("igc add_desktop hasShortcutInstalled success res false-------------------"), 
e.can_create && e.can_create(), window.qg.installShortcut({
success: function() {
console.log("igc add_desktop installShortcut success-------------------"), e.on_success && e.on_success();
},
fail: function(t) {
console.log("igc add_desktop installShortcut fail:" + JSON.stringify(t)), e.on_failed_back && e.on_failed_back();
},
complete: function() {
console.log("igc add_desktop installShortcut complete-------------------");
}
})) : (console.log("igc add_desktop installShortcut has-------------------"), console.log("igc 图标已创建"), 
e.has_create && e.has_create());
},
fail: function(e) {
console.log("igc add_desktop hasShortcutInstalled fail:" + JSON.stringify(e));
},
complete: function() {
console.log("igc add_desktop hasShortcutInstalled complete-------------------");
}
})) : console.log("igc add_desktop hasShortcutInstalled dont have-------------------");
}, a;
}(e.channel_facade_user_base);
e.channel_user_vivo_qg = t, window.channel_user_vivo_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.show_num = 0, e;
}
return __extends(a, t), a.prototype.release = function() {
if (this.ad_param && console.log("igc banner ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
this.ad_instance) {
this.ad_instance.offLoad(), this.ad_instance.offClose();
var e = this.ad_instance.destroy();
e && e.then(function() {
console.log("igc banner广告销毁成功");
}).catch(function(e) {
console.log("igc banner广告销毁失败", e);
}), this.ad_instance = null, this.ad_param = null;
}
t.prototype.release.call(this);
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
var a = this;
this.ad_param = t, a.ad_op = e.e_ad_op.create, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", a.ad_op), 
this.ad_instance = window.qg.createBannerAd({
posId: t.ad_id,
style: {}
}), this.ad_instance.onLoad(function() {
a.on_load(t, {});
}), this.ad_instance.onClose(function() {
a.on_close(t, {});
}), this.show_ad(t);
}
}, a.prototype.show_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " show_ad");
var a = this;
if (this.ad_instance && a.ad_param && t && t.ad_id === a.ad_param.ad_id) {
console.log("igc banner show_ad ad_status: ", this.ad_status), a.ad_op = e.e_ad_op.show, 
a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.show, "", "", t.ad_scene, "0", a.ad_op);
var o = this.ad_instance.show();
o && o.then(function() {
console.log("igc banner show succ result"), a.on_show(t);
}).catch(function(e) {
console.log("igc banner show error result:", JSON.stringify(e)), a.on_error(t, e);
});
}
}
}, a.prototype.hide_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " hide_ad");
var a = this;
if (this.ad_instance && a.ad_param && t && t.ad_id === a.ad_param.ad_id) {
if (console.log("igc banner hide_ad ad_status: ", this.ad_status), this.ad_status < e.e_ad_status.show) return;
a.ad_op = e.e_ad_op.hide;
var o = this.ad_instance.hide();
a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.hide, "", "", t.ad_scene, "0", a.ad_op), 
o && o.then(function() {
console.log("igc banner hide succ result"), a.on_hide(t);
}).catch(function(t) {
console.log("igc banner hide fail result:", JSON.stringify(t));
var o = "";
t.errMsg ? o = t.errMsg : t.data && (o = JSON.stringify(t.data)), a.send_dot(a.ad_param.ad_pos_id, a.ad_param.ad_type, e.e_ad_event.onerror, t.code, o, a.ad_param.ad_scene, "0", a.ad_op);
});
}
}
}, a.prototype.destroy_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " destroy_ad");
this.ad_instance && this.ad_param && t && t.ad_id === this.ad_param.ad_id && (this.ad_op = e.e_ad_op.destroy, 
this.release());
}
}, a.prototype.on_close = function(a, o) {
if (a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) {
t.prototype.on_close.call(this, a, o);
this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onclose, "", "", a.ad_scene, "0", this.ad_op), 
a && a.onClose && a.onClose(a, {}), this.ad_status = e.e_ad_status.close, this.release();
}
}, a.prototype.on_error = function(a, o) {
if (console.log("igc banner on_error res = ", JSON.stringify(o)), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) {
t.prototype.on_error.call(this, a, o);
var n = "";
o.errMsg ? n = o.errMsg : o.data && (n = JSON.stringify(o.data)), this.show_num > 1 && 30009 == o.code ? (console.log("igc banner show is much times!"), 
this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onerror, o.code, n, a.ad_scene, "0", this.ad_op)) : (this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onerror, o.code, n, a.ad_scene, "0", this.ad_op), 
this.release());
}
}, a.prototype.on_show = function(e) {
(console.log("igc banner on_show succ"), e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance) && (t.prototype.on_show.call(this, e), 
this.ad_instance && (this.show_num += 1));
}, a;
}(e.ad_base);
e.ad_banner_vivo_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc gamebannerbox ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
this.ad_instance && (this.ad_instance.offLoad(), this.ad_instance.offError(), this.ad_instance && (this.ad_instance.destroy(), 
this.ad_instance = null)), this.ad_param = null, t.prototype.release.call(this);
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id && window.qg.createBoxBannerAd) {
console.log("igc createBoxBannerAd ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create"), 
e.stat_manager.instance.send_user_event(e.e_ad_app_box_type.banner_box + "", e.igc_stat_ids.multual_push_click, "", "", "", "", "", "", "");
var a = this;
this.ad_param = t, a.ad_op = e.e_ad_op.create, this.ad_instance = window.qg.createBoxBannerAd({
posId: t.ad_id
}), this.ad_instance.onLoad(a.on_load_callback.bind(a)), this.ad_instance.onError(a.on_error_callback.bind(a)), 
a.ad_op = e.e_ad_op.load, this.ad_instance.show().then(function() {
console.log("igc gamebannerbox show success"), e.stat_manager.instance.send_user_event(e.e_ad_app_box_type.banner_box + "", e.igc_stat_ids.multual_push_show, "", "", "", "", "", "", ""), 
a.on_show(t);
}).catch(function(e) {
console.log("igc gamebannerbox show fail"), a.on_error(t, e);
});
}
}, a.prototype.on_load_callback = function() {
this.on_load(this.ad_param, {});
}, a.prototype.on_error_callback = function(e) {
console.log("igc gamebannerbox error back", e);
}, a.prototype.on_error = function(e, a) {
console.log("igc gamebannerbox on_err res = ", JSON.stringify(a)), e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (t.prototype.on_error.call(this, e, a), 
this.release());
}, a.prototype.on_close = function(e, a) {
console.log("igc gamebannerbox on_close res = ", JSON.stringify(a)), e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (t.prototype.on_close.call(this, e, a), 
e && e.onClose && e.onClose(e, {}), this.release());
}, a.prototype.destroy_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " destroy_ad");
this.ad_instance && this.ad_param && t && t.ad_id === this.ad_param.ad_id && (this.on_close(this.ad_param, {}), 
this.ad_op = e.e_ad_op.destroy, this.release());
}
}, a;
}(e.ad_base);
e.ad_bannerbox_vivo_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc interstitial ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
this.ad_instance && (this.ad_instance.offError(), this.ad_instance.offClose(), this.ad_instance.offLoad()), 
t.prototype.release.call(this);
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
console.log("igc interstitial ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
var a = this;
this.ad_param = t, a.ad_op = e.e_ad_op.create, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", a.ad_op), 
this.ad_instance = window.qg.createInterstitialAd({
posId: t.ad_id
}), this.ad_instance.onLoad(function() {
a.on_load(t, {});
}), this.ad_instance.onError(function(e) {
a.on_error(t, e);
}), this.ad_instance.onClose(function() {
a.on_close(t, {});
}), a.ad_op = e.e_ad_op.load, this.ad_instance.load();
}
}, a.prototype.show_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc interstitial ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " show_ad"), 
console.log("igc interstitial show_ad");
var a = this;
if (this.ad_instance && a.ad_param && t && t.ad_id === a.ad_param.ad_id) {
a.ad_op = e.e_ad_op.show, a.send_dot(a.ad_param.ad_pos_id, a.ad_param.ad_type, e.e_ad_event.show, "", "", a.ad_param.ad_scene, "0", a.ad_op);
var o = this.ad_instance.show();
o && o.then(function() {
console.log("igc interstitial show_ad succ result"), a.on_show(t);
}).catch(function() {
console.log("igc interstitial show_ad err result");
});
}
}
}, a.prototype.on_load = function(a, o) {
a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance && (this.ad_instance && this.ad_instance.offLoad && this.ad_instance.offLoad(), 
t.prototype.on_load.call(this, a, o), console.log("igc interstitial on_load"), this.ad_status = e.e_ad_status.load_success, 
this.ad_param && !1 !== this.ad_param.auto_show && this.show_ad(this.ad_param));
}, a.prototype.on_close = function(a, o) {
(console.log("igc interstitial on_close res = ", JSON.stringify(o)), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance && (t.prototype.on_close.call(this, a, o), 
this.ad_instance)) && (this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onclose, "", "", this.ad_param.ad_scene, "0", this.ad_op), 
this.ad_param && this.ad_param.onClose && this.ad_param.onClose(this.ad_param, {}), 
this.ad_status = e.e_ad_status.close, this.release());
}, a.prototype.on_error = function(a, o) {
(console.log("igc interstitial on_error res = ", JSON.stringify(o)), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) && (this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onerror, o.errCode, o.errMsg, this.ad_param.ad_scene, "0", this.ad_op), 
t.prototype.on_error.call(this, a, o), o && 3e4 == o.errCode || this.release());
}, a.prototype.on_show = function(e) {
console.log("igc interstitial on_show succ"), e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && t.prototype.on_show.call(this, e);
}, a;
}(e.ad_base);
e.ad_interstitial_vivo_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.load_success = !1, e;
}
return __extends(a, t), a.prototype.release = function() {
this.load_success || (this.ad_param && console.log("igc native ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
this.ad_instance && (this.ad_instance.offLoad(), this.ad_instance = null), t.prototype.release.call(this));
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
console.log("igc native ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
var a = this;
if (this.ad_param = t, !this.ad_instance) {
a.ad_op = e.e_ad_op.create, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", a.ad_op), 
this.ad_instance = window.qg.createNativeAd({
posId: t.ad_id
}), this.ad_instance.onLoad(function(e) {
a.on_load(t, e);
}), a.ad_op = e.e_ad_op.load;
var o = this.ad_instance.load();
o && o.then(function() {
console.log("igc native load_ad succ result111"), a.load_success = !0;
}).catch(function(e) {
console.log("igc native load_ad err result111"), a.on_error(t, e);
});
}
}
}, a.prototype.update_show = function(t) {
var a = this;
if (this.ad_param = t, t && t.ad_type && t.ad_id) {
this.ad_instance || (console.log("igc native ad_type ad_native_vivo_qg update_show this.ad_instance is null"), 
this.ad_op = e.e_ad_op.create, this.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", a.ad_op), 
this.ad_instance = window.qg.createNativeAd({
posId: t.ad_id
}), this.ad_instance.onLoad(function(e) {
a.on_load(t, e);
})), console.log("igc native ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create"), 
a.ad_op = e.e_ad_op.create, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", a.ad_op), 
a.ad_op = e.e_ad_op.load;
var o = this.ad_instance.load();
o && o.then(function() {
a.load_success = !0, console.log("igc native load_ad succ result222");
}).catch(function(e) {
console.log("igc native load_ad err result222"), a.on_error(t, e);
});
}
}, a.prototype.on_load = function(t, a) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
if (this.check_param(t), !a || !a.adList) return this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onload, "0", "", this.ad_param.ad_scene, "0", this.ad_op), 
this.ad_param.onLoad(this.ad_param, []), this.ad_status = e.e_ad_status.none, this.release(), 
void console.log("igc native on_load fail");
console.log("igc native on_load length:", a.adList.length, JSON.stringify(a.adList)), 
this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onload, a.adList.length, "", this.ad_param.ad_scene, "0", this.ad_op);
for (var o = [], n = 0; n < a.adList.length; n++) {
var _ = {
adUnitId: a.adList[n].adId,
title: a.adList[n].title,
desc: a.adList[n].desc,
iconUrlList: a.adList[n].iconUrlList || a.adList[n].icon,
icon: a.adList[n].icon,
imgUrlList: a.adList[n].imgUrlList,
logoUrl: a.adList[n].logoUrl,
clickBtnTxt: a.adList[n].clickBtnTxt,
creativeType: a.adList[n].creativeType,
interactionType: a.adList[n].interactionType
};
_.iconUrlList = [], _.iconUrlList.push(a.adList[n].icon), o.push(_);
}
this.ad_param && this.ad_param.onLoad ? (console.log("igc native self.ad_param.onLoad(ad_data_list,self.ad_param)"), 
this.ad_param.onLoad(this.ad_param, o)) : console.log("igc native dont self.ad_param && self.ad_param.onLoad");
}
}, a.prototype.on_error = function(a, o) {
if (console.log("igc native on_error res.code = ", o.code), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) {
t.prototype.on_error.call(this, a, o);
var n = "";
o.errMsg ? n = o.errMsg : o.data && (n = JSON.stringify(o.data)), this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onerror, o.code, n, this.ad_param.ad_scene, "0", this.ad_op), 
this.release();
}
}, a.prototype.report_ad_close = function(a) {
if (a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) {
console.log("igc native ad_type:" + a.ad_type + ",ad_id:" + a.ad_id + ",ad_unit_id:" + a.ad_unit_id + " report_ad_close"), 
console.log("igc native report_ad_close "), t.prototype.check_param.call(this, a);
this.ad_op = e.e_ad_op.close, this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onclose, "", "", a.ad_scene, "0", this.ad_op), 
this.ad_status = e.e_ad_status.close, this.release();
}
}, a.prototype.report_ad_show = function(a) {
console.log("igc native report_ad_show "), t.prototype.check_param.call(this, a);
return this.ad_instance || console.log("igc native report_ad_click !self.ad_instance"), 
a || console.log("igc native report_ad_click igc !param"), a && !a.ad_unit_id && console.log("igc native report_ad_click igc !param.ad_unit_id"), 
!(!this.ad_instance || !a || void 0 === a.ad_unit_id || (this.ad_instance.reportAdShow({
adId: a.ad_unit_id
}), a.ad_pos_id && a.ad_type && a.ad_scene && a.sub_ad_type && (this.ad_op = e.e_ad_op.show, 
this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onshow, "", "", a.ad_scene, "0", this.ad_op), 
a.ad_id && console.log("igc native ad_type:" + a.ad_type + ",ad_id:" + a.ad_id + ",ad_unit_id:" + a.ad_unit_id + " report_ad_show")), 
0));
}, a.prototype.report_ad_click = function(a) {
console.log("igc native report_ad_click "), t.prototype.check_param.call(this, a);
return this.ad_instance || console.log("igc native report_ad_click !self.ad_instance"), 
a || console.log("igc native report_ad_click igc !param"), a && !a.ad_unit_id && console.log("igc native report_ad_click igc !param.ad_unit_id"), 
this.ad_instance && a && void 0 !== a.ad_unit_id ? (console.log("igc native do reportAdClick: ad_unit_id:" + a.ad_unit_id), 
this.ad_instance.reportAdClick({
adId: a.ad_unit_id
}), a.ad_pos_id && a.ad_type && a.ad_scene && a.sub_ad_type && (this.ad_op = e.e_ad_op.click, 
this.send_dot(a.ad_pos_id, a.ad_type, e.e_ad_event.onclick, "", "", a.ad_scene, "0", this.ad_op), 
a.ad_id && console.log("igc native ad_type:" + a.ad_type + ",ad_id:" + a.ad_id + ",ad_unit_id:" + a.ad_unit_id + " report_ad_click")), 
!0) : (console.log("igc native do reportAdClick: error"), !1);
}, a;
}(e.ad_base);
e.ad_native_vivo_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.load_success = !1, e;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc portalbox ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
this.ad_instance && (this.ad_instance.offLoad(), this.ad_instance.offClose(), this.ad_instance.offError(), 
this.ad_instance && (this.ad_instance.destroy(), this.ad_instance = null)), this.load_success = !1;
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id && window.qg.createBoxPortalAd) {
console.log("igc gameportalbox ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
this.ad_param = t, this.ad_op = e.e_ad_op.create, this.ad_instance = window.qg.createBoxPortalAd({
posId: t.ad_id,
marginTop: t.marginTop
}), this.ad_instance.onLoad(this.on_load_callback.bind(this)), this.ad_instance.onClose(this.on_close_callback.bind(this)), 
this.ad_instance.onError(this.on_error_callback.bind(this)), this.ad_instance.onShow(this.on_show_callback.bind(this)), 
this.ad_op = e.e_ad_op.load;
}
}, a.prototype.on_load_callback = function() {
this.on_load(this.ad_param, {});
}, a.prototype.on_show_callback = function() {
this.on_show(this.ad_param);
}, a.prototype.on_error_callback = function(e) {
console.log("igc gameportalbox error back", e), this.on_error(this.ad_param, e);
}, a.prototype.on_close_callback = function() {
console.log("igc gameportalbox close back"), this.ad_param.onClose(this.ad_param, {}), 
this.on_close(this.ad_param, {});
}, a.prototype.on_load = function(e, a) {
this.ad_instance && this.ad_param && e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (this.load_success = !0, 
t.prototype.on_load.call(this, e, a), e.auto_show && (e.auto_show = !1, this.show_ad(e)));
}, a.prototype.show_ad = function(t) {
var a = this, o = this;
e.stat_manager.instance.send_user_event(e.e_ad_app_box_type.portal_box + "", e.igc_stat_ids.multual_push_click, "", "", "", "", "", "", ""), 
this.ad_param = t, this.ad_instance && this.load_success ? (this.ad_op = e.e_ad_op.show, 
this.ad_instance.show().then(function() {
console.log("igc portalbox show success"), e.stat_manager.instance.send_user_event(e.e_ad_app_box_type.portal_box + "", e.igc_stat_ids.multual_push_show, "", "", "", "", "", "", ""), 
a.ad_instance.onShow(o.on_show_callback.bind(o));
}).catch(function(e) {
console.log("igc portalbox show fail"), o.on_error(t, e);
})) : (this.release(), t.auto_show = !0, this.create(t));
}, a.prototype.on_error = function(e, a) {
console.log("igc portalbox on_err res = ", JSON.stringify(a)), e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (t.prototype.on_error.call(this, e, a), 
this.release());
}, a.prototype.on_close = function(e, t) {
var a = this;
console.log("igc portalbox on_close res = ", JSON.stringify(t)), e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (e && e.onClose && e.onClose(e, t), 
this.release(), this.ad_param.auto_show = !0, setTimeout(function() {
a.create(a.ad_param);
}, 500));
}, a.prototype.destroy_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc portalbox ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " destroy_ad");
this.ad_instance && this.ad_param && t && t.ad_id === this.ad_param.ad_id && (this.ad_op = e.e_ad_op.destroy, 
this.release());
}
}, a;
}(e.ad_base);
e.ad_portalbox_vivo_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc video ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
t.prototype.release.call(this);
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
this.release(), console.log("igc video ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
var a = this;
this.ad_param = t, a.ad_op = e.e_ad_op.create, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", a.ad_op);
var o = t.extra || "";
e.stat_manager.instance.send_user_event(t.ad_pos_id + "", e.igc_stat_ids.video_click, "", "", o, "", "", "", ""), 
this.ad_instance = window.qg.createRewardedVideoAd({
posId: t.ad_id
}), this.ad_instance.onError(function(e) {
a.on_error(t, e);
}), this.ad_instance.onClose(function(e) {
a.on_close(t, e);
}), this.ad_instance.onLoad(function() {
a.on_load(t, {});
}), a.ad_op = e.e_ad_op.load;
}
}, a.prototype.update_show = function(t) {
if (t && t.ad_type && t.ad_id) {
this.release(), console.log("igc video ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " update_show");
var a = this;
a.ad_param = t, a.ad_op = e.e_ad_op.create, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", a.ad_op);
try {
this.ad_instance = window.qg.createRewardedVideoAd({
posId: t.ad_id
}), this.ad_instance.offError(), this.ad_instance.offClose(), this.ad_instance.offLoad(), 
this.ad_instance.onError(function(e) {
a.on_error(t, e);
}), this.ad_instance.onClose(function(e) {
a.on_close(t, e);
}), this.ad_instance.onLoad(function() {
a.on_load(t, {});
}), a.ad_op = e.e_ad_op.load, this.ad_instance.load().then(function() {
console.log("igc video update_show load succ result");
});
} catch (e) {
console.log("" + e), console.log("igc video update_show load err cache err:" + e);
}
}
}, a.prototype.on_load = function(a, o) {
if (a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) {
var n = this;
t.prototype.on_load.call(this, a, o), n.ad_op = e.e_ad_op.show, n.send_dot(n.ad_param.ad_pos_id, n.ad_param.ad_type, e.e_ad_event.show, "", "", n.ad_param.ad_scene, "0", n.ad_op);
try {
this.ad_instance.show().then(function() {
console.log("igc video show succ result"), n.on_show(a);
});
} catch (e) {
console.log("" + e);
}
}
}, a.prototype.on_error = function(a, o) {
(console.log("igc video on_err res = ", JSON.stringify(o)), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) && (t.prototype.on_error.call(this, a, o), 
this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onerror, o.errCode, o.errMsg, this.ad_param.ad_scene, "0", this.ad_op), 
o && o.errCode && (-3 == o.errCode || o.errCode), this.ad_op == e.e_ad_op.show || this.release());
}, a.prototype.on_close = function(t, a) {
(console.log("igc video on_close res = ", JSON.stringify(a)), t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) && (console.log("igc ad_type_name:" + this.get_ad_type_name(t.ad_type) + ",ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " on_close"), 
this.check_param(t), this.ad_status = e.e_ad_status.close, a && a.isEnded ? (this.ad_param.onClose && this.ad_param.onClose(this.ad_param, {
isEnded: a.isEnded
}), this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onclose, e.e_ad_video_close.complete, "", this.ad_param.ad_scene, "0", this.ad_op), 
e.stat_manager.instance.send_user_event(this.ad_param.ad_pos_id + "", e.igc_stat_ids.video_compelete, "", "", "", "", "", "", "")) : (this.ad_param.onClose && this.ad_param.onClose(this.ad_param, {
isEnded: !1
}), this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onclose, e.e_ad_video_close.uncomplete, "", this.ad_param.ad_scene, "0", this.ad_op), 
e.stat_manager.instance.send_user_event(this.ad_param.ad_pos_id + "", e.igc_stat_ids.video_uncompelete, "", "", "", "", "", "", "")), 
this.release());
}, a;
}(e.ad_base);
e.ad_video_vivo_qg = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.support_method[e.e_method_type.create_ad] = !1, 
this.support_method[e.e_method_type.destroy_ad] = !1, this.support_method[e.e_method_type.show_ad] = !1, 
this.support_method[e.e_method_type.hide_ad] = !1;
}, a;
}(e.channel_facade_ad_base);
e.channel_ad_web = t, window.channel_ad_web = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.support_method[e.e_method_type.pay] = !0;
}, a.prototype.get_extension = function() {
return JSON.stringify({
token: e.channel_sdk.instance.channel_user_info.token,
app_engine_version: e.channel_config.config.game_param.engin_version
});
}, a.prototype.pay = function(t, a) {
var o = this;
this.submit_order(t, this.get_extension(), function(t) {
t.retcode !== e.e_channel_code.success ? o.on_pay_result(t.retcode, {
code: -1,
msg: "fail"
}, a) : o.on_pay_result(e.e_channel_code.pay_success, t, a);
});
}, a.prototype.on_pay_result = function(t, a, o) {
t === e.e_channel_code.pay_success ? o({
errorcode: t,
errormsg: "success",
sdk_errorcode: a.code,
sdk_errormsg: a.msg
}) : o({
errorcode: t,
errormsg: "fail",
sdk_errorcode: a.code,
sdk_errormsg: a.msg
});
}, a;
}(e.channel_facade_pay_base);
e.channel_pay_web = t, window.channel_pay_web = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.register_listener(), this.support_method[e.e_method_type.get_system_info_sync] = !1, 
this.support_method[e.e_method_type.get_launch_options_sync] = !1, this.support_method[e.e_method_type.exit_mini_program] = !1, 
this.support_method[e.e_method_type.navigate_to_mini_program] = !1, this.support_method[e.e_method_type.on_show] = !1, 
this.support_method[e.e_method_type.on_hide] = !1;
}, a.prototype.register_listener = function() {}, a;
}(e.channel_facade_share_base);
e.channel_system_web = t, window.channel_system_web = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.is_add_desktop = !1, e;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.support_method[e.e_method_type.login] = !0, this.support_method[e.e_method_type.check_can_add_desktop] = !0, 
this.support_method[e.e_method_type.check_is_add_desktop] = !0, this.support_method[e.e_method_type.add_desktop] = !0;
}, a.prototype.login = function(t, a) {
var o = localStorage.getItem("igc_random_name");
o || (o = this.get_random_name(), localStorage.setItem("igc_random_name", o));
var n = {
uid: o,
token: "test_token",
nickName: o,
avatar: "",
sex: e.e_channel_sex.none,
birthday: "",
phoneNum: "110",
location: "",
extra: ""
};
a({
errorcode: e.e_channel_code.login_success,
errormsg: "success",
sdk_errorcode: 0,
sdk_errormsg: "",
channel_user_info: n
});
}, a.prototype.check_can_add_desktop = function() {
return !0;
}, a.prototype.check_is_add_desktop = function(e) {
this.is_add_desktop ? e.has_add && e.has_add() : e.can_add && e.can_add();
}, a.prototype.add_desktop = function(e) {
if (!this.check_can_add_desktop()) return e.on_failed && e.on_failed(), !1;
this.is_add_desktop = !0, e.on_success && e.on_success();
}, a;
}(e.channel_facade_user_base);
e.channel_user_web = t, window.channel_user_web = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.ad_block_map = {}, e.ad_sysInfo = null, e.can_grid = !0, e.can_inter = !0, 
e.can_ad = !0, e;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.ad_sysInfo = window.wx.getSystemInfoSync(), -1 == e.utils_manager.compare_version(this.ad_sysInfo.SDKVersion, "2.4.0") && (this.can_ad = !1), 
-1 == e.utils_manager.compare_version(this.ad_sysInfo.SDKVersion, "2.6.0") && (this.can_inter = !1), 
-1 == e.utils_manager.compare_version(this.ad_sysInfo.SDKVersion, "2.11.1") && (this.can_grid = !1), 
this.support_method[e.e_method_type.create_ad] = !0, this.support_method[e.e_method_type.destroy_ad] = !0, 
this.support_method[e.e_method_type.show_ad] = !0, this.support_method[e.e_method_type.hide_ad] = !0, 
this.support_method[e.e_method_type.has_ad] = !0, this.support_method[e.e_method_type.set_ad_position] = !0;
}, a.prototype.has_ad = function(t) {
return !!this.can_ad && (t && t.ad_type === e.e_ad_type.interstitial ? this.can_inter : !t || t.ad_type !== e.e_ad_type.block || this.can_inter);
}, a.prototype.create_ad = function(t) {
return !(!t.ad_id || !t.ad_type) && !!this.has_ad(t) && (t.ad_type == e.e_ad_type.banner ? this.create_ad_banner(t) : t.ad_type == e.e_ad_type.video ? this.create_ad_video(t) : t.ad_type == e.e_ad_type.interstitial ? this.create_ad_interstitial(t) : t.ad_type == e.e_ad_type.block && this.create_ad_block(t));
}, a.prototype.create_ad_banner = function(t) {
var a = this.ad_sysInfo.windowWidth / 2, o = this.ad_sysInfo.windowHeight, n = 0;
t.left_offset && (n = t.left_offset), t.style = {
left: a - 150 + n,
top: o - 80,
width: 300
}, t.width = 300, t.windowHeight = this.ad_sysInfo.windowHeight, t.windowWidth = this.ad_sysInfo.windowWidth, 
this.ad_banner_manager || (this.ad_banner_manager = new e.ad_banner_wx_manager()), 
this.ad_banner_manager.create(t);
}, a.prototype.create_ad_video = function(t) {
this.ad_video ? this.ad_video.create(t) : (this.ad_video = new e.ad_video_wx(), 
this.ad_video.create(t));
}, a.prototype.create_ad_interstitial = function(t) {
this.ad_interstitial && this.ad_interstitial.release(), this.ad_interstitial = new e.ad_interstitial_wx(), 
this.ad_interstitial.create(t);
}, a.prototype.create_ad_block = function(t) {
this.can_grid ? (this.ad_block_map[t.ad_id] || (this.ad_block_map[t.ad_id] = new e.ad_block_wx()), 
this.ad_block_map[t.ad_id].create(t)) : console.log("igc----- wx SDKVersion no support this ad", t.ad_id);
}, a.prototype.set_ad_position = function(e) {
for (var t in this.ad_banner_manager ? this.ad_banner_manager.set_ad_position(e) : console.log("channel_ad_qq  move_ad  ad_banner_instance is null"), 
this.ad_block_map) this.ad_block_map[t] && this.ad_block_map[t].set_ad_position(e);
}, a.prototype.destroy_ad = function(t) {
return !(!t.ad_id || !t.ad_type) && (t.ad_type == e.e_ad_type.banner ? this.destroy_ad_banner(t) : (t.ad_type, 
e.e_ad_type.video, !1));
}, a.prototype.destroy_ad_banner = function(e) {
this.ad_banner_manager && this.ad_banner_manager.destroy_ad(e);
}, a.prototype.show_ad = function(t) {
return !(!t.ad_id || !t.ad_type) && (t.ad_type == e.e_ad_type.banner ? this.show_ad_banner(t) : t.ad_type == e.e_ad_type.video ? this.show_ad_video(t) : t.ad_type == e.e_ad_type.interstitial && this.show_ad_interstitial(t));
}, a.prototype.show_ad_banner = function(e) {
return this.ad_banner_manager && this.ad_banner_manager.show_ad(e), !1;
}, a.prototype.show_ad_video = function(e) {
return !!this.ad_video && (this.ad_video.show_ad(e), !0);
}, a.prototype.show_ad_interstitial = function(e) {
return !!this.ad_interstitial && (this.ad_interstitial.show_ad(e), !0);
}, a.prototype.hide_ad = function(t) {
return !(!t.ad_id || !t.ad_type) && (t.ad_type == e.e_ad_type.banner ? this.hide_ad_banner(t) : t.ad_type != e.e_ad_type.video && t.ad_type == e.e_ad_type.block && this.hide_ad_block(t));
}, a.prototype.hide_ad_banner = function(e) {
this.ad_banner_manager && this.ad_banner_manager.hide_ad(e);
}, a.prototype.hide_ad_block = function(e) {
this.can_grid ? this.ad_block_map[e.ad_id] && this.ad_block_map[e.ad_id].hide_ad(e) : console.log("igc----- wx SDKVersion no support this ad", e.ad_id);
}, a;
}(e.channel_facade_ad_base);
e.channel_ad_wx = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.register_listener(), this.support_method[e.e_method_type.share] = !0, 
this.support_method[e.e_method_type.on_share_app_message] = !0;
}, a.prototype.register_listener = function() {}, a.prototype.on_share_app_message = function(t) {
var a = "type=" + e.e_share_type.card + "&k2=v2";
t && t.userId && "" != t.userId && (a = "type=" + e.e_share_type.card + "&userId=" + t.userId), 
window.wx.showShareMenu({
withShareTicket: !0,
menus: [ "shareAppMessage", "shareTimeline" ]
}), window.wx.onShareAppMessage(function() {
return {
title: t.title,
imageUrl: t.imageUrl,
query: a
};
});
}, a.prototype.share = function(t) {
var a = "type=" + e.e_share_type.card + "&k2=v2";
t && t.userId && "" != t.userId && (a = "type=" + e.e_share_type.card + "&userId=" + t.userId), 
window.wx.shareAppMessage({
title: t.title || "",
imageUrl: t.imageUrl || "",
query: a,
imageUrlId: t.imageUrlId || "",
success: function(e) {
t.success && t.success(e);
},
fail: function(e) {
t.success && t.success(e);
}
});
}, a;
}(e.channel_facade_share_base);
e.channel_share_wx = t, window.channel_share_wx = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.register_listener(), this.support_method[e.e_method_type.get_system_info_sync] = !0, 
this.support_method[e.e_method_type.get_launch_options_sync] = !0, this.support_method[e.e_method_type.exit_mini_program] = !0, 
this.support_method[e.e_method_type.navigate_to_mini_program] = !0, this.support_method[e.e_method_type.on_show] = !0, 
this.support_method[e.e_method_type.on_hide] = !0;
}, a.prototype.register_listener = function() {}, a.prototype.get_system_info_sync = function() {
var e = window.wx.getSystemInfoSync();
return {
brand: e.brand,
model: e.model,
pixelRatio: e.pixelRatio,
screenWidth: e.screenWidth,
screenHeight: e.screenHeight,
windowWidth: e.windowWidth,
windowHeight: e.windowHeight,
statusBarHeight: e.statusBarHeight,
language: e.language,
version: e.version,
platform: e.platform,
system: e.system,
platformVersion: e.SDKVersion,
extra: e
};
}, a.prototype.get_launch_options_sync = function() {
var e = window.wx.getLaunchOptionsSync();
return {
scene: e.scene,
query: e.query,
shareTicket: e.shareTicket,
referrerInfo: e.referrerInfo,
entryDataHash: {}
};
}, a.prototype.exit_mini_program = function() {
return window.wx.exitMiniProgram();
}, a.prototype.on_show = function(e) {
return window.wx.onShow(function(t) {
e.on_show && e.on_show(t);
});
}, a.prototype.on_hide = function(e) {
return window.wx.onHide(function(t) {
e.on_hide && e.on_hide(t);
});
}, a.prototype.navigate_to_mini_program = function(e) {
return window.wx.navigateToMiniProgram({
appId: e.app_id,
path: e.path,
extraData: e.extra_data,
success: e.success,
fail: e.fail
});
}, a;
}(e.channel_facade_share_base);
e.channel_system_wx = t, window.channel_system_wx = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.button = void 0, e;
}
return __extends(a, t), a.prototype.init = function() {
t.prototype.init.call(this), this.support_method[e.e_method_type.login] = !0, this.support_method[e.e_method_type.share] = !0, 
this.support_method[e.e_method_type.show_loading] = !0, this.support_method[e.e_method_type.show_toast] = !0, 
this.support_method[e.e_method_type.show_modal] = !0, this.support_method[e.e_method_type.on_show] = !0, 
this.support_method[e.e_method_type.on_hide] = !0, this.support_method[e.e_method_type.navigate_to_mini_program] = !0, 
this.support_method[e.e_method_type.get_system_info_sync] = !0, this.support_method[e.e_method_type.create_inner_audio_context] = !0, 
this.support_method[e.e_method_type.post_message] = !0, this.support_method[e.e_method_type.set_user_cloud_storage] = !0, 
this.support_method[e.e_method_type.get_setting] = !0, this.support_method[e.e_method_type.create_user_info_button] = !0, 
this.support_method[e.e_method_type.open_setting] = !0, this.support_method[e.e_method_type.authorize] = !0, 
this.support_method[e.e_method_type.get_device] = !0, this.support_method[e.e_method_type.get_invite_query] = !0, 
this.support_method[e.e_method_type.set_show_share_menu] = !0, e.stat_manager.instance._osInfo = window.wx.getSystemInfoSync().model || "", 
console.log("xiejinhui wx手机型号", e.stat_manager.instance._osInfo);
}, a.prototype.login = function(t, a) {
var o = this;
window.wx && window.wx.login({
success: function(t) {
o.getWxSetting(function(n) {
if (!0 === n) o.getWxUserInfo(function(n, _) {
if (!0 === n) {
var i = {
code: t.code,
user_data: _
};
o.on_login_result(e.e_channel_code.login_success, i, a);
} else {
i = {
code: t.code
};
o.on_login_result(e.e_channel_code.login_success, i, a);
}
}); else {
var _ = {
code: t.code
};
o.on_login_result(e.e_channel_code.login_success, _, a);
}
});
},
fail: function(t) {
window.wx.hideLoading(), window.wx.showToast({
title: "微信登录失败!",
icon: "",
image: "",
duration: 2e3
}), o.on_login_result(e.e_channel_code.login_fail, t, a);
}
});
}, a.prototype.getWxSetting = function(e) {
window.wx && window.wx.getSetting({
success: function(t) {
return !0 === t.authSetting["scope.userInfo"] ? void (e && e(!0)) : void (e && e(!1));
}
});
}, a.prototype.getWxUserInfo = function(e) {
window.wx && window.wx.getUserInfo({
success: function(t) {
e && e(!0, t);
},
fail: function() {
e && e(!1, {});
}
});
}, a.prototype.get_user_info = function(e) {
var t = this;
return t.getWxSetting(function(a) {
!0 === a ? t.getWxUserInfo(function(a, o) {
if (!0 === a) {
var n = {
user_data: o
}, _ = t.config_channel_user_info_ex(n);
e.on_user_info && e.on_user_info(_);
} else e.on_user_info && e.on_user_info(void 0);
}) : t.create_button(e);
}), !0;
}, a.prototype.create_button = function(e) {
var t = this;
t.button = window.wx.createUserInfoButton({
type: e.type,
image: e.image,
style: {
left: e.left,
top: e.top,
width: e.width,
height: e.height,
lineHeight: e.lineHeight,
backgroundColor: e.backgroundColor,
color: e.color,
textAlign: e.textAlign,
fontSize: e.fontSize,
borderRadius: e.borderRadius
}
}), t.button.onTap(function() {
t.getWxSetting(function(a) {
1 == a && t.getWxUserInfo(function(a, o) {
if (!0 === a) {
var n = {
user_data: o
}, _ = t.config_channel_user_info_ex(n);
e.on_user_info && e.on_user_info(_);
} else e.on_user_info && e.on_user_info(void 0);
}), t.button && (t.button.destroy(), t.button = void 0);
});
});
}, a.prototype.config_channel_user_info_ex = function(e) {
var t = localStorage.getItem("igc_random_wx_name");
return t || (t = this.get_random_name(), localStorage.setItem("igc_random_wx_name", t)), 
this.config_channel_user_info(e, function(e) {
if (e.user_data) {
var a = e.user_data.userInfo;
return {
uid: t,
token: e.code,
hasAuth: !0,
nickName: a.nickName,
avatar: a.avatarUrl,
sex: a.gender,
birthday: "",
phoneNum: "",
location: "",
extra: ""
};
}
return {
uid: t,
token: e.code,
hasAuth: !1,
nickName: t,
avatar: "",
sex: "",
birthday: "",
phoneNum: "",
location: "",
extra: ""
};
});
}, a.prototype.on_login_result = function(t, a, o) {
if (t == e.e_channel_code.login_success) {
var n = this.config_channel_user_info_ex(a);
o({
errorcode: e.e_channel_code.login_success,
errormsg: "success",
sdk_errorcode: 0,
sdk_errormsg: "",
channel_user_info: n
});
} else o({
errorcode: e.e_channel_code.login_fail,
errormsg: "fail",
sdk_errorcode: -1,
sdk_errormsg: JSON.stringify(a),
channel_user_info: {}
});
}, a.prototype.share = function(e) {
if (void 0 !== window.wx && window.wx.shareAppMessage) return window.wx.shareAppMessage({
withShareTicket: e.with_share_ticket,
title: e.title,
imageUrl: e.image_url,
query: "type=" + e.query_type + "&userId=" + e.user_id,
success: function(t) {
e.on_succeed && e.on_succeed(t);
},
fail: function(t) {
e.on_failed && e.on_failed(t);
}
});
}, a.prototype.show_loading = function(e) {
return e.is_show ? window.wx.showLoading({
title: e.title,
mask: e.mask
}) : window.wx.hideLoading();
}, a.prototype.show_toast = function(e) {
return window.wx.showToast({
title: e.title,
icon: e.icon,
image: e.image,
duration: e.duration
});
}, a.prototype.show_modal = function(e) {
return window.wx.showModal({
title: e.title,
content: e.content,
showCancel: e.show_cancel,
cancelText: e.cancel_text,
cancelColor: e.cancel_color,
confirmText: e.confirm_text,
confirmColor: e.confirm_color,
success: e.on_succeed,
fail: e.on_failed,
complete: e.on_complete
});
}, a.prototype.on_show = function(e) {
return window.wx.onShow(function(t) {
e.on_show && e.on_show(t);
});
}, a.prototype.on_hide = function(e) {
return window.wx.onHide(function(t) {
e.on_hide && e.on_hide(t);
});
}, a.prototype.navigate_to_mini_program = function(e) {
return window.wx.navigateToMiniProgram({
appId: e.app_id,
path: e.path,
extraData: e.extra_data,
success: e.on_succeed,
fail: e.on_failed
});
}, a.prototype.get_system_info_sync = function() {
return window.wx.getSystemInfoSync();
}, a.prototype.create_inner_audio_context = function() {
return window.wx.createInnerAudioContext();
}, a.prototype.post_message = function(e) {
return window.wx.postMessage({
messageType: e.message_type,
data: e.data
});
}, a.prototype.set_user_cloud_storage = function(e) {
return window.wx.setUserCloudStorage({
KVDataList: e.kv_data_list,
success: e.on_succeed,
fail: e.on_failed
});
}, a.prototype.get_setting = function(e) {
return window.wx.getSetting({
success: e.on_succeed
});
}, a.prototype.create_user_info_button = function(e) {
return window.wx.createUserInfoButton({
type: e.type,
image: e.image,
style: e.style
});
}, a.prototype.open_setting = function() {
return window.wx.openSetting();
}, a.prototype.authorize = function(e) {
return window.wx.authorize({
scope: e.score,
success: e.on_succeed,
fail: e.on_failed
});
}, a.prototype.get_device = function() {
return window.wx.getSystemInfo({
success: function(t) {
return "devtools" == t.platform ? e.e_device.desktop : "ios" == t.platform ? e.e_device.ios : "android" == t.platform ? e.e_device.android : e.e_device.unknown;
}
}), e.e_device.unknown;
}, a.prototype.get_invite_query = function() {
var e = window.wx.getLaunchOptionsSync();
return console.log("qq游戏启动参数-----------------\x3e", e), e.query;
}, a.prototype.set_show_share_menu = function(e) {
window.wx.showShareMenu(), window.wx.onShareAppMessage(function() {
return {
title: e.txt,
imageUrl: e.url
};
});
}, a.prototype.device_shake = function(e) {
window.wx.vibrateShort({
success: function() {
e.on_success && e.on_success();
},
fail: function() {
e.on_failed && e.on_failed();
},
complete: function() {
e.on_complete && e.on_complete();
}
});
}, a;
}(e.channel_facade_user_base);
e.channel_user_wx = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.is_resize_back = !1, e.top_offset = 0, e.need_show = !0, e.is_showing = !1, 
e.banner_index = "", e;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc banner ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
this.ad_instance && (this.ad_instance.offLoad && this.ad_instance.offLoad(this.on_load_callback.bind(this)), 
this.ad_instance.offError && this.ad_instance.offError(this.on_error_callback.bind(this)), 
this.ad_instance.offResize && this.ad_instance.offResize(this.on_resize_callback.bind(this)), 
this.ad_instance.destroy(), this.ad_instance = null, this.ad_param = null), t.prototype.release.call(this);
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
this.release(), this.banner_index = t.banner_index, console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
this.ad_param = t, this.ad_op = e.e_ad_op.create, this.is_resize_back = !1;
var a = t.style || {};
t.adIntervals && t.adIntervals > 0 ? this.ad_instance = window.wx.createBannerAd({
adUnitId: t.ad_id,
adIntervals: t.adIntervals || 30,
style: a
}) : this.ad_instance = window.wx.createBannerAd({
adUnitId: t.ad_id,
style: a
}), this.ad_instance.onError(this.on_error_callback.bind(this)), this.ad_instance.onLoad(this.on_load_callback.bind(this)), 
this.ad_instance.onResize(this.on_resize_callback.bind(this)), this.ad_param && this.ad_param.is_preload || this.show_ad(t);
}
}, a.prototype.on_error_callback = function(e) {
this.on_error(this.ad_param, e);
}, a.prototype.on_load_callback = function() {
this ? this.ad_instance ? this.ad_instance.offLoad ? (this.ad_instance && this.ad_instance.offLoad && this.ad_instance.offLoad(this.on_load_callback), 
this.on_load(this.ad_param, {})) : console.log("igc banner on_load_callback self.ad_instance.offLoad null") : console.log("igc banner on_load_callback self.ad_instance null") : console.log("igc banner on_load_callback self null");
}, a.prototype.on_resize_callback = function(e) {
console.log("igc on_resize_callback:", e.width, e.height), this.is_resize_back = !0;
if (this.banner_size = e, this.ad_param.width = e.width, this.ad_instance) {
var t = 0;
this.ad_param.left_offset && (t = this.ad_param.left_offset), this.ad_param.is_set_position ? (this.ad_instance.style && (this.ad_instance.style.width = 300, 
this.ad_instance.style.left = (this.ad_param.windowWidth - this.ad_param.width) / 2 + t), 
this.top_offset > 0 ? this.ad_instance.style.top = this.top_offset : this.ad_instance.style.top = this.ad_param.top_offset) : this.ad_instance.style && (this.ad_instance.style.width = 300, 
this.ad_instance.style.top = this.ad_param.windowHeight - e.height, this.ad_instance.style.left = (this.ad_param.windowWidth - this.ad_param.width) / 2 + t);
} else console.log("igc banner on_resize_callback self.ad_instance null");
}, a.prototype.set_ad_position = function(e) {
this.ad_param && (this.ad_param.is_set_position = e.top_offset > 0);
var t = e.top_offset > 0 ? e.top_offset : 0;
this.top_offset = t, this.is_resize_back ? (this.ad_instance && this.ad_instance.style && t > 0 && (this.ad_instance.style.top = t), 
this.ad_instance && this.ad_instance.style && this.banner_size && t <= 0 && this.banner_size && this.ad_param && (this.ad_instance.style.top = this.ad_param.windowHeight - this.banner_size.height - 20)) : console.error("igc ----- ad_banner_qq is no run on_resize_callback");
}, a.prototype.show_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " show_ad");
var a = this;
if (!a.is_showing && this.ad_instance && a.ad_param && t && t.ad_id === a.ad_param.ad_id) {
console.log("igc banner show_ad ad_status: ", this.ad_status), a.need_show = !0, 
a.ad_op = e.e_ad_op.show;
var o = this.ad_instance.show();
o && o.then(function() {
console.log("igc banner show succ result"), a.need_show ? (a.is_showing = !0, a.on_show(t), 
a.ad_param.show_success && a.ad_param.show_success(a.banner_index)) : a.hide_ad(t);
}).catch(function(e) {
console.log("igc banner show error result:", JSON.stringify(e)), a.on_error(t, e);
});
}
}
}, a.prototype.hide_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance && this.is_showing) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " hide_ad");
if (this.is_showing = !1, this.ad_instance && this.ad_param && t && t.ad_id === this.ad_param.ad_id) {
if (console.log("igc banner hide_ad ad_status: ", this.ad_status), this.ad_status < e.e_ad_status.show) return;
this.ad_op = e.e_ad_op.hide, this.need_show = !1, this.ad_instance.hide();
}
}
}, a.prototype.destroy_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc banner ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " destroy_ad");
this.ad_instance && this.ad_param && t && t.ad_id === this.ad_param.ad_id && (this.ad_op = e.e_ad_op.destroy, 
this.release());
}
}, a.prototype.on_load = function(e, a) {
e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (t.prototype.on_load.call(this, e, a), 
this.ad_param.load_success && this.ad_param.load_success(this.banner_index));
}, a.prototype.on_error = function(e, a) {
(console.log("igc banner on_error res = ", JSON.stringify(a)), e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance) && (t.prototype.on_error.call(this, e, a), 
this.ad_param.load_error && this.ad_param.load_error(this.banner_index, e, a), this.release());
}, a;
}(e.ad_base);
e.ad_banner_wx = t;
}(igc || (igc = {})), function(e) {
var t = function() {
function t() {
this.ad_banner_map = {}, this.cur_ad_banner_map = [], this.cur_show_banner_index = -1, 
this.ad_param = null, this.max_cache_count = 10;
}
return t.prototype.create = function(t) {
this.hide_ad({});
var a = null;
this.ad_param = t, t.banner_index = e.utils_manager.get_random_name(), this.ad_banner_map[t.banner_index] || (this.ad_banner_map[t.banner_index] = {
banner_index: t.banner_index,
ad_instance: new e.ad_banner_wx(),
order: 0
}, a = this.ad_banner_map[t.banner_index].ad_instance), t.load_success = this.load_success.bind(this), 
t.show_success = this.show_success.bind(this), t.load_error = this.load_error.bind(this), 
a.create(t);
}, t.prototype.show_ad = function(e) {
if (e.extra && 1 == e.extra) if (this.cur_show_banner_index = -1, console.log("开始展示备胎"), 
this.cur_ad_banner_map.length > 0) {
var t = this.get_min_order_instance();
console.log("开始展示备胎---\x3e", t.ad_instance.banner_index), t.ad_instance && t.ad_instance.show_ad(this.ad_param);
} else console.log("banner备胎池子没有数据"), e.onError && e.onError(e, {
error: "ad_banner_instance_cache is no ad"
}); else this.ad_param && -1 != this.cur_show_banner_index && this.ad_banner_map[this.cur_show_banner_index] && this.ad_banner_map[this.cur_show_banner_index].ad_instance && this.ad_banner_map[this.cur_show_banner_index].ad_instance.show_ad(this.ad_param);
}, t.prototype.hide_ad = function() {
if (this.ad_param) for (var e = 0; e < this.cur_ad_banner_map.length; e++) this.cur_ad_banner_map[e] && this.cur_ad_banner_map[e].ad_instance && this.cur_ad_banner_map[e].ad_instance.hide_ad(this.ad_param);
}, t.prototype.destroy_ad = function() {}, t.prototype.set_ad_position = function() {}, 
t.prototype.load_success = function(e) {
this.ad_banner_map[e] && this.ad_banner_map[e].ad_instance && this.add_instance(this.ad_banner_map[e]);
}, t.prototype.load_error = function(e) {
this.cur_show_banner_index = -1, this.ad_banner_map[e] && this.ad_banner_map[e].ad_instance && this.remote_instance(e);
}, t.prototype.show_success = function(e) {
this.cur_show_banner_index = e, this.ad_banner_map[e].order = this.get_max_order() + 1;
}, t.prototype.get_min_order_instance = function() {
var e = void 0, t = this.cur_ad_banner_map.length;
if (t > 0) for (var a = 0; a < t; a++) (!e || this.cur_ad_banner_map[a].order <= e.order) && (e = this.cur_ad_banner_map[a]);
return e;
}, t.prototype.get_max_order = function() {
var e = this.cur_ad_banner_map, t = 0;
if (e.length > 0) for (var a in e) e[a].order > t && (t = e[a].order);
return t || 0;
}, t.prototype.check_instance_is_exist = function(e) {
for (var t = 0; t < this.cur_ad_banner_map.length; t++) if (e.banner_index == this.cur_ad_banner_map[t].banner_index) return !0;
return !1;
}, t.prototype.add_instance = function(e) {
this.cur_ad_banner_map.length >= this.max_cache_count && this.remote_instance(this.cur_ad_banner_map[0].banner_index), 
this.check_instance_is_exist(e.banner_index) || this.cur_ad_banner_map.push(e);
}, t.prototype.remote_instance = function(e) {
this.ad_banner_map[e] && this.ad_banner_map[e].ad_instance && (this.ad_banner_map[e].ad_instance.destroy_ad(this.ad_param), 
this.ad_banner_map[e] = null);
for (var t = 0; t < this.cur_ad_banner_map.length; t++) this.cur_ad_banner_map[t].banner_index == e && (this.cur_ad_banner_map[t].ad_instance.destroy_ad(this.ad_param), 
this.cur_ad_banner_map[t] = null, this.cur_ad_banner_map.splice(t, 1));
}, t;
}();
e.ad_banner_wx_manager = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.need_show = !0, e.is_showing = !1, e;
}
return __extends(a, t), a.prototype.release = function() {}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
console.log("igc block ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
this.ad_param = t, this.ad_op = e.e_ad_op.create, this.need_show = !0, window.wx.createCustomAd ? (this.ad_instance || (this.ad_instance = window.wx.createCustomAd({
adUnitId: t.ad_id,
adIntervals: 30,
style: t.style
}), this.ad_instance.onError && this.ad_instance.onError(this.on_error_callback.bind(this)), 
this.ad_instance.onLoad && this.ad_instance.onLoad(this.on_load_callback.bind(this)), 
this.ad_instance.onClose && this.ad_instance.onClose(this.on_close_callback.bind(this))), 
t.is_preload || this.show_ad(t)) : console.log("igc ----- wx no support this ad", t.ad_id);
}
}, a.prototype.on_error_callback = function(e) {
this.on_error(this.ad_param, e);
}, a.prototype.on_load_callback = function() {
this.ad_instance || console.log("igc block on_load_callback self.ad_instance null"), 
this.ad_instance && this.ad_instance.offLoad && this.ad_instance.offLoad(this.on_load_callback), 
this.on_load(this.ad_param, {});
}, a.prototype.on_hide_callback = function() {
console.log("igc block on_hide_callback");
}, a.prototype.on_close_callback = function() {
console.log("igc block on_close_callback"), this.ad_param.onClose && this.ad_param.onClose(), 
this.ad_instance && (this.ad_instance.destroy && this.ad_instance.destroy(), this.ad_instance.offError && this.ad_instance.offError(), 
this.ad_instance.offLoad && this.ad_instance.offLoad(), this.ad_instance.offClose && this.ad_instance.offClose(), 
this.ad_instance = null);
}, a.prototype.show_ad = function(t) {
if (this.need_show) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc block ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " show_ad");
var a = this;
if (this.ad_instance && a.ad_param && t && t.ad_id === a.ad_param.ad_id) {
console.log("igc block show_ad ad_status: ", this.ad_status), a.ad_op = e.e_ad_op.show;
var o = this.ad_instance.show();
o && o.then(function() {
console.log("igc block show succ result"), a.need_show ? a.on_show(t) : a.hide_ad(t);
}).catch(function(e) {
console.log("igc block show error result:", JSON.stringify(e)), a.on_error(t, e);
});
}
}
} else console.log("igc ad_block_wx can't show   need_show is", this.need_show);
}, a.prototype.hide_ad = function(t) {
if (this.need_show = !1, t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc block ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " hide_ad");
this.ad_instance && this.ad_param && t && t.ad_id === this.ad_param.ad_id && (this.ad_op = e.e_ad_op.hide, 
this.ad_instance.isShow && this.ad_instance.isShow() && this.ad_instance.hide());
}
}, a.prototype.destroy_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc block ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " destroy_ad");
this.ad_instance && this.ad_param && t && t.ad_id === this.ad_param.ad_id && (this.ad_op = e.e_ad_op.destroy, 
this.release());
}
}, a.prototype.on_load = function(e, a) {
e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && t.prototype.on_load.call(this, e, a);
}, a.prototype.on_error = function(e, a) {
console.log("igc block on_error res = ", JSON.stringify(a)), e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (t.prototype.on_error.call(this, e, a), 
this.release());
}, a;
}(e.ad_base);
e.ad_block_wx = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
return null !== t && t.apply(this, arguments) || this;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc interstitial ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release"), 
this.ad_instance && (this.ad_instance.offError(this.on_error_callback.bind(this)), 
this.ad_instance.offClose(this.on_close_callback.bind(this)), this.ad_instance.offLoad(this.on_load_callback.bind(this)), 
this.ad_instance.destroy(), this.ad_instance = null, this.ad_param = null), t.prototype.release.call(this);
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
console.log("igc interstitial ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
this.ad_param = t, this.ad_op = e.e_ad_op.create, this.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", this.ad_op), 
this.ad_instance = window.wx.createInterstitialAd({
adUnitId: t.ad_id
}), this.ad_instance.onLoad(this.on_load_callback.bind(this)), this.ad_instance.onError(this.on_error_callback.bind(this)), 
this.ad_instance.onClose(this.on_close_callback.bind(this)), this.ad_op = e.e_ad_op.load, 
this.show_ad(this.ad_param);
}
}, a.prototype.on_load_callback = function() {
this.on_load(this.ad_param, {});
}, a.prototype.on_error_callback = function(e) {
this.on_error(this.ad_param, e);
}, a.prototype.on_close_callback = function() {
this.on_close(this.ad_param, {});
}, a.prototype.show_ad = function(t) {
if (t && t.ad_type && t.ad_id && this.ad_param && this.ad_instance) {
console.log("igc interstitial ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " show_ad"), 
console.log("igc interstitial show_ad");
var a = this;
this.ad_instance && a.ad_param && t && t.ad_id === a.ad_param.ad_id && (a.ad_op = e.e_ad_op.show, 
a.send_dot(a.ad_param.ad_pos_id, a.ad_param.ad_type, e.e_ad_event.show, "", "", a.ad_param.ad_scene, "0", a.ad_op), 
this.ad_instance.show().then(function() {
console.log("igc 加载微信插屏成功，调用展示show", t.ad_id), a.on_show(t);
}).catch(function(e) {
console.log("igc 加载微信插屏失败，调用展示show", t.ad_id), console.log(e);
}));
}
}, a.prototype.on_load = function(e, a) {
e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && (this.ad_instance.offLoad(), 
t.prototype.on_load.call(this, e, a), console.log("igc interstitial on_load"));
}, a.prototype.on_close = function(a, o) {
(console.log("igc interstitial on_close res = ", JSON.stringify(o)), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance && (t.prototype.on_close.call(this, a, o), 
this.ad_instance)) && (this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onclose, "", "", this.ad_param.ad_scene, "0", this.ad_op), 
this.ad_param && this.ad_param.onClose && this.ad_param.onClose(this.ad_param, {}), 
this.ad_status = e.e_ad_status.close, this.release());
}, a.prototype.on_error = function(a, o) {
(console.log("igc interstitial on_error res = ", JSON.stringify(o)), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) && (this.ad_param && this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onerror, o.errCode, o.errMsg, this.ad_param.ad_scene, "0", this.ad_op), 
t.prototype.on_error.call(this, a, o), this.release());
}, a.prototype.on_show = function(e) {
console.log("igc interstitial on_show succ"), e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && t.prototype.on_show.call(this, e);
}, a;
}(e.ad_base);
e.ad_interstitial_wx = t;
}(igc || (igc = {})), function(e) {
var t = function(t) {
function a() {
var e = null !== t && t.apply(this, arguments) || this;
return e.is_first = !0, e;
}
return __extends(a, t), a.prototype.release = function() {
this.ad_param && console.log("igc video ad_type:" + this.ad_param.ad_type + ",ad_id:" + this.ad_param.ad_id + " release");
}, a.prototype.create = function(t) {
if (t && t.ad_type && t.ad_id) {
console.log("igc video ad_type:" + t.ad_type + ",ad_id:" + t.ad_id + " create");
var a = this;
this.ad_param = t, a.ad_op = e.e_ad_op.create, a.send_dot(t.ad_pos_id, t.ad_type, e.e_ad_event.req, "", "", t.ad_scene, "0", a.ad_op);
var o = t.extra || "";
e.stat_manager.instance.send_user_event(t.ad_pos_id + "", e.igc_stat_ids.video_click, "", "", o, "", "", "", ""), 
this.ad_instance = window.wx.createRewardedVideoAd({
adUnitId: t.ad_id
}), !0 === this.is_first && (this.ad_instance.onError(a.on_error_callback.bind(a)), 
this.ad_instance.onClose(a.on_close_callback.bind(a)), this.is_first = !1), a.ad_op = e.e_ad_op.load, 
this.ad_instance.show().catch(function() {
a.ad_instance.load().then(function() {
console.log("视频失败后手动加载成功  igc show banner succ 1"), a.on_load(t, {}), a.ad_instance.show().then(function() {
console.log("视频失败后手动展示成功  igc show banner succ 1"), a.on_show(t);
});
}).catch(function(e) {
console.log("视频手动加载失败  igc show banner err:", e), a.on_error(t, e);
});
}).then(function() {
console.log("视频展示成功  igc show banner succ 2"), a.on_show(t);
});
}
}, a.prototype.on_load_callback = function() {
this || console.log("igc video on_load_callback self null"), this.ad_instance || console.log("igc video on_load_callback self.ad_instance null"), 
this.ad_instance.offLoad || console.log("igc video on_load_callback self.ad_instance.offLoad null"), 
this.ad_instance && this.ad_instance.offLoad && this.ad_instance.offLoad(this.on_load_callback.bind(this)), 
this.on_load(this.ad_param, {});
}, a.prototype.on_error_callback = function(e) {
this.on_error(this.ad_param, e);
}, a.prototype.on_close_callback = function(e) {
this.ad_instance || console.log("igc on_load_callback self.ad_instance null"), this.ad_instance.offClose || console.log("igc on_load_callback self.ad_instance.offClose null"), 
this.on_close(this.ad_param, e);
}, a.prototype.on_load = function(e, a) {
this.ad_instance && this.ad_param && e && e.ad_type && e.ad_id && this.ad_param && this.ad_instance && t.prototype.on_load.call(this, e, a);
}, a.prototype.on_error = function(a, o) {
(console.log("igc video on_err res = ", JSON.stringify(o)), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) && (t.prototype.on_error.call(this, a, o), 
this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onerror, o.errCode, o.errMsg, this.ad_param.ad_scene, "0", this.ad_op), 
this.release());
}, a.prototype.on_close = function(a, o) {
(console.log("igc video on_close res = ", JSON.stringify(o)), a && a.ad_type && a.ad_id && this.ad_param && this.ad_instance) && (t.prototype.on_close.call(this, a, o), 
o && o.isEnded ? (this.ad_param.onClose && this.ad_param.onClose(this.ad_param, {
isEnded: o.isEnded
}), this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onclose, e.e_ad_video_close.complete, "", this.ad_param.ad_scene, "0", this.ad_op)) : (this.ad_param.onClose && this.ad_param.onClose(this.ad_param, {
isEnded: !1
}), this.send_dot(this.ad_param.ad_pos_id, this.ad_param.ad_type, e.e_ad_event.onclose, e.e_ad_video_close.uncomplete, "", this.ad_param.ad_scene, "0", this.ad_op)), 
this.release());
}, a;
}(e.ad_base);
e.ad_video_wx = t;
}(igc || (igc = {})), function(e) {
!function(e) {
e[e.video_click = 10006] = "video_click", e[e.video_compelete = 10010] = "video_compelete", 
e[e.video_uncompelete = 10011] = "video_uncompelete", e[e.native_inner_interstitial_click = 10012] = "native_inner_interstitial_click", 
e[e.native_interstitial_click = 10013] = "native_interstitial_click", e[e.native_banner_click = 10014] = "native_banner_click", 
e[e.multual_push_show = 305] = "multual_push_show", e[e.multual_push_click = 304] = "multual_push_click";
}(e.igc_stat_ids || (e.igc_stat_ids = {}));
}(igc || (igc = {})), function(e) {
var t = function() {
function t() {
this._user_id = "", this._server_id = "1", this._osInfo = "", this._account = "", 
this._opInfo = "", this._device_id = "", this.src_app_id = "0", this._ad_id = "0", 
this._sub_channel_type = "", this._scene_id = "";
}
return Object.defineProperty(t, "instance", {
get: function() {
return t._instances || (t._instances = new this()), t._instances;
},
enumerable: !1,
configurable: !0
}), t.prototype.init = function() {
if (window.qg) {
var a = window.qg.getSystemInfoSync();
t.instance._osInfo = a.platformVersion + "", t.instance._opInfo = a.model || "";
}
if (this._device_id = localStorage.getItem("igc_device_id"), this._device_id || (this._device_id = t.instance.get_random_name(), 
localStorage.setItem("igc_device_id", this._device_id)), e.igc_main.instance.app_config.game_param.channel_type != e.e_channel_type.web) {
var o = e.igc_main.instance.get_launch_options_sync();
o && o.referrerInfo && (void 0 !== o.referrerInfo.src_app_id && (this.src_app_id = o.query.src_app_id), 
e.igc_main.instance.app_config.game_param.channel_type === e.e_channel_type.qq && (o && o.scene && (this._scene_id = o.scene + ""), 
o && o.query && o.query.via && (this._sub_channel_type = o.query.via, console.log("stat_manager 手q的渠道场景为", this._sub_channel_type))));
}
if (e.igc_main.instance.app_config.game_param.channel_type === e.e_channel_type.wx) {
var n = window.wx.getLaunchOptionsSync();
n && n.scene && (this._scene_id = n.scene + "", console.log("stat_manager wx的渠道场景为：", this._scene_id)), 
n && n.referrerInfo && n.referrerInfo.appId && (this._sub_channel_type = n.referrerInfo.appId + "", 
console.log("stat_manager wx的渠道来源信息：", this._sub_channel_type));
}
}, t.prototype.get_random_name = function() {
for (var e = "role_", t = [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" ], a = 0; a < 8; a++) e += t[Math.round(Math.random() * (t.length - 1))];
return (e += "_") + Date.now();
}, t.prototype.set_uid = function(e, a, o) {
t.instance._account = e + "", t.instance._user_id = a + "", t.instance._server_id = o + "";
}, t.prototype.get_common_info = function() {
var a = t.instance._server_id + "";
return e.igc_main.instance.app_config.game_param.channel_type !== e.e_channel_type.qq && e.igc_main.instance.app_config.game_param.channel_type !== e.e_channel_type.wx || (a = this._scene_id), 
{
account: t.instance._account + "",
deviceId: t.instance._device_id,
userId: t.instance._user_id + "",
serverId: a,
acType: 0,
net: t.instance._sub_channel_type + ""
};
}, t.prototype.send_app_start = function() {
if (e.igc_main.instance.app_config.game_param.channel_type !== e.e_channel_type.web) if (e.igc_main.instance.app_config.game_param.stat_key && "" != e.igc_main.instance.app_config.game_param.stat_key) {
var a = t.instance.get_common_info();
"" != this._osInfo && (a.opInfo = this._osInfo + ""), "" != this._opInfo && (a.osInfo = this._opInfo + ""), 
e.igc_main.instance.app_config.game_param.channel_type === e.e_channel_type.apk ? a.extra = this._ad_id : a.extra = this.src_app_id, 
e.igc_main.instance.tpf_sdk.getStat().sendAppStart(a, 0), console.log("stat_manager send_app_start ");
} else console.error("igc----- stat_key is null");
}, t.prototype.get_server_time = function() {
return 0;
}, t.prototype.send_user_register = function() {
if (e.igc_main.instance.app_config.game_param.channel_type !== e.e_channel_type.web) if (e.igc_main.instance.app_config.game_param.stat_key && "" != e.igc_main.instance.app_config.game_param.stat_key) {
var a = t.instance.get_common_info();
"" != this._osInfo && (a.osInfo = this._osInfo + ""), "" != this._opInfo && (a.opInfo = this._opInfo + ""), 
e.igc_main.instance.app_config.game_param.channel_type === e.e_channel_type.apk ? a.extra = this._ad_id : a.extra = this.src_app_id, 
e.igc_main.instance.tpf_sdk.getStat().sendUserRegister(a, this.get_server_time()), 
console.log("stat_manager send_user_register ");
} else console.error("igc----- stat_key is null");
}, t.prototype.send_user_login = function() {
if (e.igc_main.instance.app_config.game_param.channel_type !== e.e_channel_type.web) if (e.igc_main.instance.app_config.game_param.stat_key && "" != e.igc_main.instance.app_config.game_param.stat_key) {
var a = t.instance.get_common_info();
a.type = 0, "" != this._osInfo && (a.osInfo = this._osInfo + ""), "" != this._opInfo && (a.opInfo = this._opInfo + ""), 
e.igc_main.instance.app_config.game_param.channel_type === e.e_channel_type.apk ? a.extra = this._ad_id : a.extra = this.src_app_id, 
e.igc_main.instance.tpf_sdk.getStat().sendUserLogin(a, this.get_server_time()), 
console.log("stat_manager send_user_login ");
} else console.error("igc----- stat_key is null");
}, t.prototype.send_heart_beat = function() {
e.igc_main.instance.app_config.game_param.channel_type !== e.e_channel_type.web && (e.igc_main.instance.app_config.game_param.stat_key && "" != e.igc_main.instance.app_config.game_param.stat_key || console.error("igc----- stat_key is null"));
}, t.prototype.send_user_event = function(a, o, n, _, i, s, d, r, c) {
if (e.igc_main.instance.app_config.game_param.channel_type !== e.e_channel_type.web) if (e.igc_main.instance.app_config.game_param.stat_key && "" != e.igc_main.instance.app_config.game_param.stat_key) {
var p = t.instance.get_common_info();
p.eventId = a + "", p.eventType = o + "", p.placeId = n + "", p.placeType = _ + "", 
void 0 !== i && (p.extra = i + ""), void 0 !== r && (p.extra2 = r), null != s && (p.str1 = s + ""), 
null != d && (p.str2 = d + ""), null != c && (p.str3 = c + ""), e.igc_main.instance.app_config.game_param.channel_type === e.e_channel_type.apk ? p.str4 = this._ad_id : null != this._account && (p.str4 = this._account + ""), 
"" != this._osInfo && (p.osInfo = this._osInfo + ""), "" != this._opInfo && (p.opInfo = this._opInfo + ""), 
e.igc_main.instance.tpf_sdk.getStat().sendUserCustom(p, this.get_server_time());
} else console.error("igc----- stat_key is null");
}, t.prototype.send_place = function() {}, t._instances = void 0, t;
}();
e.stat_manager = t;
}(igc || (igc = {})), function(e) {
var t = function() {
function e() {}
return e.parse_csv = function(e, t) {
if ("" == e) return {};
for (var a = new RegExp('(\\,|\\r?\\n|\\r|^)(?:"([^"]*(?:""[^"]*)*)"|([^"\\,\\r\\n]*))', "gi"), o = [ [] ], n = null; n = a.exec(e); ) {
var _, i = n[1];
i.length && "," !== i && o.push([]);
_ = n[2] ? n[2].replace(new RegExp('""', "g"), '"') : n[3], o[o.length - 1].push(_);
}
var s = {};
if (3 < o.length) {
for (var d = o[1], r = -1, c = 0; c < d.length; ++c) if (d[c] == t) {
r = c;
break;
}
var p = o[2];
for (c = 3; c < o.length; ++c) if (1 !== o[c].length || "" !== o[c][0]) {
var h;
s[h = -1 != r ? o[c][r] : c - 3] = {};
for (var l = 0; l < d.length; ++l) if ("string" == p[l]) s[h][d[l]] = o[c][l] || ""; else if ("int" == p[l]) s[h][d[l]] = parseInt(o[c][l] || 0); else if ("float" == p[l]) s[h][d[l]] = parseFloat(o[c][l] || 0); else if ("boolean" == p[l]) s[h][d[l]] = "TRUE" == o[c][l]; else if ("json" == p[l] && "" != o[c][l]) try {
s[h][d[l]] = JSON.parse(o[c][l]);
} catch (t) {
console.error("parse csv failed", e, h, d[l], o[c][l]);
}
}
}
return s;
}, e.get_random_name = function() {
for (var e = "role_", t = [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" ], a = 0; a < 8; a++) e += t[Math.round(Math.random() * (t.length - 1))];
return (e += "_") + Date.now();
}, e.compare_version = function(e, t) {
if (e == t) return 0;
for (var a = e.split(/[._]/), o = t.split(/[._]/), n = 0, _ = Math.min(a.length, o.length), i = 0; n < _ && 0 == (i = parseInt(a[n]) - parseInt(o[n])); ) n++;
if (0 == i) {
for (var s = n; s < a.length; s++) if (parseInt(a[s]) > 0) return 1;
for (s = n; s < o.length; s++) if (parseInt(o[s]) > 0) return -1;
return 0;
}
return i > 0 ? 1 : -1;
}, e.callJava = function(e, t, a, o) {
if (window.cc) return o ? window.jsb.reflection.callStaticMethod(e, t, a, o) : window.jsb.reflection.callStaticMethod(e, t, a);
if (window.Laya) {
var n = window.conchConfig.getOS();
if (this.bridge || ("Conch-ios" == n ? this.bridge = window.PlatformClass.createClass("JSBridge") : "Conch-android" == n && (this.bridge = window.PlatformClass.createClass("demo.JSBridge"))), 
"Conch-ios" == n) return o ? this.bridge.call(t + ":", o) : this.bridge.call(t);
if ("Conch-android" == n) return o ? this.bridge.call(t, o) : this.bridge.call(t);
}
}, e.bridge = void 0, e;
}();
e.utils_manager = t;
}(igc || (igc = {}));