/*!

* Fuel UX v3.16.1 
* Copyright 2012-2017 ExactTarget
* Licensed under the BSD-3-Clause license (https://github.com/ExactTarget/fuelux/blob/master/LICENSE)
*/

!function(e){“function”==typeof define&&define.amd?define([“jquery”,“bootstrap”],e):e(jQuery)}(function(e){if(void 0===e)throw new Error(“Fuel UX’s JavaScript requires jQuery”);if(void 0===e.fn.dropdown||void 0===e.fn.collapse)throw new Error(“Fuel UX’s JavaScript requires Bootstrap”);!function(e){var t=e.fn.checkbox,i=function(e){window&&window.console&&window.console.error&&window.console.error(e)},s=function(t,s){this.options=e.extend({},e.fn.checkbox.defaults,s);var n=e(t);if(“label”===t.tagName.toLowerCase()){this.$label=n,this.$chk=this.$label.find(‘input[type=“checkbox”]’),this.$container=n.parent(“.checkbox”),!this.options.ignoreVisibilityCheck&&this.$chk.css(“visibility”).match(/hidden|collapse/)&&i(“For accessibility reasons, in order for tab and space to function on checkbox, checkbox ``‘s `visibility` must not be set to `hidden` or `collapse`. See https://github.com/ExactTarget/fuelux/pull/1996 for more details.”);var a=this.$chk.attr(“data-toggle”);this.$toggleContainer=e(a),this.$chk.on(“change”,e.proxy(this.itemchecked,this)),this.setInitialState()}else i(“Checkbox must be initialized on the `label` that wraps the `input` element. See https://github.com/ExactTarget/fuelux/blob/master/reference/markup/checkbox.html for example of proper markup. Call `.checkbox()` on the `

  • No Matches
  • ’)}},e.fn.combobox.Constructor=i,e.fn.combobox.noConflict=function(){return e.fn.combobox=t,this},e(document).on(“mousedown.fu.combobox.data-api”,“[data-initialize=combobox]”,function(t){var i=e(t.target).closest(“.combobox”);i.data(“fu.combobox”)||i.combobox(i.data())}),e(function(){e(“[data-initialize=combobox]”).each(function(){var t=e(this);t.data(“fu.combobox”)||t.combobox(t.data())})})}(e),function(e){var t=“moment.js is not available so you cannot use this function”,i=[],s=!1,n=e.fn.datepicker,a=!1,r=function(){var e,t;for(a=!0,e=0,t=i.length;e1)“/”+t(e.getDate())+“/”+e.getFullYear()},getCulture:function(){if(this.moment)return s.locale();throw t},getDate:function(){return this.selectedDate?this.selectedDate:new Date(NaN)},getFormat:function(){if(this.moment)return this.momentFormat;throw t},getFormattedDate:function(){return this.selectedDate?this.formatDate(this.selectedDate):“Invalid Date”},getRestrictedDates:function(){return this.restricted},inputChanged:function(){var e,t=this.$input.val();t!==this.inputValue&&(null===(e=this.setDate(t))?this.$element.trigger(“inputParsingFailed.fu.datepicker”,t):!1===e?this.$element.trigger(“inputRestrictedDate.fu.datepicker”,e):this.$element.trigger(“changed.fu.datepicker”,e))},show:function(){var e=this.selectedDate?this.selectedDate:new Date;this.changeView(“calendar”,e),this.$inputGroupBtn.addClass(“open”),this.$element.trigger(“shown.fu.datepicker”)},showDropdown:function(e){this.$input.is(“:focus”)||this.$inputGroupBtn.hasClass(“open”)||this.show()},hide:function(){this.$inputGroupBtn.removeClass(“open”),this.$element.trigger(“hidden.fu.datepicker”)},hideDropdown:function(){this.hide()},isInvalidDate:function(e){var t=e.toString();return“Invalid Date”===t||“NaN”===t},isRestricted:function(e,t,i){var s,n,a,r,l=this.restrictedParsed;if(this.sameYearOnly&&null!==this.yearRestriction&&i!==this.yearRestriction)return!0;for(s=0,a=l.length;sn.year||i===n.year&&t>n.month||i===n.year&&t===n.month&&e>=n.date)&&(i11){if(this.sameYearOnly)return;e=0,t++}this.renderMonth(new Date(t,e,1))},onYearScroll:function(t){if(!this.artificialScrolling){var i,s,n=e(t.currentTarget),a=“border-box”===n.css(“box-sizing”)?n.outerHeight():n.height(),r=n.get(0).scrollHeight,l=n.scrollTop(),o=a/(r-l)*100;if(l/r*100<5){for(i=(s=parseInt(n.find("li:first").attr("data-year"),10))-1;i>s-11;i–)n.prepend(‘
  • i
  • “);this.artificialScrolling=!0,n.scrollTop(n.get(0).scrollHeight-r+l),this.artificialScrolling=!1}else if(o>90)for(i=(s=parseInt(n.find(”li:last“).attr(”data-year“),10))+1;ii“”)}},parseDate:function(e){var t,i,n,a,r,l,o,d=this,h=new Date(NaN);if(e){if(this.moment)return a=function(e){var t=s(e,d.momentFormat);return!0===t.isValid()?t.toDate():h},n=function(e){var t=s(new Date(e));return!0===t.isValid()?t.toDate():h},r=function(e,t,i){var s=t(e);return d.isInvalidDate(s)?(s=i(e),d.isInvalidDate(s)?h:s):s},“string”==typeof e?r(e,a,n):r(e,n,a);if(“string”==typeof e){if(t=new Date(Date.parse(e)),!this.isInvalidDate(t))return t;if(e=e.split(“T”)[0],i=/^s*(d{4})-(dd)-(dd)s*$/,(o=i.exec(e))&&(l=parseInt(o[2],10),t=new Date(o[1],l-1,o[3]),l===t.getMonth()+1))return t}else if(t=new Date(e),!this.isInvalidDate(t))return t}return new Date(NaN)},prev:function(){var e=this.$headerTitle.attr(“data-month”),t=this.$headerTitle.attr(“data-year”);if(–e<0){if(this.sameYearOnly)return;e=11,t--}this.renderMonth(new Date(t,e,1))},renderMonth:function(t){t=t||new Date;var i,s,n,a,r,l,o,d,h,c,p,u=new Date(t.getFullYear(),t.getMonth(),1).getDay(),f=new Date(t.getFullYear(),t.getMonth()+1,0).getDate(),m=new Date(t.getFullYear(),t.getMonth(),0).getDate(),v=this.$headerTitle.find(".month"),g=t.getMonth(),$=new Date,b=$.getDate(),y=$.getMonth(),w=$.getFullYear(),C=this.selectedDate,x=this.$days.find("tbody"),k=t.getFullYear();for(C&&(C={date:C.getDate(),month:C.getMonth(),year:C.getFullYear()}),v.find(".current").removeClass("current"),v.find('span[data-month="'g’“]‘).addClass(”current“),this.$headerTitle.find(”.year“).text(k),this.$headerTitle.attr({”data-month“:g,”data-year“:k}),x.empty(),0!==u?(i=m-u+1,o=-1):(i=1,o=0),l=f<=35-u?5:6,a=0;a”),r=0;r<7;r++)c=e("“),-1===o?(c.addClass(”last-month“),d!==o&&c.addClass(”first“)):1===o&&(c.addClass(”next-month“),d!==o&&c.addClass(”first“)),n=k,(s=g+o)<0?(s=11,n--):s>11&&(s=0,n++),c.attr({”data-date“:i,”data-month“:s,”data-year“:n}),n===w&&s===y&&i===b?c.addClass(”current-day“):(ni“):c.html(‘“),i++,h=d,d=o,-1===o&&i>m?(i=1,h!==(o=0)&&c.addClass(”last“)):0===o&&i>f&&(i=1,h!==(o=1)&&c.addClass(”last“)),a===l-1&&6===r&&c.addClass(”last“),p.append©;x.append(p)}},renderWheel:function(e){var t,i,s,n=e.getMonth(),a=this.$wheelsMonth.find(”ul“),r=e.getFullYear(),l=this.$wheelsYear.find(”ul“);for(this.sameYearOnly?(this.$wheelsMonth.addClass(”full“),this.$wheelsYear.addClass(”hidden“)):(this.$wheelsMonth.removeClass(”full“),this.$wheelsYear.removeClass(”hide hidden“)),a.find(”.selected“).removeClass(”selected“),(i=a.find(‘li[data-month=”’n‘“]’)).addClass(”selected“),a.scrollTop(a.scrollTop()+(i.position().top-a.outerHeight()/2-i.outerHeight(!0)/2)),l.empty(),t=r-10;tt“”);(s=l.find(’li[data-year=“‘r’”]‘)).addClass(“selected”),this.artificialScrolling=!0,l.scrollTop(l.scrollTop()+(s.position().top-l.outerHeight()/2-s.outerHeight(!0)/2)),this.artificialScrolling=!1,i.find(“button”).focus()},selectClicked:function(){var e=this.$wheelsMonth.find(“.selected”).attr(“data-month”),t=this.$wheelsYear.find(“.selected”).attr(“data-year”);this.changeView(“calendar”,new Date(t,e,1))},setCulture:function(e){if(!e)return!1;if(!this.moment)throw t;s.locale(e)},setDate:function(e){var t=this.parseDate(e);return this.isInvalidDate(t)?(this.selectedDate=null,this.renderMonth()):this.isRestricted(t.getDate(),t.getMonth(),t.getFullYear())?(this.selectedDate=!1,this.renderMonth()):(this.selectedDate=t,this.renderMonth(t),this.$input.val(this.formatDate(t))),this.inputValue=this.$input.val(),this.selectedDate},setFormat:function(e){if(!e)return!1;if(!this.moment)throw t;this.momentFormat=e},setRestrictedDates:function(e){var t,i,s=[],n=this,a=function(e){return e===-1/0?{date:-1/0,month:-1/0,year:-1/0}:e===1/0?{date:1/0,month:1/0,year:1/0}:(e=n.parseDate(e),{date:e.getDate(),month:e.getMonth(),year:e.getFullYear()})};for(this.restricted=e,t=0,i=e.length;t=i.fromTop&&i.dropdownHeight>=i.fromBottom?i.fromTop>=i.fromBottom:void 0))}function s(t){var i,s=t.attr(“data-target”),n=!0;return s?“window”!==s&&(i=e(s),n=!1):e.each(t.parents(),function(t,s){if(“visible”!==e(s).css(“overflow”))return i=s,n=!1,!1}),n&&(i=window),{overflowElement:e(i),isWindow:n}}e(document).on(“click.fu.dropdown-autoflip”,“[data-toggle=dropdown][data-flip]”,function(i){“auto”===e(this).data().flip&&t(e(this).next(“.dropdown-menu”))}),e(document).on(“suggested.fu.pillbox”,function(i,s){t(e(s)),e(s).parent().addClass(“open”)}),e.fn.dropdownautoflip=function(){}}(e),function(e){var t=e.fn.loader,i=function(t,i){this.$element=e(t),this.options=e.extend({},e.fn.loader.defaults,i)};i.prototype={constructor:i,destroy:function(){return this.$element.remove(),this.$element[0].outerHTML},ieRepaint:function(){},msieVersion:function(){},next:function(){},pause:function(){},play:function(){},previous:function(){},reset:function(){}},e.fn.loader=function(t){var s,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data(“fu.loader”),l=“object”==typeof t&&t;r||a.data(“fu.loader”,r=new i(this,l)),“string”==typeof t&&(s=r[t].apply(r,n))});return void 0===s?a:s},e.fn.loader.defaults={},e.fn.loader.Constructor=i,e.fn.loader.noConflict=function(){return e.fn.loader=t,this},e(function(){e(“[data-initialize=loader]”).each(function(){var t=e(this);t.data(“fu.loader”)||t.loader(t.data())})})}(e),function(e){var t=e.fn.placard,i={accepted:“onAccept”,cancelled:“onCancel”},s=function(t,i){var s=this;this.$element=e(t),this.options=e.extend({},e.fn.placard.defaults,i),“true”===this.$element.attr(“data-ellipsis”)&&(this.options.applyEllipsis=!0),this.$accept=this.$element.find(“.placard-accept”),this.$cancel=this.$element.find(“.placard-cancel”),this.$field=this.$element.find(“.placard-field”),this.$footer=this.$element.find(“.placard-footer”),this.$header=this.$element.find(“.placard-header”),this.$popup=this.$element.find(“.placard-popup”),this.actualValue=null,this.clickStamp=“_”,this.previousValue=“”,-1===this.options.revertOnCancel&&(this.options.revertOnCancel=this.$accept.length>0),this.isContentEditableDiv=this.$field.is(“div”),this.isInput=this.$field.is(“input”),this.divInTextareaMode=this.isContentEditableDiv&&“true”===this.$field.attr(“data-textarea”),this.$field.on(“focus.fu.placard”,e.proxy(this.show,this)),this.$field.on(“keydown.fu.placard”,e.proxy(this.keyComplete,this)),this.$element.on(“close.fu.placard”,e.proxy(this.hide,this)),this.$accept.on(“click.fu.placard”,e.proxy(this.complete,this,“accepted”)),this.$cancel.on(“click.fu.placard”,function(e){e.preventDefault(),s.complete(“cancelled”)}),this.applyEllipsis()},n=function(e){return e.$element.hasClass(“showing”)},a=function(){var t;if((t=e(document).find(“.placard.showing”)).length>0){if(t.data(“fu.placard”)&&t.data(“fu.placard”).options.explicit)return!1;t.placard(“externalClickListener”,{},!0)}return!0};s.prototype={constructor:s,complete:function(e){var t=this.options[i[e]],s={previousValue:this.previousValue,value:this.getValue()};t?(t(s),this.$element.trigger(e+“.fu.placard”,s)):(“cancelled”===e&&this.options.revertOnCancel&&this.setValue(this.previousValue,!0),this.$element.trigger(e+“.fu.placard”,s),this.hide())},keyComplete:function(e){(this.isContentEditableDiv&&!this.divInTextareaMode||this.isInput)&&13===e.keyCode?(this.complete(“accepted”),this.$field.blur()):27===e.keyCode&&(this.complete(“cancelled”),this.$field.blur())},destroy:function(){return this.$element.remove(),e(document).off(“click.fu.placard.externalClick.”+this.clickStamp),this.$element.find(“input”).each(function(){e(this).attr(“value”,e(this).val())}),this.$element[0].outerHTML},disable:function(){this.$element.addClass(“disabled”),this.$field.attr(“disabled”,“disabled”),this.isContentEditableDiv&&this.$field.removeAttr(“contenteditable”),this.hide()},applyEllipsis:function(){var e,t,i;if(this.options.applyEllipsis)if(e=this.$field.get(0),this.isContentEditableDiv&&!this.divInTextareaMode||this.isInput)e.scrollLeft=0;else if(e.scrollTop=0,e.clientHeight=e.scrollHeight;)i+=this.actualValue[t],this.setValue(i+“…”,!0),t++;i=i.length>0?i.substring(0,i.length-1):“”,this.setValue(i+“…”,!0)}},enable:function(){this.$element.removeClass(“disabled”),this.$field.removeAttr(“disabled”),this.isContentEditableDiv&&this.$field.attr(“contenteditable”,“true”)},externalClickListener:function(e,t){(!0===t||this.isExternalClick(e))&&this.complete(this.options.externalClickAction)},getValue:function(){return null!==this.actualValue?this.actualValue:this.isContentEditableDiv?this.$field.html():this.$field.val()},hide:function(){this.$element.hasClass(“showing”)&&(this.$element.removeClass(“showing”),this.applyEllipsis(),e(document).off(“click.fu.placard.externalClick.”+this.clickStamp),this.$element.trigger(“hidden.fu.placard”))},isExternalClick:function(t){var i,s,n=this.$element.get(0),a=this.options.externalClickExceptions||[],r=e(t.target);if(t.target===n||r.parents(“.placard:first”).get(0)===n)return!1;for(i=0,s=a.length;i0)return!1;return!0},setValue:function(e,t){return void 0===t&&(t=!this.options.applyEllipsis),this.isContentEditableDiv?this.$field.empty().append(e):this.$field.val(e),t||n(this)||this.applyEllipsis(),this.$field},show:function(){n(this)||a()&&(this.previousValue=this.isContentEditableDiv?this.$field.html():this.$field.val(),null!==this.actualValue&&(this.setValue(this.actualValue,!0),this.actualValue=null),this.showPlacard())},showPlacard:function(){this.$element.addClass(“showing”),this.$header.length>0&&this.$popup.css(“top”,“-”+this.$header.outerHeight(!0)+“px”),this.$footer.length>0&&this.$popup.css(“bottom”,“-”+this.$footer.outerHeight(!0)+“px”),this.$element.trigger(“shown.fu.placard”),this.clickStamp=(new Date).getTime()+(Math.floor(100*Math.random())+1),this.options.explicit||e(document).on(“click.fu.placard.externalClick.”+this.clickStamp,e.proxy(this.externalClickListener,this))}},e.fn.placard=function(t){var i,n=Array.prototype.slice.call(arguments,1),a=this.each(function(){var a=e(this),r=a.data(“fu.placard”),l=“object”==typeof t&&t;r||a.data(“fu.placard”,r=new s(this,l)),“string”==typeof t&&(i=r[t].apply(r,n))});return void 0===i?a:i},e.fn.placard.defaults={onAccept:void 0,onCancel:void 0,externalClickAction:“cancelled”,externalClickExceptions:[],explicit:!1,revertOnCancel:-1,applyEllipsis:!1},e.fn.placard.Constructor=s,e.fn.placard.noConflict=function(){return e.fn.placard=t,this},e(document).on(“focus.fu.placard.data-api”,“[data-initialize=placard]”,function(t){var i=e(t.target).closest(“.placard”);i.data(“fu.placard”)||i.placard(i.data())}),e(function(){e(“[data-initialize=placard]”).each(function(){var t=e(this);t.data(“fu.placard”)||t.placard(t.data())})})}(e),function(e){var t=e.fn.radio,i=function(e){window&&window.console&&window.console.error&&window.console.error(e)},s=function(t,s){if(this.options=e.extend({},e.fn.radio.defaults,s),“label”===t.tagName.toLowerCase()){this.$label=e(t),this.$radio=this.$label.find(’input[type=“radio”]‘),this.groupName=this.$radio.attr(“name”),!this.options.ignoreVisibilityCheck&&this.$radio.css(“visibility”).match(/hidden|collapse/)&&i(“For accessibility reasons, in order for tab and space to function on radio, `visibility` must not be set to `hidden` or `collapse`. See https://github.com/ExactTarget/fuelux/pull/1996 for more details.”);var n=this.$radio.attr(“data-toggle”);this.$toggleContainer=e(n),this.$radio.on(“change”,e.proxy(this.itemchecked,this)),this.setInitialState()}else i(“Radio must be initialized on the `label` that wraps the `input` element. See https://github.com/ExactTarget/fuelux/blob/master/reference/markup/radio.html for example of proper markup. Call `.radio()` on the `