var $=require("jquery"),Base=require("baseMobile"),Dialog=require("./../lib/js/dialogMobile.js"),UIkit=require("./../uikit/uikit.js"),Lazyload=require("./../lib/js/jqueryLazyload.js"),CommonVerify=require("./../lib/js/commonVerify.js"),JqueryTimeago=require("./../lib/js/jqueryTimeago.js"),apiInit=function(){window.api={},window.api.dialog=Dialog,window.api.commonVerify=CommonVerify,window.api.base=Base},muiFix=function(){$(document).on("click",".mui-action-back",function(){return window.history.back(),!1})},appInit=function(){$(document).on("click","[data-favorite-action] [data-action]",function(){var i=$(this).data("action"),a=$(this).data("category"),t=$(this).data("category-id"),o=$(this);$.post("/member/favorite_submit",{category:a,action:i,categoryId:t},function(a){Base.defaultFormCallback(a,{success:function(a){o.closest("[data-favorite-action]").find("[data-action]").show(),o.closest("[data-favorite-action]").find("[data-action="+i+"]").hide()}})})})};module.exports={init:function(){muiFix(),Base.init(),$(function(){$("[data-src]").lazyload({data_attribute:"src"}),$.timeago.settings.allowFuture=!0,$("[datetime]").timeago()}),apiInit(),appInit()},Base:Base,Dialog:Dialog};