',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.prototype.init=function(e,i,a){this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(a);for(var o=this.options.trigger.split(" "),n=o.length;n--;){var s=o[n];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var r="hover"==s?"mouseenter":"focus",l="hover"==s?"mouseleave":"blur";this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this));
-}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},e.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,a){i[t]!=a&&(e[t]=a)}),e},e.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show()},e.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("zui."+this.type);return clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()},e.prototype.show=function(e){var i=t.Event("show.zui."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(i),i.isDefaultPrevented())return;var a=this.tip();this.setContent(e),this.options.animation&&a.addClass("fade");var o="function"==typeof this.options.placement?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,n=/\s?auto?\s?/i,s=n.test(o);s&&(o=o.replace(n,"")||"top"),a.detach().css({top:0,left:0,display:"block"}).addClass(o),this.options.container?a.appendTo(this.options.container):a.insertAfter(this.$element);var r=this.getPosition(),l=a[0].offsetWidth,d=a[0].offsetHeight;if(s){var c=this.$element.parent(),p=o,h=document.documentElement.scrollTop||document.body.scrollTop,f="body"==this.options.container?window.innerWidth:c.outerWidth(),u="body"==this.options.container?window.innerHeight:c.outerHeight(),g="body"==this.options.container?0:c.offset().left;o="bottom"==o&&r.top+r.height+d-h>u?"top":"top"==o&&r.top-h-d<0?"bottom":"right"==o&&r.right+l>f?"left":"left"==o&&r.left-l'}),e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),e.prototype.constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTarget();if(e)return e.find(".arrow").length<1&&t.addClass("no-arrow"),void t.html(e.html());var i=this.getTitle(),a=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](i),t.find(".popover-content")[this.options.html?"html":"text"](a),t.removeClass("fade top bottom left right in"),this.options.tipId&&t.attr("id",this.options.tipId),this.options.tipClass&&t.addClass(this.options.tipClass),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTarget()||this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.getTarget=function(){var e=this.$element,i=this.options,a=e.attr("data-target")||("function"==typeof i.target?i.target.call(e[0]):i.target);return a?"$next"==a?e.next(".popover"):t(a):!1},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},e.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var i=t.fn.popover;t.fn.popover=function(i){return this.each(function(){var a=t(this),o=a.data("zui.popover"),n="object"==typeof i&&i;o||a.data("zui.popover",o=new e(this,n)),"string"==typeof i&&o[i]()})},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(window.jQuery),function(t,e,i){"use strict";var a=function(e,i){this.$=t(e),this.options=this.getOptions(i),this.init()};a.DEFAULTS={container:"body",deviation:5,sensorOffsetX:0,sensorOffsetY:0},a.prototype.getOptions=function(e){return e=t.extend({},a.DEFAULTS,this.$.data(),e)},a.prototype.callEvent=function(e,i){return t.zui.callEvent(this.options[e],i,this)},a.prototype.init=function(){this.handleMouseEvents()},a.prototype.handleMouseEvents=function(){var a=this.$,o=this,n=this.options,s="before";this.$triggerTarget=n.trigger?(t.isFunction(n.trigger)?n.trigger(a):a.find(n.trigger)).first():a,this.$triggerTarget.on("mousedown",function(r){function l(e){var s={left:e.pageX,top:e.pageY};if(!(i.abs(s.left-y.left)r&&s.top>l&&s.leftd?r[n?"after":"before"](s):r[n?"before":"after"](s);var c=a.children(o.selector).not(".drag-shadow");i(c),t.zui.callEvent(o.order,{list:c,element:s})}},finish:function(e){o.dragCssClass&&e.element&&e.element.removeClass(o.dragCssClass),t.zui.callEvent(o.finish,{list:a.children(o.selector),element:e.element}),a.removeClass("sortable-sorting")}})},t.fn.sortable=function(e){return this.each(function(){var i=t(this),a=i.data("zui.sortable"),n="object"==typeof e&&e;a?"object"==typeof e&&a.reset():i.data("zui.sortable",a=new o(this,n)),"string"==typeof e&&a[e]()})},t.fn.sortable.Constructor=o}(jQuery,window,document,Math),function(t,e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):t.bootbox=e(t.jQuery)}(this,function t(e,i){"use strict";function a(t){var e=v[u.locale];return e?e[t]:v.en[t]}function o(t,i,a){t.stopPropagation(),t.preventDefault();var o=e.isFunction(a)&&a.call(i,t)===!1;o||i.modal("hide")}function n(t){var e,i=0;for(e in t)i++;return i}function s(t,i){var a=0;e.each(t,function(t,e){i(t,e,a++)})}function r(t){var i,a;if("object"!=typeof t)throw new Error("Please supply an object of options");if(!t.message)throw new Error("Please specify a message");return t=e.extend({},u,t),t.buttons||(t.buttons={}),i=t.buttons,a=n(i),s(i,function(t,o,n){if(e.isFunction(o)&&(o=i[t]={callback:o}),"object"!==e.type(o))throw new Error("button with key "+t+" must be an object");o.label||(o.label=t),o.className||(2===a&&("ok"===t||"confirm"===t)||1===a?o.className="btn-primary":o.className="btn-default")}),t}function l(t,e){var i=t.length,a={};if(1>i||i>2)throw new Error("Invalid argument length");return 2===i||"string"==typeof t[0]?(a[e[0]]=t[0],a[e[1]]=t[1]):a=t[0],a}function d(t,i,a){return e.extend(!0,{},t,l(i,a))}function c(t,e,i,a){var o={className:"bootbox-"+t,buttons:p.apply(null,e)};return h(d(o,a,i),e)}function p(){for(var t={},e=0,i=arguments.length;i>e;e++){var o=arguments[e],n=o.toLowerCase(),s=o.toUpperCase();t[n]={label:a(s)}}return t}function h(t,e){var a={};return s(e,function(t,e){a[e]=!0}),s(t.buttons,function(t){if(a[t]===i)throw new Error("button key "+t+" is not allowed (options are "+e.join("\n")+")")}),t}var f={dialog:"
",header:"
",footer:"",closeButton:"",form:"",inputs:{text:"",textarea:"",email:"",select:"",checkbox:"",date:"",time:"",number:"",password:""}},u={locale:e.zui&&e.zui.clientLang?e.zui.clientLang():"zh_cn",backdrop:"static",animate:!0,className:null,closeButton:!0,show:!0,container:"body"},g={};g.alert=function(){var t;if(t=c("alert",["ok"],["message","callback"],arguments),t.callback&&!e.isFunction(t.callback))throw new Error("alert requires callback property to be a function when provided");return t.buttons.ok.callback=t.onEscape=function(){return e.isFunction(t.callback)?t.callback.call(this):!0},g.dialog(t)},g.confirm=function(){var t;if(t=c("confirm",["confirm","cancel"],["message","callback"],arguments),t.buttons.cancel.callback=t.onEscape=function(){return t.callback.call(this,!1)},t.buttons.confirm.callback=function(){return t.callback.call(this,!0)},!e.isFunction(t.callback))throw new Error("confirm requires a callback");return g.dialog(t)},g.prompt=function(){var t,a,o,n,r,l,c;if(n=e(f.form),a={className:"bootbox-prompt",buttons:p("cancel","confirm"),value:"",inputType:"text"},t=h(d(a,arguments,["title","callback"]),["confirm","cancel"]),l=t.show===i?!0:t.show,t.message=n,t.buttons.cancel.callback=t.onEscape=function(){return t.callback.call(this,null)},t.buttons.confirm.callback=function(){var i;switch(t.inputType){case"text":case"textarea":case"email":case"select":case"date":case"time":case"number":case"password":i=r.val();break;case"checkbox":var a=r.find("input:checked");i=[],s(a,function(t,a){i.push(e(a).val())})}return t.callback.call(this,i)},t.show=!1,!t.title)throw new Error("prompt requires a title");if(!e.isFunction(t.callback))throw new Error("prompt requires a callback");if(!f.inputs[t.inputType])throw new Error("invalid prompt type");switch(r=e(f.inputs[t.inputType]),t.inputType){case"text":case"textarea":case"email":case"date":case"time":case"number":case"password":r.val(t.value);break;case"select":var u={};if(c=t.inputOptions||[],!e.isArray(c))throw new Error("Please pass an array of input options");if(!c.length)throw new Error("prompt with select requires options");s(c,function(t,a){var o=r;if(a.value===i||a.text===i)throw new Error("given options in wrong format");a.group&&(u[a.group]||(u[a.group]=e("").attr("label",a.group)),o=u[a.group]),o.append("")}),s(u,function(t,e){r.append(e)}),r.val(t.value);break;case"checkbox":var v=e.isArray(t.value)?t.value:[t.value];if(c=t.inputOptions||[],!c.length)throw new Error("prompt with checkbox requires options");if(!c[0].value||!c[0].text)throw new Error("given options in wrong format");r=e(""),s(c,function(i,a){var o=e(f.inputs[t.inputType]);o.find("input").attr("value",a.value),o.find("label").append(a.text),s(v,function(t,e){e===a.value&&o.find("input").prop("checked",!0)}),r.append(o)})}return t.placeholder&&r.attr("placeholder",t.placeholder),t.pattern&&r.attr("pattern",t.pattern),t.maxlength&&r.attr("maxlength",t.maxlength),n.append(r),n.on("submit",function(t){t.preventDefault(),t.stopPropagation(),o.find(".btn-primary").click()}),o=g.dialog(t),o.off("shown.zui.modal"),o.on("shown.zui.modal",function(){r.focus()}),l===!0&&o.modal("show"),o},g.dialog=function(t){t=r(t);var a=e(f.dialog),n=a.find(".modal-dialog"),l=a.find(".modal-body"),d=t.buttons,c="",p={onEscape:t.onEscape};if(e.fn.modal===i)throw new Error("$.fn.modal is not defined; please double check you have included the Bootstrap JavaScript library. See http://getbootstrap.com/javascript/ for more details.");if(s(d,function(t,e){c+="",p[t]=e.callback}),l.find(".bootbox-body").html(t.message),t.animate===!0&&a.addClass("fade"),t.className&&a.addClass(t.className),"large"===t.size?n.addClass("modal-lg"):"small"===t.size&&n.addClass("modal-sm"),t.title&&l.before(f.header),t.closeButton){var h=e(f.closeButton);t.title?a.find(".modal-header").prepend(h):h.css("margin-top","-10px").prependTo(l)}return t.title&&a.find(".modal-title").html(t.title),c.length&&(l.after(f.footer),a.find(".modal-footer").html(c)),a.on("hidden.zui.modal",function(t){t.target===this&&a.remove()}),a.on("shown.zui.modal",function(){a.find(".btn-primary:first").focus()}),"static"!==t.backdrop&&a.on("click.dismiss.zui.modal",function(t){a.children(".modal-backdrop").length&&(t.currentTarget=a.children(".modal-backdrop").get(0)),t.target===t.currentTarget&&a.trigger("escape.close.bb")}),a.on("escape.close.bb",function(t){p.onEscape&&o(t,a,p.onEscape)}),a.on("click",".modal-footer button",function(t){var i=e(this).data("bb-handler");o(t,a,p[i])}),a.on("click",".bootbox-close-button",function(t){o(t,a,p.onEscape)}),a.on("keyup",function(t){27===t.which&&a.trigger("escape.close.bb")}),e(t.container).append(a),a.modal({backdrop:t.backdrop?"static":!1,keyboard:!1,show:!1}),t.show&&a.modal("show"),a},g.setDefaults=function(){var t={};2===arguments.length?t[arguments[0]]=arguments[1]:t=arguments[0],e.extend(u,t)},g.hideAll=function(){return e(".bootbox").modal("hide"),g};var v={en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},zh_cn:{OK:"确认",CANCEL:"取消",CONFIRM:"确认"},zh_tw:{OK:"確認",CANCEL:"取消",CONFIRM:"確認"}};return g.addLocale=function(t,i){return e.each(["OK","CANCEL","CONFIRM"],function(t,e){if(!i[e])throw new Error("Please supply a translation for '"+e+"'")}),v[t]={OK:i.OK,CANCEL:i.CANCEL,CONFIRM:i.CONFIRM},g},g.removeLocale=function(t){return delete v[t],g},g.setLocale=function(t){return g.setDefaults("locale",t)},g.init=function(i){return t(i||e)},g}),function(t){"use strict";var e=function(e,i){this.$=t(e),this.options=this.getOptions(i),this.init()};e.DEFAULTS={container:"body",move:!0},e.prototype.getOptions=function(i){return i=t.extend({},e.DEFAULTS,this.$.data(),i)},e.prototype.init=function(){this.handleMouseEvents()},e.prototype.handleMouseEvents=function(){var e,i,a,o,n,s=this.$,r="before",l="drag",d="finish",c=this.options,p=function(l){if(c.hasOwnProperty(r)&&t.isFunction(c[r])){var d=c[r]({event:l,element:s});if(void 0!==d&&!d)return}var p=t(c.container),u=s.offset();i=p.offset(),e={x:l.pageX,y:l.pageY},a={x:l.pageX-u.left+i.left,y:l.pageY-u.top+i.top},o=t.extend({},e),n=!1,s.addClass("drag-ready"),t(document).bind("mousemove",h).bind("mouseup",f),l.preventDefault(),c.stopPropagation&&l.stopPropagation()},h=function(i){n=!0;var r=i.pageX,d=i.pageY,p={left:r-a.x,top:d-a.y};s.removeClass("drag-ready").addClass("dragging"),c.move&&s.css(p),c.hasOwnProperty(l)&&t.isFunction(c[l])&&c[l]({event:i,element:s,startOffset:a,pos:p,offset:{x:r-e.x,y:d-e.y},smallOffset:{x:r-o.x,y:d-o.y}}),o.x=r,o.y=d,c.stopPropagation&&i.stopPropagation()},f=function(i){if(t(document).unbind("mousemove",h).unbind("mouseup",f),!n)return void s.removeClass("drag-ready");var r={left:i.pageX-a.x,top:i.pageY-a.y};s.removeClass("drag-ready").removeClass("dragging"),c.move&&s.css(r),c.hasOwnProperty(d)&&t.isFunction(c[d])&&c[d]({event:i,element:s,pos:r,offset:{x:i.pageX-e.x,y:i.pageY-e.y},smallOffset:{x:i.pageX-o.x,y:i.pageY-o.y}}),i.preventDefault(),c.stopPropagation&&i.stopPropagation()};c.handle?s.on("mousedown",c.handle,p):s.on("mousedown",p)},t.fn.draggable=function(i){return this.each(function(){var a=t(this),o=a.data("zui.draggable"),n="object"==typeof i&&i;o||a.data("zui.draggable",o=new e(this,n)),"string"==typeof i&&o[i]()})},t.fn.draggable.Constructor=e}(jQuery),function(t){"use strict";function e(e,i){if(e===!1)return e;if(!e)return i;e===!0?e={add:!0,"delete":!0,edit:!0,sort:!0}:"string"==typeof e&&(e=e.split(","));var a;return t.isArray(e)&&(a={},t.each(e,function(e,i){t.isPlainObject(i)?a[i.action]=i:a[i]=!0}),e=a),t.isPlainObject(e)&&(a={},t.each(e,function(e,i){i&&(a[e]=t.extend({type:e},s[e],t.isPlainObject(i)?i:null))}),e=a),i?t.extend(!0,{},i,e):e}function i(e,i,a){return i=i||e.type,t(a||e.template).addClass("tree-action").attr(t.extend({"data-type":i,title:e.title||""},e.attr)).data("action",e)}var a="zui.tree",o=0,n=function(e,i){this.name=a,this.$=t(e),this.getOptions(i),this._init()},s={sort:{template:''},add:{template:''},edit:{template:''},"delete":{template:''}};n.DEFAULTS={animate:null,initialState:"normal",toggleTemplate:''},n.prototype.add=function(e,i){var a,o=t(e),n=this.options;if(o.is("li")?(a=o.children("ul"),a.length||(a=t("
'}),e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),e.prototype.constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTarget();if(e)return e.find(".arrow").length<1&&t.addClass("no-arrow"),void t.html(e.html());var i=this.getTitle(),a=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](i),t.find(".popover-content")[this.options.html?"html":"text"](a),t.removeClass("fade top bottom left right in"),this.options.tipId&&t.attr("id",this.options.tipId),this.options.tipClass&&t.addClass(this.options.tipClass),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTarget()||this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.getTarget=function(){var e=this.$element,i=this.options,a=e.attr("data-target")||("function"==typeof i.target?i.target.call(e[0]):i.target);return a?"$next"==a?e.next(".popover"):t(a):!1},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},e.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var i=t.fn.popover;t.fn.popover=function(i){return this.each(function(){var a=t(this),o=a.data("zui.popover"),n="object"==typeof i&&i;o||a.data("zui.popover",o=new e(this,n)),"string"==typeof i&&o[i]()})},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(window.jQuery),function(t,e,i){"use strict";var a=function(e,i){this.$=t(e),this.options=this.getOptions(i),this.init()};a.DEFAULTS={container:"body",deviation:5,sensorOffsetX:0,sensorOffsetY:0},a.prototype.getOptions=function(e){return e=t.extend({},a.DEFAULTS,this.$.data(),e)},a.prototype.callEvent=function(e,i){return t.zui.callEvent(this.options[e],i,this)},a.prototype.init=function(){this.handleMouseEvents()},a.prototype.handleMouseEvents=function(){var a=this.$,o=this,n=this.options,s="before";this.$triggerTarget=n.trigger?(t.isFunction(n.trigger)?n.trigger(a):a.find(n.trigger)).first():a,this.$triggerTarget.on("mousedown",function(r){function l(e){var s={left:e.pageX,top:e.pageY};if(!(i.abs(s.left-y.left)r&&s.top>l&&s.leftd?r[n?"after":"before"](s):r[n?"before":"after"](s);var c=a.children(o.selector).not(".drag-shadow");i(c),t.zui.callEvent(o.order,{list:c,element:s})}},finish:function(e){o.dragCssClass&&e.element&&e.element.removeClass(o.dragCssClass),t.zui.callEvent(o.finish,{list:a.children(o.selector),element:e.element}),a.removeClass("sortable-sorting")}})},t.fn.sortable=function(e){return this.each(function(){var i=t(this),a=i.data("zui.sortable"),n="object"==typeof e&&e;a?"object"==typeof e&&a.reset():i.data("zui.sortable",a=new o(this,n)),"string"==typeof e&&a[e]()})},t.fn.sortable.Constructor=o}(jQuery,window,document,Math),function(t,e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):t.bootbox=e(t.jQuery)}(this,function t(e,i){"use strict";function a(t){var e=v[u.locale];return e?e[t]:v.en[t]}function o(t,i,a){t.stopPropagation(),t.preventDefault();var o=e.isFunction(a)&&a.call(i,t)===!1;o||i.modal("hide")}function n(t){var e,i=0;for(e in t)i++;return i}function s(t,i){var a=0;e.each(t,function(t,e){i(t,e,a++)})}function r(t){var i,a;if("object"!=typeof t)throw new Error("Please supply an object of options");if(!t.message)throw new Error("Please specify a message");return t=e.extend({},u,t),t.buttons||(t.buttons={}),i=t.buttons,a=n(i),s(i,function(t,o,n){if(e.isFunction(o)&&(o=i[t]={callback:o}),"object"!==e.type(o))throw new Error("button with key "+t+" must be an object");o.label||(o.label=t),o.className||(2===a&&("ok"===t||"confirm"===t)||1===a?o.className="btn-primary":o.className="btn-default")}),t}function l(t,e){var i=t.length,a={};if(1>i||i>2)throw new Error("Invalid argument length");return 2===i||"string"==typeof t[0]?(a[e[0]]=t[0],a[e[1]]=t[1]):a=t[0],a}function d(t,i,a){return e.extend(!0,{},t,l(i,a))}function c(t,e,i,a){var o={className:"bootbox-"+t,buttons:p.apply(null,e)};return h(d(o,a,i),e)}function p(){for(var t={},e=0,i=arguments.length;i>e;e++){var o=arguments[e],n=o.toLowerCase(),s=o.toUpperCase();t[n]={label:a(s)}}return t}function h(t,e){var a={};return s(e,function(t,e){a[e]=!0}),s(t.buttons,function(t){if(a[t]===i)throw new Error("button key "+t+" is not allowed (options are "+e.join("\n")+")")}),t}var f={dialog:"
",header:"
",footer:"",closeButton:"",form:"",inputs:{text:"",textarea:"",email:"",select:"",checkbox:"",date:"",time:"",number:"",password:""}},u={locale:e.zui&&e.zui.clientLang?e.zui.clientLang():"zh_cn",backdrop:"static",animate:!0,className:null,closeButton:!0,show:!0,container:"body"},g={};g.alert=function(){var t;if(t=c("alert",["ok"],["message","callback"],arguments),t.callback&&!e.isFunction(t.callback))throw new Error("alert requires callback property to be a function when provided");return t.buttons.ok.callback=t.onEscape=function(){return e.isFunction(t.callback)?t.callback.call(this):!0},g.dialog(t)},g.confirm=function(){var t;if(t=c("confirm",["confirm","cancel"],["message","callback"],arguments),t.buttons.cancel.callback=t.onEscape=function(){return t.callback.call(this,!1)},t.buttons.confirm.callback=function(){return t.callback.call(this,!0)},!e.isFunction(t.callback))throw new Error("confirm requires a callback");return g.dialog(t)},g.prompt=function(){var t,a,o,n,r,l,c;if(n=e(f.form),a={className:"bootbox-prompt",buttons:p("cancel","confirm"),value:"",inputType:"text"},t=h(d(a,arguments,["title","callback"]),["confirm","cancel"]),l=t.show===i?!0:t.show,t.message=n,t.buttons.cancel.callback=t.onEscape=function(){return t.callback.call(this,null)},t.buttons.confirm.callback=function(){var i;switch(t.inputType){case"text":case"textarea":case"email":case"select":case"date":case"time":case"number":case"password":i=r.val();break;case"checkbox":var a=r.find("input:checked");i=[],s(a,function(t,a){i.push(e(a).val())})}return t.callback.call(this,i)},t.show=!1,!t.title)throw new Error("prompt requires a title");if(!e.isFunction(t.callback))throw new Error("prompt requires a callback");if(!f.inputs[t.inputType])throw new Error("invalid prompt type");switch(r=e(f.inputs[t.inputType]),t.inputType){case"text":case"textarea":case"email":case"date":case"time":case"number":case"password":r.val(t.value);break;case"select":var u={};if(c=t.inputOptions||[],!e.isArray(c))throw new Error("Please pass an array of input options");if(!c.length)throw new Error("prompt with select requires options");s(c,function(t,a){var o=r;if(a.value===i||a.text===i)throw new Error("given options in wrong format");a.group&&(u[a.group]||(u[a.group]=e("").attr("label",a.group)),o=u[a.group]),o.append("")}),s(u,function(t,e){r.append(e)}),r.val(t.value);break;case"checkbox":var v=e.isArray(t.value)?t.value:[t.value];if(c=t.inputOptions||[],!c.length)throw new Error("prompt with checkbox requires options");if(!c[0].value||!c[0].text)throw new Error("given options in wrong format");r=e(""),s(c,function(i,a){var o=e(f.inputs[t.inputType]);o.find("input").attr("value",a.value),o.find("label").append(a.text),s(v,function(t,e){e===a.value&&o.find("input").prop("checked",!0)}),r.append(o)})}return t.placeholder&&r.attr("placeholder",t.placeholder),t.pattern&&r.attr("pattern",t.pattern),t.maxlength&&r.attr("maxlength",t.maxlength),n.append(r),n.on("submit",function(t){t.preventDefault(),t.stopPropagation(),o.find(".btn-primary").click()}),o=g.dialog(t),o.off("shown.zui.modal"),o.on("shown.zui.modal",function(){r.focus()}),l===!0&&o.modal("show"),o},g.dialog=function(t){t=r(t);var a=e(f.dialog),n=a.find(".modal-dialog"),l=a.find(".modal-body"),d=t.buttons,c="",p={onEscape:t.onEscape};if(e.fn.modal===i)throw new Error("$.fn.modal is not defined; please double check you have included the Bootstrap JavaScript library. See http://getbootstrap.com/javascript/ for more details.");if(s(d,function(t,e){c+="",p[t]=e.callback}),l.find(".bootbox-body").html(t.message),t.animate===!0&&a.addClass("fade"),t.className&&a.addClass(t.className),"large"===t.size?n.addClass("modal-lg"):"small"===t.size&&n.addClass("modal-sm"),t.title&&l.before(f.header),t.closeButton){var h=e(f.closeButton);t.title?a.find(".modal-header").prepend(h):h.css("margin-top","-10px").prependTo(l)}return t.title&&a.find(".modal-title").html(t.title),c.length&&(l.after(f.footer),a.find(".modal-footer").html(c)),a.on("hidden.zui.modal",function(t){t.target===this&&a.remove()}),a.on("shown.zui.modal",function(){a.find(".btn-primary:first").focus()}),"static"!==t.backdrop&&a.on("click.dismiss.zui.modal",function(t){a.children(".modal-backdrop").length&&(t.currentTarget=a.children(".modal-backdrop").get(0)),t.target===t.currentTarget&&a.trigger("escape.close.bb")}),a.on("escape.close.bb",function(t){p.onEscape&&o(t,a,p.onEscape)}),a.on("click",".modal-footer button",function(t){var i=e(this).data("bb-handler");o(t,a,p[i])}),a.on("click",".bootbox-close-button",function(t){o(t,a,p.onEscape)}),a.on("keyup",function(t){27===t.which&&a.trigger("escape.close.bb")}),e(t.container).append(a),a.modal({backdrop:t.backdrop?"static":!1,keyboard:!1,show:!1}),t.show&&a.modal("show"),a},g.setDefaults=function(){var t={};2===arguments.length?t[arguments[0]]=arguments[1]:t=arguments[0],e.extend(u,t)},g.hideAll=function(){return e(".bootbox").modal("hide"),g};var v={en:{OK:"OK",CANCEL:"Cancel",CONFIRM:"OK"},zh_cn:{OK:"确认",CANCEL:"取消",CONFIRM:"确认"},zh_tw:{OK:"確認",CANCEL:"取消",CONFIRM:"確認"}};return g.addLocale=function(t,i){return e.each(["OK","CANCEL","CONFIRM"],function(t,e){if(!i[e])throw new Error("Please supply a translation for '"+e+"'")}),v[t]={OK:i.OK,CANCEL:i.CANCEL,CONFIRM:i.CONFIRM},g},g.removeLocale=function(t){return delete v[t],g},g.setLocale=function(t){return g.setDefaults("locale",t)},g.init=function(i){return t(i||e)},g}),function(t){"use strict";var e=function(e,i){this.$=t(e),this.options=this.getOptions(i),this.init()};e.DEFAULTS={container:"body",move:!0},e.prototype.getOptions=function(i){return i=t.extend({},e.DEFAULTS,this.$.data(),i)},e.prototype.init=function(){this.handleMouseEvents()},e.prototype.handleMouseEvents=function(){var e,i,a,o,n,s=this.$,r="before",l="drag",d="finish",c=this.options,p=function(l){if(c.hasOwnProperty(r)&&t.isFunction(c[r])){var d=c[r]({event:l,element:s});if(void 0!==d&&!d)return}var p=t(c.container),u=s.offset();i=p.offset(),e={x:l.pageX,y:l.pageY},a={x:l.pageX-u.left+i.left,y:l.pageY-u.top+i.top},o=t.extend({},e),n=!1,s.addClass("drag-ready"),t(document).bind("mousemove",h).bind("mouseup",f),l.preventDefault(),c.stopPropagation&&l.stopPropagation()},h=function(i){n=!0;var r=i.pageX,d=i.pageY,p={left:r-a.x,top:d-a.y};s.removeClass("drag-ready").addClass("dragging"),c.move&&s.css(p),c.hasOwnProperty(l)&&t.isFunction(c[l])&&c[l]({event:i,element:s,startOffset:a,pos:p,offset:{x:r-e.x,y:d-e.y},smallOffset:{x:r-o.x,y:d-o.y}}),o.x=r,o.y=d,c.stopPropagation&&i.stopPropagation()},f=function(i){if(t(document).unbind("mousemove",h).unbind("mouseup",f),!n)return void s.removeClass("drag-ready");var r={left:i.pageX-a.x,top:i.pageY-a.y};s.removeClass("drag-ready").removeClass("dragging"),c.move&&s.css(r),c.hasOwnProperty(d)&&t.isFunction(c[d])&&c[d]({event:i,element:s,pos:r,offset:{x:i.pageX-e.x,y:i.pageY-e.y},smallOffset:{x:i.pageX-o.x,y:i.pageY-o.y}}),i.preventDefault(),c.stopPropagation&&i.stopPropagation()};c.handle?s.on("mousedown",c.handle,p):s.on("mousedown",p)},t.fn.draggable=function(i){return this.each(function(){var a=t(this),o=a.data("zui.draggable"),n="object"==typeof i&&i;o||a.data("zui.draggable",o=new e(this,n)),"string"==typeof i&&o[i]()})},t.fn.draggable.Constructor=e}(jQuery),function(t){"use strict";function e(e,i){if(e===!1)return e;if(!e)return i;e===!0?e={add:!0,"delete":!0,edit:!0,sort:!0}:"string"==typeof e&&(e=e.split(","));var a;return t.isArray(e)&&(a={},t.each(e,function(e,i){t.isPlainObject(i)?a[i.action]=i:a[i]=!0}),e=a),t.isPlainObject(e)&&(a={},t.each(e,function(e,i){i&&(a[e]=t.extend({type:e},s[e],t.isPlainObject(i)?i:null))}),e=a),i?t.extend(!0,{},i,e):e}function i(e,i,a){return i=i||e.type,t(a||e.template).addClass("tree-action").attr(t.extend({"data-type":i,title:e.title||""},e.attr)).data("action",e)}var a="zui.tree",o=0,n=function(e,i){this.name=a,this.$=t(e),this.getOptions(i),this._init()},s={sort:{template:''},add:{template:''},edit:{template:''},"delete":{template:''}};n.DEFAULTS={animate:null,initialState:"normal",toggleTemplate:''},n.prototype.add=function(e,i){var a,o=t(e),n=this.options;if(o.is("li")?(a=o.children("ul"),a.length||(a=t("