var $=require("jquery"),Base=require("basePC"),Dialog=require("./../lib/js/dialogPC.js"),Util=require("./../lib/js/util.js"),UIkit=require("./../uikit/uikit.js"),ImageSelectDialog=require("./../lib/js/imageSelectDialog.js"),JqueryTimeago=require("./../lib/js/jqueryTimeago.js"),Lazyload=require("./../lib/js/jqueryLazyload.js"),apiInit=function(){window.api={},window.api.dialog=Dialog,window.api.base=Base,window.api.util=Util},callbackInit=function(){window.callback={},window.callback.editorUploadImage=function(a){new ImageSelectDialog($.extend({server:"/data/image_select_dialog"},{callback:function(i){a(i)}}),Dialog).show()}},appInit=function(){$(document).on("click","[data-favorite-action] [data-action]",function(){var a=$(this).data("action"),i=$(this).data("category"),t=$(this).data("category-id"),e=$(this);$.post("/member/favorite_submit",{category:i,action:a,categoryId:t},function(i){Base.defaultFormCallback(i,{success:function(i){e.closest("[data-favorite-action]").find("[data-action]").show(),e.closest("[data-favorite-action]").find("[data-action="+a+"]").hide()}})})})};module.exports={init:function(){Base.init(),$.timeago.settings.allowFuture=!0,$("[datetime]").timeago(),$("[data-src]").lazyload({data_attribute:"src"}),apiInit(),callbackInit(),appInit()},Base:Base,Dialog:Dialog};