var $=require("jquery"),Base=require("basePC"),Dialog=require("./../lib/js/dialogPC.js"),UIkit=require("./../uikit/uikit.js"),Util=require("./../lib/js/util.js"),ImageSelectDialog=require("./../lib/js/imageSelectDialog.js"),AudioSelectDialog=require("./../lib/js/audioSelectDialog.js"),LinkSelectDialog=require("./../lib/js/linkSelectDialog.js"),Convenient=require("./../lib/js/convenient.js"),JqueryTimeago=require("./../lib/js/jqueryTimeago.js"),Share=require("./../share.js/share.js"),Lazyload=require("./../lib/js/jqueryLazyload.js"),RadioWidget=require("./../lib/js/radioWidget.js"),TabWidget=require("./../lib/js/tabWidget.js"),ImageWidget=require("./../lib/js/imageWidget.js"),Qrcode=require("./../lib/js/qrcode.js"),Clipboard=require("./../clipboard/clipboard.js"),Editor=require("./../lib/js/editor.js");$.timeago.settings.allowFuture=!0,$(function(){$("[datetime]").timeago(),$("[data-src]").lazyload({data_attribute:"src"}),Share.init(),RadioWidget.init(),TabWidget.init(),ImageWidget.init(),Qrcode.init(Dialog),new Clipboard("[data-clipboard-text]").on("success",function(i){Dialog.tipSuccess("复制成功")})});var apiInit=function(){window.api={},window.api.dialog=Dialog,window.api.base=Base,window.api.util=Util,window.api.editor=Editor},callbackInit=function(){window.callback={},window.callback.imageWidgetSelectImage=function(i){new ImageSelectDialog({limitMin:1,limitMax:1,server:"/data/image_select_dialog",callback:function(e){i(e)}},Dialog).show()},window.callback.editorUploadImage=function(i){new ImageSelectDialog($.extend({server:"/data/image_select_dialog"},{callback:function(e){i(e)}}),Dialog).show()}},commonInit=function(){$(document).on("click","[data-user-info]",function(){var i=$(this).attr("data-user-info");Dialog.dialog("/module/user_info/"+i)}),$(document).on("click","[data-link-selector]",function(){var i=$('[data-link-selector-value="'+$(this).attr("data-link-selector")+'"]');new LinkSelectDialog({limitMin:1,limitMax:1,server:"/module/link_dialog",callback:function(e){var a=e[0];i.val(a)}},Dialog).show()}),$(document).on("click","[data-audio-selector]",function(){var i=$('[data-audio-selector-value="'+$(this).attr("data-audio-selector")+'"]');new ImageSelectDialog($.extend({server:"/data/audio_select_dialog"},{callback:function(e){var a=e[0];i.val(a)}}),Dialog).show()})};module.exports={init:function(){Base.init(),Convenient.init(Dialog),apiInit(),callbackInit(),commonInit()},Base:Base,Dialog:Dialog,Util:Util};