var $=require("jquery"),DialogApp=require("./dialogApp.js"),Form=require("./form.js"),Convenient=require("./convenient.js"),initForm=function(){$(function(){"__env"in window&&"token"in window.__env&&$.ajaxSetup({headers:{"X-CSRF-TOKEN":window.__env.token}}),$("form").each(function(n,i){$(i).unbind("submit"),void 0!==$(i).attr("data-ajax-form")?Form.initAjax(i,DialogApp):$(i).is("[data-form-no-loading]")||Form.initCommon(i,DialogApp)})})},initConvenient=function(){Convenient.init(DialogApp)},Base={init:function(){initForm(),initConvenient()},defaultFormCallback:function(n,i){return Form.defaultCallback(n,i,DialogApp)}};module.exports=Base;