function isPlaceholder() { return "placeholder"in document.createElement("input") } function placeholderCompatibilityIE9() { $(":input[placeholder]").each(function(t, e) { if (10 === document.documentMode || 11 === document.documentMode) { if ($(this).hasClass("need-repaired-placeholder")) { var i = $(this).attr("placeholder"); $(this).removeAttr("placeholder"), repairedPlaceholder(this, i) } } else repairedPlaceholder(this) }) } function repairedPlaceholder(t, e) { var i, n = $(t), a = n.attr("placeholder") || e, s = n.parent(".placeholder"); if ("none" !== n.css("display")) { if (0 < s.length) { var o = n.position() , r = n.outerHeight() , l = n.css("padding-left") , h = (n.css("padding-top"), n.outerWidth(!0), n.css("text-align")) , d = n.css("font-size") , c = n.css("margin-top") , p = n.css("margin-right") , m = n.css("margin-bottom") , u = n.css("margin-left"); (i = s.find("span")).css({ position: "absolute", left: o.left, top: o.top, height: r, lineHeight: r + "px", paddingLeft: l, "margin-top": c, "margin-right": p, "margin-bottom": m, "margin-left": u, color: "#aaa", zIndex: "100", width: "100%", overflow: "hidden", whiteSpace: "nowrap", "text-align": h || "inherit", "font-size": d }) } else { n.wrap($("
").css({ position: "relative", zoom: "1", border: "none", background: "none", padding: "none", margin: "none" }).addClass("placeholder")); o = n.position(), r = n.outerHeight(), l = n.css("padding-left"), n.css("padding-top"), n.outerWidth(!0), h = n.css("text-align"), d = n.css("font-size"), c = n.css("margin-top"), p = n.css("margin-right"), m = n.css("margin-bottom"), u = n.css("margin-left"); i = $("").text(a).css({ position: "absolute", left: o.left, top: o.top, height: r, lineHeight: r + "px", paddingLeft: l, "margin-top": c, "margin-right": p, "margin-bottom": m, "margin-left": u, color: "#aaa", zIndex: "100", width: "100%", overflow: "hidden", whiteSpace: "nowrap", "text-align": h || "inherit", "font-size": d }).appendTo(n.parent()) } $.trim(n.val()) ? i.hide() : i.show(), n.focusin(function(t) { i.hide() }).focusout(function(t) { n.val() || i.show() }), i.click(function(t) { i.hide(), n.focus() }) } } function iePlaceholderSuppose() { isPlaceholder() && 10 !== document.documentMode && 11 !== document.documentMode || placeholderCompatibilityIE9() } function rebuildRepairedPlaceholder(t, e) { isPlaceholder() && (10 !== document.documentMode && 11 !== document.documentMode || !$(t).hasClass("need-repaired-placeholder")) || repairedPlaceholder(t, e), $(t).parents(".c-datepicker-container").next().hide() } function getObjName() { var t = window.location.href , e = t.indexOf("//"); return e = (t = t.substring(e + 2)).indexOf("/"), t.substring(0, e) } function urlAddhttp(t, e) { var i = getObjName() , n = t.indexOf("//"); return n < 0 ? e + "://" + i + t : e + "://" + (t = t.substring(n + 2)) } window.util = { fAdd: function(t, e) { var i, n, a, s, o, r = ""; try { i = t.toString().split(".")[1].length } catch (t) { i = 0 } try { n = e.toString().split(".")[1].length } catch (t) { n = 0 } a = Math.max(i, n), o = (s = (t = +(+t).toFixed(a).replace(/\./g, "")) + (e = +(+e).toFixed(a).replace(/\./g, "")) + "").length - a, +s < 0 && o--; for (var l = o; l < 0; l++) r += "0"; return 0 === a ? s : o <= 0 && +s < 0 ? "-0." + r + s.replace(/\-/g, "") : o <= 0 && 0 <= +s ? "0." + r + s : 0 < o && +s < 0 ? "-" + (s = s.replace(/\-/, "")).slice(0, o) + "." + s.slice(-a) : 0 < o && 0 <= +s ? s.slice(0, o) + "." + s.slice(-a) : void 0 }, fSubtract: function(t, e) { var i, n, a, s, o, r = ""; try { i = t.toString().split(".")[1].length } catch (t) { i = 0 } try { n = e.toString().split(".")[1].length } catch (t) { n = 0 } a = Math.max(i, n), o = (s = (t = +(+t).toFixed(a).replace(/\./g, "")) - (e = +(+e).toFixed(a).replace(/\./g, "")) + "").length - a, +s < 0 && o--; for (var l = o; l < 0; l++) r += "0"; return 0 === a ? s : o <= 0 && +s < 0 ? "-0." + r + s.replace(/\-/g, "") : o <= 0 && 0 <= +s ? "0." + r + s : 0 < o && +s < 0 ? "-" + (s = s.replace(/\-/, "")).slice(0, o) + "." + s.slice(-a) : 0 < o && 0 <= +s ? s.slice(0, o) + "." + s.slice(-a) : void 0 }, fRemainder: function(t, e) { var i, n, a; t += ""; var s = /\./ , o = ""; i = s.test(t) ? t.split(".")[1].length : 0; for (var r = a = (n = +t.replace(s, "") % e + "").length - i; r < 0; r++) o += "0"; return 0 === i ? n : a <= 0 ? "0." + o + n : n.slice(0, a) + "." + n.slice(-i) }, fDiv: function(t, e, i) { var n; i = i || 2; try { t.toString().split(".")[1].length } catch (t) { 0 } try { e.toString().split(".")[1].length } catch (t) { 0 } return t = +(+t).toFixed(i).replace(/\./g, ""), e = +(+e).toFixed(i).replace(/\./g, ""), /\./.test(n = t / e + "") ? n.toFixed(i) : n }, getQueryString: function(t) { var e = new RegExp("(^|&)" + t + "=([^&]*)(&|$)") , i = window.location.search.substr(1).match(e); return null != i ? $.trim(decodeURI(i[2]).toString().replace(/<[^>]+>/g, "")) : null }, getHashString: function(t) { var e = new RegExp("(^|&)" + t + "=([^&]*)(&|$)") , i = window.location.hash.substr(1).match(e); return null != i ? $.trim(decodeURI(i[2]).toString().replace(/<[^>]+>/g, "")) : null }, getObjectbyId: function(t, e, i) { for (var n in i) if (i[n][t] == e) return i[n] }, getTextidByCode: function(t, e, i, n) { return this.getObjectbyId(t, e, i)[n] }, getDevice: function() { var t = navigator.userAgent , e = /(?:Windows Phone)/.test(t) , i = /(?:SymbianOS)/.test(t) || e , n = /(?:Android)/.test(t) , a = /(?:Firefox)/.test(t) , s = /(?:Chrome|CriOs)/.test(t) , o = /(?:iPad|PlayBook)/.test(t) || n && !/(?:Mobile)/.test(t) || a && /(?:Tablet)/.test(t) , r = /(?:iPhone)/.test(t) && !o; return { isWindowsPhone: e, isSymbian: i, isAndroid: n, isFireFox: a, isChrome: s, isTablet: o, isPhone: r, isPc: !(r || n || i || o) } }, toThousands: function(t, e) { return (t = e ? (t || 0).toFixed(e).split(".") : (t || 0).toString().split("."))[0].replace(/(\d)(?=(?:\d{3})+$)/g, "$1,") + (t[1] ? "." + t[1] : "") }, toSlice: function(t, e) { if ("number" != typeof e) throw Error(e + " needed be a number"); if (e < 0) throw Error(e + " needed be a positive number "); var i = String(t) , n = i.indexOf("."); return n < 0 ? t.toFixed(e) : e - i.split(".")[1].length <= 0 ? i.slice(0, n + 1 + e) : t.toFixed(e) }, isEnglish: function() { return "English" === this.getOtherSite() || "enydyl" === this.getOtherSite() || "enSzhk" === this.getOtherSite() || "enqfii" === this.getOtherSite() }, isNeedTrueHQData: function() { return "option" === this.getOtherSite() }, getOtherSite: function() { var t = window.location.protocol + "//" + window.location.host , e = window.location.href , i = e.indexOf(e) + t.length + 1; return -1 < e.indexOf("big5.szse.cn") && (i += 9, i = (e = e.substring(i)).indexOf("/") + 1), 0 < (i = (e = e.substring(i)).indexOf("/")) && (e = e.substring(0, i)), e }, handleDocHref: function(t, e, i, n, a) { var s = ""; "disclosure" === t ? "html" != e && "pdf" != e ? s = /txt|bmp|gif|jpeg|jpg|png|xml/i.test(e) ? (i = i.replace(/\/download?/, ""), "_blank") : "_self" : "pdf" !== e && "html" !== e || (i = a.isBond ? pathObj.bond_domain_path_http + "/disclosure/bizanno/pubinfoanno/notice/index.html?" + n : a.isLefu ? pathObj.lefu_domain_path_http + "/disclosure/notice/index.html?" + n : pathObj.main_domain_path_http + "/disclosure/listed/bulletinDetail/index.html?" + n, s = "_blank") : s = /html|pdf|txt|bmp|gif|jpeg|jpg|png|xml|link/i.test(e) ? (i = i.replace(/\/download?/, ""), "_blank") : "_self"; return { href: i, openType: s } } }, window.fnDebounce = function(t, e, i) { var n, a; switch (typeof e) { case "number": n = e, a = i || "leading"; break; case "string": n = 250, a = e; break; default: n = 250, a = "leading" } var s = "leading" === a ? { leading: !0, trailing: !1 } : { leading: !1, trailing: !0 }; return _.debounce(t, n, s) } , function() { "use strict"; var i, n; Jx().package("s.ui.controls", function(t) { var i = 0 , e = { position: "auto", minDate: "1900-01-01", maxDate: "2099-12-31", format: "YYYY/MM/DD", connector: "~", dayRange: [0, 6], firstDay: 0, onSelected: function() {} }; this.Weekpicker = new t.Class({ extend: s.ui.BaseControl },{ defaults: e, attributeMap: { minDate: "min-date", maxDate: "max-date", format: "format", connector: "connector", firstDay: "first-day", position: "position", name: "name", dayRange: "day-range" }, settings: {}, value: "", data: {}, templates: {}, init: function(t, e) { this.element = $(t), this.element.data("initialized") || (this.element.data("initialized", !0), i += 1, this.element.data("plugin-id", i), this.initSettings(e), this.buildHtml(), this.initElements(), this.initParams(), this.buildYearMonth(), this.transferAttributes(), this.bindEvents()) }, initParams: function() { this.calendar = {}, 0 != this.settings.firstDay && (this.settings.firstDay = 1), "string" == typeof this.settings.minDate && (this.settings.minDate = moment(this.settings.minDate, this.settings.format)), "string" == typeof this.settings.maxDate && (this.settings.maxDate = moment(this.settings.maxDate, this.settings.format)), "object" == typeof this.settings.minDate && (this.settings.minDate = moment(this.settings.minDate)), "object" == typeof this.settings.maxDate && (this.settings.maxDate = moment(this.settings.maxDate)), this.settings.minDate && (this.settings.minYear = moment(this.settings.minDate).year()), this.settings.maxDate && (this.settings.maxYear = moment(this.settings.maxDate).year()) }, buildHtml: function() { var t = this.element.data("plugin-id") , e = '
'; this.container = $(e), this.element.before(this.container), this.container.prepend(this.element), this.element.attr("data-s-dropdown-id", "#c-weekpicker-menu-" + t), this.element.is("input") && this.element.attr("autocomplete", "off") }, initElements: function() { this.elements = { view: this.element, weekpicker: this.container, menu: $(".weekpicker", this.container), icon: $(".glyphicon-calendar", this.container), prev: $(".weekpicker-control .icon-prev", this.container), next: $(".weekpicker-control .icon-next", this.container), calendarYear: $(".calendar-year", this.container), showYear: $(".calendar-year .btn-container span", this.container), showYearBtn: $(".calendar-year .btn-container", this.container), calendarYears: $(".calendar-year .calendar-years", this.container), calendarMonth: $(".calendar-month", this.container), showMonth: $(".calendar-month .btn-container span", this.container), showMonthBtn: $(".calendar-month .btn-container", this.container), calendarMonths: $(".calendar-month .calendar-months", this.container), calendarWeeks: $(".calendar-weeks", this.container) }; var t = this.elements.view.data("plugin-id"); this.dropdown = new s.ui.controls.Dropdown(this.elements.view,{ _pluginId: t }), this.dropdown1 = new s.ui.controls.Dropdown(this.elements.icon,{ _pluginId: t }) }, bindEvents: function() { this.elements.menu.on("click", this.preventDefault), this.elements.view.on("focus", $.proxy(this.debounce(this.focus), this)), this.elements.showYearBtn.on("click", $.proxy(this.showPanel, this, "year")), this.elements.showMonthBtn.on("click", $.proxy(this.showPanel, this, "month")), this.elements.calendarYear.on("click", "li", $.proxy(this.yearChanged, this)), this.elements.calendarMonth.on("click", "li", $.proxy(this.monthChanged, this)), this.elements.calendarWeeks.on("click", "li", $.proxy(this.clickWeek, this)), this.elements.view.on("keyup", $.proxy(this.debounce(this.keyup, 900), this)), this.elements.view.on("onSelected", $.proxy(this.settings.onSelected, this)), this.elements.prev.on("click", $.proxy(this.clickPrev, this)), this.elements.next.on("click", $.proxy(this.clickNext, this)) }, buildYearMonth: function() { for (var t = '", this.elements.calendarMonths.html(t); for (var i = this.settings.maxYear, n = '", this.elements.calendarYears.html(n), this.autoCurrentDate() }, transferAttributes: function() { this.element.prop("disabled") && this.disable() }, preventDefault: function(t) { t.preventDefault(), t.stopPropagation() }, debounce: function(t, e) { return function(n, a, t) { var s, o, r, l, h, d, c, p, m, u = 0, f = !0; if ("function" != typeof n) throw new TypeError(""); function e(t, e) { e && clearTimeout(e), o = d = c = void 0, t && (u = Date.now(), r = n.apply(h, s), d || o || (s = h = void 0)) } function g() { var t = a - (Date.now() - l); t <= 0 || a < t ? e(c, o) : d = setTimeout(g, t) } function w() { e(f, d) } function i() { if (s = arguments, l = Date.now(), h = this, c = f && (d || !p), !1 === m) var t = p && !d; else { o || p || (u = l); var e = m - (l - u) , i = e <= 0 || m < e; i ? (o = o && clearTimeout(o), u = l, r = n.apply(h, s)) : o = o || setTimeout(w, e) } return i && d ? d = clearTimeout(d) : d || a === m || (d = setTimeout(g, a)), t && (i = !0, r = n.apply(h, s)), !i || d || o || (s = h = void 0), r } return a = a < 0 ? 0 : +a || 0, p = !!t.leading, m = "maxWait"in t && nativeMax(+t.maxWait || 0, a), f = "trailing"in t ? !!t.trailing : f, i.cancel = function() { d && clearTimeout(d), o && clearTimeout(o), o = d = c = void (u = 0) } , i }(t, e = e || 200, { leading: !1, trailing: !0 }) }, focus: function() { this.elements.calendarYears.hide(), this.elements.calendarMonths.hide(), this.elements.calendarYear.removeClass("active"), this.elements.calendarMonth.removeClass("active"), this.renderWeeks() }, getBetweenMaxMinDate: function(t) { return this.settings.minDate && t.isBefore(this.settings.minDate) && (t = this.settings.minDate.clone()), this.settings.maxDate && t.isAfter(this.settings.maxDate) && (t = this.settings.maxDate.clone()), t }, autoCurrentDate: function() { var t = this.getBetweenMaxMinDate(moment()); this.calendar.currentDate = t, this.renderWeeks() }, setDate: function(t) { var e; t ? ("string" == typeof t ? e = moment(t, "YYYYMMDD") : "object" == typeof t && (e = moment(t)), this.calendar.selectedDate = this.getBetweenMaxMinDate(e), this.calendar.currentDate = this.calendar.selectedDate.clone()) : this.calendar.selectedDate = null, this.renderWeeks() }, renderWeeks: function() { this.setMomentWeek(), this.setViewValue(), this.setActiveYear(), this.setActiveMonth(), this.setPrevNextBtn(); for (var t = this.calendar, e = t.currentDate.year(), i = t.currentDate.month(), n = moment([e, i]).daysInMonth(), a = moment([e, i, 1]), s = moment([e, i, n]), o = a.clone().endOf("week"), r = this.getDateTextOfWeek(t.selectedDate, e, i), l = []; o.isBefore(s); ) { var h = this.getBetweenMaxMinDate(a.clone().startOf("week")); o = this.getBetweenMaxMinDate(a.clone().endOf("week")), a.add(7, "days"); var d = h.clone().day(this.settings.dayRange[0]) , c = o.clone().day(this.settings.dayRange[1]); l.push([d, c]) } for (var p = '", this.elements.calendarWeeks.html(p), this.removeMomentWeek() }, getWeekRange: function(t) { return t[0].format(this.settings.format) + " " + this.settings.connector + " " + t[1].format(this.settings.format) }, getDateTextOfWeek: function(t, e, i) { if (!t) return null; var n, a = this.settings.format, s = moment(t.format(a), a).clone().startOf("week"), o = s.year(), r = s.month(); return o === e && r === i ? n = s.format("YYYYMMDD") : (o < e || r < i) && (n = s.clone().add(7, "days").startOf("month").format("YYYYMMDD")), n }, getFistDayOfWeekText: function(t) { if (!t) return null; var e = t.format(this.settings.format); return moment(e, this.settings.format).startOf("week").format("YYYYMMDD") }, setMomentWeek: function() { this.settings.momentLang = moment.locale(); var t = 0 == this.settings.firstDay ? { week: { dow: 0, doy: 6 } } : { week: { dow: 1, doy: 4 } }; moment.locale("my-week", t) }, removeMomentWeek: function() { moment.locale(this.settings.momentLang) }, setActiveYear: function() { var t = this.calendar.currentDate.year(); this.elements.showYear.text(t), this.elements.calendarYears.find("li[data-value=" + t + "]").addClass("active").siblings().removeClass("active") }, setActiveMonth: function() { var t = this.calendar.currentDate.month() + 1; this.elements.showMonth.text(t), this.elements.calendarMonths.find("li[data-value=" + t + "]").addClass("active").siblings().removeClass("active") }, setViewValue: function() { var t = this.calendar.selectedDate , e = ""; this.settings.format; t && (e = t.clone().locale("my-week").endOf("week").format("YYYY年第w周")); this.elements.view.val(e) }, showPanel: function(t, e) { e.preventDefault(), e.stopPropagation(), this.elements.calendarYears.hide(), this.elements.calendarMonths.hide(); var i = ""; if (this.elements.calendarYear.hasClass("active") && (this.elements.calendarYear.removeClass("active"), i = "year"), this.elements.calendarMonth.hasClass("active") && (this.elements.calendarMonth.removeClass("active"), i = "month"), i != t) { var n = this.calendar , a = n.currentDate.month() , s = n.currentDate.year() - (this.scrollerMinYear || this.settings.minDate && this.settings.minDate.year() || this.settings.minYear) - 4; s < 0 && (s = 0), s *= 26; var o = a - 3; switch (o < 0 && (o = 0), o *= 26, t) { case "year": this.elements.calendarYears.show(), this.elements.calendarYear.addClass("active"), this.elements.calendarYears.scrollTop(s); break; case "month": this.elements.calendarMonths.show(), this.elements.calendarMonth.addClass("active"), this.elements.calendarMonths.scrollTop(o) } } }, yearChanged: function(t) { var e = $(t.target) , i = +e.attr("data-value"); this.calendar.currentDate.year(i), this.elements.showYear.text(i), e.addClass("active").siblings().removeClass("active"), this.elements.calendarYear.removeClass("active"), this.elements.calendarYears.hide(), this.renderWeeks() }, monthChanged: function(t) { var e = $(t.target) , i = +e.attr("data-value") - 1; this.calendar.currentDate.month(i), this.elements.showMonth.text(i), e.addClass("active").siblings().removeClass("active"), this.elements.calendarMonth.removeClass("active"), this.elements.calendarMonths.hide(), this.renderWeeks() }, clickWeek: function(t) { var e = $(t.currentTarget).data("value") + ""; this.setDate(e), this.elements.view.trigger("onSelected", this.getValue()), this.hide() }, formatValue: function(t) { this.setMomentWeek(); var e, i = this.settings.format; if (moment.isDate(t)) e = moment(t); else if ("number" == typeof t || /^\d{9,}$/g.test(t)) e = moment(new Date(+t)); else if ("string" == typeof t) { (e = t.match(/\d+/g).length < 3 ? moment(t, "YYYYww") : moment(t, i)).isValid || (e = moment.format(t, "YYYYMMDD")) } return e.isValid() || (e = null), this.removeMomentWeek(), e }, blur: function(t) { var e, i = $.trim(this.elements.view.val()); i && (e = this.formatValue(i)), this.setDate(e) }, keyup: function(t) { if (!(-1 < $.inArray(t.keyCode, [40, 39, 38, 37, 9, 13, 27]))) { var e, i = $.trim(this.elements.view.val()); i && (e = this.formatValue(i)), this.setDate(e) } }, setValue: function(t) { if (t) { var e = this.formatValue(t); this.setDate(e) } else this.setDate() }, getValue: function() { this.setMomentWeek(); var t = this.calendar.selectedDate , e = this.settings.format , i = "" , n = "" , a = ""; if (t) i = (t = moment(t.format(e), e)).clone().startOf("week").format(e), n = t.clone().endOf("week").format(e), a = t.clone().endOf("week").format("YYYY/ww"); return this.removeMomentWeek(), { range: [i, n], week: a } }, clickPrev: function(t) { this.elements.prev.hasClass("disabled") || (this.calendar.currentDate.subtract(1, "month"), this.renderWeeks()) }, clickNext: function(t) { this.elements.next.hasClass("disabled") || (this.calendar.currentDate.add(1, "month"), this.renderWeeks()) }, setPrevNextBtn: function() { var t = this.calendar.currentDate.year() , e = this.calendar.currentDate.month(); t === this.settings.minYear && 0 === e ? this.elements.prev.addClass("disabled") : t === this.settings.maxYear && 11 === e ? this.elements.next.addClass("disabled") : (this.elements.prev.removeClass("disabled"), this.elements.next.removeClass("disabled")) }, show: function() { this.container.addClass("open") }, hide: function() { this.container.removeClass("open") }, refresh: function() {}, enable: function() { this.elements.view.prop("disabled", !1), this.elements.icon.removeClass("disabled"), this.container.removeClass("disabled") }, disable: function() { this.elements.view.prop("disabled", !0), this.elements.icon.addClass("disabled"), this.container.addClass("disabled") }, destroy: function() {}, getApi: function() { return s.utilities.buildApi(this, { setValue: "setValue", getValue: "getValue" }) } }) }), i = jQuery, n = s.ui.controls.Weekpicker, i.fn.weekpicker = function(e) { return this.each(function() { var t = i(this); t.data("plugin-ref") && t.data("plugin-ref").destroy(), t.data("plugin-ref", new n(this,i.extend(!0, {}, e))) }), this } }(), isPlaceholder() && 10 !== document.documentMode && 11 !== document.documentMode || placeholderCompatibilityIE9(), Jx().package("s.ui.controls", function(t) { "use strict"; function e() {} function a(t, e) { for (var i = 0; i < o.length; i++) { var n = $("." + o[i]).parent(); n.hasClass("open") && ("close" !== e && t && "click" == t.type && (/input|textarea/i.test(t.target.tagName) || $(t.target).parent().hasClass("group-title") || $(t.target).hasClass("group-title") || $(t.target).hasClass("searchhint-list")) && $.contains(n[0], t.target) || n.removeClass("open")) } } var i = 0 , n = { items: 8, delay: 0, location: "location", zIndex: 900, matchMinLength: 0, isHighlight: !0, isParentWidth: !1, listHeight: "auto", onSelected: e, onChanged: e, onShowed: e } , o = []; this.searchHint = new t.Class({ extend: s.ui.BaseControl },{ defaults: n, attributeMap: {}, init: function(t, e) { this.element = $(t), this.container = this.element.parent(), this.elements = {}, this.elements.view = this.element, this.element.data("initialized") || (this.element.data("initialized", !0), i += 1, this.element.data("plugin-id", i), o.push("searchhint-list-" + this.element.data("plugin-id")), this.initSettings(e), this.settings.parentWrap && (this.container = $(this.settings.parentWrap)), this.map = this.settings.map, "string" == typeof this.settings.map && "" !== this.settings.map && (this.map = JSON.parse(this.settings.map)), this.buildHtml(), this.bindEvents()) }, buildHtml: function() { var t = $('
') , e = this.element.outerWidth() , i = this.element.outerHeight(); this.settings.isParentWidth && (e = this.container.outerWidth(), i = this.container.outerHeight()); var n = { position: "absolute" }; "location" === this.settings.location && $.extend(n, { width: e, top: i, left: 0, "z-index": this.settings.zIndex }), t.css(n), this.container.addClass("sh-searchhint-container").append(t), this.elements.listWrap = this.container.css("position", "relative").find(".searchhint-list") }, bindEvents: function() { this.elements.view.on({ keyup: $.proxy(this.keyup, this), keydown: $.proxy(this.tabkey, this), focus: $.proxy(this.focus, this) }), (!document.documentMode || document.documentMode && 10 !== document.documentMode) && this.elements.view.on("input", $.proxy(this.input, this)), this.elements.listWrap.on("click", "li", $.proxy(this.click, this)), this.elements.listWrap.on("click", ".searchHintCusBond", $.proxy(this.addCusBond, this)), this.elements.view.on("onSelected", $.proxy(this.settings.onSelected, this)), this.elements.view.on("onChanged", $.proxy(this.settings.onChanged, this)), this.elements.view.on("onShowed", $.proxy(this.settings.onShowed, this)), this.adjustWindow() }, tabkey: function(t) { 9 === t.keyCode && a() }, keyup: function(t) { window.event ? window.event.returnValue = !1 : t.preventDefault(), 9 === document.documentMode && (8 !== t.keyCode && 46 !== t.keyCode || this.input(), t.ctrlKey && 88 === t.keyCode && this.input()), -1 === $.inArray(t.keyCode, [40, 38, 39, 37, 13, 9]) && this.elements.view.val().length >= this.settings.matchMinLength ? 10 === document.documentMode && this.input() : this.move(t) }, focus: function() { this.lookup() }, input: function() { this.lookup(), this.isFistRender = !1 }, move: function(t) { switch (t.keyCode) { case 9: a(); break; case 38: if (t.shiftKey) return; t.preventDefault(), this.prev(); break; case 40: if (t.shiftKey) return; t.preventDefault(), this.next(); break; case 13: var e = this.elements.listWrap.find("ul > li.hover") , i = this.keyword; if (this.isNeedMatchSelectedNode = !1, 0 < e.length) { this.isNeedMatchSelectedNode = !0, i = e.data("keyword"); var n = e.data("url"); n && (i = n) } this.select(t, i), this.elements.view.blur() } }, prev: function() { var t = this.elements.listWrap.find("ul > li.hover") , e = ""; if (0 < t.length) { var i = t.removeClass("hover").prev(); i.hasClass("group-title") && (i = i.prev()), e = 0 < i.length ? (i.addClass("hover"), i.data("keyword")) : this.keyword } else { var n = this.elements.listWrap.find("ul > li:not(.group-title):last"); n.addClass("hover"), e = n.data("keyword") } e = e || this.keyword, this.elements.view.val(e) }, next: function() { var t = this.elements.listWrap.find("ul > li.hover") , e = ""; if (0 < t.length) { var i = t.removeClass("hover").next(); i.hasClass("group-title") && (i = i.next()), e = 0 < i.length ? (i.addClass("hover"), i.data("keyword")) : this.keyword } else { var n = this.elements.listWrap.find("ul > li:not(.group-title):first"); n.addClass("hover"), e = n.data("keyword") } e = e || this.keyword, this.elements.view.val(e) }, lookup: function() { this.keyword = this.elements.view.val() || ""; var t = $.proxy(function() { $.isFunction(this.settings.source) && this.settings.source(this.keyword, $.proxy(this.process, this)) }, this); this.elements.view.trigger("onChanged", this.keyword), clearTimeout(e); var e = setTimeout(t, this.settings.delay) }, process: function(t) { t && $.isArray(t) && (this.data = t, "all" === this.settings.itmes ? this.render(this.data) : this.render(this.data.slice(0, this.settings.items))) }, render: function(t) { var i = this , e = this.elements.listWrap; if (t.length < 1) this.hideListWrap(); else { if ($.isFunction(this.settings.render)) { var n = this.settings.render(t); e.find("ul").empty().html(n) } else { var a, s, o = document.createDocumentFragment(); t.forEach(function(t, e) { a = $("
  • ", { "data-keyword": t[i.map.value], html: i.settings.isHighlight ? i.highlighter(t[i.map.text]) : t[i.map.text] }), s = $('
    自选
    '), t.isOptional && a.prepend(s), o.appendChild(a.get(0)) }), e.find("ul").empty().append(o) } this.showListWrap(), this.elements.view.trigger("onShowed", [this.elements.listWrap]), this.setDyListHeight(), this.hover() } }, hover: function() { var t = this; this.elements.listWrap.find("ul > li:not(.group-title)").hover(function() { t.elements.listWrap.find("ul > li").removeClass("hover"), $(this).addClass("hover") }, function() { $(this).removeClass("hover") }) }, click: function(t) { var e = this.elements.listWrap.find("ul > li.hover"); if (this.isNeedMatchSelectedNode = !1, 0 !== e.length) { this.isNeedMatchSelectedNode = !0; var i = e.data("keyword") , n = e.data("doctype") ? e.data("doctype").toLowerCase() : "" , a = e.data("url"); a ? this.select(t, a, n, a) : i && (this.elements.view.val(i), this.select(t, i)) } }, addCusBond: function(t) { var e = $(t.currentTarget).parent("li").data("code"); return $.isFunction(this.settings.addCusBond) && this.settings.addCusBond(t, e), !1 }, select: function(t, e, i, n) { if (this.keyword = $.trim(e), this.hideListWrap(), "link" == i) { var a = n.replace(/\/download\//, "/"); if ("http:" == window.location.protocol) { a = a.replace(/(http:(\/\/)(.*))\.static((\.szse\.cn)(:\d+)?(.*))/, "http:$2$3$5$7") } if (IEVersion() <= 10 && 0 < IEVersion()) { var s = window.location.protocol; -1 < window.location.href.indexOf(pathObj.main_domain_path) ? a = s + "//" + pathObj.main_domain_path + a.substring(pathObj.disc_file_path.length) : -1 < window.location.href.indexOf(pathObj.bond_domain_path) ? a = s + "//" + pathObj.bond_domain_path + a.substring(pathObj.disc_file_path.length) : -1 < window.location.href.indexOf(pathObj.lefu_domain_path) && (a = s + "//" + pathObj.lefu_domain_path + a.substring(pathObj.disc_file_path.length)) } var o = window.open(); return $.ajax({ url: a + "?v=" + Date.now(), type: "GET", async: !1, success: function(t) { var e = t.toLowerCase(); o.location.href = /^http?:\/\/(.*)/.test(e) ? t : "http://" + t } }), !1 } this.elements.view.trigger("onSelected", [this.keyword, this.selectedNode(e)]) }, selectedNode: function(e) { var i = this , n = {}; if (!this.isNeedMatchSelectedNode || !this.data) return n; var a = function(t) { return e === t[i.map.value] ? (n = t, !1) : !t.options || t.options.every(a) }; return this.data.every(a), n }, adjustWindow: function() { var n = this; $(window).on("resize", fnDebounce(function() { if (n.isShow) { var t = n.element.outerWidth() , e = n.element.outerHeight(); n.settings.isParentWidth && (t = n.container.outerWidth(), e = n.container.outerHeight()); var i = { position: "absolute" }; "location" === n.settings.location && $.extend(i, { width: t, top: e, left: 0, "z-index": n.settings.zIndex }), n.elements.listWrap.css(i), n.setDyListHeight() } }, 100, "trailing")) }, highlighter: function(t, e) { var i = $("
    ") , n = this.keyword; if (!n) return t; var a, s, o, r, l, h = t.toLowerCase().indexOf(n.toLowerCase()); for (a = n.length; -1 < h; ) s = t.substr(0, h), o = t.substr(h, a), r = t.substr(h + a), l = this.settings.highlighterCustom ? $(this.settings.highlighterCustom).text(o) : $("").text(o), i.append(document.createTextNode(s)).append(l), h = (t = r).toLowerCase().indexOf(n.toLowerCase()); return i.append(document.createTextNode(t)).html() }, showListWrap: function() { this.container.addClass("open"), this.isShow = !0 }, hideListWrap: function() { this.container.removeClass("open"), this.isShow = !1 }, setDyListHeight: function() { if ("dynamic" === this.settings.listHeight) { var t = this.elements.listWrap.get(0) , e = t.getBoundingClientRect() , i = e.height - t.clientHeight + t.scrollHeight , n = e.top , a = window.innerHeight; a < i + n ? this.elements.listWrap.css("height", a - n) : this.elements.listWrap.css("height", "auto") } } }); var r = window.navigator.userAgent; -1 < r.indexOf("Safari") && r.indexOf("Chrome") < 1 && /application\/search/.test(location.href) ? $(".search-body").on("click.close.list", a) : $(document).on("click.close.list", a) }), Jx().package("s.ui.controls", function(t) { "use strict"; var i = 0; this.Loading = new t.Class({ extend: s.ui.BaseControl },{ defaults: { loadingText: "loading", maskedTarget: "", maskedHeight: "", delayedTime: "", showIframe: !1, htmlReg: /]*>[\s\S]*<\/html>/g, urlReg: /^http(s)?:\/\// }, attributeMap: { loadingText: "loading-text", maskedTarget: "masked-target", maskedHeight: "masked-height", delayedTime: "delayed-Time" }, init: function(t, e) { this.element = $(t), this.element.data("initialized") || (this.element.data("initialized", !0), i += 1, this.element.data("plugin-id", i), this.initSettings(e), this.buildHtml(), this.initElements()) }, buildHtml: function() { var t = '

    ' + this.settings.loadingText + "

    "; this.overlay = $(t) }, initElements: function() { this.elements = { target: $(this.settings.maskedTarget), spinner: this.overlay.find(".c-loading-spinner"), iframe: this.overlay.find(".c-loading-iframe") } }, start: function() { this.elements.spinner.removeClass("hide"), this.settings.showIframe = !1, this.elements.target.addClass("c-loading"), this.elements.target.data("loading-overlay") || this.elements.target.prepend(this.overlay).data("loading-overlay", !0) }, stop: function(t) { if (this.regTest(t, this.settings.htmlReg) || this.regTest(t, this.settings.urlReg)) if (this.settings.maskedHeight && $(this.elements.target).css({ height: this.settings.maskedHeight + "px", overflow: "hidden" }), this.settings.delayedTime) { var e = this; setTimeout(function() { e.showIframe(t) }, e.settings.delayedTime) } else this.showIframe(t); else this.elements.target.data("loading-overlay", !1), this.elements.target.find(".c-loading-overlay").eq(0).detach(), this.elements.target.hasClass("c-loading") ? this.elements.target.removeClass("c-loading").removeClass("show-maintain") : this.elements.target.find(".c-loading").removeClass("c-loading").removeClass("show-maintain") }, regTest: function(t, e) { return !!t && (e.lastIndex = 0, !!e.test(t)) }, showIframe: function(t) { this.regTest(t, this.settings.htmlReg) ? setTimeout(function() { this.elements.iframe[0].contentWindow.document.write(t) }) : this.elements.iframe.attr("src", t), this.settings.showIframe = !0, this.elements.spinner.addClass("hide"), $(".c-loading .c-loading-overlay").css({ "z-index": 1e3 }), this.settings.maskedHeight || this.elements.target.addClass("show-maintain") } }) }), window.Loading = function(t, e, i) { t.parents("body").find(".loadingBtn").remove(), t.after(''); var n = { loadingText: "loading", maskedTarget: t, maskedHeight: e, delayedTime: i }; return new s.ui.controls.Loading($(".loadingBtn"),n) } , window.ajaxRequest = function(n) { var a = $.Deferred() , t = { type: n.type, url: -1 < n.url.indexOf("?") ? n.url + "&random=" + Math.random() : n.url + "?random=" + Math.random(), dataType: n.dataType || "json", async: !1 !== n.async, data: n.data || {}, contentType: n.contentType || "application/json", cache: n.cache || !0, dataFilter: n.dataFilter || null, beforeSend: function(i) { i.setRequestHeader("X-Request-Type", "ajax"); var t = util.getQueryString("locale"); t && i.setRequestHeader("X-Request-Language", t), n.header && !$.isEmptyObject(n.header) && $.each(n.header, function(t, e) { i.setRequestHeader(t, e) }), n.loadingPlugin && ($.isArray(n.loadingPlugin) ? n.loadingPlugin.forEach(function(t) { t.start() }) : n.loadingPlugin.start()) }, success: function(t) { if ("function" == typeof n.success && -1 == n.success(t)) return; a.resolve(t) }, error: function(t, e, i) { !function(t, e) { var i = t.responseText; e = t.status; if ("string" == typeof i && /^{.*}$/.test(i) && (i = JSON.parse(i)), "500" == e && "100" == i.code) window.location.href = i.loginUrl; else if ("function" == typeof n.error) try { n.error(JSON.parse(t.responseText)) } catch (t) {} }(t, e), a.reject(t) }, complete: function(t) { n.loadingPlugin && (t.responseText && /]*>[\s\S]*<\/html>/g.test(t.responseText) ? -1 < t.responseText.indexOf("50x") && ($.isArray(n.loadingPlugin) ? n.loadingPlugin.forEach(function(t) { t.stop(pathObj.main_domain_path_http + "/maintain/50x_s.html") }) : n.loadingPlugin.stop(pathObj.main_domain_path_http + "/maintain/50x_s.html")) : $.isArray(n.loadingPlugin) ? n.loadingPlugin.forEach(function(t) { t.stop() }) : n.loadingPlugin.stop()) } }; return $.ajax(t), a.promise() } , window.onpageshow = function(t) { (t = t || window.event).persisted && navigator.onLine && window.location.reload() } , function() { var t, e; window.$ctx = (t = window.location.href, e = t.indexOf("//"), e = (t = t.substring(e + 2)).indexOf("/"), (e = (t = t.substring(e + 1)).indexOf("/")) < 0 ? "/" + t : "/" + t.substring(0, e)), window.$typeaheadURL = ""; var i = $(".side-menu-con").find("li > a"); i.next("ul"); i.on("click", function() { var t = $(this); t.toggleClass("dropup"), t.parent("li").toggleClass("active"), t.parent("li").siblings("li").children("a").removeClass("dropup"), t.parent("li").siblings("li").removeClass("active") }) }(), $("img").each(function() { var t = $(this).attr("src"); if ("http:" == window.location.protocol && t) { var e = location.port ? ":" + location.port : ""; t = t.replace(/(http:(\/\/)(.*))\.static((\.szse\.cn)(:\d+)?(.*))/, "http:$2$3$5" + e + "$7"), $(this).attr("src", t) } }), function() { for (var t = $(".item-loginregist a"), e = 0; e < t.length; e++) { var i = $(t[e]); i.html(); i.attr("href", pathObj.main_domain_path_http + "/application/passCenter/pass/") } $(".link-home").attr("href", pathObj.main_domain_path_http), $(".navbar-brand").attr("href", pathObj.main_domain_path_http), $(".itemlink-szse").attr("href", pathObj.main_domain_path_http), $(".itemlink-lefu").attr("href", pathObj.lefu_domain_path_http), $(".itemlink-jj").attr("href", pathObj.lefu_domain_path_http), $(".itemlink-investor").attr("href", pathObj.investor_domain_path_http), $(".itemlink-bond").attr("href", pathObj.bond_domain_path_http), $(".itemlink-ras").attr("href", pathObj.ras_domain_path_http), $(".itemlink-reits").attr("href", pathObj.reits_domain_path_http), $(".itemlink-szhk").attr("href", pathObj.main_domain_path_http + "/szhk/index.html"), $(".itemlink-qq").attr("href", pathObj.main_domain_path_http + "/option/index.html"), $(".itemlink-ydyl").attr("href", pathObj.main_domain_path_http + "/ydyl/index.html"), $(".itemlink-eipo").attr("href", pathObj.eipo_domain_path_http), $(".itemlink-szsePLE").attr("href", pathObj.main_domain_path_http + "/szsePLE/index.html"), $(".itemlink-goenglish").attr("href", pathObj.main_domain_path_http + "/English/index.html"), $(".itemlink-goenszhk").attr("href", pathObj.main_domain_path_http + "/enSzhk/index.html"), $(".itemlink-goenydyl").attr("href", pathObj.main_domain_path_http + "/enydyl/index.html"), window.util.isEnglish() && ($(".navbar-brand").attr("href", pathObj.main_domain_path_http + "/English/index.html"), $(".itemlink-szhk").attr("href", pathObj.main_domain_path_http + "/enSzhk/index.html"), $(".itemlink-ydyl").attr("href", pathObj.main_domain_path_http + "/enydyl/index.html"), $(".itemlink-qfii").attr("href", pathObj.main_domain_path_http + "/enqfii/index.html")), $(function() { var i = null; $(".szse-navbar .navbar-wrap .navbar-nav > li").mouseenter(function() { var t = $(this) , e = (t.parents(".navbar-nav"), t.find(".dropdown-menu")); i = (window.util.getDevice().isPc, setTimeout(function() { e.slideDown(300) }, 300)) }).mouseleave(function() { $(this).find(".dropdown-menu").hide(), clearTimeout(i) }) }), $(".low_version") && $(".low_version .low_close").click(function() { $(".low_version").hide() }), $("body").click(function(t) { $(".footer-right .wxlink").removeClass("active") }) }(); var OTHERSETE = window.util.getOtherSite() , OTHERSETES = ["szhk", "option", "rehearsal", "ydyl", "eipo", "szsePLE", "English"] , GhotWords = [] , CURRENTURL = location.href; -1 < CURRENTURL.indexOf(pathObj.main_domain_path) && OTHERSETES.indexOf(OTHERSETE) < 0 && $.when(ajaxRequest({ url: location.protocol + "//" + pathObj.main_domain_path + "/index/hot/index.json", async: !1 })).done(function(t) { 0 === t.code && (t.data = t.data.splice(0, 5), t.data.forEach(function(t) { GhotWords.push(t.title) })) }), $().ready(function() { var t = $(".top-search-el .search-btn") , e = $(".top-search-el .search-input") , i = $(".top-search-el .clear-keyword") , n = $(".top-search-el .search-hot") , a = pathObj.search_path + "/suggest" , r = pathObj.search_path + "/mixsuggest" , l = window.util.getQueryString("keyword") , h = !0 , d = { isLefu: -1 < CURRENTURL.indexOf(pathObj.lefu_domain_path), isInvestor: -1 < CURRENTURL.indexOf(pathObj.investor_domain_path), isBond: -1 < CURRENTURL.indexOf(pathObj.bond_domain_path), isSzhk: "szhk" === OTHERSETE, isOption: "option" === OTHERSETE, isRehearsal: "rehearsal" === OTHERSETE, isYdyl: "ydyl" === OTHERSETE, isEipo: -1 < CURRENTURL.indexOf(pathObj.eipo_domain_path), isSzsePLE: "szsePLE" === OTHERSETE, isEnglish: "English" === OTHERSETE, isEnydyl: "enydyl" === OTHERSETE, isEnszhk: "enSzhk" === OTHERSETE, isFintech: -1 < CURRENTURL.indexOf(pathObj.fin_domain_path) }; d.isChildSite = d.isLefu || d.isInvestor || d.isBond || d.isSzhk || d.isOption || d.isRehearsal || d.isYdyl || d.isEipo || d.isSzsePLE || d.isEnglish || d.isEnydyl || d.isEnszhk || d.isFintech; var o, c = "boolean" == typeof window.isNeedChangeSearchStrategy ? window.isNeedChangeSearchStrategy : !d.isChildSite || d.isBond || d.isLefu; function p(o, t) { if (o.is(":focus")) var n = !0; var e = { items: 10, parentWrap: t, map: '{"text": "name", "value": "value"}', location: "none", isHighlight: !1, listHeight: "dynamic", render: m, addCusBond: function(e, t) { if ("true" === window.localStorage.getItem("isLogin") || "http:" === location.protocol) { var i = "callback=jsonpCallbackSearchHint&zqdm=" + t; $.when(ajaxRequest({ url: pathObj.bond_domain_path_http + pathObj.user_path + "/user/optional/addOne?" + encodeURIComponent(i), dataType: "jsonp" })) } else window.location.assign(pathObj.main_domain_path_http + "/application/userCenter/product/bond/"); window.jsonpCallbackSearchHint = function(t) { "0" === t.code ? -1 < t.message.indexOf("0个添加成功") ? owsModal.modalMessage({ type: "error", message: "添加自选失败" }) : $(e.currentTarget).text("已添加").removeClass("keyword").addClass("c999").find(".glyphicon").hide() : owsModal.modalMessage({ type: "error", message: t.message }) } }, onSelected: function(t, e, i) { if (rebuildRepairedPlaceholder(o, "请输入关键字"), /^http/.test(i.value)) { var n = i.doctype && i.doctype.toLowerCase() || "html" , a = window.util.handleDocHref(i.articleType, n, i.value, i.id, d); window.open(a.href, a.openType) } else if (d.isChildSite || !~["JJ", "ZS", "ZQ"].indexOf(i.type)) { if (l = (l = e.replace(/<[^>]+>/g, "")).replace(/\&/g, "%26")) { var s = window.open(); if (d.isLefu) try { s.location = pathObj.lefu_domain_path_http + "/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.lefu_domain_path_http + "/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isInvestor) try { s.location = pathObj.investor_domain_path_http + "/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.investor_domain_path_http + "/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isBond) try { s.location = pathObj.bond_domain_path_http + "/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.bond_domain_path_http + "/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isSzhk) try { s.location = pathObj.main_domain_path_http + "/szhk/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.main_domain_path_http + "/szhk/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isOption) try { s.location = pathObj.main_domain_path_http + "/option/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.main_domain_path_http + "/option/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isRehearsal) try { s.location = pathObj.main_domain_path_http + "/rehearsal/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.main_domain_path_http + "/rehearsal/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isYdyl) try { s.location = pathObj.main_domain_path_http + "/ydyl/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.main_domain_path_http + "/ydyl/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isEipo) try { s.location = pathObj.eipo_domain_path_http + "/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.eipo_domain_path_http + "/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isSzsePLE) try { s.location = pathObj.main_domain_path_http + "/szsePLE/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.main_domain_path_http + "/szsePLE/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isEnglish) try { s.location = pathObj.main_domain_path_http + "/English/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.main_domain_path_http + "/English/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isEnydyl) try { s.location = pathObj.main_domain_path_http + "/enydyl/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.main_domain_path_http + "/enydyl/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isEnszhk) try { s.location = pathObj.main_domain_path_http + "/enSzhk/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.main_domain_path_http + "/enSzhk/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isFintech) try { s.location = pathObj.fin_domain_path_http + "/fintech/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.fin_domain_path_http + "/fintech/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else try { s.location = pathObj.main_domain_path_http + "/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.main_domain_path_http + "/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } u(0, i) } } else window.open("/market/trend/index.html?code=" + i.code, "_blank") }, onChanged: function(t, e) { l = e.toString().replace(/<[^>]+>/g, ""), i.show(), $.trim(e) || i.hide() }, source: fnDebounce(function(t, e) { if (!window.util.isEnglish()) { if ((10 === document.documentMode || 11 === document.documentMode) && n && h) return h = !1, void o.blur(); var i = window.localStorage.getItem("search"); if (t) $.when(ajaxRequest({ url: c ? r : a, type: "POST", contentType: "application/x-www-form-urlencoded", data: { keyword: t, host: (d.isLefu ? "fund" : d.isInvestor && "investor") || d.isBond && "bond" || d.isFintech || void 0 } })).done(function(t) { var a = []; c ? Object.keys(t).forEach(function(i) { var n = []; t[i].forEach(function(t) { if (t.name = t.wordA, "stock" === i) { var e = t.wordB.replace(/<[^>]+>/g, ""); t.articleType = i, t.title = e + " " + t.value + " " + { SEC: "股票", JJ: "基金", ZS: "指数", ZQ: "债券" }[t.type] + " " + (t.smallType ? t.smallType : ""), t.code = e, t.isOptional = d.isBond && "ZQ" === t.type && !/131/.test(e) } t.articleType = i, n.push(t) }), n.length && a.push({ type: i, options: n }) }) : t.forEach(function(t) { var e = {}; if ("TERM" === t.type) e = { name: t.wordA, value: t.value, type: t.type }; else { var i = t.wordB.replace(/<[^>]+>/g, ""); e = { name: "[ " + t.wordB + " ] " + t.wordA, value: t.value, code: i, type: t.type, isOptional: d.isBond && "ZQ" === t.type && !/131/.test(i) } } a.push(e) }), e(a) }); else { if (!i) return; i = JSON.parse(i), e(i) } } }, "trailing") }; new s.ui.controls.searchHint(o,e), o.val(l) } function m(t) { var e = { stock: "证券", disclosure: "公告", document: "资讯", channel: "栏目推荐" }; return t.map(function(h) { return h.options ? '
  • ' + e[h.type] + "
  • " + h.options.map(function(t) { switch (h.type) { case "stock": return '
  • ' + (t.isOptional ? '
    自选
    ' : "") + '
    ' + t.wordA + '' + t.wordB + '' + { SEC: "股票", JJ: "基金", ZS: "指数", ZQ: "债券" }[t.type] + '' + t.smallType + "
  • "; case "disclosure": return '
  • ' + t.name + "
  • "; case "document": return '
  • ' + t.name + "
  • "; case "channel": var e = t.name.replace(t.wordB, "").split("-").slice(0, -1); "全文检索推荐链接" === e[0] && e.splice(0, 1), e.push(t.wordB); var i = e.join("-").replace(/<[^>]+>/g, ""); if (1 < e.length) { var n = '
    " , a = document.createElement("div"); a.setAttribute("class", "calcu-search-chnl-name-wrap"), a.innerHTML = n, document.body.appendChild(a); var s = a.querySelector(".chnl-name").offsetWidth + 30 , o = navigator.userAgent , r = document.body.clientWidth; -1 < o.indexOf("Safari") && r <= "375" ? s += 10 : -1 < o.indexOf("Safari") && r <= "414" && "375" < r && (s += 16); var l = "padding-right: " + s + "px"; document.body.removeChild(a) } return '
  • ' + e.map(function(t) { return '
    ' + t + "
    " }).join("") + "
  • " } }).join("") : '
  • ' + h.name + "
  • " }).join("") } function u(t, e) { _.isEmpty(e) && (e = { name: l, value: l }), function(n) { if (!(Object.keys(n).length < 0 || "" === n.value || null == n.value)) { var t = window.localStorage , e = t.getItem("search") , i = []; if (n.name = n.name.toString().replace(/<[^>]+>/g, ""), n.value = n.value.toString().replace(/<[^>]+>/g, ""), e) { var a = (i = JSON.parse(e)).length; i.forEach(function(t, e, i) { t.value == n.value && i.splice(e, 1) }), 10 <= (a = i.length) && i.splice(a - 1, 1) } i.unshift({ name: n.name, value: n.value, type: n.type }), t.setItem("search", JSON.stringify(i)) } }(e) } ~location.host.indexOf("localhost") && (c = !0), c && $(".szse-navbar-pc .search-form").addClass("is-need-change-strategy"), o = "", GhotWords.forEach(function(t) { o += '' + (5 < t.length ? t.slice(0, 4) + "..." : t) + "" }), n.html(o), e.val(l), t.on("click", function() { if (l) { var t = window.open(); if (d.isLefu) try { t.location = pathObj.lefu_domain_path_http + "/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.lefu_domain_path_http + "/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isInvestor) try { t.location = pathObj.investor_domain_path_http + "/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.investor_domain_path_http + "/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isBond) try { t.location = pathObj.bond_domain_path_http + "/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.bond_domain_path_http + "/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isSzhk) try { t.location = pathObj.main_domain_path_http + "/szhk/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.main_domain_path_http + "/szhk/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isOption) try { t.location = pathObj.main_domain_path_http + "/option/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.main_domain_path_http + "/option/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isRehearsal) try { t.location = pathObj.main_domain_path_http + "/rehearsal/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.main_domain_path_http + "/rehearsal/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isYdyl) try { t.location = pathObj.main_domain_path_http + "/ydyl/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.main_domain_path_http + "/ydyl/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isEipo) try { t.location = pathObj.eipo_domain_path_http + "/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.eipo_domain_path_http + "/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isSzsePLE) try { t.location = pathObj.main_domain_path_http + "/szsePLE/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.main_domain_path_http + "/szsePLE/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isEnglish) try { t.location = pathObj.main_domain_path_http + "/English/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.main_domain_path_http + "/English/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isEnydyl) try { t.location = pathObj.main_domain_path_http + "/enydyl/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.main_domain_path_http + "/enydyl/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isEnszhk) try { t.location = pathObj.main_domain_path_http + "/enSzhk/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.main_domain_path_http + "/enSzhk/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else if (d.isFintech) try { t.location = pathObj.fin_domain_path_http + "/fintech/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.fin_domain_path_http + "/fintech/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } else try { t.location = pathObj.main_domain_path_http + "/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now() } catch (t) { window.open(pathObj.main_domain_path_http + "/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()) } u() } }), $(".top-search-el .search-hot").on("click", ">a", function(t) { l = $(t.currentTarget).attr("title"), window.open(pathObj.main_domain_path_http + "/application/search/index.html?keyword=" + encodeURI(l) + "&r=" + Date.now()), u(), e.val(l), rebuildRepairedPlaceholder($("#pcSearchInput"), "请输入关键字") }), e.on("blur", function() { t && clearTimeout(t); var t = setTimeout(function() { i.hide() }, 300) }), i.on("click", function(t) { $(t.target).parent().find(".search-input").val("").focus() }), p($("#pcSearchInput"), $(".szse-navbar-pc .search-form")), p($("#bottomSearchInput"), $(".footer-contract .search-form")), p($("#mobileSearchInput"), $(".szse-navbar-mobile .search-form")) }); var curCatalogId = curCatalogId || "" , pathObj = pathObj || {}; function formateDate(t) { var e = new Date(t) , i = e.getFullYear() , n = e.getMonth() + 1 , a = e.getDate(); return i + "-" + (n < 10 ? "0" + n : n) + "-" + (a < 10 ? "0" + a : a) } function getNewStrs(t, e) { for (var i in t) if (-1 < i.indexOf(e) && 0 < t[i].length) for (var n = 0; n < t[i].length; n++) { var a = t[i][n].title; t[i][n].secName; if (0 < a.indexOf(":")) { var s = a.indexOf(":") , o = a.substring(s - 1, s) , r = a.substring(s + 1, s + 2); if (1 != $.isNumeric(+o) || 1 != $.isNumeric(+r)) { var l = a.split(":")[0]; t[i][n].secName = t[i][n].secName == l ? t[i][n].secName : l, t[i][n].title = a.split(":")[1] } } else if (0 < a.indexOf(":")) { l = a.split(":")[0]; t[i][n].secName = t[i][n].secName == l ? t[i][n].secName : l, t[i][n].title = a.split(":")[1] } } return t } !function(t) { var e = window.location.search.substring(1); if (!(-1 < location.href.indexOf("application/userCenter"))) { var i = pathObj.report_path + "/ShowReport/data?SHOWTYPE=JSON" , n = t(".report-container"); if (1 < n.length) for (var a = e.indexOf("="), s = e.indexOf("&"), o = "CATALOGID" == e.substring(0, a).toUpperCase(), r = e.substring(a + 1, s), l = 0; l < n.length; l++) { var h = t(n[l]).attr("data-s-catalog-id"); i = pathObj.report_path + "/ShowReport/data?SHOWTYPE=JSON&CATALOGID=" + e.substring(a + 1), o ? r == h && t(n[l]).attr("data-s-data-url", i) : (i = pathObj.report_path + "/ShowReport/data?SHOWTYPE=JSON&CATALOGID=" + h + "&" + e, t(n[l]).attr("data-s-data-url", i)) } else if (h = t(n).attr("data-s-catalog-id"), 0 < e.length && 0 < n.length) { if (-1 < e.indexOf("&")) { for (var d = e.split("&"), c = 0; c < d.length; c++) { var p = d[c].split("="); "ticket" !== p[0] && ("CATALOGID" === p[0].toUpperCase() ? (i += "&" + p[0].toUpperCase() + "=" + p[1], n.attr("data-s-catalog-id", p[1])) : "TABKEY" === p[0].toUpperCase() ? (i += "&" + p[0].toUpperCase() + "=" + p[1], n.attr("data-s-active-tabkey", p[1])) : i += "&" + p[0] + "=" + p[1]) } h && i.indexOf("CATALOGID") < 0 && (i += "&CATALOGID=" + h) } else { "ticket" !== (d = e.split("="))[0] && 1 < d.length ? "catalogId" == d[0] ? i += "&" + d[0].toUpperCase() + "=" + d[1] : "TABKEY" == d[0].toUpperCase() ? (i = pathObj.report_path + "/ShowReport/data?SHOWTYPE=JSON&CATALOGID=" + h + "&TABKEY=" + d[1], n.attr("data-s-active-tabkey", d[1])) : i = "TABKEY-select" === d[0] ? pathObj.report_path + "/ShowReport/data?SHOWTYPE=JSON&CATALOGID=" + h + "&TABKEY=" + d[1] : pathObj.report_path + "/ShowReport/data?SHOWTYPE=JSON&CATALOGID=" + h + "&" + d[0] + "=" + d[1] : i = "" } n.attr("data-s-data-url", i) } } }(jQuery), function() { var t = $(".nav-customize").attr("href"); if (t && -1 < t.indexOf("//big5.szse.cn") && -1 < t.indexOf("userCenter/product/bond")) return t = t.replace(/bond\.szse\.cn/g, "www.szse.cn"), $(".nav-customize").attr("href", t); $(".nav-customize").attr("href", pathObj.main_domain_path_http + t) }(), function() { for (var t = $(".g-banner-txt a"), e = 0; e < t.length; e++) 0 != e && e != t.length - 1 && ($(t[e]).attr("href", "javascript:void(0);"), $(t[e]).addClass("no-href")) }(), window.util.dateFormat = function(t, e) { var i = { "M+": t.getMonth() + 1, "d+": t.getDate(), "H+": t.getHours(), "m+": t.getMinutes(), "s+": t.getSeconds(), "q+": Math.floor((t.getMonth() + 3) / 3), S: t.getMilliseconds() }; for (var n in /(y+)/.test(e) && (e = e.replace(RegExp.$1, (t.getFullYear() + "").substr(4 - RegExp.$1.length))), i) new RegExp("(" + n + ")").test(e) && (e = e.replace(RegExp.$1, 1 == RegExp.$1.length ? i[n] : ("00" + i[n]).substr(("" + i[n]).length))); return e } , window.util.windowOpen = function(t, e) {} , $(function() { $("#dl-menu") && ($("#dl-menu").dlmenu(), $(".navipone_block").click(function(t) { $(".mobile-search").fadeIn(400), rebuildRepairedPlaceholder($("#mobileSearchInput"), "请输入关键字") }), $(".mobile-search_close").click(function(t) { $(".mobile-search").fadeOut(400) })) }); var languagesData = [{ value: "110000", text: "简体中文", parentCode: "102" }, { value: "120000", text: "English", parentCode: "102" }] , languageSelectexOptions = { data: languagesData, onSelected: function(t, e) { if ("120000" == e.value) { var i = window.open(); try { i.location = "http://www.szse.cn/main/en" } catch (t) { window.open("http://www.szse.cn/main/en") } } } } , languageSelectex = new s.ui.controls.Selectex(".languageselectex",languageSelectexOptions); languageSelectex.getApi().setValue("110000"); var relatedlinksOptions = {} , relatedlinksDropdown = new s.ui.controls.Dropdown("#relatedlinksBtn",relatedlinksOptions); function httpToHttp(t) { var e = $(t) , i = pathObj.bond_domain_path; -1 < pathObj.bond_domain_path.indexOf(":81") && (i = pathObj.bond_domain_path.split(":")[0]); for (var n = -1 < window.location.href.indexOf(i) ? pathObj.bond_domain_path_http : pathObj.main_domain_path_http, a = 0; a < e.length; a++) { var s = $(e[a]).attr("href"); if (null != s) if (-1 < s.indexOf("../")) { var o = s.lastIndexOf("../"); s = s.substring(o + 3), $(e[a]).attr("href", n + "/" + s) } else if ("/" == s[0]) $(e[a]).attr("href", n + s); else if (s.indexOf("http") <= "-1") $(e[a]).attr("href", "http" + s); else if ("-1" < s.indexOf("/www/bond")) { var r = s.indexOf("/www/bond") , l = s.substring(0, r + 9); s = s.replace(l, pathObj.bond_domain_path_http), $(e[a]).attr("href", s) } } } function adjustDialog() { var a, t = $(document).find(".c-modal"); $.each(t, function() { $(this).is(":hidden") || (a = $(this).find(".modal-dialog")) }), $(window).on("resize", function() { var t = document.documentElement.clientHeight , e = document.documentElement.clientWidth , i = a.height() , n = a.width(); i < t && a.css({ position: "absolute", left: e / 2 - n / 2, top: t / 2 - i / 2 }), "absolute" === a.css("position") && a.css({ left: e / 2 - n / 2, top: t / 2 - i / 2 }) }) } function getSize(r) { $(window).resize(function() { var t = document.documentElement.clientHeight , e = document.documentElement.clientWidth; if ("block" == $("#c-modal-messagebox " + r).css("display")) { var i = $("#c-modal-messagebox .modal-dialog") , n = i.height() , a = i.width(); a < e && i.css({ left: e / 2 - a / 2, top: t / 2 - n / 2 }), e <= "450" ? i.css({ width: "100%", left: "0" }) : i.css("width", "450px") } if ("block" == $("#c-modal-base " + r).css("display")) { var s = $("#c-modal-base .modal-dialog") , o = s.width(); s.height(); o < e && s.css({ left: e / 2 - o / 2 }), e <= "768" ? s.css({ width: "100%", left: "0" }) : s.css("width", "") } }) } function IEVersion() { var t = navigator.userAgent , e = -1 < t.indexOf("compatible") && -1 < t.indexOf("MSIE") , i = -1 < t.indexOf("Edge") && !e , n = -1 < t.indexOf("Trident") && -1 < t.indexOf("rv:11.0"); if (e) { new RegExp("MSIE (\\d+\\.\\d+);").test(t); var a = parseFloat(RegExp.$1); return 7 == a ? 7 : 8 == a ? 8 : 9 == a ? 9 : 10 == a ? 10 : 6 } return i ? "edge" : n ? 11 : -1 } $(document).on("modal.on.shown", function() { adjustDialog() }), function() { var t; window.console = window.console || ((t = {}).log = t.warn = t.debug = t.info = t.error = t.time = t.dir = t.profile = t.clear = t.exception = t.trace = t.assert = function() {} , t), "classList"in document.documentElement || Object.defineProperty(HTMLElement.prototype, "classList", { get: function() { var a = this; function t(n) { return function(t) { var e = a.className.split(/\s+/g) , i = e.indexOf(t); n(e, i, t), a.className = e.join(" ") } } return { add: t(function(t, e, i) { ~e || t.push(i) }), remove: t(function(t, e) { ~e && t.splice(e, 1) }), toggle: t(function(t, e, i) { ~e ? t.splice(e, 1) : t.push(i) }), contains: function(t) { return !!~a.className.split(/\s+/g).indexOf(t) }, item: function(t) { return a.className.split(/\s+/g)[t] || null } } } }) }(); !function() { "use strict"; var t, i = { gap: 20, colums: 3, perlist: [], aspectRatio: {}, getAspectRatioUpdate: [], loadIndex: 0 }; function e(t) { this.container = t.container.selector ? t.container[0] : t.container, this.initOpts(t), this.init() } e.prototype = { constructor: e, init: function() { this.getAspectRatio(), this.render() }, load: function(t) { this.opts = _.cloneDeep(_.extend(this.opts, t)), this.getAspectRatio(), this.render() }, initOpts: function(t) { t = t || {}, this.opts = _.cloneDeep(_.extend({}, i, this.opts, t)); var e = 1 <= this.opts.colums ? (this.opts.colums - 1) * this.opts.gap : 0; this.opts.containerWidth = this.container.offsetWidth, this.opts.items = this.container.children, this.opts.itemWith = (this.opts.containerWidth - e) / this.opts.colums }, getAspectRatio: function() { var t = this.opts.index , e = this.opts.items[t] , i = e.offsetHeight / e.offsetWidth; this.opts.aspectRatio[t] = i }, getAspectRatioUpdate: function() { var a = this; a.opts.getAspectRatioUpdate = [], _.forEach(this.opts.items, function(t, e) { var i = a.opts.items[e] , n = i.offsetHeight / i.offsetWidth; a.opts.getAspectRatioUpdate.push(n) }) }, render: function() { var e = 0 , t = this.opts.perlist , i = this.opts.index , n = this.opts.loadIndex , a = this.opts.itemWith * this.opts.aspectRatio[i] , s = this.opts.items[i]; if (s.style.width = this.opts.itemWith + "px", n < this.opts.colums) s.style.top = 0, s.style.left = (this.opts.itemWith + this.opts.gap) * n + "px", t.push(a); else { var o = t[0] , r = 0; _.forEach(t, function(t, e) { t < o && (o = t, r = e) }); var l = (this.opts.itemWith + this.opts.gap) * r; s.style.top = t[r] + this.opts.gap + "px", s.style.left = l + "px", t[r] = t[r] + a + this.opts.gap } t.forEach(function(t) { e < t && (e = t) }), this.container.style.height = e + "px", s.classList.add("show"), this.opts.loadIndex++, this.done() }, reRender: function() { var o = this , e = 0 , r = []; _.forEach(this.opts.items, function(t, e) { var i = o.opts.itemWith * o.opts.getAspectRatioUpdate[e]; if (t.style.width = o.opts.itemWith + "px", e < o.opts.colums) t.style.top = 0, t.style.left = (o.opts.itemWith + o.opts.gap) * e + "px", r.push(i); else { var n = r[0] , a = 0; _.forEach(r, function(t, e) { t < n && (n = t, a = e) }); var s = (o.opts.itemWith + o.opts.gap) * a; t.style.top = r[a] + o.opts.gap + "px", t.style.left = s + "px", r[a] = r[a] + i + o.opts.gap } }), r.forEach(function(t) { e < t && (e = t) }), this.container.style.height = e + "px" }, update: function(t) { this.opts.isLoaded && (this.initOpts(t), this.getAspectRatioUpdate(), this.reRender()) }, done: function() { this.opts.isLoaded && (this.opts.perlist = [], this.opts.aspectRatio = {}, this.opts.loadIndex = 0, this.update()), this.opts.onInitialized } }, t = function() { return this || (0, eval)("this") }(), "undefined" != typeof module && module.exports ? module.exports = e : "function" == typeof define && define.amd ? define(function() { return e }) : "WaterFall"in t || (t.WaterFall = e) }(), function() { if ("http://www.szse.cn" != pathObj.main_domain_path_http) { var i = location.port ? ":" + location.port : "" , n = location.hostname.split(".")[0].split("-")[1]; n = n ? "-" + n : ""; var a = ["www.szse.cn", "bond.szse.cn", "fund.szse.cn", "investor.szse.cn", "eipo.szse.cn", "chinext.szse.cn"] , s = /((.*)\/\/)((\w+)-?\w*)((\.szse\.cn)(:\d+)?(.*))/; $("a").each(function() { for (var t = $(this).attr("href"), e = 0; e < a.length; e++) if (t && 0 < t.indexOf(a[e])) { t = t.replace(s, "$1$4" + n + "$6" + i + "$8"), $(this).attr("href", t); break } }) } }();