From ec174a38a9df13c936673c9f286554c5ef3ab2d1 Mon Sep 17 00:00:00 2001 From: Kevin Papst Date: Sun, 19 May 2019 23:52:43 +0200 Subject: [PATCH] timesheet controller refactoring (#796) --- assets/js/KimaiLoader.js | 2 + assets/js/plugins/KimaiToolbarAction.js | 56 +++++ public/build/app.js | 14 +- public/build/manifest.json | 2 +- ...it.php => TimesheetAbstractController.php} | 202 +++++++++++++----- src/Controller/TimesheetController.php | 177 +++------------ src/Controller/TimesheetTeamController.php | 130 ++--------- src/Form/TimesheetEditForm.php | 2 +- templates/invoice/index.html.twig | 20 +- templates/macros/actions.html.twig | 4 +- templates/timesheet-team/export.html.twig | 4 +- templates/timesheet-team/index.html.twig | 38 ++-- templates/timesheet/export.html.twig | 4 +- templates/timesheet/index.html.twig | 43 ++-- tests/Event/ThemeEventTest.php | 2 - 15 files changed, 304 insertions(+), 396 deletions(-) create mode 100644 assets/js/plugins/KimaiToolbarAction.js rename src/Controller/{TimesheetControllerTrait.php => TimesheetAbstractController.php} (50%) diff --git a/assets/js/KimaiLoader.js b/assets/js/KimaiLoader.js index 12e3af53..d6b99f75 100644 --- a/assets/js/KimaiLoader.js +++ b/assets/js/KimaiLoader.js @@ -31,6 +31,7 @@ import KimaiEvent from "./plugins/KimaiEvent"; import KimaiAPILink from "./plugins/KimaiAPILink"; import KimaiAlert from "./plugins/KimaiAlert"; import KimaiAutocomplete from "./plugins/KimaiAutocomplete"; +import KimaiToolbarAction from "./plugins/KimaiToolbarAction"; export default class KimaiLoader { @@ -61,6 +62,7 @@ export default class KimaiLoader { kimai.registerPlugin(new KimaiActiveRecords('li.messages-menu', 'li.messages-menu-empty')); kimai.registerPlugin(new KimaiAPILink('api-link')); kimai.registerPlugin(new KimaiAutocomplete('.js-autocomplete')); + kimai.registerPlugin(new KimaiToolbarAction('toolbar-action')); //kimai.registerPlugin(new KimaiPauseRecord('li.messages-menu ul.menu li')); // notify all listeners that Kimai plugins can now be registered diff --git a/assets/js/plugins/KimaiToolbarAction.js b/assets/js/plugins/KimaiToolbarAction.js new file mode 100644 index 00000000..ac3182c4 --- /dev/null +++ b/assets/js/plugins/KimaiToolbarAction.js @@ -0,0 +1,56 @@ +/* + * This file is part of the Kimai time-tracking app. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +import KimaiPlugin from '../KimaiPlugin'; + +/** + * Needs to be initialized with a class name. + * + * A link like can be activated with: + * new KimaiToolbarAction('remoteLink') + * + * @param selector + */ +export default class KimaiToolbarAction extends KimaiPlugin { + + constructor(selector) { + super(); + this.selector = selector; + } + + init() { + const self = this; + document.addEventListener('click', function(event) { + let target = event.target; + while (!target.matches('body')) { + if (target.classList.contains(self.selector)) { + const form = document.querySelector('div.toolbar form.navbar-form'); + if (form === null) { + return; + } + const prevAction = form.action; + const prevMethod = form.method; + form.target = '_blank'; + form.action = target.href; + if (target.dataset.method !== undefined) { + form.method = target.dataset.method; + } + form.submit(); + form.target = ''; + form.action = prevAction; + form.method = prevMethod; + + event.preventDefault(); + event.stopPropagation(); + } + + target = target.parentNode; + } + }); + } + +} diff --git a/public/build/app.js b/public/build/app.js index e4c1123a..d1bdc2a0 100644 --- a/public/build/app.js +++ b/public/build/app.js @@ -7,7 +7,7 @@ * Released under the MIT license * https://github.com/chartjs/Chart.js/blob/master/LICENSE.md */ -!function(e){t.exports=e()}(function(){return function t(e,n,o){function r(s,l){if(!n[s]){if(!e[s]){var u="function"==typeof i&&i;if(!l&&u)return i(s,!0);if(a)return a(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var d=n[s]={exports:{}};e[s][0].call(d.exports,function(t){return r(e[s][1][t]||t)},d,d.exports,t,e,n,o)}return n[s].exports}for(var a="function"==typeof i&&i,s=0;s');var n=t.data,i=n.datasets,o=n.labels;if(i.length)for(var r=0;r'),o[r]&&e.push(o[r]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(n,i){var o=t.getDatasetMeta(0),a=e.datasets[0],s=o.data[i],l=s&&s.custom||{},u=r.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:u(a.backgroundColor,i,c.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(a.borderColor,i,c.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(a.borderWidth,i,c.borderWidth),hidden:isNaN(a.data[i])||o.data[i].hidden,index:i}}):[]}},onClick:function(t,e){var n,i,o,r=e.index,a=this.chart;for(n=0,i=(a.data.datasets||[]).length;n=Math.PI?-1:p<-Math.PI?1:0))+f,g=Math.cos(p),v=Math.sin(p),y=Math.cos(m),b=Math.sin(m),w=p<=0&&0<=m||p<=2*Math.PI&&2*Math.PI<=m,x=p<=.5*Math.PI&&.5*Math.PI<=m||p<=2.5*Math.PI&&2.5*Math.PI<=m,_=p<=-Math.PI&&-Math.PI<=m||p<=Math.PI&&Math.PI<=m,D=p<=.5*-Math.PI&&.5*-Math.PI<=m||p<=1.5*Math.PI&&1.5*Math.PI<=m,k=h/100,S=_?-1:Math.min(g*(g<0?1:k),y*(y<0?1:k)),C=D?-1:Math.min(v*(v<0?1:k),b*(b<0?1:k)),M=w?1:Math.max(g*(0');var n=t.data,i=n.datasets,o=n.labels;if(i.length)for(var r=0;r'),o[r]&&e.push(o[r]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(n,i){var o=t.getDatasetMeta(0),a=e.datasets[0],s=o.data[i].custom||{},l=r.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:l(a.backgroundColor,i,u.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(a.borderColor,i,u.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(a.borderWidth,i,u.borderWidth),hidden:isNaN(a.data[i])||o.data[i].hidden,index:i}}):[]}},onClick:function(t,e){var n,i,o,r=e.index,a=this.chart;for(n=0,i=(a.data.datasets||[]).length;n=e.numSteps?(o.callback(e.onAnimationComplete,[e],n),n.animating=!1,i.splice(r,1)):++r}}},{26:26,46:46}],24:[function(t,e,n){"use strict";var i=t(22),o=t(23),r=t(26),a=t(46),s=t(29),l=t(31),u=t(49),c=t(32),d=t(34),h=t(36);e.exports=function(t){function e(t){return"top"===t||"bottom"===t}t.types={},t.instances={},t.controllers={},a.extend(t.prototype,{construct:function(e,n){var i,o,s=this;(o=(i=(i=n)||{}).data=i.data||{}).datasets=o.datasets||[],o.labels=o.labels||[],i.options=a.configMerge(r.global,r[i.type],i.options||{}),n=i;var l=u.acquireContext(e,n),c=l&&l.canvas,d=c&&c.height,h=c&&c.width;s.id=a.uid(),s.ctx=l,s.canvas=c,s.config=n,s.width=h,s.height=d,s.aspectRatio=d?h/d:null,s.options=n.options,s._bufferedRender=!1,(s.chart=s).controller=s,t.instances[s.id]=s,Object.defineProperty(s,"data",{get:function(){return s.config.data},set:function(t){s.config.data=t}}),l&&c?(s.initialize(),s.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return c.notify(t,"beforeInit"),a.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),c.notify(t,"afterInit"),t},clear:function(){return a.canvas.clear(this),this},stop:function(){return o.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,o=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(a.getMaximumWidth(i))),s=Math.max(0,Math.floor(o?r/o:a.getMaximumHeight(i)));if((e.width!==r||e.height!==s)&&(i.width=e.width=r,i.height=e.height=s,i.style.width=r+"px",i.style.height=s+"px",a.retinaScale(e,n.devicePixelRatio),!t)){var l={width:r,height:s};c.notify(e,"resize",[l]),e.options.onResize&&e.options.onResize(e,l),e.stop(),e.update({duration:e.options.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;a.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),a.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,n=t.options,i=t.scales||{},o=[],r=Object.keys(i).reduce(function(t,e){return t[e]=!1,t},{});n.scales&&(o=o.concat((n.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(n.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),n.scale&&o.push({options:n.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),a.each(o,function(n){var o=n.options,s=o.id,l=a.valueOrDefault(o.type,n.dtype);e(o.position)!==e(n.dposition)&&(o.position=n.dposition),r[s]=!0;var u=null;if(s in i&&i[s].type===l)(u=i[s]).options=o,u.ctx=t.ctx,u.chart=t;else{var c=d.getScaleConstructor(l);if(!c)return;u=new c({id:s,type:l,options:o,ctx:t.ctx,chart:t}),i[u.id]=u}u.mergeTicksOptions(),n.isDefault&&(t.scale=u)}),a.each(r,function(t,e){t||delete i[e]}),t.scales=i,d.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],i=[];return a.each(e.data.datasets,function(o,r){var a=e.getDatasetMeta(r),s=o.type||e.config.type;if(a.type&&a.type!==s&&(e.destroyDatasetMeta(r),a=e.getDatasetMeta(r)),a.type=s,n.push(a.type),a.controller)a.controller.updateIndex(r),a.controller.linkScales();else{var l=t.controllers[a.type];if(void 0===l)throw new Error('"'+a.type+'" is not a chart type.');a.controller=new l(e,r),i.push(a.controller)}},e),i},resetElements:function(){var t=this;a.each(t.data.datasets,function(e,n){t.getDatasetMeta(n).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(e){var n,i,o=this;if(e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]}),i=(n=o).options,a.each(n.scales,function(t){l.removeBox(n,t)}),i=a.configMerge(t.defaults.global,t.defaults[n.config.type],i),n.options=n.config.options=i,n.ensureScalesHaveIDs(),n.buildOrUpdateScales(),n.tooltip._options=i.tooltips,n.tooltip.initialize(),c._invalidate(o),!1!==c.notify(o,"beforeUpdate")){o.tooltip._data=o.data;var r=o.buildOrUpdateControllers();a.each(o.data.datasets,function(t,e){o.getDatasetMeta(e).controller.buildOrUpdateElements()},o),o.updateLayout(),o.options.animation&&o.options.animation.duration&&a.each(r,function(t){t.reset()}),o.updateDatasets(),o.tooltip.initialize(),o.lastActive=[],c.notify(o,"afterUpdate"),o._bufferedRender?o._bufferedRequest={duration:e.duration,easing:e.easing,lazy:e.lazy}:o.render(e)}},updateLayout:function(){!1!==c.notify(this,"beforeLayout")&&(l.update(this,this.width,this.height),c.notify(this,"afterScaleUpdate"),c.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==c.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t=e[t].length&&e[t].push({}),!e[t][o].type||l.type&&l.type!==e[t][o].type?r.merge(e[t][o],[a.getScaleDefaults(s),l]):r.merge(e[t][o],l)}else r._merger(t,e,n,i)}})},r.where=function(t,e){if(r.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return r.each(t,function(t){e(t)&&n.push(t)}),n},r.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,o=t.length;i=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},r.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},r.niceNum=function(t,e){var n=Math.floor(r.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},r.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},r.getRelativePosition=function(t,e){var n,i,o=t.originalEvent||t,a=t.target||t.srcElement,s=a.getBoundingClientRect(),l=o.touches;i=l&&0n.length){for(var u=0;ue&&(e=t.length)}),e},r.color=i?function(t){return t instanceof CanvasGradient&&(t=o.global.defaultColor),i(t)}:function(t){return console.error("Color.js not found!"),t},r.getHoverColor=function(t){return t instanceof CanvasPattern?t:r.color(t).saturate(.5).darken(.1).rgbString()}}},{26:26,3:3,34:34,46:46}],29:[function(t,e,n){"use strict";function i(t,e){return t.native?{x:t.x,y:t.y}:u.getRelativePosition(t,e)}function o(t,e){var n,i,o,r,a;for(i=0,r=t.data.datasets.length;it.maxHeight){s--;break}s++,d=l*u}t.labelRotation=s},afterCalculateTickRotation:function(){c.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){c.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=i(t._ticks),o=t.options,l=o.ticks,u=o.scaleLabel,d=o.gridLines,h=o.display,f=t.isHorizontal(),p=a(l),m=o.gridLines.tickMarkLength;if(e.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&d.drawTicks?m:0,e.height=f?h&&d.drawTicks?m:0:t.maxHeight,u.display&&h){var g=s(u)+c.options.toPadding(u.padding).height;f?e.height+=g:e.width+=g}if(l.display&&h){var v=c.longestText(t.ctx,p.font,n,t.longestTextCache),y=c.numberOfLabelLines(n),b=.5*p.size,w=t.options.ticks.padding;if(f){t.longestLabelWidth=v;var x=c.toRadians(t.labelRotation),_=Math.cos(x),D=Math.sin(x)*v+p.size*y+b*(y-1)+b;e.height=Math.min(t.maxHeight,e.height+D+w),t.ctx.font=p.font;var k=r(t.ctx,n[0],p.font),S=r(t.ctx,n[n.length-1],p.font);0!==t.labelRotation?(t.paddingLeft="bottom"===o.position?_*k+3:_*b+3,t.paddingRight="bottom"===o.position?_*b+3:_*S+3):(t.paddingLeft=k/2+3,t.paddingRight=S/2+3)}else l.mirror?v=0:v+=w+b,e.width=Math.min(t.maxWidth,e.width+v),t.paddingTop=p.size/2,t.paddingBottom=p.size/2}t.handleMargins(),t.width=e.width,t.height=e.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(){c.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(c.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:c.noop,getPixelForValue:c.noop,getValueForPixel:c.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),o=i*t+e.paddingLeft;n&&(o+=i/2);var r=e.left+Math.round(o);return r+=e.isFullWidth()?e.margins.left:0}var a=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(a/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,i=e.left+Math.round(n);return i+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:0r.width-(r.paddingLeft+r.paddingRight)&&(e=1+Math.floor((h+s.autoSkipPadding)*l/(r.width-(r.paddingLeft+r.paddingRight)))),o&&ol.height-e.height&&(d="bottom");var h=(u.left+u.right)/2,f=(u.top+u.bottom)/2;i="center"===d?(n=function(t){return t<=h},function(t){return h=l.width-e.width/2}),o=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},r=function(t){return t-e.width-s.caretSize-s.caretPadding<0},a=function(t){return t<=f?"top":"bottom"},n(s.x)?(c="left",o(s.x)&&(c="center",d=a(s.y))):i(s.x)&&(c="right",r(s.x)&&(c="center",d=a(s.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:c,yAlign:p.yAlign?p.yAlign:d}}(this,O=function(t,e){var n=t._chart.ctx,i=2*e.yPadding,o=0,r=e.body,a=r.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);a+=e.beforeBody.length+e.afterBody.length;var s=e.title.length,l=e.footer.length,u=e.titleFontSize,d=e.bodyFontSize,h=e.footerFontSize;i+=s*u,i+=s?(s-1)*e.titleSpacing:0,i+=s?e.titleMarginBottom:0,i+=a*d,i+=a?(a-1)*e.bodySpacing:0,i+=l?e.footerMarginTop:0,i+=l*h,i+=l?(l-1)*e.footerSpacing:0;var f=0,p=function(t){o=Math.max(o,n.measureText(t).width+f)};return n.font=c.fontString(u,e._titleFontStyle,e._titleFontFamily),c.each(e.title,p),n.font=c.fontString(d,e._bodyFontStyle,e._bodyFontFamily),c.each(e.beforeBody.concat(e.afterBody),p),f=e.displayColors?d+2:0,c.each(r,function(t){c.each(t.before,p),c.each(t.lines,p),c.each(t.after,p)}),f=0,n.font=c.fontString(h,e._footerFontStyle,e._footerFontFamily),c.each(e.footer,p),{width:o+=2*e.xPadding,height:i}}(this,M)),i=M,o=O,r=P,s=k._chart,l=i.x,u=i.y,h=i.caretSize,f=i.caretPadding,p=i.cornerRadius,m=r.xAlign,g=r.yAlign,v=h+f,y=p+f,"right"===m?l-=o.width:"center"===m&&((l-=o.width/2)+o.width>s.width&&(l=s.width-o.width),l<0&&(l=0)),"top"===g?u+=v:u-="bottom"===g?o.height+v:o.height/2,"center"===g?"left"===m?l+=v:"right"===m&&(l-=v):"left"===m?l-=y:"right"===m&&(l+=y),I={x:l,y:u}}else M.opacity=0;return M.xAlign=P.xAlign,M.yAlign=P.yAlign,M.x=I.x,M.y=I.y,M.width=O.width,M.height=O.height,M.caretX=L.x,M.caretY=L.y,k._model=M,t&&S.custom&&S.custom.call(k,M),k},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,o=this.getCaretPosition(t,e,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)},getCaretPosition:function(t,e,n){var i,o,r,a,s,l,u=n.caretSize,c=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=t.x,p=t.y,m=e.width,g=e.height;if("center"===h)s=p+g/2,l="left"===d?(o=(i=f)-u,r=i,a=s+u,s-u):(o=(i=f+m)+u,r=i,a=s-u,s+u);else if(i="left"===d?(o=f+c+u)-u:"right"===d?(o=f+m-c-u)-u:(o=n.caretX)-u,r=o+u,"top"===h)s=(a=p)-u,l=a;else{s=(a=p+g)+u,l=a;var v=r;r=i,i=v}return{x1:i,x2:o,x3:r,y1:a,y2:s,y3:l}},drawTitle:function(t,e,n,o){var r=e.title;if(r.length){n.textAlign=e._titleAlign,n.textBaseline="top";var a,s,l=e.titleFontSize,u=e.titleSpacing;for(n.fillStyle=i(e.titleFontColor,o),n.font=c.fontString(l,e._titleFontStyle,e._titleFontFamily),a=0,s=r.length;a=n.innerRadius&&a<=n.outerRadius;return u&&c}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t=this._chart.ctx,e=this._view,n=e.startAngle,i=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,i),t.arc(e.x,e.y,e.innerRadius,i,n,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{26:26,27:27,46:46}],38:[function(t,e,n){"use strict";var i=t(26),o=t(27),r=t(46),a=i.global;i._set("global",{elements:{line:{tension:.4,backgroundColor:a.defaultColor,borderWidth:3,borderColor:a.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=o.extend({draw:function(){var t,e,n,i,o=this._view,s=this._chart.ctx,l=o.spanGaps,u=this._children.slice(),c=a.elements.line,d=-1;for(this._loop&&u.length&&u.push(u[0]),s.save(),s.lineCap=o.borderCapStyle||c.borderCapStyle,s.setLineDash&&s.setLineDash(o.borderDash||c.borderDash),s.lineDashOffset=o.borderDashOffset||c.borderDashOffset,s.lineJoin=o.borderJoinStyle||c.borderJoinStyle,s.lineWidth=o.borderWidth||c.borderWidth,s.strokeStyle=o.borderColor||a.defaultColor,s.beginPath(),d=-1,t=0;t=t.left&&1.01*t.right>=n.x&&n.y>=t.top&&1.01*t.bottom>=n.y)&&(i.strokeStyle=e.borderColor||s,i.lineWidth=a.valueOrDefault(e.borderWidth,o.global.elements.point.borderWidth),i.fillStyle=e.backgroundColor||s,a.canvas.drawPoint(i,r,u,c,d,l))}})},{26:26,27:27,46:46}],40:[function(t,e,n){"use strict";function i(t){return void 0!==t._view.width}function o(t){var e,n,o,r,a=t._view;if(i(t)){var s=a.width/2;e=a.x-s,n=a.x+s,o=Math.min(a.y,a.base),r=Math.max(a.y,a.base)}else{var l=a.height/2;e=Math.min(a.x,a.base),n=Math.max(a.x,a.base),o=a.y-l,r=a.y+l}return{left:e,top:o,right:n,bottom:r}}var r=t(26),a=t(27);r._set("global",{elements:{rectangle:{backgroundColor:r.global.defaultColor,borderColor:r.global.defaultColor,borderSkipped:"bottom",borderWidth:0}}}),e.exports=a.extend({draw:function(){function t(t){return v[(y+t)%4]}var e,n,i,o,r,a,s,l=this._chart.ctx,u=this._view,c=u.borderWidth;if(s=u.horizontal?(e=u.base,n=u.x,i=u.y-u.height/2,o=u.y+u.height/2,r=e=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom}return n},inLabelRange:function(t,e){if(!this._view)return!1;var n=o(this);return i(this)?t>=n.left&&t<=n.right:e>=n.top&&e<=n.bottom},inXRange:function(t){var e=o(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=o(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e,n=this._view;return e=i(this)?(t=n.x,(n.y+n.base)/2):(t=(n.x+n.base)/2,n.y),{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{26:26,27:27}],41:[function(t,e,n){"use strict";e.exports={},e.exports.Arc=t(37),e.exports.Line=t(38),e.exports.Point=t(39),e.exports.Rectangle=t(40)},{37:37,38:38,39:39,40:40}],42:[function(t,e,n){"use strict";var i=t(43);n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,o,r){if(r){var a=Math.min(r,o/2-1e-7,i/2-1e-7);t.moveTo(e+a,n),t.lineTo(e+i-a,n),t.arcTo(e+i,n,e+i,n+a,a),t.lineTo(e+i,n+o-a),t.arcTo(e+i,n+o,e+i-a,n+o,a),t.lineTo(e+a,n+o),t.arcTo(e,n+o,e,n+o-a,a),t.lineTo(e,n+a),t.arcTo(e,n,e+a,n,a),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,i,o)},drawPoint:function(t,e,n,i,o,r){var a,s,l,u,c,d;if(r=r||0,!e||"object"!=typeof e||"[object HTMLImageElement]"!==(a=e.toString())&&"[object HTMLCanvasElement]"!==a){if(!(isNaN(n)||n<=0)){switch(t.save(),t.translate(i,o),t.rotate(r*Math.PI/180),t.beginPath(),e){default:t.arc(0,0,n,0,2*Math.PI),t.closePath();break;case"triangle":c=(s=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(-s/2,c/3),t.lineTo(s/2,c/3),t.lineTo(0,-2*c/3),t.closePath();break;case"rect":d=1/Math.SQRT2*n,t.rect(-d,-d,2*d,2*d);break;case"rectRounded":var h=n/Math.SQRT2,f=-h,p=-h,m=Math.SQRT2*n;this.roundedRect(t,f,p,m,m,.425*n);break;case"rectRot":d=1/Math.SQRT2*n,t.moveTo(-d,0),t.lineTo(0,d),t.lineTo(d,0),t.lineTo(0,-d),t.closePath();break;case"cross":t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-n,0),t.lineTo(n,0);break;case"crossRot":l=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(-l,-u),t.lineTo(l,u),t.moveTo(-l,u),t.lineTo(l,-u);break;case"star":t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-n,0),t.lineTo(n,0),l=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(-l,-u),t.lineTo(l,u),t.moveTo(-l,u),t.lineTo(l,-u);break;case"line":t.moveTo(-n,0),t.lineTo(n,0);break;case"dash":t.moveTo(0,0),t.lineTo(n,0)}t.fill(),t.stroke(),t.restore()}}else t.drawImage(e,i-e.width/2,o-e.height/2,e.width,e.height)},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){if(n.steppedLine)return"after"===n.steppedLine&&!i||"after"!==n.steppedLine&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},i.clear=n.clear,i.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments)}},{43:43}],43:[function(t,e,n){"use strict";var i,o={noop:function(){},uid:(i=0,function(){return i++}),isNullOrUndef:function(t){return null==t},isArray:Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return o.valueOrDefault(o.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var r,a,s;if(o.isArray(t))if(a=t.length,i)for(r=a-1;0<=r;r--)e.call(n,t[r],r);else for(r=0;r
';var r=e.childNodes[0],a=e.childNodes[1];e._reset=function(){r.scrollLeft=1e6,r.scrollTop=1e6,a.scrollLeft=1e6,a.scrollTop=1e6};var s=function(){e._reset(),t()};return o(r,"scroll",s.bind(r,"expand")),o(a,"scroll",s.bind(a,"shrink")),e}((s=!(i=function(){if(b.resizer)return e(a("resize",n))}),l=[],function(){l=Array.prototype.slice.call(arguments),r=r||this,s||(s=!0,u.requestAnimFrame.call(window,function(){s=!1,i.apply(r,l)}))}));g=function(){if(b.resizer){var e=t.parentNode;e&&e!==w.parentNode&&e.insertBefore(w,e.firstChild),w._reset()}},v=(m=t)[c]||(m[c]={}),y=v.renderProxy=function(t){t.animationName===f&&g()},u.each(p,function(t){o(m,t,y)}),v.reflow=!!m.offsetParent,m.classList.add(h)}function l(t){var e,n,i,o=t[c]||{},a=o.resizer;delete o.resizer,n=(e=t)[c]||{},(i=n.renderProxy)&&(u.each(p,function(t){r(e,t,i)}),delete n.renderProxy),e.classList.remove(h),a&&a.parentNode&&a.parentNode.removeChild(a)}var u=t(46),c="$chartjs",d="chartjs-",h=d+"render-monitor",f=d+"render-animation",p=["animationstart","webkitAnimationStart"],m={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},g=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t,e,n,i="from{opacity:0.99}to{opacity:1}";e="@-webkit-keyframes "+f+"{"+i+"}@keyframes "+f+"{"+i+"}."+h+"{-webkit-animation:"+f+" 0.001s;animation:"+f+" 0.001s;}",n=(t=this)._style||document.createElement("style"),t._style||(e="/* Chart.js */\n"+e,(t._style=n).setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(function(t,e){var n=t.style,o=t.getAttribute("height"),r=t.getAttribute("width");if(t[c]={initial:{height:o,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===r||""===r){var a=i(t,"width");void 0!==a&&(t.width=a)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=i(t,"height");void 0!==a&&(t.height=s)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[c]){var n=e[c].initial;["height","width"].forEach(function(t){var i=n[t];u.isNullOrUndef(i)?e.removeAttribute(t):e.setAttribute(t,i)}),u.each(n.style||{},function(t,n){e.style[n]=t}),e.width=e.width,delete e[c]}},addEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var r=n[c]||(n[c]={});o(i,e,(r.proxies||(r.proxies={}))[t.id+"_"+e]=function(e){var i,o,r,s;n((o=t,r=m[(i=e).type]||i.type,s=u.getRelativePosition(i,o),a(r,o,s.x,s.y,i)))})}else s(i,n,t)},removeEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var o=((n[c]||{}).proxies||{})[t.id+"_"+e];o&&r(i,e,o)}else l(i)}},u.addEvent=o,u.removeEvent=r},{46:46}],49:[function(t,e,n){"use strict";var i=t(46),o=t(47),r=t(48),a=r._enabled?r:o;e.exports=i.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},a)},{46:46,47:47,48:48}],50:[function(t,e,n){"use strict";e.exports={},e.exports.filler=t(51),e.exports.legend=t(52),e.exports.title=t(53)},{51:51,52:52,53:53}],51:[function(t,e,n){"use strict";function i(t,e,n){var i,o=t._model||{},r=o.fill;if(void 0===r&&(r=!!o.backgroundColor),!1===r||null===r)return!1;if(!0===r)return"origin";if(i=parseFloat(r,10),isFinite(i)&&Math.floor(i)===i)return"-"!==r[0]&&"+"!==r[0]||(i=e+i),!(i===e||i<0||n<=i)&&i;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function o(t){var e,n=t.el._model||{},i=t.el._scale||{},o=t.fill,r=null;if(isFinite(o))return null;if("start"===o?r=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===o?r=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?r=n.scaleZero:i.getBasePosition?r=i.getBasePosition():i.getBasePixel&&(r=i.getBasePixel()),null!=r){if(void 0!==r.x&&void 0!==r.y)return r;if("number"==typeof r&&isFinite(r))return{x:(e=i.isHorizontal())?r:null,y:e?null:r}}return null}function r(t,e,n){var i,o=t[e].fill,r=[e];if(!n)return o;for(;!1!==o&&-1===r.indexOf(o);){if(!isFinite(o))return o;if(!(i=t[o]))return!1;if(i.visible)return o;r.push(o),o=i.fill}return!1}function a(t){return t&&!t.skip}function s(t,e,n,i,o){var r;if(i&&o){for(t.moveTo(e[0].x,e[0].y),r=1;r');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}});var c=a.extend({initialize:function(t){s.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:u,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:u,beforeSetDimensions:u,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:u,beforeBuildLabels:u,buildLabels:function(){var t=this,e=t.options.labels||{},n=s.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter(function(n){return e.filter(n,t.chart.data)})),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:u,beforeFit:u,fit:function(){var t=this,e=t.options,n=e.labels,o=e.display,a=t.ctx,l=r.global,u=s.valueOrDefault,c=u(n.fontSize,l.defaultFontSize),d=u(n.fontStyle,l.defaultFontStyle),h=u(n.fontFamily,l.defaultFontFamily),f=s.fontString(c,d,h),p=t.legendHitBoxes=[],m=t.minSize,g=t.isHorizontal();if(m.height=g?(m.width=t.maxWidth,o?10:0):(m.width=o?10:0,t.maxHeight),o)if(a.font=f,g){var v=t.lineWidths=[0],y=t.legendItems.length?c+n.padding:0;a.textAlign="left",a.textBaseline="top",s.each(t.legendItems,function(e,o){var r=i(n,c)+c/2+a.measureText(e.text).width;v[v.length-1]+r+n.padding>=t.width&&(y+=c+n.padding,v[v.length]=t.left),p[o]={left:0,top:0,width:r,height:c},v[v.length-1]+=r+n.padding}),m.height+=y}else{var b=n.padding,w=t.columnWidths=[],x=n.padding,_=0,D=0,k=c+b;s.each(t.legendItems,function(t,e){var o=i(n,c)+c/2+a.measureText(t.text).width;D+k>m.height&&(x+=_+n.padding,w.push(_),D=_=0),_=Math.max(_,o),D+=k,p[e]={left:0,top:0,width:o,height:c}}),x+=_,w.push(_),m.width+=x}t.width=m.width,t.height=m.height},afterFit:u,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,o=r.global,a=o.elements.line,l=t.width,u=t.lineWidths;if(e.display){var c,d=t.ctx,h=s.valueOrDefault,f=h(n.fontColor,o.defaultFontColor),p=h(n.fontSize,o.defaultFontSize),m=h(n.fontStyle,o.defaultFontStyle),g=h(n.fontFamily,o.defaultFontFamily),v=s.fontString(p,m,g);d.textAlign="left",d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=f,d.fillStyle=f,d.font=v;var y=i(n,p),b=t.legendHitBoxes,w=t.isHorizontal();c=w?{x:t.left+(l-u[0])/2,y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+n.padding,line:0};var x=p+n.padding;s.each(t.legendItems,function(i,r){var f,m,g,v,_,D=d.measureText(i.text).width,k=y+p/2+D,S=c.x,C=c.y;w?l<=S+k&&(C=c.y+=x,c.line++,S=c.x=t.left+(l-u[c.line])/2):C+x>t.bottom&&(S=c.x=S+t.columnWidths[c.line]+n.padding,C=c.y=t.top+n.padding,c.line++),function(t,n,i){if(!(isNaN(y)||y<=0)){d.save(),d.fillStyle=h(i.fillStyle,o.defaultColor),d.lineCap=h(i.lineCap,a.borderCapStyle),d.lineDashOffset=h(i.lineDashOffset,a.borderDashOffset),d.lineJoin=h(i.lineJoin,a.borderJoinStyle),d.lineWidth=h(i.lineWidth,a.borderWidth),d.strokeStyle=h(i.strokeStyle,o.defaultColor);var r=0===h(i.lineWidth,a.borderWidth);if(d.setLineDash&&d.setLineDash(h(i.lineDash,a.borderDash)),e.labels&&e.labels.usePointStyle){var l=p*Math.SQRT2/2,u=l/Math.SQRT2,c=t+u,f=n+u;s.canvas.drawPoint(d,i.pointStyle,l,c,f)}else r||d.strokeRect(t,n,y,p),d.fillRect(t,n,y,p);d.restore()}}(S,C,i),b[r].left=S,b[r].top=C,f=i,m=D,v=y+(g=p/2)+S,_=C+g,d.fillText(f.text,v,_),f.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(v,_),d.lineTo(v+m,_),d.stroke()),w?c.x+=k+n.padding:c.y+=x})}},handleEvent:function(t){var e=this,n=e.options,i="mouseup"===t.type?"click":t.type,o=!1;if("mousemove"===i){if(!n.onHover)return}else{if("click"!==i)return;if(!n.onClick)return}var r=t.x,a=t.y;if(r>=e.left&&r<=e.right&&a>=e.top&&a<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&r<=u.left+u.width&&a>=u.top&&a<=u.top+u.height){if("click"===i){n.onClick.call(e,t.native,e.legendItems[l]),o=!0;break}if("mousemove"===i){n.onHover.call(e,t.native,e.legendItems[l]),o=!0;break}}}return o}});e.exports={id:"legend",_element:c,beforeInit:function(t){var e=t.options.legend;e&&o(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(s.mergeIf(e,r.global.legend),n?(l.configure(t,n,e),n.options=e):o(t,e)):n&&(l.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}},{26:26,27:27,31:31,46:46}],53:[function(t,e,n){"use strict";function i(t,e){var n=new u({ctx:t.ctx,options:e,chart:t});s.configure(t,n,e),s.addBox(t,n),t.titleBlock=n}var o=t(26),r=t(27),a=t(46),s=t(31),l=a.noop;o._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}});var u=r.extend({initialize:function(t){a.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:l,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:l,beforeSetDimensions:l,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:l,beforeBuildLabels:l,buildLabels:l,afterBuildLabels:l,beforeFit:l,fit:function(){var t=this,e=a.valueOrDefault,n=t.options,i=n.display,r=e(n.fontSize,o.global.defaultFontSize),s=t.minSize,l=a.isArray(n.text)?n.text.length:1,u=a.options.toLineHeight(n.lineHeight,r),c=i?l*u+2*n.padding:0;t.isHorizontal()?(s.width=t.maxWidth,s.height=c):(s.width=c,s.height=t.maxHeight),t.width=s.width,t.height=s.height},afterFit:l,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=a.valueOrDefault,i=t.options,r=o.global;if(i.display){var s,l,u,c=n(i.fontSize,r.defaultFontSize),d=n(i.fontStyle,r.defaultFontStyle),h=n(i.fontFamily,r.defaultFontFamily),f=a.fontString(c,d,h),p=a.options.toLineHeight(i.lineHeight,c),m=p/2+i.padding,g=0,v=t.top,y=t.left,b=t.bottom,w=t.right;e.fillStyle=n(i.fontColor,r.defaultFontColor),e.font=f,t.isHorizontal()?(l=y+(w-y)/2,u=v+m,s=w-y):(l="left"===i.position?y+m:w-m,u=v+(b-v)/2,s=b-v,g=Math.PI*("left"===i.position?-.5:.5)),e.save(),e.translate(l,u),e.rotate(g),e.textAlign="center",e.textBaseline="middle";var x=i.text;if(a.isArray(x))for(var _=0,D=0;De.max&&(e.max=i))})});e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this.options.ticks;if(this.isHorizontal())t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.width/50));else{var n=o.valueOrDefault(e.fontSize,i.global.defaultFontSize);t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.height/(2*n)))}return t},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this,n=e.start,i=+e.getRightValue(t),o=e.end-n;return e.isHorizontal()?e.left+e.width/o*(i-n):e.bottom-e.height/o*(i-n)},getValueForPixel:function(t){var e=this,n=e.isHorizontal(),i=n?e.width:e.height,o=(n?t-e.left:e.bottom-t)/i;return e.start+(e.end-e.start)*o},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});r.registerScaleType("linear",n,e)}},{26:26,34:34,35:35,46:46}],56:[function(t,e,n){"use strict";var i=t(46),o=t(33);e.exports=function(t){var e=i.noop;t.LinearScaleBase=o.extend({getRightValue:function(t){return"string"==typeof t?+t:o.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=i.sign(t.min),o=i.sign(t.max);n<0&&o<0?t.max=0:0=t.max&&(r?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:e,handleDirectionalChanges:e,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),o={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:i.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=function(t,e){var n,o,r,a=[];if(t.stepSize&&0e.max&&(e.max=i),0!==i&&(null===e.minNotZero||ic.r&&(c.r=y.end,d.r=g),b.startc.b&&(c.b=b.end,d.b=g)}t.setReductions(u,c,d)}(this):(t=this,i=Math.min(t.height/2,t.width/2),t.drawingArea=Math.round(i),t.setCenterPoint(0,0,0,0))},setReductions:function(t,e,n){var i=e.l/Math.sin(n.l),o=Math.max(e.r-this.width,0)/Math.sin(n.r),r=-e.t/Math.cos(n.t),a=-Math.max(e.b-this.height,0)/Math.cos(n.b);i=u(i),o=u(o),r=u(r),a=u(a),this.drawingArea=Math.min(Math.round(t-(i+o)/2),Math.round(t-(r+a)/2)),this.setCenterPoint(i,o,r,a)},setCenterPoint:function(t,e,n,i){var o=this,r=o.width-e-o.drawingArea,a=t+o.drawingArea,s=n+o.drawingArea,l=o.height-i-o.drawingArea;o.xCenter=Math.round((a+r)/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 n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(n)*e)+this.xCenter,y:Math.round(Math.sin(n)*e)+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this.min,e=this.max;return this.getPointPositionForValue(0,this.beginAtZero?0:t<0&&e<0?e:0>1)-1]||null,r=t[i],!o)return{lo:null,hi:r};if(r[e]n))return{lo:o,hi:r};s=i-1}}return{lo:r,hi:null}}(t,e,n),r=o.lo?o.hi?o.lo:t[t.length-2]:t[0],a=o.lo?o.hi?o.hi:t[t.length-1]:t[1],s=a[e]-r[e],l=s?(n-r[e])/s:0,u=(a[i]-r[i])*l;return r[i]+u}function a(t,e){var n=e.parser,i=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof i?c(t,i):(t instanceof c||(t=c(t)),t.isValid()?t:"function"==typeof i?i(t):t)}function s(t,e){if(h.isNullOrUndef(t))return null;var n=e.options.time,i=a(e.getRightValue(t),n);return i.isValid()?(n.round&&i.startOf(n.round),i.valueOf()):null}function l(t){for(var e=y.indexOf(t)+1,n=y.length;e=y.indexOf(e);o--)if(r=y[o],v[r].common&&a.as(r)>=t.length)return r;return y[e?y.indexOf(e):0]}(C,k.minUnit,w.min,w.max),w._majorUnit=l(w._unit),w._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var o,r,a,s,l,u=[],c=[e];for(o=0,r=t.length;o=3&&t%100<=10?3:t%100>=11?4:5},o={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},r=function(t){return function(e,n,r,a){var s=i(e),l=o[t][i(e)];return 2===s&&(l=l[n?0:1]),l.replace(/%d/i,e)}},a=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];return t.defineLocale("ar",{months:a,monthsShort:a,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(t){return"م"===t},meridiem:function(t,e,n){return t<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:r("s"),ss:r("s"),m:r("m"),mm:r("m"),h:r("h"),hh:r("h"),d:r("d"),dd:r("d"),M:r("M"),MM:r("M"),y:r("y"),yy:r("y")},preparse:function(t){return t.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(t){return n[t]}).replace(/،/g,",")},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]}).replace(/,/g,"،")},week:{dow:6,doy:12}})})},"4klR":function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=n("TqGs"),r=function(){function t(t,e){for(var n=0;n=2&&e%10<=4&&(e%100<10||e%100>=20)?n[1]:n[2]}function n(t,n,i){var o={ss:n?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:n?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===i?n?"минута":"минуту":t+" "+e(o[i],+t)}var i=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];t.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:i,longMonthsParse:i,shortMonthsParse:i,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(t){if(t.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(t){if(t.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:n,m:n,mm:n,h:"час",hh:n,d:"день",dd:n,M:"месяц",MM:n,y:"год",yy:n},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(t){return/^(дня|вечера)$/.test(t)},meridiem:function(t,e,n){return t<4?"ночи":t<12?"утра":t<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(t,e){switch(e){case"M":case"d":case"DDD":return t+"-й";case"D":return t+"-го";case"w":case"W":return t+"-я";default:return t}},week:{dow:1,doy:4}})}(n(0))}()}})})},"7Rwe":function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=n("PJh5"),r=n.n(o),a=n("awG4"),s=n("+NP7"),l=n("TqGs"),u=n("ztJp"),c=n("sZyP"),d=n("Eg81"),h=n("YVa9"),f=n("/TWM"),p=n("WByX"),m=n("9psQ"),g=n("iNbH"),v=n("T4Pq"),y=n("hMlo"),b=n("IArr"),w=n("RvrG"),x=n("mF88"),_=n("O5V4"),D=n("ddt0"),k=n("Orr0"),S=n("Eq4i"),C=n("y84T"),M=function(){function t(t,e){for(var n=0;n');var n=t.data,i=n.datasets,o=n.labels;if(i.length)for(var r=0;r'),o[r]&&e.push(o[r]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(n,i){var o=t.getDatasetMeta(0),a=e.datasets[0],s=o.data[i],l=s&&s.custom||{},u=r.valueAtIndexOrDefault,c=t.options.elements.arc;return{text:n,fillStyle:l.backgroundColor?l.backgroundColor:u(a.backgroundColor,i,c.backgroundColor),strokeStyle:l.borderColor?l.borderColor:u(a.borderColor,i,c.borderColor),lineWidth:l.borderWidth?l.borderWidth:u(a.borderWidth,i,c.borderWidth),hidden:isNaN(a.data[i])||o.data[i].hidden,index:i}}):[]}},onClick:function(t,e){var n,i,o,r=e.index,a=this.chart;for(n=0,i=(a.data.datasets||[]).length;n=Math.PI?-1:p<-Math.PI?1:0))+f,g=Math.cos(p),v=Math.sin(p),y=Math.cos(m),b=Math.sin(m),w=p<=0&&0<=m||p<=2*Math.PI&&2*Math.PI<=m,x=p<=.5*Math.PI&&.5*Math.PI<=m||p<=2.5*Math.PI&&2.5*Math.PI<=m,_=p<=-Math.PI&&-Math.PI<=m||p<=Math.PI&&Math.PI<=m,D=p<=.5*-Math.PI&&.5*-Math.PI<=m||p<=1.5*Math.PI&&1.5*Math.PI<=m,k=h/100,S=_?-1:Math.min(g*(g<0?1:k),y*(y<0?1:k)),C=D?-1:Math.min(v*(v<0?1:k),b*(b<0?1:k)),M=w?1:Math.max(g*(0');var n=t.data,i=n.datasets,o=n.labels;if(i.length)for(var r=0;r'),o[r]&&e.push(o[r]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map(function(n,i){var o=t.getDatasetMeta(0),a=e.datasets[0],s=o.data[i].custom||{},l=r.valueAtIndexOrDefault,u=t.options.elements.arc;return{text:n,fillStyle:s.backgroundColor?s.backgroundColor:l(a.backgroundColor,i,u.backgroundColor),strokeStyle:s.borderColor?s.borderColor:l(a.borderColor,i,u.borderColor),lineWidth:s.borderWidth?s.borderWidth:l(a.borderWidth,i,u.borderWidth),hidden:isNaN(a.data[i])||o.data[i].hidden,index:i}}):[]}},onClick:function(t,e){var n,i,o,r=e.index,a=this.chart;for(n=0,i=(a.data.datasets||[]).length;n=e.numSteps?(o.callback(e.onAnimationComplete,[e],n),n.animating=!1,i.splice(r,1)):++r}}},{26:26,46:46}],24:[function(t,e,n){"use strict";var i=t(22),o=t(23),r=t(26),a=t(46),s=t(29),l=t(31),u=t(49),c=t(32),d=t(34),h=t(36);e.exports=function(t){function e(t){return"top"===t||"bottom"===t}t.types={},t.instances={},t.controllers={},a.extend(t.prototype,{construct:function(e,n){var i,o,s=this;(o=(i=(i=n)||{}).data=i.data||{}).datasets=o.datasets||[],o.labels=o.labels||[],i.options=a.configMerge(r.global,r[i.type],i.options||{}),n=i;var l=u.acquireContext(e,n),c=l&&l.canvas,d=c&&c.height,h=c&&c.width;s.id=a.uid(),s.ctx=l,s.canvas=c,s.config=n,s.width=h,s.height=d,s.aspectRatio=d?h/d:null,s.options=n.options,s._bufferedRender=!1,(s.chart=s).controller=s,t.instances[s.id]=s,Object.defineProperty(s,"data",{get:function(){return s.config.data},set:function(t){s.config.data=t}}),l&&c?(s.initialize(),s.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return c.notify(t,"beforeInit"),a.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),c.notify(t,"afterInit"),t},clear:function(){return a.canvas.clear(this),this},stop:function(){return o.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,o=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(a.getMaximumWidth(i))),s=Math.max(0,Math.floor(o?r/o:a.getMaximumHeight(i)));if((e.width!==r||e.height!==s)&&(i.width=e.width=r,i.height=e.height=s,i.style.width=r+"px",i.style.height=s+"px",a.retinaScale(e,n.devicePixelRatio),!t)){var l={width:r,height:s};c.notify(e,"resize",[l]),e.options.onResize&&e.options.onResize(e,l),e.stop(),e.update({duration:e.options.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;a.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),a.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,n=t.options,i=t.scales||{},o=[],r=Object.keys(i).reduce(function(t,e){return t[e]=!1,t},{});n.scales&&(o=o.concat((n.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(n.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),n.scale&&o.push({options:n.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),a.each(o,function(n){var o=n.options,s=o.id,l=a.valueOrDefault(o.type,n.dtype);e(o.position)!==e(n.dposition)&&(o.position=n.dposition),r[s]=!0;var u=null;if(s in i&&i[s].type===l)(u=i[s]).options=o,u.ctx=t.ctx,u.chart=t;else{var c=d.getScaleConstructor(l);if(!c)return;u=new c({id:s,type:l,options:o,ctx:t.ctx,chart:t}),i[u.id]=u}u.mergeTicksOptions(),n.isDefault&&(t.scale=u)}),a.each(r,function(t,e){t||delete i[e]}),t.scales=i,d.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e=this,n=[],i=[];return a.each(e.data.datasets,function(o,r){var a=e.getDatasetMeta(r),s=o.type||e.config.type;if(a.type&&a.type!==s&&(e.destroyDatasetMeta(r),a=e.getDatasetMeta(r)),a.type=s,n.push(a.type),a.controller)a.controller.updateIndex(r),a.controller.linkScales();else{var l=t.controllers[a.type];if(void 0===l)throw new Error('"'+a.type+'" is not a chart type.');a.controller=new l(e,r),i.push(a.controller)}},e),i},resetElements:function(){var t=this;a.each(t.data.datasets,function(e,n){t.getDatasetMeta(n).controller.reset()},t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(e){var n,i,o=this;if(e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]}),i=(n=o).options,a.each(n.scales,function(t){l.removeBox(n,t)}),i=a.configMerge(t.defaults.global,t.defaults[n.config.type],i),n.options=n.config.options=i,n.ensureScalesHaveIDs(),n.buildOrUpdateScales(),n.tooltip._options=i.tooltips,n.tooltip.initialize(),c._invalidate(o),!1!==c.notify(o,"beforeUpdate")){o.tooltip._data=o.data;var r=o.buildOrUpdateControllers();a.each(o.data.datasets,function(t,e){o.getDatasetMeta(e).controller.buildOrUpdateElements()},o),o.updateLayout(),o.options.animation&&o.options.animation.duration&&a.each(r,function(t){t.reset()}),o.updateDatasets(),o.tooltip.initialize(),o.lastActive=[],c.notify(o,"afterUpdate"),o._bufferedRender?o._bufferedRequest={duration:e.duration,easing:e.easing,lazy:e.lazy}:o.render(e)}},updateLayout:function(){!1!==c.notify(this,"beforeLayout")&&(l.update(this,this.width,this.height),c.notify(this,"afterScaleUpdate"),c.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==c.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t=e[t].length&&e[t].push({}),!e[t][o].type||l.type&&l.type!==e[t][o].type?r.merge(e[t][o],[a.getScaleDefaults(s),l]):r.merge(e[t][o],l)}else r._merger(t,e,n,i)}})},r.where=function(t,e){if(r.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return r.each(t,function(t){e(t)&&n.push(t)}),n},r.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,o=t.length;i=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},r.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},r.niceNum=function(t,e){var n=Math.floor(r.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},r.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},r.getRelativePosition=function(t,e){var n,i,o=t.originalEvent||t,a=t.target||t.srcElement,s=a.getBoundingClientRect(),l=o.touches;i=l&&0n.length){for(var u=0;ue&&(e=t.length)}),e},r.color=i?function(t){return t instanceof CanvasGradient&&(t=o.global.defaultColor),i(t)}:function(t){return console.error("Color.js not found!"),t},r.getHoverColor=function(t){return t instanceof CanvasPattern?t:r.color(t).saturate(.5).darken(.1).rgbString()}}},{26:26,3:3,34:34,46:46}],29:[function(t,e,n){"use strict";function i(t,e){return t.native?{x:t.x,y:t.y}:u.getRelativePosition(t,e)}function o(t,e){var n,i,o,r,a;for(i=0,r=t.data.datasets.length;it.maxHeight){s--;break}s++,d=l*u}t.labelRotation=s},afterCalculateTickRotation:function(){c.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){c.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=i(t._ticks),o=t.options,l=o.ticks,u=o.scaleLabel,d=o.gridLines,h=o.display,f=t.isHorizontal(),p=a(l),m=o.gridLines.tickMarkLength;if(e.width=f?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:h&&d.drawTicks?m:0,e.height=f?h&&d.drawTicks?m:0:t.maxHeight,u.display&&h){var g=s(u)+c.options.toPadding(u.padding).height;f?e.height+=g:e.width+=g}if(l.display&&h){var v=c.longestText(t.ctx,p.font,n,t.longestTextCache),y=c.numberOfLabelLines(n),b=.5*p.size,w=t.options.ticks.padding;if(f){t.longestLabelWidth=v;var x=c.toRadians(t.labelRotation),_=Math.cos(x),D=Math.sin(x)*v+p.size*y+b*(y-1)+b;e.height=Math.min(t.maxHeight,e.height+D+w),t.ctx.font=p.font;var k=r(t.ctx,n[0],p.font),S=r(t.ctx,n[n.length-1],p.font);0!==t.labelRotation?(t.paddingLeft="bottom"===o.position?_*k+3:_*b+3,t.paddingRight="bottom"===o.position?_*b+3:_*S+3):(t.paddingLeft=k/2+3,t.paddingRight=S/2+3)}else l.mirror?v=0:v+=w+b,e.width=Math.min(t.maxWidth,e.width+v),t.paddingTop=p.size/2,t.paddingBottom=p.size/2}t.handleMargins(),t.width=e.width,t.height=e.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(){c.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(c.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:c.noop,getPixelForValue:c.noop,getValueForPixel:c.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),o=i*t+e.paddingLeft;n&&(o+=i/2);var r=e.left+Math.round(o);return r+=e.isFullWidth()?e.margins.left:0}var a=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(a/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,i=e.left+Math.round(n);return i+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:0r.width-(r.paddingLeft+r.paddingRight)&&(e=1+Math.floor((h+s.autoSkipPadding)*l/(r.width-(r.paddingLeft+r.paddingRight)))),o&&ol.height-e.height&&(d="bottom");var h=(u.left+u.right)/2,f=(u.top+u.bottom)/2;i="center"===d?(n=function(t){return t<=h},function(t){return h=l.width-e.width/2}),o=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},r=function(t){return t-e.width-s.caretSize-s.caretPadding<0},a=function(t){return t<=f?"top":"bottom"},n(s.x)?(c="left",o(s.x)&&(c="center",d=a(s.y))):i(s.x)&&(c="right",r(s.x)&&(c="center",d=a(s.y)));var p=t._options;return{xAlign:p.xAlign?p.xAlign:c,yAlign:p.yAlign?p.yAlign:d}}(this,O=function(t,e){var n=t._chart.ctx,i=2*e.yPadding,o=0,r=e.body,a=r.reduce(function(t,e){return t+e.before.length+e.lines.length+e.after.length},0);a+=e.beforeBody.length+e.afterBody.length;var s=e.title.length,l=e.footer.length,u=e.titleFontSize,d=e.bodyFontSize,h=e.footerFontSize;i+=s*u,i+=s?(s-1)*e.titleSpacing:0,i+=s?e.titleMarginBottom:0,i+=a*d,i+=a?(a-1)*e.bodySpacing:0,i+=l?e.footerMarginTop:0,i+=l*h,i+=l?(l-1)*e.footerSpacing:0;var f=0,p=function(t){o=Math.max(o,n.measureText(t).width+f)};return n.font=c.fontString(u,e._titleFontStyle,e._titleFontFamily),c.each(e.title,p),n.font=c.fontString(d,e._bodyFontStyle,e._bodyFontFamily),c.each(e.beforeBody.concat(e.afterBody),p),f=e.displayColors?d+2:0,c.each(r,function(t){c.each(t.before,p),c.each(t.lines,p),c.each(t.after,p)}),f=0,n.font=c.fontString(h,e._footerFontStyle,e._footerFontFamily),c.each(e.footer,p),{width:o+=2*e.xPadding,height:i}}(this,M)),i=M,o=O,r=P,s=k._chart,l=i.x,u=i.y,h=i.caretSize,f=i.caretPadding,p=i.cornerRadius,m=r.xAlign,g=r.yAlign,v=h+f,y=p+f,"right"===m?l-=o.width:"center"===m&&((l-=o.width/2)+o.width>s.width&&(l=s.width-o.width),l<0&&(l=0)),"top"===g?u+=v:u-="bottom"===g?o.height+v:o.height/2,"center"===g?"left"===m?l+=v:"right"===m&&(l-=v):"left"===m?l-=y:"right"===m&&(l+=y),I={x:l,y:u}}else M.opacity=0;return M.xAlign=P.xAlign,M.yAlign=P.yAlign,M.x=I.x,M.y=I.y,M.width=O.width,M.height=O.height,M.caretX=L.x,M.caretY=L.y,k._model=M,t&&S.custom&&S.custom.call(k,M),k},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,o=this.getCaretPosition(t,e,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)},getCaretPosition:function(t,e,n){var i,o,r,a,s,l,u=n.caretSize,c=n.cornerRadius,d=n.xAlign,h=n.yAlign,f=t.x,p=t.y,m=e.width,g=e.height;if("center"===h)s=p+g/2,l="left"===d?(o=(i=f)-u,r=i,a=s+u,s-u):(o=(i=f+m)+u,r=i,a=s-u,s+u);else if(i="left"===d?(o=f+c+u)-u:"right"===d?(o=f+m-c-u)-u:(o=n.caretX)-u,r=o+u,"top"===h)s=(a=p)-u,l=a;else{s=(a=p+g)+u,l=a;var v=r;r=i,i=v}return{x1:i,x2:o,x3:r,y1:a,y2:s,y3:l}},drawTitle:function(t,e,n,o){var r=e.title;if(r.length){n.textAlign=e._titleAlign,n.textBaseline="top";var a,s,l=e.titleFontSize,u=e.titleSpacing;for(n.fillStyle=i(e.titleFontColor,o),n.font=c.fontString(l,e._titleFontStyle,e._titleFontFamily),a=0,s=r.length;a=n.innerRadius&&a<=n.outerRadius;return u&&c}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t=this._chart.ctx,e=this._view,n=e.startAngle,i=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,i),t.arc(e.x,e.y,e.innerRadius,i,n,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{26:26,27:27,46:46}],38:[function(t,e,n){"use strict";var i=t(26),o=t(27),r=t(46),a=i.global;i._set("global",{elements:{line:{tension:.4,backgroundColor:a.defaultColor,borderWidth:3,borderColor:a.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=o.extend({draw:function(){var t,e,n,i,o=this._view,s=this._chart.ctx,l=o.spanGaps,u=this._children.slice(),c=a.elements.line,d=-1;for(this._loop&&u.length&&u.push(u[0]),s.save(),s.lineCap=o.borderCapStyle||c.borderCapStyle,s.setLineDash&&s.setLineDash(o.borderDash||c.borderDash),s.lineDashOffset=o.borderDashOffset||c.borderDashOffset,s.lineJoin=o.borderJoinStyle||c.borderJoinStyle,s.lineWidth=o.borderWidth||c.borderWidth,s.strokeStyle=o.borderColor||a.defaultColor,s.beginPath(),d=-1,t=0;t=t.left&&1.01*t.right>=n.x&&n.y>=t.top&&1.01*t.bottom>=n.y)&&(i.strokeStyle=e.borderColor||s,i.lineWidth=a.valueOrDefault(e.borderWidth,o.global.elements.point.borderWidth),i.fillStyle=e.backgroundColor||s,a.canvas.drawPoint(i,r,u,c,d,l))}})},{26:26,27:27,46:46}],40:[function(t,e,n){"use strict";function i(t){return void 0!==t._view.width}function o(t){var e,n,o,r,a=t._view;if(i(t)){var s=a.width/2;e=a.x-s,n=a.x+s,o=Math.min(a.y,a.base),r=Math.max(a.y,a.base)}else{var l=a.height/2;e=Math.min(a.x,a.base),n=Math.max(a.x,a.base),o=a.y-l,r=a.y+l}return{left:e,top:o,right:n,bottom:r}}var r=t(26),a=t(27);r._set("global",{elements:{rectangle:{backgroundColor:r.global.defaultColor,borderColor:r.global.defaultColor,borderSkipped:"bottom",borderWidth:0}}}),e.exports=a.extend({draw:function(){function t(t){return v[(y+t)%4]}var e,n,i,o,r,a,s,l=this._chart.ctx,u=this._view,c=u.borderWidth;if(s=u.horizontal?(e=u.base,n=u.x,i=u.y-u.height/2,o=u.y+u.height/2,r=e=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom}return n},inLabelRange:function(t,e){if(!this._view)return!1;var n=o(this);return i(this)?t>=n.left&&t<=n.right:e>=n.top&&e<=n.bottom},inXRange:function(t){var e=o(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=o(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e,n=this._view;return e=i(this)?(t=n.x,(n.y+n.base)/2):(t=(n.x+n.base)/2,n.y),{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{26:26,27:27}],41:[function(t,e,n){"use strict";e.exports={},e.exports.Arc=t(37),e.exports.Line=t(38),e.exports.Point=t(39),e.exports.Rectangle=t(40)},{37:37,38:38,39:39,40:40}],42:[function(t,e,n){"use strict";var i=t(43);n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,o,r){if(r){var a=Math.min(r,o/2-1e-7,i/2-1e-7);t.moveTo(e+a,n),t.lineTo(e+i-a,n),t.arcTo(e+i,n,e+i,n+a,a),t.lineTo(e+i,n+o-a),t.arcTo(e+i,n+o,e+i-a,n+o,a),t.lineTo(e+a,n+o),t.arcTo(e,n+o,e,n+o-a,a),t.lineTo(e,n+a),t.arcTo(e,n,e+a,n,a),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,i,o)},drawPoint:function(t,e,n,i,o,r){var a,s,l,u,c,d;if(r=r||0,!e||"object"!=typeof e||"[object HTMLImageElement]"!==(a=e.toString())&&"[object HTMLCanvasElement]"!==a){if(!(isNaN(n)||n<=0)){switch(t.save(),t.translate(i,o),t.rotate(r*Math.PI/180),t.beginPath(),e){default:t.arc(0,0,n,0,2*Math.PI),t.closePath();break;case"triangle":c=(s=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(-s/2,c/3),t.lineTo(s/2,c/3),t.lineTo(0,-2*c/3),t.closePath();break;case"rect":d=1/Math.SQRT2*n,t.rect(-d,-d,2*d,2*d);break;case"rectRounded":var h=n/Math.SQRT2,f=-h,p=-h,m=Math.SQRT2*n;this.roundedRect(t,f,p,m,m,.425*n);break;case"rectRot":d=1/Math.SQRT2*n,t.moveTo(-d,0),t.lineTo(0,d),t.lineTo(d,0),t.lineTo(0,-d),t.closePath();break;case"cross":t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-n,0),t.lineTo(n,0);break;case"crossRot":l=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(-l,-u),t.lineTo(l,u),t.moveTo(-l,u),t.lineTo(l,-u);break;case"star":t.moveTo(0,n),t.lineTo(0,-n),t.moveTo(-n,0),t.lineTo(n,0),l=Math.cos(Math.PI/4)*n,u=Math.sin(Math.PI/4)*n,t.moveTo(-l,-u),t.lineTo(l,u),t.moveTo(-l,u),t.lineTo(l,-u);break;case"line":t.moveTo(-n,0),t.lineTo(n,0);break;case"dash":t.moveTo(0,0),t.lineTo(n,0)}t.fill(),t.stroke(),t.restore()}}else t.drawImage(e,i-e.width/2,o-e.height/2,e.width,e.height)},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){if(n.steppedLine)return"after"===n.steppedLine&&!i||"after"!==n.steppedLine&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},i.clear=n.clear,i.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments)}},{43:43}],43:[function(t,e,n){"use strict";var i,o={noop:function(){},uid:(i=0,function(){return i++}),isNullOrUndef:function(t){return null==t},isArray:Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return o.valueOrDefault(o.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var r,a,s;if(o.isArray(t))if(a=t.length,i)for(r=a-1;0<=r;r--)e.call(n,t[r],r);else for(r=0;r
';var r=e.childNodes[0],a=e.childNodes[1];e._reset=function(){r.scrollLeft=1e6,r.scrollTop=1e6,a.scrollLeft=1e6,a.scrollTop=1e6};var s=function(){e._reset(),t()};return o(r,"scroll",s.bind(r,"expand")),o(a,"scroll",s.bind(a,"shrink")),e}((s=!(i=function(){if(b.resizer)return e(a("resize",n))}),l=[],function(){l=Array.prototype.slice.call(arguments),r=r||this,s||(s=!0,u.requestAnimFrame.call(window,function(){s=!1,i.apply(r,l)}))}));g=function(){if(b.resizer){var e=t.parentNode;e&&e!==w.parentNode&&e.insertBefore(w,e.firstChild),w._reset()}},v=(m=t)[c]||(m[c]={}),y=v.renderProxy=function(t){t.animationName===f&&g()},u.each(p,function(t){o(m,t,y)}),v.reflow=!!m.offsetParent,m.classList.add(h)}function l(t){var e,n,i,o=t[c]||{},a=o.resizer;delete o.resizer,n=(e=t)[c]||{},(i=n.renderProxy)&&(u.each(p,function(t){r(e,t,i)}),delete n.renderProxy),e.classList.remove(h),a&&a.parentNode&&a.parentNode.removeChild(a)}var u=t(46),c="$chartjs",d="chartjs-",h=d+"render-monitor",f=d+"render-animation",p=["animationstart","webkitAnimationStart"],m={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},g=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t,e,n,i="from{opacity:0.99}to{opacity:1}";e="@-webkit-keyframes "+f+"{"+i+"}@keyframes "+f+"{"+i+"}."+h+"{-webkit-animation:"+f+" 0.001s;animation:"+f+" 0.001s;}",n=(t=this)._style||document.createElement("style"),t._style||(e="/* Chart.js */\n"+e,(t._style=n).setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(function(t,e){var n=t.style,o=t.getAttribute("height"),r=t.getAttribute("width");if(t[c]={initial:{height:o,width:r,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===r||""===r){var a=i(t,"width");void 0!==a&&(t.width=a)}if(null===o||""===o)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var s=i(t,"height");void 0!==a&&(t.height=s)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[c]){var n=e[c].initial;["height","width"].forEach(function(t){var i=n[t];u.isNullOrUndef(i)?e.removeAttribute(t):e.setAttribute(t,i)}),u.each(n.style||{},function(t,n){e.style[n]=t}),e.width=e.width,delete e[c]}},addEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var r=n[c]||(n[c]={});o(i,e,(r.proxies||(r.proxies={}))[t.id+"_"+e]=function(e){var i,o,r,s;n((o=t,r=m[(i=e).type]||i.type,s=u.getRelativePosition(i,o),a(r,o,s.x,s.y,i)))})}else s(i,n,t)},removeEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var o=((n[c]||{}).proxies||{})[t.id+"_"+e];o&&r(i,e,o)}else l(i)}},u.addEvent=o,u.removeEvent=r},{46:46}],49:[function(t,e,n){"use strict";var i=t(46),o=t(47),r=t(48),a=r._enabled?r:o;e.exports=i.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},a)},{46:46,47:47,48:48}],50:[function(t,e,n){"use strict";e.exports={},e.exports.filler=t(51),e.exports.legend=t(52),e.exports.title=t(53)},{51:51,52:52,53:53}],51:[function(t,e,n){"use strict";function i(t,e,n){var i,o=t._model||{},r=o.fill;if(void 0===r&&(r=!!o.backgroundColor),!1===r||null===r)return!1;if(!0===r)return"origin";if(i=parseFloat(r,10),isFinite(i)&&Math.floor(i)===i)return"-"!==r[0]&&"+"!==r[0]||(i=e+i),!(i===e||i<0||n<=i)&&i;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function o(t){var e,n=t.el._model||{},i=t.el._scale||{},o=t.fill,r=null;if(isFinite(o))return null;if("start"===o?r=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===o?r=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?r=n.scaleZero:i.getBasePosition?r=i.getBasePosition():i.getBasePixel&&(r=i.getBasePixel()),null!=r){if(void 0!==r.x&&void 0!==r.y)return r;if("number"==typeof r&&isFinite(r))return{x:(e=i.isHorizontal())?r:null,y:e?null:r}}return null}function r(t,e,n){var i,o=t[e].fill,r=[e];if(!n)return o;for(;!1!==o&&-1===r.indexOf(o);){if(!isFinite(o))return o;if(!(i=t[o]))return!1;if(i.visible)return o;r.push(o),o=i.fill}return!1}function a(t){return t&&!t.skip}function s(t,e,n,i,o){var r;if(i&&o){for(t.moveTo(e[0].x,e[0].y),r=1;r');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}});var c=a.extend({initialize:function(t){s.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:u,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:u,beforeSetDimensions:u,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:u,beforeBuildLabels:u,buildLabels:function(){var t=this,e=t.options.labels||{},n=s.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter(function(n){return e.filter(n,t.chart.data)})),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:u,beforeFit:u,fit:function(){var t=this,e=t.options,n=e.labels,o=e.display,a=t.ctx,l=r.global,u=s.valueOrDefault,c=u(n.fontSize,l.defaultFontSize),d=u(n.fontStyle,l.defaultFontStyle),h=u(n.fontFamily,l.defaultFontFamily),f=s.fontString(c,d,h),p=t.legendHitBoxes=[],m=t.minSize,g=t.isHorizontal();if(m.height=g?(m.width=t.maxWidth,o?10:0):(m.width=o?10:0,t.maxHeight),o)if(a.font=f,g){var v=t.lineWidths=[0],y=t.legendItems.length?c+n.padding:0;a.textAlign="left",a.textBaseline="top",s.each(t.legendItems,function(e,o){var r=i(n,c)+c/2+a.measureText(e.text).width;v[v.length-1]+r+n.padding>=t.width&&(y+=c+n.padding,v[v.length]=t.left),p[o]={left:0,top:0,width:r,height:c},v[v.length-1]+=r+n.padding}),m.height+=y}else{var b=n.padding,w=t.columnWidths=[],x=n.padding,_=0,D=0,k=c+b;s.each(t.legendItems,function(t,e){var o=i(n,c)+c/2+a.measureText(t.text).width;D+k>m.height&&(x+=_+n.padding,w.push(_),D=_=0),_=Math.max(_,o),D+=k,p[e]={left:0,top:0,width:o,height:c}}),x+=_,w.push(_),m.width+=x}t.width=m.width,t.height=m.height},afterFit:u,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,o=r.global,a=o.elements.line,l=t.width,u=t.lineWidths;if(e.display){var c,d=t.ctx,h=s.valueOrDefault,f=h(n.fontColor,o.defaultFontColor),p=h(n.fontSize,o.defaultFontSize),m=h(n.fontStyle,o.defaultFontStyle),g=h(n.fontFamily,o.defaultFontFamily),v=s.fontString(p,m,g);d.textAlign="left",d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=f,d.fillStyle=f,d.font=v;var y=i(n,p),b=t.legendHitBoxes,w=t.isHorizontal();c=w?{x:t.left+(l-u[0])/2,y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+n.padding,line:0};var x=p+n.padding;s.each(t.legendItems,function(i,r){var f,m,g,v,_,D=d.measureText(i.text).width,k=y+p/2+D,S=c.x,C=c.y;w?l<=S+k&&(C=c.y+=x,c.line++,S=c.x=t.left+(l-u[c.line])/2):C+x>t.bottom&&(S=c.x=S+t.columnWidths[c.line]+n.padding,C=c.y=t.top+n.padding,c.line++),function(t,n,i){if(!(isNaN(y)||y<=0)){d.save(),d.fillStyle=h(i.fillStyle,o.defaultColor),d.lineCap=h(i.lineCap,a.borderCapStyle),d.lineDashOffset=h(i.lineDashOffset,a.borderDashOffset),d.lineJoin=h(i.lineJoin,a.borderJoinStyle),d.lineWidth=h(i.lineWidth,a.borderWidth),d.strokeStyle=h(i.strokeStyle,o.defaultColor);var r=0===h(i.lineWidth,a.borderWidth);if(d.setLineDash&&d.setLineDash(h(i.lineDash,a.borderDash)),e.labels&&e.labels.usePointStyle){var l=p*Math.SQRT2/2,u=l/Math.SQRT2,c=t+u,f=n+u;s.canvas.drawPoint(d,i.pointStyle,l,c,f)}else r||d.strokeRect(t,n,y,p),d.fillRect(t,n,y,p);d.restore()}}(S,C,i),b[r].left=S,b[r].top=C,f=i,m=D,v=y+(g=p/2)+S,_=C+g,d.fillText(f.text,v,_),f.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(v,_),d.lineTo(v+m,_),d.stroke()),w?c.x+=k+n.padding:c.y+=x})}},handleEvent:function(t){var e=this,n=e.options,i="mouseup"===t.type?"click":t.type,o=!1;if("mousemove"===i){if(!n.onHover)return}else{if("click"!==i)return;if(!n.onClick)return}var r=t.x,a=t.y;if(r>=e.left&&r<=e.right&&a>=e.top&&a<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&r<=u.left+u.width&&a>=u.top&&a<=u.top+u.height){if("click"===i){n.onClick.call(e,t.native,e.legendItems[l]),o=!0;break}if("mousemove"===i){n.onHover.call(e,t.native,e.legendItems[l]),o=!0;break}}}return o}});e.exports={id:"legend",_element:c,beforeInit:function(t){var e=t.options.legend;e&&o(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(s.mergeIf(e,r.global.legend),n?(l.configure(t,n,e),n.options=e):o(t,e)):n&&(l.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}},{26:26,27:27,31:31,46:46}],53:[function(t,e,n){"use strict";function i(t,e){var n=new u({ctx:t.ctx,options:e,chart:t});s.configure(t,n,e),s.addBox(t,n),t.titleBlock=n}var o=t(26),r=t(27),a=t(46),s=t(31),l=a.noop;o._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}});var u=r.extend({initialize:function(t){a.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:l,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:l,beforeSetDimensions:l,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:l,beforeBuildLabels:l,buildLabels:l,afterBuildLabels:l,beforeFit:l,fit:function(){var t=this,e=a.valueOrDefault,n=t.options,i=n.display,r=e(n.fontSize,o.global.defaultFontSize),s=t.minSize,l=a.isArray(n.text)?n.text.length:1,u=a.options.toLineHeight(n.lineHeight,r),c=i?l*u+2*n.padding:0;t.isHorizontal()?(s.width=t.maxWidth,s.height=c):(s.width=c,s.height=t.maxHeight),t.width=s.width,t.height=s.height},afterFit:l,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=a.valueOrDefault,i=t.options,r=o.global;if(i.display){var s,l,u,c=n(i.fontSize,r.defaultFontSize),d=n(i.fontStyle,r.defaultFontStyle),h=n(i.fontFamily,r.defaultFontFamily),f=a.fontString(c,d,h),p=a.options.toLineHeight(i.lineHeight,c),m=p/2+i.padding,g=0,v=t.top,y=t.left,b=t.bottom,w=t.right;e.fillStyle=n(i.fontColor,r.defaultFontColor),e.font=f,t.isHorizontal()?(l=y+(w-y)/2,u=v+m,s=w-y):(l="left"===i.position?y+m:w-m,u=v+(b-v)/2,s=b-v,g=Math.PI*("left"===i.position?-.5:.5)),e.save(),e.translate(l,u),e.rotate(g),e.textAlign="center",e.textBaseline="middle";var x=i.text;if(a.isArray(x))for(var _=0,D=0;De.max&&(e.max=i))})});e.min=isFinite(e.min)&&!isNaN(e.min)?e.min:0,e.max=isFinite(e.max)&&!isNaN(e.max)?e.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this.options.ticks;if(this.isHorizontal())t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.width/50));else{var n=o.valueOrDefault(e.fontSize,i.global.defaultFontSize);t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.height/(2*n)))}return t},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this,n=e.start,i=+e.getRightValue(t),o=e.end-n;return e.isHorizontal()?e.left+e.width/o*(i-n):e.bottom-e.height/o*(i-n)},getValueForPixel:function(t){var e=this,n=e.isHorizontal(),i=n?e.width:e.height,o=(n?t-e.left:e.bottom-t)/i;return e.start+(e.end-e.start)*o},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});r.registerScaleType("linear",n,e)}},{26:26,34:34,35:35,46:46}],56:[function(t,e,n){"use strict";var i=t(46),o=t(33);e.exports=function(t){var e=i.noop;t.LinearScaleBase=o.extend({getRightValue:function(t){return"string"==typeof t?+t:o.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=i.sign(t.min),o=i.sign(t.max);n<0&&o<0?t.max=0:0=t.max&&(r?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:e,handleDirectionalChanges:e,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),o={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:i.valueOrDefault(e.fixedStepSize,e.stepSize)},r=t.ticks=function(t,e){var n,o,r,a=[];if(t.stepSize&&0e.max&&(e.max=i),0!==i&&(null===e.minNotZero||ic.r&&(c.r=y.end,d.r=g),b.startc.b&&(c.b=b.end,d.b=g)}t.setReductions(u,c,d)}(this):(t=this,i=Math.min(t.height/2,t.width/2),t.drawingArea=Math.round(i),t.setCenterPoint(0,0,0,0))},setReductions:function(t,e,n){var i=e.l/Math.sin(n.l),o=Math.max(e.r-this.width,0)/Math.sin(n.r),r=-e.t/Math.cos(n.t),a=-Math.max(e.b-this.height,0)/Math.cos(n.b);i=u(i),o=u(o),r=u(r),a=u(a),this.drawingArea=Math.min(Math.round(t-(i+o)/2),Math.round(t-(r+a)/2)),this.setCenterPoint(i,o,r,a)},setCenterPoint:function(t,e,n,i){var o=this,r=o.width-e-o.drawingArea,a=t+o.drawingArea,s=n+o.drawingArea,l=o.height-i-o.drawingArea;o.xCenter=Math.round((a+r)/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 n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(n)*e)+this.xCenter,y:Math.round(Math.sin(n)*e)+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this.min,e=this.max;return this.getPointPositionForValue(0,this.beginAtZero?0:t<0&&e<0?e:0>1)-1]||null,r=t[i],!o)return{lo:null,hi:r};if(r[e]n))return{lo:o,hi:r};s=i-1}}return{lo:r,hi:null}}(t,e,n),r=o.lo?o.hi?o.lo:t[t.length-2]:t[0],a=o.lo?o.hi?o.hi:t[t.length-1]:t[1],s=a[e]-r[e],l=s?(n-r[e])/s:0,u=(a[i]-r[i])*l;return r[i]+u}function a(t,e){var n=e.parser,i=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof i?c(t,i):(t instanceof c||(t=c(t)),t.isValid()?t:"function"==typeof i?i(t):t)}function s(t,e){if(h.isNullOrUndef(t))return null;var n=e.options.time,i=a(e.getRightValue(t),n);return i.isValid()?(n.round&&i.startOf(n.round),i.valueOf()):null}function l(t){for(var e=y.indexOf(t)+1,n=y.length;e=y.indexOf(e);o--)if(r=y[o],v[r].common&&a.as(r)>=t.length)return r;return y[e?y.indexOf(e):0]}(C,k.minUnit,w.min,w.max),w._majorUnit=l(w._unit),w._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var o,r,a,s,l,u=[],c=[e];for(o=0,r=t.length;o=3&&t%100<=10?3:t%100>=11?4:5},o={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},r=function(t){return function(e,n,r,a){var s=i(e),l=o[t][i(e)];return 2===s&&(l=l[n?0:1]),l.replace(/%d/i,e)}},a=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];return t.defineLocale("ar",{months:a,monthsShort:a,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(t){return"م"===t},meridiem:function(t,e,n){return t<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:r("s"),ss:r("s"),m:r("m"),mm:r("m"),h:r("h"),hh:r("h"),d:r("d"),dd:r("d"),M:r("M"),MM:r("M"),y:r("y"),yy:r("y")},preparse:function(t){return t.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(t){return n[t]}).replace(/،/g,",")},postformat:function(t){return t.replace(/\d/g,function(t){return e[t]}).replace(/,/g,"،")},week:{dow:6,doy:12}})})},"4klR":function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=n("TqGs"),r=function(){function t(t,e){for(var n=0;n=2&&e%10<=4&&(e%100<10||e%100>=20)?n[1]:n[2]}function n(t,n,i){var o={ss:n?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:n?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===i?n?"минута":"минуту":t+" "+e(o[i],+t)}var i=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];t.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:i,longMonthsParse:i,shortMonthsParse:i,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(t){if(t.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(t){if(t.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:n,m:n,mm:n,h:"час",hh:n,d:"день",dd:n,M:"месяц",MM:n,y:"год",yy:n},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(t){return/^(дня|вечера)$/.test(t)},meridiem:function(t,e,n){return t<4?"ночи":t<12?"утра":t<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(t,e){switch(e){case"M":case"d":case"DDD":return t+"-й";case"D":return t+"-го";case"w":case"W":return t+"-я";default:return t}},week:{dow:1,doy:4}})}(n(0))}()}})})},"7Rwe":function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=n("PJh5"),r=n.n(o),a=n("awG4"),s=n("+NP7"),l=n("TqGs"),u=n("ztJp"),c=n("sZyP"),d=n("Eg81"),h=n("YVa9"),f=n("/TWM"),p=n("WByX"),m=n("9psQ"),g=n("iNbH"),v=n("T4Pq"),y=n("hMlo"),b=n("IArr"),w=n("RvrG"),x=n("mF88"),_=n("O5V4"),D=n("ddt0"),k=n("Orr0"),S=n("Eq4i"),C=n("y84T"),M=n("ucxI"),T=function(){function t(t,e){for(var n=0;n0&&e-1 in t)}function u(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}function c(t,e,n){return kt(e)?Mt.grep(t,function(t,i){return!!e.call(t,i,t)!==n}):e.nodeType?Mt.grep(t,function(t){return t===e!==n}):"string"!=typeof e?Mt.grep(t,function(t){return vt.call(e,t)>-1!==n}):Mt.filter(e,t,n)}function d(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function h(t){var e={};return Mt.each(t.match(Ft)||[],function(t,n){e[n]=!0}),e}function f(t){return t}function p(t){throw t}function m(t,e,n,i){var o;try{t&&kt(o=t.promise)?o.call(t).done(e).fail(n):t&&kt(o=t.then)?o.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}function g(){ht.removeEventListener("DOMContentLoaded",g),n.removeEventListener("load",g),Mt.ready()}function v(t,e){return e.toUpperCase()}function y(t){return t.replace(Bt,"ms-").replace(Wt,v)}function b(){this.expando=Mt.expando+b.uid++}function w(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:qt.test(t)?JSON.parse(t):t)}function x(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(Gt,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n=w(n)}catch(t){}Ut.set(t,e,n)}else n=void 0;return n}function _(t,e,n,i){var o,r,a=20,s=i?function(){return i.cur()}:function(){return Mt.css(t,e,"")},l=s(),u=n&&n[3]||(Mt.cssNumber[e]?"":"px"),c=t.nodeType&&(Mt.cssNumber[e]||"px"!==u&&+l)&&Zt.exec(Mt.css(t,e));if(c&&c[3]!==u){for(l/=2,u=u||c[3],c=+l||1;a--;)Mt.style(t,e,c+u),(1-r)*(1-(r=s()/l||.5))<=0&&(a=0),c/=r;c*=2,Mt.style(t,e,c+u),n=n||[]}return n&&(c=+c||+l||0,o=n[1]?c+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=c,i.end=o)),o}function D(t){var e,n=t.ownerDocument,i=t.nodeName,o=ie[i];return o||(e=n.body.appendChild(n.createElement(i)),o=Mt.css(e,"display"),e.parentNode.removeChild(e),"none"===o&&(o="block"),ie[i]=o,o)}function k(t,e){for(var n,i,o=[],r=0,a=t.length;r-1)o&&o.push(r);else if(c=Qt(r),a=S(h.appendChild(r),"script"),c&&C(a),n)for(d=0;r=a[d++];)ae.test(r.type||"")&&n.push(r);return h}function T(){return!0}function E(){return!1}function P(t,e){return t===I()==("focus"===e)}function I(){try{return ht.activeElement}catch(t){}}function O(t,e,n,i,o,r){var a,s;if("object"==typeof e){"string"!=typeof n&&(i=i||n,n=void 0);for(s in e)O(t,s,n,i,e[s],r);return t}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),!1===o)o=E;else if(!o)return t;return 1===r&&(a=o,o=function(t){return Mt().off(t),a.apply(this,arguments)},o.guid=a.guid||(a.guid=Mt.guid++)),t.each(function(){Mt.event.add(this,e,o,i,n)})}function L(t,e,n){if(!n)return void(void 0===$t.get(t,e)&&Mt.event.add(t,e,T));$t.set(t,e,!1),Mt.event.add(t,e,{namespace:!1,handler:function(t){var i,o,r=$t.get(this,e);if(1&t.isTrigger&&this[e]){if(r.length)(Mt.event.special[e]||{}).delegateType&&t.stopPropagation();else if(r=pt.call(arguments),$t.set(this,e,r),i=n(this,e),this[e](),o=$t.get(this,e),r!==o||i?$t.set(this,e,!1):o={},r!==o)return t.stopImmediatePropagation(),t.preventDefault(),o.value}else r.length&&($t.set(this,e,{value:Mt.event.trigger(Mt.extend(r[0],Mt.Event.prototype),r.slice(1),this)}),t.stopImmediatePropagation())}})}function R(t,e){return u(t,"table")&&u(11!==e.nodeType?e:e.firstChild,"tr")?Mt(t).children("tbody")[0]||t:t}function A(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function H(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function N(t,e){var n,i,o,r,a,s,l,u;if(1===e.nodeType){if($t.hasData(t)&&(r=$t.access(t),a=$t.set(e,r),u=r.events)){delete a.handle,a.events={};for(o in u)for(n=0,i=u[o].length;n1&&"string"==typeof p&&!Dt.checkClone&&pe.test(p))return t.each(function(o){var r=t.eq(o);m&&(e[0]=p.call(this,o,r.html())),Y(r,e,n,i)});if(h&&(o=M(e,t[0].ownerDocument,!1,t,i),r=o.firstChild,1===o.childNodes.length&&(o=r),r||i)){for(s=Mt.map(S(o,"script"),A),l=s.length;d=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-r-l-s-.5))||0),l}function q(t,e,n){var i=ve(t),o=!Dt.boxSizingReliable()||n,r=o&&"border-box"===Mt.css(t,"boxSizing",!1,i),a=r,s=j(t,e,i),l="offset"+e[0].toUpperCase()+e.slice(1);if(ge.test(s)){if(!n)return s;s="auto"}return(!Dt.boxSizingReliable()&&r||"auto"===s||!parseFloat(s)&&"inline"===Mt.css(t,"display",!1,i))&&t.getClientRects().length&&(r="border-box"===Mt.css(t,"boxSizing",!1,i),(a=l in t)&&(s=t[l])),(s=parseFloat(s)||0)+U(t,e,n||(r?"border":"content"),a,i,s)+"px"}function G(t,e,n,i,o){return new G.prototype.init(t,e,n,i,o)}function J(){Me&&(!1===ht.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(J):n.setTimeout(J,Mt.fx.interval),Mt.fx.tick())}function Z(){return n.setTimeout(function(){Ce=void 0}),Ce=Date.now()}function X(t,e){var n,i=0,o={height:t};for(e=e?1:0;i<4;i+=2-e)n=Xt[i],o["margin"+n]=o["padding"+n]=t;return e&&(o.opacity=o.width=t),o}function K(t,e,n){for(var i,o=(et.tweeners[e]||[]).concat(et.tweeners["*"]),r=0,a=o.length;r=0&&n0&&e-1 in t)}function u(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}function c(t,e,n){return kt(e)?Mt.grep(t,function(t,i){return!!e.call(t,i,t)!==n}):e.nodeType?Mt.grep(t,function(t){return t===e!==n}):"string"!=typeof e?Mt.grep(t,function(t){return vt.call(e,t)>-1!==n}):Mt.filter(e,t,n)}function d(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function h(t){var e={};return Mt.each(t.match(Ft)||[],function(t,n){e[n]=!0}),e}function f(t){return t}function p(t){throw t}function m(t,e,n,i){var o;try{t&&kt(o=t.promise)?o.call(t).done(e).fail(n):t&&kt(o=t.then)?o.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}function g(){ht.removeEventListener("DOMContentLoaded",g),n.removeEventListener("load",g),Mt.ready()}function v(t,e){return e.toUpperCase()}function y(t){return t.replace(Bt,"ms-").replace(Wt,v)}function b(){this.expando=Mt.expando+b.uid++}function w(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:qt.test(t)?JSON.parse(t):t)}function x(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(Gt,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n=w(n)}catch(t){}Ut.set(t,e,n)}else n=void 0;return n}function _(t,e,n,i){var o,r,a=20,s=i?function(){return i.cur()}:function(){return Mt.css(t,e,"")},l=s(),u=n&&n[3]||(Mt.cssNumber[e]?"":"px"),c=t.nodeType&&(Mt.cssNumber[e]||"px"!==u&&+l)&&Zt.exec(Mt.css(t,e));if(c&&c[3]!==u){for(l/=2,u=u||c[3],c=+l||1;a--;)Mt.style(t,e,c+u),(1-r)*(1-(r=s()/l||.5))<=0&&(a=0),c/=r;c*=2,Mt.style(t,e,c+u),n=n||[]}return n&&(c=+c||+l||0,o=n[1]?c+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=c,i.end=o)),o}function D(t){var e,n=t.ownerDocument,i=t.nodeName,o=ie[i];return o||(e=n.body.appendChild(n.createElement(i)),o=Mt.css(e,"display"),e.parentNode.removeChild(e),"none"===o&&(o="block"),ie[i]=o,o)}function k(t,e){for(var n,i,o=[],r=0,a=t.length;r-1)o&&o.push(r);else if(c=Qt(r),a=S(h.appendChild(r),"script"),c&&C(a),n)for(d=0;r=a[d++];)ae.test(r.type||"")&&n.push(r);return h}function T(){return!0}function E(){return!1}function P(t,e){return t===I()==("focus"===e)}function I(){try{return ht.activeElement}catch(t){}}function O(t,e,n,i,o,r){var a,s;if("object"==typeof e){"string"!=typeof n&&(i=i||n,n=void 0);for(s in e)O(t,s,n,i,e[s],r);return t}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),!1===o)o=E;else if(!o)return t;return 1===r&&(a=o,o=function(t){return Mt().off(t),a.apply(this,arguments)},o.guid=a.guid||(a.guid=Mt.guid++)),t.each(function(){Mt.event.add(this,e,o,i,n)})}function L(t,e,n){if(!n)return void(void 0===$t.get(t,e)&&Mt.event.add(t,e,T));$t.set(t,e,!1),Mt.event.add(t,e,{namespace:!1,handler:function(t){var i,o,r=$t.get(this,e);if(1&t.isTrigger&&this[e]){if(r.length)(Mt.event.special[e]||{}).delegateType&&t.stopPropagation();else if(r=pt.call(arguments),$t.set(this,e,r),i=n(this,e),this[e](),o=$t.get(this,e),r!==o||i?$t.set(this,e,!1):o={},r!==o)return t.stopImmediatePropagation(),t.preventDefault(),o.value}else r.length&&($t.set(this,e,{value:Mt.event.trigger(Mt.extend(r[0],Mt.Event.prototype),r.slice(1),this)}),t.stopImmediatePropagation())}})}function R(t,e){return u(t,"table")&&u(11!==e.nodeType?e:e.firstChild,"tr")?Mt(t).children("tbody")[0]||t:t}function A(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function H(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function N(t,e){var n,i,o,r,a,s,l,u;if(1===e.nodeType){if($t.hasData(t)&&(r=$t.access(t),a=$t.set(e,r),u=r.events)){delete a.handle,a.events={};for(o in u)for(n=0,i=u[o].length;n1&&"string"==typeof p&&!Dt.checkClone&&pe.test(p))return t.each(function(o){var r=t.eq(o);m&&(e[0]=p.call(this,o,r.html())),Y(r,e,n,i)});if(h&&(o=M(e,t[0].ownerDocument,!1,t,i),r=o.firstChild,1===o.childNodes.length&&(o=r),r||i)){for(s=Mt.map(S(o,"script"),A),l=s.length;d=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-r-l-s-.5))||0),l}function q(t,e,n){var i=ve(t),o=!Dt.boxSizingReliable()||n,r=o&&"border-box"===Mt.css(t,"boxSizing",!1,i),a=r,s=z(t,e,i),l="offset"+e[0].toUpperCase()+e.slice(1);if(ge.test(s)){if(!n)return s;s="auto"}return(!Dt.boxSizingReliable()&&r||"auto"===s||!parseFloat(s)&&"inline"===Mt.css(t,"display",!1,i))&&t.getClientRects().length&&(r="border-box"===Mt.css(t,"boxSizing",!1,i),(a=l in t)&&(s=t[l])),(s=parseFloat(s)||0)+U(t,e,n||(r?"border":"content"),a,i,s)+"px"}function G(t,e,n,i,o){return new G.prototype.init(t,e,n,i,o)}function J(){Me&&(!1===ht.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(J):n.setTimeout(J,Mt.fx.interval),Mt.fx.tick())}function Z(){return n.setTimeout(function(){Ce=void 0}),Ce=Date.now()}function X(t,e){var n,i=0,o={height:t};for(e=e?1:0;i<4;i+=2-e)n=Xt[i],o["margin"+n]=o["padding"+n]=t;return e&&(o.opacity=o.width=t),o}function K(t,e,n){for(var i,o=(et.tweeners[e]||[]).concat(et.tweeners["*"]),r=0,a=o.length;r=0&&nx.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function i(t){return t[F]=!0,t}function o(t){var e=I.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function r(t,e){for(var n=t.split("|"),i=n.length;i--;)x.attrHandle[n[i]]=e}function a(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function s(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&kt(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function l(t){return i(function(e){return e=+e,i(function(n,i){for(var o,r=t([],n.length,e),a=r.length;a--;)n[o=r[a]]&&(n[o]=!(i[o]=n[o]))})})}function u(t){return t&&void 0!==t.getElementsByTagName&&t}function c(){}function d(t){for(var e=0,n=t.length,i="";e1?function(e,n,i){for(var o=t.length;o--;)if(!t[o](e,n,i))return!1;return!0}:t[0]}function p(t,n,i){for(var o=0,r=n.length;o-1&&(i[u]=!(a[u]=d))}}else b=m(b===a?b.splice(g,b.length):b),r?r(null,a,b,l):X.apply(a,b)})}function v(t){for(var e,n,i,o=t.length,r=x.relative[t[0].type],a=r||x.relative[" "],s=r?1:0,l=h(function(t){return t===e},a,!0),u=h(function(t){return Q(e,t)>-1},a,!0),c=[function(t,n,i){var o=!r&&(i||n!==M)||((e=n).nodeType?l(t,n,i):u(t,n,i));return e=null,o}];s1&&f(c),s>1&&d(t.slice(0,s-1).concat({value:" "===t[s-2].type?"*":""})).replace(at,"$1"),n,s0,r=t.length>0,a=function(i,a,s,l,u){var c,d,h,f=0,p="0",g=i&&[],v=[],y=M,b=i||r&&x.find.TAG("*",u),w=z+=null==y?1:Math.random()||.1,_=b.length;for(u&&(M=a===I||a||u);p!==_&&null!=(c=b[p]);p++){if(r&&c){for(d=0,a||c.ownerDocument===I||(P(c),s=!L);h=t[d++];)if(h(c,a||I,s)){l.push(c);break}u&&(z=w)}o&&((c=!h&&c)&&f--,i&&g.push(c))}if(f+=p,o&&p!==f){for(d=0;h=n[d++];)h(g,v,a,s);if(i){if(f>0)for(;p--;)g[p]||v[p]||(v[p]=J.call(l));v=m(v)}X.apply(l,v),u&&!i&&v.length>0&&f+n.length>1&&e.uniqueSort(l)}return u&&(z=w,M=y),g};return o?i(a):a}var b,w,x,_,D,k,S,C,M,T,E,P,I,O,L,R,A,H,N,F="sizzle"+1*new Date,Y=t.document,z=0,j=0,B=n(),W=n(),V=n(),$=n(),U=function(t,e){return t===e&&(E=!0),0},q={}.hasOwnProperty,G=[],J=G.pop,Z=G.push,X=G.push,K=G.slice,Q=function(t,e){for(var n=0,i=t.length;n+~]|"+et+")"+et+"*"),ut=new RegExp(et+"|>"),ct=new RegExp(ot),dt=new RegExp("^"+nt+"$"),ht={ID:new RegExp("^#("+nt+")"),CLASS:new RegExp("^\\.("+nt+")"),TAG:new RegExp("^("+nt+"|[*])"),ATTR:new RegExp("^"+it),PSEUDO:new RegExp("^"+ot),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+et+"*(even|odd|(([+-]|)(\\d*)n|)"+et+"*(?:([+-]|)"+et+"*(\\d+)|))"+et+"*\\)|)","i"),bool:new RegExp("^(?:"+tt+")$","i"),needsContext:new RegExp("^"+et+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+et+"*((?:-\\d)?\\d*)"+et+"*\\)|)(?=[^-]|$)","i")},ft=/HTML$/i,pt=/^(?:input|select|textarea|button)$/i,mt=/^h\d$/i,gt=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,bt=new RegExp("\\\\([\\da-f]{1,6}"+et+"?|("+et+")|.)","ig"),wt=function(t,e,n){var i="0x"+e-65536;return i!==i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},xt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,_t=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},Dt=function(){P()},kt=h(function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{X.apply(G=K.call(Y.childNodes),Y.childNodes),G[Y.childNodes.length].nodeType}catch(t){X={apply:G.length?function(t,e){Z.apply(t,K.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}w=e.support={},D=e.isXML=function(t){var e=t.namespaceURI,n=(t.ownerDocument||t).documentElement;return!ft.test(e||n&&n.nodeName||"HTML")},P=e.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:Y;return i!==I&&9===i.nodeType&&i.documentElement?(I=i,O=I.documentElement,L=!D(I),Y!==I&&(n=I.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Dt,!1):n.attachEvent&&n.attachEvent("onunload",Dt)),w.attributes=o(function(t){return t.className="i",!t.getAttribute("className")}),w.getElementsByTagName=o(function(t){return t.appendChild(I.createComment("")),!t.getElementsByTagName("*").length}),w.getElementsByClassName=gt.test(I.getElementsByClassName),w.getById=o(function(t){return O.appendChild(t).id=F,!I.getElementsByName||!I.getElementsByName(F).length}),w.getById?(x.filter.ID=function(t){var e=t.replace(bt,wt);return function(t){return t.getAttribute("id")===e}},x.find.ID=function(t,e){if(void 0!==e.getElementById&&L){var n=e.getElementById(t);return n?[n]:[]}}):(x.filter.ID=function(t){var e=t.replace(bt,wt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},x.find.ID=function(t,e){if(void 0!==e.getElementById&&L){var n,i,o,r=e.getElementById(t);if(r){if((n=r.getAttributeNode("id"))&&n.value===t)return[r];for(o=e.getElementsByName(t),i=0;r=o[i++];)if((n=r.getAttributeNode("id"))&&n.value===t)return[r]}return[]}}),x.find.TAG=w.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):w.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],o=0,r=e.getElementsByTagName(t);if("*"===t){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},x.find.CLASS=w.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&L)return e.getElementsByClassName(t)},A=[],R=[],(w.qsa=gt.test(I.querySelectorAll))&&(o(function(t){O.appendChild(t).innerHTML="
",t.querySelectorAll("[msallowcapture^='']").length&&R.push("[*^$]="+et+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||R.push("\\["+et+"*(?:value|"+tt+")"),t.querySelectorAll("[id~="+F+"-]").length||R.push("~="),t.querySelectorAll(":checked").length||R.push(":checked"),t.querySelectorAll("a#"+F+"+*").length||R.push(".#.+[+~]")}),o(function(t){t.innerHTML="";var e=I.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&R.push("name"+et+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&R.push(":enabled",":disabled"),O.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&R.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),R.push(",.*:")})),(w.matchesSelector=gt.test(H=O.matches||O.webkitMatchesSelector||O.mozMatchesSelector||O.oMatchesSelector||O.msMatchesSelector))&&o(function(t){w.disconnectedMatch=H.call(t,"*"),H.call(t,"[s!='']:x"),A.push("!=",ot)}),R=R.length&&new RegExp(R.join("|")),A=A.length&&new RegExp(A.join("|")),e=gt.test(O.compareDocumentPosition),N=e||gt.test(O.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},U=e?function(t,e){if(t===e)return E=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&n||!w.sortDetached&&e.compareDocumentPosition(t)===n?t===I||t.ownerDocument===Y&&N(Y,t)?-1:e===I||e.ownerDocument===Y&&N(Y,e)?1:T?Q(T,t)-Q(T,e):0:4&n?-1:1)}:function(t,e){if(t===e)return E=!0,0;var n,i=0,o=t.parentNode,r=e.parentNode,s=[t],l=[e];if(!o||!r)return t===I?-1:e===I?1:o?-1:r?1:T?Q(T,t)-Q(T,e):0;if(o===r)return a(t,e);for(n=t;n=n.parentNode;)s.unshift(n);for(n=e;n=n.parentNode;)l.unshift(n);for(;s[i]===l[i];)i++;return i?a(s[i],l[i]):s[i]===Y?-1:l[i]===Y?1:0},I):I},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==I&&P(t),w.matchesSelector&&L&&!$[n+" "]&&(!A||!A.test(n))&&(!R||!R.test(n)))try{var i=H.call(t,n);if(i||w.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){$(n,!0)}return e(n,I,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==I&&P(t),N(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==I&&P(t);var n=x.attrHandle[e.toLowerCase()],i=n&&q.call(x.attrHandle,e.toLowerCase())?n(t,e,!L):void 0;return void 0!==i?i:w.attributes||!L?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},e.escape=function(t){return(t+"").replace(xt,_t)},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],i=0,o=0;if(E=!w.detectDuplicates,T=!w.sortStable&&t.slice(0),t.sort(U),E){for(;e=t[o++];)e===t[o]&&(i=n.push(o));for(;i--;)t.splice(n[i],1)}return T=null,t},_=e.getText=function(t){var e,n="",i=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=_(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[i++];)n+=_(e);return n},x=e.selectors={cacheLength:50,createPseudo:i,match:ht,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(bt,wt),t[3]=(t[3]||t[4]||t[5]||"").replace(bt,wt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return ht.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&ct.test(n)&&(e=k(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(bt,wt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=B[t+" "];return e||(e=new RegExp("(^|"+et+")"+t+"("+et+"|$)"))&&B(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(o){var r=e.attr(o,t);return null==r?"!="===n:!n||(r+="","="===n?r===i:"!="===n?r!==i:"^="===n?i&&0===r.indexOf(i):"*="===n?i&&r.indexOf(i)>-1:"$="===n?i&&r.slice(-i.length)===i:"~="===n?(" "+r.replace(rt," ")+" ").indexOf(i)>-1:"|="===n&&(r===i||r.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,n,i,o){var r="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===i&&0===o?function(t){return!!t.parentNode}:function(e,n,l){var u,c,d,h,f,p,m=r!==a?"nextSibling":"previousSibling",g=e.parentNode,v=s&&e.nodeName.toLowerCase(),y=!l&&!s,b=!1;if(g){if(r){for(;m;){for(h=e;h=h[m];)if(s?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;p=m="only"===t&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&y){for(h=g,d=h[F]||(h[F]={}),c=d[h.uniqueID]||(d[h.uniqueID]={}),u=c[t]||[],f=u[0]===z&&u[1],b=f&&u[2],h=f&&g.childNodes[f];h=++f&&h&&h[m]||(b=f=0)||p.pop();)if(1===h.nodeType&&++b&&h===e){c[t]=[z,f,b];break}}else if(y&&(h=e,d=h[F]||(h[F]={}),c=d[h.uniqueID]||(d[h.uniqueID]={}),u=c[t]||[],f=u[0]===z&&u[1],b=f),!1===b)for(;(h=++f&&h&&h[m]||(b=f=0)||p.pop())&&((s?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++b||(y&&(d=h[F]||(h[F]={}),c=d[h.uniqueID]||(d[h.uniqueID]={}),c[t]=[z,b]),h!==e)););return(b-=o)===i||b%i==0&&b/i>=0}}},PSEUDO:function(t,n){var o,r=x.pseudos[t]||x.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return r[F]?r(n):r.length>1?(o=[t,t,"",n],x.setFilters.hasOwnProperty(t.toLowerCase())?i(function(t,e){for(var i,o=r(t,n),a=o.length;a--;)i=Q(t,o[a]),t[i]=!(e[i]=o[a])}):function(t){return r(t,0,o)}):r}},pseudos:{not:i(function(t){var e=[],n=[],o=S(t.replace(at,"$1"));return o[F]?i(function(t,e,n,i){for(var r,a=o(t,null,i,[]),s=t.length;s--;)(r=a[s])&&(t[s]=!(e[s]=r))}):function(t,i,r){return e[0]=t,o(e,null,r,n),e[0]=null,!n.pop()}}),has:i(function(t){return function(n){return e(t,n).length>0}}),contains:i(function(t){return t=t.replace(bt,wt),function(e){return(e.textContent||_(e)).indexOf(t)>-1}}),lang:i(function(t){return dt.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(bt,wt).toLowerCase(),function(e){var n;do{if(n=L?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===O},focus:function(t){return t===I.activeElement&&(!I.hasFocus||I.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:s(!1),disabled:s(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!x.pseudos.empty(t)},header:function(t){return mt.test(t.nodeName)},input:function(t){return pt.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:l(function(){return[0]}),last:l(function(t,e){return[e-1]}),eq:l(function(t,e,n){return[n<0?n+e:n]}),even:l(function(t,e){for(var n=0;ne?e:n;--i>=0;)t.push(i);return t}),gt:l(function(t,e,n){for(var i=n<0?n+e:n;++i2&&"ID"===(a=r[0]).type&&9===e.nodeType&&L&&x.relative[r[1].type]){if(!(e=(x.find.ID(a.matches[0].replace(bt,wt),e)||[])[0]))return n;c&&(e=e.parentNode),t=t.slice(r.shift().value.length)}for(o=ht.needsContext.test(t)?0:r.length;o--&&(a=r[o],!x.relative[s=a.type]);)if((l=x.find[s])&&(i=l(a.matches[0].replace(bt,wt),yt.test(r[0].type)&&u(e.parentNode)||e))){if(r.splice(o,1),!(t=i.length&&d(r)))return X.apply(n,i),n;break}}return(c||S(t,h))(i,e,!L,n,!e||yt.test(t)&&u(e.parentNode)||e),n},w.sortStable=F.split("").sort(U).join("")===F,w.detectDuplicates=!!E,P(),w.sortDetached=o(function(t){return 1&t.compareDocumentPosition(I.createElement("fieldset"))}),o(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||r("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),w.attributes&&o(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||r("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),o(function(t){return null==t.getAttribute("disabled")})||r(tt,function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),e}(n);Mt.find=Et,Mt.expr=Et.selectors,Mt.expr[":"]=Mt.expr.pseudos,Mt.uniqueSort=Mt.unique=Et.uniqueSort,Mt.text=Et.getText,Mt.isXMLDoc=Et.isXML,Mt.contains=Et.contains,Mt.escapeSelector=Et.escape;var Pt=function(t,e,n){for(var i=[],o=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&Mt(t).is(n))break;i.push(t)}return i},It=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},Ot=Mt.expr.match.needsContext,Lt=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;Mt.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?Mt.find.matchesSelector(i,t)?[i]:[]:Mt.find.matches(t,Mt.grep(e,function(t){return 1===t.nodeType}))},Mt.fn.extend({find:function(t){var e,n,i=this.length,o=this;if("string"!=typeof t)return this.pushStack(Mt(t).filter(function(){for(e=0;e1?Mt.uniqueSort(n):n},filter:function(t){return this.pushStack(c(this,t||[],!1))},not:function(t){return this.pushStack(c(this,t||[],!0))},is:function(t){return!!c(this,"string"==typeof t&&Ot.test(t)?Mt(t):t||[],!1).length}});var Rt,At=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(Mt.fn.init=function(t,e,n){var i,o;if(!t)return this;if(n=n||Rt,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:At.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof Mt?e[0]:e,Mt.merge(this,Mt.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:ht,!0)),Lt.test(i[1])&&Mt.isPlainObject(e))for(i in e)kt(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return o=ht.getElementById(i[2]),o&&(this[0]=o,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):kt(t)?void 0!==n.ready?n.ready(t):t(Mt):Mt.makeArray(t,this)}).prototype=Mt.fn,Rt=Mt(ht);var Ht=/^(?:parents|prev(?:Until|All))/,Nt={children:!0,contents:!0,next:!0,prev:!0};Mt.fn.extend({has:function(t){var e=Mt(t,this),n=e.length;return this.filter(function(){for(var t=0;t-1:1===n.nodeType&&Mt.find.matchesSelector(n,t))){r.push(n);break}return this.pushStack(r.length>1?Mt.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?vt.call(Mt(t),this[0]):vt.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(Mt.uniqueSort(Mt.merge(this.get(),Mt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),Mt.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return Pt(t,"parentNode")},parentsUntil:function(t,e,n){return Pt(t,"parentNode",n)},next:function(t){return d(t,"nextSibling")},prev:function(t){return d(t,"previousSibling")},nextAll:function(t){return Pt(t,"nextSibling")},prevAll:function(t){return Pt(t,"previousSibling")},nextUntil:function(t,e,n){return Pt(t,"nextSibling",n)},prevUntil:function(t,e,n){return Pt(t,"previousSibling",n)},siblings:function(t){return It((t.parentNode||{}).firstChild,t)},children:function(t){return It(t.firstChild)},contents:function(t){return void 0!==t.contentDocument?t.contentDocument:(u(t,"template")&&(t=t.content||t),Mt.merge([],t.childNodes))}},function(t,e){Mt.fn[t]=function(n,i){var o=Mt.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=Mt.filter(i,o)),this.length>1&&(Nt[t]||Mt.uniqueSort(o),Ht.test(t)&&o.reverse()),this.pushStack(o)}});var Ft=/[^\x20\t\r\n\f]+/g;Mt.Callbacks=function(t){t="string"==typeof t?h(t):Mt.extend({},t);var e,n,i,o,r=[],a=[],l=-1,u=function(){for(o=o||t.once,i=e=!0;a.length;l=-1)for(n=a.shift();++l-1;)r.splice(n,1),n<=l&&l--}),this},has:function(t){return t?Mt.inArray(t,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return o=a=[],r=n="",this},disabled:function(){return!r},lock:function(){return o=a=[],n||e||(r=n=""),this},locked:function(){return!!o},fireWith:function(t,n){return o||(n=n||[],n=[t,n.slice?n.slice():n],a.push(n),e||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},Mt.extend({Deferred:function(t){var e=[["notify","progress",Mt.Callbacks("memory"),Mt.Callbacks("memory"),2],["resolve","done",Mt.Callbacks("once memory"),Mt.Callbacks("once memory"),0,"resolved"],["reject","fail",Mt.Callbacks("once memory"),Mt.Callbacks("once memory"),1,"rejected"]],i="pending",o={state:function(){return i},always:function(){return r.done(arguments).fail(arguments),this},catch:function(t){return o.then(null,t)},pipe:function(){var t=arguments;return Mt.Deferred(function(n){Mt.each(e,function(e,i){var o=kt(t[i[4]])&&t[i[4]];r[i[1]](function(){var t=o&&o.apply(this,arguments);t&&kt(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,o?[t]:arguments)})}),t=null}).promise()},then:function(t,i,o){function r(t,e,i,o){return function(){var s=this,l=arguments,u=function(){var n,u;if(!(t=a&&(i!==p&&(s=void 0,l=[n]),e.rejectWith(s,l))}};t?c():(Mt.Deferred.getStackHook&&(c.stackTrace=Mt.Deferred.getStackHook()),n.setTimeout(c))}}var a=0;return Mt.Deferred(function(n){e[0][3].add(r(0,n,kt(o)?o:f,n.notifyWith)),e[1][3].add(r(0,n,kt(t)?t:f)),e[2][3].add(r(0,n,kt(i)?i:p))}).promise()},promise:function(t){return null!=t?Mt.extend(t,o):o}},r={};return Mt.each(e,function(t,n){var a=n[2],s=n[5];o[n[1]]=a.add,s&&a.add(function(){i=s},e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),a.add(n[3].fire),r[n[0]]=function(){return r[n[0]+"With"](this===r?void 0:this,arguments),this},r[n[0]+"With"]=a.fireWith}),o.promise(r),t&&t.call(r,r),r},when:function(t){var e=arguments.length,n=e,i=Array(n),o=pt.call(arguments),r=Mt.Deferred(),a=function(t){return function(n){i[t]=this,o[t]=arguments.length>1?pt.call(arguments):n,--e||r.resolveWith(i,o)}};if(e<=1&&(m(t,r.done(a(n)).resolve,r.reject,!e),"pending"===r.state()||kt(o[n]&&o[n].then)))return r.then();for(;n--;)m(o[n],a(n),r.reject);return r.promise()}});var Yt=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;Mt.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&Yt.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},Mt.readyException=function(t){n.setTimeout(function(){throw t})};var zt=Mt.Deferred();Mt.fn.ready=function(t){return zt.then(t).catch(function(t){Mt.readyException(t)}),this},Mt.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--Mt.readyWait:Mt.isReady)||(Mt.isReady=!0,!0!==t&&--Mt.readyWait>0||zt.resolveWith(ht,[Mt]))}}),Mt.ready.then=zt.then,"complete"===ht.readyState||"loading"!==ht.readyState&&!ht.documentElement.doScroll?n.setTimeout(Mt.ready):(ht.addEventListener("DOMContentLoaded",g),n.addEventListener("load",g));var jt=function(t,e,n,i,o,r,a){var l=0,u=t.length,c=null==n;if("object"===s(n)){o=!0;for(l in n)jt(t,e,l,n[l],!0,r,a)}else if(void 0!==i&&(o=!0,kt(i)||(a=!0),c&&(a?(e.call(t,i),e=null):(c=e,e=function(t,e,n){return c.call(Mt(t),n)})),e))for(;l1,null,!0)},removeData:function(t){return this.each(function(){Ut.remove(this,t)})}}),Mt.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=$t.get(t,e),n&&(!i||Array.isArray(n)?i=$t.access(t,e,Mt.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=Mt.queue(t,e),i=n.length,o=n.shift(),r=Mt._queueHooks(t,e),a=function(){Mt.dequeue(t,e)};"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===e&&n.unshift("inprogress"),delete r.stop,o.call(t,a,r)),!i&&r&&r.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return $t.get(t,n)||$t.access(t,n,{empty:Mt.Callbacks("once memory").add(function(){$t.remove(t,[e+"queue",n])})})}}),Mt.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length\x20\t\r\n\f]*)/i,ae=/^$|^module$|\/(?:java|ecma)script/i,se={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};se.optgroup=se.option,se.tbody=se.tfoot=se.colgroup=se.caption=se.thead,se.th=se.td;var le=/<|&#?\w+;/;!function(){var t=ht.createDocumentFragment(),e=t.appendChild(ht.createElement("div")),n=ht.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),Dt.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="",Dt.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var ue=/^key/,ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,de=/^([^.]*)(?:\.(.+)|)/;Mt.event={global:{},add:function(t,e,n,i,o){var r,a,s,l,u,c,d,h,f,p,m,g=$t.get(t);if(g)for(n.handler&&(r=n,n=r.handler,o=r.selector),o&&Mt.find.matchesSelector(Kt,o),n.guid||(n.guid=Mt.guid++),(l=g.events)||(l=g.events={}),(a=g.handle)||(a=g.handle=function(e){return void 0!==Mt&&Mt.event.triggered!==e.type?Mt.event.dispatch.apply(t,arguments):void 0}),e=(e||"").match(Ft)||[""],u=e.length;u--;)s=de.exec(e[u])||[],f=m=s[1],p=(s[2]||"").split(".").sort(),f&&(d=Mt.event.special[f]||{},f=(o?d.delegateType:d.bindType)||f,d=Mt.event.special[f]||{},c=Mt.extend({type:f,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&Mt.expr.match.needsContext.test(o),namespace:p.join(".")},r),(h=l[f])||(h=l[f]=[],h.delegateCount=0,d.setup&&!1!==d.setup.call(t,i,p,a)||t.addEventListener&&t.addEventListener(f,a)),d.add&&(d.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),o?h.splice(h.delegateCount++,0,c):h.push(c),Mt.event.global[f]=!0)},remove:function(t,e,n,i,o){var r,a,s,l,u,c,d,h,f,p,m,g=$t.hasData(t)&&$t.get(t);if(g&&(l=g.events)){for(e=(e||"").match(Ft)||[""],u=e.length;u--;)if(s=de.exec(e[u])||[],f=m=s[1],p=(s[2]||"").split(".").sort(),f){for(d=Mt.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,h=l[f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=r=h.length;r--;)c=h[r],!o&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(h.splice(r,1),c.selector&&h.delegateCount--,d.remove&&d.remove.call(t,c));a&&!h.length&&(d.teardown&&!1!==d.teardown.call(t,p,g.handle)||Mt.removeEvent(t,f,g.handle),delete l[f])}else for(f in l)Mt.event.remove(t,f+e[u],n,i,!0);Mt.isEmptyObject(l)&&$t.remove(t,"handle events")}},dispatch:function(t){var e,n,i,o,r,a,s=Mt.event.fix(t),l=new Array(arguments.length),u=($t.get(this,"events")||{})[s.type]||[],c=Mt.event.special[s.type]||{};for(l[0]=s,e=1;e=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(r=[],a={},n=0;n-1:Mt.find(o,this,null,[u]).length),a[o]&&r.push(i);r.length&&s.push({elem:u,handlers:r})}return u=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,fe=/\s*$/g;Mt.extend({htmlPrefilter:function(t){return t.replace(he,"<$1>")},clone:function(t,e,n){var i,o,r,a,s=t.cloneNode(!0),l=Qt(t);if(!(Dt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||Mt.isXMLDoc(t)))for(a=S(s),r=S(t),i=0,o=r.length;i0&&C(a,!l&&S(t,"script")),s},cleanData:function(t){for(var e,n,i,o=Mt.event.special,r=0;void 0!==(n=t[r]);r++)if(Vt(n)){if(e=n[$t.expando]){if(e.events)for(i in e.events)o[i]?Mt.event.remove(n,i):Mt.removeEvent(n,i,e.handle);n[$t.expando]=void 0}n[Ut.expando]&&(n[Ut.expando]=void 0)}}}),Mt.fn.extend({detach:function(t){return z(this,t,!0)},remove:function(t){return z(this,t)},text:function(t){return jt(this,function(t){return void 0===t?Mt.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return Y(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){R(this,t).appendChild(t)}})},prepend:function(){return Y(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=R(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return Y(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return Y(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(Mt.cleanData(S(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return Mt.clone(this,t,e)})},html:function(t){return jt(this,function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!fe.test(t)&&!se[(re.exec(t)||["",""])[1].toLowerCase()]){t=Mt.htmlPrefilter(t);try{for(;n1)}}),Mt.Tween=G,G.prototype={constructor:G,init:function(t,e,n,i,o,r){this.elem=t,this.prop=n,this.easing=o||Mt.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=r||(Mt.cssNumber[n]?"":"px")},cur:function(){var t=G.propHooks[this.prop];return t&&t.get?t.get(this):G.propHooks._default.get(this)},run:function(t){var e,n=G.propHooks[this.prop];return this.options.duration?this.pos=e=Mt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):G.propHooks._default.set(this),this}},G.prototype.init.prototype=G.prototype,G.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=Mt.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){Mt.fx.step[t.prop]?Mt.fx.step[t.prop](t):1!==t.elem.nodeType||!Mt.cssHooks[t.prop]&&null==t.elem.style[V(t.prop)]?t.elem[t.prop]=t.now:Mt.style(t.elem,t.prop,t.now+t.unit)}}},G.propHooks.scrollTop=G.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},Mt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},Mt.fx=G.prototype.init,Mt.fx.step={};var Ce,Me,Te=/^(?:toggle|show|hide)$/,Ee=/queueHooks$/;Mt.Animation=Mt.extend(et,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return _(n.elem,t,Zt.exec(e),n),n}]},tweener:function(t,e){kt(t)?(e=t,t=["*"]):t=t.match(Ft);for(var n,i=0,o=t.length;i1)},removeAttr:function(t){return this.each(function(){Mt.removeAttr(this,t)})}}),Mt.extend({attr:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===t.getAttribute?Mt.prop(t,e,n):(1===r&&Mt.isXMLDoc(t)||(o=Mt.attrHooks[e.toLowerCase()]||(Mt.expr.match.bool.test(e)?Pe:void 0)),void 0!==n?null===n?void Mt.removeAttr(t,e):o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:(t.setAttribute(e,n+""),n):o&&"get"in o&&null!==(i=o.get(t,e))?i:(i=Mt.find.attr(t,e),null==i?void 0:i))},attrHooks:{type:{set:function(t,e){if(!Dt.radioValue&&"radio"===e&&u(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,o=e&&e.match(Ft);if(o&&1===t.nodeType)for(;n=o[i++];)t.removeAttribute(n)}}),Pe={set:function(t,e,n){return!1===e?Mt.removeAttr(t,n):t.setAttribute(n,n),n}},Mt.each(Mt.expr.match.bool.source.match(/\w+/g),function(t,e){var n=Ie[e]||Mt.find.attr;Ie[e]=function(t,e,i){var o,r,a=e.toLowerCase();return i||(r=Ie[a],Ie[a]=o,o=null!=n(t,e,i)?a:null,Ie[a]=r),o}});var Oe=/^(?:input|select|textarea|button)$/i,Le=/^(?:a|area)$/i;Mt.fn.extend({prop:function(t,e){return jt(this,Mt.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[Mt.propFix[t]||t]})}}),Mt.extend({prop:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&Mt.isXMLDoc(t)||(e=Mt.propFix[e]||e,o=Mt.propHooks[e]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:t[e]=n:o&&"get"in o&&null!==(i=o.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=Mt.find.attr(t,"tabindex");return e?parseInt(e,10):Oe.test(t.nodeName)||Le.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),Dt.optSelected||(Mt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),Mt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Mt.propFix[this.toLowerCase()]=this}),Mt.fn.extend({addClass:function(t){var e,n,i,o,r,a,s,l=0;if(kt(t))return this.each(function(e){Mt(this).addClass(t.call(this,e,it(this)))});if(e=ot(t),e.length)for(;n=this[l++];)if(o=it(n),i=1===n.nodeType&&" "+nt(o)+" "){for(a=0;r=e[a++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");s=nt(i),o!==s&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,i,o,r,a,s,l=0;if(kt(t))return this.each(function(e){Mt(this).removeClass(t.call(this,e,it(this)))});if(!arguments.length)return this.attr("class","");if(e=ot(t),e.length)for(;n=this[l++];)if(o=it(n),i=1===n.nodeType&&" "+nt(o)+" "){for(a=0;r=e[a++];)for(;i.indexOf(" "+r+" ")>-1;)i=i.replace(" "+r+" "," ");s=nt(i),o!==s&&n.setAttribute("class",s)}return this},toggleClass:function(t,e){var n=typeof t,i="string"===n||Array.isArray(t);return"boolean"==typeof e&&i?e?this.addClass(t):this.removeClass(t):kt(t)?this.each(function(n){Mt(this).toggleClass(t.call(this,n,it(this),e),e)}):this.each(function(){var e,o,r,a;if(i)for(o=0,r=Mt(this),a=ot(t);e=a[o++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else void 0!==t&&"boolean"!==n||(e=it(this),e&&$t.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":$t.get(this,"__className__")||""))})},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+nt(it(n))+" ").indexOf(e)>-1)return!0;return!1}});var Re=/\r/g;Mt.fn.extend({val:function(t){var e,n,i,o=this[0];{if(arguments.length)return i=kt(t),this.each(function(n){var o;1===this.nodeType&&(o=i?t.call(this,n,Mt(this).val()):t,null==o?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=Mt.map(o,function(t){return null==t?"":t+""})),(e=Mt.valHooks[this.type]||Mt.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))});if(o)return(e=Mt.valHooks[o.type]||Mt.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(o,"value"))?n:(n=o.value,"string"==typeof n?n.replace(Re,""):null==n?"":n)}}}),Mt.extend({valHooks:{option:{get:function(t){var e=Mt.find.attr(t,"value");return null!=e?e:nt(Mt.text(t))}},select:{get:function(t){var e,n,i,o=t.options,r=t.selectedIndex,a="select-one"===t.type,s=a?null:[],l=a?r+1:o.length;for(i=r<0?l:a?r:0;i-1)&&(n=!0);return n||(t.selectedIndex=-1),r}}}}),Mt.each(["radio","checkbox"],function(){Mt.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=Mt.inArray(Mt(t).val(),e)>-1}},Dt.checkOn||(Mt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),Dt.focusin="onfocusin"in n;var Ae=/^(?:focusinfocus|focusoutblur)$/,He=function(t){t.stopPropagation()};Mt.extend(Mt.event,{trigger:function(t,e,i,o){var r,a,s,l,u,c,d,h,f=[i||ht],p=wt.call(t,"type")?t.type:t,m=wt.call(t,"namespace")?t.namespace.split("."):[];if(a=h=s=i=i||ht,3!==i.nodeType&&8!==i.nodeType&&!Ae.test(p+Mt.event.triggered)&&(p.indexOf(".")>-1&&(m=p.split("."),p=m.shift(),m.sort()),u=p.indexOf(":")<0&&"on"+p,t=t[Mt.expando]?t:new Mt.Event(p,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=m.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),e=null==e?[t]:Mt.makeArray(e,[t]),d=Mt.event.special[p]||{},o||!d.trigger||!1!==d.trigger.apply(i,e))){if(!o&&!d.noBubble&&!St(i)){for(l=d.delegateType||p,Ae.test(l+p)||(a=a.parentNode);a;a=a.parentNode)f.push(a),s=a;s===(i.ownerDocument||ht)&&f.push(s.defaultView||s.parentWindow||n)}for(r=0;(a=f[r++])&&!t.isPropagationStopped();)h=a,t.type=r>1?l:d.bindType||p,c=($t.get(a,"events")||{})[t.type]&&$t.get(a,"handle"),c&&c.apply(a,e),(c=u&&a[u])&&c.apply&&Vt(a)&&(t.result=c.apply(a,e),!1===t.result&&t.preventDefault());return t.type=p,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(f.pop(),e)||!Vt(i)||u&&kt(i[p])&&!St(i)&&(s=i[u],s&&(i[u]=null),Mt.event.triggered=p,t.isPropagationStopped()&&h.addEventListener(p,He),i[p](),t.isPropagationStopped()&&h.removeEventListener(p,He),Mt.event.triggered=void 0,s&&(i[u]=s)),t.result}},simulate:function(t,e,n){var i=Mt.extend(new Mt.Event,n,{type:t,isSimulated:!0});Mt.event.trigger(i,null,e)}}),Mt.fn.extend({trigger:function(t,e){return this.each(function(){Mt.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return Mt.event.trigger(t,e,n,!0)}}),Dt.focusin||Mt.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){Mt.event.simulate(e,t.target,Mt.event.fix(t))};Mt.event.special[e]={setup:function(){var i=this.ownerDocument||this,o=$t.access(i,e);o||i.addEventListener(t,n,!0),$t.access(i,e,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this,o=$t.access(i,e)-1;o?$t.access(i,e,o):(i.removeEventListener(t,n,!0),$t.remove(i,e))}}});var Ne=n.location,Fe=Date.now(),Ye=/\?/;Mt.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||Mt.error("Invalid XML: "+t),e};var ze=/\[\]$/,je=/\r?\n/g,Be=/^(?:submit|button|image|reset|file)$/i,We=/^(?:input|select|textarea|keygen)/i;Mt.param=function(t,e){var n,i=[],o=function(t,e){var n=kt(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!Mt.isPlainObject(t))Mt.each(t,function(){o(this.name,this.value)});else for(n in t)rt(n,t[n],e,o);return i.join("&")},Mt.fn.extend({serialize:function(){return Mt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=Mt.prop(this,"elements");return t?Mt.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!Mt(this).is(":disabled")&&We.test(this.nodeName)&&!Be.test(t)&&(this.checked||!oe.test(t))}).map(function(t,e){var n=Mt(this).val();return null==n?null:Array.isArray(n)?Mt.map(n,function(t){return{name:e.name,value:t.replace(je,"\r\n")}}):{name:e.name,value:n.replace(je,"\r\n")}}).get()}});var Ve=/%20/g,$e=/#.*$/,Ue=/([?&])_=[^&]*/,qe=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ge=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Je=/^(?:GET|HEAD)$/,Ze=/^\/\//,Xe={},Ke={},Qe="*/".concat("*"),tn=ht.createElement("a");tn.href=Ne.href,Mt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ne.href,type:"GET",isLocal:Ge.test(Ne.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Qe,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":Mt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?lt(lt(t,Mt.ajaxSettings),e):lt(Mt.ajaxSettings,t)},ajaxPrefilter:at(Xe),ajaxTransport:at(Ke),ajax:function(t,e){function i(t,e,i,s){var u,h,f,w,x,_=e;c||(c=!0,l&&n.clearTimeout(l),o=void 0,a=s||"",D.readyState=t>0?4:0,u=t>=200&&t<300||304===t,i&&(w=ut(p,D,i)),w=ct(p,w,D,u),u?(p.ifModified&&(x=D.getResponseHeader("Last-Modified"),x&&(Mt.lastModified[r]=x),(x=D.getResponseHeader("etag"))&&(Mt.etag[r]=x)),204===t||"HEAD"===p.type?_="nocontent":304===t?_="notmodified":(_=w.state,h=w.data,f=w.error,u=!f)):(f=_,!t&&_||(_="error",t<0&&(t=0))),D.status=t,D.statusText=(e||_)+"",u?v.resolveWith(m,[h,_,D]):v.rejectWith(m,[D,_,f]),D.statusCode(b),b=void 0,d&&g.trigger(u?"ajaxSuccess":"ajaxError",[D,p,u?h:f]),y.fireWith(m,[D,_]),d&&(g.trigger("ajaxComplete",[D,p]),--Mt.active||Mt.event.trigger("ajaxStop")))}"object"==typeof t&&(e=t,t=void 0),e=e||{};var o,r,a,s,l,u,c,d,h,f,p=Mt.ajaxSetup({},e),m=p.context||p,g=p.context&&(m.nodeType||m.jquery)?Mt(m):Mt.event,v=Mt.Deferred(),y=Mt.Callbacks("once memory"),b=p.statusCode||{},w={},x={},_="canceled",D={readyState:0,getResponseHeader:function(t){var e;if(c){if(!s)for(s={};e=qe.exec(a);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(t,e){return null==c&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==c&&(p.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)D.always(t[D.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||_;return o&&o.abort(e),i(0,e),this}};if(v.promise(D),p.url=((t||p.url||Ne.href)+"").replace(Ze,Ne.protocol+"//"),p.type=e.method||e.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(Ft)||[""],null==p.crossDomain){u=ht.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=tn.protocol+"//"+tn.host!=u.protocol+"//"+u.host}catch(t){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=Mt.param(p.data,p.traditional)),st(Xe,p,e,D),c)return D;d=Mt.event&&p.global,d&&0==Mt.active++&&Mt.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Je.test(p.type),r=p.url.replace($e,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Ve,"+")):(f=p.url.slice(r.length),p.data&&(p.processData||"string"==typeof p.data)&&(r+=(Ye.test(r)?"&":"?")+p.data,delete p.data),!1===p.cache&&(r=r.replace(Ue,"$1"),f=(Ye.test(r)?"&":"?")+"_="+Fe+++f),p.url=r+f),p.ifModified&&(Mt.lastModified[r]&&D.setRequestHeader("If-Modified-Since",Mt.lastModified[r]),Mt.etag[r]&&D.setRequestHeader("If-None-Match",Mt.etag[r])),(p.data&&p.hasContent&&!1!==p.contentType||e.contentType)&&D.setRequestHeader("Content-Type",p.contentType),D.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Qe+"; q=0.01":""):p.accepts["*"]);for(h in p.headers)D.setRequestHeader(h,p.headers[h]);if(p.beforeSend&&(!1===p.beforeSend.call(m,D,p)||c))return D.abort();if(_="abort",y.add(p.complete),D.done(p.success),D.fail(p.error),o=st(Ke,p,e,D)){if(D.readyState=1,d&&g.trigger("ajaxSend",[D,p]),c)return D;p.async&&p.timeout>0&&(l=n.setTimeout(function(){D.abort("timeout")},p.timeout));try{c=!1,o.send(w,i)}catch(t){if(c)throw t;i(-1,t)}}else i(-1,"No Transport");return D},getJSON:function(t,e,n){return Mt.get(t,e,n,"json")},getScript:function(t,e){return Mt.get(t,void 0,e,"script")}}),Mt.each(["get","post"],function(t,e){Mt[e]=function(t,n,i,o){return kt(n)&&(o=o||i,i=n,n=void 0),Mt.ajax(Mt.extend({url:t,type:e,dataType:o,data:n,success:i},Mt.isPlainObject(t)&&t))}}),Mt._evalUrl=function(t,e){return Mt.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){Mt.globalEval(t,e)}})},Mt.fn.extend({wrapAll:function(t){var e;return this[0]&&(kt(t)&&(t=t.call(this[0])),e=Mt(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return kt(t)?this.each(function(e){Mt(this).wrapInner(t.call(this,e))}):this.each(function(){var e=Mt(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=kt(t);return this.each(function(n){Mt(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){Mt(this).replaceWith(this.childNodes)}),this}}),Mt.expr.pseudos.hidden=function(t){return!Mt.expr.pseudos.visible(t)},Mt.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},Mt.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var en={0:200,1223:204},nn=Mt.ajaxSettings.xhr();Dt.cors=!!nn&&"withCredentials"in nn,Dt.ajax=nn=!!nn,Mt.ajaxTransport(function(t){var e,i;if(Dt.cors||nn&&!t.crossDomain)return{send:function(o,r){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest");for(a in o)s.setRequestHeader(a,o[a]);e=function(t){return function(){e&&(e=i=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?r(0,"error"):r(s.status,s.statusText):r(en[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),i=s.onerror=s.ontimeout=e("error"),void 0!==s.onabort?s.onabort=i:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){e&&i()})},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}}),Mt.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),Mt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return Mt.globalEval(t),t}}}),Mt.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),Mt.ajaxTransport("script",function(t){if(t.crossDomain||t.scriptAttrs){var e,n;return{send:function(i,o){e=Mt(" - {% endif %} -{% endblock %} diff --git a/templates/macros/actions.html.twig b/templates/macros/actions.html.twig index 6effa8be..ab268725 100644 --- a/templates/macros/actions.html.twig +++ b/templates/macros/actions.html.twig @@ -208,7 +208,7 @@ {% set actions = {'filter': '#collapseTimesheet'} %} {% if is_granted('export_own_timesheet') %} - {% set actions = actions|merge({'download': {'onclick': 'return exportTimesheet()'}}) %} + {% set actions = actions|merge({'download': {'url': path('timesheet_export'), 'class': 'toolbar-action'}}) %} {% endif %} {% set actions = actions|merge({'visibility': '#modal_timesheet'}) %} {% if is_granted('create_own_timesheet') %} @@ -264,7 +264,7 @@ {% set actions = {'filter': '#collapseTimesheetAdmin'} %} {% if is_granted('export_own_timesheet') %} - {% set actions = actions|merge({'download': 'onclick:return exportTimesheet()'}) %} + {% set actions = actions|merge({'download': {'url': path('admin_timesheet_export'), 'class': 'toolbar-action'}}) %} {% endif %} {% set actions = actions|merge({'visibility': '#modal_timesheet_admin'}) %} {% if is_granted('create_other_timesheet') %} diff --git a/templates/timesheet-team/export.html.twig b/templates/timesheet-team/export.html.twig index 02b90e96..b1db1624 100644 --- a/templates/timesheet-team/export.html.twig +++ b/templates/timesheet-team/export.html.twig @@ -42,7 +42,7 @@ {% for entry in entries %} {% set timeWorked = timeWorked + entry.duration %} - {{ entry.begin|date_short }} + {{ entry.begin|date_short }} {% if query.user is empty %} {{ widgets.username(entry.user) }} {% endif %} @@ -58,7 +58,7 @@ {{ 'label.customer'|trans }}: {{ entry.project.customer.name }} - {{ entry.duration|duration }} + {{ entry.duration|duration }} {% endfor %} diff --git a/templates/timesheet-team/index.html.twig b/templates/timesheet-team/index.html.twig index 7934085f..10f5b241 100644 --- a/templates/timesheet-team/index.html.twig +++ b/templates/timesheet-team/index.html.twig @@ -4,13 +4,17 @@ {% import "macros/toolbar.html.twig" as toolbar %} {% import "macros/actions.html.twig" as actions %} +{% set tableName = 'timesheet_admin' %} {% set duration_only = is_duration_only() %} {% set columns = { 'date': 'alwaysVisible', } %} {% if not duration_only %} - {% set columns = columns|merge({'starttime': 'hidden-xs', 'endtime': 'hidden-xs'}) %} + {% set columns = columns|merge({ + 'starttime': 'hidden-xs', + 'endtime': 'hidden-xs' + }) %} {% endif %} {% set columns = columns|merge({ @@ -25,8 +29,6 @@ 'actions': 'actions alwaysVisible', }) %} -{% set tableName = 'timesheet_admin' %} - {% block page_title %}{{ 'admin_timesheet.title'|trans }}{% endblock %} {% block page_subtitle %}{{ 'admin_timesheet.subtitle'|trans }}{% endblock %} {% block page_actions %}{{ actions.timesheets_team('index') }}{% endblock %} @@ -49,21 +51,23 @@ {% if not duration_only %} {{ entry.begin|time }} + + {% if entry.end %} + {{ entry.end|time }} + {% else %} + ‐ + {% endif %} + {% endif %} {% if entry.end %} - {% if not duration_only %} - {{ entry.end|time }} - {% endif %} {{ entry.duration|duration }} {% else %} - {% if not duration_only %} - ‐ - {% endif %} {{ entry|duration }} {% endif %} + {% if not entry.end or not is_granted('view_rate', entry) %} ‐ @@ -86,7 +90,7 @@ {{ entry.description|nl2br }} {{ widgets.tag_list(entry.tags) }} - {{ actions.timesheet_team(entry, 'index') }} + {{- actions.timesheet_team(entry, 'index') -}} {% endfor %} @@ -95,17 +99,3 @@ {% endif %} {% endblock %} - -{% block javascripts %} - {{ parent() }} - -{% endblock %} diff --git a/templates/timesheet/export.html.twig b/templates/timesheet/export.html.twig index b468e794..db3d53a4 100644 --- a/templates/timesheet/export.html.twig +++ b/templates/timesheet/export.html.twig @@ -37,7 +37,7 @@ {% for entry in entries %} {% set timeWorked = timeWorked + entry.duration %} - {{ entry.begin|date_short }} + {{ entry.begin|date_short }} {% if entry.description is not empty %}
@@ -50,7 +50,7 @@ {{ 'label.customer'|trans }}: {{ entry.project.customer.name }} - {{ entry.duration|duration }} + {{ entry.duration|duration }} {% endfor %} diff --git a/templates/timesheet/index.html.twig b/templates/timesheet/index.html.twig index b3df6690..b8cd70fc 100644 --- a/templates/timesheet/index.html.twig +++ b/templates/timesheet/index.html.twig @@ -11,6 +11,7 @@ {% set columns = { 'date': 'alwaysVisible', } %} + {% if not duration_only %} {% set columns = columns|merge({ 'starttime': '', @@ -40,6 +41,7 @@ {% endblock %} {% block main %} + {% if entries.count == 0 %} {{ widgets.callout('warning', 'error.no_entries_found') }} {% else %} @@ -64,26 +66,31 @@ {% if not duration_only %} {{ entry.begin|time }} + + {% if entry.end %} + {{ entry.end|time }} + {% else %} + ‐ + {% endif %} + {% endif %} {% if entry.end %} - {% if not duration_only %} - {{ entry.end|time }} - {% endif %} {{ entry.duration|duration }} - {% if canSeeRate %} - {{ entry.rate|money(entry.project.customer.currency) }} - {% endif %} {% else %} - {% if not duration_only %} - ‐ - {% endif %} {{ entry|duration }} - {% if canSeeRate %} - ‐ + {% endif %} + + {% if canSeeRate %} + + {% if not entry.end %} + ‐ + {% else %} + {{ entry.rate|money(entry.project.customer.currency) }} {% endif %} + {% endif %} {{ widgets.label_customer(entry.project.customer) }} @@ -113,20 +120,6 @@ {% endblock %} -{% block javascripts %} - {{ parent() }} - -{% endblock %} - {% macro summary(day, duration, dayRates, columns, canSeeRate, duration_only, tableName) %} {% import "macros/datatables.html.twig" as tables %} diff --git a/tests/Event/ThemeEventTest.php b/tests/Event/ThemeEventTest.php index 65099c90..82713725 100644 --- a/tests/Event/ThemeEventTest.php +++ b/tests/Event/ThemeEventTest.php @@ -10,9 +10,7 @@ namespace App\Tests\EventSubscriber; use App\Entity\User; -use App\Event\DashboardEvent; use App\Event\ThemeEvent; -use App\Model\DashboardSection; use PHPUnit\Framework\TestCase; /**