").append(c.clone()).html()),g()):(d.html(c),g());else if(o.url){var v=function(){var t=l.callComEvent(r,"broken");t&&(d.html(t),g())};if(l.attr("ref",o.url),"iframe"===o.type){l.addClass("modal-iframe"),this.firstLoad=!0;var y="iframe-"+o.name;u.detach(),d.detach(),p.empty().append(u).append(d),d.css("padding",0).html('
'),o.waittime>0&&(r.waitTimeout=g(o.waittime,v));var b=document.getElementById(y);b.onload=b.onreadystatechange=function(){var i=!!o.scrollInside;if(r.firstLoad&&l.addClass("modal-loading"),!this.readyState||"complete"==this.readyState){r.firstLoad=!1,o.waittime>0&&clearTimeout(r.waitTimeout);try{l.attr("ref",b.contentWindow.location.href);var s=e.frames[y].$;if(s&&"auto"===o.height&&"fullscreen"!=o.size){var a=s("body").addClass("body-modal").toggleClass("body-modal-scroll-inside",i);o.iframeBodyClass&&a.addClass(o.iframeBodyClass);var h=function(n){l.removeClass("fade");var s=a.outerHeight();if(n===!0&&o.onlyIncreaseHeight&&(s=Math.max(s,d.data("minModalHeight")||0),d.data("minModalHeight",s)),i){var r=t(e).height();s=Math.min(s,r-u.height())}d.css("height",s),o.fade&&l.addClass("fade"),g()};l.callComEvent(r,"loaded",{modalType:"iframe",jQuery:s}),setTimeout(h,100),a.off("resize."+n).on("resize."+n,h),i&&t(e).off("resize."+n).on("resize."+n,h)}else g()}catch(c){g()}}}}else t.ajax(t.extend({url:o.url,success:function(i){try{var n=t(i);n.filter(".modal-dialog").length?h.replaceWith(n):n.filter(".modal-content").length?h.find(".modal-content").replaceWith(n):d.wrapInner(n)}catch(o){e.console&&e.console.warn&&console.warn("ZUI: Cannot recogernize remote content.",{error:o,data:i}),l.html(i)}l.callComEvent(r,"loaded",{modalType:s}),g()},error:v},o.ajaxOptions))}l.modal({show:"show",backdrop:o.backdrop,moveable:o.moveable,rememberPos:o.rememberPos,keyboard:o.keyboard})},r.prototype.close=function(i,n){var s=this;(i||n)&&s.$modal.on("hidden"+o,function(){t.isFunction(i)&&i(),typeof n===a&&n.length&&!s.$modal.data("cancel-reload")&&("this"===n?e.location.reload():e.location=n)}),s.$modal.modal("hide")},r.prototype.toggle=function(t){this.isShown?this.close():this.show(t)},r.prototype.ajustPosition=function(e){e=e===i?this.options.position:e,t.isFunction(e)&&(e=e(this)),this.$modal.modal("ajustPosition",e)},t.zui({ModalTrigger:r,modalTrigger:new r}),t.fn.modalTrigger=function(e,i){return t(this).each(function(){var s=t(this),o=s.data(n),l=t.extend({title:s.attr("title")||s.text(),url:s.attr("href"),type:s.hasClass("iframe")?"iframe":""},s.data(),t.isPlainObject(e)&&e);o||s.data(n,o=new r(l,s)),typeof e==a?o[e](i):l.show&&o.show(i),s.on((l.trigger||"click")+".toggle."+n,function(e){l=t.extend(l,{url:s.attr("href")||s.attr("data-url")||s.data("url")||l.url}),o.toggle(l),s.is("a")&&e.preventDefault()})})};var l=t.fn.modal;t.fn.modal=function(e,i){return t(this).each(function(){var n=t(this);n.hasClass("modal")?l.call(n,e,i):n.modalTrigger(e,i)})};var h=function(e){return e=t(e?e:".modal.modal-trigger"),e&&e instanceof t?e:null},c=function(i,s,o){var a=i;if(t.isFunction(i)){var r=o;o=s,s=i,i=r}i=h(i),i&&i.length?i.each(function(){t(this).data(n).close(s,o)}):t("body").hasClass("modal-open")||t(".modal.in").length||t("body").hasClass("body-modal")&&e.parent.$.zui.closeModal(a,s,o)},d=function(t,e){e=h(e),e&&e.length&&e.modal("ajustPosition",t)};t.zui({closeModal:c,ajustModalPosition:d}),t(document).on("click."+n+".data-api",'[data-toggle="modal"]',function(e){var i=t(this),s=i.attr("href"),o=null;try{o=t(i.attr("data-target")||s&&s.replace(/.*(?=#[^\s]+$)/,""))}catch(a){}o&&o.length||(i.data(n)?i.trigger(".toggle."+n):i.modalTrigger({show:!0})),i.is("a")&&e.preventDefault()}).on("click."+n+".data-api",'[data-dismiss="modal"]',function(){t.zui.closeModal()})}(window.jQuery,window,void 0),+function(t){"use strict";var e=function(t,e){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.init("tooltip",t,e)};e.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.prototype.init=function(e,i,n){this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(n);for(var s=this.options.trigger.split(" "),o=s.length;o--;){var a=s[o];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var r="hover"==a?"mouseenter":"focus",l="hover"==a?"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,n){i[t]!=n&&(e[t]=n)}),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((e||this.hasContent())&&this.enabled){var n=this;if(n.$element.trigger(i),i.isDefaultPrevented())return;var s=n.tip();n.setContent(e),n.options.animation&&s.addClass("fade");var o="function"==typeof n.options.placement?n.options.placement.call(n,s[0],n.$element[0]):n.options.placement,a=/\s?auto?\s?/i,r=a.test(o);r&&(o=o.replace(a,"")||"top"),s.detach().css({top:0,left:0,display:"block"}).addClass(o),n.options.container?s.appendTo(n.options.container):s.insertAfter(n.$element);var l=n.getPosition(),h=s[0].offsetWidth,c=s[0].offsetHeight;if(r){var d=n.$element.parent(),u=o,p=document.documentElement.scrollTop||document.body.scrollTop,f="body"==n.options.container?window.innerWidth:d.outerWidth(),g="body"==n.options.container?window.innerHeight:d.outerHeight(),m="body"==n.options.container?0:d.offset().left;o="bottom"==o&&l.top+l.height+c-p>g?"top":"top"==o&&l.top-p-c<0?"bottom":"right"==o&&l.right+h>f?"left":"left"==o&&l.left-h
'}),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(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](i),t.find(".popover-content")[this.options.html?"html":"text"](n),
+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,n=e.attr("data-target")||("function"==typeof i.target?i.target.call(e[0]):i.target);return!!n&&("$next"==n?e.next(".popover"):t(n))},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 n=t(this),s=n.data("zui.popover"),o="object"==typeof i&&i;s||n.data("zui.popover",s=new e(this,o)),"string"==typeof i&&s[i]()})},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(window.jQuery),+function(t){"use strict";function e(){t(s).remove(),t(o).each(function(e){var s=i(t(this));s.hasClass("open")&&(s.trigger(e=t.Event("hide."+n)),e.isDefaultPrevented()||s.removeClass("open").trigger("hidden."+n))})}function i(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var n;try{n=i&&t(i)}catch(s){}return n&&n.length?n:e.parent()}var n="zui.dropdown",s=".dropdown-backdrop",o="[data-toggle=dropdown]",a=function(e){t(e).on("click."+n,this.toggle)};a.prototype.toggle=function(s){var o=t(this);if(!o.is(".disabled, :disabled")){var a=i(o),r=a.hasClass("open");if(e(),!r){if("ontouchstart"in document.documentElement&&!a.closest(".navbar-nav").length&&t('