"use strict";function asyncGeneratorStep(e,t,r,n,i,o,a){try{var s=e[o](a),d=s.value}catch(e){return void r(e)}s.done?t(d):Promise.resolve(d).then(n,i)}function _asyncToGenerator(s){return function(){var e=this,a=arguments;return new Promise(function(t,r){var n=s.apply(e,a);function i(e){asyncGeneratorStep(n,t,r,i,o,"next",e)}function o(e){asyncGeneratorStep(n,t,r,i,o,"throw",e)}i(void 0)})}}var sinfo=store.get("sinfo");sinfo=sinfo&&JSON.parse(sinfo),$(function(){var e=$(".promotion-text").html()||sinfo&&sinfo.promotionWord||"";store.set("pro_title",JSON.stringify(e))}),function(){var e=window.location.href;store.set("url",JSON.stringify(e)),$("body").on("click","#buyNow,.buy-now,#continueBuy,.create-order",_asyncToGenerator(regeneratorRuntime.mark(function e(){var t,r,n,i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("undefined"==typeof sgksStoreData||!isDetailOrderHintTem||"buyNow"!=$(this).attr("id")&&!$(this).hasClass(".buy-now")){e.next=12;break}if(r=(t=sgksStoreData).orderAgain,n=t.saleId,"undefined"!=typeof isHaveOrder)return e.next=5,isHaveOrder(r,n);e.next=8;break;case 5:e.t0=e.sent,e.next=9;break;case 8:e.t0=!1;case 9:if(e.t0)return e.abrupt("return",!1);e.next=12;break;case 12:if("SGKS_common02"!==siteTemplate){e.next=20;break}if(0<$(this).find(".loader-box").length)return e.abrupt("return",!1);e.next=17;break;case 17:$(this).html("<div class='loader-box'><div class='loader-03'></div></div>").addClass("btn-disabled");case 18:e.next=25;break;case 20:if(0<$("#buyNow").find(".loader-box").length)return e.abrupt("return",!1);e.next=24;break;case 24:$("#buyNow").html("<div class='loader-box'><div class='loader-03'></div></div>").addClass("btn-disabled");case 25:0<(i=window.location).pathname.indexOf("detail")&&0<i.href.indexOf("ignore_doamin=true")&&store.set("_ifRecommend",JSON.stringify({id:sinfo.id,isRecommend:1}),1728e5),store.set("sinfo",JSON.stringify(sinfo)),$("#detailForm").attr("action",window.App.getHref("/checkout")),$("#detailForm").submit();case 30:case"end":return e.stop()}},e,this)})))}();