snipe-it/public/js/vendor.js

12 lines
330 KiB
JavaScript
Raw Normal View History

if("undefined"==typeof jQuery)throw new Error("AdminLTE requires jQuery");+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),r=o.data(i);if(!r){var s=t.extend({},n,o.data(),"object"==typeof e&&e);o.data(i,r=new a(o,s))}if("string"==typeof r){if(void 0===r[e])throw new Error("No method named "+e);r[e]()}})}var i="lte.boxrefresh",n={source:"",params:{},trigger:".refresh-btn",content:".box-body",loadInContent:!0,responseType:"",overlayTemplate:'<div class="overlay"><div class="fa fa-refresh fa-spin"></div></div>',onLoadStart:function(){},onLoadDone:function(t){return t}},o={data:'[data-widget="box-refresh"]'},a=function(e,i){if(this.element=e,this.options=i,this.$overlay=t(i.overlay),""===i.source)throw new Error("Source url was not defined. Please specify a url in your BoxRefresh source option.");this._setUpListeners(),this.load()};a.prototype.load=function(){this._addOverlay(),this.options.onLoadStart.call(t(this)),t.get(this.options.source,this.options.params,function(e){this.options.loadInContent&&t(this.options.content).html(e),this.options.onLoadDone.call(t(this),e),this._removeOverlay()}.bind(this),""!==this.options.responseType&&this.options.responseType)},a.prototype._setUpListeners=function(){t(this.element).on("click",o.trigger,function(t){t&&t.preventDefault(),this.load()}.bind(this))},a.prototype._addOverlay=function(){t(this.element).append(this.$overlay)},a.prototype._removeOverlay=function(){t(this.element).remove(this.$overlay)};var r=t.fn.boxRefresh;t.fn.boxRefresh=e,t.fn.boxRefresh.Constructor=a,t.fn.boxRefresh.noConflict=function(){return t.fn.boxRefresh=r,this},t(window).on("load",function(){t(o.data).each(function(){e.call(t(this))})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var o=t(this),a=o.data(i);if(!a){var r=t.extend({},n,o.data(),"object"==typeof e&&e);o.data(i,a=new s(o,r))}if("string"==typeof e){if(void 0===a[e])throw new Error("No method named "+e);a[e]()}})}var i="lte.boxwidget",n={animationSpeed:500,collapseTrigger:'[data-widget="collapse"]',removeTrigger:'[data-widget="remove"]',collapseIcon:"fa-minus",expandIcon:"fa-plus",removeIcon:"fa-times"},o={data:".box",collapsed:".collapsed-box",header:".box-header",body:".box-body",footer:".box-footer",tools:".box-tools"},a={collapsed:"collapsed-box"},r={collapsed:"collapsed.boxwidget",expanded:"expanded.boxwidget",removed:"removed.boxwidget"},s=function(t,e){this.element=t,this.options=e,this._setUpListeners()};s.prototype.toggle=function(){t(this.element).is(o.collapsed)?this.expand():this.collapse()},s.prototype.expand=function(){var e=t.Event(r.expanded),i=this.options.collapseIcon,n=this.options.expandIcon;t(this.element).removeClass(a.collapsed),t(this.element).children(o.header+", "+o.body+", "+o.footer).children(o.tools).find("."+n).removeClass(n).addClass(i),t(this.element).children(o.body+", "+o.footer).slideDown(this.options.animationSpeed,function(){t(this.element).trigger(e)}.bind(this))},s.prototype.collapse=function(){var e=t.Event(r.collapsed),i=this.options.collapseIcon,n=this.options.expandIcon;t(this.element).children(o.header+", "+o.body+", "+o.footer).children(o.tools).find("."+i).removeClass(i).addClass(n),t(this.element).children(o.body+", "+o.footer).slideUp(this.options.animationSpeed,function(){t(this.element).addClass(a.collapsed),t(this.element).trigger(e)}.bind(this))},s.prototype.remove=function(){var e=t.Event(r.removed);t(this.element).slideUp(this.options.animationSpeed,function(){t(this.element).trigger(e),t(this.element).remove()}.bind(this))},s.prototype._setUpListeners=function(){var e=this;t(this.element).on("click",this.options.collapseTrigger,function(i){return i&&i.preventDefault(),e.toggle(t(this)),!1}),t(this.element).on("click",this.options.removeTrigger,function(i){return i&&i.preventDefault(),e.remove(t(this)),!1})};var l=t.fn.boxWidget;t.fn.boxWidget=e,t.fn.boxWidget.Constructor=s,t.fn.boxWidget.noConflict=function(){return t.fn.boxWidget=l,this},t(window).on("load",function(){t(o.data).each(function(){e.call(t(this))})})}(jQuery),func
;var n=e.cache("target-offsetparent",function(){return a(e.target)});a(e.element)!==n&&T(function(){e.element.parentNode.removeChild(e.element),n.appendChild(e.element)}),h(i.offset,t.offset),c=!0}():(u.position="absolute",h({top:!0,left:!0},t.page)),!c)if(this.options.bodyElement)this.element.parentNode!==this.options.bodyElement&&this.options.bodyElement.appendChild(this.element);else{for(var f=!0,p=this.element.parentNode;p&&1===p.nodeType&&"BODY"!==p.tagName&&!function(t){var e=t.ownerDocument;return(e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement||e.msFullscreenElement)===t}(p);){if("static"!==getComputedStyle(p).position){f=!1;break}p=p.parentNode}f||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var m={},v=!1;for(var o in u){var b=u[o];this.element.style[o]!==b&&(v=!0,m[o]=b)}v&&T(function(){s(e.element.style,m),e.trigger("repositioned")})}}}]),u}(A);j.modules=[],w.position=R;var q=s(j,w),I=function(){function t(t,e){var i=[],n=!0,o=!1,a=void 0;try{for(var r,s=t[Symbol.iterator]();!(n=(r=s.next()).done)&&(i.push(r.value),!e||i.length!==e);n=!0);}catch(t){o=!0,a=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw a}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),O=w.Utils,o=O.getBounds,s=O.extend,f=O.updateClasses,T=O.defer,Y=["left","top","right","bottom"];w.modules.push({position:function(t){var e=this,i=t.top,n=t.left,a=t.targetAttachment;if(!this.options.constraints)return!0;var r=this.cache("element-bounds",function(){return o(e.element)}),l=r.height,d=r.width;if(0===d&&0===l&&void 0!==this.lastSize){var u=this.lastSize;d=u.width,l=u.height}var h=this.cache("target-bounds",function(){return e.getTargetBounds()}),c=h.height,p=h.width,g=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(t){var e=t.outOfBoundsClass,i=t.pinnedClass;e&&g.push(e),i&&g.push(i)}),g.forEach(function(t){["left","top","right","bottom"].forEach(function(e){g.push(t+"-"+e)})});var m=[],v=s({},a),b=s({},this.attachment);return this.options.constraints.forEach(function(t){var o=t.to,r=t.attachment,s=t.pin;void 0===r&&(r="");var u=void 0,h=void 0;if(r.indexOf(" ")>=0){var f=r.split(" "),g=I(f,2);h=g[0],u=g[1]}else u=h=r;var x=y(e,o);"target"!==h&&"both"!==h||(i<x[1]&&"top"===v.top&&(i+=c,v.top="bottom"),i+l>x[3]&&"bottom"===v.top&&(i-=c,v.top="top")),"together"===h&&("top"===v.top&&("bottom"===b.top&&i<x[1]?(i+=c,v.top="bottom",i+=l,b.top="top"):"top"===b.top&&i+l>x[3]&&i-(l-c)>=x[1]&&(i-=l-c,v.top="bottom",b.top="bottom")),"bottom"===v.top&&("top"===b.top&&i+l>x[3]?(i-=c,v.top="top",i-=l,b.top="bottom"):"bottom"===b.top&&i<x[1]&&i+(2*l-c)<=x[3]&&(i+=l-c,v.top="top",b.top="top")),"middle"===v.top&&(i+l>x[3]&&"top"===b.top?(i-=l,b.top="bottom"):i<x[1]&&"bottom"===b.top&&(i+=l,b.top="top"))),"target"!==u&&"both"!==u||(n<x[0]&&"left"===v.left&&(n+=p,v.left="right"),n+d>x[2]&&"right"===v.left&&(n-=p,v.left="left")),"together"===u&&(n<x[0]&&"left"===v.left?"right"===b.left?(n+=p,v.left="right",n+=d,b.left="left"):"left"===b.left&&(n+=p,v.left="right",n-=d,b.left="right"):n+d>x[2]&&"right"===v.left?"left"===b.left?(n-=p,v.left="left",n-=d,b.left="right"):"right"===b.left&&(n-=p,v.left="left",n+=d,b.left="left"):"center"===v.left&&(n+d>x[2]&&"left"===b.left?(n-=d,b.left="right"):n<x[0]&&"right"===b.left&&(n+=d,b.left="left"))),"element"!==h&&"both"!==h||(i<x[1]&&"bottom"===b.top&&(i+=l,b.top="top"),i+l>x[3]&&"top"===b.top&&(i-=l,b.top="bottom")),"element"!==u&&"both"!==u||(n<x[0]&&("right"===b.left?(n+=d,b.left="left"):"center"===b.left&&(n+=d/2,b.left="left")),n+d>x[2]&&("left"===b.left?(n-=d,b.left="right"):"center"===b.left&&(n-=d/2,b.left="right"))),"string"==typeof s?s=s.split(",").map(function(t){return t.trim()}):!0===s&&(s=["top","left","right","bottom"]),s=s||[];var w=[],k=[];i<x[1]&&(s.indexOf("top")>=0?(i=x[1],w.push("top")):k.push("top")),i+l>x[3]&&(s.indexOf("bot
black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32",transparent:"transparent"},e.prototype={constructor:e,colors:{},predefinedColors:{},getValue:function(){return this.value},setValue:function(t){this.value=t},_sanitizeNumber:function(t){return"number"==typeof t?t:isNaN(t)||null===t||""===t||void 0===t?1:""===t?0:void 0!==t.toLowerCase?(t.match(/^\./)&&(t="0"+t),Math.ceil(100*parseFloat(t))/100):1},isTransparent:function(t){return!(!t||!("string"==typeof t||t instanceof String))&&("transparent"===(t=t.toLowerCase().trim())||t.match(/#?00000000/)||t.match(/(rgba|hsla)\(0,0,0,0?\.?0\)/))},rgbaIsTransparent:function(t){return 0===t.r&&0===t.g&&0===t.b&&0===t.a},setColor:function(t){if(t=t.toLowerCase().trim()){if(this.isTransparent(t))return this.value={h:0,s:0,b:0,a:0},!0;var e=this.parse(t);e?(this.value=this.value={h:e.h,s:e.s,b:e.b,a:e.a},this.origFormat||(this.origFormat=e.format)):this.fallbackValue&&(this.value=this.fallbackValue)}return!1},setHue:function(t){this.value.h=1-t},setSaturation:function(t){this.value.s=t},setBrightness:function(t){this.value.b=1-t},setAlpha:function(t){this.value.a=Math.round(parseInt(100*(1-t),10)/100*100)/100},toRGB:function(t,e,i,n){0===arguments.length&&(t=this.value.h,e=this.value.s,i=this.value.b,n=this.value.a),t*=360;var o,a,r,s,l;return t=t%360/60,l=i*e,s=l*(1-Math.abs(t%2-1)),o=a=r=i-l,t=~~t,o+=[l,s,0,0,s,l][t],a+=[s,l,l,s,0,0][t],r+=[0,0,s,l,l,s][t],{r:Math.round(255*o),g:Math.round(255*a),b:Math.round(255*r),a:n}},toHex:function(t,e,i,n,o){arguments.length<=1&&(e=this.value.h,i=this.value.s,n=this.value.b,o=this.value.a);var a="#",r=this.toRGB(e,i,n,o
"auto"!==this.o.orientation.x?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(c-=e-h)):d.left<0?(this.picker.addClass("datepicker-orient-left"),c-=d.left-10):c+e>o?(this.picker.addClass("datepicker-orient-right"),c+=h-e):this.o.rtl?this.picker.addClass("datepicker-orient-right"):this.picker.addClass("datepicker-orient-left");var p,g=this.o.orientation.y;if("auto"===g&&(p=-a+f-i,g=p<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+g),"top"===g?f-=i+parseInt(this.picker.css("padding-top")):f+=u,this.o.rtl){var m=o-(c+h);this.picker.css({top:f,right:m,zIndex:l})}else this.picker.css({top:f,left:c,zIndex:l});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var e=this.dates.copy(),i=[],n=!1;return arguments.length?(t.each(arguments,t.proxy(function(t,e){e instanceof Date&&(e=this._local_to_utc(e)),i.push(e)},this)),n=!0):(i=this.isInput?this.element.val():this.element.data("date")||this.inputField.val(),i=i&&this.o.multidate?i.split(this.o.multidateSeparator):[i],delete this.element.data().date),i=t.map(i,t.proxy(function(t){return v.parseDate(t,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),i=t.grep(i,t.proxy(function(t){return!this.dateWithinRange(t)||!t},this),!0),this.dates.replace(i),this.o.updateViewDate&&(this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.viewDate>this.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate),n?(this.setValue(),this.element.change()):this.dates.length&&String(e)!==String(this.dates)&&n&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&e.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var e=this.o.weekStart,i="<tr>";for(this.o.calendarWeeks&&(i+='<th class="cw">&#160;</th>');e<this.o.weekStart+7;)i+='<th class="dow',-1!==t.inArray(e,this.o.daysOfWeekDisabled)&&(i+=" disabled"),i+='">'+m[this.o.language].daysMin[e++%7]+"</th>";i+="</tr>",this.picker.find(".datepicker-days thead").append(i)}},fillMonths:function(){for(var t,e=this._utc_to_local(this.viewDate),i="",n=0;n<12;n++)t=e&&e.getMonth()===n?" focused":"",i+='<span class="month'+t+'">'+m[this.o.language].monthsShort[n]+"</span>";this.picker.find(".datepicker-months td").html(i)},setRange:function(e){e&&e.length?this.range=t.map(e,function(t){return t.valueOf()}):delete this.range,this.fill()},getClassNames:function(e){var i=[],a=this.viewDate.getUTCFullYear(),r=this.viewDate.getUTCMonth(),s=n();return e.getUTCFullYear()<a||e.getUTCFullYear()===a&&e.getUTCMonth()<r?i.push("old"):(e.getUTCFullYear()>a||e.getUTCFullYear()===a&&e.getUTCMonth()>r)&&i.push("new"),this.focusDate&&e.valueOf()===this.focusDate.valueOf()&&i.push("focused"),this.o.todayHighlight&&o(e,s)&&i.push("today"),-1!==this.dates.contains(e)&&i.push("active"),this.dateWithinRange(e)||i.push("disabled"),this.dateIsDisabled(e)&&i.push("disabled","disabled-date"),-1!==t.inArray(e.getUTCDay(),this.o.daysOfWeekHighlighted)&&i.push("highlighted"),this.range&&(e>this.range[0]&&e<this.range[this.range.length-1]&&i.push("range"),-1!==t.inArray(e.valueOf(),this.range)&&i.push("selected"),e.valueOf()===this.range[0]&&i.push("range-start"),e.valueOf()===this.range[this.range.length-1]&&i.push("range-end")),i},_fill_yearsView:function(i,n,o,a,r,s,l){for(var d,u,h,c="",f=o/10,p=this.picker.find(i),g=Math.floor(a/o)*o,m=g+9*f,v=Math.floor(this.viewDate.getFullYear()/f)*f,b=t.map(this.dates,function(t){return Math.floor(t.getUTCFullYear()/f)*f}),y=g-f;y<=m+f;y+=f)d=[n],u=null,y===g-f?d.push("old"):y===m+f&&d.push("new"),-1!==t.inArray(y,b)&&d.push("active"),(y<r||y>s)&&d.push("disabled"),y===v&&d.push("focused"),l!==t.noop&&(h=l(new Date(y,0,1)),h===e?h={}:"boolean"==typeof h?h={enabled:h}:"string"==typeof h&&(h={classes:h}),!1===h.enabled&&d.push("disabled"),h.classes&&(d=d.concat(h.classes.split(/\s+/))),h.tooltip&&(u=h.tooltip)),c+='<span class="'+d.join(" ")+'"'+(u
this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_showHtml5Video",value:function(t,e){var i=this._$element.data("width")||560,n=this._$element.data("height")||i/(560/315);return e.html('<div class="embed-responsive embed-responsive-16by9"><video width="'+i+'" height="'+n+'" src="'+t+'" preload="auto" autoplay controls class="embed-responsive-item"></video></div>'),this._resize(i,n),this._config.onContentLoaded.call(this),this._$modalArrows&&this._$modalArrows.css("display","none"),this._toggleLoading(!1),this}},{key:"_loadRemoteContent",value:function(e,i){var n=this,o=this._$element.data("width")||560,a=this._$element.data("height")||560,r=this._$element.data("disableExternalCheck")||!1;return this._toggleLoading(!1),r||this._isExternal(e)?(i.html('<iframe src="'+e+'" frameborder="0" allowfullscreen></iframe>'),this._config.onContentLoaded.call(this)):i.load(e,t.proxy(function(){return n._$element.trigger("loaded.bs.modal")})),this._$modalArrows&&this._$modalArrows.css("display","none"),this._resize(o,a),this}},{key:"_isExternal",value:function(t){var e=t.match(/^([^:\/?#]+:)?(?:\/\/([^\/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/);return"string"==typeof e[1]&&e[1].length>0&&e[1].toLowerCase()!==location.protocol||"string"==typeof e[2]&&e[2].length>0&&e[2].replace(new RegExp(":("+{"http:":80,"https:":443}[location.protocol]+")?$"),"")!==location.host}},{key:"_error",value:function(t){return console.error(t),this._containerToUse().html(t),this._resize(300,300),this}},{key:"_preloadImageByIndex",value:function(e,i){if(this._$galleryItems){var n=t(this._$galleryItems.get(e),!1);if(void 0!==n){var o=n.attr("data-remote")||n.attr("href");return("image"===n.attr("data-type")||this._isImage(o))&&this._preloadImage(o,!1),i>0?this._preloadImageByIndex(e+1,i-1):void 0}}}},{key:"_preloadImage",value:function(e,i){var n=this;i=i||!1;var o=new Image;return i&&function(){var a=setTimeout(function(){i.append(n._config.loadingMessage)},200);o.onload=function(){a&&clearTimeout(a),a=null;var e=t("<img />");return e.attr("src",o.src),e.addClass("img-fluid"),e.css("width","100%"),i.html(e),n._$modalArrows&&n._$modalArrows.css("display",""),n._resize(o.width,o.height),n._toggleLoading(!1),n._config.onContentLoaded.call(n)},o.onerror=function(){return n._toggleLoading(!1),n._error(n._config.strings.fail+" "+e)}}(),o.src=e,o}},{key:"_swipeGesure",value:function(){return this._touchendX<this._touchstartX?this.navigateRight():this._touchendX>this._touchstartX?this.navigateLeft():void 0}},{key:"_resize",value:function(e,i){i=i||e,this._wantedWidth=e,this._wantedHeight=i;var n=e/i,o=this._padding.left+this._padding.right+this._border.left+this._border.right,a=this._config.doc.body.clientWidth>575?20:0,r=this._config.doc.body.clientWidth>575?0:20,s=Math.min(e+o,this._config.doc.body.clientWidth-a,this._config.maxWidth);e+o>s?(i=(s-o-r)/n,e=s):e+=o;var l=0,d=0;this._footerIsShown&&(d=this._$modalFooter.outerHeight(!0)||55),this._titleIsShown&&(l=this._$modalHeader.outerHeight(!0)||67);var u=this._padding.top+this._padding.bottom+this._border.bottom+this._border.top,h=parseFloat(this._$modalDialog.css("margin-top"))+parseFloat(this._$modalDialog.css("margin-bottom")),c=Math.min(i,t(window).height()-u-h-l-d,this._config.maxHeight-u-l-d);i>c&&(e=Math.ceil(c*n)+o),this._$lightboxContainer.css("height",c),this._$modalDialog.css("flex",1).css("maxWidth",e);var f=this._$modal.data("bs.modal");if(f)try{f._handleUpdate()}catch(t){f.handleUpdate()}return this}}],[{key:"_jQueryInterface",value:function(e){var i=this;return e=e||{},this.each(function(){var o=t(i),a=t.extend({},n.Default,o.data(),"object"==typeof e&&e);new n(i,a)})}}]),n}();t.fn[n]=r._jQueryInterface,t.fn[n].Constructor=r,t.fn[n].noConflict=function(){return t.fn[n]=o,r._jQueryInterface}}(jQuery)}(jQuery),function(t){function e(t,e,o){var a=t[0],r=/er/.test(o)?g:/bl/.test(o)?f:h,s=o==m?{checked:a[h],disabled:a[f],indeterminate:"true"==t.attr(g)||"false"==t.attr(p)}:a[r];if(/^(ch|di|in)/.test(o)&&!s)i(t,r);else if(/^(un|en|de)/.test(o)&&s)n(t,r);else if(o
mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],7:[function(t,e,i){var n=t(29)();n.helpers=t(45),t(27)(n),n.defaults=t(25),n.Element=t(26),n.elements=t(40),n.Interaction=t(28),n.layouts=t(30),n.platform=t(48),n.plugins=t(31),n.Ticks=t(34),t(22)(n),t(23)(n),t(24)(n),t(33)(n),t(32)(n),t(35)(n),t(55)(n),t(53)(n),t(54)(n),t(56)(n),t(57)(n),t(58)(n),t(15)(n),t(16)(n),t(17)(n),t(18)(n),t(19)(n),t(20)(n),t(21)(n),t(8)(n),t(9)(n),t(10)(n),t(11)(n),t(12)(n),t(13)(n),t(14)(n);var o=t(49);for(var a in o)o.hasOwnProperty(a)&&n.plugins.register(o[a]);n.platform.initialize(),e.exports=n,"undefined"!=typeof window&&(window.Chart=n),n.Legend=o.legend._element,n.Title=o.title._element,n.pluginService=n.plugins,n.PluginBase=n.Element.extend({}),n.canvasHelpers=n.helpers.canvas,n.layoutService=n.layouts},{10:10,11:11,12:12,13:13,14:14,15:15,16:16,17:17,18:18,19:19,20:20,21:21,22:22,23:23,24:24,25:25,26:26,27:27,28:28,29:29,30:30,31:31,32:32,33:33,34:34,35:35,40:40,45:45,48:48,49:49,53:53,54:54,55:55,56:56,57:57,58:58,8:8,9:9}],8:[function(t,e,i){"use strict";e.exports=function(t){t.Bar=function(e,i){return i.type="bar",new t(e,i)}}},{}],9:[function(t,e,i){"use strict";e.exports=function(t){t.Bubble=function(e,i){return i.type="bubble",new t(e,i)}}},{}],10:[function(t,e,i){"use strict";e.exports=function(t){t.Doughnut=function(e,i){return i.type="doughnut",new t(e,i)}}},{}],11:[function(t,e,i){"use strict";e.exports=function(t){t.Line=function(e,i){return i.type="line",new t(e,i)}}},{}],12:[function(t,e,i){"use strict";e.exports=function(t){t.PolarArea=function(e,i){return i.type="polarArea",new t(e,i)}}},{}],13:[function(t,e,i){"use strict";e.exports=function(t){t.Radar=function(e,i){return i.type="radar",new t(e,i)}}},{}],14:[function(t,e,i){"use strict";e.exports=function(t){t.Scatter=function(e,i){return i.type="scatter",new t(e,i)}}},{}],15:[function(t,e,i){"use strict";function n(t,e){var i,n,o,a,r=t.isHorizontal()?t.width:t.height,s=t.getTicks();for(o=1,a=e.length;o<a;++o)r=Math.min(r,e[o]-e[o-1]);for(o=0,a=s.length;o<a;++o)n=t.getPixelForTick(o),r=o>0?Math.min(r,n-i):r,i=n;return r}function o(t,e,i){var n,o,a=i.barThickness,r=e.stackCount,s=e.pixels[t];return l.isNullOrUndef(a)?(n=e.min*i.categoryPercentage,o=i.barPercentage):(n=a*r,o=1),{chunk:n/r,ratio:o,start:s-n/2}}function a(t,e,i){var n,o,a=e.pixels,r=a[t],s=t>0?a[t-1]:null,l=t<a.length-1?a[t+1]:null,d=i.categoryPercentage;return null===s&&(s=r-(null===l?e.end-r:l-r)),null===l&&(l=r+r-s),n=r-(r-s)/2*d,o=(l-s)/2*d,{chunk:o/e.stackCount,ratio:i.barPercentage,start:n}}var r=t(25),s=t(40),l=t(45);r._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),r._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{position:"left",type:"category",categoryPercentage:.8,barPercentage:.9,offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:
i=o.configMerge(t.defaults.global,t.defaults[e.config.type],i),e.options=e.config.options=i,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=i.tooltips,e.tooltip.initialize()}function d(t){return"top"===t||"bottom"===t}t.types={},t.instances={},t.controllers={},o.extend(t.prototype,{construct:function(i,n){var a=this;n=e(n);var r=s.acquireContext(i,n),l=r&&r.canvas,d=l&&l.height,u=l&&l.width;if(a.id=o.uid(),a.ctx=r,a.canvas=l,a.config=n,a.width=u,a.height=d,a.aspectRatio=d?u/d:null,a.options=n.options,a._bufferedRender=!1,a.chart=a,a.controller=a,t.instances[a.id]=a,Object.defineProperty(a,"data",{get:function(){return a.config.data},set:function(t){a.config.data=t}}),!r||!l)return void console.error("Failed to create chart: can't acquire context from the given item");a.initialize(),a.update()},initialize:function(){var t=this;return l.notify(t,"beforeInit"),o.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),l.notify(t,"afterInit"),t},clear:function(){return o.canvas.clear(this),this},stop:function(){return t.animationService.cancelAnimation(this),this},resize:function(t){var e=this,i=e.options,n=e.canvas,a=i.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(o.getMaximumWidth(n))),s=Math.max(0,Math.floor(a?r/a:o.getMaximumHeight(n)));if((e.width!==r||e.height!==s)&&(n.width=e.width=r,n.height=e.height=s,n.style.width=r+"px",n.style.height=s+"px",o.retinaScale(e,i.devicePixelRatio),!t)){var d={width:r,height:s};l.notify(e,"resize",[d]),e.options.onResize&&e.options.onResize(e,d),e.stop(),e.update(e.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},i=t.scale;o.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),o.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),i&&(i.id=i.id||"scale")},buildOrUpdateScales:function(){var e=this,i=e.options,n=e.scales||{},a=[],r=Object.keys(n).reduce(function(t,e){return t[e]=!1,t},{});i.scales&&(a=a.concat((i.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(i.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),i.scale&&a.push({options:i.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),o.each(a,function(i){var a=i.options,s=a.id,l=o.valueOrDefault(a.type,i.dtype);d(a.position)!==d(i.dposition)&&(a.position=i.dposition),r[s]=!0;var u=null;if(s in n&&n[s].type===l)u=n[s],u.options=a,u.ctx=e.ctx,u.chart=e;else{var h=t.scaleService.getScaleConstructor(l);if(!h)return;u=new h({id:s,type:l,options:a,ctx:e.ctx,chart:e}),n[u.id]=u}u.mergeTicksOptions(),i.isDefault&&(e.scale=u)}),o.each(r,function(t,e){t||delete n[e]}),e.scales=n,t.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,i=[],n=[];return o.each(e.data.datasets,function(o,a){var r=e.getDatasetMeta(a),s=o.type||e.config.type;if(r.type&&r.type!==s&&(e.destroyDatasetMeta(a),r=e.getDatasetMeta(a)),r.type=s,i.push(r.type),r.controller)r.controller.updateIndex(a),r.controller.linkScales();else{var l=t.controllers[r.type];if(void 0===l)throw new Error('"'+r.type+'" is not a chart type.');r.controller=new l(e,a),n.push(r.controller)}},e),n},resetElements:function(){var t=this;o.each(t.data.datasets,function(e,i){t.getDatasetMeta(i).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),i(e),l._invalidate(e),!1!==l.notify(e,"beforeUpdate")){e.tooltip._data=e.data;var n=e.buildOrUpdateControllers();o.each(e.data.datasets,function(t,i){e.getDatasetMeta(i).controller.buildOrUpdateElements()},e),e.updateLayout(),e.options.animation&&e.options.animation.duration&&o.each(n,function(t){t.reset()}),e.updateDatasets(),e.tooltip.initialize(),e.lastActive=[],l.notify(e,"afterUpdate"),e._bufferedRender?e._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:e.render(t)}},updateLayout:function(){var t=this;!
beforeBuildTicks:function(){s.callback(this.options.beforeBuildTicks,[this])},buildTicks:s.noop,afterBuildTicks:function(){s.callback(this.options.afterBuildTicks,[this])},beforeTickToLabelConversion:function(){s.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this,e=t.options.ticks;t.ticks=t.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){s.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){s.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t=this,e=t.ctx,o=t.options.ticks,a=n(t._ticks),r=i(o);e.font=r.font;var l=o.minRotation||0;if(a.length&&t.options.display&&t.isHorizontal())for(var d,u=s.longestText(e,r.font,a,t.longestTextCache),h=u,c=t.getPixelForTick(1)-t.getPixelForTick(0)-6;h>c&&l<o.maxRotation;){var f=s.toRadians(l);if(d=Math.cos(f),Math.sin(f)*u>t.maxHeight){l--;break}l++,h=d*u}t.labelRotation=l},afterCalculateTickRotation:function(){s.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){s.callback(this.options.beforeFit,[this])},fit:function(){var t=this,o=t.minSize={width:0,height:0},a=n(t._ticks),r=t.options,d=r.ticks,u=r.scaleLabel,h=r.gridLines,c=r.display,f=t.isHorizontal(),p=i(d),g=r.gridLines.tickMarkLength;if(o.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:c&&h.drawTicks?g:0,o.height=f?c&&h.drawTicks?g:0:t.maxHeight,u.display&&c){var m=l(u),v=s.options.toPadding(u.padding),b=m+v.height;f?o.height+=b:o.width+=b}if(d.display&&c){var y=s.longestText(t.ctx,p.font,a,t.longestTextCache),x=s.numberOfLabelLines(a),w=.5*p.size,k=t.options.ticks.padding;if(f){t.longestLabelWidth=y;var _=s.toRadians(t.labelRotation),C=Math.cos(_),D=Math.sin(_),M=D*y+p.size*x+w*(x-1)+w;o.height=Math.min(t.maxHeight,o.height+M+k),t.ctx.font=p.font;var S=e(t.ctx,a[0],p.font),T=e(t.ctx,a[a.length-1],p.font);0!==t.labelRotation?(t.paddingLeft="bottom"===r.position?C*S+3:C*w+3,t.paddingRight="bottom"===r.position?C*w+3:C*T+3):(t.paddingLeft=S/2+3,t.paddingRight=T/2+3)}else d.mirror?y=0:y+=k+w,o.width=Math.min(t.maxWidth,o.width+y),t.paddingTop=p.size/2,t.paddingBottom=p.size/2}t.handleMargins(),t.width=o.width,t.height=o.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){s.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(s.isNullOrUndef(t))return NaN;if("number"==typeof t&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},getLabelForIndex:s.noop,getPixelForValue:s.noop,getValueForPixel:s.noop,getPixelForTick:function(t){var e=this,i=e.options.offset;if(e.isHorizontal()){var n=e.width-(e.paddingLeft+e.paddingRight),o=n/Math.max(e._ticks.length-(i?0:1),1),a=o*t+e.paddingLeft;i&&(a+=o/2);var r=e.left+Math.round(a);return r+=e.isFullWidth()?e.margins.left:0}var s=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(s/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var i=e.width-(e.paddingLeft+e.paddingRight),n=i*t+e.paddingLeft,o=e.left+Math.round(n);return o+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this,e=t.min,i=t.max;return t.beginAtZero?0:e<0&&i<0?i:e>0&&i>0?e:0},_autoSkip:function(t){var e,i,n,o,a,r=this,l=r.isHorizontal(),d=r.options.ticks.minor,u=t.length,h=s.toRadians(r.labelRotation),c=Math.cos(h),f=r.longestLabelWidth*c,p=[];for(d.maxTicksLimit&&(a=d.maxTicksLimit),l&&(e=!1,(f+d.autoSkipPadding)*u>r.width-(r.paddin
return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i))},easeOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:1===t?1:(i||(i=.3),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/i)+1)},easeInOutElastic:function(t){var e=1.70158,i=0,n=1;return 0===t?0:2==(t/=.5)?1:(i||(i=.45),n<1?(n=1,e=i/4):e=i/(2*Math.PI)*Math.asin(1/n),t<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-o.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*o.easeInBounce(2*t):.5*o.easeOutBounce(2*t-1)+.5}};e.exports={effects:o},n.easingEffects=o},{42:42}],44:[function(t,e,i){"use strict";var n=t(42);e.exports={toLineHeight:function(t,e){var i=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,i,o,a;return n.isObject(t)?(e=+t.top||0,i=+t.right||0,o=+t.bottom||0,a=+t.left||0):e=i=o=a=+t||0,{top:e,right:i,bottom:o,left:a,height:e+o,width:a+i}},resolve:function(t,e,i){var o,a,r;for(o=0,a=t.length;o<a;++o)if(void 0!==(r=t[o])&&(void 0!==e&&"function"==typeof r&&(r=r(e)),void 0!==i&&n.isArray(r)&&(r=r[i]),void 0!==r))return r}}},{42:42}],45:[function(t,e,i){"use strict";e.exports=t(42),e.exports.easing=t(43),e.exports.canvas=t(41),e.exports.options=t(44)},{41:41,42:42,43:43,44:44}],46:[function(t,e,i){e.exports={acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}}},{}],47:[function(t,e,i){"use strict";function n(t,e){var i=m.getStyle(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?Number(n[1]):void 0}function o(t,e){var i=t.style,o=t.getAttribute("height"),a=t.getAttribute("width");if(t[v]={initial:{height:o,width:a,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",null===a||""===a){var r=n(t,"width");void 0!==r&&(t.width=r)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=n(t,"height");void 0!==r&&(t.height=s)}return t}function a(t,e,i){t.addEventListener(e,i,C)}function r(t,e,i){t.removeEventListener(e,i,C)}function s(t,e,i,n,o){return{type:t,chart:e,native:o||null,x:void 0!==i?i:null,y:void 0!==n?n:null}}function l(t,e){var i=k[t.type]||t.type,n=m.getRelativePosition(t,e);return s(i,e,n.x,n.y,t)}function d(t,e){var i=!1,n=[];return function(){n=Array.prototype.slice.call(arguments),e=e||this,i||(i=!0,m.requestAnimFrame.call(window,function(){i=!1,t.apply(e,n)}))}}function u(t){var e=document.createElement("div"),i=b+"size-monitor",n="position:absolute;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1;";e.style.cssText=n,e.className=i,e.innerHTML='<div class="'+i+'-expand" style="'+n+'"><div style="position:absolute;width:1000000px;height:1000000px;left:0;top:0"></div></div><div class="'+i+'-shrink" style="'+n+'"><div style="position:absolute;width:200%;height:200%;left:0; top:0"></div></div>';var o=e.childNodes[0],r=e.childNodes[1];e._reset=function(){o.scrollLeft=1e6,o.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var s=function(){e._reset(),t()};return a(o,"scrol
getTickLimit:function(){var t=this.options.ticks,e=o.valueOrDefault(t.fontSize,m.defaultFontSize);return Math.min(t.maxTicksLimit?t.maxTicksLimit:11,Math.ceil(this.drawingArea/(1.5*e)))},convertTicksToLabels:function(){var e=this;t.LinearScaleBase.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map(e.options.pointLabels.callback,e)},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){this.options.pointLabels.display?l(this):d(this)},setReductions:function(t,e,i){var n=this,o=e.l/Math.sin(i.l),a=Math.max(e.r-n.width,0)/Math.sin(i.r),r=-e.t/Math.cos(i.t),s=-Math.max(e.b-n.height,0)/Math.cos(i.b);o=g(o),a=g(a),r=g(r),s=g(s),n.drawingArea=Math.min(Math.round(t-(o+a)/2),Math.round(t-(r+s)/2)),n.setCenterPoint(o,a,r,s)},setCenterPoint:function(t,e,i,n){var o=this,a=o.width-e-o.drawingArea,r=t+o.drawingArea,s=i+o.drawingArea,l=o.height-n-o.drawingArea;o.xCenter=Math.round((r+a)/2+o.left),o.yCenter=Math.round((s+l)/2+o.top)},getIndexAngle:function(t){return t*(2*Math.PI/e(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(null===t)return 0;var i=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*i:(t-e.min)*i},getPointPosition:function(t,e){var i=this,n=i.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(n)*e)+i.xCenter,y:Math.round(Math.sin(n)*e)+i.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this,e=t.min,i=t.max;return t.getPointPositionForValue(0,t.beginAtZero?0:e<0&&i<0?i:e>0&&i>0?e:0)},draw:function(){var t=this,e=t.options,i=e.gridLines,n=e.ticks,a=o.valueOrDefault;if(e.display){var r=t.ctx,s=this.getIndexAngle(0),l=a(n.fontSize,m.defaultFontSize),d=a(n.fontStyle,m.defaultFontStyle),u=a(n.fontFamily,m.defaultFontFamily),h=o.fontString(l,d,u);o.each(t.ticks,function(e,o){if(o>0||n.reverse){var d=t.getDistanceFromCenterForValue(t.ticksAsNumbers[o]);if(i.display&&0!==o&&p(t,i,d,o),n.display){var u=a(n.fontColor,m.defaultFontColor);if(r.font=h,r.save(),r.translate(t.xCenter,t.yCenter),r.rotate(s),n.showLabelBackdrop){var c=r.measureText(e).width;r.fillStyle=n.backdropColor,r.fillRect(-c/2-n.backdropPaddingX,-d-l/2-n.backdropPaddingY,c+2*n.backdropPaddingX,l+2*n.backdropPaddingY)}r.textAlign="center",r.textBaseline="middle",r.fillStyle=u,r.fillText(e,0,-d),r.restore()}}}),(e.angleLines.display||e.pointLabels.display)&&f(t)}}});t.scaleService.registerScaleType("radialLinear",b,v)}},{25:25,34:34,45:45}],58:[function(t,e,i){"use strict";function n(t,e){return t-e}function o(t){var e,i,n,o={},a=[];for(e=0,i=t.length;e<i;++e)n=t[e],o[n]||(o[n]=!0,a.push(n));return a}function a(t,e,i,n){if("linear"===n||!t.length)return[{time:e,pos:0},{time:i,pos:1}];var o,a,r,s,l,d=[],u=[e];for(o=0,a=t.length;o<a;++o)(s=t[o])>e&&s<i&&u.push(s);for(u.push(i),o=0,a=u.length;o<a;++o)l=u[o+1],r=u[o-1],s=u[o],void 0!==r&&void 0!==l&&Math.round((l+r)/2)===s||d.push({time:s,pos:o/(a-1)});return d}function r(t,e,i){for(var n,o,a,r=0,s=t.length-1;r>=0&&r<=s;){if(n=r+s>>1,o=t[n-1]||null,a=t[n],!o)return{lo:null,hi:a};if(a[e]<i)r=n+1;else{if(!(o[e]>i))return{lo:o,hi:a};s=n-1}}return{lo:a,hi:null}}function s(t,e,i,n){var o=r(t,e,i),a=o.lo?o.hi?o.lo:t[t.length-2]:t[0],s=o.lo?o.hi?o.hi:t[t.length-1]:t[1],l=s[e]-a[e],d=l?(i-a[e])/l:0,u=(s[n]-a[n])*d;return a[n]+u}function l(t,e){var i=e.parser,n=e.parser||e.format;return"function"==typeof i?i(t):"string"==typeof t&&"string"==typeof n?b(t,n):(t instanceof b||(t=b(t)),t.isValid()?t:"function"==typeof n?n(t):t)}function d(t,e){if(x.isNullOrUndef(t))return null;var i=e.options.time,n=l(e.getRightValue(t),i);return n.isValid()?(i.round&&n.startOf(i.round),n.valueOf()):null}function u(t,e,i,n){var o,a,r,s=e-t,l=_[i],d=l.size,u=l.steps;if(!u)return Math.ceil(s/(n*d));for(o=0,a=u.length;o<a&&(r=u[o],!(Math.ceil(s/(d*r))<=n));++o);return r}function h(t,e,i,n){var o,a,r,s=C.length;for(o=C.indexOf(t);o<s
var n=t(this),o=function(){return i.stopImmediatePropagation(),!1};if(t.formUtils.haltValidation)return o();if(t.formUtils.isLoadingModules)return setTimeout(function(){n.trigger("submit.validation")},200),o();var a=n.isValid(e.language,e);return t.formUtils.haltValidation?o():a&&"function"==typeof e.onSuccess?!1===e.onSuccess(n)?o():void 0:a||"function"!=typeof e.onError?!!a||o():(e.onError(n),o())}).bind("reset.validation",function(){t.formUtils.dialogs.removeAllMessagesAndStyling(o,e)}).addClass("has-validation-callback"),e.showHelpOnFocus&&o.showHelpOnFocus(),e.addSuggestions&&o.addSuggestions(),e.validateOnBlur&&(o.validateOnBlur(e.language,e),o.bind("html5ValidationAttrsFound",function(){o.validateOnBlur(e.language,e)})),e.validateOnEvent&&o.validateOnEvent(e.language,e)}),""!==e.modules&&t.formUtils.loadModules(e.modules,null,function(){"function"==typeof e.onModulesLoaded&&e.onModulesLoaded();var i="string"==typeof e.form?t(e.form):e.form;t.formUtils.$win.trigger("validatorsLoaded",[i,e])})}}(t),function(t,e){"use strict";var i=t(e);t.formUtils=t.extend(t.formUtils||{},{$win:i,defaultConfig:function(){return{ignore:[],errorElementClass:"error",successElementClass:"valid",borderColorOnError:"#b94a48",errorMessageClass:"form-error",validationRuleAttribute:"data-validation",validationErrorMsgAttribute:"data-validation-error-msg",errorMessagePosition:"inline",errorMessageTemplate:{container:'<div class="{errorMessageClass} alert alert-danger">{messages}</div>',messages:"<strong>{errorTitle}</strong><ul>{fields}</ul>",field:"<li>{msg}</li>"},scrollToTopOnError:!0,dateFormat:"yyyy-mm-dd",addValidClassOnAll:!1,decimalSeparator:".",inputParentClassOnError:"has-error",inputParentClassOnSuccess:"has-success",validateHiddenInputs:!1,inlineErrorMessageCallback:!1,submitErrorMessageCallback:!1}},validators:{},sanitizers:{},_events:{load:[],valid:[],invalid:[]},haltValidation:!1,addValidator:function(t){var e=0===t.name.indexOf("validate_")?t.name:"validate_"+t.name;void 0===t.validateOnKeyUp&&(t.validateOnKeyUp=!0),this.validators[e]=t},addSanitizer:function(t){this.sanitizers[t.name]=t},warn:function(t,i){"console"in e?"function"==typeof e.console.warn?e.console.warn(t):"function"==typeof e.console.log&&e.console.log(t):i&&alert(t)},getValue:function(t,e){var i=e?e.find(t):t;if(i.length>0){var n=i.eq(0).attr("type");return"radio"===n||"checkbox"===n?i.filter(":checked").val()||"":i.val()||""}return!1},validateInput:function(e,i,n,o,a){n=n||t.formUtils.defaultConfig(),i=i||t.formUtils.LANG,o.length||(o=e.parent());var r=this.getValue(e);e.valAttr("skipped",!1).one("beforeValidation",function(){(e.attr("disabled")||!e.is(":visible")&&!n.validateHiddenInputs)&&e.valAttr("skipped",1)}).trigger("beforeValidation",[r,i,n]);var s="true"===e.valAttr("optional"),l=!r&&s,d=e.attr(n.validationRuleAttribute),u=!0,h="",c={isValid:!0,shouldChangeDisplay:!0,errorMsg:""};if(!d||l||e.valAttr("skipped"))return c.shouldChangeDisplay=n.addValidClassOnAll,c;var f=e.valAttr("ignore");return f&&t.each(f.split(""),function(t,e){r=r.replace(new RegExp("\\"+e,"g"),"")}),t.split(d,function(s){0!==s.indexOf("validate_")&&(s="validate_"+s);var l=t.formUtils.validators[s];if(!l)throw new Error('Using undefined validator "'+s+'". Maybe you have forgotten to load the module that "'+s+'" belongs to?');if("validate_checkbox_group"===s&&(e=o.find('[name="'+e.attr("name")+'"]:eq(0)')),("keyup"!==a||l.validateOnKeyUp)&&(u=l.validatorFunction(r,e,n,i,o,a)),!u)return n.validateOnBlur&&e.validateOnKeyUp(i,n),h=t.formUtils.dialogs.resolveErrorMessage(e,l,s,n,i),!1}),!1===u?(e.trigger("validation",!1),c.errorMsg=h,c.isValid=!1,c.shouldChangeDisplay=!0):null===u?c.shouldChangeDisplay=!1:(e.trigger("validation",!0),c.shouldChangeDisplay=!0),"function"==typeof n.onElementValidate&&null!==h&&n.onElementValidate(c.isValid,e,o,h),e.trigger("afterValidation",[c,a]),c},parseDate:function(e,i,n){var o,a,r,s,l=i.replace(/[a-zA-Z]/gi,"").substring(0,1),d="^",u=i.split(l||null);if(t.each(u,function(t,e){d+=(t>0?"\\"+l:"")+"(\\d{"+e.length+"})"}),d+="$",n){var h=[];t.each(e.spl