\x20\t\r\n\f]*)/i,gt=/^$|^module$|\/(?:java|ecma)script/i;ft=y.createDocumentFragment().appendChild(y.createElement("div")),(pt=y.createElement("input")).setAttribute("type","radio"),pt.setAttribute("checked","checked"),pt.setAttribute("name","t"),ft.appendChild(pt),_.checkClone=ft.cloneNode(!0).cloneNode(!0).lastChild.checked,ft.innerHTML="",_.noCloneChecked=!!ft.cloneNode(!0).lastChild.defaultValue,ft.innerHTML=" ",_.option=!!ft.lastChild;var vt={thead:[1,""],col:[2,""],tr:[2,""],td:[3,""],_default:[0,"",""]};function yt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&S(t,e)?A.merge([t],n):n}function bt(t,e){for(var n=0,i=t.length;n",""]);var wt=/<|?\w+;/;function xt(t,e,n,i,r){for(var a,o,s,l,u,c,d=e.createDocumentFragment(),h=[],f=0,p=t.length;f -1)r&&r.push(a);else if(u=ot(a),o=yt(d.appendChild(a),"script"),u&&bt(o),n)for(c=0;a=o[c++];)gt.test(a.type||"")&&n.push(a);return d}var At=/^([^.]*)(?:\.(.+)|)/;function kt(){return!0}function Mt(){return!1}function Lt(t,e){return t===function(){try{return y.activeElement}catch(t){}}()==("focus"===e)}function Tt(t,e,n,i,r,a){var o,s;if("object"==typeof e){for(s in"string"!=typeof n&&(i=i||n,n=void 0),e)Tt(t,s,n,i,e[s],a);return t}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=Mt;else if(!r)return t;return 1===a&&(o=r,(r=function(t){return A().off(t),o.apply(this,arguments)}).guid=o.guid||(o.guid=A.guid++)),t.each((function(){A.event.add(this,e,r,i,n)}))}function Dt(t,e,n){n?(Q.set(t,e,!1),A.event.add(t,e,{namespace:!1,handler:function(t){var i,r,a=Q.get(this,e);if(1&t.isTrigger&&this[e]){if(a.length)(A.event.special[e]||{}).delegateType&&t.stopPropagation();else if(a=s.call(arguments),Q.set(this,e,a),i=n(this,e),this[e](),a!==(r=Q.get(this,e))||i?Q.set(this,e,!1):r={},a!==r)return t.stopImmediatePropagation(),t.preventDefault(),r&&r.value}else a.length&&(Q.set(this,e,{value:A.event.trigger(A.extend(a[0],A.Event.prototype),a.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Q.get(t,e)&&A.event.add(t,e,kt)}A.event={global:{},add:function(t,e,n,i,r){var a,o,s,l,u,c,d,h,f,p,m,_=Q.get(t);if(G(t))for(n.handler&&(n=(a=n).handler,r=a.selector),r&&A.find.matchesSelector(at,r),n.guid||(n.guid=A.guid++),(l=_.events)||(l=_.events=Object.create(null)),(o=_.handle)||(o=_.handle=function(e){return void 0!==A&&A.event.triggered!==e.type?A.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match(H)||[""]).length;u--;)f=m=(s=At.exec(e[u])||[])[1],p=(s[2]||"").split(".").sort(),f&&(d=A.event.special[f]||{},f=(r?d.delegateType:d.bindType)||f,d=A.event.special[f]||{},c=A.extend({type:f,origType:m,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&A.expr.match.needsContext.test(r),namespace:p.join(".")},a),(h=l[f])||((h=l[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,i,p,o)||t.addEventListener&&t.addEventListener(f,o)),d.add&&(d.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,c):h.push(c),A.event.global[f]=!0)},remove:function(t,e,n,i,r){var a,o,s,l,u,c,d,h,f,p,m,_=Q.hasData(t)&&Q.get(t);if(_&&(l=_.events)){for(u=(e=(e||"").match(H)||[""]).length;u--;)if(f=m=(s=At.exec(e[u])||[])[1],p=(s[2]||"").split(".").sort(),f){for(d=A.event.special[f]||{},h=l[f=(i?d.delegateType:d.bindType)||f]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=h.length;a--;)c=h[a],!r&&m!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(h.splice(a,1),c.selector&&h.delegateCount--,d.remove&&d.remove.call(t,c));o&&!h.length&&(d.teardown&&!1!==d.teardown.call(t,p,_.handle)||A.removeEvent(t,f,_.handle),delete l[f])}else for(f in l)A.event.remove(t,f+e[u],n,i,!0);A.isEmptyObject(l)&&Q.remove(t,"handle events")}},dispatch:function(t){var e,n,i,r,a,o,s=new Array(arguments.length),l=A.event.fix(t),u=(Q.get(this,"events")||Object.create(null))[l.type]||[],c=A.event.special[l.type]||{};for(s[0]=l,e=1;e=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(a=[],o={},n=0;n-1:A.find(r,this,null,[u]).length),o[r]&&a.push(i);a.length&&s.push({elem:u,handlers:a})}return u=this,l\s*$/g;function Et(t,e){return S(t,"table")&&S(11!==e.nodeType?e:e.firstChild,"tr")&&A(t).children("tbody")[0]||t}function Ot(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function jt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Pt(t,e){var n,i,r,a,o,s;if(1===e.nodeType){if(Q.hasData(t)&&(s=Q.get(t).events))for(r in Q.remove(e,"handle events"),s)for(n=0,i=s[r].length;n1&&"string"==typeof p&&!_.checkClone&&Ct.test(p))return t.each((function(r){var a=t.eq(r);m&&(e[0]=p.call(this,r,a.html())),Ht(a,e,n,i)}));if(h&&(a=(r=xt(e,t[0].ownerDocument,!1,t,i)).firstChild,1===r.childNodes.length&&(r=a),a||i)){for(s=(o=A.map(yt(r,"script"),Ot)).length;d0&&bt(o,!l&&yt(t,"script")),s},cleanData:function(t){for(var e,n,i,r=A.event.special,a=0;void 0!==(n=t[a]);a++)if(G(n)){if(e=n[Q.expando]){if(e.events)for(i in e.events)r[i]?A.event.remove(n,i):A.removeEvent(n,i,e.handle);n[Q.expando]=void 0}n[K.expando]&&(n[K.expando]=void 0)}}}),A.fn.extend({detach:function(t){return Nt(this,t,!0)},remove:function(t){return Nt(this,t)},text:function(t){return W(this,(function(t){return void 0===t?A.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 Ht(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Et(this,t).appendChild(t)}))},prepend:function(){return Ht(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Et(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Ht(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Ht(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&&(A.cleanData(yt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return A.clone(this,t,e)}))},html:function(t){return W(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&&!St.test(t)&&!vt[(_t.exec(t)||["",""])[1].toLowerCase()]){t=A.htmlPrefilter(t);try{for(;n=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-a-l-s-.5))||0),l}function ee(t,e,n){var i=Bt(t),r=(!_.boxSizingReliable()||n)&&"border-box"===A.css(t,"boxSizing",!1,i),a=r,o=$t(t,e,i),s="offset"+e[0].toUpperCase()+e.slice(1);if(zt.test(o)){if(!n)return o;o="auto"}return(!_.boxSizingReliable()&&r||!_.reliableTrDimensions()&&S(t,"tr")||"auto"===o||!parseFloat(o)&&"inline"===A.css(t,"display",!1,i))&&t.getClientRects().length&&(r="border-box"===A.css(t,"boxSizing",!1,i),(a=s in t)&&(o=t[s])),(o=parseFloat(o)||0)+te(t,e,n||(r?"border":"content"),a,i,o)+"px"}function ne(t,e,n,i,r){return new ne.prototype.init(t,e,n,i,r)}A.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=$t(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,a,o,s=Z(e),l=Jt.test(e),u=t.style;if(l||(e=Zt(s)),o=A.cssHooks[e]||A.cssHooks[s],void 0===n)return o&&"get"in o&&void 0!==(r=o.get(t,!1,i))?r:u[e];"string"===(a=typeof n)&&(r=it.exec(n))&&r[1]&&(n=ut(t,e,r),a="number"),null!=n&&n==n&&("number"!==a||l||(n+=r&&r[3]||(A.cssNumber[s]?"":"px")),_.clearCloneStyle||""!==n||0!==e.indexOf("background")||(u[e]="inherit"),o&&"set"in o&&void 0===(n=o.set(t,n,i))||(l?u.setProperty(e,n):u[e]=n))}},css:function(t,e,n,i){var r,a,o,s=Z(e);return Jt.test(e)||(e=Zt(s)),(o=A.cssHooks[e]||A.cssHooks[s])&&"get"in o&&(r=o.get(t,!0,n)),void 0===r&&(r=$t(t,e,i)),"normal"===r&&e in Kt&&(r=Kt[e]),""===n||n?(a=parseFloat(r),!0===n||isFinite(a)?a||0:r):r}}),A.each(["height","width"],(function(t,e){A.cssHooks[e]={get:function(t,n,i){if(n)return!Gt.test(A.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ee(t,e,i):Ft(t,Qt,(function(){return ee(t,e,i)}))},set:function(t,n,i){var r,a=Bt(t),o=!_.scrollboxSize()&&"absolute"===a.position,s=(o||i)&&"border-box"===A.css(t,"boxSizing",!1,a),l=i?te(t,e,i,s,a):0;return s&&o&&(l-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(a[e])-te(t,e,"border",!1,a)-.5)),l&&(r=it.exec(n))&&"px"!==(r[3]||"px")&&(t.style[e]=n,n=A.css(t,e)),Xt(0,n,l)}}})),A.cssHooks.marginLeft=Wt(_.reliableMarginLeft,(function(t,e){if(e)return(parseFloat($t(t,"marginLeft"))||t.getBoundingClientRect().left-Ft(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),A.each({margin:"",padding:"",border:"Width"},(function(t,e){A.cssHooks[t+e]={expand:function(n){for(var i=0,r={},a="string"==typeof n?n.split(" "):[n];i<4;i++)r[t+rt[i]+e]=a[i]||a[i-2]||a[0];return r}},"margin"!==t&&(A.cssHooks[t+e].set=Xt)})),A.fn.extend({css:function(t,e){return W(this,(function(t,e,n){var i,r,a={},o=0;if(Array.isArray(e)){for(i=Bt(t),r=e.length;o1)}}),A.Tween=ne,ne.prototype={constructor:ne,init:function(t,e,n,i,r,a){this.elem=t,this.prop=n,this.easing=r||A.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=a||(A.cssNumber[n]?"":"px")},cur:function(){var t=ne.propHooks[this.prop];return t&&t.get?t.get(this):ne.propHooks._default.get(this)},run:function(t){var e,n=ne.propHooks[this.prop];return this.options.duration?this.pos=e=A.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):ne.propHooks._default.set(this),this}},ne.prototype.init.prototype=ne.prototype,ne.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=A.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){A.fx.step[t.prop]?A.fx.step[t.prop](t):1!==t.elem.nodeType||!A.cssHooks[t.prop]&&null==t.elem.style[Zt(t.prop)]?t.elem[t.prop]=t.now:A.style(t.elem,t.prop,t.now+t.unit)}}},ne.propHooks.scrollTop=ne.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},A.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},A.fx=ne.prototype.init,A.fx.step={};var ie,re,ae=/^(?:toggle|show|hide)$/,oe=/queueHooks$/;function se(){re&&(!1===y.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(se):n.setTimeout(se,A.fx.interval),A.fx.tick())}function le(){return n.setTimeout((function(){ie=void 0})),ie=Date.now()}function ue(t,e){var n,i=0,r={height:t};for(e=e?1:0;i<4;i+=2-e)r["margin"+(n=rt[i])]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function ce(t,e,n){for(var i,r=(de.tweeners[e]||[]).concat(de.tweeners["*"]),a=0,o=r.length;a1)},removeAttr:function(t){return this.each((function(){A.removeAttr(this,t)}))}}),A.extend({attr:function(t,e,n){var i,r,a=t.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===t.getAttribute?A.prop(t,e,n):(1===a&&A.isXMLDoc(t)||(r=A.attrHooks[e.toLowerCase()]||(A.expr.match.bool.test(e)?he:void 0)),void 0!==n?null===n?void A.removeAttr(t,e):r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:(t.setAttribute(e,n+""),n):r&&"get"in r&&null!==(i=r.get(t,e))?i:null==(i=A.find.attr(t,e))?void 0:i)},attrHooks:{type:{set:function(t,e){if(!_.radioValue&&"radio"===e&&S(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,r=e&&e.match(H);if(r&&1===t.nodeType)for(;n=r[i++];)t.removeAttribute(n)}}),he={set:function(t,e,n){return!1===e?A.removeAttr(t,n):t.setAttribute(n,n),n}},A.each(A.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=fe[e]||A.find.attr;fe[e]=function(t,e,i){var r,a,o=e.toLowerCase();return i||(a=fe[o],fe[o]=r,r=null!=n(t,e,i)?o:null,fe[o]=a),r}}));var pe=/^(?:input|select|textarea|button)$/i,me=/^(?:a|area)$/i;function _e(t){return(t.match(H)||[]).join(" ")}function ge(t){return t.getAttribute&&t.getAttribute("class")||""}function ve(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(H)||[]}A.fn.extend({prop:function(t,e){return W(this,A.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[A.propFix[t]||t]}))}}),A.extend({prop:function(t,e,n){var i,r,a=t.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&A.isXMLDoc(t)||(e=A.propFix[e]||e,r=A.propHooks[e]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:t[e]=n:r&&"get"in r&&null!==(i=r.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=A.find.attr(t,"tabindex");return e?parseInt(e,10):pe.test(t.nodeName)||me.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),_.optSelected||(A.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)}}),A.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){A.propFix[this.toLowerCase()]=this})),A.fn.extend({addClass:function(t){var e,n,i,r,a,o,s,l=0;if(g(t))return this.each((function(e){A(this).addClass(t.call(this,e,ge(this)))}));if((e=ve(t)).length)for(;n=this[l++];)if(r=ge(n),i=1===n.nodeType&&" "+_e(r)+" "){for(o=0;a=e[o++];)i.indexOf(" "+a+" ")<0&&(i+=a+" ");r!==(s=_e(i))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,i,r,a,o,s,l=0;if(g(t))return this.each((function(e){A(this).removeClass(t.call(this,e,ge(this)))}));if(!arguments.length)return this.attr("class","");if((e=ve(t)).length)for(;n=this[l++];)if(r=ge(n),i=1===n.nodeType&&" "+_e(r)+" "){for(o=0;a=e[o++];)for(;i.indexOf(" "+a+" ")>-1;)i=i.replace(" "+a+" "," ");r!==(s=_e(i))&&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):g(t)?this.each((function(n){A(this).toggleClass(t.call(this,n,ge(this),e),e)})):this.each((function(){var e,r,a,o;if(i)for(r=0,a=A(this),o=ve(t);e=o[r++];)a.hasClass(e)?a.removeClass(e):a.addClass(e);else void 0!==t&&"boolean"!==n||((e=ge(this))&&Q.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Q.get(this,"__className__")||""))}))},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+_e(ge(n))+" ").indexOf(e)>-1)return!0;return!1}});var ye=/\r/g;A.fn.extend({val:function(t){var e,n,i,r=this[0];return arguments.length?(i=g(t),this.each((function(n){var r;1===this.nodeType&&(null==(r=i?t.call(this,n,A(this).val()):t)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=A.map(r,(function(t){return null==t?"":t+""}))),(e=A.valHooks[this.type]||A.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))}))):r?(e=A.valHooks[r.type]||A.valHooks[r.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(ye,""):null==n?"":n:void 0}}),A.extend({valHooks:{option:{get:function(t){var e=A.find.attr(t,"value");return null!=e?e:_e(A.text(t))}},select:{get:function(t){var e,n,i,r=t.options,a=t.selectedIndex,o="select-one"===t.type,s=o?null:[],l=o?a+1:r.length;for(i=a<0?l:o?a:0;i-1)&&(n=!0);return n||(t.selectedIndex=-1),a}}}}),A.each(["radio","checkbox"],(function(){A.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=A.inArray(A(t).val(),e)>-1}},_.checkOn||(A.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),_.focusin="onfocusin"in n;var be=/^(?:focusinfocus|focusoutblur)$/,we=function(t){t.stopPropagation()};A.extend(A.event,{trigger:function(t,e,i,r){var a,o,s,l,u,c,d,h,p=[i||y],m=f.call(t,"type")?t.type:t,_=f.call(t,"namespace")?t.namespace.split("."):[];if(o=h=s=i=i||y,3!==i.nodeType&&8!==i.nodeType&&!be.test(m+A.event.triggered)&&(m.indexOf(".")>-1&&(_=m.split("."),m=_.shift(),_.sort()),u=m.indexOf(":")<0&&"on"+m,(t=t[A.expando]?t:new A.Event(m,"object"==typeof t&&t)).isTrigger=r?2:3,t.namespace=_.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+_.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),e=null==e?[t]:A.makeArray(e,[t]),d=A.event.special[m]||{},r||!d.trigger||!1!==d.trigger.apply(i,e))){if(!r&&!d.noBubble&&!v(i)){for(l=d.delegateType||m,be.test(l+m)||(o=o.parentNode);o;o=o.parentNode)p.push(o),s=o;s===(i.ownerDocument||y)&&p.push(s.defaultView||s.parentWindow||n)}for(a=0;(o=p[a++])&&!t.isPropagationStopped();)h=o,t.type=a>1?l:d.bindType||m,(c=(Q.get(o,"events")||Object.create(null))[t.type]&&Q.get(o,"handle"))&&c.apply(o,e),(c=u&&o[u])&&c.apply&&G(o)&&(t.result=c.apply(o,e),!1===t.result&&t.preventDefault());return t.type=m,r||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(p.pop(),e)||!G(i)||u&&g(i[m])&&!v(i)&&((s=i[u])&&(i[u]=null),A.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,we),i[m](),t.isPropagationStopped()&&h.removeEventListener(m,we),A.event.triggered=void 0,s&&(i[u]=s)),t.result}},simulate:function(t,e,n){var i=A.extend(new A.Event,n,{type:t,isSimulated:!0});A.event.trigger(i,null,e)}}),A.fn.extend({trigger:function(t,e){return this.each((function(){A.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return A.event.trigger(t,e,n,!0)}}),_.focusin||A.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){A.event.simulate(e,t.target,A.event.fix(t))};A.event.special[e]={setup:function(){var i=this.ownerDocument||this.document||this,r=Q.access(i,e);r||i.addEventListener(t,n,!0),Q.access(i,e,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,r=Q.access(i,e)-1;r?Q.access(i,e,r):(i.removeEventListener(t,n,!0),Q.remove(i,e))}}}));var xe=n.location,Ae={guid:Date.now()},ke=/\?/;A.parseXML=function(t){var e,i;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){}return i=e&&e.getElementsByTagName("parsererror")[0],e&&!i||A.error("Invalid XML: "+(i?A.map(i.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var Me=/\[\]$/,Le=/\r?\n/g,Te=/^(?:submit|button|image|reset|file)$/i,De=/^(?:input|select|textarea|keygen)/i;function Se(t,e,n,i){var r;if(Array.isArray(e))A.each(e,(function(e,r){n||Me.test(t)?i(t,r):Se(t+"["+("object"==typeof r&&null!=r?e:"")+"]",r,n,i)}));else if(n||"object"!==x(e))i(t,e);else for(r in e)Se(t+"["+r+"]",e[r],n,i)}A.param=function(t,e){var n,i=[],r=function(t,e){var n=g(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!A.isPlainObject(t))A.each(t,(function(){r(this.name,this.value)}));else for(n in t)Se(n,t[n],e,r);return i.join("&")},A.fn.extend({serialize:function(){return A.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=A.prop(this,"elements");return t?A.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!A(this).is(":disabled")&&De.test(this.nodeName)&&!Te.test(t)&&(this.checked||!mt.test(t))})).map((function(t,e){var n=A(this).val();return null==n?null:Array.isArray(n)?A.map(n,(function(t){return{name:e.name,value:t.replace(Le,"\r\n")}})):{name:e.name,value:n.replace(Le,"\r\n")}})).get()}});var Ce=/%20/g,Ye=/#.*$/,Ee=/([?&])_=[^&]*/,Oe=/^(.*?):[ \t]*([^\r\n]*)$/gm,je=/^(?:GET|HEAD)$/,Pe=/^\/\//,Ie={},He={},Ne="*/".concat("*"),ze=y.createElement("a");function Be(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,r=0,a=e.toLowerCase().match(H)||[];if(g(n))for(;i=a[r++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function Fe(t,e,n,i){var r={},a=t===He;function o(s){var l;return r[s]=!0,A.each(t[s]||[],(function(t,s){var u=s(e,n,i);return"string"!=typeof u||a||r[u]?a?!(l=u):void 0:(e.dataTypes.unshift(u),o(u),!1)})),l}return o(e.dataTypes[0])||!r["*"]&&o("*")}function Re(t,e){var n,i,r=A.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((r[n]?t:i||(i={}))[n]=e[n]);return i&&A.extend(!0,t,i),t}ze.href=xe.href,A.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:xe.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(xe.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ne,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":A.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Re(Re(t,A.ajaxSettings),e):Re(A.ajaxSettings,t)},ajaxPrefilter:Be(Ie),ajaxTransport:Be(He),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,r,a,o,s,l,u,c,d,h,f=A.ajaxSetup({},e),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?A(p):A.event,_=A.Deferred(),g=A.Callbacks("once memory"),v=f.statusCode||{},b={},w={},x="canceled",k={readyState:0,getResponseHeader:function(t){var e;if(u){if(!o)for(o={};e=Oe.exec(a);)o[e[1].toLowerCase()+" "]=(o[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=o[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return u?a:null},setRequestHeader:function(t,e){return null==u&&(t=w[t.toLowerCase()]=w[t.toLowerCase()]||t,b[t]=e),this},overrideMimeType:function(t){return null==u&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(u)k.always(t[k.status]);else for(e in t)v[e]=[v[e],t[e]];return this},abort:function(t){var e=t||x;return i&&i.abort(e),M(0,e),this}};if(_.promise(k),f.url=((t||f.url||xe.href)+"").replace(Pe,xe.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(H)||[""],null==f.crossDomain){l=y.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=ze.protocol+"//"+ze.host!=l.protocol+"//"+l.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=A.param(f.data,f.traditional)),Fe(Ie,f,e,k),u)return k;for(d in(c=A.event&&f.global)&&0==A.active++&&A.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!je.test(f.type),r=f.url.replace(Ye,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Ce,"+")):(h=f.url.slice(r.length),f.data&&(f.processData||"string"==typeof f.data)&&(r+=(ke.test(r)?"&":"?")+f.data,delete f.data),!1===f.cache&&(r=r.replace(Ee,"$1"),h=(ke.test(r)?"&":"?")+"_="+Ae.guid+++h),f.url=r+h),f.ifModified&&(A.lastModified[r]&&k.setRequestHeader("If-Modified-Since",A.lastModified[r]),A.etag[r]&&k.setRequestHeader("If-None-Match",A.etag[r])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&k.setRequestHeader("Content-Type",f.contentType),k.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Ne+"; q=0.01":""):f.accepts["*"]),f.headers)k.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(p,k,f)||u))return k.abort();if(x="abort",g.add(f.complete),k.done(f.success),k.fail(f.error),i=Fe(He,f,e,k)){if(k.readyState=1,c&&m.trigger("ajaxSend",[k,f]),u)return k;f.async&&f.timeout>0&&(s=n.setTimeout((function(){k.abort("timeout")}),f.timeout));try{u=!1,i.send(b,M)}catch(t){if(u)throw t;M(-1,t)}}else M(-1,"No Transport");function M(t,e,o,l){var d,h,y,b,w,x=e;u||(u=!0,s&&n.clearTimeout(s),i=void 0,a=l||"",k.readyState=t>0?4:0,d=t>=200&&t<300||304===t,o&&(b=function(t,e,n){for(var i,r,a,o,s=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(r in s)if(s[r]&&s[r].test(i)){l.unshift(r);break}if(l[0]in n)a=l[0];else{for(r in n){if(!l[0]||t.converters[r+" "+l[0]]){a=r;break}o||(o=r)}a=a||o}if(a)return a!==l[0]&&l.unshift(a),n[a]}(f,k,o)),!d&&A.inArray("script",f.dataTypes)>-1&&A.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),b=function(t,e,n,i){var r,a,o,s,l,u={},c=t.dataTypes.slice();if(c[1])for(o in t.converters)u[o.toLowerCase()]=t.converters[o];for(a=c.shift();a;)if(t.responseFields[a]&&(n[t.responseFields[a]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=a,a=c.shift())if("*"===a)a=l;else if("*"!==l&&l!==a){if(!(o=u[l+" "+a]||u["* "+a]))for(r in u)if((s=r.split(" "))[1]===a&&(o=u[l+" "+s[0]]||u["* "+s[0]])){!0===o?o=u[r]:!0!==u[r]&&(a=s[0],c.unshift(s[1]));break}if(!0!==o)if(o&&t.throws)e=o(e);else try{e=o(e)}catch(t){return{state:"parsererror",error:o?t:"No conversion from "+l+" to "+a}}}return{state:"success",data:e}}(f,b,k,d),d?(f.ifModified&&((w=k.getResponseHeader("Last-Modified"))&&(A.lastModified[r]=w),(w=k.getResponseHeader("etag"))&&(A.etag[r]=w)),204===t||"HEAD"===f.type?x="nocontent":304===t?x="notmodified":(x=b.state,h=b.data,d=!(y=b.error))):(y=x,!t&&x||(x="error",t<0&&(t=0))),k.status=t,k.statusText=(e||x)+"",d?_.resolveWith(p,[h,x,k]):_.rejectWith(p,[k,x,y]),k.statusCode(v),v=void 0,c&&m.trigger(d?"ajaxSuccess":"ajaxError",[k,f,d?h:y]),g.fireWith(p,[k,x]),c&&(m.trigger("ajaxComplete",[k,f]),--A.active||A.event.trigger("ajaxStop")))}return k},getJSON:function(t,e,n){return A.get(t,e,n,"json")},getScript:function(t,e){return A.get(t,void 0,e,"script")}}),A.each(["get","post"],(function(t,e){A[e]=function(t,n,i,r){return g(n)&&(r=r||i,i=n,n=void 0),A.ajax(A.extend({url:t,type:e,dataType:r,data:n,success:i},A.isPlainObject(t)&&t))}})),A.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),A._evalUrl=function(t,e,n){return A.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){A.globalEval(t,e,n)}})},A.fn.extend({wrapAll:function(t){var e;return this[0]&&(g(t)&&(t=t.call(this[0])),e=A(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 g(t)?this.each((function(e){A(this).wrapInner(t.call(this,e))})):this.each((function(){var e=A(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=g(t);return this.each((function(n){A(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){A(this).replaceWith(this.childNodes)})),this}}),A.expr.pseudos.hidden=function(t){return!A.expr.pseudos.visible(t)},A.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},A.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var $e={0:200,1223:204},We=A.ajaxSettings.xhr();_.cors=!!We&&"withCredentials"in We,_.ajax=We=!!We,A.ajaxTransport((function(t){var e,i;if(_.cors||We&&!t.crossDomain)return{send:function(r,a){var o,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)s[o]=t.xhrFields[o];for(o in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)s.setRequestHeader(o,r[o]);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?a(0,"error"):a(s.status,s.statusText):a($e[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()}}})),A.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),A.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 A.globalEval(t),t}}}),A.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),A.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(i,r){e=A("\n\n\n","import { render, staticRenderFns } from \"./VueTypeaheadBootstrapListItem.vue?vue&type=template&id=6230cb76&scoped=true&\"\nimport script from \"./VueTypeaheadBootstrapListItem.vue?vue&type=script&lang=js&\"\nexport * from \"./VueTypeaheadBootstrapListItem.vue?vue&type=script&lang=js&\"\nimport style0 from \"./VueTypeaheadBootstrapListItem.vue?vue&type=style&index=0&id=6230cb76&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"6230cb76\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('a',{class:_vm.textClasses,attrs:{\"tabindex\":\"0\",\"href\":\"#\"},on:{\"keydown\":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"tab\",9,$event.key,\"Tab\")){ return null; }return _vm.$emit('listItemBlur')},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"esc\",27,$event.key,[\"Esc\",\"Escape\"])){ return null; }$event.stopPropagation();$event.preventDefault();return _vm.$emit('listItemBlur')},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"down\",40,$event.key,[\"Down\",\"ArrowDown\"])){ return null; }$event.preventDefault();},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"up\",38,$event.key,[\"Up\",\"ArrowUp\"])){ return null; }$event.preventDefault();}],\"keyup\":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"down\",40,$event.key,[\"Down\",\"ArrowDown\"])){ return null; }return _vm.$parent.selectNextListItem($event)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"up\",38,$event.key,[\"Up\",\"ArrowUp\"])){ return null; }return _vm.$parent.selectPreviousListItem($event)}],\"blur\":_vm.processFocusOut}},[_c('div',{staticClass:\"sr-only\"},[_vm._v(_vm._s(_vm.screenReaderText))]),_vm._v(\" \"),_c('div',{attrs:{\"aria-hidden\":\"true\"}},[_vm._t(\"suggestion\",[_c('span',{domProps:{\"innerHTML\":_vm._s(_vm.htmlText)}})],null,{ data: _vm.data, htmlText: _vm.htmlText })],2)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n \n \n \n \n \n \n
\n \n\n\n","import mod from \"-!../../../vue-loader/lib/index.js??vue-loader-options!./VueTypeaheadBootstrapList.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../vue-loader/lib/index.js??vue-loader-options!./VueTypeaheadBootstrapList.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./VueTypeaheadBootstrapList.vue?vue&type=template&id=e64f5270&\"\nimport script from \"./VueTypeaheadBootstrapList.vue?vue&type=script&lang=js&\"\nexport * from \"./VueTypeaheadBootstrapList.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:\"suggestionList\",staticClass:\"list-group shadow\"},_vm._l((_vm.matchedItems),function(item,id){return _c('vue-typeahead-bootstrap-list-item',_vm._g({key:id,attrs:{\"active\":_vm.isListItemActive(id),\"id\":(_vm.isListItemActive(id)) ? (\"selected-option-\" + _vm.vbtUniqueId) : false,\"data\":item.data,\"html-text\":_vm.highlight(item.text),\"role\":\"option\",\"aria-selected\":(_vm.isListItemActive(id)) ? 'true' : 'false',\"screen-reader-text\":item.text,\"disabled\":_vm.isDisabledItem(item),\"background-variant\":_vm.backgroundVariant,\"background-variant-resolver\":_vm.backgroundVariantResolver,\"text-variant\":_vm.textVariant},nativeOn:{\"click\":function($event){return _vm.handleHit(item, $event)}},scopedSlots:_vm._u([{key:\"suggestion\",fn:function(ref){\nvar data = ref.data;\nvar htmlText = ref.htmlText;\nreturn (_vm.$scopedSlots.suggestion)?[_vm._t(\"suggestion\",null,null,{ data: data, htmlText: htmlText })]:undefined}}],null,true)},_vm.$listeners))}),1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../vue-loader/lib/index.js??vue-loader-options!./VueTypeaheadBootstrap.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../vue-loader/lib/index.js??vue-loader-options!./VueTypeaheadBootstrap.vue?vue&type=script&lang=js&\"","\n 0) ? 'true' : 'false'\"\n >\n
\n
\n \n {{ prepend }} \n \n
\n
\n
\n \n {{ append }} \n \n
\n
\n
0\"\n :query=\"inputValue\"\n :data=\"formattedData\"\n :background-variant=\"backgroundVariant\"\n :background-variant-resolver=\"backgroundVariantResolver\"\n :text-variant=\"textVariant\"\n :maxMatches=\"maxMatches\"\n :minMatchingChars=\"minMatchingChars\"\n :disableSort=\"disableSort\"\n :showOnFocus=\"showOnFocus\"\n :showAllResults=\"showAllResults\"\n @hit=\"handleHit\"\n @listItemBlur=\"handleChildBlur\"\n :highlightClass='highlightClass'\n :disabledValues=\"disabledValues\"\n :vbtUniqueId=\"id\"\n role=\"listbox\"\n >\n \n \n \n \n \n \n
\n \n\n\n\n\n","import { render, staticRenderFns } from \"./VueTypeaheadBootstrap.vue?vue&type=template&id=dbe69e32&scoped=true&\"\nimport script from \"./VueTypeaheadBootstrap.vue?vue&type=script&lang=js&\"\nexport * from \"./VueTypeaheadBootstrap.vue?vue&type=script&lang=js&\"\nimport style0 from \"./VueTypeaheadBootstrap.vue?vue&type=style&index=0&id=dbe69e32&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"dbe69e32\",\n null\n \n)\n\nexport default component.exports","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/*!\n * vue-i18n v8.24.1 \n * (c) 2021 kazuya kawaguchi\n * Released under the MIT License.\n */\n/* */\n\n/**\n * constants\n */\n\nvar numberFormatKeys = [\n 'compactDisplay',\n 'currency',\n 'currencyDisplay',\n 'currencySign',\n 'localeMatcher',\n 'notation',\n 'numberingSystem',\n 'signDisplay',\n 'style',\n 'unit',\n 'unitDisplay',\n 'useGrouping',\n 'minimumIntegerDigits',\n 'minimumFractionDigits',\n 'maximumFractionDigits',\n 'minimumSignificantDigits',\n 'maximumSignificantDigits'\n];\n\n/**\n * utilities\n */\n\nfunction warn (msg, err) {\n if (typeof console !== 'undefined') {\n console.warn('[vue-i18n] ' + msg);\n /* istanbul ignore if */\n if (err) {\n console.warn(err.stack);\n }\n }\n}\n\nfunction error (msg, err) {\n if (typeof console !== 'undefined') {\n console.error('[vue-i18n] ' + msg);\n /* istanbul ignore if */\n if (err) {\n console.error(err.stack);\n }\n }\n}\n\nvar isArray = Array.isArray;\n\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\nfunction isBoolean (val) {\n return typeof val === 'boolean'\n}\n\nfunction isString (val) {\n return typeof val === 'string'\n}\n\nvar toString = Object.prototype.toString;\nvar OBJECT_STRING = '[object Object]';\nfunction isPlainObject (obj) {\n return toString.call(obj) === OBJECT_STRING\n}\n\nfunction isNull (val) {\n return val === null || val === undefined\n}\n\nfunction isFunction (val) {\n return typeof val === 'function'\n}\n\nfunction parseArgs () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var locale = null;\n var params = null;\n if (args.length === 1) {\n if (isObject(args[0]) || isArray(args[0])) {\n params = args[0];\n } else if (typeof args[0] === 'string') {\n locale = args[0];\n }\n } else if (args.length === 2) {\n if (typeof args[0] === 'string') {\n locale = args[0];\n }\n /* istanbul ignore if */\n if (isObject(args[1]) || isArray(args[1])) {\n params = args[1];\n }\n }\n\n return { locale: locale, params: params }\n}\n\nfunction looseClone (obj) {\n return JSON.parse(JSON.stringify(obj))\n}\n\nfunction remove (arr, item) {\n if (arr.length) {\n var index = arr.indexOf(item);\n if (index > -1) {\n return arr.splice(index, 1)\n }\n }\n}\n\nfunction includes (arr, item) {\n return !!~arr.indexOf(item)\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n return hasOwnProperty.call(obj, key)\n}\n\nfunction merge (target) {\n var arguments$1 = arguments;\n\n var output = Object(target);\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments$1[i];\n if (source !== undefined && source !== null) {\n var key = (void 0);\n for (key in source) {\n if (hasOwn(source, key)) {\n if (isObject(source[key])) {\n output[key] = merge(output[key], source[key]);\n } else {\n output[key] = source[key];\n }\n }\n }\n }\n }\n return output\n}\n\nfunction looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = isArray(a);\n var isArrayB = isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}\n\n/**\n * Sanitizes html special characters from input strings. For mitigating risk of XSS attacks.\n * @param rawText The raw input from the user that should be escaped.\n */\nfunction escapeHtml(rawText) {\n return rawText\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n}\n\n/**\n * Escapes html tags and special symbols from all provided params which were returned from parseArgs().params.\n * This method performs an in-place operation on the params object.\n *\n * @param {any} params Parameters as provided from `parseArgs().params`.\n * May be either an array of strings or a string->any map.\n *\n * @returns The manipulated `params` object.\n */\nfunction escapeParams(params) {\n if(params != null) {\n Object.keys(params).forEach(function (key) {\n if(typeof(params[key]) == 'string') {\n params[key] = escapeHtml(params[key]);\n }\n });\n }\n return params\n}\n\n/* */\n\nfunction extend (Vue) {\n if (!Vue.prototype.hasOwnProperty('$i18n')) {\n // $FlowFixMe\n Object.defineProperty(Vue.prototype, '$i18n', {\n get: function get () { return this._i18n }\n });\n }\n\n Vue.prototype.$t = function (key) {\n var values = [], len = arguments.length - 1;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];\n\n var i18n = this.$i18n;\n return i18n._t.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this ].concat( values ))\n };\n\n Vue.prototype.$tc = function (key, choice) {\n var values = [], len = arguments.length - 2;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];\n\n var i18n = this.$i18n;\n return i18n._tc.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this, choice ].concat( values ))\n };\n\n Vue.prototype.$te = function (key, locale) {\n var i18n = this.$i18n;\n return i18n._te(key, i18n.locale, i18n._getMessages(), locale)\n };\n\n Vue.prototype.$d = function (value) {\n var ref;\n\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n return (ref = this.$i18n).d.apply(ref, [ value ].concat( args ))\n };\n\n Vue.prototype.$n = function (value) {\n var ref;\n\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n return (ref = this.$i18n).n.apply(ref, [ value ].concat( args ))\n };\n}\n\n/* */\n\nvar mixin = {\n beforeCreate: function beforeCreate () {\n var options = this.$options;\n options.i18n = options.i18n || (options.__i18n ? {} : null);\n\n if (options.i18n) {\n if (options.i18n instanceof VueI18n) {\n // init locale messages via custom blocks\n if (options.__i18n) {\n try {\n var localeMessages = options.i18n && options.i18n.messages ? options.i18n.messages : {};\n options.__i18n.forEach(function (resource) {\n localeMessages = merge(localeMessages, JSON.parse(resource));\n });\n Object.keys(localeMessages).forEach(function (locale) {\n options.i18n.mergeLocaleMessage(locale, localeMessages[locale]);\n });\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n error(\"Cannot parse locale messages via custom blocks.\", e);\n }\n }\n }\n this._i18n = options.i18n;\n this._i18nWatcher = this._i18n.watchI18nData();\n } else if (isPlainObject(options.i18n)) {\n var rootI18n = this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n\n ? this.$root.$i18n\n : null;\n // component local i18n\n if (rootI18n) {\n options.i18n.root = this.$root;\n options.i18n.formatter = rootI18n.formatter;\n options.i18n.fallbackLocale = rootI18n.fallbackLocale;\n options.i18n.formatFallbackMessages = rootI18n.formatFallbackMessages;\n options.i18n.silentTranslationWarn = rootI18n.silentTranslationWarn;\n options.i18n.silentFallbackWarn = rootI18n.silentFallbackWarn;\n options.i18n.pluralizationRules = rootI18n.pluralizationRules;\n options.i18n.preserveDirectiveContent = rootI18n.preserveDirectiveContent;\n }\n\n // init locale messages via custom blocks\n if (options.__i18n) {\n try {\n var localeMessages$1 = options.i18n && options.i18n.messages ? options.i18n.messages : {};\n options.__i18n.forEach(function (resource) {\n localeMessages$1 = merge(localeMessages$1, JSON.parse(resource));\n });\n options.i18n.messages = localeMessages$1;\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot parse locale messages via custom blocks.\", e);\n }\n }\n }\n\n var ref = options.i18n;\n var sharedMessages = ref.sharedMessages;\n if (sharedMessages && isPlainObject(sharedMessages)) {\n options.i18n.messages = merge(options.i18n.messages, sharedMessages);\n }\n\n this._i18n = new VueI18n(options.i18n);\n this._i18nWatcher = this._i18n.watchI18nData();\n\n if (options.i18n.sync === undefined || !!options.i18n.sync) {\n this._localeWatcher = this.$i18n.watchLocale();\n }\n\n if (rootI18n) {\n rootI18n.onComponentInstanceCreated(this._i18n);\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot be interpreted 'i18n' option.\");\n }\n }\n } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {\n // root i18n\n this._i18n = this.$root.$i18n;\n } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {\n // parent i18n\n this._i18n = options.parent.$i18n;\n }\n },\n\n beforeMount: function beforeMount () {\n var options = this.$options;\n options.i18n = options.i18n || (options.__i18n ? {} : null);\n\n if (options.i18n) {\n if (options.i18n instanceof VueI18n) {\n // init locale messages via custom blocks\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else if (isPlainObject(options.i18n)) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot be interpreted 'i18n' option.\");\n }\n }\n } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n }\n },\n\n mounted: function mounted () {\n if (this !== this.$root && this.$options.__INTLIFY_META__ && this.$el) {\n this.$el.setAttribute('data-intlify', this.$options.__INTLIFY_META__);\n }\n },\n\n beforeDestroy: function beforeDestroy () {\n if (!this._i18n) { return }\n\n var self = this;\n this.$nextTick(function () {\n if (self._subscribing) {\n self._i18n.unsubscribeDataChanging(self);\n delete self._subscribing;\n }\n\n if (self._i18nWatcher) {\n self._i18nWatcher();\n self._i18n.destroyVM();\n delete self._i18nWatcher;\n }\n\n if (self._localeWatcher) {\n self._localeWatcher();\n delete self._localeWatcher;\n }\n });\n }\n};\n\n/* */\n\nvar interpolationComponent = {\n name: 'i18n',\n functional: true,\n props: {\n tag: {\n type: [String, Boolean, Object],\n default: 'span'\n },\n path: {\n type: String,\n required: true\n },\n locale: {\n type: String\n },\n places: {\n type: [Array, Object]\n }\n },\n render: function render (h, ref) {\n var data = ref.data;\n var parent = ref.parent;\n var props = ref.props;\n var slots = ref.slots;\n\n var $i18n = parent.$i18n;\n if (!$i18n) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot find VueI18n instance!');\n }\n return\n }\n\n var path = props.path;\n var locale = props.locale;\n var places = props.places;\n var params = slots();\n var children = $i18n.i(\n path,\n locale,\n onlyHasDefaultPlace(params) || places\n ? useLegacyPlaces(params.default, places)\n : params\n );\n\n var tag = (!!props.tag && props.tag !== true) || props.tag === false ? props.tag : 'span';\n return tag ? h(tag, data, children) : children\n }\n};\n\nfunction onlyHasDefaultPlace (params) {\n var prop;\n for (prop in params) {\n if (prop !== 'default') { return false }\n }\n return Boolean(prop)\n}\n\nfunction useLegacyPlaces (children, places) {\n var params = places ? createParamsFromPlaces(places) : {};\n\n if (!children) { return params }\n\n // Filter empty text nodes\n children = children.filter(function (child) {\n return child.tag || child.text.trim() !== ''\n });\n\n var everyPlace = children.every(vnodeHasPlaceAttribute);\n if (process.env.NODE_ENV !== 'production' && everyPlace) {\n warn('`place` attribute is deprecated in next major version. Please switch to Vue slots.');\n }\n\n return children.reduce(\n everyPlace ? assignChildPlace : assignChildIndex,\n params\n )\n}\n\nfunction createParamsFromPlaces (places) {\n if (process.env.NODE_ENV !== 'production') {\n warn('`places` prop is deprecated in next major version. Please switch to Vue slots.');\n }\n\n return Array.isArray(places)\n ? places.reduce(assignChildIndex, {})\n : Object.assign({}, places)\n}\n\nfunction assignChildPlace (params, child) {\n if (child.data && child.data.attrs && child.data.attrs.place) {\n params[child.data.attrs.place] = child;\n }\n return params\n}\n\nfunction assignChildIndex (params, child, index) {\n params[index] = child;\n return params\n}\n\nfunction vnodeHasPlaceAttribute (vnode) {\n return Boolean(vnode.data && vnode.data.attrs && vnode.data.attrs.place)\n}\n\n/* */\n\nvar numberComponent = {\n name: 'i18n-n',\n functional: true,\n props: {\n tag: {\n type: [String, Boolean, Object],\n default: 'span'\n },\n value: {\n type: Number,\n required: true\n },\n format: {\n type: [String, Object]\n },\n locale: {\n type: String\n }\n },\n render: function render (h, ref) {\n var props = ref.props;\n var parent = ref.parent;\n var data = ref.data;\n\n var i18n = parent.$i18n;\n\n if (!i18n) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot find VueI18n instance!');\n }\n return null\n }\n\n var key = null;\n var options = null;\n\n if (isString(props.format)) {\n key = props.format;\n } else if (isObject(props.format)) {\n if (props.format.key) {\n key = props.format.key;\n }\n\n // Filter out number format options only\n options = Object.keys(props.format).reduce(function (acc, prop) {\n var obj;\n\n if (includes(numberFormatKeys, prop)) {\n return Object.assign({}, acc, ( obj = {}, obj[prop] = props.format[prop], obj ))\n }\n return acc\n }, null);\n }\n\n var locale = props.locale || i18n.locale;\n var parts = i18n._ntp(props.value, locale, key, options);\n\n var values = parts.map(function (part, index) {\n var obj;\n\n var slot = data.scopedSlots && data.scopedSlots[part.type];\n return slot ? slot(( obj = {}, obj[part.type] = part.value, obj.index = index, obj.parts = parts, obj )) : part.value\n });\n\n var tag = (!!props.tag && props.tag !== true) || props.tag === false ? props.tag : 'span';\n return tag\n ? h(tag, {\n attrs: data.attrs,\n 'class': data['class'],\n staticClass: data.staticClass\n }, values)\n : values\n }\n};\n\n/* */\n\nfunction bind (el, binding, vnode) {\n if (!assert(el, vnode)) { return }\n\n t(el, binding, vnode);\n}\n\nfunction update (el, binding, vnode, oldVNode) {\n if (!assert(el, vnode)) { return }\n\n var i18n = vnode.context.$i18n;\n if (localeEqual(el, vnode) &&\n (looseEqual(binding.value, binding.oldValue) &&\n looseEqual(el._localeMessage, i18n.getLocaleMessage(i18n.locale)))) { return }\n\n t(el, binding, vnode);\n}\n\nfunction unbind (el, binding, vnode, oldVNode) {\n var vm = vnode.context;\n if (!vm) {\n warn('Vue instance does not exists in VNode context');\n return\n }\n\n var i18n = vnode.context.$i18n || {};\n if (!binding.modifiers.preserve && !i18n.preserveDirectiveContent) {\n el.textContent = '';\n }\n el._vt = undefined;\n delete el['_vt'];\n el._locale = undefined;\n delete el['_locale'];\n el._localeMessage = undefined;\n delete el['_localeMessage'];\n}\n\nfunction assert (el, vnode) {\n var vm = vnode.context;\n if (!vm) {\n warn('Vue instance does not exists in VNode context');\n return false\n }\n\n if (!vm.$i18n) {\n warn('VueI18n instance does not exists in Vue instance');\n return false\n }\n\n return true\n}\n\nfunction localeEqual (el, vnode) {\n var vm = vnode.context;\n return el._locale === vm.$i18n.locale\n}\n\nfunction t (el, binding, vnode) {\n var ref$1, ref$2;\n\n var value = binding.value;\n\n var ref = parseValue(value);\n var path = ref.path;\n var locale = ref.locale;\n var args = ref.args;\n var choice = ref.choice;\n if (!path && !locale && !args) {\n warn('value type not supported');\n return\n }\n\n if (!path) {\n warn('`path` is required in v-t directive');\n return\n }\n\n var vm = vnode.context;\n if (choice != null) {\n el._vt = el.textContent = (ref$1 = vm.$i18n).tc.apply(ref$1, [ path, choice ].concat( makeParams(locale, args) ));\n } else {\n el._vt = el.textContent = (ref$2 = vm.$i18n).t.apply(ref$2, [ path ].concat( makeParams(locale, args) ));\n }\n el._locale = vm.$i18n.locale;\n el._localeMessage = vm.$i18n.getLocaleMessage(vm.$i18n.locale);\n}\n\nfunction parseValue (value) {\n var path;\n var locale;\n var args;\n var choice;\n\n if (isString(value)) {\n path = value;\n } else if (isPlainObject(value)) {\n path = value.path;\n locale = value.locale;\n args = value.args;\n choice = value.choice;\n }\n\n return { path: path, locale: locale, args: args, choice: choice }\n}\n\nfunction makeParams (locale, args) {\n var params = [];\n\n locale && params.push(locale);\n if (args && (Array.isArray(args) || isPlainObject(args))) {\n params.push(args);\n }\n\n return params\n}\n\nvar Vue;\n\nfunction install (_Vue) {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && install.installed && _Vue === Vue) {\n warn('already installed.');\n return\n }\n install.installed = true;\n\n Vue = _Vue;\n\n var version = (Vue.version && Number(Vue.version.split('.')[0])) || -1;\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && version < 2) {\n warn((\"vue-i18n (\" + (install.version) + \") need to use Vue 2.0 or later (Vue: \" + (Vue.version) + \").\"));\n return\n }\n\n extend(Vue);\n Vue.mixin(mixin);\n Vue.directive('t', { bind: bind, update: update, unbind: unbind });\n Vue.component(interpolationComponent.name, interpolationComponent);\n Vue.component(numberComponent.name, numberComponent);\n\n // use simple mergeStrategies to prevent i18n instance lose '__proto__'\n var strats = Vue.config.optionMergeStrategies;\n strats.i18n = function (parentVal, childVal) {\n return childVal === undefined\n ? parentVal\n : childVal\n };\n}\n\n/* */\n\nvar BaseFormatter = function BaseFormatter () {\n this._caches = Object.create(null);\n};\n\nBaseFormatter.prototype.interpolate = function interpolate (message, values) {\n if (!values) {\n return [message]\n }\n var tokens = this._caches[message];\n if (!tokens) {\n tokens = parse(message);\n this._caches[message] = tokens;\n }\n return compile(tokens, values)\n};\n\n\n\nvar RE_TOKEN_LIST_VALUE = /^(?:\\d)+/;\nvar RE_TOKEN_NAMED_VALUE = /^(?:\\w)+/;\n\nfunction parse (format) {\n var tokens = [];\n var position = 0;\n\n var text = '';\n while (position < format.length) {\n var char = format[position++];\n if (char === '{') {\n if (text) {\n tokens.push({ type: 'text', value: text });\n }\n\n text = '';\n var sub = '';\n char = format[position++];\n while (char !== undefined && char !== '}') {\n sub += char;\n char = format[position++];\n }\n var isClosed = char === '}';\n\n var type = RE_TOKEN_LIST_VALUE.test(sub)\n ? 'list'\n : isClosed && RE_TOKEN_NAMED_VALUE.test(sub)\n ? 'named'\n : 'unknown';\n tokens.push({ value: sub, type: type });\n } else if (char === '%') {\n // when found rails i18n syntax, skip text capture\n if (format[(position)] !== '{') {\n text += char;\n }\n } else {\n text += char;\n }\n }\n\n text && tokens.push({ type: 'text', value: text });\n\n return tokens\n}\n\nfunction compile (tokens, values) {\n var compiled = [];\n var index = 0;\n\n var mode = Array.isArray(values)\n ? 'list'\n : isObject(values)\n ? 'named'\n : 'unknown';\n if (mode === 'unknown') { return compiled }\n\n while (index < tokens.length) {\n var token = tokens[index];\n switch (token.type) {\n case 'text':\n compiled.push(token.value);\n break\n case 'list':\n compiled.push(values[parseInt(token.value, 10)]);\n break\n case 'named':\n if (mode === 'named') {\n compiled.push((values)[token.value]);\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Type of token '\" + (token.type) + \"' and format of value '\" + mode + \"' don't match!\"));\n }\n }\n break\n case 'unknown':\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Detect 'unknown' type of token!\");\n }\n break\n }\n index++;\n }\n\n return compiled\n}\n\n/* */\n\n/**\n * Path parser\n * - Inspired:\n * Vue.js Path parser\n */\n\n// actions\nvar APPEND = 0;\nvar PUSH = 1;\nvar INC_SUB_PATH_DEPTH = 2;\nvar PUSH_SUB_PATH = 3;\n\n// states\nvar BEFORE_PATH = 0;\nvar IN_PATH = 1;\nvar BEFORE_IDENT = 2;\nvar IN_IDENT = 3;\nvar IN_SUB_PATH = 4;\nvar IN_SINGLE_QUOTE = 5;\nvar IN_DOUBLE_QUOTE = 6;\nvar AFTER_PATH = 7;\nvar ERROR = 8;\n\nvar pathStateMachine = [];\n\npathStateMachine[BEFORE_PATH] = {\n 'ws': [BEFORE_PATH],\n 'ident': [IN_IDENT, APPEND],\n '[': [IN_SUB_PATH],\n 'eof': [AFTER_PATH]\n};\n\npathStateMachine[IN_PATH] = {\n 'ws': [IN_PATH],\n '.': [BEFORE_IDENT],\n '[': [IN_SUB_PATH],\n 'eof': [AFTER_PATH]\n};\n\npathStateMachine[BEFORE_IDENT] = {\n 'ws': [BEFORE_IDENT],\n 'ident': [IN_IDENT, APPEND],\n '0': [IN_IDENT, APPEND],\n 'number': [IN_IDENT, APPEND]\n};\n\npathStateMachine[IN_IDENT] = {\n 'ident': [IN_IDENT, APPEND],\n '0': [IN_IDENT, APPEND],\n 'number': [IN_IDENT, APPEND],\n 'ws': [IN_PATH, PUSH],\n '.': [BEFORE_IDENT, PUSH],\n '[': [IN_SUB_PATH, PUSH],\n 'eof': [AFTER_PATH, PUSH]\n};\n\npathStateMachine[IN_SUB_PATH] = {\n \"'\": [IN_SINGLE_QUOTE, APPEND],\n '\"': [IN_DOUBLE_QUOTE, APPEND],\n '[': [IN_SUB_PATH, INC_SUB_PATH_DEPTH],\n ']': [IN_PATH, PUSH_SUB_PATH],\n 'eof': ERROR,\n 'else': [IN_SUB_PATH, APPEND]\n};\n\npathStateMachine[IN_SINGLE_QUOTE] = {\n \"'\": [IN_SUB_PATH, APPEND],\n 'eof': ERROR,\n 'else': [IN_SINGLE_QUOTE, APPEND]\n};\n\npathStateMachine[IN_DOUBLE_QUOTE] = {\n '\"': [IN_SUB_PATH, APPEND],\n 'eof': ERROR,\n 'else': [IN_DOUBLE_QUOTE, APPEND]\n};\n\n/**\n * Check if an expression is a literal value.\n */\n\nvar literalValueRE = /^\\s?(?:true|false|-?[\\d.]+|'[^']*'|\"[^\"]*\")\\s?$/;\nfunction isLiteral (exp) {\n return literalValueRE.test(exp)\n}\n\n/**\n * Strip quotes from a string\n */\n\nfunction stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}\n\n/**\n * Determine the type of a character in a keypath.\n */\n\nfunction getPathCharType (ch) {\n if (ch === undefined || ch === null) { return 'eof' }\n\n var code = ch.charCodeAt(0);\n\n switch (code) {\n case 0x5B: // [\n case 0x5D: // ]\n case 0x2E: // .\n case 0x22: // \"\n case 0x27: // '\n return ch\n\n case 0x5F: // _\n case 0x24: // $\n case 0x2D: // -\n return 'ident'\n\n case 0x09: // Tab\n case 0x0A: // Newline\n case 0x0D: // Return\n case 0xA0: // No-break space\n case 0xFEFF: // Byte Order Mark\n case 0x2028: // Line Separator\n case 0x2029: // Paragraph Separator\n return 'ws'\n }\n\n return 'ident'\n}\n\n/**\n * Format a subPath, return its plain form if it is\n * a literal string or number. Otherwise prepend the\n * dynamic indicator (*).\n */\n\nfunction formatSubPath (path) {\n var trimmed = path.trim();\n // invalid leading 0\n if (path.charAt(0) === '0' && isNaN(path)) { return false }\n\n return isLiteral(trimmed) ? stripQuotes(trimmed) : '*' + trimmed\n}\n\n/**\n * Parse a string path into an array of segments\n */\n\nfunction parse$1 (path) {\n var keys = [];\n var index = -1;\n var mode = BEFORE_PATH;\n var subPathDepth = 0;\n var c;\n var key;\n var newChar;\n var type;\n var transition;\n var action;\n var typeMap;\n var actions = [];\n\n actions[PUSH] = function () {\n if (key !== undefined) {\n keys.push(key);\n key = undefined;\n }\n };\n\n actions[APPEND] = function () {\n if (key === undefined) {\n key = newChar;\n } else {\n key += newChar;\n }\n };\n\n actions[INC_SUB_PATH_DEPTH] = function () {\n actions[APPEND]();\n subPathDepth++;\n };\n\n actions[PUSH_SUB_PATH] = function () {\n if (subPathDepth > 0) {\n subPathDepth--;\n mode = IN_SUB_PATH;\n actions[APPEND]();\n } else {\n subPathDepth = 0;\n if (key === undefined) { return false }\n key = formatSubPath(key);\n if (key === false) {\n return false\n } else {\n actions[PUSH]();\n }\n }\n };\n\n function maybeUnescapeQuote () {\n var nextChar = path[index + 1];\n if ((mode === IN_SINGLE_QUOTE && nextChar === \"'\") ||\n (mode === IN_DOUBLE_QUOTE && nextChar === '\"')) {\n index++;\n newChar = '\\\\' + nextChar;\n actions[APPEND]();\n return true\n }\n }\n\n while (mode !== null) {\n index++;\n c = path[index];\n\n if (c === '\\\\' && maybeUnescapeQuote()) {\n continue\n }\n\n type = getPathCharType(c);\n typeMap = pathStateMachine[mode];\n transition = typeMap[type] || typeMap['else'] || ERROR;\n\n if (transition === ERROR) {\n return // parse error\n }\n\n mode = transition[0];\n action = actions[transition[1]];\n if (action) {\n newChar = transition[2];\n newChar = newChar === undefined\n ? c\n : newChar;\n if (action() === false) {\n return\n }\n }\n\n if (mode === AFTER_PATH) {\n return keys\n }\n }\n}\n\n\n\n\n\nvar I18nPath = function I18nPath () {\n this._cache = Object.create(null);\n};\n\n/**\n * External parse that check for a cache hit first\n */\nI18nPath.prototype.parsePath = function parsePath (path) {\n var hit = this._cache[path];\n if (!hit) {\n hit = parse$1(path);\n if (hit) {\n this._cache[path] = hit;\n }\n }\n return hit || []\n};\n\n/**\n * Get path value from path string\n */\nI18nPath.prototype.getPathValue = function getPathValue (obj, path) {\n if (!isObject(obj)) { return null }\n\n var paths = this.parsePath(path);\n if (paths.length === 0) {\n return null\n } else {\n var length = paths.length;\n var last = obj;\n var i = 0;\n while (i < length) {\n var value = last[paths[i]];\n if (value === undefined || value === null) {\n return null\n }\n last = value;\n i++;\n }\n\n return last\n }\n};\n\n/* */\n\n\n\nvar htmlTagMatcher = /<\\/?[\\w\\s=\"/.':;#-\\/]+>/;\nvar linkKeyMatcher = /(?:@(?:\\.[a-z]+)?:(?:[\\w\\-_|.]+|\\([\\w\\-_|.]+\\)))/g;\nvar linkKeyPrefixMatcher = /^@(?:\\.([a-z]+))?:/;\nvar bracketsMatcher = /[()]/g;\nvar defaultModifiers = {\n 'upper': function (str) { return str.toLocaleUpperCase(); },\n 'lower': function (str) { return str.toLocaleLowerCase(); },\n 'capitalize': function (str) { return (\"\" + (str.charAt(0).toLocaleUpperCase()) + (str.substr(1))); }\n};\n\nvar defaultFormatter = new BaseFormatter();\n\nvar VueI18n = function VueI18n (options) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n // Auto install if it is not done yet and `window` has `Vue`.\n // To allow users to avoid auto-installation in some cases,\n // this code should be placed here. See #290\n /* istanbul ignore if */\n if (!Vue && typeof window !== 'undefined' && window.Vue) {\n install(window.Vue);\n }\n\n var locale = options.locale || 'en-US';\n var fallbackLocale = options.fallbackLocale === false\n ? false\n : options.fallbackLocale || 'en-US';\n var messages = options.messages || {};\n var dateTimeFormats = options.dateTimeFormats || {};\n var numberFormats = options.numberFormats || {};\n\n this._vm = null;\n this._formatter = options.formatter || defaultFormatter;\n this._modifiers = options.modifiers || {};\n this._missing = options.missing || null;\n this._root = options.root || null;\n this._sync = options.sync === undefined ? true : !!options.sync;\n this._fallbackRoot = options.fallbackRoot === undefined\n ? true\n : !!options.fallbackRoot;\n this._formatFallbackMessages = options.formatFallbackMessages === undefined\n ? false\n : !!options.formatFallbackMessages;\n this._silentTranslationWarn = options.silentTranslationWarn === undefined\n ? false\n : options.silentTranslationWarn;\n this._silentFallbackWarn = options.silentFallbackWarn === undefined\n ? false\n : !!options.silentFallbackWarn;\n this._dateTimeFormatters = {};\n this._numberFormatters = {};\n this._path = new I18nPath();\n this._dataListeners = [];\n this._componentInstanceCreatedListener = options.componentInstanceCreatedListener || null;\n this._preserveDirectiveContent = options.preserveDirectiveContent === undefined\n ? false\n : !!options.preserveDirectiveContent;\n this.pluralizationRules = options.pluralizationRules || {};\n this._warnHtmlInMessage = options.warnHtmlInMessage || 'off';\n this._postTranslation = options.postTranslation || null;\n this._escapeParameterHtml = options.escapeParameterHtml || false;\n\n /**\n * @param choice {number} a choice index given by the input to $tc: `$tc('path.to.rule', choiceIndex)`\n * @param choicesLength {number} an overall amount of available choices\n * @returns a final choice index\n */\n this.getChoiceIndex = function (choice, choicesLength) {\n var thisPrototype = Object.getPrototypeOf(this$1);\n if (thisPrototype && thisPrototype.getChoiceIndex) {\n var prototypeGetChoiceIndex = (thisPrototype.getChoiceIndex);\n return (prototypeGetChoiceIndex).call(this$1, choice, choicesLength)\n }\n\n // Default (old) getChoiceIndex implementation - english-compatible\n var defaultImpl = function (_choice, _choicesLength) {\n _choice = Math.abs(_choice);\n\n if (_choicesLength === 2) {\n return _choice\n ? _choice > 1\n ? 1\n : 0\n : 1\n }\n\n return _choice ? Math.min(_choice, 2) : 0\n };\n\n if (this$1.locale in this$1.pluralizationRules) {\n return this$1.pluralizationRules[this$1.locale].apply(this$1, [choice, choicesLength])\n } else {\n return defaultImpl(choice, choicesLength)\n }\n };\n\n\n this._exist = function (message, key) {\n if (!message || !key) { return false }\n if (!isNull(this$1._path.getPathValue(message, key))) { return true }\n // fallback for flat key\n if (message[key]) { return true }\n return false\n };\n\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n Object.keys(messages).forEach(function (locale) {\n this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);\n });\n }\n\n this._initVM({\n locale: locale,\n fallbackLocale: fallbackLocale,\n messages: messages,\n dateTimeFormats: dateTimeFormats,\n numberFormats: numberFormats\n });\n};\n\nvar prototypeAccessors = { vm: { configurable: true },messages: { configurable: true },dateTimeFormats: { configurable: true },numberFormats: { configurable: true },availableLocales: { configurable: true },locale: { configurable: true },fallbackLocale: { configurable: true },formatFallbackMessages: { configurable: true },missing: { configurable: true },formatter: { configurable: true },silentTranslationWarn: { configurable: true },silentFallbackWarn: { configurable: true },preserveDirectiveContent: { configurable: true },warnHtmlInMessage: { configurable: true },postTranslation: { configurable: true } };\n\nVueI18n.prototype._checkLocaleMessage = function _checkLocaleMessage (locale, level, message) {\n var paths = [];\n\n var fn = function (level, locale, message, paths) {\n if (isPlainObject(message)) {\n Object.keys(message).forEach(function (key) {\n var val = message[key];\n if (isPlainObject(val)) {\n paths.push(key);\n paths.push('.');\n fn(level, locale, val, paths);\n paths.pop();\n paths.pop();\n } else {\n paths.push(key);\n fn(level, locale, val, paths);\n paths.pop();\n }\n });\n } else if (isArray(message)) {\n message.forEach(function (item, index) {\n if (isPlainObject(item)) {\n paths.push((\"[\" + index + \"]\"));\n paths.push('.');\n fn(level, locale, item, paths);\n paths.pop();\n paths.pop();\n } else {\n paths.push((\"[\" + index + \"]\"));\n fn(level, locale, item, paths);\n paths.pop();\n }\n });\n } else if (isString(message)) {\n var ret = htmlTagMatcher.test(message);\n if (ret) {\n var msg = \"Detected HTML in message '\" + message + \"' of keypath '\" + (paths.join('')) + \"' at '\" + locale + \"'. Consider component interpolation with '' to avoid XSS. See https://bit.ly/2ZqJzkp\";\n if (level === 'warn') {\n warn(msg);\n } else if (level === 'error') {\n error(msg);\n }\n }\n }\n };\n\n fn(level, locale, message, paths);\n};\n\nVueI18n.prototype._initVM = function _initVM (data) {\n var silent = Vue.config.silent;\n Vue.config.silent = true;\n this._vm = new Vue({ data: data });\n Vue.config.silent = silent;\n};\n\nVueI18n.prototype.destroyVM = function destroyVM () {\n this._vm.$destroy();\n};\n\nVueI18n.prototype.subscribeDataChanging = function subscribeDataChanging (vm) {\n this._dataListeners.push(vm);\n};\n\nVueI18n.prototype.unsubscribeDataChanging = function unsubscribeDataChanging (vm) {\n remove(this._dataListeners, vm);\n};\n\nVueI18n.prototype.watchI18nData = function watchI18nData () {\n var self = this;\n return this._vm.$watch('$data', function () {\n var i = self._dataListeners.length;\n while (i--) {\n Vue.nextTick(function () {\n self._dataListeners[i] && self._dataListeners[i].$forceUpdate();\n });\n }\n }, { deep: true })\n};\n\nVueI18n.prototype.watchLocale = function watchLocale () {\n /* istanbul ignore if */\n if (!this._sync || !this._root) { return null }\n var target = this._vm;\n return this._root.$i18n.vm.$watch('locale', function (val) {\n target.$set(target, 'locale', val);\n target.$forceUpdate();\n }, { immediate: true })\n};\n\nVueI18n.prototype.onComponentInstanceCreated = function onComponentInstanceCreated (newI18n) {\n if (this._componentInstanceCreatedListener) {\n this._componentInstanceCreatedListener(newI18n, this);\n }\n};\n\nprototypeAccessors.vm.get = function () { return this._vm };\n\nprototypeAccessors.messages.get = function () { return looseClone(this._getMessages()) };\nprototypeAccessors.dateTimeFormats.get = function () { return looseClone(this._getDateTimeFormats()) };\nprototypeAccessors.numberFormats.get = function () { return looseClone(this._getNumberFormats()) };\nprototypeAccessors.availableLocales.get = function () { return Object.keys(this.messages).sort() };\n\nprototypeAccessors.locale.get = function () { return this._vm.locale };\nprototypeAccessors.locale.set = function (locale) {\n this._vm.$set(this._vm, 'locale', locale);\n};\n\nprototypeAccessors.fallbackLocale.get = function () { return this._vm.fallbackLocale };\nprototypeAccessors.fallbackLocale.set = function (locale) {\n this._localeChainCache = {};\n this._vm.$set(this._vm, 'fallbackLocale', locale);\n};\n\nprototypeAccessors.formatFallbackMessages.get = function () { return this._formatFallbackMessages };\nprototypeAccessors.formatFallbackMessages.set = function (fallback) { this._formatFallbackMessages = fallback; };\n\nprototypeAccessors.missing.get = function () { return this._missing };\nprototypeAccessors.missing.set = function (handler) { this._missing = handler; };\n\nprototypeAccessors.formatter.get = function () { return this._formatter };\nprototypeAccessors.formatter.set = function (formatter) { this._formatter = formatter; };\n\nprototypeAccessors.silentTranslationWarn.get = function () { return this._silentTranslationWarn };\nprototypeAccessors.silentTranslationWarn.set = function (silent) { this._silentTranslationWarn = silent; };\n\nprototypeAccessors.silentFallbackWarn.get = function () { return this._silentFallbackWarn };\nprototypeAccessors.silentFallbackWarn.set = function (silent) { this._silentFallbackWarn = silent; };\n\nprototypeAccessors.preserveDirectiveContent.get = function () { return this._preserveDirectiveContent };\nprototypeAccessors.preserveDirectiveContent.set = function (preserve) { this._preserveDirectiveContent = preserve; };\n\nprototypeAccessors.warnHtmlInMessage.get = function () { return this._warnHtmlInMessage };\nprototypeAccessors.warnHtmlInMessage.set = function (level) {\n var this$1 = this;\n\n var orgLevel = this._warnHtmlInMessage;\n this._warnHtmlInMessage = level;\n if (orgLevel !== level && (level === 'warn' || level === 'error')) {\n var messages = this._getMessages();\n Object.keys(messages).forEach(function (locale) {\n this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);\n });\n }\n};\n\nprototypeAccessors.postTranslation.get = function () { return this._postTranslation };\nprototypeAccessors.postTranslation.set = function (handler) { this._postTranslation = handler; };\n\nVueI18n.prototype._getMessages = function _getMessages () { return this._vm.messages };\nVueI18n.prototype._getDateTimeFormats = function _getDateTimeFormats () { return this._vm.dateTimeFormats };\nVueI18n.prototype._getNumberFormats = function _getNumberFormats () { return this._vm.numberFormats };\n\nVueI18n.prototype._warnDefault = function _warnDefault (locale, key, result, vm, values, interpolateMode) {\n if (!isNull(result)) { return result }\n if (this._missing) {\n var missingRet = this._missing.apply(null, [locale, key, vm, values]);\n if (isString(missingRet)) {\n return missingRet\n }\n } else {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn(\n \"Cannot translate the value of keypath '\" + key + \"'. \" +\n 'Use the value of keypath as default.'\n );\n }\n }\n\n if (this._formatFallbackMessages) {\n var parsedArgs = parseArgs.apply(void 0, values);\n return this._render(key, interpolateMode, parsedArgs.params, key)\n } else {\n return key\n }\n};\n\nVueI18n.prototype._isFallbackRoot = function _isFallbackRoot (val) {\n return !val && !isNull(this._root) && this._fallbackRoot\n};\n\nVueI18n.prototype._isSilentFallbackWarn = function _isSilentFallbackWarn (key) {\n return this._silentFallbackWarn instanceof RegExp\n ? this._silentFallbackWarn.test(key)\n : this._silentFallbackWarn\n};\n\nVueI18n.prototype._isSilentFallback = function _isSilentFallback (locale, key) {\n return this._isSilentFallbackWarn(key) && (this._isFallbackRoot() || locale !== this.fallbackLocale)\n};\n\nVueI18n.prototype._isSilentTranslationWarn = function _isSilentTranslationWarn (key) {\n return this._silentTranslationWarn instanceof RegExp\n ? this._silentTranslationWarn.test(key)\n : this._silentTranslationWarn\n};\n\nVueI18n.prototype._interpolate = function _interpolate (\n locale,\n message,\n key,\n host,\n interpolateMode,\n values,\n visitedLinkStack\n) {\n if (!message) { return null }\n\n var pathRet = this._path.getPathValue(message, key);\n if (isArray(pathRet) || isPlainObject(pathRet)) { return pathRet }\n\n var ret;\n if (isNull(pathRet)) {\n /* istanbul ignore else */\n if (isPlainObject(message)) {\n ret = message[key];\n if (!(isString(ret) || isFunction(ret))) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallback(locale, key)) {\n warn((\"Value of key '\" + key + \"' is not a string or function !\"));\n }\n return null\n }\n } else {\n return null\n }\n } else {\n /* istanbul ignore else */\n if (isString(pathRet) || isFunction(pathRet)) {\n ret = pathRet;\n } else {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallback(locale, key)) {\n warn((\"Value of key '\" + key + \"' is not a string or function!\"));\n }\n return null\n }\n }\n\n // Check for the existence of links within the translated string\n if (isString(ret) && (ret.indexOf('@:') >= 0 || ret.indexOf('@.') >= 0)) {\n ret = this._link(locale, message, ret, host, 'raw', values, visitedLinkStack);\n }\n\n return this._render(ret, interpolateMode, values, key)\n};\n\nVueI18n.prototype._link = function _link (\n locale,\n message,\n str,\n host,\n interpolateMode,\n values,\n visitedLinkStack\n) {\n var ret = str;\n\n // Match all the links within the local\n // We are going to replace each of\n // them with its translation\n var matches = ret.match(linkKeyMatcher);\n for (var idx in matches) {\n // ie compatible: filter custom array\n // prototype method\n if (!matches.hasOwnProperty(idx)) {\n continue\n }\n var link = matches[idx];\n var linkKeyPrefixMatches = link.match(linkKeyPrefixMatcher);\n var linkPrefix = linkKeyPrefixMatches[0];\n var formatterName = linkKeyPrefixMatches[1];\n\n // Remove the leading @:, @.case: and the brackets\n var linkPlaceholder = link.replace(linkPrefix, '').replace(bracketsMatcher, '');\n\n if (includes(visitedLinkStack, linkPlaceholder)) {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Circular reference found. \\\"\" + link + \"\\\" is already visited in the chain of \" + (visitedLinkStack.reverse().join(' <- '))));\n }\n return ret\n }\n visitedLinkStack.push(linkPlaceholder);\n\n // Translate the link\n var translated = this._interpolate(\n locale, message, linkPlaceholder, host,\n interpolateMode === 'raw' ? 'string' : interpolateMode,\n interpolateMode === 'raw' ? undefined : values,\n visitedLinkStack\n );\n\n if (this._isFallbackRoot(translated)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(linkPlaceholder)) {\n warn((\"Fall back to translate the link placeholder '\" + linkPlaceholder + \"' with root locale.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n var root = this._root.$i18n;\n translated = root._translate(\n root._getMessages(), root.locale, root.fallbackLocale,\n linkPlaceholder, host, interpolateMode, values\n );\n }\n translated = this._warnDefault(\n locale, linkPlaceholder, translated, host,\n isArray(values) ? values : [values],\n interpolateMode\n );\n\n if (this._modifiers.hasOwnProperty(formatterName)) {\n translated = this._modifiers[formatterName](translated);\n } else if (defaultModifiers.hasOwnProperty(formatterName)) {\n translated = defaultModifiers[formatterName](translated);\n }\n\n visitedLinkStack.pop();\n\n // Replace the link with the translated\n ret = !translated ? ret : ret.replace(link, translated);\n }\n\n return ret\n};\n\nVueI18n.prototype._createMessageContext = function _createMessageContext (values) {\n var _list = isArray(values) ? values : [];\n var _named = isObject(values) ? values : {};\n var list = function (index) { return _list[index]; };\n var named = function (key) { return _named[key]; };\n return {\n list: list,\n named: named\n }\n};\n\nVueI18n.prototype._render = function _render (message, interpolateMode, values, path) {\n if (isFunction(message)) {\n return message(this._createMessageContext(values))\n }\n\n var ret = this._formatter.interpolate(message, values, path);\n\n // If the custom formatter refuses to work - apply the default one\n if (!ret) {\n ret = defaultFormatter.interpolate(message, values, path);\n }\n\n // if interpolateMode is **not** 'string' ('row'),\n // return the compiled data (e.g. ['foo', VNode, 'bar']) with formatter\n return interpolateMode === 'string' && !isString(ret) ? ret.join('') : ret\n};\n\nVueI18n.prototype._appendItemToChain = function _appendItemToChain (chain, item, blocks) {\n var follow = false;\n if (!includes(chain, item)) {\n follow = true;\n if (item) {\n follow = item[item.length - 1] !== '!';\n item = item.replace(/!/g, '');\n chain.push(item);\n if (blocks && blocks[item]) {\n follow = blocks[item];\n }\n }\n }\n return follow\n};\n\nVueI18n.prototype._appendLocaleToChain = function _appendLocaleToChain (chain, locale, blocks) {\n var follow;\n var tokens = locale.split('-');\n do {\n var item = tokens.join('-');\n follow = this._appendItemToChain(chain, item, blocks);\n tokens.splice(-1, 1);\n } while (tokens.length && (follow === true))\n return follow\n};\n\nVueI18n.prototype._appendBlockToChain = function _appendBlockToChain (chain, block, blocks) {\n var follow = true;\n for (var i = 0; (i < block.length) && (isBoolean(follow)); i++) {\n var locale = block[i];\n if (isString(locale)) {\n follow = this._appendLocaleToChain(chain, locale, blocks);\n }\n }\n return follow\n};\n\nVueI18n.prototype._getLocaleChain = function _getLocaleChain (start, fallbackLocale) {\n if (start === '') { return [] }\n\n if (!this._localeChainCache) {\n this._localeChainCache = {};\n }\n\n var chain = this._localeChainCache[start];\n if (!chain) {\n if (!fallbackLocale) {\n fallbackLocale = this.fallbackLocale;\n }\n chain = [];\n\n // first block defined by start\n var block = [start];\n\n // while any intervening block found\n while (isArray(block)) {\n block = this._appendBlockToChain(\n chain,\n block,\n fallbackLocale\n );\n }\n\n // last block defined by default\n var defaults;\n if (isArray(fallbackLocale)) {\n defaults = fallbackLocale;\n } else if (isObject(fallbackLocale)) {\n /* $FlowFixMe */\n if (fallbackLocale['default']) {\n defaults = fallbackLocale['default'];\n } else {\n defaults = null;\n }\n } else {\n defaults = fallbackLocale;\n }\n\n // convert defaults to array\n if (isString(defaults)) {\n block = [defaults];\n } else {\n block = defaults;\n }\n if (block) {\n this._appendBlockToChain(\n chain,\n block,\n null\n );\n }\n this._localeChainCache[start] = chain;\n }\n return chain\n};\n\nVueI18n.prototype._translate = function _translate (\n messages,\n locale,\n fallback,\n key,\n host,\n interpolateMode,\n args\n) {\n var chain = this._getLocaleChain(locale, fallback);\n var res;\n for (var i = 0; i < chain.length; i++) {\n var step = chain[i];\n res =\n this._interpolate(step, messages[step], key, host, interpolateMode, args, [key]);\n if (!isNull(res)) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to translate the keypath '\" + key + \"' with '\" + step + \"' locale.\"));\n }\n return res\n }\n }\n return null\n};\n\nVueI18n.prototype._t = function _t (key, _locale, messages, host) {\n var ref;\n\n var values = [], len = arguments.length - 4;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 4 ];\n if (!key) { return '' }\n\n var parsedArgs = parseArgs.apply(void 0, values);\n if(this._escapeParameterHtml) {\n parsedArgs.params = escapeParams(parsedArgs.params);\n }\n\n var locale = parsedArgs.locale || _locale;\n\n var ret = this._translate(\n messages, locale, this.fallbackLocale, key,\n host, 'string', parsedArgs.params\n );\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to translate the keypath '\" + key + \"' with root locale.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return (ref = this._root).$t.apply(ref, [ key ].concat( values ))\n } else {\n ret = this._warnDefault(locale, key, ret, host, values, 'string');\n if (this._postTranslation && ret !== null && ret !== undefined) {\n ret = this._postTranslation(ret, key);\n }\n return ret\n }\n};\n\nVueI18n.prototype.t = function t (key) {\n var ref;\n\n var values = [], len = arguments.length - 1;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];\n return (ref = this)._t.apply(ref, [ key, this.locale, this._getMessages(), null ].concat( values ))\n};\n\nVueI18n.prototype._i = function _i (key, locale, messages, host, values) {\n var ret =\n this._translate(messages, locale, this.fallbackLocale, key, host, 'raw', values);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn((\"Fall back to interpolate the keypath '\" + key + \"' with root locale.\"));\n }\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.i(key, locale, values)\n } else {\n return this._warnDefault(locale, key, ret, host, [values], 'raw')\n }\n};\n\nVueI18n.prototype.i = function i (key, locale, values) {\n /* istanbul ignore if */\n if (!key) { return '' }\n\n if (!isString(locale)) {\n locale = this.locale;\n }\n\n return this._i(key, locale, this._getMessages(), null, values)\n};\n\nVueI18n.prototype._tc = function _tc (\n key,\n _locale,\n messages,\n host,\n choice\n) {\n var ref;\n\n var values = [], len = arguments.length - 5;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 5 ];\n if (!key) { return '' }\n if (choice === undefined) {\n choice = 1;\n }\n\n var predefined = { 'count': choice, 'n': choice };\n var parsedArgs = parseArgs.apply(void 0, values);\n parsedArgs.params = Object.assign(predefined, parsedArgs.params);\n values = parsedArgs.locale === null ? [parsedArgs.params] : [parsedArgs.locale, parsedArgs.params];\n return this.fetchChoice((ref = this)._t.apply(ref, [ key, _locale, messages, host ].concat( values )), choice)\n};\n\nVueI18n.prototype.fetchChoice = function fetchChoice (message, choice) {\n /* istanbul ignore if */\n if (!message || !isString(message)) { return null }\n var choices = message.split('|');\n\n choice = this.getChoiceIndex(choice, choices.length);\n if (!choices[choice]) { return message }\n return choices[choice].trim()\n};\n\nVueI18n.prototype.tc = function tc (key, choice) {\n var ref;\n\n var values = [], len = arguments.length - 2;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];\n return (ref = this)._tc.apply(ref, [ key, this.locale, this._getMessages(), null, choice ].concat( values ))\n};\n\nVueI18n.prototype._te = function _te (key, locale, messages) {\n var args = [], len = arguments.length - 3;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 3 ];\n\n var _locale = parseArgs.apply(void 0, args).locale || locale;\n return this._exist(messages[_locale], key)\n};\n\nVueI18n.prototype.te = function te (key, locale) {\n return this._te(key, this.locale, this._getMessages(), locale)\n};\n\nVueI18n.prototype.getLocaleMessage = function getLocaleMessage (locale) {\n return looseClone(this._vm.messages[locale] || {})\n};\n\nVueI18n.prototype.setLocaleMessage = function setLocaleMessage (locale, message) {\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);\n }\n this._vm.$set(this._vm.messages, locale, message);\n};\n\nVueI18n.prototype.mergeLocaleMessage = function mergeLocaleMessage (locale, message) {\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);\n }\n this._vm.$set(this._vm.messages, locale, merge(\n typeof this._vm.messages[locale] !== 'undefined' && Object.keys(this._vm.messages[locale]).length\n ? this._vm.messages[locale]\n : {},\n message\n ));\n};\n\nVueI18n.prototype.getDateTimeFormat = function getDateTimeFormat (locale) {\n return looseClone(this._vm.dateTimeFormats[locale] || {})\n};\n\nVueI18n.prototype.setDateTimeFormat = function setDateTimeFormat (locale, format) {\n this._vm.$set(this._vm.dateTimeFormats, locale, format);\n this._clearDateTimeFormat(locale, format);\n};\n\nVueI18n.prototype.mergeDateTimeFormat = function mergeDateTimeFormat (locale, format) {\n this._vm.$set(this._vm.dateTimeFormats, locale, merge(this._vm.dateTimeFormats[locale] || {}, format));\n this._clearDateTimeFormat(locale, format);\n};\n\nVueI18n.prototype._clearDateTimeFormat = function _clearDateTimeFormat (locale, format) {\n for (var key in format) {\n var id = locale + \"__\" + key;\n\n if (!this._dateTimeFormatters.hasOwnProperty(id)) {\n continue\n }\n\n delete this._dateTimeFormatters[id];\n }\n};\n\nVueI18n.prototype._localizeDateTime = function _localizeDateTime (\n value,\n locale,\n fallback,\n dateTimeFormats,\n key\n) {\n var _locale = locale;\n var formats = dateTimeFormats[_locale];\n\n var chain = this._getLocaleChain(locale, fallback);\n for (var i = 0; i < chain.length; i++) {\n var current = _locale;\n var step = chain[i];\n formats = dateTimeFormats[step];\n _locale = step;\n // fallback locale\n if (isNull(formats) || isNull(formats[key])) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to '\" + step + \"' datetime formats from '\" + current + \"' datetime formats.\"));\n }\n } else {\n break\n }\n }\n\n if (isNull(formats) || isNull(formats[key])) {\n return null\n } else {\n var format = formats[key];\n var id = _locale + \"__\" + key;\n var formatter = this._dateTimeFormatters[id];\n if (!formatter) {\n formatter = this._dateTimeFormatters[id] = new Intl.DateTimeFormat(_locale, format);\n }\n return formatter.format(value)\n }\n};\n\nVueI18n.prototype._d = function _d (value, locale, key) {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && !VueI18n.availabilities.dateTimeFormat) {\n warn('Cannot format a Date value due to not supported Intl.DateTimeFormat.');\n return ''\n }\n\n if (!key) {\n return new Intl.DateTimeFormat(locale).format(value)\n }\n\n var ret =\n this._localizeDateTime(value, locale, this.fallbackLocale, this._getDateTimeFormats(), key);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to datetime localization of root: key '\" + key + \"'.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.d(value, key, locale)\n } else {\n return ret || ''\n }\n};\n\nVueI18n.prototype.d = function d (value) {\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n var locale = this.locale;\n var key = null;\n\n if (args.length === 1) {\n if (isString(args[0])) {\n key = args[0];\n } else if (isObject(args[0])) {\n if (args[0].locale) {\n locale = args[0].locale;\n }\n if (args[0].key) {\n key = args[0].key;\n }\n }\n } else if (args.length === 2) {\n if (isString(args[0])) {\n key = args[0];\n }\n if (isString(args[1])) {\n locale = args[1];\n }\n }\n\n return this._d(value, locale, key)\n};\n\nVueI18n.prototype.getNumberFormat = function getNumberFormat (locale) {\n return looseClone(this._vm.numberFormats[locale] || {})\n};\n\nVueI18n.prototype.setNumberFormat = function setNumberFormat (locale, format) {\n this._vm.$set(this._vm.numberFormats, locale, format);\n this._clearNumberFormat(locale, format);\n};\n\nVueI18n.prototype.mergeNumberFormat = function mergeNumberFormat (locale, format) {\n this._vm.$set(this._vm.numberFormats, locale, merge(this._vm.numberFormats[locale] || {}, format));\n this._clearNumberFormat(locale, format);\n};\n\nVueI18n.prototype._clearNumberFormat = function _clearNumberFormat (locale, format) {\n for (var key in format) {\n var id = locale + \"__\" + key;\n\n if (!this._numberFormatters.hasOwnProperty(id)) {\n continue\n }\n\n delete this._numberFormatters[id];\n }\n};\n\nVueI18n.prototype._getNumberFormatter = function _getNumberFormatter (\n value,\n locale,\n fallback,\n numberFormats,\n key,\n options\n) {\n var _locale = locale;\n var formats = numberFormats[_locale];\n\n var chain = this._getLocaleChain(locale, fallback);\n for (var i = 0; i < chain.length; i++) {\n var current = _locale;\n var step = chain[i];\n formats = numberFormats[step];\n _locale = step;\n // fallback locale\n if (isNull(formats) || isNull(formats[key])) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to '\" + step + \"' number formats from '\" + current + \"' number formats.\"));\n }\n } else {\n break\n }\n }\n\n if (isNull(formats) || isNull(formats[key])) {\n return null\n } else {\n var format = formats[key];\n\n var formatter;\n if (options) {\n // If options specified - create one time number formatter\n formatter = new Intl.NumberFormat(_locale, Object.assign({}, format, options));\n } else {\n var id = _locale + \"__\" + key;\n formatter = this._numberFormatters[id];\n if (!formatter) {\n formatter = this._numberFormatters[id] = new Intl.NumberFormat(_locale, format);\n }\n }\n return formatter\n }\n};\n\nVueI18n.prototype._n = function _n (value, locale, key, options) {\n /* istanbul ignore if */\n if (!VueI18n.availabilities.numberFormat) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot format a Number value due to not supported Intl.NumberFormat.');\n }\n return ''\n }\n\n if (!key) {\n var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);\n return nf.format(value)\n }\n\n var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);\n var ret = formatter && formatter.format(value);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to number localization of root: key '\" + key + \"'.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.n(value, Object.assign({}, { key: key, locale: locale }, options))\n } else {\n return ret || ''\n }\n};\n\nVueI18n.prototype.n = function n (value) {\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n var locale = this.locale;\n var key = null;\n var options = null;\n\n if (args.length === 1) {\n if (isString(args[0])) {\n key = args[0];\n } else if (isObject(args[0])) {\n if (args[0].locale) {\n locale = args[0].locale;\n }\n if (args[0].key) {\n key = args[0].key;\n }\n\n // Filter out number format options only\n options = Object.keys(args[0]).reduce(function (acc, key) {\n var obj;\n\n if (includes(numberFormatKeys, key)) {\n return Object.assign({}, acc, ( obj = {}, obj[key] = args[0][key], obj ))\n }\n return acc\n }, null);\n }\n } else if (args.length === 2) {\n if (isString(args[0])) {\n key = args[0];\n }\n if (isString(args[1])) {\n locale = args[1];\n }\n }\n\n return this._n(value, locale, key, options)\n};\n\nVueI18n.prototype._ntp = function _ntp (value, locale, key, options) {\n /* istanbul ignore if */\n if (!VueI18n.availabilities.numberFormat) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot format to parts a Number value due to not supported Intl.NumberFormat.');\n }\n return []\n }\n\n if (!key) {\n var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);\n return nf.formatToParts(value)\n }\n\n var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);\n var ret = formatter && formatter.formatToParts(value);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn((\"Fall back to format number to parts of root: key '\" + key + \"' .\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n._ntp(value, locale, key, options)\n } else {\n return ret || []\n }\n};\n\nObject.defineProperties( VueI18n.prototype, prototypeAccessors );\n\nvar availabilities;\n// $FlowFixMe\nObject.defineProperty(VueI18n, 'availabilities', {\n get: function get () {\n if (!availabilities) {\n var intlDefined = typeof Intl !== 'undefined';\n availabilities = {\n dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',\n numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'\n };\n }\n\n return availabilities\n }\n});\n\nVueI18n.install = install;\nVueI18n.version = '8.24.1';\n\nexport default VueI18n;\n","import Vue from 'vue';\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill\nfunction assign (target, varArgs) {\n var arguments$1 = arguments;\n\n if (target === null || target === undefined) {\n throw new TypeError('Cannot convert undefined or null to object')\n }\n var to = Object(target);\n for (var index = 1; index < arguments.length; index++) {\n var nextSource = arguments$1[index];\n if (nextSource !== null && nextSource !== undefined) {\n for (var nextKey in nextSource) {\n // Avoid bugs when hasOwnProperty is shadowed\n /* istanbul ignore else */\n if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n return to\n}\n\nfunction isExist (obj) {\n return typeof obj !== 'undefined' && obj !== null\n}\n\nfunction isFunction (obj) {\n return typeof obj === 'function'\n}\n\nfunction isNumber (obj) {\n return typeof obj === 'number'\n}\n\nfunction isString (obj) {\n return typeof obj === 'string'\n}\n\nfunction isBoolean (obj) {\n return typeof obj === 'boolean'\n}\n\nfunction isPromiseSupported () {\n return typeof window !== 'undefined' && isExist(window.Promise)\n}\n\nfunction hasOwnProperty (o, k) {\n return Object.prototype.hasOwnProperty.call(o, k)\n}\n\nvar script$h = {\n props: {\n value: Number,\n indicators: {\n type: Boolean,\n default: true\n },\n controls: {\n type: Boolean,\n default: true\n },\n interval: {\n type: Number,\n default: 5000\n },\n iconControlLeft: {\n type: String,\n default: 'glyphicon glyphicon-chevron-left'\n },\n iconControlRight: {\n type: String,\n default: 'glyphicon glyphicon-chevron-right'\n }\n },\n data: function data () {\n return {\n slides: [],\n activeIndex: 0, // Make v-model not required\n timeoutId: 0,\n intervalId: 0\n }\n },\n watch: {\n interval: function interval () {\n this.startInterval();\n },\n value: function value (index, oldValue) {\n this.run(index, oldValue);\n this.activeIndex = index;\n }\n },\n mounted: function mounted () {\n if (isExist(this.value)) {\n this.activeIndex = this.value;\n }\n if (this.slides.length > 0) {\n this.$select(this.activeIndex);\n }\n this.startInterval();\n },\n beforeDestroy: function beforeDestroy () {\n this.stopInterval();\n },\n methods: {\n run: function run (newIndex, oldIndex) {\n var this$1 = this;\n\n var currentActiveIndex = oldIndex || 0;\n var direction;\n if (newIndex > currentActiveIndex) {\n direction = ['next', 'left'];\n } else {\n direction = ['prev', 'right'];\n }\n this.slides[newIndex].slideClass[direction[0]] = true;\n this.$nextTick(function () {\n this$1.slides[newIndex].$el.offsetHeight;\n this$1.slides.forEach(function (slide, i) {\n if (i === currentActiveIndex) {\n slide.slideClass.active = true;\n slide.slideClass[direction[1]] = true;\n } else if (i === newIndex) {\n slide.slideClass[direction[1]] = true;\n }\n });\n this$1.timeoutId = setTimeout(function () {\n this$1.$select(newIndex);\n this$1.$emit('change', newIndex);\n this$1.timeoutId = 0;\n }, 600);\n });\n },\n startInterval: function startInterval () {\n var this$1 = this;\n\n this.stopInterval();\n if (this.interval > 0) {\n this.intervalId = setInterval(function () {\n this$1.next();\n }, this.interval);\n }\n },\n stopInterval: function stopInterval () {\n clearInterval(this.intervalId);\n this.intervalId = 0;\n },\n resetAllSlideClass: function resetAllSlideClass () {\n this.slides.forEach(function (slide) {\n slide.slideClass.active = false;\n slide.slideClass.left = false;\n slide.slideClass.right = false;\n slide.slideClass.next = false;\n slide.slideClass.prev = false;\n });\n },\n $select: function $select (index) {\n this.resetAllSlideClass();\n this.slides[index].slideClass.active = true;\n },\n select: function select (index) {\n if (this.timeoutId !== 0 || index === this.activeIndex) {\n return\n }\n if (isExist(this.value)) {\n this.$emit('input', index);\n } else {\n this.run(index, this.activeIndex);\n this.activeIndex = index;\n }\n },\n prev: function prev () {\n this.select(this.activeIndex === 0 ? this.slides.length - 1 : this.activeIndex - 1);\n },\n next: function next () {\n this.select(this.activeIndex === this.slides.length - 1 ? 0 : this.activeIndex + 1);\n }\n }\n};\n\nfunction normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {\r\n if (typeof shadowMode !== 'boolean') {\r\n createInjectorSSR = createInjector;\r\n createInjector = shadowMode;\r\n shadowMode = false;\r\n }\r\n // Vue.extend constructor export interop.\r\n var options = typeof script === 'function' ? script.options : script;\r\n // render functions\r\n if (template && template.render) {\r\n options.render = template.render;\r\n options.staticRenderFns = template.staticRenderFns;\r\n options._compiled = true;\r\n // functional template\r\n if (isFunctionalTemplate) {\r\n options.functional = true;\r\n }\r\n }\r\n // scopedId\r\n if (scopeId) {\r\n options._scopeId = scopeId;\r\n }\r\n var hook;\r\n if (moduleIdentifier) {\r\n // server build\r\n hook = function (context) {\r\n // 2.3 injection\r\n context =\r\n context || // cached call\r\n (this.$vnode && this.$vnode.ssrContext) || // stateful\r\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional\r\n // 2.2 with runInNewContext: true\r\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\r\n context = __VUE_SSR_CONTEXT__;\r\n }\r\n // inject component styles\r\n if (style) {\r\n style.call(this, createInjectorSSR(context));\r\n }\r\n // register component module identifier for async chunk inference\r\n if (context && context._registeredComponents) {\r\n context._registeredComponents.add(moduleIdentifier);\r\n }\r\n };\r\n // used by ssr in case component is cached and beforeCreate\r\n // never gets called\r\n options._ssrRegister = hook;\r\n }\r\n else if (style) {\r\n hook = shadowMode\r\n ? function (context) {\r\n style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));\r\n }\r\n : function (context) {\r\n style.call(this, createInjector(context));\r\n };\r\n }\r\n if (hook) {\r\n if (options.functional) {\r\n // register for functional component in vue file\r\n var originalRender = options.render;\r\n options.render = function renderWithStyleInjection(h, context) {\r\n hook.call(context);\r\n return originalRender(h, context);\r\n };\r\n }\r\n else {\r\n // inject component registration as beforeCreate hook\r\n var existing = options.beforeCreate;\r\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook];\r\n }\r\n }\r\n return script;\r\n}\n\n/* script */\nvar __vue_script__$h = script$h;\n\n/* template */\nvar __vue_render__$h = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"div\",\n {\n staticClass: \"carousel slide\",\n attrs: { \"data-ride\": \"carousel\" },\n on: { mouseenter: _vm.stopInterval, mouseleave: _vm.startInterval }\n },\n [\n _vm.indicators\n ? _vm._t(\n \"indicators\",\n [\n _c(\n \"ol\",\n { staticClass: \"carousel-indicators\" },\n _vm._l(_vm.slides, function(slide, index) {\n return _c(\"li\", {\n class: { active: index === _vm.activeIndex },\n on: {\n click: function($event) {\n return _vm.select(index)\n }\n }\n })\n }),\n 0\n )\n ],\n { select: _vm.select, activeIndex: _vm.activeIndex }\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"div\",\n { staticClass: \"carousel-inner\", attrs: { role: \"listbox\" } },\n [_vm._t(\"default\")],\n 2\n ),\n _vm._v(\" \"),\n _vm.controls\n ? _c(\n \"a\",\n {\n staticClass: \"left carousel-control\",\n attrs: { href: \"#\", role: \"button\" },\n on: {\n click: function($event) {\n $event.preventDefault();\n return _vm.prev()\n }\n }\n },\n [\n _c(\"span\", {\n class: _vm.iconControlLeft,\n attrs: { \"aria-hidden\": \"true\" }\n }),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"sr-only\" }, [_vm._v(\"Previous\")])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.controls\n ? _c(\n \"a\",\n {\n staticClass: \"right carousel-control\",\n attrs: { href: \"#\", role: \"button\" },\n on: {\n click: function($event) {\n $event.preventDefault();\n return _vm.next()\n }\n }\n },\n [\n _c(\"span\", {\n class: _vm.iconControlRight,\n attrs: { \"aria-hidden\": \"true\" }\n }),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"sr-only\" }, [_vm._v(\"Next\")])\n ]\n )\n : _vm._e()\n ],\n 2\n )\n};\nvar __vue_staticRenderFns__$h = [];\n__vue_render__$h._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$h = undefined;\n /* scoped */\n var __vue_scope_id__$h = undefined;\n /* module identifier */\n var __vue_module_identifier__$h = undefined;\n /* functional template */\n var __vue_is_functional_template__$h = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$h = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$h, staticRenderFns: __vue_staticRenderFns__$h },\n __vue_inject_styles__$h,\n __vue_script__$h,\n __vue_scope_id__$h,\n __vue_is_functional_template__$h,\n __vue_module_identifier__$h,\n false,\n undefined,\n undefined,\n undefined\n );\n\nfunction spliceIfExist (arr, item) {\n if (Array.isArray(arr)) {\n var index = arr.indexOf(item);\n if (index >= 0) {\n arr.splice(index, 1);\n }\n }\n}\n\nfunction range (end, start, step) {\n if ( start === void 0 ) start = 0;\n if ( step === void 0 ) step = 1;\n\n var arr = [];\n for (var i = start; i < end; i += step) {\n arr.push(i);\n }\n return arr\n}\n\nfunction nodeListToArray (nodeList) {\n return Array.prototype.slice.call(nodeList || [])\n}\n\nfunction onlyUnique (value, index, self) {\n return self.indexOf(value) === index\n}\n\nvar script$g = {\n data: function data () {\n return {\n slideClass: {\n active: false,\n prev: false,\n next: false,\n left: false,\n right: false\n }\n }\n },\n created: function created () {\n try {\n this.$parent.slides.push(this);\n } catch (e) {\n throw new Error('Slide parent must be Carousel.')\n }\n },\n beforeDestroy: function beforeDestroy () {\n var slides = this.$parent && this.$parent.slides;\n spliceIfExist(slides, this);\n }\n};\n\n/* script */\nvar __vue_script__$g = script$g;\n\n/* template */\nvar __vue_render__$g = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"div\",\n { staticClass: \"item\", class: _vm.slideClass },\n [_vm._t(\"default\")],\n 2\n )\n};\nvar __vue_staticRenderFns__$g = [];\n__vue_render__$g._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$g = undefined;\n /* scoped */\n var __vue_scope_id__$g = undefined;\n /* module identifier */\n var __vue_module_identifier__$g = undefined;\n /* functional template */\n var __vue_is_functional_template__$g = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$g = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$g, staticRenderFns: __vue_staticRenderFns__$g },\n __vue_inject_styles__$g,\n __vue_script__$g,\n __vue_scope_id__$g,\n __vue_is_functional_template__$g,\n __vue_module_identifier__$g,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar EVENTS = {\n MOUSE_ENTER: 'mouseenter',\n MOUSE_LEAVE: 'mouseleave',\n MOUSE_DOWN: 'mousedown',\n MOUSE_UP: 'mouseup',\n FOCUS: 'focus',\n BLUR: 'blur',\n CLICK: 'click',\n INPUT: 'input',\n KEY_DOWN: 'keydown',\n KEY_UP: 'keyup',\n KEY_PRESS: 'keypress',\n RESIZE: 'resize',\n SCROLL: 'scroll',\n TOUCH_START: 'touchstart',\n TOUCH_END: 'touchend'\n};\n\nvar TRIGGERS = {\n CLICK: 'click',\n HOVER: 'hover',\n FOCUS: 'focus',\n HOVER_FOCUS: 'hover-focus',\n OUTSIDE_CLICK: 'outside-click',\n MANUAL: 'manual'\n};\n\nvar PLACEMENTS$1 = {\n TOP: 'top',\n RIGHT: 'right',\n BOTTOM: 'bottom',\n LEFT: 'left'\n};\n\nfunction isIE11 () {\n /* istanbul ignore next */\n return !!window.MSInputMethodContext && !!document.documentMode\n}\n\nfunction isIE10 () {\n return window.navigator.appVersion.indexOf('MSIE 10') !== -1\n}\n\nfunction getComputedStyle (el) {\n return window.getComputedStyle(el)\n}\n\nfunction getViewportSize () {\n /* istanbul ignore next */\n var width = Math.max(document.documentElement.clientWidth, window.innerWidth) || 0;\n /* istanbul ignore next */\n var height = Math.max(document.documentElement.clientHeight, window.innerHeight) || 0;\n return { width: width, height: height }\n}\n\nvar scrollbarWidth = null;\nvar savedScreenSize = null;\n\nfunction getScrollbarWidth (recalculate) {\n if ( recalculate === void 0 ) recalculate = false;\n\n var screenSize = getViewportSize();\n // return directly when already calculated & not force recalculate & screen size not changed\n if (scrollbarWidth !== null && !recalculate &&\n screenSize.height === savedScreenSize.height && screenSize.width === savedScreenSize.width) {\n return scrollbarWidth\n }\n /* istanbul ignore next */\n if (document.readyState === 'loading') {\n return null\n }\n var div1 = document.createElement('div');\n var div2 = document.createElement('div');\n div1.style.width = div2.style.width = div1.style.height = div2.style.height = '100px';\n div1.style.overflow = 'scroll';\n div2.style.overflow = 'hidden';\n document.body.appendChild(div1);\n document.body.appendChild(div2);\n scrollbarWidth = Math.abs(div1.scrollHeight - div2.scrollHeight);\n document.body.removeChild(div1);\n document.body.removeChild(div2);\n // save new screen size\n savedScreenSize = screenSize;\n return scrollbarWidth\n}\n\nfunction on (element, event, handler) {\n /* istanbul ignore next */\n element.addEventListener(event, handler);\n}\n\nfunction off (element, event, handler) {\n /* istanbul ignore next */\n element.removeEventListener(event, handler);\n}\n\nfunction isElement (el) {\n return el && el.nodeType === Node.ELEMENT_NODE\n}\n\nfunction removeFromDom (el) {\n isElement(el) && isElement(el.parentNode) && el.parentNode.removeChild(el);\n}\n\nfunction ensureElementMatchesFunction () {\n /* istanbul ignore next */\n if (!Element.prototype.matches) {\n Element.prototype.matches =\n Element.prototype.matchesSelector ||\n Element.prototype.mozMatchesSelector ||\n Element.prototype.msMatchesSelector ||\n Element.prototype.oMatchesSelector ||\n Element.prototype.webkitMatchesSelector ||\n function (s) {\n var matches = (this.document || this.ownerDocument).querySelectorAll(s);\n var i = matches.length;\n // eslint-disable-next-line no-empty\n while (--i >= 0 && matches.item(i) !== this) {}\n return i > -1\n };\n }\n}\n\nfunction addClass (el, className) {\n if (!isElement(el)) {\n return\n }\n if (el.className) {\n var classes = el.className.split(' ');\n if (classes.indexOf(className) < 0) {\n classes.push(className);\n el.className = classes.join(' ');\n }\n } else {\n el.className = className;\n }\n}\n\nfunction removeClass (el, className) {\n if (!isElement(el)) {\n return\n }\n if (el.className) {\n var classes = el.className.split(' ');\n var newClasses = [];\n for (var i = 0, l = classes.length; i < l; i++) {\n if (classes[i] !== className) {\n newClasses.push(classes[i]);\n }\n }\n el.className = newClasses.join(' ');\n }\n}\n\nfunction hasClass (el, className) {\n if (!isElement(el)) {\n return false\n }\n var classes = el.className.split(' ');\n for (var i = 0, l = classes.length; i < l; i++) {\n if (classes[i] === className) {\n return true\n }\n }\n return false\n}\n\nfunction setDropdownPosition (dropdown, trigger, options) {\n if ( options === void 0 ) options = {};\n\n var doc = document.documentElement;\n var containerScrollLeft = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);\n var containerScrollTop = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);\n var rect = trigger.getBoundingClientRect();\n var dropdownRect = dropdown.getBoundingClientRect();\n dropdown.style.right = 'auto';\n dropdown.style.bottom = 'auto';\n if (options.menuRight) {\n dropdown.style.left = containerScrollLeft + rect.left + rect.width - dropdownRect.width + 'px';\n } else {\n dropdown.style.left = containerScrollLeft + rect.left + 'px';\n }\n if (options.dropup) {\n dropdown.style.top = containerScrollTop + rect.top - dropdownRect.height - 4 + 'px';\n } else {\n dropdown.style.top = containerScrollTop + rect.top + rect.height + 'px';\n }\n}\n\nfunction isAvailableAtPosition (trigger, popup, placement) {\n var triggerRect = trigger.getBoundingClientRect();\n var popupRect = popup.getBoundingClientRect();\n var viewPortSize = getViewportSize();\n var top = true;\n var right = true;\n var bottom = true;\n var left = true;\n switch (placement) {\n case PLACEMENTS$1.TOP:\n top = triggerRect.top >= popupRect.height;\n left = triggerRect.left + triggerRect.width / 2 >= popupRect.width / 2;\n right = triggerRect.right - triggerRect.width / 2 + popupRect.width / 2 <= viewPortSize.width;\n break\n case PLACEMENTS$1.BOTTOM:\n bottom = triggerRect.bottom + popupRect.height <= viewPortSize.height;\n left = triggerRect.left + triggerRect.width / 2 >= popupRect.width / 2;\n right = triggerRect.right - triggerRect.width / 2 + popupRect.width / 2 <= viewPortSize.width;\n break\n case PLACEMENTS$1.RIGHT:\n right = triggerRect.right + popupRect.width <= viewPortSize.width;\n top = triggerRect.top + triggerRect.height / 2 >= popupRect.height / 2;\n bottom = triggerRect.bottom - triggerRect.height / 2 + popupRect.height / 2 <= viewPortSize.height;\n break\n case PLACEMENTS$1.LEFT:\n left = triggerRect.left >= popupRect.width;\n top = triggerRect.top + triggerRect.height / 2 >= popupRect.height / 2;\n bottom = triggerRect.bottom - triggerRect.height / 2 + popupRect.height / 2 <= viewPortSize.height;\n break\n }\n return top && right && bottom && left\n}\n\nfunction setTooltipPosition (tooltip, trigger, placement, auto, appendTo, positionBy, viewport) {\n if (!isElement(tooltip) || !isElement(trigger)) {\n return\n }\n var isPopover = tooltip && tooltip.className && tooltip.className.indexOf('popover') >= 0;\n var containerScrollTop;\n var containerScrollLeft;\n if (!isExist(appendTo) || appendTo === 'body' || positionBy === 'body') {\n var doc = document.documentElement;\n containerScrollLeft = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);\n containerScrollTop = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);\n } else {\n var container = getElementBySelectorOrRef(positionBy || appendTo);\n containerScrollLeft = container.scrollLeft;\n containerScrollTop = container.scrollTop;\n }\n // auto adjust placement\n if (auto) {\n // Try: right -> bottom -> left -> top\n // Cause the default placement is top\n var placements = [PLACEMENTS$1.RIGHT, PLACEMENTS$1.BOTTOM, PLACEMENTS$1.LEFT, PLACEMENTS$1.TOP];\n // The class switch helper function\n var changePlacementClass = function (placement) {\n // console.log(placement)\n placements.forEach(function (placement) {\n removeClass(tooltip, placement);\n });\n addClass(tooltip, placement);\n };\n // No need to adjust if the default placement fits\n if (!isAvailableAtPosition(trigger, tooltip, placement)) {\n for (var i = 0, l = placements.length; i < l; i++) {\n // Re-assign placement class\n changePlacementClass(placements[i]);\n // Break if new placement fits\n if (isAvailableAtPosition(trigger, tooltip, placements[i])) {\n placement = placements[i];\n break\n }\n }\n changePlacementClass(placement);\n }\n }\n // fix left and top for tooltip\n var rect = trigger.getBoundingClientRect();\n var tooltipRect = tooltip.getBoundingClientRect();\n var top;\n var left;\n if (placement === PLACEMENTS$1.BOTTOM) {\n top = containerScrollTop + rect.top + rect.height;\n left = containerScrollLeft + rect.left + rect.width / 2 - tooltipRect.width / 2;\n } else if (placement === PLACEMENTS$1.LEFT) {\n top = containerScrollTop + rect.top + rect.height / 2 - tooltipRect.height / 2;\n left = containerScrollLeft + rect.left - tooltipRect.width;\n } else if (placement === PLACEMENTS$1.RIGHT) {\n top = containerScrollTop + rect.top + rect.height / 2 - tooltipRect.height / 2;\n // https://github.com/uiv-lib/uiv/issues/272\n // add 1px to fix above issue\n left = containerScrollLeft + rect.left + rect.width + 1;\n } else {\n top = containerScrollTop + rect.top - tooltipRect.height;\n left = containerScrollLeft + rect.left + rect.width / 2 - tooltipRect.width / 2;\n }\n var viewportEl;\n // viewport option\n if (isString(viewport)) {\n viewportEl = document.querySelector(viewport);\n } else if (isFunction(viewport)) {\n viewportEl = viewport(trigger);\n }\n if (isElement(viewportEl)) {\n var popoverFix = isPopover ? 11 : 0;\n var viewportReact = viewportEl.getBoundingClientRect();\n var viewportTop = containerScrollTop + viewportReact.top;\n var viewportLeft = containerScrollLeft + viewportReact.left;\n var viewportBottom = viewportTop + viewportReact.height;\n var viewportRight = viewportLeft + viewportReact.width;\n // fix top\n if (top < viewportTop) {\n top = viewportTop;\n } else if (top + tooltipRect.height > viewportBottom) {\n top = viewportBottom - tooltipRect.height;\n }\n // fix left\n if (left < viewportLeft) {\n left = viewportLeft;\n } else if (left + tooltipRect.width > viewportRight) {\n left = viewportRight - tooltipRect.width;\n }\n // fix for popover pointer\n if (placement === PLACEMENTS$1.BOTTOM) {\n top -= popoverFix;\n } else if (placement === PLACEMENTS$1.LEFT) {\n left += popoverFix;\n } else if (placement === PLACEMENTS$1.RIGHT) {\n left -= popoverFix;\n } else {\n top += popoverFix;\n }\n }\n // set position finally\n tooltip.style.top = top + \"px\";\n tooltip.style.left = left + \"px\";\n}\n\nfunction hasScrollbar (el) {\n var SCROLL = 'scroll';\n var hasVScroll = el.scrollHeight > el.clientHeight;\n var style = getComputedStyle(el);\n return hasVScroll || style.overflow === SCROLL || style.overflowY === SCROLL\n}\n\nfunction toggleBodyOverflow (enable) {\n var MODAL_OPEN = 'modal-open';\n var FIXED_CONTENT = '.navbar-fixed-top, .navbar-fixed-bottom';\n var body = document.body;\n if (enable) {\n removeClass(body, MODAL_OPEN);\n body.style.paddingRight = null;\n nodeListToArray(document.querySelectorAll(FIXED_CONTENT)).forEach(function (node) {\n node.style.paddingRight = null;\n });\n } else {\n var browsersWithFloatingScrollbar = isIE10() || isIE11();\n var documentHasScrollbar = hasScrollbar(document.documentElement) || hasScrollbar(document.body);\n if (documentHasScrollbar && !browsersWithFloatingScrollbar) {\n var scrollbarWidth = getScrollbarWidth();\n body.style.paddingRight = scrollbarWidth + \"px\";\n nodeListToArray(document.querySelectorAll(FIXED_CONTENT)).forEach(function (node) {\n node.style.paddingRight = scrollbarWidth + \"px\";\n });\n }\n addClass(body, MODAL_OPEN);\n }\n}\n\nfunction getClosest (el, selector) {\n ensureElementMatchesFunction();\n var parent;\n var _el = el;\n while (_el) {\n parent = _el.parentElement;\n if (parent && parent.matches(selector)) {\n return parent\n }\n _el = parent;\n }\n return null\n}\n\nfunction getParents (el, selector, until) {\n if ( until === void 0 ) until = null;\n\n ensureElementMatchesFunction();\n var parents = [];\n var parent = el.parentElement;\n while (parent) {\n if (parent.matches(selector)) {\n parents.push(parent);\n } else if (until && (until === parent || parent.matches(until))) {\n break\n }\n parent = parent.parentElement;\n }\n return parents\n}\n\nfunction focus (el) {\n if (!isElement(el)) {\n return\n }\n el.getAttribute('tabindex') ? null : el.setAttribute('tabindex', '-1');\n el.focus();\n}\n\nvar MODAL_BACKDROP = 'modal-backdrop';\n\nfunction getOpenModals () {\n return document.querySelectorAll((\".\" + MODAL_BACKDROP))\n}\n\nfunction getOpenModalNum () {\n return getOpenModals().length\n}\n\nfunction getElementBySelectorOrRef (q) {\n if (isString(q)) { // is selector\n return document.querySelector(q)\n } else if (isElement(q)) { // is element\n return q\n } else if (isElement(q.$el)) { // is component\n return q.$el\n } else {\n return null\n }\n}\n\nvar COLLAPSE = 'collapse';\nvar IN$1 = 'in';\nvar COLLAPSING = 'collapsing';\n\nvar Collapse = {\n render: function render (h) {\n return h(this.tag, {}, this.$slots.default)\n },\n props: {\n tag: {\n type: String,\n default: 'div'\n },\n value: {\n type: Boolean,\n default: false\n },\n transition: {\n type: Number,\n default: 350\n }\n },\n data: function data () {\n return {\n timeoutId: 0\n }\n },\n watch: {\n value: function value (show) {\n this.toggle(show);\n }\n },\n mounted: function mounted () {\n var el = this.$el;\n addClass(el, COLLAPSE);\n if (this.value) {\n addClass(el, IN$1);\n }\n },\n methods: {\n toggle: function toggle (show) {\n var this$1 = this;\n\n clearTimeout(this.timeoutId);\n var el = this.$el;\n if (show) {\n this.$emit('show');\n removeClass(el, COLLAPSE);\n el.style.height = 'auto';\n var height = window.getComputedStyle(el).height;\n el.style.height = null;\n addClass(el, COLLAPSING);\n el.offsetHeight; // force repaint\n el.style.height = height;\n this.timeoutId = setTimeout(function () {\n removeClass(el, COLLAPSING);\n addClass(el, COLLAPSE);\n addClass(el, IN$1);\n el.style.height = null;\n this$1.timeoutId = 0;\n this$1.$emit('shown');\n }, this.transition);\n } else {\n this.$emit('hide');\n el.style.height = window.getComputedStyle(el).height;\n removeClass(el, IN$1);\n removeClass(el, COLLAPSE);\n el.offsetHeight;\n el.style.height = null;\n addClass(el, COLLAPSING);\n this.timeoutId = setTimeout(function () {\n addClass(el, COLLAPSE);\n removeClass(el, COLLAPSING);\n el.style.height = null;\n this$1.timeoutId = 0;\n this$1.$emit('hidden');\n }, this.transition);\n }\n }\n }\n};\n\nvar DEFAULT_TAG = 'div';\n\nvar Dropdown = {\n render: function render (h) {\n return h(\n this.tag,\n {\n class: {\n 'btn-group': this.tag === DEFAULT_TAG,\n dropdown: !this.dropup,\n dropup: this.dropup,\n open: this.show\n }\n },\n [\n this.$slots.default,\n h(\n 'ul',\n {\n class: {\n 'dropdown-menu': true,\n 'dropdown-menu-right': this.menuRight\n },\n ref: 'dropdown'\n },\n [this.$slots.dropdown]\n )\n ]\n )\n },\n props: {\n tag: {\n type: String,\n default: DEFAULT_TAG\n },\n appendToBody: {\n type: Boolean,\n default: false\n },\n value: Boolean,\n dropup: {\n type: Boolean,\n default: false\n },\n menuRight: {\n type: Boolean,\n default: false\n },\n disabled: {\n type: Boolean,\n default: false\n },\n notCloseElements: Array,\n positionElement: null\n },\n data: function data () {\n return {\n show: false,\n triggerEl: undefined\n }\n },\n watch: {\n value: function value (v) {\n this.toggle(v);\n }\n },\n mounted: function mounted () {\n this.initTrigger();\n if (this.triggerEl) {\n on(this.triggerEl, EVENTS.CLICK, this.toggle);\n on(this.triggerEl, EVENTS.KEY_DOWN, this.onKeyPress);\n }\n on(this.$refs.dropdown, EVENTS.KEY_DOWN, this.onKeyPress);\n on(window, EVENTS.CLICK, this.windowClicked);\n on(window, EVENTS.TOUCH_END, this.windowClicked);\n if (this.value) {\n this.toggle(true);\n }\n },\n beforeDestroy: function beforeDestroy () {\n this.removeDropdownFromBody();\n if (this.triggerEl) {\n off(this.triggerEl, EVENTS.CLICK, this.toggle);\n off(this.triggerEl, EVENTS.KEY_DOWN, this.onKeyPress);\n }\n off(this.$refs.dropdown, EVENTS.KEY_DOWN, this.onKeyPress);\n off(window, EVENTS.CLICK, this.windowClicked);\n off(window, EVENTS.TOUCH_END, this.windowClicked);\n },\n methods: {\n getFocusItem: function getFocusItem () {\n var dropdownEl = this.$refs.dropdown;\n /* istanbul ignore next */\n return dropdownEl.querySelector('li > a:focus')\n },\n onKeyPress: function onKeyPress (event) {\n if (this.show) {\n var dropdownEl = this.$refs.dropdown;\n var keyCode = event.keyCode;\n if (keyCode === 27) {\n // esc\n this.toggle(false);\n this.triggerEl && this.triggerEl.focus();\n } else if (keyCode === 13) {\n // enter\n var currentFocus = this.getFocusItem();\n currentFocus && currentFocus.click();\n } else if (keyCode === 38 || keyCode === 40) {\n // up || down\n event.preventDefault();\n event.stopPropagation();\n var currentFocus$1 = this.getFocusItem();\n var items = dropdownEl.querySelectorAll('li:not(.disabled) > a');\n if (!currentFocus$1) {\n focus(items[0]);\n } else {\n for (var i = 0; i < items.length; i++) {\n if (currentFocus$1 === items[i]) {\n if (keyCode === 38 && i < items.length > 0) {\n focus(items[i - 1]);\n } else if (keyCode === 40 && i < items.length - 1) {\n focus(items[i + 1]);\n }\n break\n }\n }\n }\n }\n }\n },\n initTrigger: function initTrigger () {\n var trigger = this.$el.querySelector('[data-role=\"trigger\"]') || this.$el.querySelector('.dropdown-toggle') || this.$el.firstChild;\n this.triggerEl = trigger && trigger !== this.$refs.dropdown ? trigger : null;\n },\n toggle: function toggle (show) {\n if (this.disabled) {\n return\n }\n if (isBoolean(show)) {\n this.show = show;\n } else {\n this.show = !this.show;\n }\n if (this.appendToBody) {\n this.show ? this.appendDropdownToBody() : this.removeDropdownFromBody();\n }\n this.$emit('input', this.show);\n },\n windowClicked: function windowClicked (event) {\n var target = event.target;\n if (this.show && target) {\n var targetInNotCloseElements = false;\n if (this.notCloseElements) {\n for (var i = 0, l = this.notCloseElements.length; i < l; i++) {\n var isTargetInElement = this.notCloseElements[i].contains(target);\n var shouldBreak = isTargetInElement;\n /* istanbul ignore else */\n if (this.appendToBody) {\n var isTargetInDropdown = this.$refs.dropdown.contains(target);\n var isElInElements = this.notCloseElements.indexOf(this.$el) >= 0;\n shouldBreak = isTargetInElement || (isTargetInDropdown && isElInElements);\n }\n if (shouldBreak) {\n targetInNotCloseElements = true;\n break\n }\n }\n }\n var targetInDropdownBody = this.$refs.dropdown.contains(target);\n var targetInTrigger = this.$el.contains(target) && !targetInDropdownBody;\n // normally, a dropdown select event is handled by @click that trigger after @touchend\n // then @touchend event have to be ignore in this case\n var targetInDropdownAndIsTouchEvent = targetInDropdownBody && event.type === 'touchend';\n if (!targetInTrigger && !targetInNotCloseElements && !targetInDropdownAndIsTouchEvent) {\n this.toggle(false);\n }\n }\n },\n appendDropdownToBody: function appendDropdownToBody () {\n try {\n var el = this.$refs.dropdown;\n el.style.display = 'block';\n document.body.appendChild(el);\n var positionElement = this.positionElement || this.$el;\n setDropdownPosition(el, positionElement, this);\n } catch (e) {\n // Silent\n }\n },\n removeDropdownFromBody: function removeDropdownFromBody () {\n try {\n var el = this.$refs.dropdown;\n el.removeAttribute('style');\n this.$el.appendChild(el);\n } catch (e) {\n // Silent\n }\n }\n }\n};\n\nvar defaultLang = {\n uiv: {\n datePicker: {\n clear: 'Clear',\n today: 'Today',\n month: 'Month',\n month1: 'January',\n month2: 'February',\n month3: 'March',\n month4: 'April',\n month5: 'May',\n month6: 'June',\n month7: 'July',\n month8: 'August',\n month9: 'September',\n month10: 'October',\n month11: 'November',\n month12: 'December',\n year: 'Year',\n week1: 'Mon',\n week2: 'Tue',\n week3: 'Wed',\n week4: 'Thu',\n week5: 'Fri',\n week6: 'Sat',\n week7: 'Sun'\n },\n timePicker: {\n am: 'AM',\n pm: 'PM'\n },\n modal: {\n cancel: 'Cancel',\n ok: 'OK'\n },\n multiSelect: {\n placeholder: 'Select...',\n filterPlaceholder: 'Search...'\n }\n }\n};\n\n// https://github.com/ElemeFE/element/blob/dev/src/locale/index.js\n\nvar lang = defaultLang;\n\nvar i18nHandler = function () {\n var vuei18n = Object.getPrototypeOf(this).$t;\n /* istanbul ignore else */\n /* istanbul ignore next */\n if (isFunction(vuei18n)) {\n /* istanbul ignore next */\n try {\n return vuei18n.apply(this, arguments)\n } catch (err) {\n return this.$t.apply(this, arguments)\n }\n }\n};\n\nvar t$1 = function (path, options) {\n options = options || {};\n var value;\n try {\n value = i18nHandler.apply(this, arguments);\n /* istanbul ignore next */\n if (isExist(value) && !options.$$locale) {\n return value\n }\n } catch (e) {\n // ignore\n }\n var array = path.split('.');\n var current = options.$$locale || lang;\n\n for (var i = 0, j = array.length; i < j; i++) {\n var property = array[i];\n value = current[property];\n if (i === j - 1) { return value }\n if (!value) { return '' }\n current = value;\n }\n /* istanbul ignore next */\n return ''\n};\n\nvar use = function (l) {\n lang = l || lang;\n};\n\nvar i18n = function (fn) {\n i18nHandler = fn || i18nHandler;\n};\n\nvar locale = { use: use, t: t$1, i18n: i18n };\n\nvar Local = {\n methods: {\n t: function t$1$1 () {\n var arguments$1 = arguments;\n\n var args = [];\n for (var i = 0; i < arguments.length; ++i) {\n args.push(arguments$1[i]);\n }\n args[1] = assign({}, { $$locale: this.locale }, args[1]);\n return t$1.apply(this, args)\n }\n },\n props: {\n locale: Object\n }\n};\n\nvar e=function(){return (e=Object.assign||function(e){for(var t,r=1,s=arguments.length;r props\n href: String,\n target: String,\n // props\n to: null,\n replace: {\n type: Boolean,\n default: false\n },\n append: {\n type: Boolean,\n default: false\n },\n exact: {\n type: Boolean,\n default: false\n }\n }\n};\n\nvar BtnGroup = {\n functional: true,\n render: function render (h, ref) {\n var obj;\n\n var props = ref.props;\n var children = ref.children;\n var data = ref.data;\n return h(\n 'div',\n a(data, {\n class: ( obj = {\n 'btn-group': !props.vertical,\n 'btn-group-vertical': props.vertical,\n 'btn-group-justified': props.justified\n }, obj[(\"btn-group-\" + (props.size))] = props.size, obj ),\n attrs: {\n role: 'group',\n 'data-toggle': 'buttons'\n }\n }),\n children\n )\n },\n props: {\n size: String,\n vertical: {\n type: Boolean,\n default: false\n },\n justified: {\n type: Boolean,\n default: false\n }\n }\n};\n\nvar INPUT_TYPE_CHECKBOX = 'checkbox';\nvar INPUT_TYPE_RADIO = 'radio';\n\nvar Btn = {\n functional: true,\n mixins: [linkMixin],\n render: function render (h, ref) {\n var children = ref.children;\n var props = ref.props;\n var data = ref.data;\n\n // event listeners\n var listeners = data.on || {};\n // checkbox: model contain inputValue\n // radio: model === inputValue\n var isInputActive = props.inputType === INPUT_TYPE_CHECKBOX ? props.value.indexOf(props.inputValue) >= 0 : props.value === props.inputValue;\n // button class\n var classes = {\n btn: true,\n active: props.inputType ? isInputActive : props.active,\n disabled: props.disabled,\n 'btn-block': props.block\n };\n classes[(\"btn-\" + (props.type))] = Boolean(props.type);\n classes[(\"btn-\" + (props.size))] = Boolean(props.size);\n // prevent event for disabled links\n var on = {\n click: function click (e) {\n if (props.disabled && e instanceof Event) {\n e.preventDefault();\n e.stopPropagation();\n }\n }\n };\n // render params\n var tag, options, slot;\n\n if (props.href) {\n // is native link\n tag = 'a';\n slot = children;\n options = a(data, {\n on: on,\n class: classes,\n attrs: {\n role: 'button',\n href: props.href,\n target: props.target\n }\n });\n } else if (props.to) {\n // is vue router link\n tag = 'router-link';\n slot = children;\n options = a(data, {\n nativeOn: on,\n class: classes,\n props: {\n event: props.disabled ? '' : 'click', // prevent nav while disabled\n to: props.to,\n replace: props.replace,\n append: props.append,\n exact: props.exact\n },\n attrs: {\n role: 'button'\n }\n });\n } else if (props.inputType) {\n // is input checkbox or radio\n tag = 'label';\n options = a(data, {\n on: on,\n class: classes\n });\n slot = [\n h('input', {\n attrs: {\n autocomplete: 'off',\n type: props.inputType,\n checked: isInputActive ? 'checked' : null,\n disabled: props.disabled\n },\n domProps: {\n checked: isInputActive // required\n },\n on: {\n input: function input (evt) {\n evt.stopPropagation();\n },\n change: function change () {\n if (props.inputType === INPUT_TYPE_CHECKBOX) {\n var valueCopied = props.value.slice();\n if (isInputActive) {\n valueCopied.splice(valueCopied.indexOf(props.inputValue), 1);\n } else {\n valueCopied.push(props.inputValue);\n }\n listeners.input(valueCopied);\n } else {\n listeners.input(props.inputValue);\n }\n }\n }\n }),\n children\n ];\n } else if (props.justified) {\n // is in justified btn-group\n tag = BtnGroup;\n options = {};\n slot = [\n h('button', a(data, {\n on: on,\n class: classes,\n attrs: {\n type: props.nativeType,\n disabled: props.disabled\n }\n }), children)\n ];\n } else {\n // is button\n tag = 'button';\n slot = children;\n options = a(data, {\n on: on,\n class: classes,\n attrs: {\n type: props.nativeType,\n disabled: props.disabled\n }\n });\n }\n\n return h(tag, options, slot)\n },\n props: {\n justified: {\n type: Boolean,\n default: false\n },\n type: {\n type: String,\n default: 'default'\n },\n nativeType: {\n type: String,\n default: 'button'\n },\n size: String,\n block: {\n type: Boolean,\n default: false\n },\n active: {\n type: Boolean,\n default: false\n },\n disabled: {\n type: Boolean,\n default: false\n },\n // props\n value: null,\n inputValue: null,\n inputType: {\n type: String,\n validator: function validator (value) {\n return value === INPUT_TYPE_CHECKBOX || value === INPUT_TYPE_RADIO\n }\n }\n }\n};\n\nvar IN = 'in';\n\nvar script$f = {\n mixins: [Local],\n components: { Btn: Btn },\n props: {\n value: {\n type: Boolean,\n default: false\n },\n title: String,\n size: String,\n backdrop: {\n type: Boolean,\n default: true\n },\n footer: {\n type: Boolean,\n default: true\n },\n header: {\n type: Boolean,\n default: true\n },\n cancelText: String,\n cancelType: {\n type: String,\n default: 'default'\n },\n okText: String,\n okType: {\n type: String,\n default: 'primary'\n },\n dismissBtn: {\n type: Boolean,\n default: true\n },\n transition: {\n type: Number,\n default: 150\n },\n autoFocus: {\n type: Boolean,\n default: false\n },\n keyboard: {\n type: Boolean,\n default: true\n },\n beforeClose: Function,\n zOffset: {\n type: Number,\n default: 20\n },\n appendToBody: {\n type: Boolean,\n default: false\n },\n displayStyle: {\n type: String,\n default: 'block'\n }\n },\n data: function data () {\n return {\n msg: ''\n }\n },\n computed: {\n modalSizeClass: function modalSizeClass () {\n var obj;\n\n return ( obj = {}, obj[(\"modal-\" + (this.size))] = Boolean(this.size), obj )\n }\n },\n watch: {\n value: function value (v) {\n this.$toggle(v);\n }\n },\n mounted: function mounted () {\n removeFromDom(this.$refs.backdrop);\n on(window, EVENTS.MOUSE_DOWN, this.suppressBackgroundClose);\n on(window, EVENTS.KEY_UP, this.onKeyPress);\n if (this.value) {\n this.$toggle(true);\n }\n },\n beforeDestroy: function beforeDestroy () {\n clearTimeout(this.timeoutId);\n removeFromDom(this.$refs.backdrop);\n removeFromDom(this.$el);\n if (getOpenModalNum() === 0) {\n toggleBodyOverflow(true);\n }\n off(window, EVENTS.MOUSE_DOWN, this.suppressBackgroundClose);\n off(window, EVENTS.MOUSE_UP, this.unsuppressBackgroundClose);\n off(window, EVENTS.KEY_UP, this.onKeyPress);\n },\n methods: {\n onKeyPress: function onKeyPress (event) {\n if (this.keyboard && this.value && event.keyCode === 27) {\n var thisModal = this.$refs.backdrop;\n var thisZIndex = thisModal.style.zIndex;\n thisZIndex = thisZIndex && thisZIndex !== 'auto' ? parseInt(thisZIndex) : 0;\n // Find out if this modal is the top most one.\n var modals = getOpenModals();\n var modalsLength = modals.length;\n for (var i = 0; i < modalsLength; i++) {\n if (modals[i] !== thisModal) {\n var zIndex = modals[i].style.zIndex;\n zIndex = zIndex && zIndex !== 'auto' ? parseInt(zIndex) : 0;\n // if any existing modal has higher zIndex, ignore\n if (zIndex > thisZIndex) {\n return\n }\n }\n }\n this.toggle(false);\n }\n },\n toggle: function toggle (show, msg) {\n var this$1 = this;\n\n var shouldClose = true;\n if (isFunction(this.beforeClose)) {\n shouldClose = this.beforeClose(msg);\n }\n\n if (isPromiseSupported()) {\n // Skip the hiding when beforeClose returning falsely value or returned Promise resolves to falsely value\n // Use Promise.resolve to accept both Boolean values and Promises\n Promise.resolve(shouldClose).then(function (shouldClose) {\n // Skip the hiding while show===false\n if (!show && shouldClose) {\n this$1.msg = msg;\n this$1.$emit('input', show);\n }\n });\n } else {\n // Fallback to old version if promise is not supported\n // skip the hiding while show===false & beforeClose returning falsely value\n if (!show && !shouldClose) {\n return\n }\n\n this.msg = msg;\n this.$emit('input', show);\n }\n },\n $toggle: function $toggle (show) {\n var this$1 = this;\n\n var modal = this.$el;\n var backdrop = this.$refs.backdrop;\n clearTimeout(this.timeoutId);\n if (show) {\n // If two modals share the same v-if condition the calculated z-index is incorrect,\n // resulting in popover misbehaviour.\n // solved by adding a nextTick.\n // https://github.com/uiv-lib/uiv/issues/342\n this.$nextTick(function () {\n var alreadyOpenModalNum = getOpenModalNum();\n document.body.appendChild(backdrop);\n if (this$1.appendToBody) {\n document.body.appendChild(modal);\n }\n modal.style.display = this$1.displayStyle;\n modal.scrollTop = 0;\n backdrop.offsetHeight; // force repaint\n toggleBodyOverflow(false);\n addClass(backdrop, IN);\n addClass(modal, IN);\n // fix z-index for nested modals\n // no need to calculate if no modal is already open\n if (alreadyOpenModalNum > 0) {\n var modalBaseZ = parseInt(getComputedStyle(modal).zIndex) || 1050; // 1050 is default modal z-Index\n var backdropBaseZ = parseInt(getComputedStyle(backdrop).zIndex) || 1040; // 1040 is default backdrop z-Index\n var offset = alreadyOpenModalNum * this$1.zOffset;\n modal.style.zIndex = \"\" + (modalBaseZ + offset);\n backdrop.style.zIndex = \"\" + (backdropBaseZ + offset);\n }\n // z-index fix end\n this$1.timeoutId = setTimeout(function () {\n if (this$1.autoFocus) {\n var btn = this$1.$el.querySelector('[data-action=\"auto-focus\"]');\n if (btn) {\n btn.focus();\n }\n }\n this$1.$emit('show');\n this$1.timeoutId = 0;\n }, this$1.transition);\n });\n } else {\n removeClass(backdrop, IN);\n removeClass(modal, IN);\n this.timeoutId = setTimeout(function () {\n modal.style.display = 'none';\n removeFromDom(backdrop);\n if (this$1.appendToBody) {\n removeFromDom(modal);\n }\n if (getOpenModalNum() === 0) {\n toggleBodyOverflow(true);\n }\n this$1.$emit('hide', this$1.msg || 'dismiss');\n this$1.msg = '';\n this$1.timeoutId = 0;\n // restore z-index for nested modals\n modal.style.zIndex = '';\n backdrop.style.zIndex = '';\n // z-index fix end\n }, this.transition);\n }\n },\n suppressBackgroundClose: function suppressBackgroundClose (event) {\n if (event && event.target === this.$el) {\n return\n }\n this.isCloseSuppressed = true;\n on(window, 'mouseup', this.unsuppressBackgroundClose);\n },\n unsuppressBackgroundClose: function unsuppressBackgroundClose () {\n var this$1 = this;\n\n if (this.isCloseSuppressed) {\n off(window, 'mouseup', this.unsuppressBackgroundClose);\n setTimeout(function () {\n this$1.isCloseSuppressed = false;\n }, 1);\n }\n },\n backdropClicked: function backdropClicked (event) {\n if (this.backdrop && !this.isCloseSuppressed) {\n this.toggle(false);\n }\n }\n }\n};\n\n/* script */\nvar __vue_script__$f = script$f;\n\n/* template */\nvar __vue_render__$f = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"div\",\n {\n staticClass: \"modal\",\n class: { fade: _vm.transition > 0 },\n attrs: { tabindex: \"-1\", role: \"dialog\" },\n on: {\n click: function($event) {\n if ($event.target !== $event.currentTarget) {\n return null\n }\n return _vm.backdropClicked($event)\n }\n }\n },\n [\n _c(\n \"div\",\n {\n ref: \"dialog\",\n staticClass: \"modal-dialog\",\n class: _vm.modalSizeClass,\n attrs: { role: \"document\" }\n },\n [\n _c(\"div\", { staticClass: \"modal-content\" }, [\n _vm.header\n ? _c(\n \"div\",\n { staticClass: \"modal-header\" },\n [\n _vm._t(\"header\", [\n _vm.dismissBtn\n ? _c(\n \"button\",\n {\n staticClass: \"close\",\n staticStyle: {\n position: \"relative\",\n \"z-index\": \"1060\"\n },\n attrs: { type: \"button\", \"aria-label\": \"Close\" },\n on: {\n click: function($event) {\n return _vm.toggle(false)\n }\n }\n },\n [\n _c(\"span\", { attrs: { \"aria-hidden\": \"true\" } }, [\n _vm._v(\"×\")\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"h4\",\n { staticClass: \"modal-title\" },\n [_vm._t(\"title\", [_vm._v(_vm._s(_vm.title))])],\n 2\n )\n ])\n ],\n 2\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"modal-body\" }, [_vm._t(\"default\")], 2),\n _vm._v(\" \"),\n _vm.footer\n ? _c(\n \"div\",\n { staticClass: \"modal-footer\" },\n [\n _vm._t(\"footer\", [\n _c(\n \"btn\",\n {\n attrs: { type: _vm.cancelType },\n on: {\n click: function($event) {\n return _vm.toggle(false, \"cancel\")\n }\n }\n },\n [\n _c(\"span\", [\n _vm._v(\n _vm._s(\n _vm.cancelText || _vm.t(\"uiv.modal.cancel\")\n )\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"btn\",\n {\n attrs: {\n type: _vm.okType,\n \"data-action\": \"auto-focus\"\n },\n on: {\n click: function($event) {\n return _vm.toggle(false, \"ok\")\n }\n }\n },\n [\n _c(\"span\", [\n _vm._v(_vm._s(_vm.okText || _vm.t(\"uiv.modal.ok\")))\n ])\n ]\n )\n ])\n ],\n 2\n )\n : _vm._e()\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"div\", {\n ref: \"backdrop\",\n staticClass: \"modal-backdrop\",\n class: { fade: _vm.transition > 0 }\n })\n ]\n )\n};\nvar __vue_staticRenderFns__$f = [];\n__vue_render__$f._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$f = undefined;\n /* scoped */\n var __vue_scope_id__$f = undefined;\n /* module identifier */\n var __vue_module_identifier__$f = undefined;\n /* functional template */\n var __vue_is_functional_template__$f = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$f = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$f, staticRenderFns: __vue_staticRenderFns__$f },\n __vue_inject_styles__$f,\n __vue_script__$f,\n __vue_scope_id__$f,\n __vue_is_functional_template__$f,\n __vue_module_identifier__$f,\n false,\n undefined,\n undefined,\n undefined\n );\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; }\n\n return arr2;\n }\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") { return Array.from(iter); }\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nvar inBrowser = typeof window !== 'undefined';\nfunction freeze(item) {\n if (Array.isArray(item) || _typeof(item) === 'object') {\n return Object.freeze(item);\n }\n\n return item;\n}\nfunction combinePassengers(transports) {\n var slotProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return transports.reduce(function (passengers, transport) {\n var temp = transport.passengers[0];\n var newPassengers = typeof temp === 'function' ? temp(slotProps) : transport.passengers;\n return passengers.concat(newPassengers);\n }, []);\n}\nfunction stableSort(array, compareFn) {\n return array.map(function (v, idx) {\n return [idx, v];\n }).sort(function (a, b) {\n return compareFn(a[1], b[1]) || a[0] - b[0];\n }).map(function (c) {\n return c[1];\n });\n}\nfunction pick(obj, keys) {\n return keys.reduce(function (acc, key) {\n if (obj.hasOwnProperty(key)) {\n acc[key] = obj[key];\n }\n\n return acc;\n }, {});\n}\n\nvar transports = {};\nvar targets = {};\nvar sources = {};\nvar Wormhole = Vue.extend({\n data: function data() {\n return {\n transports: transports,\n targets: targets,\n sources: sources,\n trackInstances: inBrowser\n };\n },\n methods: {\n open: function open(transport) {\n if (!inBrowser) { return; }\n var to = transport.to,\n from = transport.from,\n passengers = transport.passengers,\n _transport$order = transport.order,\n order = _transport$order === void 0 ? Infinity : _transport$order;\n if (!to || !from || !passengers) { return; }\n var newTransport = {\n to: to,\n from: from,\n passengers: freeze(passengers),\n order: order\n };\n var keys = Object.keys(this.transports);\n\n if (keys.indexOf(to) === -1) {\n Vue.set(this.transports, to, []);\n }\n\n var currentIndex = this.$_getTransportIndex(newTransport); // Copying the array here so that the PortalTarget change event will actually contain two distinct arrays\n\n var newTransports = this.transports[to].slice(0);\n\n if (currentIndex === -1) {\n newTransports.push(newTransport);\n } else {\n newTransports[currentIndex] = newTransport;\n }\n\n this.transports[to] = stableSort(newTransports, function (a, b) {\n return a.order - b.order;\n });\n },\n close: function close(transport) {\n var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var to = transport.to,\n from = transport.from;\n if (!to || !from && force === false) { return; }\n\n if (!this.transports[to]) {\n return;\n }\n\n if (force) {\n this.transports[to] = [];\n } else {\n var index = this.$_getTransportIndex(transport);\n\n if (index >= 0) {\n // Copying the array here so that the PortalTarget change event will actually contain two distinct arrays\n var newTransports = this.transports[to].slice(0);\n newTransports.splice(index, 1);\n this.transports[to] = newTransports;\n }\n }\n },\n registerTarget: function registerTarget(target, vm, force) {\n if (!inBrowser) { return; }\n\n if (this.trackInstances && !force && this.targets[target]) {\n console.warn(\"[portal-vue]: Target \".concat(target, \" already exists\"));\n }\n\n this.$set(this.targets, target, Object.freeze([vm]));\n },\n unregisterTarget: function unregisterTarget(target) {\n this.$delete(this.targets, target);\n },\n registerSource: function registerSource(source, vm, force) {\n if (!inBrowser) { return; }\n\n if (this.trackInstances && !force && this.sources[source]) {\n console.warn(\"[portal-vue]: source \".concat(source, \" already exists\"));\n }\n\n this.$set(this.sources, source, Object.freeze([vm]));\n },\n unregisterSource: function unregisterSource(source) {\n this.$delete(this.sources, source);\n },\n hasTarget: function hasTarget(to) {\n return !!(this.targets[to] && this.targets[to][0]);\n },\n hasSource: function hasSource(to) {\n return !!(this.sources[to] && this.sources[to][0]);\n },\n hasContentFor: function hasContentFor(to) {\n return !!this.transports[to] && !!this.transports[to].length;\n },\n // Internal\n $_getTransportIndex: function $_getTransportIndex(_ref) {\n var to = _ref.to,\n from = _ref.from;\n\n for (var i in this.transports[to]) {\n if (this.transports[to][i].from === from) {\n return +i;\n }\n }\n\n return -1;\n }\n }\n});\nvar wormhole = new Wormhole(transports);\n\nvar _id = 1;\nvar Portal = Vue.extend({\n name: 'portal',\n props: {\n disabled: {\n type: Boolean\n },\n name: {\n type: String,\n default: function _default() {\n return String(_id++);\n }\n },\n order: {\n type: Number,\n default: 0\n },\n slim: {\n type: Boolean\n },\n slotProps: {\n type: Object,\n default: function _default() {\n return {};\n }\n },\n tag: {\n type: String,\n default: 'DIV'\n },\n to: {\n type: String,\n default: function _default() {\n return String(Math.round(Math.random() * 10000000));\n }\n }\n },\n created: function created() {\n var _this = this;\n\n this.$nextTick(function () {\n wormhole.registerSource(_this.name, _this);\n });\n },\n mounted: function mounted() {\n if (!this.disabled) {\n this.sendUpdate();\n }\n },\n updated: function updated() {\n if (this.disabled) {\n this.clear();\n } else {\n this.sendUpdate();\n }\n },\n beforeDestroy: function beforeDestroy() {\n wormhole.unregisterSource(this.name);\n this.clear();\n },\n watch: {\n to: function to(newValue, oldValue) {\n oldValue && oldValue !== newValue && this.clear(oldValue);\n this.sendUpdate();\n }\n },\n methods: {\n clear: function clear(target) {\n var closer = {\n from: this.name,\n to: target || this.to\n };\n wormhole.close(closer);\n },\n normalizeSlots: function normalizeSlots() {\n return this.$scopedSlots.default ? [this.$scopedSlots.default] : this.$slots.default;\n },\n normalizeOwnChildren: function normalizeOwnChildren(children) {\n return typeof children === 'function' ? children(this.slotProps) : children;\n },\n sendUpdate: function sendUpdate() {\n var slotContent = this.normalizeSlots();\n\n if (slotContent) {\n var transport = {\n from: this.name,\n to: this.to,\n passengers: _toConsumableArray(slotContent),\n order: this.order\n };\n wormhole.open(transport);\n } else {\n this.clear();\n }\n }\n },\n render: function render(h) {\n var children = this.$slots.default || this.$scopedSlots.default || [];\n var Tag = this.tag;\n\n if (children && this.disabled) {\n return children.length <= 1 && this.slim ? this.normalizeOwnChildren(children)[0] : h(Tag, [this.normalizeOwnChildren(children)]);\n } else {\n return this.slim ? h() : h(Tag, {\n class: {\n 'v-portal': true\n },\n style: {\n display: 'none'\n },\n key: 'v-portal-placeholder'\n });\n }\n }\n});\n\nvar PortalTarget = Vue.extend({\n name: 'portalTarget',\n props: {\n multiple: {\n type: Boolean,\n default: false\n },\n name: {\n type: String,\n required: true\n },\n slim: {\n type: Boolean,\n default: false\n },\n slotProps: {\n type: Object,\n default: function _default() {\n return {};\n }\n },\n tag: {\n type: String,\n default: 'div'\n },\n transition: {\n type: [String, Object, Function]\n }\n },\n data: function data() {\n return {\n transports: wormhole.transports,\n firstRender: true\n };\n },\n created: function created() {\n var _this = this;\n\n this.$nextTick(function () {\n wormhole.registerTarget(_this.name, _this);\n });\n },\n watch: {\n ownTransports: function ownTransports() {\n this.$emit('change', this.children().length > 0);\n },\n name: function name(newVal, oldVal) {\n /**\r\n * TODO\r\n * This should warn as well ...\r\n */\n wormhole.unregisterTarget(oldVal);\n wormhole.registerTarget(newVal, this);\n }\n },\n mounted: function mounted() {\n var _this2 = this;\n\n if (this.transition) {\n this.$nextTick(function () {\n // only when we have a transition, because it causes a re-render\n _this2.firstRender = false;\n });\n }\n },\n beforeDestroy: function beforeDestroy() {\n wormhole.unregisterTarget(this.name);\n },\n computed: {\n ownTransports: function ownTransports() {\n var transports = this.transports[this.name] || [];\n\n if (this.multiple) {\n return transports;\n }\n\n return transports.length === 0 ? [] : [transports[transports.length - 1]];\n },\n passengers: function passengers() {\n return combinePassengers(this.ownTransports, this.slotProps);\n }\n },\n methods: {\n // can't be a computed prop because it has to \"react\" to $slot changes.\n children: function children() {\n return this.passengers.length !== 0 ? this.passengers : this.$scopedSlots.default ? this.$scopedSlots.default(this.slotProps) : this.$slots.default || [];\n },\n // can't be a computed prop because it has to \"react\" to this.children().\n noWrapper: function noWrapper() {\n var noWrapper = this.slim && !this.transition;\n\n if (noWrapper && this.children().length > 1) {\n console.warn('[portal-vue]: PortalTarget with `slim` option received more than one child element.');\n }\n\n return noWrapper;\n }\n },\n render: function render(h) {\n var noWrapper = this.noWrapper();\n var children = this.children();\n var Tag = this.transition || this.tag;\n return noWrapper ? children[0] : this.slim && !Tag ? h() : h(Tag, {\n props: {\n // if we have a transition component, pass the tag if it exists\n tag: this.transition && this.tag ? this.tag : undefined\n },\n class: {\n 'vue-portal-target': true\n }\n }, children);\n }\n});\n\nvar _id$1 = 0;\nvar portalProps = ['disabled', 'name', 'order', 'slim', 'slotProps', 'tag', 'to'];\nvar targetProps = ['multiple', 'transition'];\nVue.extend({\n name: 'MountingPortal',\n inheritAttrs: false,\n props: {\n append: {\n type: [Boolean, String]\n },\n bail: {\n type: Boolean\n },\n mountTo: {\n type: String,\n required: true\n },\n // Portal\n disabled: {\n type: Boolean\n },\n // name for the portal\n name: {\n type: String,\n default: function _default() {\n return 'mounted_' + String(_id$1++);\n }\n },\n order: {\n type: Number,\n default: 0\n },\n slim: {\n type: Boolean\n },\n slotProps: {\n type: Object,\n default: function _default() {\n return {};\n }\n },\n tag: {\n type: String,\n default: 'DIV'\n },\n // name for the target\n to: {\n type: String,\n default: function _default() {\n return String(Math.round(Math.random() * 10000000));\n }\n },\n // Target\n multiple: {\n type: Boolean,\n default: false\n },\n targetSlim: {\n type: Boolean\n },\n targetSlotProps: {\n type: Object,\n default: function _default() {\n return {};\n }\n },\n targetTag: {\n type: String,\n default: 'div'\n },\n transition: {\n type: [String, Object, Function]\n }\n },\n created: function created() {\n if (typeof document === 'undefined') { return; }\n var el = document.querySelector(this.mountTo);\n\n if (!el) {\n console.error(\"[portal-vue]: Mount Point '\".concat(this.mountTo, \"' not found in document\"));\n return;\n }\n\n var props = this.$props; // Target already exists\n\n if (wormhole.targets[props.name]) {\n if (props.bail) {\n console.warn(\"[portal-vue]: Target \".concat(props.name, \" is already mounted.\\n Aborting because 'bail: true' is set\"));\n } else {\n this.portalTarget = wormhole.targets[props.name];\n }\n\n return;\n }\n\n var append = props.append;\n\n if (append) {\n var type = typeof append === 'string' ? append : 'DIV';\n var mountEl = document.createElement(type);\n el.appendChild(mountEl);\n el = mountEl;\n } // get props for target from $props\n // we have to rename a few of them\n\n\n var _props = pick(this.$props, targetProps);\n\n _props.slim = this.targetSlim;\n _props.tag = this.targetTag;\n _props.slotProps = this.targetSlotProps;\n _props.name = this.to;\n this.portalTarget = new PortalTarget({\n el: el,\n parent: this.$parent || this,\n propsData: _props\n });\n },\n beforeDestroy: function beforeDestroy() {\n var target = this.portalTarget;\n\n if (this.append) {\n var el = target.$el;\n el.parentNode.removeChild(el);\n }\n\n target.$destroy();\n },\n render: function render(h) {\n if (!this.portalTarget) {\n console.warn(\"[portal-vue] Target wasn't mounted\");\n return h();\n } // if there's no \"manual\" scoped slot, so we create a ourselves\n\n\n if (!this.$scopedSlots.manual) {\n var props = pick(this.$props, portalProps);\n return h(Portal, {\n props: props,\n attrs: this.$attrs,\n on: this.$listeners,\n scopedSlots: this.$scopedSlots\n }, this.$slots.default);\n } // else, we render the scoped slot\n\n\n var content = this.$scopedSlots.manual({\n to: this.to\n }); // if user used for the scoped slot\n // content will be an array\n\n if (Array.isArray(content)) {\n content = content[0];\n }\n\n if (!content) { return h(); }\n return content;\n }\n});\n\nvar ACTIVE_CLASS = 'active';\nvar IN_CLASS$1 = 'in';\n\nvar script$e = {\n components: { Portal: Portal },\n props: {\n title: {\n type: String,\n default: 'Tab Title'\n },\n disabled: {\n type: Boolean,\n default: false\n },\n tabClasses: {\n type: Object,\n default: function () { return {} }\n },\n group: String,\n pullRight: {\n type: Boolean,\n default: false\n },\n hidden: {\n type: Boolean,\n default: false\n }\n },\n data: function data () {\n return {\n active: true,\n transition: 150\n }\n },\n watch: {\n active: function active (active$1) {\n var this$1 = this;\n\n if (active$1) {\n setTimeout(function () {\n addClass(this$1.$el, ACTIVE_CLASS);\n this$1.$el.offsetHeight;\n addClass(this$1.$el, IN_CLASS$1);\n try {\n this$1.$parent.$emit('changed', this$1.$parent.activeIndex);\n } catch (e) {\n throw new Error(' parent must be .')\n }\n }, this.transition);\n } else {\n removeClass(this.$el, IN_CLASS$1);\n setTimeout(function () {\n removeClass(this$1.$el, ACTIVE_CLASS);\n }, this.transition);\n }\n }\n },\n created: function created () {\n try {\n this.$parent.tabs.push(this);\n } catch (e) {\n throw new Error(' parent must be .')\n }\n },\n beforeDestroy: function beforeDestroy () {\n var tabs = this.$parent && this.$parent.tabs;\n spliceIfExist(tabs, this);\n },\n methods: {\n show: function show () {\n var this$1 = this;\n\n this.$nextTick(function () {\n addClass(this$1.$el, ACTIVE_CLASS);\n addClass(this$1.$el, IN_CLASS$1);\n });\n }\n }\n};\n\n/* script */\nvar __vue_script__$e = script$e;\n\n/* template */\nvar __vue_render__$e = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"div\",\n {\n staticClass: \"tab-pane\",\n class: { fade: _vm.transition > 0 },\n attrs: { role: \"tabpanel\" }\n },\n [\n _vm._t(\"default\"),\n _vm._v(\" \"),\n _c(\"portal\", { attrs: { to: _vm._uid.toString() } }, [_vm._t(\"title\")], 2)\n ],\n 2\n )\n};\nvar __vue_staticRenderFns__$e = [];\n__vue_render__$e._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$e = undefined;\n /* scoped */\n var __vue_scope_id__$e = undefined;\n /* module identifier */\n var __vue_module_identifier__$e = undefined;\n /* functional template */\n var __vue_is_functional_template__$e = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$e = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$e, staticRenderFns: __vue_staticRenderFns__$e },\n __vue_inject_styles__$e,\n __vue_script__$e,\n __vue_scope_id__$e,\n __vue_is_functional_template__$e,\n __vue_module_identifier__$e,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar BEFORE_CHANGE_EVENT = 'before-change';\n\nvar script$d = {\n components: { Dropdown: Dropdown, PortalTarget: PortalTarget },\n props: {\n value: {\n type: Number,\n validator: function (v) { return v >= 0; }\n },\n transition: {\n type: Number,\n default: 150\n },\n justified: Boolean,\n pills: Boolean,\n stacked: Boolean,\n customNavClass: null,\n customContentClass: null\n },\n data: function data () {\n return {\n tabs: [],\n activeIndex: 0 // Make v-model not required\n }\n },\n watch: {\n value: {\n immediate: true,\n handler: function handler (value) {\n if (isNumber(value)) {\n this.activeIndex = value;\n this.selectCurrent();\n }\n }\n },\n tabs: function tabs (tabs$1) {\n var this$1 = this;\n\n tabs$1.forEach(function (tab, index) {\n tab.transition = this$1.transition;\n if (index === this$1.activeIndex) {\n tab.show();\n }\n });\n this.selectCurrent();\n }\n },\n computed: {\n navClasses: function navClasses () {\n var obj;\n\n var tabClasses = {\n nav: true,\n 'nav-justified': this.justified,\n 'nav-tabs': !this.pills,\n 'nav-pills': this.pills,\n 'nav-stacked': this.stacked && this.pills\n };\n var customNavClass = this.customNavClass;\n if (isExist(customNavClass)) {\n if (isString(customNavClass)) {\n return assign({}, tabClasses, ( obj = {}, obj[customNavClass] = true, obj ))\n } else {\n return assign({}, tabClasses, customNavClass)\n }\n } else {\n return tabClasses\n }\n },\n contentClasses: function contentClasses () {\n var obj;\n\n var contentClasses = {\n 'tab-content': true\n };\n var customContentClass = this.customContentClass;\n if (isExist(customContentClass)) {\n if (isString(customContentClass)) {\n return assign({}, contentClasses, ( obj = {}, obj[customContentClass] = true, obj ))\n } else {\n return assign({}, contentClasses, customContentClass)\n }\n } else {\n return contentClasses\n }\n },\n groupedTabs: function groupedTabs () {\n var tabs = [];\n var hash = {};\n this.tabs.forEach(function (tab) {\n if (tab.group) {\n if (hasOwnProperty(hash, tab.group)) {\n tabs[hash[tab.group]].tabs.push(tab);\n } else {\n tabs.push({\n tabs: [tab],\n group: tab.group\n });\n hash[tab.group] = tabs.length - 1;\n }\n if (tab.active) {\n tabs[hash[tab.group]].active = true;\n }\n if (tab.pullRight) {\n tabs[hash[tab.group]].pullRight = true;\n }\n } else {\n tabs.push(tab);\n }\n });\n tabs = tabs.map(function (tab) {\n if (Array.isArray(tab.tabs)) {\n tab.hidden = tab.tabs.filter(function (v) { return v.hidden; }).length === tab.tabs.length;\n }\n return tab\n });\n return tabs\n }\n },\n methods: {\n getTabClasses: function getTabClasses (tab, isSubTab) {\n if ( isSubTab === void 0 ) isSubTab = false;\n\n var defaultClasses = {\n active: tab.active,\n disabled: tab.disabled,\n 'pull-right': tab.pullRight && !isSubTab\n };\n\n // return with new classes added to tab\n return assign(defaultClasses, tab.tabClasses)\n },\n selectCurrent: function selectCurrent () {\n var this$1 = this;\n\n var found = false;\n this.tabs.forEach(function (tab, index) {\n if (index === this$1.activeIndex) {\n found = !tab.active;\n tab.active = true;\n } else {\n tab.active = false;\n }\n });\n if (found) {\n this.$emit('change', this.activeIndex);\n }\n },\n selectValidate: function selectValidate (index) {\n var this$1 = this;\n\n if (isFunction(this.$listeners[BEFORE_CHANGE_EVENT])) {\n this.$emit(BEFORE_CHANGE_EVENT, this.activeIndex, index, function (result) {\n if (!isExist(result)) {\n this$1.$select(index);\n }\n });\n } else {\n this.$select(index);\n }\n },\n select: function select (index) {\n if (!this.tabs[index].disabled && index !== this.activeIndex) {\n this.selectValidate(index);\n }\n },\n $select: function $select (index) {\n if (isNumber(this.value)) {\n this.$emit('input', index);\n } else {\n this.activeIndex = index;\n this.selectCurrent();\n }\n }\n }\n};\n\n/* script */\nvar __vue_script__$d = script$d;\n\n/* template */\nvar __vue_render__$d = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\"section\", [\n _c(\n \"ul\",\n { class: _vm.navClasses, attrs: { role: \"tablist\" } },\n [\n _vm._l(_vm.groupedTabs, function(tab, index) {\n return [\n tab.tabs\n ? _c(\n \"dropdown\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: !tab.hidden,\n expression: \"!tab.hidden\"\n }\n ],\n class: _vm.getTabClasses(tab),\n attrs: { role: \"presentation\", tag: \"li\" }\n },\n [\n _c(\n \"a\",\n {\n staticClass: \"dropdown-toggle\",\n attrs: { role: \"tab\", href: \"#\" },\n on: {\n click: function($event) {\n $event.preventDefault();\n }\n }\n },\n [\n _vm._v(_vm._s(tab.group) + \" \"),\n _c(\"span\", { staticClass: \"caret\" })\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"template\",\n { slot: \"dropdown\" },\n _vm._l(tab.tabs, function(subTab) {\n return _c(\n \"li\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: !subTab.hidden,\n expression: \"!subTab.hidden\"\n }\n ],\n class: _vm.getTabClasses(subTab, true)\n },\n [\n _c(\n \"a\",\n {\n attrs: { href: \"#\" },\n on: {\n click: function($event) {\n $event.preventDefault();\n _vm.select(_vm.tabs.indexOf(subTab));\n }\n }\n },\n [_vm._v(_vm._s(subTab.title))]\n )\n ]\n )\n }),\n 0\n )\n ],\n 2\n )\n : _c(\n \"li\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: !tab.hidden,\n expression: \"!tab.hidden\"\n }\n ],\n class: _vm.getTabClasses(tab),\n attrs: { role: \"presentation\" }\n },\n [\n tab.$slots.title\n ? _c(\"portal-target\", {\n attrs: {\n name: tab._uid.toString(),\n tag: \"a\",\n role: \"tab\",\n href: \"#\"\n },\n nativeOn: {\n click: function($event) {\n $event.preventDefault();\n _vm.select(_vm.tabs.indexOf(tab));\n }\n }\n })\n : _c(\"a\", {\n attrs: { role: \"tab\", href: \"#\" },\n domProps: { textContent: _vm._s(tab.title) },\n on: {\n click: function($event) {\n $event.preventDefault();\n _vm.select(_vm.tabs.indexOf(tab));\n }\n }\n })\n ],\n 1\n )\n ]\n }),\n _vm._v(\" \"),\n !_vm.justified && _vm.$slots[\"nav-right\"]\n ? _c(\"li\", { staticClass: \"pull-right\" }, [_vm._t(\"nav-right\")], 2)\n : _vm._e()\n ],\n 2\n ),\n _vm._v(\" \"),\n _c(\"div\", { class: _vm.contentClasses }, [_vm._t(\"default\")], 2)\n ])\n};\nvar __vue_staticRenderFns__$d = [];\n__vue_render__$d._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$d = undefined;\n /* scoped */\n var __vue_scope_id__$d = undefined;\n /* module identifier */\n var __vue_module_identifier__$d = undefined;\n /* functional template */\n var __vue_is_functional_template__$d = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$d = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$d, staticRenderFns: __vue_staticRenderFns__$d },\n __vue_inject_styles__$d,\n __vue_script__$d,\n __vue_scope_id__$d,\n __vue_is_functional_template__$d,\n __vue_module_identifier__$d,\n false,\n undefined,\n undefined,\n undefined\n );\n\nfunction pad (value, num) {\n value = value + '';\n for (var i = num - value.length; i > 0; i--) {\n value = '0' + value;\n }\n return value\n}\n\nvar monthNames = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December'\n];\n\n/**\n * Get total days number in a month.\n * because we're using 0 as the day so that it returns the last day\n * of the last month, so you have to add 1 to the month number\n * so it returns the correct amount of days.\n * https://stackoverflow.com/questions/1184334/get-number-days-in-a-specified-month-using-javascript\n * @param month 0-based\n * @param year\n * @returns {number}\n */\nfunction daysInMonth (month, year) {\n return new Date(year, month + 1, 0).getDate()\n}\n\nfunction stringify (date, format) {\n try {\n var year = date.getFullYear();\n var month = date.getMonth() + 1;\n var day = date.getDate();\n var monthName = monthNames[month - 1];\n return format\n .replace(/yyyy/g, year)\n .replace(/MMMM/g, monthName)\n .replace(/MMM/g, monthName.substring(0, 3))\n .replace(/MM/g, pad(month, 2))\n .replace(/dd/g, pad(day, 2))\n .replace(/yy/g, year)\n .replace(/M(?!a)/g, month)\n .replace(/d/g, day)\n } catch (e) {\n return ''\n }\n}\n\nfunction convertDateToUTC (date) {\n return new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds())\n}\n\n/**\n * https://stackoverflow.com/questions/6117814/get-week-of-year-in-javascript-like-in-php\n * For a given date, get the ISO week number\n * Based on information at:\n * http://www.merlyn.demon.co.uk/weekcalc.htm#WNR\n *\n * Algorithm is to find nearest thursday, it's year\n * is the year of the week number. Then get weeks\n * between that date and the first day of that year.\n *\n * Note that dates in one year can be weeks of previous\n * or next year, overlap is up to 3 days.\n *\n * e.g. 2014/12/29 is Monday in week 1 of 2015\n * 2012/1/1 is Sunday in week 52 of 2011\n *\n * @param {number} d.year year of date\n * @param {number} d.month month of date\n * @param {number} d.date date of date\n * @returns {number}\n */\nfunction getWeekNumber (d) {\n // Copy date so don't modify original\n var _d = new Date(Date.UTC(d.year, d.month, d.date));\n // Set to nearest Thursday: current date + 4 - current day number\n // Make Sunday's day number 7\n _d.setUTCDate(_d.getUTCDate() + 4 - (_d.getUTCDay() || 7));\n // Get first day of year\n var yearStart = new Date(Date.UTC(_d.getUTCFullYear(), 0, 1));\n // Calculate full weeks to nearest Thursday\n return Math.ceil((((_d - yearStart) / 86400000) + 1) / 7)\n}\n\nvar script$c = {\n mixins: [Local],\n props: {\n month: Number,\n year: Number,\n date: Date,\n today: Date,\n limit: Object,\n weekStartsWith: Number,\n iconControlLeft: String,\n iconControlRight: String,\n dateClass: Function,\n yearMonthFormatter: Function,\n weekNumbers: Boolean\n },\n components: { Btn: Btn },\n computed: {\n weekDays: function weekDays () {\n var days = [];\n var firstDay = this.weekStartsWith;\n while (days.length < 7) {\n days.push(firstDay++);\n if (firstDay > 6) {\n firstDay = 0;\n }\n }\n return days\n },\n yearMonthStr: function yearMonthStr () {\n if (this.yearMonthFormatter) {\n return this.yearMonthFormatter(this.year, this.month)\n } else {\n return isExist(this.month) ? ((this.year) + \" \" + (this.t((\"uiv.datePicker.month\" + (this.month + 1))))) : this.year\n }\n },\n monthDayRows: function monthDayRows () {\n var rows = [];\n var firstDay = new Date(this.year, this.month, 1);\n var prevMonthLastDate = new Date(this.year, this.month, 0).getDate();\n var startIndex = firstDay.getDay();\n // console.log(startIndex)\n var daysNum = daysInMonth(this.month, this.year);\n var weekOffset = 0;\n if (this.weekStartsWith > startIndex) {\n weekOffset = 7 - this.weekStartsWith;\n } else {\n weekOffset = 0 - this.weekStartsWith;\n }\n // console.log(prevMonthLastDate, startIndex, daysNum)\n for (var i = 0; i < 6; i++) {\n rows.push([]);\n for (var j = 0 - weekOffset; j < 7 - weekOffset; j++) {\n var currentIndex = i * 7 + j;\n var date = { year: this.year, disabled: false };\n // date in and not in current month\n if (currentIndex < startIndex) {\n date.date = prevMonthLastDate - startIndex + currentIndex + 1;\n if (this.month > 0) {\n date.month = this.month - 1;\n } else {\n date.month = 11;\n date.year--;\n }\n } else if (currentIndex < startIndex + daysNum) {\n date.date = currentIndex - startIndex + 1;\n date.month = this.month;\n } else {\n date.date = currentIndex - startIndex - daysNum + 1;\n if (this.month < 11) {\n date.month = this.month + 1;\n } else {\n date.month = 0;\n date.year++;\n }\n }\n // process limit dates\n var dateObj = new Date(date.year, date.month, date.date);\n var afterFrom = true;\n var beforeTo = true;\n if (this.limit && this.limit.from) {\n afterFrom = dateObj >= this.limit.from;\n }\n if (this.limit && this.limit.to) {\n beforeTo = dateObj < this.limit.to;\n }\n date.disabled = !afterFrom || !beforeTo;\n if (isFunction(this.dateClass)) {\n date.classes = this.dateClass(dateObj, {\n currentMonth: this.month,\n currentYear: this.year\n });\n } else {\n date.classes = '';\n }\n rows[i].push(date);\n }\n }\n return rows\n }\n },\n methods: {\n getWeekNumber: getWeekNumber,\n tWeekName: function tWeekName (index) {\n return this.t((\"uiv.datePicker.week\" + index))\n },\n getBtnType: function getBtnType (date) {\n if (this.date &&\n date.date === this.date.getDate() &&\n date.month === this.date.getMonth() &&\n date.year === this.date.getFullYear()) {\n return 'primary'\n } else if (date.date === this.today.getDate() &&\n date.month === this.today.getMonth() &&\n date.year === this.today.getFullYear()) {\n return 'info'\n } else {\n return 'default'\n }\n },\n select: function select (date) {\n this.$emit('date-change', date);\n },\n goPrevMonth: function goPrevMonth () {\n var month = this.month;\n var year = this.year;\n if (this.month > 0) {\n month--;\n } else {\n month = 11;\n year--;\n this.$emit('year-change', year);\n }\n this.$emit('month-change', month);\n },\n goNextMonth: function goNextMonth () {\n var month = this.month;\n var year = this.year;\n if (this.month < 11) {\n month++;\n } else {\n month = 0;\n year++;\n this.$emit('year-change', year);\n }\n this.$emit('month-change', month);\n },\n changeView: function changeView () {\n this.$emit('view-change', 'm');\n }\n }\n};\n\n/* script */\nvar __vue_script__$c = script$c;\n\n/* template */\nvar __vue_render__$c = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"table\",\n { staticStyle: { width: \"100%\" }, attrs: { role: \"grid\" } },\n [\n _c(\"thead\", [\n _c(\"tr\", [\n _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n staticClass: \"uiv-datepicker-pager-prev\",\n staticStyle: { border: \"none\" },\n attrs: { block: \"\", size: \"sm\" },\n on: { click: _vm.goPrevMonth }\n },\n [_c(\"i\", { class: _vm.iconControlLeft })]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"td\",\n { attrs: { colspan: _vm.weekNumbers ? 6 : 5 } },\n [\n _c(\n \"btn\",\n {\n staticClass: \"uiv-datepicker-title\",\n staticStyle: { border: \"none\" },\n attrs: { block: \"\", size: \"sm\" },\n on: { click: _vm.changeView }\n },\n [_c(\"b\", [_vm._v(_vm._s(_vm.yearMonthStr))])]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n staticClass: \"uiv-datepicker-pager-next\",\n staticStyle: { border: \"none\" },\n attrs: { block: \"\", size: \"sm\" },\n on: { click: _vm.goNextMonth }\n },\n [_c(\"i\", { class: _vm.iconControlRight })]\n )\n ],\n 1\n )\n ]),\n _vm._v(\" \"),\n _c(\n \"tr\",\n { attrs: { align: \"center\" } },\n [\n _vm.weekNumbers ? _c(\"td\") : _vm._e(),\n _vm._v(\" \"),\n _vm._l(_vm.weekDays, function(day) {\n return _c(\"td\", { attrs: { width: \"14.2857142857%\" } }, [\n _c(\"small\", { staticClass: \"uiv-datepicker-week\" }, [\n _vm._v(_vm._s(_vm.tWeekName(day === 0 ? 7 : day)))\n ])\n ])\n })\n ],\n 2\n )\n ]),\n _vm._v(\" \"),\n _c(\n \"tbody\",\n _vm._l(_vm.monthDayRows, function(row) {\n return _c(\n \"tr\",\n [\n _vm.weekNumbers\n ? _c(\n \"td\",\n {\n staticClass: \"text-center\",\n staticStyle: { \"border-right\": \"1px solid #eee\" }\n },\n [\n _c(\"small\", { staticClass: \"text-muted\" }, [\n _vm._v(\n _vm._s(_vm.getWeekNumber(row[_vm.weekStartsWith]))\n )\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm._l(row, function(date) {\n return _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n class: date.classes,\n staticStyle: { border: \"none\" },\n attrs: {\n block: \"\",\n size: \"sm\",\n \"data-action\": \"select\",\n type: _vm.getBtnType(date),\n disabled: date.disabled\n },\n on: {\n click: function($event) {\n return _vm.select(date)\n }\n }\n },\n [\n _c(\n \"span\",\n {\n class: { \"text-muted\": _vm.month !== date.month },\n attrs: { \"data-action\": \"select\" }\n },\n [_vm._v(_vm._s(date.date))]\n )\n ]\n )\n ],\n 1\n )\n })\n ],\n 2\n )\n }),\n 0\n )\n ]\n )\n};\nvar __vue_staticRenderFns__$c = [];\n__vue_render__$c._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$c = undefined;\n /* scoped */\n var __vue_scope_id__$c = undefined;\n /* module identifier */\n var __vue_module_identifier__$c = undefined;\n /* functional template */\n var __vue_is_functional_template__$c = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$c = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$c, staticRenderFns: __vue_staticRenderFns__$c },\n __vue_inject_styles__$c,\n __vue_script__$c,\n __vue_scope_id__$c,\n __vue_is_functional_template__$c,\n __vue_module_identifier__$c,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar script$b = {\n components: { Btn: Btn },\n mixins: [Local],\n props: {\n month: Number,\n year: Number,\n iconControlLeft: String,\n iconControlRight: String\n },\n data: function data () {\n return {\n rows: []\n }\n },\n mounted: function mounted () {\n for (var i = 0; i < 4; i++) {\n this.rows.push([]);\n for (var j = 0; j < 3; j++) {\n this.rows[i].push(i * 3 + j + 1);\n }\n }\n },\n methods: {\n tCell: function tCell (cell) {\n return this.t((\"uiv.datePicker.month\" + cell))\n },\n getBtnClass: function getBtnClass (month) {\n if (month === this.month) {\n return 'primary'\n } else {\n return 'default'\n }\n },\n goPrevYear: function goPrevYear () {\n this.$emit('year-change', this.year - 1);\n },\n goNextYear: function goNextYear () {\n this.$emit('year-change', this.year + 1);\n },\n changeView: function changeView (monthIndex) {\n if (isExist(monthIndex)) {\n this.$emit('month-change', monthIndex);\n this.$emit('view-change', 'd');\n } else {\n this.$emit('view-change', 'y');\n }\n }\n }\n};\n\n/* script */\nvar __vue_script__$b = script$b;\n\n/* template */\nvar __vue_render__$b = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"table\",\n { staticStyle: { width: \"100%\" }, attrs: { role: \"grid\" } },\n [\n _c(\"thead\", [\n _c(\"tr\", [\n _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n staticClass: \"uiv-datepicker-pager-prev\",\n staticStyle: { border: \"none\" },\n attrs: { block: \"\", size: \"sm\" },\n on: { click: _vm.goPrevYear }\n },\n [_c(\"i\", { class: _vm.iconControlLeft })]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"td\",\n { attrs: { colspan: \"4\" } },\n [\n _c(\n \"btn\",\n {\n staticClass: \"uiv-datepicker-title\",\n staticStyle: { border: \"none\" },\n attrs: { block: \"\", size: \"sm\" },\n on: {\n click: function($event) {\n return _vm.changeView()\n }\n }\n },\n [_c(\"b\", [_vm._v(_vm._s(_vm.year))])]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n staticClass: \"uiv-datepicker-pager-next\",\n staticStyle: { border: \"none\" },\n attrs: { block: \"\", size: \"sm\" },\n on: { click: _vm.goNextYear }\n },\n [_c(\"i\", { class: _vm.iconControlRight })]\n )\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\n \"tbody\",\n _vm._l(_vm.rows, function(row, i) {\n return _c(\n \"tr\",\n _vm._l(row, function(month, j) {\n return _c(\n \"td\",\n { attrs: { colspan: \"2\", width: \"33.333333%\" } },\n [\n _c(\n \"btn\",\n {\n staticStyle: { border: \"none\" },\n attrs: {\n block: \"\",\n size: \"sm\",\n type: _vm.getBtnClass(i * 3 + j)\n },\n on: {\n click: function($event) {\n return _vm.changeView(i * 3 + j)\n }\n }\n },\n [_c(\"span\", [_vm._v(_vm._s(_vm.tCell(month)))])]\n )\n ],\n 1\n )\n }),\n 0\n )\n }),\n 0\n )\n ]\n )\n};\nvar __vue_staticRenderFns__$b = [];\n__vue_render__$b._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$b = undefined;\n /* scoped */\n var __vue_scope_id__$b = undefined;\n /* module identifier */\n var __vue_module_identifier__$b = undefined;\n /* functional template */\n var __vue_is_functional_template__$b = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$b = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$b, staticRenderFns: __vue_staticRenderFns__$b },\n __vue_inject_styles__$b,\n __vue_script__$b,\n __vue_scope_id__$b,\n __vue_is_functional_template__$b,\n __vue_module_identifier__$b,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar script$a = {\n components: { Btn: Btn },\n props: {\n year: Number,\n iconControlLeft: String,\n iconControlRight: String\n },\n computed: {\n rows: function rows () {\n var rows = [];\n var yearGroupStart = this.year - this.year % 20;\n for (var i = 0; i < 4; i++) {\n rows.push([]);\n for (var j = 0; j < 5; j++) {\n rows[i].push(yearGroupStart + i * 5 + j);\n }\n }\n return rows\n },\n yearStr: function yearStr () {\n var start = this.year - this.year % 20;\n return (start + \" ~ \" + (start + 19))\n }\n },\n methods: {\n getBtnClass: function getBtnClass (year) {\n if (year === this.year) {\n return 'primary'\n } else {\n return 'default'\n }\n },\n goPrevYear: function goPrevYear () {\n this.$emit('year-change', this.year - 20);\n },\n goNextYear: function goNextYear () {\n this.$emit('year-change', this.year + 20);\n },\n changeView: function changeView (year) {\n this.$emit('year-change', year);\n this.$emit('view-change', 'm');\n }\n }\n};\n\n/* script */\nvar __vue_script__$a = script$a;\n\n/* template */\nvar __vue_render__$a = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"table\",\n { staticStyle: { width: \"100%\" }, attrs: { role: \"grid\" } },\n [\n _c(\"thead\", [\n _c(\"tr\", [\n _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n staticClass: \"uiv-datepicker-pager-prev\",\n staticStyle: { border: \"none\" },\n attrs: { block: \"\", size: \"sm\" },\n on: { click: _vm.goPrevYear }\n },\n [_c(\"i\", { class: _vm.iconControlLeft })]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"td\",\n { attrs: { colspan: \"3\" } },\n [\n _c(\n \"btn\",\n {\n staticClass: \"uiv-datepicker-title\",\n staticStyle: { border: \"none\" },\n attrs: { block: \"\", size: \"sm\" }\n },\n [_c(\"b\", [_vm._v(_vm._s(_vm.yearStr))])]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n staticClass: \"uiv-datepicker-pager-next\",\n staticStyle: { border: \"none\" },\n attrs: { block: \"\", size: \"sm\" },\n on: { click: _vm.goNextYear }\n },\n [_c(\"i\", { class: _vm.iconControlRight })]\n )\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\n \"tbody\",\n _vm._l(_vm.rows, function(row) {\n return _c(\n \"tr\",\n _vm._l(row, function(year) {\n return _c(\n \"td\",\n { attrs: { width: \"20%\" } },\n [\n _c(\n \"btn\",\n {\n staticStyle: { border: \"none\" },\n attrs: {\n block: \"\",\n size: \"sm\",\n type: _vm.getBtnClass(year)\n },\n on: {\n click: function($event) {\n return _vm.changeView(year)\n }\n }\n },\n [_c(\"span\", [_vm._v(_vm._s(year))])]\n )\n ],\n 1\n )\n }),\n 0\n )\n }),\n 0\n )\n ]\n )\n};\nvar __vue_staticRenderFns__$a = [];\n__vue_render__$a._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$a = undefined;\n /* scoped */\n var __vue_scope_id__$a = undefined;\n /* module identifier */\n var __vue_module_identifier__$a = undefined;\n /* functional template */\n var __vue_is_functional_template__$a = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$a = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$a, staticRenderFns: __vue_staticRenderFns__$a },\n __vue_inject_styles__$a,\n __vue_script__$a,\n __vue_scope_id__$a,\n __vue_is_functional_template__$a,\n __vue_module_identifier__$a,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar script$9 = {\n mixins: [Local],\n components: { DateView: __vue_component__$c, MonthView: __vue_component__$b, YearView: __vue_component__$a, Btn: Btn },\n props: {\n value: null,\n width: {\n type: Number,\n default: 270\n },\n todayBtn: {\n type: Boolean,\n default: true\n },\n clearBtn: {\n type: Boolean,\n default: true\n },\n closeOnSelected: {\n type: Boolean,\n default: true\n },\n limitFrom: null,\n limitTo: null,\n format: {\n type: String,\n default: 'yyyy-MM-dd'\n },\n initialView: {\n type: String,\n default: 'd'\n },\n dateParser: {\n type: Function,\n default: Date.parse\n },\n dateClass: Function,\n yearMonthFormatter: Function,\n weekStartsWith: {\n type: Number,\n default: 0,\n validator: function validator (value) {\n return value >= 0 && value <= 6\n }\n },\n weekNumbers: Boolean,\n iconControlLeft: {\n type: String,\n default: 'glyphicon glyphicon-chevron-left'\n },\n iconControlRight: {\n type: String,\n default: 'glyphicon glyphicon-chevron-right'\n }\n },\n data: function data () {\n return {\n show: false,\n now: new Date(),\n currentMonth: 0,\n currentYear: 0,\n view: 'd'\n }\n },\n computed: {\n valueDateObj: function valueDateObj () {\n var ts = this.dateParser(this.value);\n if (isNaN(ts)) {\n return null\n } else {\n var date = new Date(ts);\n if (date.getHours() !== 0) {\n date = new Date(ts + date.getTimezoneOffset() * 60 * 1000);\n }\n return date\n }\n },\n pickerStyle: function pickerStyle () {\n return {\n width: this.width + 'px'\n }\n },\n pickerClass: function pickerClass () {\n return {\n 'uiv-datepicker': true,\n 'uiv-datepicker-date': this.view === 'd',\n 'uiv-datepicker-month': this.view === 'm',\n 'uiv-datepicker-year': this.view === 'y'\n }\n },\n limit: function limit () {\n var limit = {};\n if (this.limitFrom) {\n var limitFrom = this.dateParser(this.limitFrom);\n if (!isNaN(limitFrom)) {\n limitFrom = convertDateToUTC(new Date(limitFrom));\n limitFrom.setHours(0, 0, 0, 0);\n limit.from = limitFrom;\n }\n }\n if (this.limitTo) {\n var limitTo = this.dateParser(this.limitTo);\n if (!isNaN(limitTo)) {\n limitTo = convertDateToUTC(new Date(limitTo));\n limitTo.setHours(0, 0, 0, 0);\n limit.to = limitTo;\n }\n }\n return limit\n }\n },\n mounted: function mounted () {\n if (this.value) {\n this.setMonthAndYearByValue(this.value);\n } else {\n this.currentMonth = this.now.getMonth();\n this.currentYear = this.now.getFullYear();\n this.view = this.initialView;\n }\n },\n watch: {\n value: function value (val, oldVal) {\n this.setMonthAndYearByValue(val, oldVal);\n }\n },\n methods: {\n setMonthAndYearByValue: function setMonthAndYearByValue (val, oldVal) {\n var ts = this.dateParser(val);\n if (!isNaN(ts)) {\n var date = new Date(ts);\n if (date.getHours() !== 0) {\n date = new Date(ts + date.getTimezoneOffset() * 60 * 1000);\n }\n if (this.limit && ((this.limit.from && date < this.limit.from) || (this.limit.to && date >= this.limit.to))) {\n this.$emit('input', oldVal || '');\n } else {\n this.currentMonth = date.getMonth();\n this.currentYear = date.getFullYear();\n }\n }\n },\n onMonthChange: function onMonthChange (month) {\n this.currentMonth = month;\n },\n onYearChange: function onYearChange (year) {\n this.currentYear = year;\n this.currentMonth = undefined;\n },\n onDateChange: function onDateChange (date) {\n if (date && isNumber(date.date) && isNumber(date.month) && isNumber(date.year)) {\n var _date = new Date(date.year, date.month, date.date);\n this.$emit('input', this.format ? stringify(_date, this.format) : _date);\n // if the input event trigger nothing (same value)\n // manually correct\n this.currentMonth = date.month;\n this.currentYear = date.year;\n } else {\n this.$emit('input', '');\n }\n },\n onViewChange: function onViewChange (view) {\n this.view = view;\n },\n selectToday: function selectToday () {\n this.view = 'd';\n this.onDateChange({\n date: this.now.getDate(),\n month: this.now.getMonth(),\n year: this.now.getFullYear()\n });\n },\n clearSelect: function clearSelect () {\n this.currentMonth = this.now.getMonth();\n this.currentYear = this.now.getFullYear();\n this.view = this.initialView;\n this.onDateChange();\n },\n onPickerClick: function onPickerClick (event) {\n if (event.target.getAttribute('data-action') !== 'select' || !this.closeOnSelected) {\n event.stopPropagation();\n }\n }\n }\n};\n\n/* script */\nvar __vue_script__$9 = script$9;\n\n/* template */\nvar __vue_render__$9 = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"div\",\n {\n class: _vm.pickerClass,\n style: _vm.pickerStyle,\n attrs: { \"data-role\": \"date-picker\" },\n on: { click: _vm.onPickerClick }\n },\n [\n _c(\"date-view\", {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.view === \"d\",\n expression: \"view==='d'\"\n }\n ],\n attrs: {\n month: _vm.currentMonth,\n year: _vm.currentYear,\n date: _vm.valueDateObj,\n today: _vm.now,\n limit: _vm.limit,\n \"week-starts-with\": _vm.weekStartsWith,\n \"icon-control-left\": _vm.iconControlLeft,\n \"icon-control-right\": _vm.iconControlRight,\n \"date-class\": _vm.dateClass,\n \"year-month-formatter\": _vm.yearMonthFormatter,\n \"week-numbers\": _vm.weekNumbers,\n locale: _vm.locale\n },\n on: {\n \"month-change\": _vm.onMonthChange,\n \"year-change\": _vm.onYearChange,\n \"date-change\": _vm.onDateChange,\n \"view-change\": _vm.onViewChange\n }\n }),\n _vm._v(\" \"),\n _c(\"month-view\", {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.view === \"m\",\n expression: \"view==='m'\"\n }\n ],\n attrs: {\n month: _vm.currentMonth,\n year: _vm.currentYear,\n \"icon-control-left\": _vm.iconControlLeft,\n \"icon-control-right\": _vm.iconControlRight,\n locale: _vm.locale\n },\n on: {\n \"month-change\": _vm.onMonthChange,\n \"year-change\": _vm.onYearChange,\n \"view-change\": _vm.onViewChange\n }\n }),\n _vm._v(\" \"),\n _c(\"year-view\", {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.view === \"y\",\n expression: \"view==='y'\"\n }\n ],\n attrs: {\n year: _vm.currentYear,\n \"icon-control-left\": _vm.iconControlLeft,\n \"icon-control-right\": _vm.iconControlRight\n },\n on: { \"year-change\": _vm.onYearChange, \"view-change\": _vm.onViewChange }\n }),\n _vm._v(\" \"),\n _vm.todayBtn || _vm.clearBtn\n ? _c(\"div\", [\n _c(\"br\"),\n _vm._v(\" \"),\n _c(\n \"div\",\n { staticClass: \"text-center\" },\n [\n _vm.todayBtn\n ? _c(\"btn\", {\n attrs: {\n \"data-action\": \"select\",\n type: \"info\",\n size: \"sm\"\n },\n domProps: {\n textContent: _vm._s(_vm.t(\"uiv.datePicker.today\"))\n },\n on: { click: _vm.selectToday }\n })\n : _vm._e(),\n _vm._v(\" \"),\n _vm.clearBtn\n ? _c(\"btn\", {\n attrs: { \"data-action\": \"select\", size: \"sm\" },\n domProps: {\n textContent: _vm._s(_vm.t(\"uiv.datePicker.clear\"))\n },\n on: { click: _vm.clearSelect }\n })\n : _vm._e()\n ],\n 1\n )\n ])\n : _vm._e()\n ],\n 1\n )\n};\nvar __vue_staticRenderFns__$9 = [];\n__vue_render__$9._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$9 = undefined;\n /* scoped */\n var __vue_scope_id__$9 = undefined;\n /* module identifier */\n var __vue_module_identifier__$9 = undefined;\n /* functional template */\n var __vue_is_functional_template__$9 = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$9 = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$9, staticRenderFns: __vue_staticRenderFns__$9 },\n __vue_inject_styles__$9,\n __vue_script__$9,\n __vue_scope_id__$9,\n __vue_is_functional_template__$9,\n __vue_module_identifier__$9,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar HANDLER = '_uiv_scroll_handler';\nvar events$1 = [EVENTS.RESIZE, EVENTS.SCROLL];\n\nvar bind$3 = function (el, binding) {\n var callback = binding.value;\n if (!isFunction(callback)) {\n return\n }\n unbind$3(el);\n el[HANDLER] = callback;\n events$1.forEach(function (event) {\n on(window, event, el[HANDLER]);\n });\n};\n\nvar unbind$3 = function (el) {\n events$1.forEach(function (event) {\n off(window, event, el[HANDLER]);\n });\n delete el[HANDLER];\n};\n\nvar update$3 = function (el, binding) {\n if (binding.value !== binding.oldValue) {\n bind$3(el, binding);\n }\n};\n\nvar scroll = { bind: bind$3, unbind: unbind$3, update: update$3 };\n\nvar script$8 = {\n directives: {\n scroll: scroll\n },\n props: {\n offset: {\n type: Number,\n default: 0\n }\n },\n data: function data () {\n return {\n affixed: false\n }\n },\n computed: {\n classes: function classes () {\n return {\n affix: this.affixed\n }\n },\n styles: function styles () {\n return {\n top: this.affixed ? this.offset + 'px' : null\n }\n }\n },\n methods: {\n // from https://github.com/ant-design/ant-design/blob/master/components/affix/index.jsx#L20\n onScroll: function onScroll () {\n var this$1 = this;\n\n // if is hidden don't calculate anything\n if (!(this.$el.offsetWidth || this.$el.offsetHeight || this.$el.getClientRects().length)) {\n return\n }\n // get window scroll and element position to detect if have to be normal or affixed\n var scroll = {};\n var element = {};\n var rect = this.$el.getBoundingClientRect();\n var body = document.body;\n var types = ['Top', 'Left'];\n types.forEach(function (type) {\n var t = type.toLowerCase();\n scroll[t] = window['page' + (type === 'Top' ? 'Y' : 'X') + 'Offset'];\n element[t] = scroll[t] + rect[t] - (this$1.$el['client' + type] || body['client' + type] || 0);\n });\n var fix = scroll.top > element.top - this.offset;\n if (this.affixed !== fix) {\n this.affixed = fix;\n this.$emit(this.affixed ? 'affix' : 'unfix');\n this.$nextTick(function () {\n this$1.$emit(this$1.affixed ? 'affixed' : 'unfixed');\n });\n }\n }\n }\n};\n\n/* script */\nvar __vue_script__$8 = script$8;\n\n/* template */\nvar __vue_render__$8 = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\"div\", { staticClass: \"hidden-print\" }, [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"scroll\",\n rawName: \"v-scroll\",\n value: _vm.onScroll,\n expression: \"onScroll\"\n }\n ],\n class: _vm.classes,\n style: _vm.styles\n },\n [_vm._t(\"default\")],\n 2\n )\n ])\n};\nvar __vue_staticRenderFns__$8 = [];\n__vue_render__$8._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$8 = undefined;\n /* scoped */\n var __vue_scope_id__$8 = undefined;\n /* module identifier */\n var __vue_module_identifier__$8 = undefined;\n /* functional template */\n var __vue_is_functional_template__$8 = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$8 = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$8, staticRenderFns: __vue_staticRenderFns__$8 },\n __vue_inject_styles__$8,\n __vue_script__$8,\n __vue_scope_id__$8,\n __vue_is_functional_template__$8,\n __vue_module_identifier__$8,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar script$7 = {\n props: {\n dismissible: {\n type: Boolean,\n default: false\n },\n duration: {\n type: Number,\n default: 0\n },\n type: {\n type: String,\n default: 'info'\n }\n },\n data: function data () {\n return {\n timeout: 0\n }\n },\n computed: {\n alertClass: function alertClass () {\n var obj;\n\n return ( obj = {\n alert: true\n }, obj[(\"alert-\" + (this.type))] = Boolean(this.type), obj['alert-dismissible'] = this.dismissible, obj )\n }\n },\n methods: {\n closeAlert: function closeAlert () {\n clearTimeout(this.timeout);\n this.$emit('dismissed');\n }\n },\n mounted: function mounted () {\n if (this.duration > 0) {\n this.timeout = setTimeout(this.closeAlert, this.duration);\n }\n },\n destroyed: function destroyed () {\n clearTimeout(this.timeout);\n }\n};\n\n/* script */\nvar __vue_script__$7 = script$7;\n\n/* template */\nvar __vue_render__$7 = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"div\",\n { class: _vm.alertClass, attrs: { role: \"alert\" } },\n [\n _vm.dismissible\n ? _c(\n \"button\",\n {\n staticClass: \"close\",\n attrs: { type: \"button\", \"aria-label\": \"Close\" },\n on: { click: _vm.closeAlert }\n },\n [_c(\"span\", { attrs: { \"aria-hidden\": \"true\" } }, [_vm._v(\"×\")])]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm._t(\"default\")\n ],\n 2\n )\n};\nvar __vue_staticRenderFns__$7 = [];\n__vue_render__$7._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$7 = undefined;\n /* scoped */\n var __vue_scope_id__$7 = undefined;\n /* module identifier */\n var __vue_module_identifier__$7 = undefined;\n /* functional template */\n var __vue_is_functional_template__$7 = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$7 = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$7, staticRenderFns: __vue_staticRenderFns__$7 },\n __vue_inject_styles__$7,\n __vue_script__$7,\n __vue_scope_id__$7,\n __vue_is_functional_template__$7,\n __vue_module_identifier__$7,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar script$6 = {\n props: {\n value: {\n type: Number,\n required: true,\n validator: function (v) { return v >= 1; }\n },\n boundaryLinks: {\n type: Boolean,\n default: false\n },\n directionLinks: {\n type: Boolean,\n default: true\n },\n size: String,\n align: String,\n totalPage: {\n type: Number,\n required: true,\n validator: function (v) { return v >= 0; }\n },\n maxSize: {\n type: Number,\n default: 5,\n validator: function (v) { return v >= 0; }\n },\n disabled: Boolean\n },\n data: function data () {\n return {\n sliceStart: 0\n }\n },\n computed: {\n navClasses: function navClasses () {\n var obj;\n\n return ( obj = {}, obj[(\"text-\" + (this.align))] = Boolean(this.align), obj )\n },\n classes: function classes () {\n var obj;\n\n return ( obj = {}, obj[(\"pagination-\" + (this.size))] = Boolean(this.size), obj )\n },\n sliceArray: function sliceArray () {\n return range(this.totalPage).slice(this.sliceStart, this.sliceStart + this.maxSize)\n }\n },\n methods: {\n calculateSliceStart: function calculateSliceStart () {\n var currentPage = this.value;\n var chunkSize = this.maxSize;\n var currentChunkStart = this.sliceStart;\n var currentChunkEnd = currentChunkStart + chunkSize;\n if (currentPage > currentChunkEnd) {\n var lastChunkStart = this.totalPage - chunkSize;\n if (currentPage > lastChunkStart) {\n this.sliceStart = lastChunkStart;\n } else {\n this.sliceStart = currentPage - 1;\n }\n } else if (currentPage < currentChunkStart + 1) {\n if (currentPage > chunkSize) {\n this.sliceStart = currentPage - chunkSize;\n } else {\n this.sliceStart = 0;\n }\n }\n },\n onPageChange: function onPageChange (page) {\n if (!this.disabled && page > 0 && page <= this.totalPage && page !== this.value) {\n this.$emit('input', page);\n this.$emit('change', page);\n }\n },\n toPage: function toPage (pre) {\n if (this.disabled) {\n return\n }\n var chunkSize = this.maxSize;\n var currentChunkStart = this.sliceStart;\n var lastChunkStart = this.totalPage - chunkSize;\n var start = pre ? currentChunkStart - chunkSize : currentChunkStart + chunkSize;\n if (start < 0) {\n this.sliceStart = 0;\n } else if (start > lastChunkStart) {\n this.sliceStart = lastChunkStart;\n } else {\n this.sliceStart = start;\n }\n }\n },\n created: function created () {\n this.$watch(function (vm) { return [vm.value, vm.maxSize, vm.totalPage].join(); }, this.calculateSliceStart, {\n immediate: true\n });\n }\n};\n\n/* script */\nvar __vue_script__$6 = script$6;\n\n/* template */\nvar __vue_render__$6 = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"nav\",\n { class: _vm.navClasses, attrs: { \"aria-label\": \"Page navigation\" } },\n [\n _c(\n \"ul\",\n { staticClass: \"pagination\", class: _vm.classes },\n [\n _vm.boundaryLinks\n ? _c(\n \"li\",\n { class: { disabled: _vm.value <= 1 || _vm.disabled } },\n [\n _c(\n \"a\",\n {\n attrs: {\n href: \"#\",\n role: \"button\",\n \"aria-label\": \"First\"\n },\n on: {\n click: function($event) {\n $event.preventDefault();\n return _vm.onPageChange(1)\n }\n }\n },\n [\n _c(\"span\", { attrs: { \"aria-hidden\": \"true\" } }, [\n _vm._v(\"«\")\n ])\n ]\n )\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.directionLinks\n ? _c(\n \"li\",\n { class: { disabled: _vm.value <= 1 || _vm.disabled } },\n [\n _c(\n \"a\",\n {\n attrs: {\n href: \"#\",\n role: \"button\",\n \"aria-label\": \"Previous\"\n },\n on: {\n click: function($event) {\n $event.preventDefault();\n return _vm.onPageChange(_vm.value - 1)\n }\n }\n },\n [\n _c(\"span\", { attrs: { \"aria-hidden\": \"true\" } }, [\n _vm._v(\"‹\")\n ])\n ]\n )\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.sliceStart > 0\n ? _c(\"li\", { class: { disabled: _vm.disabled } }, [\n _c(\n \"a\",\n {\n attrs: {\n href: \"#\",\n role: \"button\",\n \"aria-label\": \"Previous group\"\n },\n on: {\n click: function($event) {\n $event.preventDefault();\n return _vm.toPage(1)\n }\n }\n },\n [\n _c(\"span\", { attrs: { \"aria-hidden\": \"true\" } }, [\n _vm._v(\"…\")\n ])\n ]\n )\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _vm._l(_vm.sliceArray, function(item) {\n return _c(\n \"li\",\n {\n key: item,\n class: {\n active: _vm.value === item + 1,\n disabled: _vm.disabled\n }\n },\n [\n _c(\n \"a\",\n {\n attrs: { href: \"#\", role: \"button\" },\n on: {\n click: function($event) {\n $event.preventDefault();\n return _vm.onPageChange(item + 1)\n }\n }\n },\n [_vm._v(_vm._s(item + 1))]\n )\n ]\n )\n }),\n _vm._v(\" \"),\n _vm.sliceStart < _vm.totalPage - _vm.maxSize\n ? _c(\"li\", { class: { disabled: _vm.disabled } }, [\n _c(\n \"a\",\n {\n attrs: {\n href: \"#\",\n role: \"button\",\n \"aria-label\": \"Next group\"\n },\n on: {\n click: function($event) {\n $event.preventDefault();\n return _vm.toPage(0)\n }\n }\n },\n [\n _c(\"span\", { attrs: { \"aria-hidden\": \"true\" } }, [\n _vm._v(\"…\")\n ])\n ]\n )\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _vm.directionLinks\n ? _c(\n \"li\",\n {\n class: {\n disabled: _vm.value >= _vm.totalPage || _vm.disabled\n }\n },\n [\n _c(\n \"a\",\n {\n attrs: {\n href: \"#\",\n role: \"button\",\n \"aria-label\": \"Next\"\n },\n on: {\n click: function($event) {\n $event.preventDefault();\n return _vm.onPageChange(_vm.value + 1)\n }\n }\n },\n [\n _c(\"span\", { attrs: { \"aria-hidden\": \"true\" } }, [\n _vm._v(\"›\")\n ])\n ]\n )\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.boundaryLinks\n ? _c(\n \"li\",\n {\n class: {\n disabled: _vm.value >= _vm.totalPage || _vm.disabled\n }\n },\n [\n _c(\n \"a\",\n {\n attrs: {\n href: \"#\",\n role: \"button\",\n \"aria-label\": \"Last\"\n },\n on: {\n click: function($event) {\n $event.preventDefault();\n return _vm.onPageChange(_vm.totalPage)\n }\n }\n },\n [\n _c(\"span\", { attrs: { \"aria-hidden\": \"true\" } }, [\n _vm._v(\"»\")\n ])\n ]\n )\n ]\n )\n : _vm._e()\n ],\n 2\n )\n ]\n )\n};\nvar __vue_staticRenderFns__$6 = [];\n__vue_render__$6._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$6 = undefined;\n /* scoped */\n var __vue_scope_id__$6 = undefined;\n /* module identifier */\n var __vue_module_identifier__$6 = undefined;\n /* functional template */\n var __vue_is_functional_template__$6 = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$6 = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$6, staticRenderFns: __vue_staticRenderFns__$6 },\n __vue_inject_styles__$6,\n __vue_script__$6,\n __vue_scope_id__$6,\n __vue_is_functional_template__$6,\n __vue_module_identifier__$6,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar SHOW_CLASS = 'in';\n\nvar popupMixin = {\n props: {\n value: {\n type: Boolean,\n default: false\n },\n tag: {\n type: String,\n default: 'span'\n },\n placement: {\n type: String,\n default: PLACEMENTS$1.TOP\n },\n autoPlacement: {\n type: Boolean,\n default: true\n },\n appendTo: {\n type: null,\n default: 'body'\n },\n positionBy: {\n type: null,\n default: null\n },\n transition: {\n type: Number,\n default: 150\n },\n hideDelay: {\n type: Number,\n default: 0\n },\n showDelay: {\n type: Number,\n default: 0\n },\n enable: {\n type: Boolean,\n default: true\n },\n enterable: {\n type: Boolean,\n default: true\n },\n target: null,\n viewport: null,\n customClass: String\n },\n data: function data () {\n return {\n triggerEl: null,\n hideTimeoutId: 0,\n showTimeoutId: 0,\n transitionTimeoutId: 0,\n autoTimeoutId: 0\n }\n },\n watch: {\n value: function value (v) {\n v ? this.show() : this.hide();\n },\n trigger: function trigger () {\n this.clearListeners();\n this.initListeners();\n },\n target: function target (value) {\n this.clearListeners();\n this.initTriggerElByTarget(value);\n this.initListeners();\n },\n allContent: function allContent (value) {\n var this$1 = this;\n\n // can not use value because it can not detect slot changes\n if (this.isNotEmpty()) {\n // reset position while content changed & is shown\n // nextTick is required\n this.$nextTick(function () {\n /* istanbul ignore else */\n if (this$1.isShown()) {\n this$1.resetPosition();\n }\n });\n } else {\n this.hide();\n }\n },\n enable: function enable (value) {\n // hide if enable changed to false\n /* istanbul ignore else */\n if (!value) {\n this.hide();\n }\n }\n },\n mounted: function mounted () {\n var this$1 = this;\n\n ensureElementMatchesFunction();\n removeFromDom(this.$refs.popup);\n this.$nextTick(function () {\n this$1.initTriggerElByTarget(this$1.target);\n this$1.initListeners();\n if (this$1.value) {\n this$1.show();\n }\n });\n },\n beforeDestroy: function beforeDestroy () {\n this.clearListeners();\n removeFromDom(this.$refs.popup);\n },\n methods: {\n initTriggerElByTarget: function initTriggerElByTarget (target) {\n if (target) {\n // target exist\n this.triggerEl = getElementBySelectorOrRef(target);\n } else {\n // find special element\n var trigger = this.$el.querySelector('[data-role=\"trigger\"]');\n if (trigger) {\n this.triggerEl = trigger;\n } else {\n // use the first child\n var firstChild = this.$el.firstChild;\n this.triggerEl = firstChild === this.$refs.popup ? null : firstChild;\n }\n }\n },\n initListeners: function initListeners () {\n if (this.triggerEl) {\n if (this.trigger === TRIGGERS.HOVER) {\n on(this.triggerEl, EVENTS.MOUSE_ENTER, this.show);\n on(this.triggerEl, EVENTS.MOUSE_LEAVE, this.hide);\n } else if (this.trigger === TRIGGERS.FOCUS) {\n on(this.triggerEl, EVENTS.FOCUS, this.show);\n on(this.triggerEl, EVENTS.BLUR, this.hide);\n } else if (this.trigger === TRIGGERS.HOVER_FOCUS) {\n on(this.triggerEl, EVENTS.MOUSE_ENTER, this.handleAuto);\n on(this.triggerEl, EVENTS.MOUSE_LEAVE, this.handleAuto);\n on(this.triggerEl, EVENTS.FOCUS, this.handleAuto);\n on(this.triggerEl, EVENTS.BLUR, this.handleAuto);\n } else if (this.trigger === TRIGGERS.CLICK || this.trigger === TRIGGERS.OUTSIDE_CLICK) {\n on(this.triggerEl, EVENTS.CLICK, this.toggle);\n }\n }\n on(window, EVENTS.CLICK, this.windowClicked);\n },\n clearListeners: function clearListeners () {\n if (this.triggerEl) {\n off(this.triggerEl, EVENTS.FOCUS, this.show);\n off(this.triggerEl, EVENTS.BLUR, this.hide);\n off(this.triggerEl, EVENTS.MOUSE_ENTER, this.show);\n off(this.triggerEl, EVENTS.MOUSE_LEAVE, this.hide);\n off(this.triggerEl, EVENTS.CLICK, this.toggle);\n off(this.triggerEl, EVENTS.MOUSE_ENTER, this.handleAuto);\n off(this.triggerEl, EVENTS.MOUSE_LEAVE, this.handleAuto);\n off(this.triggerEl, EVENTS.FOCUS, this.handleAuto);\n off(this.triggerEl, EVENTS.BLUR, this.handleAuto);\n }\n off(window, EVENTS.CLICK, this.windowClicked);\n this.clearTimeouts();\n },\n clearTimeouts: function clearTimeouts () {\n if (this.hideTimeoutId) {\n clearTimeout(this.hideTimeoutId);\n this.hideTimeoutId = 0;\n }\n if (this.showTimeoutId) {\n clearTimeout(this.showTimeoutId);\n this.showTimeoutId = 0;\n }\n if (this.transitionTimeoutId) {\n clearTimeout(this.transitionTimeoutId);\n this.transitionTimeoutId = 0;\n }\n if (this.autoTimeoutId) {\n clearTimeout(this.autoTimeoutId);\n this.autoTimeoutId = 0;\n }\n },\n resetPosition: function resetPosition () {\n var popup = this.$refs.popup;\n /* istanbul ignore else */\n if (popup) {\n setTooltipPosition(popup, this.triggerEl, this.placement, this.autoPlacement, this.appendTo, this.positionBy, this.viewport);\n popup.offsetHeight;\n }\n },\n hideOnLeave: function hideOnLeave () {\n if (this.trigger === TRIGGERS.HOVER || (this.trigger === TRIGGERS.HOVER_FOCUS && !this.triggerEl.matches(':focus'))) {\n this.$hide();\n }\n },\n toggle: function toggle () {\n if (this.isShown()) {\n this.hide();\n } else {\n this.show();\n }\n },\n show: function show () {\n var this$1 = this;\n\n if (this.enable && this.triggerEl && this.isNotEmpty() && !this.isShown()) {\n var popUpAppendedContainer = this.hideTimeoutId > 0; // weird condition\n if (popUpAppendedContainer) {\n clearTimeout(this.hideTimeoutId);\n this.hideTimeoutId = 0;\n }\n if (this.transitionTimeoutId > 0) {\n clearTimeout(this.transitionTimeoutId);\n this.transitionTimeoutId = 0;\n }\n clearTimeout(this.showTimeoutId);\n this.showTimeoutId = setTimeout(function () {\n this$1.showTimeoutId = 0;\n var popup = this$1.$refs.popup;\n if (popup) {\n var alreadyOpenModalNum = getOpenModalNum();\n if (alreadyOpenModalNum > 1) {\n var defaultZ = this$1.name === 'popover' ? 1060 : 1070;\n var offset = (alreadyOpenModalNum - 1) * 20;\n popup.style.zIndex = \"\" + (defaultZ + offset);\n }\n // add to dom\n if (!popUpAppendedContainer) {\n popup.className = (this$1.name) + \" \" + (this$1.placement) + \" \" + (this$1.customClass ? this$1.customClass : '') + \" fade\";\n var container = getElementBySelectorOrRef(this$1.appendTo);\n container.appendChild(popup);\n this$1.resetPosition();\n }\n addClass(popup, SHOW_CLASS);\n this$1.$emit('input', true);\n this$1.$emit('show');\n }\n }, this.showDelay);\n }\n },\n hide: function hide () {\n var this$1 = this;\n\n if (this.showTimeoutId > 0) {\n clearTimeout(this.showTimeoutId);\n this.showTimeoutId = 0;\n }\n\n if (!this.isShown()) {\n return\n }\n if (this.enterable && (this.trigger === TRIGGERS.HOVER || this.trigger === TRIGGERS.HOVER_FOCUS)) {\n clearTimeout(this.hideTimeoutId);\n this.hideTimeoutId = setTimeout(function () {\n this$1.hideTimeoutId = 0;\n var popup = this$1.$refs.popup;\n if (popup && !popup.matches(':hover')) {\n this$1.$hide();\n }\n }, 100);\n } else {\n this.$hide();\n }\n },\n $hide: function $hide () {\n var this$1 = this;\n\n if (this.isShown()) {\n clearTimeout(this.hideTimeoutId);\n this.hideTimeoutId = setTimeout(function () {\n this$1.hideTimeoutId = 0;\n removeClass(this$1.$refs.popup, SHOW_CLASS);\n // gives fade out time\n this$1.transitionTimeoutId = setTimeout(function () {\n this$1.transitionTimeoutId = 0;\n removeFromDom(this$1.$refs.popup);\n this$1.$emit('input', false);\n this$1.$emit('hide');\n }, this$1.transition);\n }, this.hideDelay);\n }\n },\n isShown: function isShown () {\n return hasClass(this.$refs.popup, SHOW_CLASS)\n },\n windowClicked: function windowClicked (event) {\n if (this.triggerEl && isFunction(this.triggerEl.contains) && !this.triggerEl.contains(event.target) &&\n this.trigger === TRIGGERS.OUTSIDE_CLICK && !(this.$refs.popup && this.$refs.popup.contains(event.target)) &&\n this.isShown()) {\n this.hide();\n }\n },\n handleAuto: function handleAuto () {\n var this$1 = this;\n\n clearTimeout(this.autoTimeoutId);\n this.autoTimeoutId = setTimeout(function () {\n this$1.autoTimeoutId = 0;\n if (this$1.triggerEl.matches(':hover, :focus')) {\n this$1.show();\n } else {\n this$1.hide();\n }\n }, 20); // 20ms make firefox happy\n }\n }\n};\n\nvar Tooltip = {\n mixins: [popupMixin],\n data: function data () {\n return {\n name: 'tooltip'\n }\n },\n render: function render (h) {\n return h(\n this.tag,\n [\n this.$slots.default,\n h('div',\n {\n ref: 'popup',\n attrs: {\n role: 'tooltip'\n },\n on: {\n mouseleave: this.hideOnLeave\n }\n },\n [\n h('div', { class: 'tooltip-arrow' }),\n h('div', {\n class: 'tooltip-inner',\n domProps: { innerHTML: this.text }\n })\n ]\n )\n ]\n )\n },\n props: {\n text: {\n type: String,\n default: ''\n },\n trigger: {\n type: String,\n default: TRIGGERS.HOVER_FOCUS\n }\n },\n computed: {\n allContent: function allContent () {\n return this.text\n }\n },\n methods: {\n isNotEmpty: function isNotEmpty () {\n return this.text\n }\n }\n};\n\nvar Popover = {\n mixins: [popupMixin],\n data: function data () {\n return {\n name: 'popover'\n }\n },\n render: function render (h) {\n return h(this.tag,\n [\n this.$slots.default,\n h('div',\n {\n style: {\n display: 'block'\n },\n ref: 'popup',\n on: {\n mouseleave: this.hideOnLeave\n }\n },\n [\n h('div', { class: 'arrow' }),\n h('h3', {\n class: 'popover-title',\n directives: [\n { name: 'show', value: this.title }\n ]\n }, this.title),\n h('div', { class: 'popover-content' }, [this.content || this.$slots.popover])\n ]\n )\n ]\n )\n },\n props: {\n title: {\n type: String,\n default: ''\n },\n content: {\n type: String,\n default: ''\n },\n trigger: {\n type: String,\n default: TRIGGERS.OUTSIDE_CLICK\n }\n },\n computed: {\n allContent: function allContent () {\n return this.title + this.content\n }\n },\n methods: {\n isNotEmpty: function isNotEmpty () {\n return this.title || this.content || this.$slots.popover\n }\n }\n};\n\nvar maxHours = 23;\nvar zero = 0;\nvar maxMinutes = 59;\nvar cutUpAmAndPm = 12;\n\nvar script$5 = {\n components: { Btn: Btn },\n mixins: [Local],\n props: {\n value: {\n type: Date,\n required: true\n },\n showMeridian: {\n type: Boolean,\n default: true\n },\n min: Date,\n max: Date,\n hourStep: {\n type: Number,\n default: 1\n },\n minStep: {\n type: Number,\n default: 1\n },\n readonly: {\n type: Boolean,\n default: false\n },\n controls: {\n type: Boolean,\n default: true\n },\n iconControlUp: {\n type: String,\n default: 'glyphicon glyphicon-chevron-up'\n },\n iconControlDown: {\n type: String,\n default: 'glyphicon glyphicon-chevron-down'\n },\n inputWidth: {\n type: Number,\n default: 50\n }\n },\n data: function data () {\n return {\n hours: 0,\n minutes: 0,\n meridian: true,\n hoursText: '',\n minutesText: ''\n }\n },\n mounted: function mounted () {\n this.updateByValue(this.value);\n },\n computed: {\n inputStyles: function inputStyles () {\n return {\n width: ((this.inputWidth) + \"px\")\n }\n }\n },\n watch: {\n value: function value (value$1) {\n this.updateByValue(value$1);\n },\n showMeridian: function showMeridian (value) {\n this.setTime();\n },\n hoursText: function hoursText (value) {\n if (this.hours === 0 && value === '') {\n // Prevent a runtime reset from being overwritten\n return\n }\n var hour = parseInt(value);\n if (this.showMeridian) {\n if (hour >= 1 && hour <= cutUpAmAndPm) {\n if (this.meridian) {\n this.hours = hour === cutUpAmAndPm ? 0 : hour;\n } else {\n this.hours = hour === cutUpAmAndPm ? cutUpAmAndPm : hour + cutUpAmAndPm;\n }\n }\n } else if (hour >= zero && hour <= maxHours) {\n this.hours = hour;\n }\n this.setTime();\n },\n minutesText: function minutesText (value) {\n if (this.minutes === 0 && value === '') {\n // Prevent a runtime reset from being overwritten\n return\n }\n var minutesStr = parseInt(value);\n if (minutesStr >= zero && minutesStr <= maxMinutes) {\n this.minutes = minutesStr;\n }\n this.setTime();\n }\n },\n methods: {\n updateByValue: function updateByValue (value) {\n if (isNaN(value.getTime())) {\n this.hours = 0;\n this.minutes = 0;\n this.hoursText = '';\n this.minutesText = '';\n this.meridian = true;\n return\n }\n this.hours = value.getHours();\n this.minutes = value.getMinutes();\n if (!this.showMeridian) {\n this.hoursText = pad(this.hours, 2);\n } else {\n if (this.hours >= cutUpAmAndPm) {\n if (this.hours === cutUpAmAndPm) {\n this.hoursText = this.hours + '';\n } else {\n this.hoursText = pad(this.hours - cutUpAmAndPm, 2);\n }\n this.meridian = false;\n } else {\n if (this.hours === zero) {\n this.hoursText = cutUpAmAndPm.toString();\n } else {\n this.hoursText = pad(this.hours, 2);\n }\n this.meridian = true;\n }\n }\n this.minutesText = pad(this.minutes, 2);\n // lazy model won't update when using keyboard up/down\n this.$refs.hoursInput.value = this.hoursText;\n this.$refs.minutesInput.value = this.minutesText;\n },\n addHour: function addHour (step) {\n step = step || this.hourStep;\n this.hours = this.hours >= maxHours ? zero : this.hours + step;\n },\n reduceHour: function reduceHour (step) {\n step = step || this.hourStep;\n this.hours = this.hours <= zero ? maxHours : this.hours - step;\n },\n addMinute: function addMinute () {\n if (this.minutes >= maxMinutes) {\n this.minutes = zero;\n this.addHour(1);\n } else {\n this.minutes += this.minStep;\n }\n },\n reduceMinute: function reduceMinute () {\n if (this.minutes <= zero) {\n this.minutes = maxMinutes + 1 - this.minStep;\n this.reduceHour(1);\n } else {\n this.minutes -= this.minStep;\n }\n },\n changeTime: function changeTime (isHour, isPlus) {\n if (!this.readonly) {\n if (isHour && isPlus) {\n this.addHour();\n } else if (isHour && !isPlus) {\n this.reduceHour();\n } else if (!isHour && isPlus) {\n this.addMinute();\n } else {\n this.reduceMinute();\n }\n this.setTime();\n }\n },\n toggleMeridian: function toggleMeridian () {\n this.meridian = !this.meridian;\n if (this.meridian) {\n this.hours -= cutUpAmAndPm;\n } else {\n this.hours += cutUpAmAndPm;\n }\n this.setTime();\n },\n onWheel: function onWheel (e, isHour) {\n if (!this.readonly) {\n e.preventDefault();\n this.changeTime(isHour, e.deltaY < 0);\n }\n },\n setTime: function setTime () {\n var time = this.value;\n if (isNaN(time.getTime())) {\n time = new Date();\n time.setHours(0);\n time.setMinutes(0);\n }\n time.setHours(this.hours);\n time.setMinutes(this.minutes);\n if (this.max) {\n var max = new Date(time);\n max.setHours(this.max.getHours());\n max.setMinutes(this.max.getMinutes());\n time = time > max ? max : time;\n }\n if (this.min) {\n var min = new Date(time);\n min.setHours(this.min.getHours());\n min.setMinutes(this.min.getMinutes());\n time = time < min ? min : time;\n }\n this.$emit('input', new Date(time));\n },\n selectInputValue: function selectInputValue (e) {\n // mouseup should be prevented!\n // See various comments in https://stackoverflow.com/questions/3272089/programmatically-selecting-text-in-an-input-field-on-ios-devices-mobile-safari\n e.target.setSelectionRange(0, 2);\n }\n }\n};\n\n/* script */\nvar __vue_script__$5 = script$5;\n\n/* template */\nvar __vue_render__$5 = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"section\",\n {\n on: {\n click: function($event) {\n $event.stopPropagation();\n }\n }\n },\n [\n _c(\"table\", [\n _c(\"tbody\", [\n _vm.controls\n ? _c(\"tr\", { staticClass: \"text-center\" }, [\n _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n attrs: {\n type: \"link\",\n size: \"sm\",\n disabled: _vm.readonly\n },\n on: {\n click: function($event) {\n return _vm.changeTime(1, 1)\n }\n }\n },\n [_c(\"i\", { class: _vm.iconControlUp })]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"td\", [_vm._v(\" \")]),\n _vm._v(\" \"),\n _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n attrs: {\n type: \"link\",\n size: \"sm\",\n disabled: _vm.readonly\n },\n on: {\n click: function($event) {\n return _vm.changeTime(0, 1)\n }\n }\n },\n [_c(\"i\", { class: _vm.iconControlUp })]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _vm.showMeridian ? _c(\"td\") : _vm._e()\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _c(\"tr\", [\n _c(\"td\", { staticClass: \"form-group\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model.lazy\",\n value: _vm.hoursText,\n expression: \"hoursText\",\n modifiers: { lazy: true }\n }\n ],\n ref: \"hoursInput\",\n staticClass: \"form-control text-center\",\n style: _vm.inputStyles,\n attrs: {\n type: \"tel\",\n pattern: \"\\\\d*\",\n placeholder: \"HH\",\n readonly: _vm.readonly,\n maxlength: \"2\",\n size: \"2\"\n },\n domProps: { value: _vm.hoursText },\n on: {\n mouseup: _vm.selectInputValue,\n keydown: [\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"up\", 38, $event.key, [\n \"Up\",\n \"ArrowUp\"\n ])\n ) {\n return null\n }\n $event.preventDefault();\n return _vm.changeTime(1, 1)\n },\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"down\", 40, $event.key, [\n \"Down\",\n \"ArrowDown\"\n ])\n ) {\n return null\n }\n $event.preventDefault();\n return _vm.changeTime(1, 0)\n }\n ],\n wheel: function($event) {\n return _vm.onWheel($event, true)\n },\n change: function($event) {\n _vm.hoursText = $event.target.value;\n }\n }\n })\n ]),\n _vm._v(\" \"),\n _vm._m(0),\n _vm._v(\" \"),\n _c(\"td\", { staticClass: \"form-group\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model.lazy\",\n value: _vm.minutesText,\n expression: \"minutesText\",\n modifiers: { lazy: true }\n }\n ],\n ref: \"minutesInput\",\n staticClass: \"form-control text-center\",\n style: _vm.inputStyles,\n attrs: {\n type: \"tel\",\n pattern: \"\\\\d*\",\n placeholder: \"MM\",\n readonly: _vm.readonly,\n maxlength: \"2\",\n size: \"2\"\n },\n domProps: { value: _vm.minutesText },\n on: {\n mouseup: _vm.selectInputValue,\n keydown: [\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"up\", 38, $event.key, [\n \"Up\",\n \"ArrowUp\"\n ])\n ) {\n return null\n }\n $event.preventDefault();\n return _vm.changeTime(0, 1)\n },\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"down\", 40, $event.key, [\n \"Down\",\n \"ArrowDown\"\n ])\n ) {\n return null\n }\n $event.preventDefault();\n return _vm.changeTime(0, 0)\n }\n ],\n wheel: function($event) {\n return _vm.onWheel($event, false)\n },\n change: function($event) {\n _vm.minutesText = $event.target.value;\n }\n }\n })\n ]),\n _vm._v(\" \"),\n _vm.showMeridian\n ? _c(\n \"td\",\n [\n _vm._v(\"\\n \\n \"),\n _c(\"btn\", {\n attrs: {\n \"data-action\": \"toggleMeridian\",\n disabled: _vm.readonly\n },\n domProps: {\n textContent: _vm._s(\n _vm.meridian\n ? _vm.t(\"uiv.timePicker.am\")\n : _vm.t(\"uiv.timePicker.pm\")\n )\n },\n on: { click: _vm.toggleMeridian }\n })\n ],\n 1\n )\n : _vm._e()\n ]),\n _vm._v(\" \"),\n _vm.controls\n ? _c(\"tr\", { staticClass: \"text-center\" }, [\n _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n attrs: {\n type: \"link\",\n size: \"sm\",\n disabled: _vm.readonly\n },\n on: {\n click: function($event) {\n return _vm.changeTime(1, 0)\n }\n }\n },\n [_c(\"i\", { class: _vm.iconControlDown })]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"td\", [_vm._v(\" \")]),\n _vm._v(\" \"),\n _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n attrs: {\n type: \"link\",\n size: \"sm\",\n disabled: _vm.readonly\n },\n on: {\n click: function($event) {\n return _vm.changeTime(0, 0)\n }\n }\n },\n [_c(\"i\", { class: _vm.iconControlDown })]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _vm.showMeridian ? _c(\"td\") : _vm._e()\n ])\n : _vm._e()\n ])\n ])\n ]\n )\n};\nvar __vue_staticRenderFns__$5 = [\n function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\"td\", [_vm._v(\" \"), _c(\"b\", [_vm._v(\":\")]), _vm._v(\" \")])\n }\n];\n__vue_render__$5._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$5 = undefined;\n /* scoped */\n var __vue_scope_id__$5 = undefined;\n /* module identifier */\n var __vue_module_identifier__$5 = undefined;\n /* functional template */\n var __vue_is_functional_template__$5 = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$5 = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$5, staticRenderFns: __vue_staticRenderFns__$5 },\n __vue_inject_styles__$5,\n __vue_script__$5,\n __vue_scope_id__$5,\n __vue_is_functional_template__$5,\n __vue_module_identifier__$5,\n false,\n undefined,\n undefined,\n undefined\n );\n\nfunction request (url, method) {\n if ( method === void 0 ) method = 'GET';\n\n var request = new window.XMLHttpRequest();\n var data = {};\n var p = {\n then: function (fn1, fn2) { return p.done(fn1).fail(fn2); },\n catch: function (fn) { return p.fail(fn); },\n always: function (fn) { return p.done(fn).fail(fn); }\n };\n var statuses = ['done', 'fail'];\n statuses.forEach(function (name) {\n data[name] = [];\n p[name] = function (fn) {\n if (fn instanceof Function) { data[name].push(fn); }\n return p\n };\n });\n p.done(JSON.parse);\n request.onreadystatechange = function () {\n if (request.readyState === 4) {\n var e = { status: request.status };\n if (request.status === 200) {\n var response = request.responseText;\n for (var i in data.done) {\n /* istanbul ignore else */\n if (hasOwnProperty(data.done, i) && isFunction(data.done[i])) {\n var value = data.done[i](response);\n if (isExist(value)) {\n response = value;\n }\n }\n }\n } else {\n data.fail.forEach(function (fail) { return fail(e); });\n }\n }\n };\n request.open(method, url);\n request.setRequestHeader('Accept', 'application/json');\n request.send();\n return p\n}\n\nvar script$4 = {\n components: { Dropdown: Dropdown },\n props: {\n value: {\n required: true\n },\n data: Array,\n itemKey: String,\n appendToBody: {\n type: Boolean,\n default: false\n },\n ignoreCase: {\n type: Boolean,\n default: true\n },\n matchStart: {\n type: Boolean,\n default: false\n },\n forceSelect: {\n type: Boolean,\n default: false\n },\n forceClear: {\n type: Boolean,\n default: false\n },\n limit: {\n type: Number,\n default: 10\n },\n asyncSrc: String,\n asyncKey: String,\n asyncFunction: Function,\n debounce: {\n type: Number,\n default: 200\n },\n openOnFocus: {\n type: Boolean,\n default: true\n },\n openOnEmpty: {\n type: Boolean,\n default: false\n },\n target: {\n required: true\n },\n preselect: {\n type: Boolean,\n default: true\n }\n },\n data: function data () {\n return {\n inputEl: null,\n items: [],\n activeIndex: 0,\n timeoutID: 0,\n elements: [],\n open: false,\n dropdownMenuEl: null\n }\n },\n computed: {\n regexOptions: function regexOptions () {\n var options = '';\n if (this.ignoreCase) {\n options += 'i';\n }\n if (!this.matchStart) {\n options += 'g';\n }\n return options\n }\n },\n mounted: function mounted () {\n var this$1 = this;\n\n ensureElementMatchesFunction();\n this.$nextTick(function () {\n this$1.initInputElByTarget(this$1.target);\n this$1.initListeners();\n this$1.dropdownMenuEl = this$1.$refs.dropdown.$el.querySelector('.dropdown-menu');\n // set input text if v-model not empty\n if (this$1.value) {\n this$1.setInputTextByValue(this$1.value);\n }\n });\n },\n beforeDestroy: function beforeDestroy () {\n this.removeListeners();\n },\n watch: {\n target: function target (el) {\n this.removeListeners();\n this.initInputElByTarget(el);\n this.initListeners();\n },\n value: function value (value$1) {\n this.setInputTextByValue(value$1);\n }\n },\n methods: {\n setInputTextByValue: function setInputTextByValue (value) {\n if (isString(value)) {\n // direct\n this.inputEl.value = value;\n } else if (value) {\n // is object\n this.inputEl.value = this.itemKey ? value[this.itemKey] : value;\n } else if (value === null) {\n // is null or undefined or something else not valid\n this.inputEl.value = '';\n }\n },\n hasEmptySlot: function hasEmptySlot () {\n return !!this.$slots.empty || !!this.$scopedSlots.empty\n },\n initInputElByTarget: function initInputElByTarget (target) {\n if (!target) {\n return\n }\n this.inputEl = getElementBySelectorOrRef(target);\n },\n initListeners: function initListeners () {\n if (this.inputEl) {\n this.elements = [this.inputEl];\n on(this.inputEl, EVENTS.FOCUS, this.inputFocused);\n on(this.inputEl, EVENTS.BLUR, this.inputBlured);\n on(this.inputEl, EVENTS.INPUT, this.inputChanged);\n on(this.inputEl, EVENTS.KEY_DOWN, this.inputKeyPressed);\n }\n },\n removeListeners: function removeListeners () {\n this.elements = [];\n if (this.inputEl) {\n off(this.inputEl, EVENTS.FOCUS, this.inputFocused);\n off(this.inputEl, EVENTS.BLUR, this.inputBlured);\n off(this.inputEl, EVENTS.INPUT, this.inputChanged);\n off(this.inputEl, EVENTS.KEY_DOWN, this.inputKeyPressed);\n }\n },\n prepareItems: function prepareItems (data, disableFilters) {\n if ( disableFilters === void 0 ) disableFilters = false;\n\n if (disableFilters) {\n this.items = data.slice(0, this.limit);\n return\n }\n this.items = [];\n this.activeIndex = this.preselect ? 0 : -1;\n for (var i = 0, l = data.length; i < l; i++) {\n var item = data[i];\n var key = this.itemKey ? item[this.itemKey] : item;\n key = key.toString();\n var index = -1;\n if (this.ignoreCase) {\n index = key.toLowerCase().indexOf(this.inputEl.value.toLowerCase());\n } else {\n index = key.indexOf(this.inputEl.value);\n }\n if (this.matchStart ? index === 0 : index >= 0) {\n this.items.push(item);\n }\n if (this.items.length >= this.limit) {\n break\n }\n }\n },\n fetchItems: function fetchItems (value, debounce) {\n var this$1 = this;\n\n clearTimeout(this.timeoutID);\n if (value === '' && !this.openOnEmpty) {\n this.open = false;\n } else if (this.data) {\n this.prepareItems(this.data);\n this.open = this.hasEmptySlot() || Boolean(this.items.length);\n } else if (this.asyncSrc) {\n this.timeoutID = setTimeout(function () {\n this$1.$emit('loading');\n request(this$1.asyncSrc + encodeURIComponent(value))\n .then(function (data) {\n if (this$1.inputEl.matches(':focus')) {\n this$1.prepareItems(this$1.asyncKey ? data[this$1.asyncKey] : data, true);\n this$1.open = this$1.hasEmptySlot() || Boolean(this$1.items.length);\n }\n this$1.$emit('loaded');\n })\n .catch(function (err) {\n console.error(err);\n this$1.$emit('loaded-error');\n });\n }, debounce);\n } else if (this.asyncFunction) {\n var cb = function (data) {\n if (this$1.inputEl.matches(':focus')) {\n this$1.prepareItems(data, true);\n this$1.open = this$1.hasEmptySlot() || Boolean(this$1.items.length);\n }\n this$1.$emit('loaded');\n };\n this.timeoutID = setTimeout(function () {\n this$1.$emit('loading');\n this$1.asyncFunction(value, cb);\n }, debounce);\n }\n },\n inputChanged: function inputChanged () {\n var value = this.inputEl.value;\n this.fetchItems(value, this.debounce);\n this.$emit('input', this.forceSelect ? undefined : value);\n },\n inputFocused: function inputFocused () {\n if (this.openOnFocus) {\n var value = this.inputEl.value;\n this.fetchItems(value, 0);\n }\n },\n inputBlured: function inputBlured () {\n var this$1 = this;\n\n if (!this.dropdownMenuEl.matches(':hover')) {\n this.open = false;\n }\n if (this.inputEl && this.forceClear) {\n this.$nextTick(function () {\n if (typeof this$1.value === 'undefined') {\n this$1.inputEl.value = '';\n }\n });\n }\n },\n inputKeyPressed: function inputKeyPressed (event) {\n event.stopPropagation();\n if (this.open) {\n switch (event.keyCode) {\n case 13:\n if (this.activeIndex >= 0) {\n this.selectItem(this.items[this.activeIndex]);\n } else {\n this.open = false;\n }\n event.preventDefault();\n break\n case 27:\n this.open = false;\n break\n case 38:\n this.activeIndex = this.activeIndex > 0 ? this.activeIndex - 1 : 0;\n break\n case 40: {\n var maxIndex = this.items.length - 1;\n this.activeIndex = this.activeIndex < maxIndex ? this.activeIndex + 1 : maxIndex;\n break\n }\n }\n }\n },\n selectItem: function selectItem (item) {\n this.$emit('input', item);\n this.open = false;\n },\n highlight: function highlight (item) {\n var value = this.itemKey ? item[this.itemKey] : item;\n var inputValue = this.inputEl.value.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n return value.replace(new RegExp((\"\" + inputValue), this.regexOptions), '$& ')\n }\n }\n};\n\n/* script */\nvar __vue_script__$4 = script$4;\n\n/* template */\nvar __vue_render__$4 = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"dropdown\",\n {\n ref: \"dropdown\",\n attrs: {\n tag: \"section\",\n \"append-to-body\": _vm.appendToBody,\n \"not-close-elements\": _vm.elements,\n \"position-element\": _vm.inputEl\n },\n model: {\n value: _vm.open,\n callback: function($$v) {\n _vm.open = $$v;\n },\n expression: \"open\"\n }\n },\n [\n _c(\n \"template\",\n { slot: \"dropdown\" },\n [\n _vm._t(\n \"item\",\n _vm._l(_vm.items, function(item, index) {\n return _c(\n \"li\",\n { class: { active: _vm.activeIndex === index } },\n [\n _c(\n \"a\",\n {\n attrs: { href: \"#\" },\n on: {\n click: function($event) {\n $event.preventDefault();\n return _vm.selectItem(item)\n }\n }\n },\n [\n _c(\"span\", {\n domProps: { innerHTML: _vm._s(_vm.highlight(item)) }\n })\n ]\n )\n ]\n )\n }),\n {\n items: _vm.items,\n activeIndex: _vm.activeIndex,\n select: _vm.selectItem,\n highlight: _vm.highlight\n }\n ),\n _vm._v(\" \"),\n !_vm.items || _vm.items.length === 0 ? _vm._t(\"empty\") : _vm._e()\n ],\n 2\n )\n ],\n 2\n )\n};\nvar __vue_staticRenderFns__$4 = [];\n__vue_render__$4._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$4 = undefined;\n /* scoped */\n var __vue_scope_id__$4 = undefined;\n /* module identifier */\n var __vue_module_identifier__$4 = undefined;\n /* functional template */\n var __vue_is_functional_template__$4 = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$4 = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$4, staticRenderFns: __vue_staticRenderFns__$4 },\n __vue_inject_styles__$4,\n __vue_script__$4,\n __vue_scope_id__$4,\n __vue_is_functional_template__$4,\n __vue_module_identifier__$4,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar ProgressBarStack = {\n functional: true,\n render: function render (h, ref) {\n var obj;\n\n var props = ref.props;\n var data = ref.data;\n return h(\n 'div',\n a(data, {\n class: ( obj = {\n 'progress-bar': true,\n 'progress-bar-striped': props.striped,\n active: props.striped && props.active\n }, obj[(\"progress-bar-\" + (props.type))] = Boolean(props.type), obj ),\n style: {\n minWidth: props.minWidth ? '2em' : null,\n width: ((props.value) + \"%\")\n },\n attrs: {\n role: 'progressbar',\n 'aria-valuemin': 0,\n 'aria-valuenow': props.value,\n 'aria-valuemax': 100\n }\n }),\n props.label ? (props.labelText ? props.labelText : ((props.value) + \"%\")) : null\n )\n },\n props: {\n value: {\n type: Number,\n required: true,\n validator: function validator (value) {\n return value >= 0 && value <= 100\n }\n },\n labelText: String,\n type: String,\n label: {\n type: Boolean,\n default: false\n },\n minWidth: {\n type: Boolean,\n default: false\n },\n striped: {\n type: Boolean,\n default: false\n },\n active: {\n type: Boolean,\n default: false\n }\n }\n};\n\nvar ProgressBar = {\n functional: true,\n render: function render (h, ref) {\n var props = ref.props;\n var data = ref.data;\n var children = ref.children;\n\n return h(\n 'div',\n a(data, { class: 'progress' }),\n children && children.length ? children : [h(ProgressBarStack, { props: props })]\n )\n }\n};\n\nvar BreadcrumbItem = {\n functional: true,\n mixins: [linkMixin],\n render: function render (h, ref) {\n var props = ref.props;\n var data = ref.data;\n var children = ref.children;\n\n var slot;\n if (props.active) {\n slot = children;\n } else if (props.to) {\n slot = [\n h('router-link', {\n props: {\n to: props.to,\n replace: props.replace,\n append: props.append,\n exact: props.exact\n }\n }, children)\n ];\n } else {\n slot = [\n h('a', {\n attrs: {\n href: props.href,\n target: props.target\n }\n }, children)\n ];\n }\n return h('li', a(data, { class: { active: props.active } }), slot)\n },\n props: {\n active: {\n type: Boolean,\n default: false\n }\n }\n};\n\nvar Breadcrumbs = {\n functional: true,\n render: function render (h, ref) {\n var props = ref.props;\n var data = ref.data;\n var children = ref.children;\n\n var slot = [];\n if (children && children.length) {\n slot = children;\n } else if (props.items) {\n slot = props.items.map(function (item, index) {\n return h(\n BreadcrumbItem,\n {\n key: hasOwnProperty(item, 'key') ? item.key : index,\n props: {\n active: hasOwnProperty(item, 'active') ? item.active : index === props.items.length - 1,\n href: item.href,\n target: item.target,\n to: item.to,\n replace: item.replace,\n append: item.append,\n exact: item.exact\n }\n },\n item.text\n )\n });\n }\n return h('ol', a(data, { class: 'breadcrumb' }), slot)\n },\n props: {\n items: Array\n }\n};\n\nvar BtnToolbar = {\n functional: true,\n render: function render (h, ref) {\n var children = ref.children;\n var data = ref.data;\n\n return h(\n 'div',\n a(data, {\n class: {\n 'btn-toolbar': true\n },\n attrs: {\n role: 'toolbar'\n }\n }),\n children\n )\n }\n};\n\nvar script$3 = {\n mixins: [Local],\n components: { Dropdown: Dropdown },\n props: {\n value: {\n type: Array,\n required: true\n },\n options: {\n type: Array,\n required: true\n },\n labelKey: {\n type: String,\n default: 'label'\n },\n valueKey: {\n type: String,\n default: 'value'\n },\n limit: {\n type: Number,\n default: 0\n },\n size: String,\n placeholder: String,\n split: {\n type: String,\n default: ', '\n },\n disabled: {\n type: Boolean,\n default: false\n },\n appendToBody: {\n type: Boolean,\n default: false\n },\n block: {\n type: Boolean,\n default: false\n },\n collapseSelected: {\n type: Boolean,\n default: false\n },\n filterable: {\n type: Boolean,\n default: false\n },\n filterAutoFocus: {\n type: Boolean,\n default: true\n },\n filterFunction: Function,\n filterPlaceholder: String,\n selectedIcon: {\n type: String,\n default: 'glyphicon glyphicon-ok'\n },\n itemSelectedClass: String\n },\n data: function data () {\n return {\n showDropdown: false,\n els: [],\n filterInput: '',\n currentActive: -1\n }\n },\n computed: {\n containerStyles: function containerStyles () {\n return {\n width: this.block ? '100%' : ''\n }\n },\n filteredOptions: function filteredOptions () {\n var this$1 = this;\n\n if (this.filterable && this.filterInput) {\n if (this.filterFunction) {\n return this.filterFunction(this.filterInput)\n } else {\n var filterInput = this.filterInput.toLowerCase();\n return this.options.filter(function (v) { return (\n v[this$1.valueKey].toString().toLowerCase().indexOf(filterInput) >= 0 ||\n v[this$1.labelKey].toString().toLowerCase().indexOf(filterInput) >= 0\n ); })\n }\n } else {\n return this.options\n }\n },\n groupedOptions: function groupedOptions () {\n var this$1 = this;\n\n return this.filteredOptions\n .map(function (v) { return v.group; })\n .filter(onlyUnique)\n .map(function (v) { return ({\n options: this$1.filteredOptions.filter(function (option) { return option.group === v; }),\n $group: v\n }); })\n },\n flattenGroupedOptions: function flattenGroupedOptions () {\n var ref;\n\n return (ref = []).concat.apply(ref, this.groupedOptions.map(function (v) { return v.options; }))\n },\n selectClasses: function selectClasses () {\n var obj;\n\n return ( obj = {}, obj[(\"input-\" + (this.size))] = this.size, obj )\n },\n selectedIconClasses: function selectedIconClasses () {\n var obj;\n\n return ( obj = {}, obj[this.selectedIcon] = true, obj['pull-right'] = true, obj )\n },\n selectTextClasses: function selectTextClasses () {\n return {\n 'text-muted': this.value.length === 0\n }\n },\n labelValue: function labelValue () {\n var this$1 = this;\n\n var optionsByValue = this.options.map(function (v) { return v[this$1.valueKey]; });\n return this.value.map(function (v) {\n var index = optionsByValue.indexOf(v);\n return index >= 0 ? this$1.options[index][this$1.labelKey] : v\n })\n },\n selectedText: function selectedText () {\n if (this.value.length) {\n var labelValue = this.labelValue;\n if (this.collapseSelected) {\n var str = labelValue[0];\n str += labelValue.length > 1 ? ((this.split) + \"+\" + (labelValue.length - 1)) : '';\n return str\n } else {\n return labelValue.join(this.split)\n }\n } else {\n return this.placeholder || this.t('uiv.multiSelect.placeholder')\n }\n },\n customOptionsVisible: function customOptionsVisible () {\n return !!this.$slots.option || !!this.$scopedSlots.option\n }\n },\n watch: {\n showDropdown: function showDropdown (v) {\n var this$1 = this;\n\n // clear filter input when dropdown toggles\n this.filterInput = '';\n this.currentActive = -1;\n this.$emit('visible-change', v);\n if (v && this.filterable && this.filterAutoFocus) {\n this.$nextTick(function () {\n this$1.$refs.filterInput.focus();\n });\n }\n }\n },\n mounted: function mounted () {\n this.els = [this.$el];\n },\n methods: {\n goPrevOption: function goPrevOption () {\n if (!this.showDropdown) {\n return\n }\n this.currentActive > 0 ? this.currentActive-- : this.currentActive = this.flattenGroupedOptions.length - 1;\n },\n goNextOption: function goNextOption () {\n if (!this.showDropdown) {\n return\n }\n this.currentActive < this.flattenGroupedOptions.length - 1 ? this.currentActive++ : this.currentActive = 0;\n },\n selectOption: function selectOption () {\n var index = this.currentActive;\n var options = this.flattenGroupedOptions;\n if (!this.showDropdown) {\n this.showDropdown = true;\n } else if (index >= 0 && index < options.length) {\n this.toggle(options[index]);\n }\n },\n itemClasses: function itemClasses (item) {\n var result = {\n disabled: item.disabled,\n active: this.currentActive === this.flattenGroupedOptions.indexOf(item)\n };\n if (this.itemSelectedClass) {\n result[this.itemSelectedClass] = this.isItemSelected(item);\n }\n return result\n },\n isItemSelected: function isItemSelected (item) {\n return this.value.indexOf(item[this.valueKey]) >= 0\n },\n toggle: function toggle (item) {\n if (item.disabled) {\n return\n }\n var value = item[this.valueKey];\n var index = this.value.indexOf(value);\n if (this.limit === 1) {\n var newValue = index >= 0 ? [] : [value];\n this.$emit('input', newValue);\n this.$emit('change', newValue);\n } else {\n if (index >= 0) {\n var newVal = this.value.slice();\n newVal.splice(index, 1);\n this.$emit('input', newVal);\n this.$emit('change', newVal);\n } else if (this.limit === 0 || this.value.length < this.limit) {\n var newVal$1 = this.value.slice();\n newVal$1.push(value);\n this.$emit('input', newVal$1);\n this.$emit('change', newVal$1);\n } else {\n this.$emit('limit-exceed');\n }\n }\n },\n searchClicked: function searchClicked () {\n this.$emit('search', this.filterInput);\n }\n }\n};\n\n/* script */\nvar __vue_script__$3 = script$3;\n\n/* template */\nvar __vue_render__$3 = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"dropdown\",\n {\n ref: \"dropdown\",\n style: _vm.containerStyles,\n attrs: {\n \"not-close-elements\": _vm.els,\n \"append-to-body\": _vm.appendToBody,\n disabled: _vm.disabled\n },\n nativeOn: {\n keydown: function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"esc\", 27, $event.key, [\"Esc\", \"Escape\"])\n ) {\n return null\n }\n _vm.showDropdown = false;\n }\n },\n model: {\n value: _vm.showDropdown,\n callback: function($$v) {\n _vm.showDropdown = $$v;\n },\n expression: \"showDropdown\"\n }\n },\n [\n _c(\n \"div\",\n {\n staticClass: \"form-control dropdown-toggle clearfix\",\n class: _vm.selectClasses,\n attrs: {\n disabled: _vm.disabled,\n tabindex: \"0\",\n \"data-role\": \"trigger\"\n },\n on: {\n focus: function($event) {\n return _vm.$emit(\"focus\", $event)\n },\n blur: function($event) {\n return _vm.$emit(\"blur\", $event)\n },\n keydown: [\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"down\", 40, $event.key, [\n \"Down\",\n \"ArrowDown\"\n ])\n ) {\n return null\n }\n $event.preventDefault();\n $event.stopPropagation();\n return _vm.goNextOption($event)\n },\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"up\", 38, $event.key, [\n \"Up\",\n \"ArrowUp\"\n ])\n ) {\n return null\n }\n $event.preventDefault();\n $event.stopPropagation();\n return _vm.goPrevOption($event)\n },\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"enter\", 13, $event.key, \"Enter\")\n ) {\n return null\n }\n $event.preventDefault();\n $event.stopPropagation();\n return _vm.selectOption($event)\n }\n ]\n }\n },\n [\n _c(\n \"div\",\n {\n staticClass: \"pull-right\",\n staticStyle: {\n display: \"inline-block\",\n \"vertical-align\": \"middle\"\n }\n },\n [\n _c(\"span\", [_vm._v(\" \")]),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"caret\" })\n ]\n ),\n _vm._v(\" \"),\n _c(\"div\", {\n class: _vm.selectTextClasses,\n staticStyle: {\n \"overflow-x\": \"hidden\",\n \"text-overflow\": \"ellipsis\",\n \"white-space\": \"nowrap\"\n },\n domProps: { textContent: _vm._s(_vm.selectedText) }\n })\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"template\",\n { slot: \"dropdown\" },\n [\n _vm.filterable\n ? _c(\"li\", { staticStyle: { padding: \"4px 8px\" } }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.filterInput,\n expression: \"filterInput\"\n }\n ],\n ref: \"filterInput\",\n staticClass: \"form-control input-sm\",\n attrs: {\n \"aria-label\": \"Filter...\",\n type: \"text\",\n placeholder:\n _vm.filterPlaceholder ||\n _vm.t(\"uiv.multiSelect.filterPlaceholder\")\n },\n domProps: { value: _vm.filterInput },\n on: {\n keyup: function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"enter\", 13, $event.key, \"Enter\")\n ) {\n return null\n }\n return _vm.searchClicked($event)\n },\n keydown: [\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"down\", 40, $event.key, [\n \"Down\",\n \"ArrowDown\"\n ])\n ) {\n return null\n }\n $event.preventDefault();\n $event.stopPropagation();\n return _vm.goNextOption($event)\n },\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"up\", 38, $event.key, [\n \"Up\",\n \"ArrowUp\"\n ])\n ) {\n return null\n }\n $event.preventDefault();\n $event.stopPropagation();\n return _vm.goPrevOption($event)\n },\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k(\n $event.keyCode,\n \"enter\",\n 13,\n $event.key,\n \"Enter\"\n )\n ) {\n return null\n }\n $event.preventDefault();\n $event.stopPropagation();\n return _vm.selectOption($event)\n }\n ],\n input: function($event) {\n if ($event.target.composing) {\n return\n }\n _vm.filterInput = $event.target.value;\n }\n }\n })\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _vm._l(_vm.groupedOptions, function(item) {\n return [\n item.$group\n ? _c(\"li\", {\n staticClass: \"dropdown-header\",\n domProps: { textContent: _vm._s(item.$group) }\n })\n : _vm._e(),\n _vm._v(\" \"),\n _vm._l(item.options, function(_item) {\n return [\n _c(\n \"li\",\n {\n class: _vm.itemClasses(_item),\n staticStyle: { outline: \"0\" },\n on: {\n keydown: [\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"down\", 40, $event.key, [\n \"Down\",\n \"ArrowDown\"\n ])\n ) {\n return null\n }\n $event.preventDefault();\n $event.stopPropagation();\n return _vm.goNextOption($event)\n },\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"up\", 38, $event.key, [\n \"Up\",\n \"ArrowUp\"\n ])\n ) {\n return null\n }\n $event.preventDefault();\n $event.stopPropagation();\n return _vm.goPrevOption($event)\n },\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k(\n $event.keyCode,\n \"enter\",\n 13,\n $event.key,\n \"Enter\"\n )\n ) {\n return null\n }\n $event.preventDefault();\n $event.stopPropagation();\n return _vm.selectOption($event)\n }\n ],\n click: function($event) {\n $event.stopPropagation();\n return _vm.toggle(_item)\n },\n mouseenter: function($event) {\n _vm.currentActive = -1;\n }\n }\n },\n [\n _vm.customOptionsVisible\n ? _c(\n \"a\",\n {\n staticStyle: { outline: \"0\" },\n attrs: { role: \"button\" }\n },\n [\n _vm._t(\"option\", null, { item: _item }),\n _vm._v(\" \"),\n _vm.selectedIcon && _vm.isItemSelected(_item)\n ? _c(\"span\", { class: _vm.selectedIconClasses })\n : _vm._e()\n ],\n 2\n )\n : _vm.isItemSelected(_item)\n ? _c(\n \"a\",\n {\n staticStyle: { outline: \"0\" },\n attrs: { role: \"button\" }\n },\n [\n _c(\"b\", [_vm._v(_vm._s(_item[_vm.labelKey]))]),\n _vm._v(\" \"),\n _vm.selectedIcon\n ? _c(\"span\", { class: _vm.selectedIconClasses })\n : _vm._e()\n ]\n )\n : _c(\n \"a\",\n {\n staticStyle: { outline: \"0\" },\n attrs: { role: \"button\" }\n },\n [_c(\"span\", [_vm._v(_vm._s(_item[_vm.labelKey]))])]\n )\n ]\n )\n ]\n })\n ]\n })\n ],\n 2\n )\n ],\n 2\n )\n};\nvar __vue_staticRenderFns__$3 = [];\n__vue_render__$3._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$3 = undefined;\n /* scoped */\n var __vue_scope_id__$3 = undefined;\n /* module identifier */\n var __vue_module_identifier__$3 = undefined;\n /* functional template */\n var __vue_is_functional_template__$3 = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$3 = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$3, staticRenderFns: __vue_staticRenderFns__$3 },\n __vue_inject_styles__$3,\n __vue_script__$3,\n __vue_scope_id__$3,\n __vue_is_functional_template__$3,\n __vue_module_identifier__$3,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar script$2 = {\n components: { Collapse: Collapse },\n props: {\n value: Boolean,\n fluid: {\n type: Boolean,\n default: true\n },\n fixedTop: Boolean,\n fixedBottom: Boolean,\n staticTop: Boolean,\n inverse: Boolean\n },\n data: function data () {\n return {\n show: false\n }\n },\n computed: {\n navClasses: function navClasses () {\n return {\n navbar: true,\n 'navbar-default': !this.inverse,\n 'navbar-inverse': this.inverse,\n 'navbar-static-top': this.staticTop,\n 'navbar-fixed-bottom': this.fixedBottom,\n 'navbar-fixed-top': this.fixedTop\n }\n }\n },\n mounted: function mounted () {\n this.show = !!this.value;\n },\n watch: {\n value: function value (v) {\n this.show = v;\n }\n },\n methods: {\n toggle: function toggle () {\n this.show = !this.show;\n this.$emit('input', this.show);\n }\n }\n};\n\n/* script */\nvar __vue_script__$2 = script$2;\n\n/* template */\nvar __vue_render__$2 = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\"nav\", { class: _vm.navClasses }, [\n _c(\n \"div\",\n { class: _vm.fluid ? \"container-fluid\" : \"container\" },\n [\n _c(\n \"div\",\n { staticClass: \"navbar-header\" },\n [\n _vm._t(\"collapse-btn\", [\n _c(\n \"button\",\n {\n staticClass: \"navbar-toggle collapsed\",\n attrs: { type: \"button\" },\n on: { click: _vm.toggle }\n },\n [\n _c(\"span\", { staticClass: \"sr-only\" }, [\n _vm._v(\"Toggle navigation\")\n ]),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"icon-bar\" }),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"icon-bar\" }),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"icon-bar\" })\n ]\n )\n ]),\n _vm._v(\" \"),\n _vm._t(\"brand\")\n ],\n 2\n ),\n _vm._v(\" \"),\n _vm._t(\"default\"),\n _vm._v(\" \"),\n _c(\n \"collapse\",\n {\n staticClass: \"navbar-collapse\",\n model: {\n value: _vm.show,\n callback: function($$v) {\n _vm.show = $$v;\n },\n expression: \"show\"\n }\n },\n [_vm._t(\"collapse\")],\n 2\n )\n ],\n 2\n )\n ])\n};\nvar __vue_staticRenderFns__$2 = [];\n__vue_render__$2._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$2 = undefined;\n /* scoped */\n var __vue_scope_id__$2 = undefined;\n /* module identifier */\n var __vue_module_identifier__$2 = undefined;\n /* functional template */\n var __vue_is_functional_template__$2 = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$2 = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$2, staticRenderFns: __vue_staticRenderFns__$2 },\n __vue_inject_styles__$2,\n __vue_script__$2,\n __vue_scope_id__$2,\n __vue_is_functional_template__$2,\n __vue_module_identifier__$2,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar NavbarNav = {\n functional: true,\n render: function render (h, ref) {\n var children = ref.children;\n var data = ref.data;\n var props = ref.props;\n\n return h(\n 'ul',\n a(data, {\n class: {\n nav: true,\n 'navbar-nav': true,\n 'navbar-left': props.left,\n 'navbar-right': props.right\n }\n }),\n children\n )\n },\n props: {\n left: Boolean,\n right: Boolean\n }\n};\n\nvar NavbarForm = {\n functional: true,\n render: function render (h, ref) {\n var children = ref.children;\n var data = ref.data;\n var props = ref.props;\n\n return h(\n 'form',\n a(data, {\n class: {\n 'navbar-form': true,\n 'navbar-left': props.left,\n 'navbar-right': props.right\n }\n }),\n children\n )\n },\n props: {\n left: Boolean,\n right: Boolean\n }\n};\n\nvar NavbarText = {\n functional: true,\n render: function render (h, ref) {\n var children = ref.children;\n var data = ref.data;\n var props = ref.props;\n\n return h(\n 'p',\n a(data, {\n class: {\n 'navbar-text': true,\n 'navbar-left': props.left,\n 'navbar-right': props.right\n }\n }),\n children\n )\n },\n props: {\n left: Boolean,\n right: Boolean\n }\n};\n\nvar components = /*#__PURE__*/Object.freeze({\n __proto__: null,\n Carousel: __vue_component__$h,\n Slide: __vue_component__$g,\n Collapse: Collapse,\n Dropdown: Dropdown,\n Modal: __vue_component__$f,\n Tab: __vue_component__$e,\n Tabs: __vue_component__$d,\n DatePicker: __vue_component__$9,\n Affix: __vue_component__$8,\n Alert: __vue_component__$7,\n Pagination: __vue_component__$6,\n Tooltip: Tooltip,\n Popover: Popover,\n TimePicker: __vue_component__$5,\n Typeahead: __vue_component__$4,\n ProgressBar: ProgressBar,\n ProgressBarStack: ProgressBarStack,\n Breadcrumbs: Breadcrumbs,\n BreadcrumbItem: BreadcrumbItem,\n Btn: Btn,\n BtnGroup: BtnGroup,\n BtnToolbar: BtnToolbar,\n MultiSelect: __vue_component__$3,\n Navbar: __vue_component__$2,\n NavbarNav: NavbarNav,\n NavbarForm: NavbarForm,\n NavbarText: NavbarText\n});\n\nvar INSTANCE$2 = '_uiv_tooltip_instance';\n\nvar bind$2 = function (el, binding) {\n // console.log('bind')\n unbind$2(el);\n var Constructor = Vue.extend(Tooltip);\n var vm = new Constructor({\n propsData: {\n target: el,\n appendTo: binding.arg && '#' + binding.arg,\n text: typeof binding.value === 'string' ? (binding.value && binding.value.toString()) : (binding.value && binding.value.text && binding.value.text.toString()),\n positionBy: binding.value && binding.value.positionBy && binding.value.positionBy.toString(),\n viewport: binding.value && binding.value.viewport && binding.value.viewport.toString(),\n customClass: binding.value && binding.value.customClass && binding.value.customClass.toString(),\n showDelay: binding.value && binding.value.showDelay,\n hideDelay: binding.value && binding.value.hideDelay\n }\n });\n var options = [];\n for (var key in binding.modifiers) {\n if (hasOwnProperty(binding.modifiers, key) && binding.modifiers[key]) {\n options.push(key);\n }\n }\n options.forEach(function (option) {\n if (/(top)|(left)|(right)|(bottom)/.test(option)) {\n vm.placement = option;\n } else if (/(hover)|(focus)|(click)/.test(option)) {\n vm.trigger = option;\n } else if (/unenterable/.test(option)) {\n vm.enterable = false;\n }\n });\n vm.$mount();\n el[INSTANCE$2] = vm;\n};\n\nvar unbind$2 = function (el) {\n // console.log('unbind')\n var vm = el[INSTANCE$2];\n if (vm) {\n vm.$destroy();\n }\n delete el[INSTANCE$2];\n};\n\nvar update$2 = function (el, binding) {\n // console.log('update')\n if (binding.value !== binding.oldValue) {\n bind$2(el, binding);\n }\n};\n\nvar tooltip = { bind: bind$2, unbind: unbind$2, update: update$2 };\n\nvar INSTANCE$1 = '_uiv_popover_instance';\n\nvar bind$1 = function (el, binding) {\n // console.log('bind')\n unbind$1(el);\n var Constructor = Vue.extend(Popover);\n var vm = new Constructor({\n propsData: {\n target: el,\n appendTo: binding.arg && '#' + binding.arg,\n title: binding.value && binding.value.title && binding.value.title.toString(),\n positionBy: binding.value && binding.value.positionBy && binding.value.positionBy.toString(),\n content: binding.value && binding.value.content && binding.value.content.toString(),\n viewport: binding.value && binding.value.viewport && binding.value.viewport.toString(),\n customClass: binding.value && binding.value.customClass && binding.value.customClass.toString()\n }\n });\n var options = [];\n for (var key in binding.modifiers) {\n if (hasOwnProperty(binding.modifiers, key) && binding.modifiers[key]) {\n options.push(key);\n }\n }\n options.forEach(function (option) {\n if (/(top)|(left)|(right)|(bottom)/.test(option)) {\n vm.placement = option;\n } else if (/(hover)|(focus)|(click)/.test(option)) {\n vm.trigger = option;\n } else if (/unenterable/.test(option)) {\n vm.enterable = false;\n }\n });\n vm.$mount();\n el[INSTANCE$1] = vm;\n};\n\nvar unbind$1 = function (el) {\n // console.log('unbind')\n var vm = el[INSTANCE$1];\n if (vm) {\n vm.$destroy();\n }\n delete el[INSTANCE$1];\n};\n\nvar update$1 = function (el, binding) {\n // console.log('update')\n if (binding.value !== binding.oldValue) {\n bind$1(el, binding);\n }\n};\n\nvar popover = { bind: bind$1, unbind: unbind$1, update: update$1 };\n\nfunction ScrollSpy (element, target, options) {\n if ( target === void 0 ) target = 'body';\n if ( options === void 0 ) options = {};\n\n this.el = element;\n this.opts = assign({}, ScrollSpy.DEFAULTS, options);\n this.opts.target = target;\n if (target === 'body') {\n this.scrollElement = window;\n } else {\n this.scrollElement = document.querySelector((\"[id=\" + target + \"]\"));\n }\n this.selector = 'li > a';\n this.offsets = [];\n this.targets = [];\n this.activeTarget = null;\n this.scrollHeight = 0;\n if (this.scrollElement) {\n this.refresh();\n this.process();\n }\n}\n\nScrollSpy.DEFAULTS = {\n offset: 10,\n callback: function (ele) { return 0; }\n};\n\nScrollSpy.prototype.getScrollHeight = function () {\n return this.scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight)\n};\n\nScrollSpy.prototype.refresh = function () {\n var this$1 = this;\n\n this.offsets = [];\n this.targets = [];\n this.scrollHeight = this.getScrollHeight();\n var list = nodeListToArray(this.el.querySelectorAll(this.selector));\n var isWindow = this.scrollElement === window;\n list\n .map(function (ele) {\n var href = ele.getAttribute('href');\n if (/^#./.test(href)) {\n var rootEl = isWindow ? document : this$1.scrollElement;\n var hrefEl = rootEl.querySelector((\"[id='\" + (href.slice(1)) + \"']\"));\n var offset = isWindow ? hrefEl.getBoundingClientRect().top : hrefEl.offsetTop;\n return [offset, href]\n } else {\n return null\n }\n })\n .filter(function (item) { return item; })\n .sort(function (a, b) { return a[0] - b[0]; })\n .forEach(function (item) {\n this$1.offsets.push(item[0]);\n this$1.targets.push(item[1]);\n });\n // console.log(this.offsets, this.targets)\n};\n\nScrollSpy.prototype.process = function () {\n var isWindow = this.scrollElement === window;\n var scrollTop = (isWindow ? window.pageYOffset : this.scrollElement.scrollTop) + this.opts.offset;\n var scrollHeight = this.getScrollHeight();\n var scrollElementHeight = isWindow ? getViewportSize().height : this.scrollElement.getBoundingClientRect().height;\n var maxScroll = this.opts.offset + scrollHeight - scrollElementHeight;\n var offsets = this.offsets;\n var targets = this.targets;\n var activeTarget = this.activeTarget;\n var i;\n if (this.scrollHeight !== scrollHeight) {\n this.refresh();\n }\n if (scrollTop >= maxScroll) {\n return activeTarget !== (i = targets[targets.length - 1]) && this.activate(i)\n }\n if (activeTarget && scrollTop < offsets[0]) {\n this.activeTarget = null;\n return this.clear()\n }\n for (i = offsets.length; i--;) {\n activeTarget !== targets[i] &&\n scrollTop >= offsets[i] &&\n (offsets[i + 1] === undefined || scrollTop < offsets[i + 1]) &&\n this.activate(targets[i]);\n }\n};\n\nScrollSpy.prototype.activate = function (target) {\n this.activeTarget = target;\n this.clear();\n var selector = this.selector +\n '[data-target=\"' + target + '\"],' +\n this.selector + '[href=\"' + target + '\"]';\n var activeCallback = this.opts.callback;\n var active = nodeListToArray(this.el.querySelectorAll(selector));\n active.forEach(function (ele) {\n getParents(ele, 'li')\n .forEach(function (item) {\n addClass(item, 'active');\n activeCallback(item);\n });\n if (getParents(ele, '.dropdown-menu').length) {\n addClass(getClosest(ele, 'li.dropdown'), 'active');\n }\n });\n};\n\nScrollSpy.prototype.clear = function () {\n var this$1 = this;\n\n var list = nodeListToArray(this.el.querySelectorAll(this.selector));\n list.forEach(function (ele) {\n getParents(ele, '.active', this$1.opts.target).forEach(function (item) {\n removeClass(item, 'active');\n });\n });\n};\n\nvar INSTANCE = '_uiv_scrollspy_instance';\nvar events = [EVENTS.RESIZE, EVENTS.SCROLL];\n\nvar bind = function (el, binding) {\n // console.log('bind')\n unbind(el);\n};\n\nvar inserted = function (el, binding) {\n // console.log('inserted')\n var scrollSpy = new ScrollSpy(el, binding.arg, binding.value);\n if (scrollSpy.scrollElement) {\n scrollSpy.handler = function () {\n scrollSpy.process();\n };\n events.forEach(function (event) {\n on(scrollSpy.scrollElement, event, scrollSpy.handler);\n });\n }\n el[INSTANCE] = scrollSpy;\n};\n\nvar unbind = function (el) {\n // console.log('unbind')\n var instance = el[INSTANCE];\n if (instance && instance.scrollElement) {\n events.forEach(function (event) {\n off(instance.scrollElement, event, instance.handler);\n });\n delete el[INSTANCE];\n }\n};\n\nvar update = function (el, binding) {\n // console.log('update')\n var isArgUpdated = binding.arg !== binding.oldArg;\n var isValueUpdated = binding.value !== binding.oldValue;\n if (isArgUpdated || isValueUpdated) {\n bind(el);\n inserted(el, binding);\n }\n};\n\nvar scrollspy = { bind: bind, unbind: unbind, update: update, inserted: inserted };\n\nvar directives = /*#__PURE__*/Object.freeze({\n __proto__: null,\n tooltip: tooltip,\n popover: popover,\n scrollspy: scrollspy\n});\n\nvar TYPES$1 = {\n ALERT: 0,\n CONFIRM: 1,\n PROMPT: 2\n};\n\nvar script$1 = {\n mixins: [Local],\n components: { Modal: __vue_component__$f, Btn: Btn },\n props: {\n backdrop: null,\n title: String,\n content: String,\n html: {\n type: Boolean,\n default: false\n },\n okText: String,\n okType: {\n type: String,\n default: 'primary'\n },\n cancelText: String,\n cancelType: {\n type: String,\n default: 'default'\n },\n type: {\n type: Number,\n default: TYPES$1.ALERT\n },\n size: {\n type: String,\n default: 'sm'\n },\n cb: {\n type: Function,\n required: true\n },\n validator: {\n type: Function,\n default: function () { return null; }\n },\n customClass: null,\n defaultValue: String,\n inputType: {\n type: String,\n default: 'text'\n },\n autoFocus: {\n type: String,\n default: 'ok'\n },\n reverseButtons: {\n type: Boolean,\n default: false\n }\n },\n data: function data () {\n return {\n TYPES: TYPES$1,\n show: false,\n input: '',\n dirty: false\n }\n },\n mounted: function mounted () {\n if (this.defaultValue) {\n this.input = this.defaultValue;\n }\n },\n computed: {\n closeOnBackdropClick: function closeOnBackdropClick () {\n // use backdrop prop if exist\n // otherwise, only not available if render as alert\n return isExist(this.backdrop) ? Boolean(this.backdrop) : (this.type !== TYPES$1.ALERT)\n },\n inputError: function inputError () {\n return this.validator(this.input)\n },\n inputNotValid: function inputNotValid () {\n return this.dirty && this.inputError\n },\n okBtnText: function okBtnText () {\n return this.okText || this.t('uiv.modal.ok')\n },\n cancelBtnText: function cancelBtnText () {\n return this.cancelText || this.t('uiv.modal.cancel')\n }\n },\n methods: {\n toggle: function toggle (show, msg) {\n this.$refs.modal.toggle(show, msg);\n },\n validate: function validate () {\n this.dirty = true;\n if (!isExist(this.inputError)) {\n this.toggle(false, { value: this.input });\n }\n }\n }\n};\n\n/* script */\nvar __vue_script__$1 = script$1;\n\n/* template */\nvar __vue_render__$1 = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"modal\",\n {\n ref: \"modal\",\n class: _vm.customClass,\n attrs: {\n \"auto-focus\": \"\",\n size: _vm.size,\n title: _vm.title,\n header: !!_vm.title,\n backdrop: _vm.closeOnBackdropClick,\n \"cancel-text\": _vm.cancelText,\n \"ok-text\": _vm.okText\n },\n on: { hide: _vm.cb },\n model: {\n value: _vm.show,\n callback: function($$v) {\n _vm.show = $$v;\n },\n expression: \"show\"\n }\n },\n [\n _vm.html\n ? _c(\"div\", { domProps: { innerHTML: _vm._s(_vm.content) } })\n : _c(\"p\", [_vm._v(_vm._s(_vm.content))]),\n _vm._v(\" \"),\n _vm.type === _vm.TYPES.PROMPT\n ? _c(\"div\", [\n _c(\n \"div\",\n {\n staticClass: \"form-group\",\n class: { \"has-error\": _vm.inputNotValid }\n },\n [\n _vm.inputType === \"checkbox\"\n ? _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.input,\n expression: \"input\"\n }\n ],\n ref: \"input\",\n staticClass: \"form-control\",\n attrs: {\n required: \"\",\n \"data-action\": \"auto-focus\",\n type: \"checkbox\"\n },\n domProps: {\n checked: Array.isArray(_vm.input)\n ? _vm._i(_vm.input, null) > -1\n : _vm.input\n },\n on: {\n change: [\n function($event) {\n var $$a = _vm.input,\n $$el = $event.target,\n $$c = $$el.checked ? true : false;\n if (Array.isArray($$a)) {\n var $$v = null,\n $$i = _vm._i($$a, $$v);\n if ($$el.checked) {\n $$i < 0 && (_vm.input = $$a.concat([$$v]));\n } else {\n $$i > -1 &&\n (_vm.input = $$a\n .slice(0, $$i)\n .concat($$a.slice($$i + 1)));\n }\n } else {\n _vm.input = $$c;\n }\n },\n function($event) {\n _vm.dirty = true;\n }\n ],\n keyup: function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k(\n $event.keyCode,\n \"enter\",\n 13,\n $event.key,\n \"Enter\"\n )\n ) {\n return null\n }\n return _vm.validate($event)\n }\n }\n })\n : _vm.inputType === \"radio\"\n ? _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.input,\n expression: \"input\"\n }\n ],\n ref: \"input\",\n staticClass: \"form-control\",\n attrs: {\n required: \"\",\n \"data-action\": \"auto-focus\",\n type: \"radio\"\n },\n domProps: { checked: _vm._q(_vm.input, null) },\n on: {\n change: [\n function($event) {\n _vm.input = null;\n },\n function($event) {\n _vm.dirty = true;\n }\n ],\n keyup: function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k(\n $event.keyCode,\n \"enter\",\n 13,\n $event.key,\n \"Enter\"\n )\n ) {\n return null\n }\n return _vm.validate($event)\n }\n }\n })\n : _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.input,\n expression: \"input\"\n }\n ],\n ref: \"input\",\n staticClass: \"form-control\",\n attrs: {\n required: \"\",\n \"data-action\": \"auto-focus\",\n type: _vm.inputType\n },\n domProps: { value: _vm.input },\n on: {\n change: function($event) {\n _vm.dirty = true;\n },\n keyup: function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k(\n $event.keyCode,\n \"enter\",\n 13,\n $event.key,\n \"Enter\"\n )\n ) {\n return null\n }\n return _vm.validate($event)\n },\n input: function($event) {\n if ($event.target.composing) {\n return\n }\n _vm.input = $event.target.value;\n }\n }\n }),\n _vm._v(\" \"),\n _c(\n \"span\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.inputNotValid,\n expression: \"inputNotValid\"\n }\n ],\n staticClass: \"help-block\"\n },\n [_vm._v(_vm._s(_vm.inputError))]\n )\n ]\n )\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _vm.type === _vm.TYPES.ALERT\n ? _c(\n \"template\",\n { slot: \"footer\" },\n [\n _c(\"btn\", {\n attrs: {\n type: _vm.okType,\n \"data-action\": _vm.autoFocus === \"ok\" ? \"auto-focus\" : \"\"\n },\n domProps: { textContent: _vm._s(_vm.okBtnText) },\n on: {\n click: function($event) {\n return _vm.toggle(false, \"ok\")\n }\n }\n })\n ],\n 1\n )\n : _c(\n \"template\",\n { slot: \"footer\" },\n [\n _vm.reverseButtons\n ? [\n _vm.type === _vm.TYPES.CONFIRM\n ? _c(\"btn\", {\n attrs: {\n type: _vm.okType,\n \"data-action\":\n _vm.autoFocus === \"ok\" ? \"auto-focus\" : \"\"\n },\n domProps: { textContent: _vm._s(_vm.okBtnText) },\n on: {\n click: function($event) {\n return _vm.toggle(false, \"ok\")\n }\n }\n })\n : _c(\"btn\", {\n attrs: { type: _vm.okType },\n domProps: { textContent: _vm._s(_vm.okBtnText) },\n on: { click: _vm.validate }\n }),\n _vm._v(\" \"),\n _c(\"btn\", {\n attrs: {\n type: _vm.cancelType,\n \"data-action\":\n _vm.autoFocus === \"cancel\" ? \"auto-focus\" : \"\"\n },\n domProps: { textContent: _vm._s(_vm.cancelBtnText) },\n on: {\n click: function($event) {\n return _vm.toggle(false, \"cancel\")\n }\n }\n })\n ]\n : [\n _c(\"btn\", {\n attrs: {\n type: _vm.cancelType,\n \"data-action\":\n _vm.autoFocus === \"cancel\" ? \"auto-focus\" : \"\"\n },\n domProps: { textContent: _vm._s(_vm.cancelBtnText) },\n on: {\n click: function($event) {\n return _vm.toggle(false, \"cancel\")\n }\n }\n }),\n _vm._v(\" \"),\n _vm.type === _vm.TYPES.CONFIRM\n ? _c(\"btn\", {\n attrs: {\n type: _vm.okType,\n \"data-action\":\n _vm.autoFocus === \"ok\" ? \"auto-focus\" : \"\"\n },\n domProps: { textContent: _vm._s(_vm.okBtnText) },\n on: {\n click: function($event) {\n return _vm.toggle(false, \"ok\")\n }\n }\n })\n : _c(\"btn\", {\n attrs: { type: _vm.okType },\n domProps: { textContent: _vm._s(_vm.okBtnText) },\n on: { click: _vm.validate }\n })\n ]\n ],\n 2\n )\n ],\n 2\n )\n};\nvar __vue_staticRenderFns__$1 = [];\n__vue_render__$1._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$1 = undefined;\n /* scoped */\n var __vue_scope_id__$1 = undefined;\n /* module identifier */\n var __vue_module_identifier__$1 = undefined;\n /* functional template */\n var __vue_is_functional_template__$1 = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$1 = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },\n __vue_inject_styles__$1,\n __vue_script__$1,\n __vue_scope_id__$1,\n __vue_is_functional_template__$1,\n __vue_module_identifier__$1,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar queue = [];\n\nvar destroy$1 = function (instance) {\n // console.log('destroyModal')\n removeFromDom(instance.$el);\n instance.$destroy();\n spliceIfExist(queue, instance);\n};\n\n// handel cancel or ok for confirm & prompt\nvar shallResolve = function (type, msg) {\n if (type === TYPES$1.CONFIRM) {\n // is confirm\n return msg === 'ok'\n } else {\n // is prompt\n return isExist(msg) && isString(msg.value)\n }\n};\n\nvar init$1 = function (type, options, cb, resolve, reject) {\n if ( resolve === void 0 ) resolve = null;\n if ( reject === void 0 ) reject = null;\n\n var i18n = this.$i18n;\n var instance = new Vue({\n extends: __vue_component__$1,\n i18n: i18n,\n propsData: assign({}, { type: type }, options, {\n cb: function cb$1 (msg) {\n destroy$1(instance);\n if (isFunction(cb)) {\n if (type === TYPES$1.CONFIRM) {\n shallResolve(type, msg) ? cb(null, msg) : cb(msg);\n } else if (type === TYPES$1.PROMPT) {\n shallResolve(type, msg) ? cb(null, msg.value) : cb(msg);\n } else {\n cb(msg);\n }\n } else if (resolve && reject) {\n if (type === TYPES$1.CONFIRM) {\n shallResolve(type, msg) ? resolve(msg) : reject(msg);\n } else if (type === TYPES$1.PROMPT) {\n shallResolve(type, msg) ? resolve(msg.value) : reject(msg);\n } else {\n resolve(msg);\n }\n }\n }\n })\n });\n instance.$mount();\n document.body.appendChild(instance.$el);\n instance.show = true;\n queue.push(instance);\n};\n\n// eslint-disable-next-line default-param-last\nvar initModal = function (type, options, cb) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n if (isPromiseSupported()) {\n return new Promise(function (resolve, reject) {\n init$1.apply(this$1, [type, options, cb, resolve, reject]);\n })\n } else {\n init$1.apply(this, [type, options, cb]);\n }\n};\n\nvar alert = function (options, cb) {\n return initModal.apply(this, [TYPES$1.ALERT, options, cb])\n};\n\nvar confirm = function (options, cb) {\n return initModal.apply(this, [TYPES$1.CONFIRM, options, cb])\n};\n\nvar prompt = function (options, cb) {\n return initModal.apply(this, [TYPES$1.PROMPT, options, cb])\n};\n\nvar MessageBox = { alert: alert, confirm: confirm, prompt: prompt };\n\nvar TYPES = {\n SUCCESS: 'success',\n INFO: 'info',\n DANGER: 'danger',\n WARNING: 'warning'\n};\n\nvar PLACEMENTS = {\n TOP_LEFT: 'top-left',\n TOP_RIGHT: 'top-right',\n BOTTOM_LEFT: 'bottom-left',\n BOTTOM_RIGHT: 'bottom-right'\n};\n\nvar IN_CLASS = 'in';\nvar ICON = 'glyphicon';\nvar WIDTH = 300;\nvar TRANSITION_DURATION = 300;\n\nvar script = {\n components: { Alert: __vue_component__$7 },\n props: {\n title: String,\n content: String,\n html: {\n type: Boolean,\n default: false\n },\n duration: {\n type: Number,\n default: 5000\n },\n dismissible: {\n type: Boolean,\n default: true\n },\n type: String,\n placement: String,\n icon: String,\n customClass: null,\n cb: {\n type: Function,\n required: true\n },\n queue: {\n type: Array,\n required: true\n },\n offsetY: {\n type: Number,\n default: 15\n },\n offsetX: {\n type: Number,\n default: 15\n },\n offset: {\n type: Number,\n default: 15\n }\n },\n data: function data () {\n return {\n height: 0,\n top: 0,\n horizontal: this.placement === PLACEMENTS.TOP_LEFT || this.placement === PLACEMENTS.BOTTOM_LEFT ? 'left' : 'right',\n vertical: this.placement === PLACEMENTS.TOP_LEFT || this.placement === PLACEMENTS.TOP_RIGHT ? 'top' : 'bottom'\n }\n },\n created: function created () {\n // get prev notifications total height in the queue\n this.top = this.getTotalHeightOfQueue(this.queue);\n },\n mounted: function mounted () {\n var this$1 = this;\n\n var el = this.$el;\n el.style[this.vertical] = this.top + 'px';\n this.$nextTick(function () {\n el.style[this$1.horizontal] = \"-\" + WIDTH + \"px\";\n this$1.height = el.offsetHeight;\n el.style[this$1.horizontal] = (this$1.offsetX) + \"px\";\n addClass(el, IN_CLASS);\n });\n },\n computed: {\n styles: function styles () {\n var obj;\n\n var queue = this.queue;\n var thisIndex = queue.indexOf(this);\n return ( obj = {\n position: 'fixed'\n }, obj[this.vertical] = ((this.getTotalHeightOfQueue(queue, thisIndex)) + \"px\"), obj.width = (WIDTH + \"px\"), obj.transition = (\"all \" + (TRANSITION_DURATION / 1000) + \"s ease-in-out\"), obj )\n },\n icons: function icons () {\n if (isString(this.icon)) {\n return this.icon\n }\n switch (this.type) {\n case TYPES.INFO:\n case TYPES.WARNING:\n return (ICON + \" \" + ICON + \"-info-sign\")\n case TYPES.SUCCESS:\n return (ICON + \" \" + ICON + \"-ok-sign\")\n case TYPES.DANGER:\n return (ICON + \" \" + ICON + \"-remove-sign\")\n default:\n return null\n }\n }\n },\n methods: {\n getTotalHeightOfQueue: function getTotalHeightOfQueue (queue, lastIndex) {\n if ( lastIndex === void 0 ) lastIndex = queue.length;\n\n var totalHeight = this.offsetY;\n for (var i = 0; i < lastIndex; i++) {\n totalHeight += queue[i].height + this.offset;\n }\n return totalHeight\n },\n onDismissed: function onDismissed () {\n removeClass(this.$el, IN_CLASS);\n setTimeout(this.cb, TRANSITION_DURATION);\n }\n }\n};\n\n/* script */\nvar __vue_script__ = script;\n\n/* template */\nvar __vue_render__ = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"alert\",\n {\n staticClass: \"fade\",\n class: _vm.customClass,\n style: _vm.styles,\n attrs: {\n type: _vm.type,\n duration: _vm.duration,\n dismissible: _vm.dismissible\n },\n on: { dismissed: _vm.onDismissed }\n },\n [\n _c(\"div\", { staticClass: \"media\", staticStyle: { margin: \"0\" } }, [\n _vm.icons\n ? _c(\"div\", { staticClass: \"media-left\" }, [\n _c(\"span\", {\n class: _vm.icons,\n staticStyle: { \"font-size\": \"1.5em\" }\n })\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"media-body\" }, [\n _vm.title\n ? _c(\"div\", { staticClass: \"media-heading\" }, [\n _c(\"b\", [_vm._v(_vm._s(_vm.title))])\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _vm.html\n ? _c(\"div\", { domProps: { innerHTML: _vm._s(_vm.content) } })\n : _c(\"div\", [_vm._v(_vm._s(_vm.content))])\n ])\n ])\n ]\n )\n};\nvar __vue_staticRenderFns__ = [];\n__vue_render__._withStripped = true;\n\n /* style */\n var __vue_inject_styles__ = undefined;\n /* scoped */\n var __vue_scope_id__ = undefined;\n /* module identifier */\n var __vue_module_identifier__ = undefined;\n /* functional template */\n var __vue_is_functional_template__ = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__ = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },\n __vue_inject_styles__,\n __vue_script__,\n __vue_scope_id__,\n __vue_is_functional_template__,\n __vue_module_identifier__,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar queues = {};\nqueues[PLACEMENTS.TOP_LEFT] = [];\nqueues[PLACEMENTS.TOP_RIGHT] = [];\nqueues[PLACEMENTS.BOTTOM_LEFT] = [];\nqueues[PLACEMENTS.BOTTOM_RIGHT] = [];\n\nvar destroy = function (queue, instance) {\n // console.log('destroyNotification')\n removeFromDom(instance.$el);\n instance.$destroy();\n spliceIfExist(queue, instance);\n};\n\nvar init = function (options, cb, resolve, reject) {\n if ( resolve === void 0 ) resolve = null;\n if ( reject === void 0 ) reject = null;\n\n var placement = options.placement;\n var queue = queues[placement];\n // check if placement is valid\n if (!isExist(queue)) {\n return\n }\n /* istanbul ignore else */\n // `error` alias of `danger`\n if (options.type === 'error') {\n options.type = 'danger';\n }\n var instance = new Vue({\n extends: __vue_component__,\n propsData: assign({}, { queue: queue, placement: placement }, options, {\n cb: function cb$1 (msg) {\n destroy(queue, instance);\n if (isFunction(cb)) {\n cb(msg);\n } else if (resolve && reject) {\n resolve(msg);\n }\n }\n })\n });\n instance.$mount();\n document.body.appendChild(instance.$el);\n queue.push(instance);\n};\n\n// eslint-disable-next-line default-param-last\nvar _notify = function (options, cb) {\n if ( options === void 0 ) options = {};\n\n // simplify usage: pass string as option.content\n if (isString(options)) {\n options = {\n content: options\n };\n }\n // set default placement as top-right\n if (!isExist(options.placement)) {\n options.placement = PLACEMENTS.TOP_RIGHT;\n }\n if (isPromiseSupported()) {\n return new Promise(function (resolve, reject) {\n init(options, cb, resolve, reject);\n })\n } else {\n init(options, cb);\n }\n};\n\nfunction _notify2 (type, args) {\n if (isString(args)) {\n _notify({\n content: args,\n type: type\n });\n } else {\n _notify(assign({}, args, {\n type: type\n }));\n }\n}\n\nvar notify = Object.defineProperties(_notify, {\n success: {\n configurable: false,\n writable: false,\n value: function value (args) {\n _notify2('success', args);\n }\n },\n info: {\n configurable: false,\n writable: false,\n value: function value (args) {\n _notify2('info', args);\n }\n },\n warning: {\n configurable: false,\n writable: false,\n value: function value (args) {\n _notify2('warning', args);\n }\n },\n danger: {\n configurable: false,\n writable: false,\n value: function value (args) {\n _notify2('danger', args);\n }\n },\n error: {\n configurable: false,\n writable: false,\n value: function value (args) {\n _notify2('danger', args);\n }\n },\n dismissAll: {\n configurable: false,\n writable: false,\n value: function value () {\n for (var key in queues) {\n /* istanbul ignore else */\n if (hasOwnProperty(queues, key)) {\n queues[key].forEach(function (instance) {\n instance.onDismissed();\n });\n }\n }\n }\n }\n});\n\nvar Notification = { notify: notify };\n\nvar services = /*#__PURE__*/Object.freeze({\n __proto__: null,\n MessageBox: MessageBox,\n Notification: Notification\n});\n\nvar install = function (Vue, options) {\n if ( options === void 0 ) options = {};\n\n // Setup language, en-US for default\n locale.use(options.locale);\n locale.i18n(options.i18n);\n // Register components\n Object.keys(components).forEach(function (key) {\n var _key = options.prefix ? options.prefix + key : key;\n Vue.component(_key, components[key]);\n });\n // Register directives\n Object.keys(directives).forEach(function (key) {\n var _key = options.prefix ? options.prefix + '-' + key : key;\n Vue.directive(_key, directives[key]);\n });\n // Register services\n Object.keys(services).forEach(function (key) {\n var service = services[key];\n Object.keys(service).forEach(function (serviceKey) {\n var _key = options.prefix ? options.prefix + '_' + serviceKey : serviceKey;\n Vue.prototype['$' + _key] = service[serviceKey];\n });\n });\n};\n\nexport { __vue_component__$8 as Affix, __vue_component__$7 as Alert, BreadcrumbItem, Breadcrumbs, Btn, BtnGroup, BtnToolbar, __vue_component__$h as Carousel, Collapse, __vue_component__$9 as DatePicker, Dropdown, MessageBox, __vue_component__$f as Modal, __vue_component__$3 as MultiSelect, __vue_component__$2 as Navbar, NavbarForm, NavbarNav, NavbarText, Notification, __vue_component__$6 as Pagination, Popover, ProgressBar, ProgressBarStack, __vue_component__$g as Slide, __vue_component__$e as Tab, __vue_component__$d as Tabs, __vue_component__$5 as TimePicker, Tooltip, __vue_component__$4 as Typeahead, install, popover, scrollspy, tooltip };\n//# sourceMappingURL=uiv.esm.js.map\n","/*\n * bootstrap.js\n * Copyright (c) 2020 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\n// // imports\nimport Vue from 'vue';\nimport VueI18n from 'vue-i18n'\nimport * as uiv from 'uiv';\n\n// export jquery for others scripts to use\nwindow.$ = window.jQuery = require('jquery');\n\n// axios\nwindow.axios = require('axios');\nwindow.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';\n\n// CSRF\nlet token = document.head.querySelector('meta[name=\"csrf-token\"]');\n\nif (token) {\n window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;\n} else {\n console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');\n}\n\n// locale\nlet localeToken = document.head.querySelector('meta[name=\"locale\"]');\n\nif (localeToken) {\n localStorage.locale = localeToken.content;\n} else {\n localStorage.locale = 'en_US';\n}\n\n// admin stuff\nrequire('jquery-ui');\nrequire('bootstrap'); // bootstrap CSS?\n\nrequire('./dist/js/adminlte');\nrequire('overlayscrollbars');\n\n\n// vue\nwindow.vuei18n = VueI18n;\nwindow.uiv = uiv;\nVue.use(vuei18n);\nVue.use(uiv);\nwindow.Vue = Vue;","/*\n * create.js\n * Copyright (c) 2020 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\nconst lodashClonedeep = require('lodash.clonedeep');\n\nimport {getDefaultTransaction, getDefaultErrors} from '../../../shared/transactions';\n\n// initial state\nconst state = () => ({\n transactionType: 'any',\n groupTitle: '',\n transactions: [],\n customDateFields: {\n interest_date: false,\n book_date: false,\n process_date: false,\n due_date: false,\n payment_date: false,\n invoice_date: false,\n },\n defaultTransaction: getDefaultTransaction(),\n defaultErrors: getDefaultErrors()\n }\n)\n\n\n// getters\nconst getters = {\n transactions: state => {\n return state.transactions;\n },\n groupTitle: state => {\n return state.groupTitle;\n },\n transactionType: state => {\n return state.transactionType;\n },\n accountToTransaction: state => {\n // TODO better architecture here, does not need the store.\n // possible API point!!\n return state.accountToTransaction;\n },\n defaultTransaction: state => {\n return state.defaultTransaction;\n },\n sourceAllowedTypes: state => {\n return state.sourceAllowedTypes;\n },\n destinationAllowedTypes: state => {\n return state.destinationAllowedTypes;\n },\n allowedOpposingTypes: state => {\n return state.allowedOpposingTypes;\n },\n customDateFields: state => {\n return state.customDateFields;\n }\n // // `getters` is localized to this module's getters\n // // you can use rootGetters via 4th argument of getters\n // someGetter (state, getters, rootState, rootGetters) {\n // getters.someOtherGetter // -> 'foo/someOtherGetter'\n // rootGetters.someOtherGetter // -> 'someOtherGetter'\n // rootGetters['bar/someOtherGetter'] // -> 'bar/someOtherGetter'\n // },\n\n}\n\n// actions\nconst actions = {}\n\n// mutations\nconst mutations = {\n addTransaction(state) {\n let newTransaction = lodashClonedeep(state.defaultTransaction);\n newTransaction.errors = lodashClonedeep(state.defaultErrors);\n state.transactions.push(newTransaction);\n },\n resetErrors(state, payload) {\n //console.log('resetErrors for index ' + payload.index);\n state.transactions[payload.index].errors = lodashClonedeep(state.defaultErrors);\n },\n resetTransactions(state) {\n state.transactions = [];\n },\n setGroupTitle(state, payload) {\n state.groupTitle = payload.groupTitle;\n },\n setCustomDateFields(state, payload) {\n state.customDateFields = payload;\n },\n deleteTransaction(state, payload) {\n state.transactions.splice(payload.index, 1);\n // console.log('Deleted transaction ' + payload.index);\n // console.log(state.transactions);\n if (0 === state.transactions.length) {\n // console.log('array is empty!');\n }\n },\n setTransactionType(state, transactionType) {\n state.transactionType = transactionType;\n },\n setAllowedOpposingTypes(state, allowedOpposingTypes) {\n state.allowedOpposingTypes = allowedOpposingTypes;\n },\n setAccountToTransaction(state, payload) {\n state.accountToTransaction = payload;\n },\n updateField(state, payload) {\n state.transactions[payload.index][payload.field] = payload.value;\n },\n setTransactionError(state, payload) {\n //console.log('Will set transactions[' + payload.index + '][errors][' + payload.field + '] to ');\n //console.log(payload.errors);\n state.transactions[payload.index].errors[payload.field] = payload.errors;\n },\n setDestinationAllowedTypes(state, payload) {\n // console.log('Destination allowed types was changed!');\n state.destinationAllowedTypes = payload;\n },\n setSourceAllowedTypes(state, payload) {\n state.sourceAllowedTypes = payload;\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","/*\n * edit.js\n * Copyright (c) 2021 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\n// initial state\nconst state = () => ({});\n\n\n// getters\nconst getters = {};\n\n// actions\nconst actions = {};\n\n// mutations\nconst mutations = {};\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","/*\n * index.js\n * Copyright (c) 2020 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\n// initial state\nconst state = () => (\n {\n viewRange: 'default',\n start: null,\n end: null,\n // default range:\n defaultStart: null,\n defaultEnd: null,\n }\n)\n\n\n// getters\nconst getters = {\n start: state => {\n return state.start;\n },\n end: state => {\n return state.end;\n },\n defaultStart: state => {\n return state.defaultStart;\n },\n defaultEnd: state => {\n return state.defaultEnd;\n },\n viewRange: state => {\n return state.viewRange;\n }\n}\n\n// actions\nconst actions = {\n initialiseStore(context) {\n if ('default' === context.state.viewRange) {\n axios.get('./api/v1/preferences/viewRange')\n .then(response => {\n let viewRange = response.data.data.attributes.data;\n context.commit('setViewRange', viewRange);\n // call another action:\n context.dispatch('setDatesFromViewRange');\n }\n ).catch(error => {\n // console.log(error);\n context.commit('setViewRange', '1M');\n // call another action:\n context.dispatch('setDatesFromViewRange');\n });\n }\n },\n setDatesFromViewRange(context) {\n // console.log('Must set dates from viewRange \"' + context.state.viewRange + '\"');\n // check local storage first?\n if (localStorage.viewRangeStart) {\n // console.log('view range start set from local storage.');\n context.commit('setStart', new Date(localStorage.viewRangeStart));\n }\n if (localStorage.viewRangeEnd) {\n // console.log('view range end set from local storage.');\n context.commit('setEnd', new Date(localStorage.viewRangeEnd));\n }\n // also set default:\n if (localStorage.viewRangeDefaultStart) {\n // console.log('view range default start set from local storage.');\n // console.log(localStorage.viewRangeDefaultStart);\n context.commit('setDefaultStart', new Date(localStorage.viewRangeDefaultStart));\n }\n if (localStorage.viewRangeDefaultEnd) {\n // console.log('view range default end set from local storage.');\n // console.log(localStorage.viewRangeDefaultEnd);\n context.commit('setDefaultEnd', new Date(localStorage.viewRangeDefaultEnd));\n }\n\n if (null !== context.getters.end && null !== context.getters.start) {\n return;\n }\n let start;\n let end;\n let viewRange = context.getters.viewRange;\n // console.log('Will recreate view range on ' + viewRange);\n switch (viewRange) {\n case '1D':\n // one day:\n start = new Date;\n end = new Date(start.getTime());\n start.setHours(0, 0, 0, 0);\n end.setHours(23, 59, 59, 999);\n break;\n case '1W':\n // this week:\n start = new Date;\n end = new Date(start.getTime());\n // start of week\n let diff = start.getDate() - start.getDay() + (start.getDay() === 0 ? -6 : 1);\n start.setDate(diff);\n start.setHours(0, 0, 0, 0);\n\n // end of week\n let lastday = end.getDate() - (end.getDay() - 1) + 6;\n end.setDate(lastday);\n end.setHours(23, 59, 59, 999);\n break;\n case '1M':\n // this month:\n start = new Date;\n start = new Date(start.getFullYear(), start.getMonth(), 1);\n start.setHours(0, 0, 0, 0);\n end = new Date(start.getFullYear(), start.getMonth() + 1, 0);\n end.setHours(23, 59, 59, 999);\n break;\n case '3M':\n // this quarter\n start = new Date;\n end = new Date;\n let quarter = Math.floor((start.getMonth() + 3) / 3) - 1;\n // start and end months? I'm sure this could be better:\n let startMonths = [0, 3, 6, 9];\n let endMonths = [2, 5, 8, 11];\n // set start to the correct month, day one:\n start = new Date(start.getFullYear(), startMonths[quarter], 1);\n start.setHours(0, 0, 0, 0);\n\n // set end to the correct month, day one\n end = new Date(end.getFullYear(), endMonths[quarter], 1);\n // then to the last day of the month:\n end = new Date(end.getFullYear(), end.getMonth() + 1, 0);\n end.setHours(23, 59, 59, 999);\n break;\n case '6M':\n // this half-year\n start = new Date;\n end = new Date;\n let half = start.getMonth() <= 5 ? 0 : 1;\n\n let startHalf = [0, 6];\n let endHalf = [5, 11];\n // set start to the correct month, day one:\n start = new Date(start.getFullYear(), startHalf[half], 1);\n start.setHours(0, 0, 0, 0);\n\n // set end to the correct month, day one\n end = new Date(end.getFullYear(), endHalf[half], 1);\n // then to the last day of the month:\n end = new Date(end.getFullYear(), end.getMonth() + 1, 0);\n end.setHours(23, 59, 59, 999);\n break;\n case '1Y':\n // this year\n start = new Date;\n end = new Date;\n start = new Date(start.getFullYear(), 0, 1);\n\n end = new Date(end.getFullYear(), 11, 31);\n start.setHours(0, 0, 0, 0);\n end.setHours(23, 59, 59, 999);\n break;\n }\n // console.log('Range is ' + viewRange);\n // console.log('Start is ' + start);\n // console.log('End is ' + end);\n context.commit('setStart', start);\n context.commit('setEnd', end);\n context.commit('setDefaultStart', start);\n context.commit('setDefaultEnd', end);\n }\n}\n\n// mutations\nconst mutations = {\n setStart(state, value) {\n state.start = value;\n window.localStorage.setItem('viewRangeStart', value);\n },\n setEnd(state, value) {\n state.end = value;\n window.localStorage.setItem('viewRangeEnd', value);\n },\n setDefaultStart(state, value) {\n state.defaultStart = value;\n window.localStorage.setItem('viewRangeDefaultStart', value);\n },\n setDefaultEnd(state, value) {\n state.defaultEnd = value;\n window.localStorage.setItem('viewRangeDefaultEnd', value);\n },\n setViewRange(state, range) {\n state.viewRange = range;\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","/*\n * index.js\n * Copyright (c) 2020 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\nimport Vue from 'vue'\nimport Vuex, {createLogger} from 'vuex'\nimport transactions_create from './modules/transactions/create';\nimport transactions_edit from './modules/transactions/edit';\nimport dashboard_index from './modules/dashboard/index';\n\nVue.use(Vuex)\nconst debug = process.env.NODE_ENV !== 'production'\n\nexport default new Vuex.Store(\n {\n modules: {\n transactions: {\n namespaced: true,\n modules: {\n create: transactions_create,\n edit: transactions_edit\n }\n },\n dashboard: {\n namespaced: true,\n modules: {\n index: dashboard_index\n }\n }\n },\n strict: debug,\n plugins: debug ? [createLogger()] : [],\n state: {\n currencyPreference: {},\n locale: 'en-US'\n },\n mutations: {\n setCurrencyPreference(state, payload) {\n //console.log('setCurrencyPreference', payload);\n state.currencyPreference = payload.payload;\n },\n initialiseStore(state) {\n // if locale in local storage:\n if (localStorage.locale) {\n state.locale = localStorage.locale;\n return;\n }\n // set locale from HTML:\n let localeToken = document.head.querySelector('meta[name=\"locale\"]');\n if (localeToken) {\n state.locale = localeToken.content;\n localStorage.locale = localeToken.content;\n }\n }\n },\n getters: {\n currencyCode: state => {\n return state.currencyPreference.code;\n },\n currencyPreference: state => {\n return state.currencyPreference;\n },\n currencyId: state => {\n return state.currencyPreference.id;\n },\n locale: state => {\n return state.locale;\n }\n },\n actions: {\n updateCurrencyPreference(context) {\n if (localStorage.currencyPreference) {\n //console.log('set from local storage.');\n //console.log(localStorage.currencyPreference);\n //console.log({payload: JSON.parse(localStorage.currencyPreference)});\n context.commit('setCurrencyPreference', {payload: JSON.parse(localStorage.currencyPreference)});\n return;\n }\n axios.get('./api/v1/currencies/default')\n .then(response => {\n let currencyResponse = {\n id: parseInt(response.data.data.id),\n name: response.data.data.attributes.name,\n symbol: response.data.data.attributes.symbol,\n code: response.data.data.attributes.code,\n decimal_places: parseInt(response.data.data.attributes.decimal_places),\n };\n localStorage.currencyPreference = JSON.stringify(currencyResponse);\n //console.log('getCurrencyPreference from server')\n //console.log(JSON.stringify(currencyResponse));\n context.commit('setCurrencyPreference', {payload: currencyResponse});\n }).catch(err => {\n // console.log('Got error response.');\n console.error(err);\n context.commit('setCurrencyPreference', {\n payload: {\n id: 1,\n name: 'Euro',\n symbol: '€',\n code: 'EUR',\n decimal_places: 2\n }\n });\n });\n\n }\n }\n }\n);","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","/*\n * i18n.js\n * Copyright (c) 2020 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\n// Create VueI18n instance with options\nmodule.exports = new vuei18n({\n locale: document.documentElement.lang, // set locale\n fallbackLocale: 'en',\n messages: {\n 'bg': require('./locales/bg.json'),\n 'cs': require('./locales/cs.json'),\n 'de': require('./locales/de.json'),\n 'en': require('./locales/en.json'),\n 'en-us': require('./locales/en.json'),\n 'en-gb': require('./locales/en-gb.json'),\n 'es': require('./locales/es.json'),\n 'el': require('./locales/el.json'),\n 'fr': require('./locales/fr.json'),\n 'hu': require('./locales/hu.json'),\n //'id': require('./locales/id.json'),\n 'it': require('./locales/it.json'),\n 'nl': require('./locales/nl.json'),\n 'nb': require('./locales/nb.json'),\n 'pl': require('./locales/pl.json'),\n 'fi': require('./locales/fi.json'),\n 'pt-br': require('./locales/pt-br.json'),\n 'pt-pt': require('./locales/pt.json'),\n 'ro': require('./locales/ro.json'),\n 'ru': require('./locales/ru.json'),\n //'zh': require('./locales/zh.json'),\n 'zh-tw': require('./locales/zh-tw.json'),\n 'zh-cn': require('./locales/zh-cn.json'),\n 'sk': require('./locales/sk.json'),\n 'sv': require('./locales/sv.json'),\n 'vi': require('./locales/vi.json'),\n }\n});\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.transactions.length > 1)?_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col\"},[_c('ul',{staticClass:\"nav nav-pills ml-auto p-2\"},_vm._l((this.transactions),function(transaction,index){return _c('li',{staticClass:\"nav-item\"},[_c('a',{class:'nav-link' + (0===index ? ' active' : ''),attrs:{\"href\":'#split_' + index,\"data-toggle\":\"tab\"}},[('' !== transaction.description)?_c('span',[_vm._v(_vm._s(transaction.description))]):_vm._e(),_vm._v(\" \"),('' === transaction.description)?_c('span',[_vm._v(\"Split \"+_vm._s(index + 1))]):_vm._e()])])}),0)])]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SplitPills.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SplitPills.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n\n","import { render, staticRenderFns } from \"./SplitPills.vue?vue&type=template&id=0e910ecf&\"\nimport script from \"./SplitPills.vue?vue&type=script&lang=js&\"\nexport * from \"./SplitPills.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n\nvar stylesInDom = {};\n\nvar\tmemoize = function (fn) {\n\tvar memo;\n\n\treturn function () {\n\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\treturn memo;\n\t};\n};\n\nvar isOldIE = memoize(function () {\n\t// Test for IE <= 9 as proposed by Browserhacks\n\t// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n\t// Tests for existence of standard globals is to allow style-loader\n\t// to operate correctly into non-standard environments\n\t// @see https://github.com/webpack-contrib/style-loader/issues/177\n\treturn window && document && document.all && !window.atob;\n});\n\nvar getTarget = function (target, parent) {\n if (parent){\n return parent.querySelector(target);\n }\n return document.querySelector(target);\n};\n\nvar getElement = (function (fn) {\n\tvar memo = {};\n\n\treturn function(target, parent) {\n // If passing function in options, then use it for resolve \"head\" element.\n // Useful for Shadow Root style i.e\n // {\n // insertInto: function () { return document.querySelector(\"#foo\").shadowRoot }\n // }\n if (typeof target === 'function') {\n return target();\n }\n if (typeof memo[target] === \"undefined\") {\n\t\t\tvar styleTarget = getTarget.call(this, target, parent);\n\t\t\t// Special case to return head of iframe instead of iframe itself\n\t\t\tif (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n\t\t\t\ttry {\n\t\t\t\t\t// This will throw an exception if access to iframe is blocked\n\t\t\t\t\t// due to cross-origin restrictions\n\t\t\t\t\tstyleTarget = styleTarget.contentDocument.head;\n\t\t\t\t} catch(e) {\n\t\t\t\t\tstyleTarget = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmemo[target] = styleTarget;\n\t\t}\n\t\treturn memo[target]\n\t};\n})();\n\nvar singleton = null;\nvar\tsingletonCounter = 0;\nvar\tstylesInsertedAtTop = [];\n\nvar\tfixUrls = require(\"./urls\");\n\nmodule.exports = function(list, options) {\n\tif (typeof DEBUG !== \"undefined\" && DEBUG) {\n\t\tif (typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\n\t}\n\n\toptions = options || {};\n\n\toptions.attrs = typeof options.attrs === \"object\" ? options.attrs : {};\n\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of ","import { render, staticRenderFns } from \"./SwitchAccount.vue?vue&type=template&id=376bca8c&scoped=true&\"\nimport script from \"./SwitchAccount.vue?vue&type=script&lang=js&\"\nexport * from \"./SwitchAccount.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"376bca8c\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[('any' !== this.transactionType)?_c('span',{staticClass:\"text-muted\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.' + this.transactionType))+\"\\n \")]):_vm._e(),_vm._v(\" \"),('any' === this.transactionType)?_c('span',{staticClass:\"text-muted\"},[_vm._v(\" \")]):_vm._e()]),_vm._v(\" \"),_c('div',{staticClass:\"btn-group d-flex\"},[_c('button',{staticClass:\"btn btn-light\",on:{\"click\":_vm.switchAccounts}},[_vm._v(\"↔\")])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionAmount.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionAmount.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n\n\n","import { render, staticRenderFns } from \"./TransactionAmount.vue?vue&type=template&id=fadf3e90&scoped=true&\"\nimport script from \"./TransactionAmount.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionAmount.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"fadf3e90\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs\"},[_vm._v(_vm._s(_vm.$t('firefly.amount')))]),_vm._v(\" \"),_c('div',{staticClass:\"input-group\"},[(_vm.currencySymbol)?_c('div',{staticClass:\"input-group-prepend\"},[_c('div',{staticClass:\"input-group-text\"},[_vm._v(_vm._s(_vm.currencySymbol))])]):_vm._e(),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.transactionAmount),expression:\"transactionAmount\"}],class:_vm.errors.length > 0 ? 'form-control is-invalid' : 'form-control',attrs:{\"placeholder\":_vm.$t('firefly.amount'),\"title\":_vm.$t('firefly.amount'),\"autocomplete\":\"off\",\"name\":\"amount[]\",\"type\":\"number\"},domProps:{\"value\":(_vm.transactionAmount)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.transactionAmount=$event.target.value}}})]),_vm._v(\" \"),(_vm.errors.length > 0)?_c('span',_vm._l((_vm.errors),function(error){return _c('span',{staticClass:\"text-danger small\"},[_vm._v(_vm._s(error)),_c('br')])}),0):_vm._e()])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionForeignAmount.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionForeignAmount.vue?vue&type=script&lang=js&\"","\n\n\n \n \n \n\n\n\n","import { render, staticRenderFns } from \"./TransactionForeignAmount.vue?vue&type=template&id=d13f8bea&scoped=true&\"\nimport script from \"./TransactionForeignAmount.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionForeignAmount.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"d13f8bea\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.isVisible)?_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs\"},[_vm._v(_vm._s(_vm.$t('form.foreign_amount')))]),_vm._v(\" \"),_c('div',{staticClass:\"input-group\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.amount),expression:\"amount\"}],class:_vm.errors.length > 0 ? 'form-control is-invalid' : 'form-control',attrs:{\"placeholder\":_vm.$t('form.foreign_amount'),\"title\":_vm.$t('form.foreign_amount'),\"autocomplete\":\"off\",\"name\":\"foreign_amount[]\",\"type\":\"number\"},domProps:{\"value\":(_vm.amount)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.amount=$event.target.value}}})]),_vm._v(\" \"),(_vm.errors.length > 0)?_c('span',_vm._l((_vm.errors),function(error){return _c('span',{staticClass:\"text-danger small\"},[_vm._v(_vm._s(error)),_c('br')])}),0):_vm._e()]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionForeignCurrency.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionForeignCurrency.vue?vue&type=script&lang=js&\"","\n\n\n \n \n \n\n\n","import { render, staticRenderFns } from \"./TransactionForeignCurrency.vue?vue&type=template&id=3ee4efa5&scoped=true&\"\nimport script from \"./TransactionForeignCurrency.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionForeignCurrency.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"3ee4efa5\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.isVisible)?_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs\"},[_vm._v(\" \")]),_vm._v(\" \"),_c('div',{staticClass:\"input-group\"},[_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selectedCurrency),expression:\"selectedCurrency\"}],staticClass:\"form-control\",attrs:{\"name\":\"foreign_currency_id[]\"},on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.selectedCurrency=$event.target.multiple ? $$selectedVal : $$selectedVal[0]}}},_vm._l((_vm.selectableCurrencies),function(currency){return _c('option',{attrs:{\"label\":currency.name},domProps:{\"value\":currency.id}},[_vm._v(_vm._s(currency.name))])}),0)])]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionCustomDates.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionCustomDates.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n\n","import { render, staticRenderFns } from \"./TransactionCustomDates.vue?vue&type=template&id=7c0f4f0c&\"\nimport script from \"./TransactionCustomDates.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionCustomDates.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',_vm._l((_vm.availableFields),function(enabled,name){return _c('div',{staticClass:\"form-group\"},[(enabled && _vm.isDateField(name))?_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('form.' + name))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(enabled && _vm.isDateField(name))?_c('div',{staticClass:\"input-group\"},[_c('input',{ref:name,refInFor:true,staticClass:\"form-control\",attrs:{\"name\":name + '[]',\"placeholder\":_vm.$t('form.' + name),\"title\":_vm.$t('form.' + name),\"autocomplete\":\"off\",\"type\":\"date\"},domProps:{\"value\":_vm.getFieldValue(name)},on:{\"change\":function($event){return _vm.setFieldValue($event, name)},\"submit\":function($event){$event.preventDefault();}}})]):_vm._e()])}),0)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionCategory.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionCategory.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n","import { render, staticRenderFns } from \"./TransactionCategory.vue?vue&type=template&id=332d1095&\"\nimport script from \"./TransactionCategory.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionCategory.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.category'))+\"\\n \")]),_vm._v(\" \"),_c('vue-typeahead-bootstrap',{attrs:{\"data\":_vm.categories,\"inputClass\":_vm.errors.length > 0 ? 'is-invalid' : '',\"minMatchingChars\":3,\"placeholder\":_vm.$t('firefly.category'),\"serializer\":function (item) { return item.name; },\"showOnFocus\":true,\"inputName\":\"category[]\"},on:{\"hit\":function($event){_vm.selectedCategory = $event},\"input\":_vm.lookupCategory},model:{value:(_vm.category),callback:function ($$v) {_vm.category=$$v},expression:\"category\"}},[_c('template',{slot:\"append\"},[_c('div',{staticClass:\"input-group-append\"},[_c('button',{staticClass:\"btn btn-outline-secondary\",attrs:{\"tabindex\":\"-1\",\"type\":\"button\"},on:{\"click\":_vm.clearCategory}},[_c('i',{staticClass:\"far fa-trash-alt\"})])])])],2),_vm._v(\" \"),(_vm.errors.length > 0)?_c('span',_vm._l((_vm.errors),function(error){return _c('span',{staticClass:\"text-danger small\"},[_vm._v(_vm._s(error)),_c('br')])}),0):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionBill.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionBill.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n\n\n","import { render, staticRenderFns } from \"./TransactionBill.vue?vue&type=template&id=7c81d840&\"\nimport script from \"./TransactionBill.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionBill.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.bill'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"input-group\"},[_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.bill),expression:\"bill\"}],ref:\"bill\",class:_vm.errors.length > 0 ? 'form-control is-invalid' : 'form-control',attrs:{\"title\":_vm.$t('firefly.bill'),\"autocomplete\":\"off\",\"name\":\"bill_id[]\"},on:{\"submit\":function($event){$event.preventDefault();},\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.bill=$event.target.multiple ? $$selectedVal : $$selectedVal[0]}}},_vm._l((this.billList),function(bill){return _c('option',{attrs:{\"label\":bill.name},domProps:{\"value\":bill.id}},[_vm._v(_vm._s(bill.name))])}),0)]),_vm._v(\" \"),(_vm.errors.length > 0)?_c('span',_vm._l((_vm.errors),function(error){return _c('span',{staticClass:\"text-danger small\"},[_vm._v(_vm._s(error)),_c('br')])}),0):_vm._e()])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionTags.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionTags.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n\n\n","import { render, staticRenderFns } from \"./TransactionTags.vue?vue&type=template&id=834226ea&\"\nimport script from \"./TransactionTags.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionTags.vue?vue&type=script&lang=js&\"\nimport style0 from \"./TransactionTags.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {\nvar this$1 = this;\nvar _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.tags'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"input-group\"},[_c('vue-tags-input',{attrs:{\"add-only-from-autocomplete\":false,\"autocomplete-items\":_vm.autocompleteItems,\"tags\":_vm.tags,\"title\":_vm.$t('firefly.tags'),\"placeholder\":_vm.$t('firefly.tags')},on:{\"tags-changed\":function (newTags) { return this$1.tags = newTags; }},model:{value:(_vm.currentTag),callback:function ($$v) {_vm.currentTag=$$v},expression:\"currentTag\"}})],1),_vm._v(\" \"),(_vm.errors.length > 0)?_c('span',_vm._l((_vm.errors),function(error){return _c('span',{staticClass:\"text-danger small\"},[_vm._v(_vm._s(error)),_c('br')])}),0):_vm._e()])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionPiggyBank.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionPiggyBank.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n\n","import { render, staticRenderFns } from \"./TransactionPiggyBank.vue?vue&type=template&id=e5fa48cc&\"\nimport script from \"./TransactionPiggyBank.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionPiggyBank.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.piggy_bank'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"input-group\"},[_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.piggy_bank_id),expression:\"piggy_bank_id\"}],ref:\"piggy_bank_id\",class:_vm.errors.length > 0 ? 'form-control is-invalid' : 'form-control',attrs:{\"title\":_vm.$t('firefly.piggy_bank'),\"autocomplete\":\"off\",\"name\":\"piggy_bank_id[]\"},on:{\"submit\":function($event){$event.preventDefault();},\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.piggy_bank_id=$event.target.multiple ? $$selectedVal : $$selectedVal[0]}}},_vm._l((this.piggyGroups),function(group){return _c('optgroup',{key:group.title,attrs:{\"label\":group.title}},_vm._l((group.piggies),function(piggy){return _c('option',{attrs:{\"label\":piggy.name_with_balance},domProps:{\"value\":piggy.id}},[_vm._v(_vm._s(piggy.name_with_balance))])}),0)}),0)]),_vm._v(\" \"),(_vm.errors.length > 0)?_c('span',_vm._l((_vm.errors),function(error){return _c('span',{staticClass:\"text-danger small\"},[_vm._v(_vm._s(error)),_c('br')])}),0):_vm._e()])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionInternalReference.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionInternalReference.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n\n","import { render, staticRenderFns } from \"./TransactionInternalReference.vue?vue&type=template&id=7f1b8c1d&\"\nimport script from \"./TransactionInternalReference.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionInternalReference.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.showField)?_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.internal_reference'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"input-group\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.reference),expression:\"reference\"}],class:_vm.errors.length > 0 ? 'form-control is-invalid' : 'form-control',attrs:{\"placeholder\":_vm.$t('firefly.internal_reference'),\"name\":\"internal_reference[]\",\"type\":\"text\"},domProps:{\"value\":(_vm.reference)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.reference=$event.target.value}}}),_vm._v(\" \"),_vm._m(0)])]):_vm._e()}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-append\"},[_c('button',{staticClass:\"btn btn-outline-secondary\",attrs:{\"tabindex\":\"-1\",\"type\":\"button\"}},[_c('i',{staticClass:\"far fa-trash-alt\"})])])}]\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionExternalUrl.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionExternalUrl.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n\n\n","import { render, staticRenderFns } from \"./TransactionExternalUrl.vue?vue&type=template&id=7f6746e6&scoped=true&\"\nimport script from \"./TransactionExternalUrl.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionExternalUrl.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7f6746e6\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.showField)?_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.external_url'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"input-group\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.url),expression:\"url\"}],class:_vm.errors.length > 0 ? 'form-control is-invalid' : 'form-control',attrs:{\"placeholder\":_vm.$t('firefly.external_url'),\"name\":\"external_url[]\",\"type\":\"url\"},domProps:{\"value\":(_vm.url)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.url=$event.target.value}}}),_vm._v(\" \"),_vm._m(0)])]):_vm._e()}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-append\"},[_c('button',{staticClass:\"btn btn-outline-secondary\",attrs:{\"tabindex\":\"-1\",\"type\":\"button\"}},[_c('i',{staticClass:\"far fa-trash-alt\"})])])}]\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionNotes.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionNotes.vue?vue&type=script&lang=js&\"","\n\n\n\n \n\n \n\n\n\n","import { render, staticRenderFns } from \"./TransactionNotes.vue?vue&type=template&id=7d231ac2&scoped=true&\"\nimport script from \"./TransactionNotes.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionNotes.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7d231ac2\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.showField)?_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.notes'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"input-group\"},[_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.notes),expression:\"notes\"}],class:_vm.errors.length > 0 ? 'form-control is-invalid' : 'form-control',attrs:{\"placeholder\":_vm.$t('firefly.notes')},domProps:{\"value\":(_vm.notes)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.notes=$event.target.value}}})])]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n \n
\n \n
\n
\n
\n \n
\n
\n
\n
\n
\n Use this form to search for transactions you wish to link to this one. When in doubt, use id:*
where the ID is the number from\n the URL.\n
\n
\n
\n
\n
\n
\n
\n
0\">Search results \n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n \n\n\n","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionLinks.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionLinks.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./TransactionLinks.vue?vue&type=template&id=6706087c&\"\nimport script from \"./TransactionLinks.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionLinks.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.showField)?_c('div',[_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.journal_links'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col\"},[(_vm.links.length === 0)?_c('p',[_c('button',{staticClass:\"btn btn-default btn-xs\",attrs:{\"data-target\":'#linkModal' + _vm.index,\"data-toggle\":\"modal\"},on:{\"click\":_vm.resetModal}},[_c('i',{staticClass:\"fas fa-plus\"}),_vm._v(\" Add transaction\\n link\\n \")])]):_vm._e(),_vm._v(\" \"),(_vm.links.length > 0)?_c('ul',{staticClass:\"list-group\"},_vm._l((_vm.links),function(transaction,index){return _c('li',{key:index,staticClass:\"list-group-item\"},[_c('em',[_vm._v(_vm._s(_vm.getTextForLinkType(transaction.link_type_id)))]),_vm._v(\" \"),_c('a',{attrs:{\"href\":\"./transaction/show/\" + transaction.transaction_group_id}},[_vm._v(_vm._s(transaction.description))]),_vm._v(\" \"),(transaction.type === 'withdrawal')?_c('span',[_vm._v(\"\\n (\"),_c('span',{staticClass:\"text-danger\"},[_vm._v(_vm._s(Intl.NumberFormat(_vm.locale, {\n style: 'currency',\n currency: transaction.currency_code\n }).format(parseFloat(transaction.amount) * -1)))]),_vm._v(\")\\n \")]):_vm._e(),_vm._v(\" \"),(transaction.type === 'deposit')?_c('span',[_vm._v(\"\\n (\"),_c('span',{staticClass:\"text-success\"},[_vm._v(_vm._s(Intl.NumberFormat(_vm.locale, {\n style: 'currency',\n currency: transaction.currency_code\n }).format(parseFloat(transaction.amount))))]),_vm._v(\")\\n \")]):_vm._e(),_vm._v(\" \"),(transaction.type === 'transfer')?_c('span',[_vm._v(\"\\n (\"),_c('span',{staticClass:\"text-info\"},[_vm._v(_vm._s(Intl.NumberFormat(_vm.locale, {\n style: 'currency',\n currency: transaction.currency_code\n }).format(parseFloat(transaction.amount))))]),_vm._v(\")\\n \")]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"btn-group btn-group-xs float-right\"},[_c('button',{staticClass:\"btn btn-xs btn-danger\",attrs:{\"tabindex\":\"-1\"},on:{\"click\":function($event){return _vm.removeLink(index)}}},[_c('i',{staticClass:\"far fa-trash-alt\"})])])])}),0):_vm._e(),_vm._v(\" \"),(_vm.links.length > 0)?_c('div',{staticClass:\"form-text\"},[_c('button',{staticClass:\"btn btn-default\",attrs:{\"data-target\":'#linkModal' + _vm.index,\"data-toggle\":\"modal\"},on:{\"click\":_vm.resetModal}},[_c('i',{staticClass:\"fas fa-plus\"})])]):_vm._e()])])]),_vm._v(\" \"),_c('div',{ref:'linkModal' + _vm.index,staticClass:\"modal\",attrs:{\"id\":'linkModal' + _vm.index,\"tabindex\":\"-1\"}},[_c('div',{staticClass:\"modal-dialog modal-lg\"},[_c('div',{staticClass:\"modal-content\"},[_vm._m(0),_vm._v(\" \"),_c('div',{staticClass:\"modal-body\"},[_c('div',{staticClass:\"container-fluid\"},[_vm._m(1),_vm._v(\" \"),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col\"},[_c('form',{on:{\"submit\":function($event){$event.preventDefault();return _vm.search($event)}}},[_c('div',{staticClass:\"input-group\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.query),expression:\"query\"}],staticClass:\"form-control\",attrs:{\"id\":\"query\",\"autocomplete\":\"off\",\"maxlength\":\"255\",\"name\":\"search\",\"placeholder\":\"Search query\",\"type\":\"text\"},domProps:{\"value\":(_vm.query)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.query=$event.target.value}}}),_vm._v(\" \"),_vm._m(2)])])])]),_vm._v(\" \"),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col\"},[(_vm.searching)?_c('span',[_c('i',{staticClass:\"fas fa-spinner fa-spin\"})]):_vm._e(),_vm._v(\" \"),(_vm.searchResults.length > 0)?_c('h4',[_vm._v(\"Search results\")]):_vm._e(),_vm._v(\" \"),(_vm.searchResults.length > 0)?_c('table',{staticClass:\"table table-sm\"},[_vm._m(3),_vm._v(\" \"),_c('tbody',_vm._l((_vm.searchResults),function(result){return _c('tr',[_c('td',[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(result.selected),expression:\"result.selected\"}],staticClass:\"form-control\",attrs:{\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(result.selected)?_vm._i(result.selected,null)>-1:(result.selected)},on:{\"change\":[function($event){var $$a=result.selected,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(result, \"selected\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(result, \"selected\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(result, \"selected\", $$c)}},function($event){return _vm.selectTransaction($event)}]}})]),_vm._v(\" \"),_c('td',[_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(result.link_type_id),expression:\"result.link_type_id\"}],staticClass:\"form-control\",on:{\"change\":[function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.$set(result, \"link_type_id\", $event.target.multiple ? $$selectedVal : $$selectedVal[0])},function($event){return _vm.selectLinkType($event)}]}},_vm._l((_vm.linkTypes),function(linkType){return _c('option',{attrs:{\"label\":linkType.type},domProps:{\"value\":linkType.id + '-' + linkType.direction}},[_vm._v(_vm._s(linkType.type)+\"\\n \")])}),0)]),_vm._v(\" \"),_c('td',[_c('a',{attrs:{\"href\":'./transactions/show/' + result.transaction_group_id}},[_vm._v(_vm._s(result.description))]),_vm._v(\" \"),(result.type === 'withdrawal')?_c('span',[_vm._v(\"\\n (\"),_c('span',{staticClass:\"text-danger\"},[_vm._v(_vm._s(Intl.NumberFormat(_vm.locale, {\n style: 'currency',\n currency: result.currency_code\n }).format(parseFloat(result.amount) * -1)))]),_vm._v(\")\\n \")]):_vm._e(),_vm._v(\" \"),(result.type === 'deposit')?_c('span',[_vm._v(\"\\n (\"),_c('span',{staticClass:\"text-success\"},[_vm._v(_vm._s(Intl.NumberFormat(_vm.locale, {\n style: 'currency',\n currency: result.currency_code\n }).format(parseFloat(result.amount))))]),_vm._v(\")\\n \")]):_vm._e(),_vm._v(\" \"),(result.type === 'transfer')?_c('span',[_vm._v(\"\\n (\"),_c('span',{staticClass:\"text-info\"},[_vm._v(_vm._s(Intl.NumberFormat(_vm.locale, {\n style: 'currency',\n currency: result.currency_code\n }).format(parseFloat(result.amount))))]),_vm._v(\")\\n \")]):_vm._e(),_vm._v(\" \"),_c('br'),_vm._v(\" \"),_c('em',[_c('a',{attrs:{\"href\":'./accounts/show/' + result.source_id}},[_vm._v(_vm._s(result.source_name))]),_vm._v(\"\\n →\\n \"),_c('a',{attrs:{\"href\":'./accounts/show/' + result.destination_id}},[_vm._v(_vm._s(result.destination_name))])])])])}),0)]):_vm._e()])])])]),_vm._v(\" \"),_vm._m(4)])])])]):_vm._e()}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"modal-header\"},[_c('h5',{staticClass:\"modal-title\"},[_vm._v(\"Transaction thing dialog.\")]),_vm._v(\" \"),_c('button',{staticClass:\"close\",attrs:{\"aria-label\":\"Close\",\"data-dismiss\":\"modal\",\"type\":\"button\"}},[_c('span',{attrs:{\"aria-hidden\":\"true\"}},[_vm._v(\"×\")])])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col\"},[_c('p',[_vm._v(\"\\n Use this form to search for transactions you wish to link to this one. When in doubt, use \"),_c('code',[_vm._v(\"id:*\")]),_vm._v(\" where the ID is the number from\\n the URL.\\n \")])])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-append\"},[_c('button',{staticClass:\"btn btn-default\",attrs:{\"type\":\"submit\"}},[_c('i',{staticClass:\"fas fa-search\"}),_vm._v(\" Search\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('thead',[_c('tr',[_c('th',{staticStyle:{\"width\":\"33%\"},attrs:{\"colspan\":\"2\"}},[_vm._v(\"Include?\")]),_vm._v(\" \"),_c('th',[_vm._v(\"Transaction\")])])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"modal-footer\"},[_c('button',{staticClass:\"btn btn-secondary\",attrs:{\"data-dismiss\":\"modal\",\"type\":\"button\"}},[_vm._v(\"Close\")])])}]\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionAttachments.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionAttachments.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n\n\n","import { render, staticRenderFns } from \"./TransactionAttachments.vue?vue&type=template&id=c0a65b6c&scoped=true&\"\nimport script from \"./TransactionAttachments.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionAttachments.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"c0a65b6c\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.showField)?_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.attachments'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"input-group\"},[_c('input',{ref:\"att\",staticClass:\"form-control\",attrs:{\"multiple\":\"\",\"name\":\"attachments[]\",\"type\":\"file\"},on:{\"change\":_vm.selectedFile}})])]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { setOptions, CRS, latLng, latLngBounds, map, DomEvent } from 'leaflet';\n\nvar debounce = function (fn, time) {\n var timeout;\n\n var debouncedFunction = function() {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var context = this;\n if (timeout) {\n clearTimeout(timeout);\n }\n timeout = setTimeout(function () {\n fn.apply(context, args);\n timeout = null;\n }, time);\n };\n\n debouncedFunction.cancel = function() {\n if (timeout) {\n clearTimeout(timeout);\n }\n };\n\n return debouncedFunction;\n};\n\nvar capitalizeFirstLetter = function (string) {\n if (!string || typeof string.charAt !== 'function') {\n return string;\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n};\n\nvar propsBinder = function (vueElement, leafletElement, props, options) {\n var loop = function ( key ) {\n var setMethodName = 'set' + capitalizeFirstLetter(key);\n var deepValue =\n props[key].type === Object ||\n props[key].type === Array ||\n Array.isArray(props[key].type);\n if (props[key].custom && vueElement[setMethodName]) {\n vueElement.$watch(\n key,\n function (newVal, oldVal) {\n vueElement[setMethodName](newVal, oldVal);\n },\n {\n deep: deepValue,\n }\n );\n } else if (setMethodName === 'setOptions') {\n vueElement.$watch(\n key,\n function (newVal, oldVal) {\n setOptions(leafletElement, newVal);\n },\n {\n deep: deepValue,\n }\n );\n } else if (leafletElement[setMethodName]) {\n vueElement.$watch(\n key,\n function (newVal, oldVal) {\n leafletElement[setMethodName](newVal);\n },\n {\n deep: deepValue,\n }\n );\n }\n };\n\n for (var key in props) loop( key );\n};\n\nvar collectionCleaner = function (options) {\n var result = {};\n for (var key in options) {\n var value = options[key];\n if (value !== null && value !== undefined) {\n result[key] = value;\n }\n }\n return result;\n};\n\nvar optionsMerger = function (props, instance) {\n var options =\n instance.options && instance.options.constructor === Object\n ? instance.options\n : {};\n props = props && props.constructor === Object ? props : {};\n var result = collectionCleaner(options);\n props = collectionCleaner(props);\n var defaultProps = instance.$options.props;\n for (var key in props) {\n var def = defaultProps[key]\n ? defaultProps[key].default &&\n typeof defaultProps[key].default === 'function'\n ? defaultProps[key].default.call()\n : defaultProps[key].default\n : Symbol('unique');\n var isEqual = false;\n if (Array.isArray(def)) {\n isEqual = JSON.stringify(def) === JSON.stringify(props[key]);\n } else {\n isEqual = def === props[key];\n }\n if (result[key] && !isEqual) {\n console.warn(\n (key + \" props is overriding the value passed in the options props\")\n );\n result[key] = props[key];\n } else if (!result[key]) {\n result[key] = props[key];\n }\n }\n return result;\n};\n\nvar Options = {\n props: {\n /**\n * Leaflet options to pass to the component constructor\n */\n options: {\n type: Object,\n default: function () { return ({}); }\n }\n }\n};\n\n//\n\n/**\n * Base component, contains and wrap all the other components.\n */\nvar script = {\n name: 'LMap',\n mixins: [Options],\n props: {\n /**\n * The center of the map, supports .sync modifier\n */\n center: {\n type: [Object, Array],\n custom: true,\n default: function () { return [0, 0]; },\n },\n /**\n * The bounds of the map, supports .sync modifier\n */\n bounds: {\n type: [Array, Object],\n custom: true,\n default: null,\n },\n /**\n * The max bounds of the map\n */\n maxBounds: {\n type: [Array, Object],\n default: null,\n },\n /**\n * The zoom of the map, supports .sync modifier\n */\n zoom: {\n type: Number,\n custom: true,\n default: 0,\n },\n /**\n * The minZoom of the map\n */\n minZoom: {\n type: Number,\n default: null,\n },\n /**\n * The maxZoom of the map\n */\n maxZoom: {\n type: Number,\n default: null,\n },\n /**\n * The paddingBottomRight of the map\n */\n paddingBottomRight: {\n type: Array,\n custom: true,\n default: null,\n },\n /**\n * The paddingTopLeft of the map\n */\n paddingTopLeft: {\n type: Array,\n custom: true,\n default: null,\n },\n /**\n * The padding of the map\n */\n padding: {\n type: Array,\n custom: true,\n default: null,\n },\n /**\n * The worldCopyJump option for the map\n */\n worldCopyJump: {\n type: Boolean,\n default: false,\n },\n /**\n * The crs option for the map\n * @values CRS.EPSG3857\n */\n crs: {\n type: Object,\n custom: true,\n default: function () { return CRS.EPSG3857; },\n },\n maxBoundsViscosity: {\n type: Number,\n default: null,\n },\n inertia: {\n type: Boolean,\n default: null,\n },\n inertiaDeceleration: {\n type: Number,\n default: null,\n },\n inertiaMaxSpeed: {\n type: Number,\n default: null,\n },\n easeLinearity: {\n type: Number,\n default: null,\n },\n zoomAnimation: {\n type: Boolean,\n default: null,\n },\n zoomAnimationThreshold: {\n type: Number,\n default: null,\n },\n fadeAnimation: {\n type: Boolean,\n default: null,\n },\n markerZoomAnimation: {\n type: Boolean,\n default: null,\n },\n noBlockingAnimations: {\n type: Boolean,\n default: false,\n },\n },\n data: function data() {\n return {\n ready: false,\n lastSetCenter: this.center ? latLng(this.center) : null,\n lastSetBounds: this.bounds ? latLngBounds(this.bounds) : null,\n layerControl: undefined,\n layersToAdd: [],\n layersInControl: [],\n };\n },\n computed: {\n fitBoundsOptions: function fitBoundsOptions() {\n var options = {\n animate: this.noBlockingAnimations ? false : null,\n };\n if (this.padding) {\n options.padding = this.padding;\n } else {\n if (this.paddingBottomRight) {\n options.paddingBottomRight = this.paddingBottomRight;\n }\n if (this.paddingTopLeft) {\n options.paddingTopLeft = this.paddingTopLeft;\n }\n }\n return options;\n },\n },\n beforeDestroy: function beforeDestroy() {\n if (this.debouncedMoveEndHandler) {\n this.debouncedMoveEndHandler.cancel();\n }\n\n if (this.mapObject) {\n this.mapObject.remove();\n }\n },\n mounted: function mounted() {\n var this$1 = this;\n\n var options = optionsMerger(\n {\n minZoom: this.minZoom,\n maxZoom: this.maxZoom,\n maxBounds: this.maxBounds,\n maxBoundsViscosity: this.maxBoundsViscosity,\n worldCopyJump: this.worldCopyJump,\n crs: this.crs,\n center: this.center,\n zoom: this.zoom,\n inertia: this.inertia,\n inertiaDeceleration: this.inertiaDeceleration,\n inertiaMaxSpeed: this.inertiaMaxSpeed,\n easeLinearity: this.easeLinearity,\n zoomAnimation: this.zoomAnimation,\n zoomAnimationThreshold: this.zoomAnimationThreshold,\n fadeAnimation: this.fadeAnimation,\n markerZoomAnimation: this.markerZoomAnimation,\n },\n this\n );\n this.mapObject = map(this.$el, options);\n if (this.bounds) {\n this.mapObject.fitBounds(this.bounds);\n }\n this.debouncedMoveEndHandler = debounce(this.moveEndHandler, 100);\n this.mapObject.on('moveend', this.debouncedMoveEndHandler);\n this.mapObject.on('overlayadd', this.overlayAddHandler);\n this.mapObject.on('overlayremove', this.overlayRemoveHandler);\n DomEvent.on(this.mapObject, this.$listeners);\n propsBinder(this, this.mapObject, this.$options.props);\n this.ready = true;\n /**\n * DEPRECATED event\n * @deprecated\n */\n this.$emit('leaflet:load');\n this.$nextTick(function () {\n /**\n * Triggers when the component is ready\n * @type {object}\n * @property {object} mapObject - reference to leaflet map object\n */\n this$1.$emit('ready', this$1.mapObject);\n });\n },\n methods: {\n registerLayerControl: function registerLayerControl(lControlLayers) {\n var this$1 = this;\n\n this.layerControl = lControlLayers;\n this.mapObject.addControl(lControlLayers.mapObject);\n this.layersToAdd.forEach(function (layer) {\n this$1.layerControl.addLayer(layer);\n });\n this.layersToAdd = [];\n },\n addLayer: function addLayer(layer, alreadyAdded) {\n if (layer.layerType !== undefined) {\n if (this.layerControl === undefined) {\n this.layersToAdd.push(layer);\n } else {\n var exist = this.layersInControl.find(\n function (l) { return l.mapObject._leaflet_id === layer.mapObject._leaflet_id; }\n );\n if (!exist) {\n this.layerControl.addLayer(layer);\n this.layersInControl.push(layer);\n }\n }\n }\n if (!alreadyAdded && layer.visible !== false) {\n this.mapObject.addLayer(layer.mapObject);\n }\n },\n hideLayer: function hideLayer(layer) {\n this.mapObject.removeLayer(layer.mapObject);\n },\n removeLayer: function removeLayer(layer, alreadyRemoved) {\n if (layer.layerType !== undefined) {\n if (this.layerControl === undefined) {\n this.layersToAdd = this.layersToAdd.filter(\n function (l) { return l.name !== layer.name; }\n );\n } else {\n this.layerControl.removeLayer(layer);\n this.layersInControl = this.layersInControl.filter(\n function (l) { return l.mapObject._leaflet_id !== layer.mapObject._leaflet_id; }\n );\n }\n }\n if (!alreadyRemoved) {\n this.mapObject.removeLayer(layer.mapObject);\n }\n },\n setZoom: function setZoom(newVal, oldVal) {\n if (newVal === undefined || newVal === null) { return; }\n this.mapObject.setZoom(newVal, {\n animate: this.noBlockingAnimations ? false : null,\n });\n this.cacheMapView();\n },\n setCenter: function setCenter(newVal, oldVal) {\n if (newVal == null) {\n return;\n }\n var newCenter = latLng(newVal);\n var oldCenter = this.lastSetCenter || this.mapObject.getCenter();\n if (oldCenter.lat !== newCenter.lat || oldCenter.lng !== newCenter.lng) {\n this.lastSetCenter = newCenter;\n this.mapObject.panTo(newCenter, {\n animate: this.noBlockingAnimations ? false : null,\n });\n this.cacheMapView(undefined, newCenter);\n }\n },\n setBounds: function setBounds(newVal, oldVal) {\n if (!newVal) {\n return;\n }\n var newBounds = latLngBounds(newVal);\n if (!newBounds.isValid()) {\n return;\n }\n var oldBounds = this.lastSetBounds || this.mapObject.getBounds();\n var boundsChanged = !oldBounds.equals(newBounds, 0); // set maxMargin to 0 - check exact equals\n if (boundsChanged) {\n this.mapObject.fitBounds(newBounds, this.fitBoundsOptions);\n this.cacheMapView(newBounds);\n }\n },\n setPaddingBottomRight: function setPaddingBottomRight(newVal, oldVal) {\n this.paddingBottomRight = newVal;\n },\n setPaddingTopLeft: function setPaddingTopLeft(newVal, oldVal) {\n this.paddingTopLeft = newVal;\n },\n setPadding: function setPadding(newVal, oldVal) {\n this.padding = newVal;\n },\n setCrs: function setCrs(newVal, oldVal) {\n var mapObject = this.mapObject,\n prevBounds = mapObject.getBounds();\n mapObject.options.crs = newVal;\n mapObject.fitBounds(prevBounds, { animate: false, padding: [0, 0] });\n },\n fitBounds: function fitBounds(bounds) {\n this.mapObject.fitBounds(bounds, {\n animate: this.noBlockingAnimations ? false : null,\n });\n },\n moveEndHandler: function moveEndHandler() {\n /**\n * Triggers when zoom is updated\n * @type {number,string}\n */\n this.$emit('update:zoom', this.mapObject.getZoom());\n var center = this.mapObject.getCenter();\n /**\n * Triggers when center is updated\n * @type {object,array}\n */\n this.$emit('update:center', center);\n var bounds = this.mapObject.getBounds();\n /**\n * Triggers when bounds are updated\n * @type {object}\n */\n this.$emit('update:bounds', bounds);\n },\n overlayAddHandler: function overlayAddHandler(e) {\n var layer = this.layersInControl.find(function (l) { return l.name === e.name; });\n if (layer) {\n layer.updateVisibleProp(true);\n }\n },\n overlayRemoveHandler: function overlayRemoveHandler(e) {\n var layer = this.layersInControl.find(function (l) { return l.name === e.name; });\n if (layer) {\n layer.updateVisibleProp(false);\n }\n },\n cacheMapView: function cacheMapView(bounds, center) {\n // Cache the last values used to define the map view by mutating props.\n this.lastSetBounds = bounds || this.mapObject.getBounds();\n this.lastSetCenter = center || this.lastSetBounds.getCenter();\n },\n },\n};\n\nfunction normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {\r\n if (typeof shadowMode !== 'boolean') {\r\n createInjectorSSR = createInjector;\r\n createInjector = shadowMode;\r\n shadowMode = false;\r\n }\r\n // Vue.extend constructor export interop.\r\n var options = typeof script === 'function' ? script.options : script;\r\n // render functions\r\n if (template && template.render) {\r\n options.render = template.render;\r\n options.staticRenderFns = template.staticRenderFns;\r\n options._compiled = true;\r\n // functional template\r\n if (isFunctionalTemplate) {\r\n options.functional = true;\r\n }\r\n }\r\n // scopedId\r\n if (scopeId) {\r\n options._scopeId = scopeId;\r\n }\r\n var hook;\r\n if (moduleIdentifier) {\r\n // server build\r\n hook = function (context) {\r\n // 2.3 injection\r\n context =\r\n context || // cached call\r\n (this.$vnode && this.$vnode.ssrContext) || // stateful\r\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional\r\n // 2.2 with runInNewContext: true\r\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\r\n context = __VUE_SSR_CONTEXT__;\r\n }\r\n // inject component styles\r\n if (style) {\r\n style.call(this, createInjectorSSR(context));\r\n }\r\n // register component module identifier for async chunk inference\r\n if (context && context._registeredComponents) {\r\n context._registeredComponents.add(moduleIdentifier);\r\n }\r\n };\r\n // used by ssr in case component is cached and beforeCreate\r\n // never gets called\r\n options._ssrRegister = hook;\r\n }\r\n else if (style) {\r\n hook = shadowMode\r\n ? function (context) {\r\n style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));\r\n }\r\n : function (context) {\r\n style.call(this, createInjector(context));\r\n };\r\n }\r\n if (hook) {\r\n if (options.functional) {\r\n // register for functional component in vue file\r\n var originalRender = options.render;\r\n options.render = function renderWithStyleInjection(h, context) {\r\n hook.call(context);\r\n return originalRender(h, context);\r\n };\r\n }\r\n else {\r\n // inject component registration as beforeCreate hook\r\n var existing = options.beforeCreate;\r\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook];\r\n }\r\n }\r\n return script;\r\n}\n\nvar isOldIE = typeof navigator !== 'undefined' &&\r\n /msie [6-9]\\\\b/.test(navigator.userAgent.toLowerCase());\r\nfunction createInjector(context) {\r\n return function (id, style) { return addStyle(id, style); };\r\n}\r\nvar HEAD;\r\nvar styles = {};\r\nfunction addStyle(id, css) {\r\n var group = isOldIE ? css.media || 'default' : id;\r\n var style = styles[group] || (styles[group] = { ids: new Set(), styles: [] });\r\n if (!style.ids.has(id)) {\r\n style.ids.add(id);\r\n var code = css.source;\r\n if (css.map) {\r\n // https://developer.chrome.com/devtools/docs/javascript-debugging\r\n // this makes source maps inside style tags work properly in Chrome\r\n code += '\\n/*# sourceURL=' + css.map.sources[0] + ' */';\r\n // http://stackoverflow.com/a/26603875\r\n code +=\r\n '\\n/*# sourceMappingURL=data:application/json;base64,' +\r\n btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) +\r\n ' */';\r\n }\r\n if (!style.element) {\r\n style.element = document.createElement('style');\r\n style.element.type = 'text/css';\r\n if (css.media)\r\n { style.element.setAttribute('media', css.media); }\r\n if (HEAD === undefined) {\r\n HEAD = document.head || document.getElementsByTagName('head')[0];\r\n }\r\n HEAD.appendChild(style.element);\r\n }\r\n if ('styleSheet' in style.element) {\r\n style.styles.push(code);\r\n style.element.styleSheet.cssText = style.styles\r\n .filter(Boolean)\r\n .join('\\n');\r\n }\r\n else {\r\n var index = style.ids.size - 1;\r\n var textNode = document.createTextNode(code);\r\n var nodes = style.element.childNodes;\r\n if (nodes[index])\r\n { style.element.removeChild(nodes[index]); }\r\n if (nodes.length)\r\n { style.element.insertBefore(textNode, nodes[index]); }\r\n else\r\n { style.element.appendChild(textNode); }\r\n }\r\n }\r\n}\n\n/* script */\nvar __vue_script__ = script;\n\n/* template */\nvar __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"vue2leaflet-map\"},[(_vm.ready)?_vm._t(\"default\"):_vm._e()],2)};\nvar __vue_staticRenderFns__ = [];\n\n /* style */\n var __vue_inject_styles__ = function (inject) {\n if (!inject) { return }\n inject(\"data-v-64f90fd7_0\", { source: \".vue2leaflet-map{height:100%;width:100%}\", map: undefined, media: undefined });\n\n };\n /* scoped */\n var __vue_scope_id__ = undefined;\n /* module identifier */\n var __vue_module_identifier__ = undefined;\n /* functional template */\n var __vue_is_functional_template__ = false;\n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__ = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },\n __vue_inject_styles__,\n __vue_script__,\n __vue_scope_id__,\n __vue_is_functional_template__,\n __vue_module_identifier__,\n false,\n createInjector,\n undefined,\n undefined\n );\n\nexport default __vue_component__;\n","import { setOptions, tileLayer, DomEvent } from 'leaflet';\n\nvar capitalizeFirstLetter = function (string) {\n if (!string || typeof string.charAt !== 'function') {\n return string;\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n};\n\nvar propsBinder = function (vueElement, leafletElement, props, options) {\n var loop = function ( key ) {\n var setMethodName = 'set' + capitalizeFirstLetter(key);\n var deepValue =\n props[key].type === Object ||\n props[key].type === Array ||\n Array.isArray(props[key].type);\n if (props[key].custom && vueElement[setMethodName]) {\n vueElement.$watch(\n key,\n function (newVal, oldVal) {\n vueElement[setMethodName](newVal, oldVal);\n },\n {\n deep: deepValue,\n }\n );\n } else if (setMethodName === 'setOptions') {\n vueElement.$watch(\n key,\n function (newVal, oldVal) {\n setOptions(leafletElement, newVal);\n },\n {\n deep: deepValue,\n }\n );\n } else if (leafletElement[setMethodName]) {\n vueElement.$watch(\n key,\n function (newVal, oldVal) {\n leafletElement[setMethodName](newVal);\n },\n {\n deep: deepValue,\n }\n );\n }\n };\n\n for (var key in props) loop( key );\n};\n\nvar collectionCleaner = function (options) {\n var result = {};\n for (var key in options) {\n var value = options[key];\n if (value !== null && value !== undefined) {\n result[key] = value;\n }\n }\n return result;\n};\n\nvar optionsMerger = function (props, instance) {\n var options =\n instance.options && instance.options.constructor === Object\n ? instance.options\n : {};\n props = props && props.constructor === Object ? props : {};\n var result = collectionCleaner(options);\n props = collectionCleaner(props);\n var defaultProps = instance.$options.props;\n for (var key in props) {\n var def = defaultProps[key]\n ? defaultProps[key].default &&\n typeof defaultProps[key].default === 'function'\n ? defaultProps[key].default.call()\n : defaultProps[key].default\n : Symbol('unique');\n var isEqual = false;\n if (Array.isArray(def)) {\n isEqual = JSON.stringify(def) === JSON.stringify(props[key]);\n } else {\n isEqual = def === props[key];\n }\n if (result[key] && !isEqual) {\n console.warn(\n (key + \" props is overriding the value passed in the options props\")\n );\n result[key] = props[key];\n } else if (!result[key]) {\n result[key] = props[key];\n }\n }\n return result;\n};\n\nvar findRealParent = function (firstVueParent) {\n var found = false;\n while (firstVueParent && !found) {\n if (firstVueParent.mapObject === undefined) {\n firstVueParent = firstVueParent.$parent;\n } else {\n found = true;\n }\n }\n return firstVueParent;\n};\n\nvar Layer = {\n props: {\n pane: {\n type: String,\n default: 'overlayPane',\n },\n attribution: {\n type: String,\n default: null,\n custom: true,\n },\n name: {\n type: String,\n custom: true,\n default: undefined,\n },\n layerType: {\n type: String,\n custom: true,\n default: undefined,\n },\n visible: {\n type: Boolean,\n custom: true,\n default: true,\n },\n },\n mounted: function mounted() {\n this.layerOptions = {\n attribution: this.attribution,\n pane: this.pane,\n };\n },\n beforeDestroy: function beforeDestroy() {\n this.unbindPopup();\n this.unbindTooltip();\n this.parentContainer.removeLayer(this);\n },\n methods: {\n setAttribution: function setAttribution(val, old) {\n var attributionControl = this.$parent.mapObject.attributionControl;\n attributionControl.removeAttribution(old).addAttribution(val);\n },\n setName: function setName() {\n this.parentContainer.removeLayer(this);\n if (this.visible) {\n this.parentContainer.addLayer(this);\n }\n },\n setLayerType: function setLayerType() {\n this.parentContainer.removeLayer(this);\n if (this.visible) {\n this.parentContainer.addLayer(this);\n }\n },\n setVisible: function setVisible(isVisible) {\n if (this.mapObject) {\n if (isVisible) {\n this.parentContainer.addLayer(this);\n } else {\n if (this.parentContainer.hideLayer) {\n this.parentContainer.hideLayer(this);\n } else {\n this.parentContainer.removeLayer(this);\n }\n }\n }\n },\n unbindTooltip: function unbindTooltip() {\n var tooltip = this.mapObject ? this.mapObject.getTooltip() : null;\n if (tooltip) {\n tooltip.unbindTooltip();\n }\n },\n unbindPopup: function unbindPopup() {\n var popup = this.mapObject ? this.mapObject.getPopup() : null;\n if (popup) {\n popup.unbindPopup();\n }\n },\n updateVisibleProp: function updateVisibleProp(value) {\n /**\n * Triggers when the visible prop needs to be updated\n * @type {boolean}\n * @property {boolean} value - value of the visible property\n */\n this.$emit('update:visible', value);\n },\n },\n};\n\nvar GridLayer = {\n mixins: [Layer],\n props: {\n pane: {\n type: String,\n default: 'tilePane'\n },\n opacity: {\n type: Number,\n custom: false,\n default: 1.0\n },\n zIndex: {\n type: Number,\n default: 1\n },\n tileSize: {\n type: Number,\n default: 256\n },\n noWrap: {\n type: Boolean,\n default: false\n }\n },\n mounted: function mounted () {\n this.gridLayerOptions = Object.assign({}, this.layerOptions,\n {pane: this.pane,\n opacity: this.opacity,\n zIndex: this.zIndex,\n tileSize: this.tileSize,\n noWrap: this.noWrap});\n }\n};\n\nvar TileLayerMixin = {\n mixins: [GridLayer],\n props: {\n tms: {\n type: Boolean,\n default: false,\n },\n subdomains: {\n type: [String, Array],\n default: 'abc',\n validator: function (prop) {\n if (typeof prop === 'string') { return true; }\n // Validates array that array only contains only strings\n if (Array.isArray(prop)) {\n return prop.every(function (subdomain) { return typeof subdomain === 'string'; });\n }\n return false;\n },\n },\n detectRetina: {\n type: Boolean,\n default: false,\n },\n },\n mounted: function mounted() {\n this.tileLayerOptions = Object.assign({}, this.gridLayerOptions,\n {tms: this.tms,\n subdomains: this.subdomains,\n detectRetina: this.detectRetina});\n },\n render: function render() {\n return null;\n },\n};\n\nvar Options = {\n props: {\n /**\n * Leaflet options to pass to the component constructor\n */\n options: {\n type: Object,\n default: function () { return ({}); }\n }\n }\n};\n\n//\n\n/**\n * Load tiles from a map server and display them accordingly to map zoom, center and size\n */\nvar script = {\n name: 'LTileLayer',\n mixins: [TileLayerMixin, Options],\n props: {\n url: {\n type: String,\n default: null,\n },\n tileLayerClass: {\n type: Function,\n default: tileLayer,\n },\n },\n mounted: function mounted() {\n var this$1 = this;\n\n var options = optionsMerger(this.tileLayerOptions, this);\n this.mapObject = this.tileLayerClass(this.url, options);\n DomEvent.on(this.mapObject, this.$listeners);\n propsBinder(this, this.mapObject, this.$options.props);\n this.parentContainer = findRealParent(this.$parent);\n this.parentContainer.addLayer(this, !this.visible);\n this.$nextTick(function () {\n /**\n * Triggers when the component is ready\n * @type {object}\n * @property {object} mapObject - reference to leaflet map object\n */\n this$1.$emit('ready', this$1.mapObject);\n });\n },\n};\n\nfunction normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {\r\n if (typeof shadowMode !== 'boolean') {\r\n createInjectorSSR = createInjector;\r\n createInjector = shadowMode;\r\n shadowMode = false;\r\n }\r\n // Vue.extend constructor export interop.\r\n var options = typeof script === 'function' ? script.options : script;\r\n // render functions\r\n if (template && template.render) {\r\n options.render = template.render;\r\n options.staticRenderFns = template.staticRenderFns;\r\n options._compiled = true;\r\n // functional template\r\n if (isFunctionalTemplate) {\r\n options.functional = true;\r\n }\r\n }\r\n // scopedId\r\n if (scopeId) {\r\n options._scopeId = scopeId;\r\n }\r\n var hook;\r\n if (moduleIdentifier) {\r\n // server build\r\n hook = function (context) {\r\n // 2.3 injection\r\n context =\r\n context || // cached call\r\n (this.$vnode && this.$vnode.ssrContext) || // stateful\r\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional\r\n // 2.2 with runInNewContext: true\r\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\r\n context = __VUE_SSR_CONTEXT__;\r\n }\r\n // inject component styles\r\n if (style) {\r\n style.call(this, createInjectorSSR(context));\r\n }\r\n // register component module identifier for async chunk inference\r\n if (context && context._registeredComponents) {\r\n context._registeredComponents.add(moduleIdentifier);\r\n }\r\n };\r\n // used by ssr in case component is cached and beforeCreate\r\n // never gets called\r\n options._ssrRegister = hook;\r\n }\r\n else if (style) {\r\n hook = shadowMode\r\n ? function (context) {\r\n style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));\r\n }\r\n : function (context) {\r\n style.call(this, createInjector(context));\r\n };\r\n }\r\n if (hook) {\r\n if (options.functional) {\r\n // register for functional component in vue file\r\n var originalRender = options.render;\r\n options.render = function renderWithStyleInjection(h, context) {\r\n hook.call(context);\r\n return originalRender(h, context);\r\n };\r\n }\r\n else {\r\n // inject component registration as beforeCreate hook\r\n var existing = options.beforeCreate;\r\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook];\r\n }\r\n }\r\n return script;\r\n}\n\n/* script */\nvar __vue_script__ = script;\n\n/* template */\nvar __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div')};\nvar __vue_staticRenderFns__ = [];\n\n /* style */\n var __vue_inject_styles__ = undefined;\n /* scoped */\n var __vue_scope_id__ = undefined;\n /* module identifier */\n var __vue_module_identifier__ = undefined;\n /* functional template */\n var __vue_is_functional_template__ = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__ = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },\n __vue_inject_styles__,\n __vue_script__,\n __vue_scope_id__,\n __vue_is_functional_template__,\n __vue_module_identifier__,\n false,\n undefined,\n undefined,\n undefined\n );\n\nexport default __vue_component__;\n","import { setOptions, Icon, marker, DomEvent, latLng } from 'leaflet';\n\nvar debounce = function (fn, time) {\n var timeout;\n\n var debouncedFunction = function() {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var context = this;\n if (timeout) {\n clearTimeout(timeout);\n }\n timeout = setTimeout(function () {\n fn.apply(context, args);\n timeout = null;\n }, time);\n };\n\n debouncedFunction.cancel = function() {\n if (timeout) {\n clearTimeout(timeout);\n }\n };\n\n return debouncedFunction;\n};\n\nvar capitalizeFirstLetter = function (string) {\n if (!string || typeof string.charAt !== 'function') {\n return string;\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n};\n\nvar propsBinder = function (vueElement, leafletElement, props, options) {\n var loop = function ( key ) {\n var setMethodName = 'set' + capitalizeFirstLetter(key);\n var deepValue =\n props[key].type === Object ||\n props[key].type === Array ||\n Array.isArray(props[key].type);\n if (props[key].custom && vueElement[setMethodName]) {\n vueElement.$watch(\n key,\n function (newVal, oldVal) {\n vueElement[setMethodName](newVal, oldVal);\n },\n {\n deep: deepValue,\n }\n );\n } else if (setMethodName === 'setOptions') {\n vueElement.$watch(\n key,\n function (newVal, oldVal) {\n setOptions(leafletElement, newVal);\n },\n {\n deep: deepValue,\n }\n );\n } else if (leafletElement[setMethodName]) {\n vueElement.$watch(\n key,\n function (newVal, oldVal) {\n leafletElement[setMethodName](newVal);\n },\n {\n deep: deepValue,\n }\n );\n }\n };\n\n for (var key in props) loop( key );\n};\n\nvar collectionCleaner = function (options) {\n var result = {};\n for (var key in options) {\n var value = options[key];\n if (value !== null && value !== undefined) {\n result[key] = value;\n }\n }\n return result;\n};\n\nvar optionsMerger = function (props, instance) {\n var options =\n instance.options && instance.options.constructor === Object\n ? instance.options\n : {};\n props = props && props.constructor === Object ? props : {};\n var result = collectionCleaner(options);\n props = collectionCleaner(props);\n var defaultProps = instance.$options.props;\n for (var key in props) {\n var def = defaultProps[key]\n ? defaultProps[key].default &&\n typeof defaultProps[key].default === 'function'\n ? defaultProps[key].default.call()\n : defaultProps[key].default\n : Symbol('unique');\n var isEqual = false;\n if (Array.isArray(def)) {\n isEqual = JSON.stringify(def) === JSON.stringify(props[key]);\n } else {\n isEqual = def === props[key];\n }\n if (result[key] && !isEqual) {\n console.warn(\n (key + \" props is overriding the value passed in the options props\")\n );\n result[key] = props[key];\n } else if (!result[key]) {\n result[key] = props[key];\n }\n }\n return result;\n};\n\nvar findRealParent = function (firstVueParent) {\n var found = false;\n while (firstVueParent && !found) {\n if (firstVueParent.mapObject === undefined) {\n firstVueParent = firstVueParent.$parent;\n } else {\n found = true;\n }\n }\n return firstVueParent;\n};\n\nvar Layer = {\n props: {\n pane: {\n type: String,\n default: 'overlayPane',\n },\n attribution: {\n type: String,\n default: null,\n custom: true,\n },\n name: {\n type: String,\n custom: true,\n default: undefined,\n },\n layerType: {\n type: String,\n custom: true,\n default: undefined,\n },\n visible: {\n type: Boolean,\n custom: true,\n default: true,\n },\n },\n mounted: function mounted() {\n this.layerOptions = {\n attribution: this.attribution,\n pane: this.pane,\n };\n },\n beforeDestroy: function beforeDestroy() {\n this.unbindPopup();\n this.unbindTooltip();\n this.parentContainer.removeLayer(this);\n },\n methods: {\n setAttribution: function setAttribution(val, old) {\n var attributionControl = this.$parent.mapObject.attributionControl;\n attributionControl.removeAttribution(old).addAttribution(val);\n },\n setName: function setName() {\n this.parentContainer.removeLayer(this);\n if (this.visible) {\n this.parentContainer.addLayer(this);\n }\n },\n setLayerType: function setLayerType() {\n this.parentContainer.removeLayer(this);\n if (this.visible) {\n this.parentContainer.addLayer(this);\n }\n },\n setVisible: function setVisible(isVisible) {\n if (this.mapObject) {\n if (isVisible) {\n this.parentContainer.addLayer(this);\n } else {\n if (this.parentContainer.hideLayer) {\n this.parentContainer.hideLayer(this);\n } else {\n this.parentContainer.removeLayer(this);\n }\n }\n }\n },\n unbindTooltip: function unbindTooltip() {\n var tooltip = this.mapObject ? this.mapObject.getTooltip() : null;\n if (tooltip) {\n tooltip.unbindTooltip();\n }\n },\n unbindPopup: function unbindPopup() {\n var popup = this.mapObject ? this.mapObject.getPopup() : null;\n if (popup) {\n popup.unbindPopup();\n }\n },\n updateVisibleProp: function updateVisibleProp(value) {\n /**\n * Triggers when the visible prop needs to be updated\n * @type {boolean}\n * @property {boolean} value - value of the visible property\n */\n this.$emit('update:visible', value);\n },\n },\n};\n\nvar Options = {\n props: {\n /**\n * Leaflet options to pass to the component constructor\n */\n options: {\n type: Object,\n default: function () { return ({}); }\n }\n }\n};\n\n/**\n * Marker component, lets you add and personalize markers on the map\n */\nvar script = {\n name: 'LMarker',\n mixins: [Layer, Options],\n props: {\n pane: {\n type: String,\n default: 'markerPane',\n },\n draggable: {\n type: Boolean,\n custom: true,\n default: false,\n },\n latLng: {\n type: [Object, Array],\n custom: true,\n default: null,\n },\n icon: {\n type: [Object],\n custom: false,\n default: function () { return new Icon.Default(); },\n },\n zIndexOffset: {\n type: Number,\n custom: false,\n default: null,\n },\n },\n data: function data() {\n return {\n ready: false,\n };\n },\n beforeDestroy: function beforeDestroy() {\n if (this.debouncedLatLngSync) {\n this.debouncedLatLngSync.cancel();\n }\n },\n mounted: function mounted() {\n var this$1 = this;\n\n var options = optionsMerger(\n Object.assign({}, this.layerOptions,\n {icon: this.icon,\n zIndexOffset: this.zIndexOffset,\n draggable: this.draggable}),\n this\n );\n this.mapObject = marker(this.latLng, options);\n DomEvent.on(this.mapObject, this.$listeners);\n this.debouncedLatLngSync = debounce(this.latLngSync, 100);\n this.mapObject.on('move', this.debouncedLatLngSync);\n propsBinder(this, this.mapObject, this.$options.props);\n this.parentContainer = findRealParent(this.$parent);\n this.parentContainer.addLayer(this, !this.visible);\n this.ready = true;\n this.$nextTick(function () {\n /**\n * Triggers when the component is ready\n * @type {object}\n * @property {object} mapObject - reference to leaflet map object\n */\n this$1.$emit('ready', this$1.mapObject);\n });\n },\n methods: {\n setDraggable: function setDraggable(newVal, oldVal) {\n if (this.mapObject.dragging) {\n newVal\n ? this.mapObject.dragging.enable()\n : this.mapObject.dragging.disable();\n }\n },\n setLatLng: function setLatLng(newVal) {\n if (newVal == null) {\n return;\n }\n\n if (this.mapObject) {\n var oldLatLng = this.mapObject.getLatLng();\n var newLatLng = latLng(newVal);\n if (\n newLatLng.lat !== oldLatLng.lat ||\n newLatLng.lng !== oldLatLng.lng\n ) {\n this.mapObject.setLatLng(newLatLng);\n }\n }\n },\n latLngSync: function latLngSync(event) {\n this.$emit('update:latLng', event.latlng);\n this.$emit('update:lat-lng', event.latlng);\n },\n },\n render: function(h) {\n if (this.ready && this.$slots.default) {\n return h('div', { style: { display: 'none' } }, this.$slots.default);\n }\n return null;\n },\n};\n\nfunction normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {\r\n if (typeof shadowMode !== 'boolean') {\r\n createInjectorSSR = createInjector;\r\n createInjector = shadowMode;\r\n shadowMode = false;\r\n }\r\n // Vue.extend constructor export interop.\r\n var options = typeof script === 'function' ? script.options : script;\r\n // render functions\r\n if (template && template.render) {\r\n options.render = template.render;\r\n options.staticRenderFns = template.staticRenderFns;\r\n options._compiled = true;\r\n // functional template\r\n if (isFunctionalTemplate) {\r\n options.functional = true;\r\n }\r\n }\r\n // scopedId\r\n if (scopeId) {\r\n options._scopeId = scopeId;\r\n }\r\n var hook;\r\n if (moduleIdentifier) {\r\n // server build\r\n hook = function (context) {\r\n // 2.3 injection\r\n context =\r\n context || // cached call\r\n (this.$vnode && this.$vnode.ssrContext) || // stateful\r\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional\r\n // 2.2 with runInNewContext: true\r\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\r\n context = __VUE_SSR_CONTEXT__;\r\n }\r\n // inject component styles\r\n if (style) {\r\n style.call(this, createInjectorSSR(context));\r\n }\r\n // register component module identifier for async chunk inference\r\n if (context && context._registeredComponents) {\r\n context._registeredComponents.add(moduleIdentifier);\r\n }\r\n };\r\n // used by ssr in case component is cached and beforeCreate\r\n // never gets called\r\n options._ssrRegister = hook;\r\n }\r\n else if (style) {\r\n hook = shadowMode\r\n ? function (context) {\r\n style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));\r\n }\r\n : function (context) {\r\n style.call(this, createInjector(context));\r\n };\r\n }\r\n if (hook) {\r\n if (options.functional) {\r\n // register for functional component in vue file\r\n var originalRender = options.render;\r\n options.render = function renderWithStyleInjection(h, context) {\r\n hook.call(context);\r\n return originalRender(h, context);\r\n };\r\n }\r\n else {\r\n // inject component registration as beforeCreate hook\r\n var existing = options.beforeCreate;\r\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook];\r\n }\r\n }\r\n return script;\r\n}\n\n/* script */\nvar __vue_script__ = script;\n\n/* template */\n\n /* style */\n var __vue_inject_styles__ = undefined;\n /* scoped */\n var __vue_scope_id__ = undefined;\n /* module identifier */\n var __vue_module_identifier__ = undefined;\n /* functional template */\n var __vue_is_functional_template__ = undefined;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__ = /*#__PURE__*/normalizeComponent(\n {},\n __vue_inject_styles__,\n __vue_script__,\n __vue_scope_id__,\n __vue_is_functional_template__,\n __vue_module_identifier__,\n false,\n undefined,\n undefined,\n undefined\n );\n\nexport default __vue_component__;\n","\n\n\n \n \n\n\n\n","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionLocation.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionLocation.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./TransactionLocation.vue?vue&type=template&id=3bafa3c9&scoped=true&\"\nimport script from \"./TransactionLocation.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionLocation.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"3bafa3c9\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.showField)?_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.location'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticStyle:{\"width\":\"100%\",\"height\":\"300px\"}},[_c('l-map',{ref:\"myMap\",staticStyle:{\"width\":\"100%\",\"height\":\"300px\"},attrs:{\"center\":_vm.center,\"zoom\":_vm.zoom},on:{\"ready\":function($event){return _vm.prepMap()},\"update:zoom\":_vm.zoomUpdated,\"update:center\":_vm.centerUpdated,\"update:bounds\":_vm.boundsUpdated}},[_c('l-tile-layer',{attrs:{\"url\":_vm.url}}),_vm._v(\" \"),_c('l-marker',{attrs:{\"lat-lng\":_vm.marker,\"visible\":_vm.hasMarker}})],1),_vm._v(\" \"),_c('span',[_c('button',{staticClass:\"btn btn-default btn-xs\",on:{\"click\":_vm.clearLocation}},[_vm._v(_vm._s(_vm.$t('firefly.clear_location')))])])],1),_vm._v(\" \"),_c('p',[_vm._v(\" \")])]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SplitForm.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SplitForm.vue?vue&type=script&lang=js&\"","\n\n\n \n
\n
\n
\n \n
\n \n
\n \n
\n
\n \n \n
\n \n
\n \n
\n\n \n
\n \n \n
\n
\n\n\n \n
\n
\n \n \n
\n
\n \n
\n
\n \n \n
\n
\n\n \n
\n\n \n
\n
\n
\n
\n\n \n
\n
\n
\n \n
\n \n \n
\n
\n \n \n
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n \n
\n \n
\n
\n\n \n\n \n \n
\n
\n\n \n \n\n \n
\n\n
\n \n
\n
\n
\n
\n \n \n
\n \n\n\n","import { render, staticRenderFns } from \"./SplitForm.vue?vue&type=template&id=26939696&\"\nimport script from \"./SplitForm.vue?vue&type=script&lang=js&\"\nexport * from \"./SplitForm.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.message.length > 0)?_c('div',{class:'alert alert-' + _vm.type + ' alert-dismissible'},[_c('button',{staticClass:\"close\",attrs:{\"aria-hidden\":\"true\",\"data-dismiss\":\"alert\",\"type\":\"button\"}},[_vm._v(\"×\")]),_vm._v(\" \"),_c('h5',[('danger' === _vm.type)?_c('i',{staticClass:\"icon fas fa-ban\"}):_vm._e(),_vm._v(\" \"),('success' === _vm.type)?_c('i',{staticClass:\"icon fas fa-thumbs-up\"}):_vm._e(),_vm._v(\" \"),('danger' === _vm.type)?_c('span',[_vm._v(_vm._s(_vm.$t(\"firefly.flash_error\")))]):_vm._e(),_vm._v(\" \"),('success' === _vm.type)?_c('span',[_vm._v(_vm._s(_vm.$t(\"firefly.flash_success\")))]):_vm._e()]),_vm._v(\" \"),_c('span',{domProps:{\"innerHTML\":_vm._s(_vm.message)}})]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Alert.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Alert.vue?vue&type=script&lang=js&\"","\n\n 0\" :class=\"'alert alert-' + type + ' alert-dismissible'\">\n × \n
\n \n \n {{ $t(\"firefly.flash_error\") }} \n {{ $t(\"firefly.flash_success\") }} \n \n \n
\n\n","import { render, staticRenderFns } from \"./Alert.vue?vue&type=template&id=df266c68&\"\nimport script from \"./Alert.vue?vue&type=script&lang=js&\"\nexport * from \"./Alert.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.split_transaction_title'))+\"\\n \")]),_vm._v(\" \"),_c('vue-typeahead-bootstrap',{attrs:{\"data\":_vm.descriptions,\"inputClass\":_vm.errors.length > 0 ? 'is-invalid' : '',\"minMatchingChars\":3,\"placeholder\":_vm.$t('firefly.split_transaction_title'),\"serializer\":function (item) { return item.description; },\"showOnFocus\":true,\"inputName\":\"group_title\"},on:{\"input\":_vm.lookupDescription},model:{value:(_vm.title),callback:function ($$v) {_vm.title=$$v},expression:\"title\"}},[_c('template',{slot:\"append\"},[_c('div',{staticClass:\"input-group-append\"},[_c('button',{staticClass:\"btn btn-outline-secondary\",attrs:{\"tabindex\":\"-1\",\"type\":\"button\"},on:{\"click\":_vm.clearDescription}},[_c('i',{staticClass:\"far fa-trash-alt\"})])])])],2),_vm._v(\" \"),(_vm.errors.length > 0)?_c('span',_vm._l((_vm.errors),function(error){return _c('span',{staticClass:\"text-danger small\"},[_vm._v(_vm._s(error)),_c('br')])}),0):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionGroupTitle.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionGroupTitle.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n\n\n","import { render, staticRenderFns } from \"./TransactionGroupTitle.vue?vue&type=template&id=273271bf&scoped=true&\"\nimport script from \"./TransactionGroupTitle.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionGroupTitle.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"273271bf\",\n null\n \n)\n\nexport default component.exports","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/**\n * Adds the key-value `pair` to `map`.\n *\n * @private\n * @param {Object} map The map to modify.\n * @param {Array} pair The key-value pair to add.\n * @returns {Object} Returns `map`.\n */\nfunction addMapEntry(map, pair) {\n // Don't return `map.set` because it's not chainable in IE 11.\n map.set(pair[0], pair[1]);\n return map;\n}\n\n/**\n * Adds `value` to `set`.\n *\n * @private\n * @param {Object} set The set to modify.\n * @param {*} value The value to add.\n * @returns {Object} Returns `set`.\n */\nfunction addSetEntry(set, value) {\n // Don't return `set.add` because it's not chainable in IE 11.\n set.add(value);\n return set;\n}\n\n/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array ? array.length : 0;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array ? array.length : 0;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n this.__data__ = new ListCache(entries);\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n return this.__data__['delete'](key);\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var cache = this.__data__;\n if (cache instanceof ListCache) {\n var pairs = cache.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n return this;\n }\n cache = this.__data__ = new MapCache(pairs);\n }\n cache.set(key, value);\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n object[key] = value;\n }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @param {boolean} [isFull] Specify a clone including symbols.\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, isDeep, isFull, customizer, key, object, stack) {\n var result;\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n if (isHostObject(value)) {\n return object ? value : {};\n }\n result = initCloneObject(isFunc ? {} : value);\n if (!isDeep) {\n return copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, baseClone, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (!isArr) {\n var props = isFull ? getAllKeys(value) : keys(value);\n }\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));\n });\n return result;\n}\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} prototype The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nfunction baseCreate(proto) {\n return isObject(proto) ? objectCreate(proto) : {};\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n return objectToString.call(value);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var result = new buffer.constructor(buffer.length);\n buffer.copy(result);\n return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\n/**\n * Creates a clone of `map`.\n *\n * @private\n * @param {Object} map The map to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned map.\n */\nfunction cloneMap(map, isDeep, cloneFunc) {\n var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);\n return arrayReduce(array, addMapEntry, new map.constructor);\n}\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\n/**\n * Creates a clone of `set`.\n *\n * @private\n * @param {Object} set The set to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned set.\n */\nfunction cloneSet(set, isDeep, cloneFunc) {\n var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);\n return arrayReduce(array, addSetEntry, new set.constructor);\n}\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n assignValue(object, key, newValue === undefined ? source[key] : newValue);\n }\n return object;\n}\n\n/**\n * Copies own symbol properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Creates an array of the own enumerable symbol properties of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11,\n// for data views in Edge < 14, and promises in Node.js.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = objectToString.call(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : undefined;\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, cloneFunc, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return cloneMap(object, isDeep, cloneFunc);\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return cloneSet(object, isDeep, cloneFunc);\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, true, true);\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = cloneDeep;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","/*!\n * Chart.js v2.9.4\n * https://www.chartjs.org\n * (c) 2020 Chart.js Contributors\n * Released under the MIT License\n */\n(function (global, factory) {\ntypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(function() { try { return require('moment'); } catch(e) { } }()) :\ntypeof define === 'function' && define.amd ? define(['require'], function(require) { return factory(function() { try { return require('moment'); } catch(e) { } }()); }) :\n(global = global || self, global.Chart = factory(global.moment));\n}(this, (function (moment) { 'use strict';\n\nmoment = moment && moment.hasOwnProperty('default') ? moment['default'] : moment;\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nfunction getCjsExportFromNamespace (n) {\n\treturn n && n['default'] || n;\n}\n\nvar colorName = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\n\nvar conversions = createCommonjsModule(function (module) {\n/* MIT license */\n\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nvar reverseKeywords = {};\nfor (var key in colorName) {\n\tif (colorName.hasOwnProperty(key)) {\n\t\treverseKeywords[colorName[key]] = key;\n\t}\n}\n\nvar convert = module.exports = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\n// hide .channels and .labels properties\nfor (var model in convert) {\n\tif (convert.hasOwnProperty(model)) {\n\t\tif (!('channels' in convert[model])) {\n\t\t\tthrow new Error('missing channels property: ' + model);\n\t\t}\n\n\t\tif (!('labels' in convert[model])) {\n\t\t\tthrow new Error('missing channel labels property: ' + model);\n\t\t}\n\n\t\tif (convert[model].labels.length !== convert[model].channels) {\n\t\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t\t}\n\n\t\tvar channels = convert[model].channels;\n\t\tvar labels = convert[model].labels;\n\t\tdelete convert[model].channels;\n\t\tdelete convert[model].labels;\n\t\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\t\tObject.defineProperty(convert[model], 'labels', {value: labels});\n\t}\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar min = Math.min(r, g, b);\n\tvar max = Math.max(r, g, b);\n\tvar delta = max - min;\n\tvar h;\n\tvar s;\n\tvar l;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tl = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tvar rdif;\n\tvar gdif;\n\tvar bdif;\n\tvar h;\n\tvar s;\n\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar v = Math.max(r, g, b);\n\tvar diff = v - Math.min(r, g, b);\n\tvar diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = s = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tvar r = rgb[0];\n\tvar g = rgb[1];\n\tvar b = rgb[2];\n\tvar h = convert.rgb.hsl(rgb)[0];\n\tvar w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar c;\n\tvar m;\n\tvar y;\n\tvar k;\n\n\tk = Math.min(1 - r, 1 - g, 1 - b);\n\tc = (1 - r - k) / (1 - k) || 0;\n\tm = (1 - g - k) / (1 - k) || 0;\n\ty = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\n/**\n * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n * */\nfunction comparativeDistance(x, y) {\n\treturn (\n\t\tMath.pow(x[0] - y[0], 2) +\n\t\tMath.pow(x[1] - y[1], 2) +\n\t\tMath.pow(x[2] - y[2], 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tvar reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tvar currentClosestDistance = Infinity;\n\tvar currentClosestKeyword;\n\n\tfor (var keyword in colorName) {\n\t\tif (colorName.hasOwnProperty(keyword)) {\n\t\t\tvar value = colorName[keyword];\n\n\t\t\t// Compute comparative distance\n\t\t\tvar distance = comparativeDistance(rgb, value);\n\n\t\t\t// Check if its less, if so set as closest\n\t\t\tif (distance < currentClosestDistance) {\n\t\t\t\tcurrentClosestDistance = distance;\n\t\t\t\tcurrentClosestKeyword = keyword;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn colorName[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\n\t// assume sRGB\n\tr = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);\n\n\tvar x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tvar y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tvar z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tvar xyz = convert.rgb.xyz(rgb);\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tvar h = hsl[0] / 360;\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar t1;\n\tvar t2;\n\tvar t3;\n\tvar rgb;\n\tvar val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tt1 = 2 * l - t2;\n\n\trgb = [0, 0, 0];\n\tfor (var i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tvar h = hsl[0];\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar smin = s;\n\tvar lmin = Math.max(l, 0.01);\n\tvar sv;\n\tvar v;\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tv = (l + s) / 2;\n\tsv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tvar h = hsv[0] / 60;\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar hi = Math.floor(h) % 6;\n\n\tvar f = h - Math.floor(h);\n\tvar p = 255 * v * (1 - s);\n\tvar q = 255 * v * (1 - (s * f));\n\tvar t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tvar h = hsv[0];\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar vmin = Math.max(v, 0.01);\n\tvar lmin;\n\tvar sl;\n\tvar l;\n\n\tl = (2 - s) * v;\n\tlmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tvar h = hwb[0] / 360;\n\tvar wh = hwb[1] / 100;\n\tvar bl = hwb[2] / 100;\n\tvar ratio = wh + bl;\n\tvar i;\n\tvar v;\n\tvar f;\n\tvar n;\n\n\t// wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\ti = Math.floor(6 * h);\n\tv = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tn = wh + f * (v - wh); // linear interpolation\n\n\tvar r;\n\tvar g;\n\tvar b;\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tvar c = cmyk[0] / 100;\n\tvar m = cmyk[1] / 100;\n\tvar y = cmyk[2] / 100;\n\tvar k = cmyk[3] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = 1 - Math.min(1, c * (1 - k) + k);\n\tg = 1 - Math.min(1, m * (1 - k) + k);\n\tb = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tvar x = xyz[0] / 100;\n\tvar y = xyz[1] / 100;\n\tvar z = xyz[2] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar x;\n\tvar y;\n\tvar z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tvar y2 = Math.pow(y, 3);\n\tvar x2 = Math.pow(x, 3);\n\tvar z2 = Math.pow(z, 3);\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar hr;\n\tvar h;\n\tvar c;\n\n\thr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tc = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tvar l = lch[0];\n\tvar c = lch[1];\n\tvar h = lch[2];\n\tvar a;\n\tvar b;\n\tvar hr;\n\n\thr = h / 360 * 2 * Math.PI;\n\ta = c * Math.cos(hr);\n\tb = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\tvar value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tvar ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\n\t// we use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tvar ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tvar color = args % 10;\n\n\t// handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tvar mult = (~~(args > 50) + 1) * 0.5;\n\tvar r = ((color & 1) * mult) * 255;\n\tvar g = (((color >> 1) & 1) * mult) * 255;\n\tvar b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// handle greyscale\n\tif (args >= 232) {\n\t\tvar c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tvar rem;\n\tvar r = Math.floor(args / 36) / 5 * 255;\n\tvar g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tvar b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tvar integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tvar match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tvar colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(function (char) {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tvar integer = parseInt(colorString, 16);\n\tvar r = (integer >> 16) & 0xFF;\n\tvar g = (integer >> 8) & 0xFF;\n\tvar b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar max = Math.max(Math.max(r, g), b);\n\tvar min = Math.min(Math.min(r, g), b);\n\tvar chroma = (max - min);\n\tvar grayscale;\n\tvar hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma + 4;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar c = 1;\n\tvar f = 0;\n\n\tif (l < 0.5) {\n\t\tc = 2.0 * s * l;\n\t} else {\n\t\tc = 2.0 * s * (1.0 - l);\n\t}\n\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\n\tvar c = s * v;\n\tvar f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tvar h = hcg[0] / 360;\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tvar pure = [0, 0, 0];\n\tvar hi = (h % 1) * 6;\n\tvar v = hi % 1;\n\tvar w = 1 - v;\n\tvar mg = 0;\n\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar v = c + g * (1.0 - c);\n\tvar f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar l = g * (1.0 - c) + 0.5 * c;\n\tvar s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\tvar v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tvar w = hwb[1] / 100;\n\tvar b = hwb[2] / 100;\n\tvar v = 1 - b;\n\tvar c = v - w;\n\tvar g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = convert.gray.hsv = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tvar val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tvar integer = (val << 16) + (val << 8) + val;\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tvar val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n});\nvar conversions_1 = conversions.rgb;\nvar conversions_2 = conversions.hsl;\nvar conversions_3 = conversions.hsv;\nvar conversions_4 = conversions.hwb;\nvar conversions_5 = conversions.cmyk;\nvar conversions_6 = conversions.xyz;\nvar conversions_7 = conversions.lab;\nvar conversions_8 = conversions.lch;\nvar conversions_9 = conversions.hex;\nvar conversions_10 = conversions.keyword;\nvar conversions_11 = conversions.ansi16;\nvar conversions_12 = conversions.ansi256;\nvar conversions_13 = conversions.hcg;\nvar conversions_14 = conversions.apple;\nvar conversions_15 = conversions.gray;\n\n/*\n\tthis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tvar graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tvar models = Object.keys(conversions);\n\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tvar graph = buildGraph();\n\tvar queue = [fromModel]; // unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tvar current = queue.pop();\n\t\tvar adjacents = Object.keys(conversions[current]);\n\n\t\tfor (var len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tvar adjacent = adjacents[i];\n\t\t\tvar node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tvar path = [graph[toModel].parent, toModel];\n\tvar fn = conversions[graph[toModel].parent][toModel];\n\n\tvar cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nvar route = function (fromModel) {\n\tvar graph = deriveBFS(fromModel);\n\tvar conversion = {};\n\n\tvar models = Object.keys(graph);\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tvar toModel = models[i];\n\t\tvar node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// no possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\nvar convert = {};\n\nvar models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\tvar result = fn(args);\n\n\t\t// we're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (var len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(function (fromModel) {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tvar routes = route(fromModel);\n\tvar routeModels = Object.keys(routes);\n\n\trouteModels.forEach(function (toModel) {\n\t\tvar fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nvar colorConvert = convert;\n\nvar colorName$1 = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\n\n/* MIT license */\n\n\nvar colorString = {\n getRgba: getRgba,\n getHsla: getHsla,\n getRgb: getRgb,\n getHsl: getHsl,\n getHwb: getHwb,\n getAlpha: getAlpha,\n\n hexString: hexString,\n rgbString: rgbString,\n rgbaString: rgbaString,\n percentString: percentString,\n percentaString: percentaString,\n hslString: hslString,\n hslaString: hslaString,\n hwbString: hwbString,\n keyword: keyword\n};\n\nfunction getRgba(string) {\n if (!string) {\n return;\n }\n var abbr = /^#([a-fA-F0-9]{3,4})$/i,\n hex = /^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i,\n rgba = /^rgba?\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/i,\n per = /^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/i,\n keyword = /(\\w+)/;\n\n var rgb = [0, 0, 0],\n a = 1,\n match = string.match(abbr),\n hexAlpha = \"\";\n if (match) {\n match = match[1];\n hexAlpha = match[3];\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = parseInt(match[i] + match[i], 16);\n }\n if (hexAlpha) {\n a = Math.round((parseInt(hexAlpha + hexAlpha, 16) / 255) * 100) / 100;\n }\n }\n else if (match = string.match(hex)) {\n hexAlpha = match[2];\n match = match[1];\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = parseInt(match.slice(i * 2, i * 2 + 2), 16);\n }\n if (hexAlpha) {\n a = Math.round((parseInt(hexAlpha, 16) / 255) * 100) / 100;\n }\n }\n else if (match = string.match(rgba)) {\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = parseInt(match[i + 1]);\n }\n a = parseFloat(match[4]);\n }\n else if (match = string.match(per)) {\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);\n }\n a = parseFloat(match[4]);\n }\n else if (match = string.match(keyword)) {\n if (match[1] == \"transparent\") {\n return [0, 0, 0, 0];\n }\n rgb = colorName$1[match[1]];\n if (!rgb) {\n return;\n }\n }\n\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = scale(rgb[i], 0, 255);\n }\n if (!a && a != 0) {\n a = 1;\n }\n else {\n a = scale(a, 0, 1);\n }\n rgb[3] = a;\n return rgb;\n}\n\nfunction getHsla(string) {\n if (!string) {\n return;\n }\n var hsl = /^hsla?\\(\\s*([+-]?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)/;\n var match = string.match(hsl);\n if (match) {\n var alpha = parseFloat(match[4]);\n var h = scale(parseInt(match[1]), 0, 360),\n s = scale(parseFloat(match[2]), 0, 100),\n l = scale(parseFloat(match[3]), 0, 100),\n a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);\n return [h, s, l, a];\n }\n}\n\nfunction getHwb(string) {\n if (!string) {\n return;\n }\n var hwb = /^hwb\\(\\s*([+-]?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)/;\n var match = string.match(hwb);\n if (match) {\n var alpha = parseFloat(match[4]);\n var h = scale(parseInt(match[1]), 0, 360),\n w = scale(parseFloat(match[2]), 0, 100),\n b = scale(parseFloat(match[3]), 0, 100),\n a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);\n return [h, w, b, a];\n }\n}\n\nfunction getRgb(string) {\n var rgba = getRgba(string);\n return rgba && rgba.slice(0, 3);\n}\n\nfunction getHsl(string) {\n var hsla = getHsla(string);\n return hsla && hsla.slice(0, 3);\n}\n\nfunction getAlpha(string) {\n var vals = getRgba(string);\n if (vals) {\n return vals[3];\n }\n else if (vals = getHsla(string)) {\n return vals[3];\n }\n else if (vals = getHwb(string)) {\n return vals[3];\n }\n}\n\n// generators\nfunction hexString(rgba, a) {\n var a = (a !== undefined && rgba.length === 3) ? a : rgba[3];\n return \"#\" + hexDouble(rgba[0]) \n + hexDouble(rgba[1])\n + hexDouble(rgba[2])\n + (\n (a >= 0 && a < 1)\n ? hexDouble(Math.round(a * 255))\n : \"\"\n );\n}\n\nfunction rgbString(rgba, alpha) {\n if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {\n return rgbaString(rgba, alpha);\n }\n return \"rgb(\" + rgba[0] + \", \" + rgba[1] + \", \" + rgba[2] + \")\";\n}\n\nfunction rgbaString(rgba, alpha) {\n if (alpha === undefined) {\n alpha = (rgba[3] !== undefined ? rgba[3] : 1);\n }\n return \"rgba(\" + rgba[0] + \", \" + rgba[1] + \", \" + rgba[2]\n + \", \" + alpha + \")\";\n}\n\nfunction percentString(rgba, alpha) {\n if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {\n return percentaString(rgba, alpha);\n }\n var r = Math.round(rgba[0]/255 * 100),\n g = Math.round(rgba[1]/255 * 100),\n b = Math.round(rgba[2]/255 * 100);\n\n return \"rgb(\" + r + \"%, \" + g + \"%, \" + b + \"%)\";\n}\n\nfunction percentaString(rgba, alpha) {\n var r = Math.round(rgba[0]/255 * 100),\n g = Math.round(rgba[1]/255 * 100),\n b = Math.round(rgba[2]/255 * 100);\n return \"rgba(\" + r + \"%, \" + g + \"%, \" + b + \"%, \" + (alpha || rgba[3] || 1) + \")\";\n}\n\nfunction hslString(hsla, alpha) {\n if (alpha < 1 || (hsla[3] && hsla[3] < 1)) {\n return hslaString(hsla, alpha);\n }\n return \"hsl(\" + hsla[0] + \", \" + hsla[1] + \"%, \" + hsla[2] + \"%)\";\n}\n\nfunction hslaString(hsla, alpha) {\n if (alpha === undefined) {\n alpha = (hsla[3] !== undefined ? hsla[3] : 1);\n }\n return \"hsla(\" + hsla[0] + \", \" + hsla[1] + \"%, \" + hsla[2] + \"%, \"\n + alpha + \")\";\n}\n\n// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\n// (hwb have alpha optional & 1 is default value)\nfunction hwbString(hwb, alpha) {\n if (alpha === undefined) {\n alpha = (hwb[3] !== undefined ? hwb[3] : 1);\n }\n return \"hwb(\" + hwb[0] + \", \" + hwb[1] + \"%, \" + hwb[2] + \"%\"\n + (alpha !== undefined && alpha !== 1 ? \", \" + alpha : \"\") + \")\";\n}\n\nfunction keyword(rgb) {\n return reverseNames[rgb.slice(0, 3)];\n}\n\n// helpers\nfunction scale(num, min, max) {\n return Math.min(Math.max(min, num), max);\n}\n\nfunction hexDouble(num) {\n var str = num.toString(16).toUpperCase();\n return (str.length < 2) ? \"0\" + str : str;\n}\n\n\n//create a list of reverse color names\nvar reverseNames = {};\nfor (var name in colorName$1) {\n reverseNames[colorName$1[name]] = name;\n}\n\n/* MIT license */\n\n\n\nvar Color = function (obj) {\n\tif (obj instanceof Color) {\n\t\treturn obj;\n\t}\n\tif (!(this instanceof Color)) {\n\t\treturn new Color(obj);\n\t}\n\n\tthis.valid = false;\n\tthis.values = {\n\t\trgb: [0, 0, 0],\n\t\thsl: [0, 0, 0],\n\t\thsv: [0, 0, 0],\n\t\thwb: [0, 0, 0],\n\t\tcmyk: [0, 0, 0, 0],\n\t\talpha: 1\n\t};\n\n\t// parse Color() argument\n\tvar vals;\n\tif (typeof obj === 'string') {\n\t\tvals = colorString.getRgba(obj);\n\t\tif (vals) {\n\t\t\tthis.setValues('rgb', vals);\n\t\t} else if (vals = colorString.getHsla(obj)) {\n\t\t\tthis.setValues('hsl', vals);\n\t\t} else if (vals = colorString.getHwb(obj)) {\n\t\t\tthis.setValues('hwb', vals);\n\t\t}\n\t} else if (typeof obj === 'object') {\n\t\tvals = obj;\n\t\tif (vals.r !== undefined || vals.red !== undefined) {\n\t\t\tthis.setValues('rgb', vals);\n\t\t} else if (vals.l !== undefined || vals.lightness !== undefined) {\n\t\t\tthis.setValues('hsl', vals);\n\t\t} else if (vals.v !== undefined || vals.value !== undefined) {\n\t\t\tthis.setValues('hsv', vals);\n\t\t} else if (vals.w !== undefined || vals.whiteness !== undefined) {\n\t\t\tthis.setValues('hwb', vals);\n\t\t} else if (vals.c !== undefined || vals.cyan !== undefined) {\n\t\t\tthis.setValues('cmyk', vals);\n\t\t}\n\t}\n};\n\nColor.prototype = {\n\tisValid: function () {\n\t\treturn this.valid;\n\t},\n\trgb: function () {\n\t\treturn this.setSpace('rgb', arguments);\n\t},\n\thsl: function () {\n\t\treturn this.setSpace('hsl', arguments);\n\t},\n\thsv: function () {\n\t\treturn this.setSpace('hsv', arguments);\n\t},\n\thwb: function () {\n\t\treturn this.setSpace('hwb', arguments);\n\t},\n\tcmyk: function () {\n\t\treturn this.setSpace('cmyk', arguments);\n\t},\n\n\trgbArray: function () {\n\t\treturn this.values.rgb;\n\t},\n\thslArray: function () {\n\t\treturn this.values.hsl;\n\t},\n\thsvArray: function () {\n\t\treturn this.values.hsv;\n\t},\n\thwbArray: function () {\n\t\tvar values = this.values;\n\t\tif (values.alpha !== 1) {\n\t\t\treturn values.hwb.concat([values.alpha]);\n\t\t}\n\t\treturn values.hwb;\n\t},\n\tcmykArray: function () {\n\t\treturn this.values.cmyk;\n\t},\n\trgbaArray: function () {\n\t\tvar values = this.values;\n\t\treturn values.rgb.concat([values.alpha]);\n\t},\n\thslaArray: function () {\n\t\tvar values = this.values;\n\t\treturn values.hsl.concat([values.alpha]);\n\t},\n\talpha: function (val) {\n\t\tif (val === undefined) {\n\t\t\treturn this.values.alpha;\n\t\t}\n\t\tthis.setValues('alpha', val);\n\t\treturn this;\n\t},\n\n\tred: function (val) {\n\t\treturn this.setChannel('rgb', 0, val);\n\t},\n\tgreen: function (val) {\n\t\treturn this.setChannel('rgb', 1, val);\n\t},\n\tblue: function (val) {\n\t\treturn this.setChannel('rgb', 2, val);\n\t},\n\thue: function (val) {\n\t\tif (val) {\n\t\t\tval %= 360;\n\t\t\tval = val < 0 ? 360 + val : val;\n\t\t}\n\t\treturn this.setChannel('hsl', 0, val);\n\t},\n\tsaturation: function (val) {\n\t\treturn this.setChannel('hsl', 1, val);\n\t},\n\tlightness: function (val) {\n\t\treturn this.setChannel('hsl', 2, val);\n\t},\n\tsaturationv: function (val) {\n\t\treturn this.setChannel('hsv', 1, val);\n\t},\n\twhiteness: function (val) {\n\t\treturn this.setChannel('hwb', 1, val);\n\t},\n\tblackness: function (val) {\n\t\treturn this.setChannel('hwb', 2, val);\n\t},\n\tvalue: function (val) {\n\t\treturn this.setChannel('hsv', 2, val);\n\t},\n\tcyan: function (val) {\n\t\treturn this.setChannel('cmyk', 0, val);\n\t},\n\tmagenta: function (val) {\n\t\treturn this.setChannel('cmyk', 1, val);\n\t},\n\tyellow: function (val) {\n\t\treturn this.setChannel('cmyk', 2, val);\n\t},\n\tblack: function (val) {\n\t\treturn this.setChannel('cmyk', 3, val);\n\t},\n\n\thexString: function () {\n\t\treturn colorString.hexString(this.values.rgb);\n\t},\n\trgbString: function () {\n\t\treturn colorString.rgbString(this.values.rgb, this.values.alpha);\n\t},\n\trgbaString: function () {\n\t\treturn colorString.rgbaString(this.values.rgb, this.values.alpha);\n\t},\n\tpercentString: function () {\n\t\treturn colorString.percentString(this.values.rgb, this.values.alpha);\n\t},\n\thslString: function () {\n\t\treturn colorString.hslString(this.values.hsl, this.values.alpha);\n\t},\n\thslaString: function () {\n\t\treturn colorString.hslaString(this.values.hsl, this.values.alpha);\n\t},\n\thwbString: function () {\n\t\treturn colorString.hwbString(this.values.hwb, this.values.alpha);\n\t},\n\tkeyword: function () {\n\t\treturn colorString.keyword(this.values.rgb, this.values.alpha);\n\t},\n\n\trgbNumber: function () {\n\t\tvar rgb = this.values.rgb;\n\t\treturn (rgb[0] << 16) | (rgb[1] << 8) | rgb[2];\n\t},\n\n\tluminosity: function () {\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\tvar rgb = this.values.rgb;\n\t\tvar lum = [];\n\t\tfor (var i = 0; i < rgb.length; i++) {\n\t\t\tvar chan = rgb[i] / 255;\n\t\t\tlum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);\n\t\t}\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t},\n\n\tcontrast: function (color2) {\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\t\tvar lum1 = this.luminosity();\n\t\tvar lum2 = color2.luminosity();\n\t\tif (lum1 > lum2) {\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\n\t\t}\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\n\t},\n\n\tlevel: function (color2) {\n\t\tvar contrastRatio = this.contrast(color2);\n\t\tif (contrastRatio >= 7.1) {\n\t\t\treturn 'AAA';\n\t\t}\n\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\n\t},\n\n\tdark: function () {\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\n\t\tvar rgb = this.values.rgb;\n\t\tvar yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;\n\t\treturn yiq < 128;\n\t},\n\n\tlight: function () {\n\t\treturn !this.dark();\n\t},\n\n\tnegate: function () {\n\t\tvar rgb = [];\n\t\tfor (var i = 0; i < 3; i++) {\n\t\t\trgb[i] = 255 - this.values.rgb[i];\n\t\t}\n\t\tthis.setValues('rgb', rgb);\n\t\treturn this;\n\t},\n\n\tlighten: function (ratio) {\n\t\tvar hsl = this.values.hsl;\n\t\thsl[2] += hsl[2] * ratio;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\tdarken: function (ratio) {\n\t\tvar hsl = this.values.hsl;\n\t\thsl[2] -= hsl[2] * ratio;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\tsaturate: function (ratio) {\n\t\tvar hsl = this.values.hsl;\n\t\thsl[1] += hsl[1] * ratio;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\tdesaturate: function (ratio) {\n\t\tvar hsl = this.values.hsl;\n\t\thsl[1] -= hsl[1] * ratio;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\twhiten: function (ratio) {\n\t\tvar hwb = this.values.hwb;\n\t\thwb[1] += hwb[1] * ratio;\n\t\tthis.setValues('hwb', hwb);\n\t\treturn this;\n\t},\n\n\tblacken: function (ratio) {\n\t\tvar hwb = this.values.hwb;\n\t\thwb[2] += hwb[2] * ratio;\n\t\tthis.setValues('hwb', hwb);\n\t\treturn this;\n\t},\n\n\tgreyscale: function () {\n\t\tvar rgb = this.values.rgb;\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\n\t\tvar val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n\t\tthis.setValues('rgb', [val, val, val]);\n\t\treturn this;\n\t},\n\n\tclearer: function (ratio) {\n\t\tvar alpha = this.values.alpha;\n\t\tthis.setValues('alpha', alpha - (alpha * ratio));\n\t\treturn this;\n\t},\n\n\topaquer: function (ratio) {\n\t\tvar alpha = this.values.alpha;\n\t\tthis.setValues('alpha', alpha + (alpha * ratio));\n\t\treturn this;\n\t},\n\n\trotate: function (degrees) {\n\t\tvar hsl = this.values.hsl;\n\t\tvar hue = (hsl[0] + degrees) % 360;\n\t\thsl[0] = hue < 0 ? 360 + hue : hue;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\t/**\n\t * Ported from sass implementation in C\n\t * https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n\t */\n\tmix: function (mixinColor, weight) {\n\t\tvar color1 = this;\n\t\tvar color2 = mixinColor;\n\t\tvar p = weight === undefined ? 0.5 : weight;\n\n\t\tvar w = 2 * p - 1;\n\t\tvar a = color1.alpha() - color2.alpha();\n\n\t\tvar w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\n\t\tvar w2 = 1 - w1;\n\n\t\treturn this\n\t\t\t.rgb(\n\t\t\t\tw1 * color1.red() + w2 * color2.red(),\n\t\t\t\tw1 * color1.green() + w2 * color2.green(),\n\t\t\t\tw1 * color1.blue() + w2 * color2.blue()\n\t\t\t)\n\t\t\t.alpha(color1.alpha() * p + color2.alpha() * (1 - p));\n\t},\n\n\ttoJSON: function () {\n\t\treturn this.rgb();\n\t},\n\n\tclone: function () {\n\t\t// NOTE(SB): using node-clone creates a dependency to Buffer when using browserify,\n\t\t// making the final build way to big to embed in Chart.js. So let's do it manually,\n\t\t// assuming that values to clone are 1 dimension arrays containing only numbers,\n\t\t// except 'alpha' which is a number.\n\t\tvar result = new Color();\n\t\tvar source = this.values;\n\t\tvar target = result.values;\n\t\tvar value, type;\n\n\t\tfor (var prop in source) {\n\t\t\tif (source.hasOwnProperty(prop)) {\n\t\t\t\tvalue = source[prop];\n\t\t\t\ttype = ({}).toString.call(value);\n\t\t\t\tif (type === '[object Array]') {\n\t\t\t\t\ttarget[prop] = value.slice(0);\n\t\t\t\t} else if (type === '[object Number]') {\n\t\t\t\t\ttarget[prop] = value;\n\t\t\t\t} else {\n\t\t\t\t\tconsole.error('unexpected color value:', value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n};\n\nColor.prototype.spaces = {\n\trgb: ['red', 'green', 'blue'],\n\thsl: ['hue', 'saturation', 'lightness'],\n\thsv: ['hue', 'saturation', 'value'],\n\thwb: ['hue', 'whiteness', 'blackness'],\n\tcmyk: ['cyan', 'magenta', 'yellow', 'black']\n};\n\nColor.prototype.maxes = {\n\trgb: [255, 255, 255],\n\thsl: [360, 100, 100],\n\thsv: [360, 100, 100],\n\thwb: [360, 100, 100],\n\tcmyk: [100, 100, 100, 100]\n};\n\nColor.prototype.getValues = function (space) {\n\tvar values = this.values;\n\tvar vals = {};\n\n\tfor (var i = 0; i < space.length; i++) {\n\t\tvals[space.charAt(i)] = values[space][i];\n\t}\n\n\tif (values.alpha !== 1) {\n\t\tvals.a = values.alpha;\n\t}\n\n\t// {r: 255, g: 255, b: 255, a: 0.4}\n\treturn vals;\n};\n\nColor.prototype.setValues = function (space, vals) {\n\tvar values = this.values;\n\tvar spaces = this.spaces;\n\tvar maxes = this.maxes;\n\tvar alpha = 1;\n\tvar i;\n\n\tthis.valid = true;\n\n\tif (space === 'alpha') {\n\t\talpha = vals;\n\t} else if (vals.length) {\n\t\t// [10, 10, 10]\n\t\tvalues[space] = vals.slice(0, space.length);\n\t\talpha = vals[space.length];\n\t} else if (vals[space.charAt(0)] !== undefined) {\n\t\t// {r: 10, g: 10, b: 10}\n\t\tfor (i = 0; i < space.length; i++) {\n\t\t\tvalues[space][i] = vals[space.charAt(i)];\n\t\t}\n\n\t\talpha = vals.a;\n\t} else if (vals[spaces[space][0]] !== undefined) {\n\t\t// {red: 10, green: 10, blue: 10}\n\t\tvar chans = spaces[space];\n\n\t\tfor (i = 0; i < space.length; i++) {\n\t\t\tvalues[space][i] = vals[chans[i]];\n\t\t}\n\n\t\talpha = vals.alpha;\n\t}\n\n\tvalues.alpha = Math.max(0, Math.min(1, (alpha === undefined ? values.alpha : alpha)));\n\n\tif (space === 'alpha') {\n\t\treturn false;\n\t}\n\n\tvar capped;\n\n\t// cap values of the space prior converting all values\n\tfor (i = 0; i < space.length; i++) {\n\t\tcapped = Math.max(0, Math.min(maxes[space][i], values[space][i]));\n\t\tvalues[space][i] = Math.round(capped);\n\t}\n\n\t// convert to all the other color spaces\n\tfor (var sname in spaces) {\n\t\tif (sname !== space) {\n\t\t\tvalues[sname] = colorConvert[space][sname](values[space]);\n\t\t}\n\t}\n\n\treturn true;\n};\n\nColor.prototype.setSpace = function (space, args) {\n\tvar vals = args[0];\n\n\tif (vals === undefined) {\n\t\t// color.rgb()\n\t\treturn this.getValues(space);\n\t}\n\n\t// color.rgb(10, 10, 10)\n\tif (typeof vals === 'number') {\n\t\tvals = Array.prototype.slice.call(args);\n\t}\n\n\tthis.setValues(space, vals);\n\treturn this;\n};\n\nColor.prototype.setChannel = function (space, index, val) {\n\tvar svalues = this.values[space];\n\tif (val === undefined) {\n\t\t// color.red()\n\t\treturn svalues[index];\n\t} else if (val === svalues[index]) {\n\t\t// color.red(color.red())\n\t\treturn this;\n\t}\n\n\t// color.red(100)\n\tsvalues[index] = val;\n\tthis.setValues(space, svalues);\n\n\treturn this;\n};\n\nif (typeof window !== 'undefined') {\n\twindow.Color = Color;\n}\n\nvar chartjsColor = Color;\n\nfunction isValidKey(key) {\r\n\treturn ['__proto__', 'prototype', 'constructor'].indexOf(key) === -1;\r\n}\r\n\r\n/**\r\n * @namespace Chart.helpers\r\n */\r\nvar helpers = {\r\n\t/**\r\n\t * An empty function that can be used, for example, for optional callback.\r\n\t */\r\n\tnoop: function() {},\r\n\r\n\t/**\r\n\t * Returns a unique id, sequentially generated from a global variable.\r\n\t * @returns {number}\r\n\t * @function\r\n\t */\r\n\tuid: (function() {\r\n\t\tvar id = 0;\r\n\t\treturn function() {\r\n\t\t\treturn id++;\r\n\t\t};\r\n\t}()),\r\n\r\n\t/**\r\n\t * Returns true if `value` is neither null nor undefined, else returns false.\r\n\t * @param {*} value - The value to test.\r\n\t * @returns {boolean}\r\n\t * @since 2.7.0\r\n\t */\r\n\tisNullOrUndef: function(value) {\r\n\t\treturn value === null || typeof value === 'undefined';\r\n\t},\r\n\r\n\t/**\r\n\t * Returns true if `value` is an array (including typed arrays), else returns false.\r\n\t * @param {*} value - The value to test.\r\n\t * @returns {boolean}\r\n\t * @function\r\n\t */\r\n\tisArray: function(value) {\r\n\t\tif (Array.isArray && Array.isArray(value)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar type = Object.prototype.toString.call(value);\r\n\t\tif (type.substr(0, 7) === '[object' && type.substr(-6) === 'Array]') {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns true if `value` is an object (excluding null), else returns false.\r\n\t * @param {*} value - The value to test.\r\n\t * @returns {boolean}\r\n\t * @since 2.7.0\r\n\t */\r\n\tisObject: function(value) {\r\n\t\treturn value !== null && Object.prototype.toString.call(value) === '[object Object]';\r\n\t},\r\n\r\n\t/**\r\n\t * Returns true if `value` is a finite number, else returns false\r\n\t * @param {*} value - The value to test.\r\n\t * @returns {boolean}\r\n\t */\r\n\tisFinite: function(value) {\r\n\t\treturn (typeof value === 'number' || value instanceof Number) && isFinite(value);\r\n\t},\r\n\r\n\t/**\r\n\t * Returns `value` if defined, else returns `defaultValue`.\r\n\t * @param {*} value - The value to return if defined.\r\n\t * @param {*} defaultValue - The value to return if `value` is undefined.\r\n\t * @returns {*}\r\n\t */\r\n\tvalueOrDefault: function(value, defaultValue) {\r\n\t\treturn typeof value === 'undefined' ? defaultValue : value;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns value at the given `index` in array if defined, else returns `defaultValue`.\r\n\t * @param {Array} value - The array to lookup for value at `index`.\r\n\t * @param {number} index - The index in `value` to lookup for value.\r\n\t * @param {*} defaultValue - The value to return if `value[index]` is undefined.\r\n\t * @returns {*}\r\n\t */\r\n\tvalueAtIndexOrDefault: function(value, index, defaultValue) {\r\n\t\treturn helpers.valueOrDefault(helpers.isArray(value) ? value[index] : value, defaultValue);\r\n\t},\r\n\r\n\t/**\r\n\t * Calls `fn` with the given `args` in the scope defined by `thisArg` and returns the\r\n\t * value returned by `fn`. If `fn` is not a function, this method returns undefined.\r\n\t * @param {function} fn - The function to call.\r\n\t * @param {Array|undefined|null} args - The arguments with which `fn` should be called.\r\n\t * @param {object} [thisArg] - The value of `this` provided for the call to `fn`.\r\n\t * @returns {*}\r\n\t */\r\n\tcallback: function(fn, args, thisArg) {\r\n\t\tif (fn && typeof fn.call === 'function') {\r\n\t\t\treturn fn.apply(thisArg, args);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Note(SB) for performance sake, this method should only be used when loopable type\r\n\t * is unknown or in none intensive code (not called often and small loopable). Else\r\n\t * it's preferable to use a regular for() loop and save extra function calls.\r\n\t * @param {object|Array} loopable - The object or array to be iterated.\r\n\t * @param {function} fn - The function to call for each item.\r\n\t * @param {object} [thisArg] - The value of `this` provided for the call to `fn`.\r\n\t * @param {boolean} [reverse] - If true, iterates backward on the loopable.\r\n\t */\r\n\teach: function(loopable, fn, thisArg, reverse) {\r\n\t\tvar i, len, keys;\r\n\t\tif (helpers.isArray(loopable)) {\r\n\t\t\tlen = loopable.length;\r\n\t\t\tif (reverse) {\r\n\t\t\t\tfor (i = len - 1; i >= 0; i--) {\r\n\t\t\t\t\tfn.call(thisArg, loopable[i], i);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (i = 0; i < len; i++) {\r\n\t\t\t\t\tfn.call(thisArg, loopable[i], i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (helpers.isObject(loopable)) {\r\n\t\t\tkeys = Object.keys(loopable);\r\n\t\t\tlen = keys.length;\r\n\t\t\tfor (i = 0; i < len; i++) {\r\n\t\t\t\tfn.call(thisArg, loopable[keys[i]], keys[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Returns true if the `a0` and `a1` arrays have the same content, else returns false.\r\n\t * @see https://stackoverflow.com/a/14853974\r\n\t * @param {Array} a0 - The array to compare\r\n\t * @param {Array} a1 - The array to compare\r\n\t * @returns {boolean}\r\n\t */\r\n\tarrayEquals: function(a0, a1) {\r\n\t\tvar i, ilen, v0, v1;\r\n\r\n\t\tif (!a0 || !a1 || a0.length !== a1.length) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = a0.length; i < ilen; ++i) {\r\n\t\t\tv0 = a0[i];\r\n\t\t\tv1 = a1[i];\r\n\r\n\t\t\tif (v0 instanceof Array && v1 instanceof Array) {\r\n\t\t\t\tif (!helpers.arrayEquals(v0, v1)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t} else if (v0 !== v1) {\r\n\t\t\t\t// NOTE: two different object instances will never be equal: {x:20} != {x:20}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns a deep copy of `source` without keeping references on objects and arrays.\r\n\t * @param {*} source - The value to clone.\r\n\t * @returns {*}\r\n\t */\r\n\tclone: function(source) {\r\n\t\tif (helpers.isArray(source)) {\r\n\t\t\treturn source.map(helpers.clone);\r\n\t\t}\r\n\r\n\t\tif (helpers.isObject(source)) {\r\n\t\t\tvar target = Object.create(source);\r\n\t\t\tvar keys = Object.keys(source);\r\n\t\t\tvar klen = keys.length;\r\n\t\t\tvar k = 0;\r\n\r\n\t\t\tfor (; k < klen; ++k) {\r\n\t\t\t\ttarget[keys[k]] = helpers.clone(source[keys[k]]);\r\n\t\t\t}\r\n\r\n\t\t\treturn target;\r\n\t\t}\r\n\r\n\t\treturn source;\r\n\t},\r\n\r\n\t/**\r\n\t * The default merger when Chart.helpers.merge is called without merger option.\r\n\t * Note(SB): also used by mergeConfig and mergeScaleConfig as fallback.\r\n\t * @private\r\n\t */\r\n\t_merger: function(key, target, source, options) {\r\n\t\tif (!isValidKey(key)) {\r\n\t\t\t// We want to ensure we do not copy prototypes over\r\n\t\t\t// as this can pollute global namespaces\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar tval = target[key];\r\n\t\tvar sval = source[key];\r\n\r\n\t\tif (helpers.isObject(tval) && helpers.isObject(sval)) {\r\n\t\t\thelpers.merge(tval, sval, options);\r\n\t\t} else {\r\n\t\t\ttarget[key] = helpers.clone(sval);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Merges source[key] in target[key] only if target[key] is undefined.\r\n\t * @private\r\n\t */\r\n\t_mergerIf: function(key, target, source) {\r\n\t\tif (!isValidKey(key)) {\r\n\t\t\t// We want to ensure we do not copy prototypes over\r\n\t\t\t// as this can pollute global namespaces\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar tval = target[key];\r\n\t\tvar sval = source[key];\r\n\r\n\t\tif (helpers.isObject(tval) && helpers.isObject(sval)) {\r\n\t\t\thelpers.mergeIf(tval, sval);\r\n\t\t} else if (!target.hasOwnProperty(key)) {\r\n\t\t\ttarget[key] = helpers.clone(sval);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Recursively deep copies `source` properties into `target` with the given `options`.\r\n\t * IMPORTANT: `target` is not cloned and will be updated with `source` properties.\r\n\t * @param {object} target - The target object in which all sources are merged into.\r\n\t * @param {object|object[]} source - Object(s) to merge into `target`.\r\n\t * @param {object} [options] - Merging options:\r\n\t * @param {function} [options.merger] - The merge method (key, target, source, options)\r\n\t * @returns {object} The `target` object.\r\n\t */\r\n\tmerge: function(target, source, options) {\r\n\t\tvar sources = helpers.isArray(source) ? source : [source];\r\n\t\tvar ilen = sources.length;\r\n\t\tvar merge, i, keys, klen, k;\r\n\r\n\t\tif (!helpers.isObject(target)) {\r\n\t\t\treturn target;\r\n\t\t}\r\n\r\n\t\toptions = options || {};\r\n\t\tmerge = options.merger || helpers._merger;\r\n\r\n\t\tfor (i = 0; i < ilen; ++i) {\r\n\t\t\tsource = sources[i];\r\n\t\t\tif (!helpers.isObject(source)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tkeys = Object.keys(source);\r\n\t\t\tfor (k = 0, klen = keys.length; k < klen; ++k) {\r\n\t\t\t\tmerge(keys[k], target, source, options);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn target;\r\n\t},\r\n\r\n\t/**\r\n\t * Recursively deep copies `source` properties into `target` *only* if not defined in target.\r\n\t * IMPORTANT: `target` is not cloned and will be updated with `source` properties.\r\n\t * @param {object} target - The target object in which all sources are merged into.\r\n\t * @param {object|object[]} source - Object(s) to merge into `target`.\r\n\t * @returns {object} The `target` object.\r\n\t */\r\n\tmergeIf: function(target, source) {\r\n\t\treturn helpers.merge(target, source, {merger: helpers._mergerIf});\r\n\t},\r\n\r\n\t/**\r\n\t * Applies the contents of two or more objects together into the first object.\r\n\t * @param {object} target - The target object in which all objects are merged into.\r\n\t * @param {object} arg1 - Object containing additional properties to merge in target.\r\n\t * @param {object} argN - Additional objects containing properties to merge in target.\r\n\t * @returns {object} The `target` object.\r\n\t */\r\n\textend: Object.assign || function(target) {\r\n\t\treturn helpers.merge(target, [].slice.call(arguments, 1), {\r\n\t\t\tmerger: function(key, dst, src) {\r\n\t\t\t\tdst[key] = src[key];\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\t/**\r\n\t * Basic javascript inheritance based on the model created in Backbone.js\r\n\t */\r\n\tinherits: function(extensions) {\r\n\t\tvar me = this;\r\n\t\tvar ChartElement = (extensions && extensions.hasOwnProperty('constructor')) ? extensions.constructor : function() {\r\n\t\t\treturn me.apply(this, arguments);\r\n\t\t};\r\n\r\n\t\tvar Surrogate = function() {\r\n\t\t\tthis.constructor = ChartElement;\r\n\t\t};\r\n\r\n\t\tSurrogate.prototype = me.prototype;\r\n\t\tChartElement.prototype = new Surrogate();\r\n\t\tChartElement.extend = helpers.inherits;\r\n\r\n\t\tif (extensions) {\r\n\t\t\thelpers.extend(ChartElement.prototype, extensions);\r\n\t\t}\r\n\r\n\t\tChartElement.__super__ = me.prototype;\r\n\t\treturn ChartElement;\r\n\t},\r\n\r\n\t_deprecated: function(scope, value, previous, current) {\r\n\t\tif (value !== undefined) {\r\n\t\t\tconsole.warn(scope + ': \"' + previous +\r\n\t\t\t\t'\" is deprecated. Please use \"' + current + '\" instead');\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar helpers_core = helpers;\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.callback instead.\r\n * @function Chart.helpers.callCallback\r\n * @deprecated since version 2.6.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers.callCallback = helpers.callback;\r\n\r\n/**\r\n * Provided for backward compatibility, use Array.prototype.indexOf instead.\r\n * Array.prototype.indexOf compatibility: Chrome, Opera, Safari, FF1.5+, IE9+\r\n * @function Chart.helpers.indexOf\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers.indexOf = function(array, item, fromIndex) {\r\n\treturn Array.prototype.indexOf.call(array, item, fromIndex);\r\n};\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.valueOrDefault instead.\r\n * @function Chart.helpers.getValueOrDefault\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers.getValueOrDefault = helpers.valueOrDefault;\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.valueAtIndexOrDefault instead.\r\n * @function Chart.helpers.getValueAtIndexOrDefault\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers.getValueAtIndexOrDefault = helpers.valueAtIndexOrDefault;\n\n/**\r\n * Easing functions adapted from Robert Penner's easing equations.\r\n * @namespace Chart.helpers.easingEffects\r\n * @see http://www.robertpenner.com/easing/\r\n */\r\nvar effects = {\r\n\tlinear: function(t) {\r\n\t\treturn t;\r\n\t},\r\n\r\n\teaseInQuad: function(t) {\r\n\t\treturn t * t;\r\n\t},\r\n\r\n\teaseOutQuad: function(t) {\r\n\t\treturn -t * (t - 2);\r\n\t},\r\n\r\n\teaseInOutQuad: function(t) {\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * t * t;\r\n\t\t}\r\n\t\treturn -0.5 * ((--t) * (t - 2) - 1);\r\n\t},\r\n\r\n\teaseInCubic: function(t) {\r\n\t\treturn t * t * t;\r\n\t},\r\n\r\n\teaseOutCubic: function(t) {\r\n\t\treturn (t = t - 1) * t * t + 1;\r\n\t},\r\n\r\n\teaseInOutCubic: function(t) {\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * t * t * t;\r\n\t\t}\r\n\t\treturn 0.5 * ((t -= 2) * t * t + 2);\r\n\t},\r\n\r\n\teaseInQuart: function(t) {\r\n\t\treturn t * t * t * t;\r\n\t},\r\n\r\n\teaseOutQuart: function(t) {\r\n\t\treturn -((t = t - 1) * t * t * t - 1);\r\n\t},\r\n\r\n\teaseInOutQuart: function(t) {\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * t * t * t * t;\r\n\t\t}\r\n\t\treturn -0.5 * ((t -= 2) * t * t * t - 2);\r\n\t},\r\n\r\n\teaseInQuint: function(t) {\r\n\t\treturn t * t * t * t * t;\r\n\t},\r\n\r\n\teaseOutQuint: function(t) {\r\n\t\treturn (t = t - 1) * t * t * t * t + 1;\r\n\t},\r\n\r\n\teaseInOutQuint: function(t) {\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * t * t * t * t * t;\r\n\t\t}\r\n\t\treturn 0.5 * ((t -= 2) * t * t * t * t + 2);\r\n\t},\r\n\r\n\teaseInSine: function(t) {\r\n\t\treturn -Math.cos(t * (Math.PI / 2)) + 1;\r\n\t},\r\n\r\n\teaseOutSine: function(t) {\r\n\t\treturn Math.sin(t * (Math.PI / 2));\r\n\t},\r\n\r\n\teaseInOutSine: function(t) {\r\n\t\treturn -0.5 * (Math.cos(Math.PI * t) - 1);\r\n\t},\r\n\r\n\teaseInExpo: function(t) {\r\n\t\treturn (t === 0) ? 0 : Math.pow(2, 10 * (t - 1));\r\n\t},\r\n\r\n\teaseOutExpo: function(t) {\r\n\t\treturn (t === 1) ? 1 : -Math.pow(2, -10 * t) + 1;\r\n\t},\r\n\r\n\teaseInOutExpo: function(t) {\r\n\t\tif (t === 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tif (t === 1) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * Math.pow(2, 10 * (t - 1));\r\n\t\t}\r\n\t\treturn 0.5 * (-Math.pow(2, -10 * --t) + 2);\r\n\t},\r\n\r\n\teaseInCirc: function(t) {\r\n\t\tif (t >= 1) {\r\n\t\t\treturn t;\r\n\t\t}\r\n\t\treturn -(Math.sqrt(1 - t * t) - 1);\r\n\t},\r\n\r\n\teaseOutCirc: function(t) {\r\n\t\treturn Math.sqrt(1 - (t = t - 1) * t);\r\n\t},\r\n\r\n\teaseInOutCirc: function(t) {\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn -0.5 * (Math.sqrt(1 - t * t) - 1);\r\n\t\t}\r\n\t\treturn 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);\r\n\t},\r\n\r\n\teaseInElastic: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\tvar p = 0;\r\n\t\tvar a = 1;\r\n\t\tif (t === 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tif (t === 1) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif (!p) {\r\n\t\t\tp = 0.3;\r\n\t\t}\r\n\t\tif (a < 1) {\r\n\t\t\ta = 1;\r\n\t\t\ts = p / 4;\r\n\t\t} else {\r\n\t\t\ts = p / (2 * Math.PI) * Math.asin(1 / a);\r\n\t\t}\r\n\t\treturn -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p));\r\n\t},\r\n\r\n\teaseOutElastic: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\tvar p = 0;\r\n\t\tvar a = 1;\r\n\t\tif (t === 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tif (t === 1) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif (!p) {\r\n\t\t\tp = 0.3;\r\n\t\t}\r\n\t\tif (a < 1) {\r\n\t\t\ta = 1;\r\n\t\t\ts = p / 4;\r\n\t\t} else {\r\n\t\t\ts = p / (2 * Math.PI) * Math.asin(1 / a);\r\n\t\t}\r\n\t\treturn a * Math.pow(2, -10 * t) * Math.sin((t - s) * (2 * Math.PI) / p) + 1;\r\n\t},\r\n\r\n\teaseInOutElastic: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\tvar p = 0;\r\n\t\tvar a = 1;\r\n\t\tif (t === 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tif ((t /= 0.5) === 2) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif (!p) {\r\n\t\t\tp = 0.45;\r\n\t\t}\r\n\t\tif (a < 1) {\r\n\t\t\ta = 1;\r\n\t\t\ts = p / 4;\r\n\t\t} else {\r\n\t\t\ts = p / (2 * Math.PI) * Math.asin(1 / a);\r\n\t\t}\r\n\t\tif (t < 1) {\r\n\t\t\treturn -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p));\r\n\t\t}\r\n\t\treturn a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p) * 0.5 + 1;\r\n\t},\r\n\teaseInBack: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\treturn t * t * ((s + 1) * t - s);\r\n\t},\r\n\r\n\teaseOutBack: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\treturn (t = t - 1) * t * ((s + 1) * t + s) + 1;\r\n\t},\r\n\r\n\teaseInOutBack: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * (t * t * (((s *= (1.525)) + 1) * t - s));\r\n\t\t}\r\n\t\treturn 0.5 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2);\r\n\t},\r\n\r\n\teaseInBounce: function(t) {\r\n\t\treturn 1 - effects.easeOutBounce(1 - t);\r\n\t},\r\n\r\n\teaseOutBounce: function(t) {\r\n\t\tif (t < (1 / 2.75)) {\r\n\t\t\treturn 7.5625 * t * t;\r\n\t\t}\r\n\t\tif (t < (2 / 2.75)) {\r\n\t\t\treturn 7.5625 * (t -= (1.5 / 2.75)) * t + 0.75;\r\n\t\t}\r\n\t\tif (t < (2.5 / 2.75)) {\r\n\t\t\treturn 7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375;\r\n\t\t}\r\n\t\treturn 7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375;\r\n\t},\r\n\r\n\teaseInOutBounce: function(t) {\r\n\t\tif (t < 0.5) {\r\n\t\t\treturn effects.easeInBounce(t * 2) * 0.5;\r\n\t\t}\r\n\t\treturn effects.easeOutBounce(t * 2 - 1) * 0.5 + 0.5;\r\n\t}\r\n};\r\n\r\nvar helpers_easing = {\r\n\teffects: effects\r\n};\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.easing.effects instead.\r\n * @function Chart.helpers.easingEffects\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers_core.easingEffects = effects;\n\nvar PI = Math.PI;\r\nvar RAD_PER_DEG = PI / 180;\r\nvar DOUBLE_PI = PI * 2;\r\nvar HALF_PI = PI / 2;\r\nvar QUARTER_PI = PI / 4;\r\nvar TWO_THIRDS_PI = PI * 2 / 3;\r\n\r\n/**\r\n * @namespace Chart.helpers.canvas\r\n */\r\nvar exports$1 = {\r\n\t/**\r\n\t * Clears the entire canvas associated to the given `chart`.\r\n\t * @param {Chart} chart - The chart for which to clear the canvas.\r\n\t */\r\n\tclear: function(chart) {\r\n\t\tchart.ctx.clearRect(0, 0, chart.width, chart.height);\r\n\t},\r\n\r\n\t/**\r\n\t * Creates a \"path\" for a rectangle with rounded corners at position (x, y) with a\r\n\t * given size (width, height) and the same `radius` for all corners.\r\n\t * @param {CanvasRenderingContext2D} ctx - The canvas 2D Context.\r\n\t * @param {number} x - The x axis of the coordinate for the rectangle starting point.\r\n\t * @param {number} y - The y axis of the coordinate for the rectangle starting point.\r\n\t * @param {number} width - The rectangle's width.\r\n\t * @param {number} height - The rectangle's height.\r\n\t * @param {number} radius - The rounded amount (in pixels) for the four corners.\r\n\t * @todo handle `radius` as top-left, top-right, bottom-right, bottom-left array/object?\r\n\t */\r\n\troundedRect: function(ctx, x, y, width, height, radius) {\r\n\t\tif (radius) {\r\n\t\t\tvar r = Math.min(radius, height / 2, width / 2);\r\n\t\t\tvar left = x + r;\r\n\t\t\tvar top = y + r;\r\n\t\t\tvar right = x + width - r;\r\n\t\t\tvar bottom = y + height - r;\r\n\r\n\t\t\tctx.moveTo(x, top);\r\n\t\t\tif (left < right && top < bottom) {\r\n\t\t\t\tctx.arc(left, top, r, -PI, -HALF_PI);\r\n\t\t\t\tctx.arc(right, top, r, -HALF_PI, 0);\r\n\t\t\t\tctx.arc(right, bottom, r, 0, HALF_PI);\r\n\t\t\t\tctx.arc(left, bottom, r, HALF_PI, PI);\r\n\t\t\t} else if (left < right) {\r\n\t\t\t\tctx.moveTo(left, y);\r\n\t\t\t\tctx.arc(right, top, r, -HALF_PI, HALF_PI);\r\n\t\t\t\tctx.arc(left, top, r, HALF_PI, PI + HALF_PI);\r\n\t\t\t} else if (top < bottom) {\r\n\t\t\t\tctx.arc(left, top, r, -PI, 0);\r\n\t\t\t\tctx.arc(left, bottom, r, 0, PI);\r\n\t\t\t} else {\r\n\t\t\t\tctx.arc(left, top, r, -PI, PI);\r\n\t\t\t}\r\n\t\t\tctx.closePath();\r\n\t\t\tctx.moveTo(x, y);\r\n\t\t} else {\r\n\t\t\tctx.rect(x, y, width, height);\r\n\t\t}\r\n\t},\r\n\r\n\tdrawPoint: function(ctx, style, radius, x, y, rotation) {\r\n\t\tvar type, xOffset, yOffset, size, cornerRadius;\r\n\t\tvar rad = (rotation || 0) * RAD_PER_DEG;\r\n\r\n\t\tif (style && typeof style === 'object') {\r\n\t\t\ttype = style.toString();\r\n\t\t\tif (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') {\r\n\t\t\t\tctx.save();\r\n\t\t\t\tctx.translate(x, y);\r\n\t\t\t\tctx.rotate(rad);\r\n\t\t\t\tctx.drawImage(style, -style.width / 2, -style.height / 2, style.width, style.height);\r\n\t\t\t\tctx.restore();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (isNaN(radius) || radius <= 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tctx.beginPath();\r\n\r\n\t\tswitch (style) {\r\n\t\t// Default includes circle\r\n\t\tdefault:\r\n\t\t\tctx.arc(x, y, radius, 0, DOUBLE_PI);\r\n\t\t\tctx.closePath();\r\n\t\t\tbreak;\r\n\t\tcase 'triangle':\r\n\t\t\tctx.moveTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\r\n\t\t\trad += TWO_THIRDS_PI;\r\n\t\t\tctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\r\n\t\t\trad += TWO_THIRDS_PI;\r\n\t\t\tctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\r\n\t\t\tctx.closePath();\r\n\t\t\tbreak;\r\n\t\tcase 'rectRounded':\r\n\t\t\t// NOTE: the rounded rect implementation changed to use `arc` instead of\r\n\t\t\t// `quadraticCurveTo` since it generates better results when rect is\r\n\t\t\t// almost a circle. 0.516 (instead of 0.5) produces results with visually\r\n\t\t\t// closer proportion to the previous impl and it is inscribed in the\r\n\t\t\t// circle with `radius`. For more details, see the following PRs:\r\n\t\t\t// https://github.com/chartjs/Chart.js/issues/5597\r\n\t\t\t// https://github.com/chartjs/Chart.js/issues/5858\r\n\t\t\tcornerRadius = radius * 0.516;\r\n\t\t\tsize = radius - cornerRadius;\r\n\t\t\txOffset = Math.cos(rad + QUARTER_PI) * size;\r\n\t\t\tyOffset = Math.sin(rad + QUARTER_PI) * size;\r\n\t\t\tctx.arc(x - xOffset, y - yOffset, cornerRadius, rad - PI, rad - HALF_PI);\r\n\t\t\tctx.arc(x + yOffset, y - xOffset, cornerRadius, rad - HALF_PI, rad);\r\n\t\t\tctx.arc(x + xOffset, y + yOffset, cornerRadius, rad, rad + HALF_PI);\r\n\t\t\tctx.arc(x - yOffset, y + xOffset, cornerRadius, rad + HALF_PI, rad + PI);\r\n\t\t\tctx.closePath();\r\n\t\t\tbreak;\r\n\t\tcase 'rect':\r\n\t\t\tif (!rotation) {\r\n\t\t\t\tsize = Math.SQRT1_2 * radius;\r\n\t\t\t\tctx.rect(x - size, y - size, 2 * size, 2 * size);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\trad += QUARTER_PI;\r\n\t\t\t/* falls through */\r\n\t\tcase 'rectRot':\r\n\t\t\txOffset = Math.cos(rad) * radius;\r\n\t\t\tyOffset = Math.sin(rad) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + yOffset, y - xOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tctx.lineTo(x - yOffset, y + xOffset);\r\n\t\t\tctx.closePath();\r\n\t\t\tbreak;\r\n\t\tcase 'crossRot':\r\n\t\t\trad += QUARTER_PI;\r\n\t\t\t/* falls through */\r\n\t\tcase 'cross':\r\n\t\t\txOffset = Math.cos(rad) * radius;\r\n\t\t\tyOffset = Math.sin(rad) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tctx.moveTo(x + yOffset, y - xOffset);\r\n\t\t\tctx.lineTo(x - yOffset, y + xOffset);\r\n\t\t\tbreak;\r\n\t\tcase 'star':\r\n\t\t\txOffset = Math.cos(rad) * radius;\r\n\t\t\tyOffset = Math.sin(rad) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tctx.moveTo(x + yOffset, y - xOffset);\r\n\t\t\tctx.lineTo(x - yOffset, y + xOffset);\r\n\t\t\trad += QUARTER_PI;\r\n\t\t\txOffset = Math.cos(rad) * radius;\r\n\t\t\tyOffset = Math.sin(rad) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tctx.moveTo(x + yOffset, y - xOffset);\r\n\t\t\tctx.lineTo(x - yOffset, y + xOffset);\r\n\t\t\tbreak;\r\n\t\tcase 'line':\r\n\t\t\txOffset = Math.cos(rad) * radius;\r\n\t\t\tyOffset = Math.sin(rad) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tbreak;\r\n\t\tcase 'dash':\r\n\t\t\tctx.moveTo(x, y);\r\n\t\t\tctx.lineTo(x + Math.cos(rad) * radius, y + Math.sin(rad) * radius);\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tctx.fill();\r\n\t\tctx.stroke();\r\n\t},\r\n\r\n\t/**\r\n\t * Returns true if the point is inside the rectangle\r\n\t * @param {object} point - The point to test\r\n\t * @param {object} area - The rectangle\r\n\t * @returns {boolean}\r\n\t * @private\r\n\t */\r\n\t_isPointInArea: function(point, area) {\r\n\t\tvar epsilon = 1e-6; // 1e-6 is margin in pixels for accumulated error.\r\n\r\n\t\treturn point.x > area.left - epsilon && point.x < area.right + epsilon &&\r\n\t\t\tpoint.y > area.top - epsilon && point.y < area.bottom + epsilon;\r\n\t},\r\n\r\n\tclipArea: function(ctx, area) {\r\n\t\tctx.save();\r\n\t\tctx.beginPath();\r\n\t\tctx.rect(area.left, area.top, area.right - area.left, area.bottom - area.top);\r\n\t\tctx.clip();\r\n\t},\r\n\r\n\tunclipArea: function(ctx) {\r\n\t\tctx.restore();\r\n\t},\r\n\r\n\tlineTo: function(ctx, previous, target, flip) {\r\n\t\tvar stepped = target.steppedLine;\r\n\t\tif (stepped) {\r\n\t\t\tif (stepped === 'middle') {\r\n\t\t\t\tvar midpoint = (previous.x + target.x) / 2.0;\r\n\t\t\t\tctx.lineTo(midpoint, flip ? target.y : previous.y);\r\n\t\t\t\tctx.lineTo(midpoint, flip ? previous.y : target.y);\r\n\t\t\t} else if ((stepped === 'after' && !flip) || (stepped !== 'after' && flip)) {\r\n\t\t\t\tctx.lineTo(previous.x, target.y);\r\n\t\t\t} else {\r\n\t\t\t\tctx.lineTo(target.x, previous.y);\r\n\t\t\t}\r\n\t\t\tctx.lineTo(target.x, target.y);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!target.tension) {\r\n\t\t\tctx.lineTo(target.x, target.y);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tctx.bezierCurveTo(\r\n\t\t\tflip ? previous.controlPointPreviousX : previous.controlPointNextX,\r\n\t\t\tflip ? previous.controlPointPreviousY : previous.controlPointNextY,\r\n\t\t\tflip ? target.controlPointNextX : target.controlPointPreviousX,\r\n\t\t\tflip ? target.controlPointNextY : target.controlPointPreviousY,\r\n\t\t\ttarget.x,\r\n\t\t\ttarget.y);\r\n\t}\r\n};\r\n\r\nvar helpers_canvas = exports$1;\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.canvas.clear instead.\r\n * @namespace Chart.helpers.clear\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers_core.clear = exports$1.clear;\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.canvas.roundedRect instead.\r\n * @namespace Chart.helpers.drawRoundedRectangle\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers_core.drawRoundedRectangle = function(ctx) {\r\n\tctx.beginPath();\r\n\texports$1.roundedRect.apply(exports$1, arguments);\r\n};\n\nvar defaults = {\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_set: function(scope, values) {\r\n\t\treturn helpers_core.merge(this[scope] || (this[scope] = {}), values);\r\n\t}\r\n};\r\n\r\n// TODO(v3): remove 'global' from namespace. all default are global and\r\n// there's inconsistency around which options are under 'global'\r\ndefaults._set('global', {\r\n\tdefaultColor: 'rgba(0,0,0,0.1)',\r\n\tdefaultFontColor: '#666',\r\n\tdefaultFontFamily: \"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif\",\r\n\tdefaultFontSize: 12,\r\n\tdefaultFontStyle: 'normal',\r\n\tdefaultLineHeight: 1.2,\r\n\tshowLines: true\r\n});\r\n\r\nvar core_defaults = defaults;\n\nvar valueOrDefault = helpers_core.valueOrDefault;\r\n\r\n/**\r\n * Converts the given font object into a CSS font string.\r\n * @param {object} font - A font object.\r\n * @return {string} The CSS font string. See https://developer.mozilla.org/en-US/docs/Web/CSS/font\r\n * @private\r\n */\r\nfunction toFontString(font) {\r\n\tif (!font || helpers_core.isNullOrUndef(font.size) || helpers_core.isNullOrUndef(font.family)) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (font.style ? font.style + ' ' : '')\r\n\t\t+ (font.weight ? font.weight + ' ' : '')\r\n\t\t+ font.size + 'px '\r\n\t\t+ font.family;\r\n}\r\n\r\n/**\r\n * @alias Chart.helpers.options\r\n * @namespace\r\n */\r\nvar helpers_options = {\r\n\t/**\r\n\t * Converts the given line height `value` in pixels for a specific font `size`.\r\n\t * @param {number|string} value - The lineHeight to parse (eg. 1.6, '14px', '75%', '1.6em').\r\n\t * @param {number} size - The font size (in pixels) used to resolve relative `value`.\r\n\t * @returns {number} The effective line height in pixels (size * 1.2 if value is invalid).\r\n\t * @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height\r\n\t * @since 2.7.0\r\n\t */\r\n\ttoLineHeight: function(value, size) {\r\n\t\tvar matches = ('' + value).match(/^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/);\r\n\t\tif (!matches || matches[1] === 'normal') {\r\n\t\t\treturn size * 1.2;\r\n\t\t}\r\n\r\n\t\tvalue = +matches[2];\r\n\r\n\t\tswitch (matches[3]) {\r\n\t\tcase 'px':\r\n\t\t\treturn value;\r\n\t\tcase '%':\r\n\t\t\tvalue /= 100;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn size * value;\r\n\t},\r\n\r\n\t/**\r\n\t * Converts the given value into a padding object with pre-computed width/height.\r\n\t * @param {number|object} value - If a number, set the value to all TRBL component,\r\n\t * else, if and object, use defined properties and sets undefined ones to 0.\r\n\t * @returns {object} The padding values (top, right, bottom, left, width, height)\r\n\t * @since 2.7.0\r\n\t */\r\n\ttoPadding: function(value) {\r\n\t\tvar t, r, b, l;\r\n\r\n\t\tif (helpers_core.isObject(value)) {\r\n\t\t\tt = +value.top || 0;\r\n\t\t\tr = +value.right || 0;\r\n\t\t\tb = +value.bottom || 0;\r\n\t\t\tl = +value.left || 0;\r\n\t\t} else {\r\n\t\t\tt = r = b = l = +value || 0;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\ttop: t,\r\n\t\t\tright: r,\r\n\t\t\tbottom: b,\r\n\t\t\tleft: l,\r\n\t\t\theight: t + b,\r\n\t\t\twidth: l + r\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * Parses font options and returns the font object.\r\n\t * @param {object} options - A object that contains font options to be parsed.\r\n\t * @return {object} The font object.\r\n\t * @todo Support font.* options and renamed to toFont().\r\n\t * @private\r\n\t */\r\n\t_parseFont: function(options) {\r\n\t\tvar globalDefaults = core_defaults.global;\r\n\t\tvar size = valueOrDefault(options.fontSize, globalDefaults.defaultFontSize);\r\n\t\tvar font = {\r\n\t\t\tfamily: valueOrDefault(options.fontFamily, globalDefaults.defaultFontFamily),\r\n\t\t\tlineHeight: helpers_core.options.toLineHeight(valueOrDefault(options.lineHeight, globalDefaults.defaultLineHeight), size),\r\n\t\t\tsize: size,\r\n\t\t\tstyle: valueOrDefault(options.fontStyle, globalDefaults.defaultFontStyle),\r\n\t\t\tweight: null,\r\n\t\t\tstring: ''\r\n\t\t};\r\n\r\n\t\tfont.string = toFontString(font);\r\n\t\treturn font;\r\n\t},\r\n\r\n\t/**\r\n\t * Evaluates the given `inputs` sequentially and returns the first defined value.\r\n\t * @param {Array} inputs - An array of values, falling back to the last value.\r\n\t * @param {object} [context] - If defined and the current value is a function, the value\r\n\t * is called with `context` as first argument and the result becomes the new input.\r\n\t * @param {number} [index] - If defined and the current value is an array, the value\r\n\t * at `index` become the new input.\r\n\t * @param {object} [info] - object to return information about resolution in\r\n\t * @param {boolean} [info.cacheable] - Will be set to `false` if option is not cacheable.\r\n\t * @since 2.7.0\r\n\t */\r\n\tresolve: function(inputs, context, index, info) {\r\n\t\tvar cacheable = true;\r\n\t\tvar i, ilen, value;\r\n\r\n\t\tfor (i = 0, ilen = inputs.length; i < ilen; ++i) {\r\n\t\t\tvalue = inputs[i];\r\n\t\t\tif (value === undefined) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (context !== undefined && typeof value === 'function') {\r\n\t\t\t\tvalue = value(context);\r\n\t\t\t\tcacheable = false;\r\n\t\t\t}\r\n\t\t\tif (index !== undefined && helpers_core.isArray(value)) {\r\n\t\t\t\tvalue = value[index];\r\n\t\t\t\tcacheable = false;\r\n\t\t\t}\r\n\t\t\tif (value !== undefined) {\r\n\t\t\t\tif (info && !cacheable) {\r\n\t\t\t\t\tinfo.cacheable = false;\r\n\t\t\t\t}\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\n\n/**\r\n * @alias Chart.helpers.math\r\n * @namespace\r\n */\r\nvar exports$2 = {\r\n\t/**\r\n\t * Returns an array of factors sorted from 1 to sqrt(value)\r\n\t * @private\r\n\t */\r\n\t_factorize: function(value) {\r\n\t\tvar result = [];\r\n\t\tvar sqrt = Math.sqrt(value);\r\n\t\tvar i;\r\n\r\n\t\tfor (i = 1; i < sqrt; i++) {\r\n\t\t\tif (value % i === 0) {\r\n\t\t\t\tresult.push(i);\r\n\t\t\t\tresult.push(value / i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (sqrt === (sqrt | 0)) { // if value is a square number\r\n\t\t\tresult.push(sqrt);\r\n\t\t}\r\n\r\n\t\tresult.sort(function(a, b) {\r\n\t\t\treturn a - b;\r\n\t\t}).pop();\r\n\t\treturn result;\r\n\t},\r\n\r\n\tlog10: Math.log10 || function(x) {\r\n\t\tvar exponent = Math.log(x) * Math.LOG10E; // Math.LOG10E = 1 / Math.LN10.\r\n\t\t// Check for whole powers of 10,\r\n\t\t// which due to floating point rounding error should be corrected.\r\n\t\tvar powerOf10 = Math.round(exponent);\r\n\t\tvar isPowerOf10 = x === Math.pow(10, powerOf10);\r\n\r\n\t\treturn isPowerOf10 ? powerOf10 : exponent;\r\n\t}\r\n};\r\n\r\nvar helpers_math = exports$2;\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.math.log10 instead.\r\n * @namespace Chart.helpers.log10\r\n * @deprecated since version 2.9.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers_core.log10 = exports$2.log10;\n\nvar getRtlAdapter = function(rectX, width) {\r\n\treturn {\r\n\t\tx: function(x) {\r\n\t\t\treturn rectX + rectX + width - x;\r\n\t\t},\r\n\t\tsetWidth: function(w) {\r\n\t\t\twidth = w;\r\n\t\t},\r\n\t\ttextAlign: function(align) {\r\n\t\t\tif (align === 'center') {\r\n\t\t\t\treturn align;\r\n\t\t\t}\r\n\t\t\treturn align === 'right' ? 'left' : 'right';\r\n\t\t},\r\n\t\txPlus: function(x, value) {\r\n\t\t\treturn x - value;\r\n\t\t},\r\n\t\tleftForLtr: function(x, itemWidth) {\r\n\t\t\treturn x - itemWidth;\r\n\t\t},\r\n\t};\r\n};\r\n\r\nvar getLtrAdapter = function() {\r\n\treturn {\r\n\t\tx: function(x) {\r\n\t\t\treturn x;\r\n\t\t},\r\n\t\tsetWidth: function(w) { // eslint-disable-line no-unused-vars\r\n\t\t},\r\n\t\ttextAlign: function(align) {\r\n\t\t\treturn align;\r\n\t\t},\r\n\t\txPlus: function(x, value) {\r\n\t\t\treturn x + value;\r\n\t\t},\r\n\t\tleftForLtr: function(x, _itemWidth) { // eslint-disable-line no-unused-vars\r\n\t\t\treturn x;\r\n\t\t},\r\n\t};\r\n};\r\n\r\nvar getAdapter = function(rtl, rectX, width) {\r\n\treturn rtl ? getRtlAdapter(rectX, width) : getLtrAdapter();\r\n};\r\n\r\nvar overrideTextDirection = function(ctx, direction) {\r\n\tvar style, original;\r\n\tif (direction === 'ltr' || direction === 'rtl') {\r\n\t\tstyle = ctx.canvas.style;\r\n\t\toriginal = [\r\n\t\t\tstyle.getPropertyValue('direction'),\r\n\t\t\tstyle.getPropertyPriority('direction'),\r\n\t\t];\r\n\r\n\t\tstyle.setProperty('direction', direction, 'important');\r\n\t\tctx.prevTextDirection = original;\r\n\t}\r\n};\r\n\r\nvar restoreTextDirection = function(ctx) {\r\n\tvar original = ctx.prevTextDirection;\r\n\tif (original !== undefined) {\r\n\t\tdelete ctx.prevTextDirection;\r\n\t\tctx.canvas.style.setProperty('direction', original[0], original[1]);\r\n\t}\r\n};\r\n\r\nvar helpers_rtl = {\r\n\tgetRtlAdapter: getAdapter,\r\n\toverrideTextDirection: overrideTextDirection,\r\n\trestoreTextDirection: restoreTextDirection,\r\n};\n\nvar helpers$1 = helpers_core;\r\nvar easing = helpers_easing;\r\nvar canvas = helpers_canvas;\r\nvar options = helpers_options;\r\nvar math = helpers_math;\r\nvar rtl = helpers_rtl;\nhelpers$1.easing = easing;\nhelpers$1.canvas = canvas;\nhelpers$1.options = options;\nhelpers$1.math = math;\nhelpers$1.rtl = rtl;\n\nfunction interpolate(start, view, model, ease) {\r\n\tvar keys = Object.keys(model);\r\n\tvar i, ilen, key, actual, origin, target, type, c0, c1;\r\n\r\n\tfor (i = 0, ilen = keys.length; i < ilen; ++i) {\r\n\t\tkey = keys[i];\r\n\r\n\t\ttarget = model[key];\r\n\r\n\t\t// if a value is added to the model after pivot() has been called, the view\r\n\t\t// doesn't contain it, so let's initialize the view to the target value.\r\n\t\tif (!view.hasOwnProperty(key)) {\r\n\t\t\tview[key] = target;\r\n\t\t}\r\n\r\n\t\tactual = view[key];\r\n\r\n\t\tif (actual === target || key[0] === '_') {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tif (!start.hasOwnProperty(key)) {\r\n\t\t\tstart[key] = actual;\r\n\t\t}\r\n\r\n\t\torigin = start[key];\r\n\r\n\t\ttype = typeof target;\r\n\r\n\t\tif (type === typeof origin) {\r\n\t\t\tif (type === 'string') {\r\n\t\t\t\tc0 = chartjsColor(origin);\r\n\t\t\t\tif (c0.valid) {\r\n\t\t\t\t\tc1 = chartjsColor(target);\r\n\t\t\t\t\tif (c1.valid) {\r\n\t\t\t\t\t\tview[key] = c1.mix(c0, ease).rgbString();\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (helpers$1.isFinite(origin) && helpers$1.isFinite(target)) {\r\n\t\t\t\tview[key] = origin + (target - origin) * ease;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tview[key] = target;\r\n\t}\r\n}\r\n\r\nvar Element = function(configuration) {\r\n\thelpers$1.extend(this, configuration);\r\n\tthis.initialize.apply(this, arguments);\r\n};\r\n\r\nhelpers$1.extend(Element.prototype, {\r\n\t_type: undefined,\r\n\r\n\tinitialize: function() {\r\n\t\tthis.hidden = false;\r\n\t},\r\n\r\n\tpivot: function() {\r\n\t\tvar me = this;\r\n\t\tif (!me._view) {\r\n\t\t\tme._view = helpers$1.extend({}, me._model);\r\n\t\t}\r\n\t\tme._start = {};\r\n\t\treturn me;\r\n\t},\r\n\r\n\ttransition: function(ease) {\r\n\t\tvar me = this;\r\n\t\tvar model = me._model;\r\n\t\tvar start = me._start;\r\n\t\tvar view = me._view;\r\n\r\n\t\t// No animation -> No Transition\r\n\t\tif (!model || ease === 1) {\r\n\t\t\tme._view = helpers$1.extend({}, model);\r\n\t\t\tme._start = null;\r\n\t\t\treturn me;\r\n\t\t}\r\n\r\n\t\tif (!view) {\r\n\t\t\tview = me._view = {};\r\n\t\t}\r\n\r\n\t\tif (!start) {\r\n\t\t\tstart = me._start = {};\r\n\t\t}\r\n\r\n\t\tinterpolate(start, view, model, ease);\r\n\r\n\t\treturn me;\r\n\t},\r\n\r\n\ttooltipPosition: function() {\r\n\t\treturn {\r\n\t\t\tx: this._model.x,\r\n\t\t\ty: this._model.y\r\n\t\t};\r\n\t},\r\n\r\n\thasValue: function() {\r\n\t\treturn helpers$1.isNumber(this._model.x) && helpers$1.isNumber(this._model.y);\r\n\t}\r\n});\r\n\r\nElement.extend = helpers$1.inherits;\r\n\r\nvar core_element = Element;\n\nvar exports$3 = core_element.extend({\r\n\tchart: null, // the animation associated chart instance\r\n\tcurrentStep: 0, // the current animation step\r\n\tnumSteps: 60, // default number of steps\r\n\teasing: '', // the easing to use for this animation\r\n\trender: null, // render function used by the animation service\r\n\r\n\tonAnimationProgress: null, // user specified callback to fire on each step of the animation\r\n\tonAnimationComplete: null, // user specified callback to fire when the animation finishes\r\n});\r\n\r\nvar core_animation = exports$3;\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.Animation instead\r\n * @prop Chart.Animation#animationObject\r\n * @deprecated since version 2.6.0\r\n * @todo remove at version 3\r\n */\r\nObject.defineProperty(exports$3.prototype, 'animationObject', {\r\n\tget: function() {\r\n\t\treturn this;\r\n\t}\r\n});\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.Animation#chart instead\r\n * @prop Chart.Animation#chartInstance\r\n * @deprecated since version 2.6.0\r\n * @todo remove at version 3\r\n */\r\nObject.defineProperty(exports$3.prototype, 'chartInstance', {\r\n\tget: function() {\r\n\t\treturn this.chart;\r\n\t},\r\n\tset: function(value) {\r\n\t\tthis.chart = value;\r\n\t}\r\n});\n\ncore_defaults._set('global', {\r\n\tanimation: {\r\n\t\tduration: 1000,\r\n\t\teasing: 'easeOutQuart',\r\n\t\tonProgress: helpers$1.noop,\r\n\t\tonComplete: helpers$1.noop\r\n\t}\r\n});\r\n\r\nvar core_animations = {\r\n\tanimations: [],\r\n\trequest: null,\r\n\r\n\t/**\r\n\t * @param {Chart} chart - The chart to animate.\r\n\t * @param {Chart.Animation} animation - The animation that we will animate.\r\n\t * @param {number} duration - The animation duration in ms.\r\n\t * @param {boolean} lazy - if true, the chart is not marked as animating to enable more responsive interactions\r\n\t */\r\n\taddAnimation: function(chart, animation, duration, lazy) {\r\n\t\tvar animations = this.animations;\r\n\t\tvar i, ilen;\r\n\r\n\t\tanimation.chart = chart;\r\n\t\tanimation.startTime = Date.now();\r\n\t\tanimation.duration = duration;\r\n\r\n\t\tif (!lazy) {\r\n\t\t\tchart.animating = true;\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = animations.length; i < ilen; ++i) {\r\n\t\t\tif (animations[i].chart === chart) {\r\n\t\t\t\tanimations[i] = animation;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tanimations.push(animation);\r\n\r\n\t\t// If there are no animations queued, manually kickstart a digest, for lack of a better word\r\n\t\tif (animations.length === 1) {\r\n\t\t\tthis.requestAnimationFrame();\r\n\t\t}\r\n\t},\r\n\r\n\tcancelAnimation: function(chart) {\r\n\t\tvar index = helpers$1.findIndex(this.animations, function(animation) {\r\n\t\t\treturn animation.chart === chart;\r\n\t\t});\r\n\r\n\t\tif (index !== -1) {\r\n\t\t\tthis.animations.splice(index, 1);\r\n\t\t\tchart.animating = false;\r\n\t\t}\r\n\t},\r\n\r\n\trequestAnimationFrame: function() {\r\n\t\tvar me = this;\r\n\t\tif (me.request === null) {\r\n\t\t\t// Skip animation frame requests until the active one is executed.\r\n\t\t\t// This can happen when processing mouse events, e.g. 'mousemove'\r\n\t\t\t// and 'mouseout' events will trigger multiple renders.\r\n\t\t\tme.request = helpers$1.requestAnimFrame.call(window, function() {\r\n\t\t\t\tme.request = null;\r\n\t\t\t\tme.startDigest();\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tstartDigest: function() {\r\n\t\tvar me = this;\r\n\r\n\t\tme.advance();\r\n\r\n\t\t// Do we have more stuff to animate?\r\n\t\tif (me.animations.length > 0) {\r\n\t\t\tme.requestAnimationFrame();\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tadvance: function() {\r\n\t\tvar animations = this.animations;\r\n\t\tvar animation, chart, numSteps, nextStep;\r\n\t\tvar i = 0;\r\n\r\n\t\t// 1 animation per chart, so we are looping charts here\r\n\t\twhile (i < animations.length) {\r\n\t\t\tanimation = animations[i];\r\n\t\t\tchart = animation.chart;\r\n\t\t\tnumSteps = animation.numSteps;\r\n\r\n\t\t\t// Make sure that currentStep starts at 1\r\n\t\t\t// https://github.com/chartjs/Chart.js/issues/6104\r\n\t\t\tnextStep = Math.floor((Date.now() - animation.startTime) / animation.duration * numSteps) + 1;\r\n\t\t\tanimation.currentStep = Math.min(nextStep, numSteps);\r\n\r\n\t\t\thelpers$1.callback(animation.render, [chart, animation], chart);\r\n\t\t\thelpers$1.callback(animation.onAnimationProgress, [animation], chart);\r\n\r\n\t\t\tif (animation.currentStep >= numSteps) {\r\n\t\t\t\thelpers$1.callback(animation.onAnimationComplete, [animation], chart);\r\n\t\t\t\tchart.animating = false;\r\n\t\t\t\tanimations.splice(i, 1);\r\n\t\t\t} else {\r\n\t\t\t\t++i;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\n\nvar resolve = helpers$1.options.resolve;\r\n\r\nvar arrayEvents = ['push', 'pop', 'shift', 'splice', 'unshift'];\r\n\r\n/**\r\n * Hooks the array methods that add or remove values ('push', pop', 'shift', 'splice',\r\n * 'unshift') and notify the listener AFTER the array has been altered. Listeners are\r\n * called on the 'onData*' callbacks (e.g. onDataPush, etc.) with same arguments.\r\n */\r\nfunction listenArrayEvents(array, listener) {\r\n\tif (array._chartjs) {\r\n\t\tarray._chartjs.listeners.push(listener);\r\n\t\treturn;\r\n\t}\r\n\r\n\tObject.defineProperty(array, '_chartjs', {\r\n\t\tconfigurable: true,\r\n\t\tenumerable: false,\r\n\t\tvalue: {\r\n\t\t\tlisteners: [listener]\r\n\t\t}\r\n\t});\r\n\r\n\tarrayEvents.forEach(function(key) {\r\n\t\tvar method = 'onData' + key.charAt(0).toUpperCase() + key.slice(1);\r\n\t\tvar base = array[key];\r\n\r\n\t\tObject.defineProperty(array, key, {\r\n\t\t\tconfigurable: true,\r\n\t\t\tenumerable: false,\r\n\t\t\tvalue: function() {\r\n\t\t\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\t\t\tvar res = base.apply(this, args);\r\n\r\n\t\t\t\thelpers$1.each(array._chartjs.listeners, function(object) {\r\n\t\t\t\t\tif (typeof object[method] === 'function') {\r\n\t\t\t\t\t\tobject[method].apply(object, args);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn res;\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n}\r\n\r\n/**\r\n * Removes the given array event listener and cleanup extra attached properties (such as\r\n * the _chartjs stub and overridden methods) if array doesn't have any more listeners.\r\n */\r\nfunction unlistenArrayEvents(array, listener) {\r\n\tvar stub = array._chartjs;\r\n\tif (!stub) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar listeners = stub.listeners;\r\n\tvar index = listeners.indexOf(listener);\r\n\tif (index !== -1) {\r\n\t\tlisteners.splice(index, 1);\r\n\t}\r\n\r\n\tif (listeners.length > 0) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tarrayEvents.forEach(function(key) {\r\n\t\tdelete array[key];\r\n\t});\r\n\r\n\tdelete array._chartjs;\r\n}\r\n\r\n// Base class for all dataset controllers (line, bar, etc)\r\nvar DatasetController = function(chart, datasetIndex) {\r\n\tthis.initialize(chart, datasetIndex);\r\n};\r\n\r\nhelpers$1.extend(DatasetController.prototype, {\r\n\r\n\t/**\r\n\t * Element type used to generate a meta dataset (e.g. Chart.element.Line).\r\n\t * @type {Chart.core.element}\r\n\t */\r\n\tdatasetElementType: null,\r\n\r\n\t/**\r\n\t * Element type used to generate a meta data (e.g. Chart.element.Point).\r\n\t * @type {Chart.core.element}\r\n\t */\r\n\tdataElementType: null,\r\n\r\n\t/**\r\n\t * Dataset element option keys to be resolved in _resolveDatasetElementOptions.\r\n\t * A derived controller may override this to resolve controller-specific options.\r\n\t * The keys defined here are for backward compatibility for legend styles.\r\n\t * @private\r\n\t */\r\n\t_datasetElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderCapStyle',\r\n\t\t'borderColor',\r\n\t\t'borderDash',\r\n\t\t'borderDashOffset',\r\n\t\t'borderJoinStyle',\r\n\t\t'borderWidth'\r\n\t],\r\n\r\n\t/**\r\n\t * Data element option keys to be resolved in _resolveDataElementOptions.\r\n\t * A derived controller may override this to resolve controller-specific options.\r\n\t * The keys defined here are for backward compatibility for legend styles.\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderColor',\r\n\t\t'borderWidth',\r\n\t\t'pointStyle'\r\n\t],\r\n\r\n\tinitialize: function(chart, datasetIndex) {\r\n\t\tvar me = this;\r\n\t\tme.chart = chart;\r\n\t\tme.index = datasetIndex;\r\n\t\tme.linkScales();\r\n\t\tme.addElements();\r\n\t\tme._type = me.getMeta().type;\r\n\t},\r\n\r\n\tupdateIndex: function(datasetIndex) {\r\n\t\tthis.index = datasetIndex;\r\n\t},\r\n\r\n\tlinkScales: function() {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar chart = me.chart;\r\n\t\tvar scales = chart.scales;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar scalesOpts = chart.options.scales;\r\n\r\n\t\tif (meta.xAxisID === null || !(meta.xAxisID in scales) || dataset.xAxisID) {\r\n\t\t\tmeta.xAxisID = dataset.xAxisID || scalesOpts.xAxes[0].id;\r\n\t\t}\r\n\t\tif (meta.yAxisID === null || !(meta.yAxisID in scales) || dataset.yAxisID) {\r\n\t\t\tmeta.yAxisID = dataset.yAxisID || scalesOpts.yAxes[0].id;\r\n\t\t}\r\n\t},\r\n\r\n\tgetDataset: function() {\r\n\t\treturn this.chart.data.datasets[this.index];\r\n\t},\r\n\r\n\tgetMeta: function() {\r\n\t\treturn this.chart.getDatasetMeta(this.index);\r\n\t},\r\n\r\n\tgetScaleForId: function(scaleID) {\r\n\t\treturn this.chart.scales[scaleID];\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getValueScaleId: function() {\r\n\t\treturn this.getMeta().yAxisID;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getIndexScaleId: function() {\r\n\t\treturn this.getMeta().xAxisID;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getValueScale: function() {\r\n\t\treturn this.getScaleForId(this._getValueScaleId());\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getIndexScale: function() {\r\n\t\treturn this.getScaleForId(this._getIndexScaleId());\r\n\t},\r\n\r\n\treset: function() {\r\n\t\tthis._update(true);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tdestroy: function() {\r\n\t\tif (this._data) {\r\n\t\t\tunlistenArrayEvents(this._data, this);\r\n\t\t}\r\n\t},\r\n\r\n\tcreateMetaDataset: function() {\r\n\t\tvar me = this;\r\n\t\tvar type = me.datasetElementType;\r\n\t\treturn type && new type({\r\n\t\t\t_chart: me.chart,\r\n\t\t\t_datasetIndex: me.index\r\n\t\t});\r\n\t},\r\n\r\n\tcreateMetaData: function(index) {\r\n\t\tvar me = this;\r\n\t\tvar type = me.dataElementType;\r\n\t\treturn type && new type({\r\n\t\t\t_chart: me.chart,\r\n\t\t\t_datasetIndex: me.index,\r\n\t\t\t_index: index\r\n\t\t});\r\n\t},\r\n\r\n\taddElements: function() {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar data = me.getDataset().data || [];\r\n\t\tvar metaData = meta.data;\r\n\t\tvar i, ilen;\r\n\r\n\t\tfor (i = 0, ilen = data.length; i < ilen; ++i) {\r\n\t\t\tmetaData[i] = metaData[i] || me.createMetaData(i);\r\n\t\t}\r\n\r\n\t\tmeta.dataset = meta.dataset || me.createMetaDataset();\r\n\t},\r\n\r\n\taddElementAndReset: function(index) {\r\n\t\tvar element = this.createMetaData(index);\r\n\t\tthis.getMeta().data.splice(index, 0, element);\r\n\t\tthis.updateElement(element, index, true);\r\n\t},\r\n\r\n\tbuildOrUpdateElements: function() {\r\n\t\tvar me = this;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar data = dataset.data || (dataset.data = []);\r\n\r\n\t\t// In order to correctly handle data addition/deletion animation (an thus simulate\r\n\t\t// real-time charts), we need to monitor these data modifications and synchronize\r\n\t\t// the internal meta data accordingly.\r\n\t\tif (me._data !== data) {\r\n\t\t\tif (me._data) {\r\n\t\t\t\t// This case happens when the user replaced the data array instance.\r\n\t\t\t\tunlistenArrayEvents(me._data, me);\r\n\t\t\t}\r\n\r\n\t\t\tif (data && Object.isExtensible(data)) {\r\n\t\t\t\tlistenArrayEvents(data, me);\r\n\t\t\t}\r\n\t\t\tme._data = data;\r\n\t\t}\r\n\r\n\t\t// Re-sync meta data in case the user replaced the data array or if we missed\r\n\t\t// any updates and so make sure that we handle number of datapoints changing.\r\n\t\tme.resyncElements();\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the merged user-supplied and default dataset-level options\r\n\t * @private\r\n\t */\r\n\t_configure: function() {\r\n\t\tvar me = this;\r\n\t\tme._config = helpers$1.merge(Object.create(null), [\r\n\t\t\tme.chart.options.datasets[me._type],\r\n\t\t\tme.getDataset(),\r\n\t\t], {\r\n\t\t\tmerger: function(key, target, source) {\r\n\t\t\t\tif (key !== '_meta' && key !== 'data') {\r\n\t\t\t\t\thelpers$1._merger(key, target, source);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\t_update: function(reset) {\r\n\t\tvar me = this;\r\n\t\tme._configure();\r\n\t\tme._cachedDataOpts = null;\r\n\t\tme.update(reset);\r\n\t},\r\n\r\n\tupdate: helpers$1.noop,\r\n\r\n\ttransition: function(easingValue) {\r\n\t\tvar meta = this.getMeta();\r\n\t\tvar elements = meta.data || [];\r\n\t\tvar ilen = elements.length;\r\n\t\tvar i = 0;\r\n\r\n\t\tfor (; i < ilen; ++i) {\r\n\t\t\telements[i].transition(easingValue);\r\n\t\t}\r\n\r\n\t\tif (meta.dataset) {\r\n\t\t\tmeta.dataset.transition(easingValue);\r\n\t\t}\r\n\t},\r\n\r\n\tdraw: function() {\r\n\t\tvar meta = this.getMeta();\r\n\t\tvar elements = meta.data || [];\r\n\t\tvar ilen = elements.length;\r\n\t\tvar i = 0;\r\n\r\n\t\tif (meta.dataset) {\r\n\t\t\tmeta.dataset.draw();\r\n\t\t}\r\n\r\n\t\tfor (; i < ilen; ++i) {\r\n\t\t\telements[i].draw();\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Returns a set of predefined style properties that should be used to represent the dataset\r\n\t * or the data if the index is specified\r\n\t * @param {number} index - data index\r\n\t * @return {IStyleInterface} style object\r\n\t */\r\n\tgetStyle: function(index) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar dataset = meta.dataset;\r\n\t\tvar style;\r\n\r\n\t\tme._configure();\r\n\t\tif (dataset && index === undefined) {\r\n\t\t\tstyle = me._resolveDatasetElementOptions(dataset || {});\r\n\t\t} else {\r\n\t\t\tindex = index || 0;\r\n\t\t\tstyle = me._resolveDataElementOptions(meta.data[index] || {}, index);\r\n\t\t}\r\n\r\n\t\tif (style.fill === false || style.fill === null) {\r\n\t\t\tstyle.backgroundColor = style.borderColor;\r\n\t\t}\r\n\r\n\t\treturn style;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDatasetElementOptions: function(element, hover) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar datasetOpts = me._config;\r\n\t\tvar custom = element.custom || {};\r\n\t\tvar options = chart.options.elements[me.datasetElementType.prototype._type] || {};\r\n\t\tvar elementOptions = me._datasetElementOptions;\r\n\t\tvar values = {};\r\n\t\tvar i, ilen, key, readKey;\r\n\r\n\t\t// Scriptable options\r\n\t\tvar context = {\r\n\t\t\tchart: chart,\r\n\t\t\tdataset: me.getDataset(),\r\n\t\t\tdatasetIndex: me.index,\r\n\t\t\thover: hover\r\n\t\t};\r\n\r\n\t\tfor (i = 0, ilen = elementOptions.length; i < ilen; ++i) {\r\n\t\t\tkey = elementOptions[i];\r\n\t\t\treadKey = hover ? 'hover' + key.charAt(0).toUpperCase() + key.slice(1) : key;\r\n\t\t\tvalues[key] = resolve([\r\n\t\t\t\tcustom[readKey],\r\n\t\t\t\tdatasetOpts[readKey],\r\n\t\t\t\toptions[readKey]\r\n\t\t\t], context);\r\n\t\t}\r\n\r\n\t\treturn values;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDataElementOptions: function(element, index) {\r\n\t\tvar me = this;\r\n\t\tvar custom = element && element.custom;\r\n\t\tvar cached = me._cachedDataOpts;\r\n\t\tif (cached && !custom) {\r\n\t\t\treturn cached;\r\n\t\t}\r\n\t\tvar chart = me.chart;\r\n\t\tvar datasetOpts = me._config;\r\n\t\tvar options = chart.options.elements[me.dataElementType.prototype._type] || {};\r\n\t\tvar elementOptions = me._dataElementOptions;\r\n\t\tvar values = {};\r\n\r\n\t\t// Scriptable options\r\n\t\tvar context = {\r\n\t\t\tchart: chart,\r\n\t\t\tdataIndex: index,\r\n\t\t\tdataset: me.getDataset(),\r\n\t\t\tdatasetIndex: me.index\r\n\t\t};\r\n\r\n\t\t// `resolve` sets cacheable to `false` if any option is indexed or scripted\r\n\t\tvar info = {cacheable: !custom};\r\n\r\n\t\tvar keys, i, ilen, key;\r\n\r\n\t\tcustom = custom || {};\r\n\r\n\t\tif (helpers$1.isArray(elementOptions)) {\r\n\t\t\tfor (i = 0, ilen = elementOptions.length; i < ilen; ++i) {\r\n\t\t\t\tkey = elementOptions[i];\r\n\t\t\t\tvalues[key] = resolve([\r\n\t\t\t\t\tcustom[key],\r\n\t\t\t\t\tdatasetOpts[key],\r\n\t\t\t\t\toptions[key]\r\n\t\t\t\t], context, index, info);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tkeys = Object.keys(elementOptions);\r\n\t\t\tfor (i = 0, ilen = keys.length; i < ilen; ++i) {\r\n\t\t\t\tkey = keys[i];\r\n\t\t\t\tvalues[key] = resolve([\r\n\t\t\t\t\tcustom[key],\r\n\t\t\t\t\tdatasetOpts[elementOptions[key]],\r\n\t\t\t\t\tdatasetOpts[key],\r\n\t\t\t\t\toptions[key]\r\n\t\t\t\t], context, index, info);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (info.cacheable) {\r\n\t\t\tme._cachedDataOpts = Object.freeze(values);\r\n\t\t}\r\n\r\n\t\treturn values;\r\n\t},\r\n\r\n\tremoveHoverStyle: function(element) {\r\n\t\thelpers$1.merge(element._model, element.$previousStyle || {});\r\n\t\tdelete element.$previousStyle;\r\n\t},\r\n\r\n\tsetHoverStyle: function(element) {\r\n\t\tvar dataset = this.chart.data.datasets[element._datasetIndex];\r\n\t\tvar index = element._index;\r\n\t\tvar custom = element.custom || {};\r\n\t\tvar model = element._model;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\r\n\t\telement.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = resolve([custom.hoverBackgroundColor, dataset.hoverBackgroundColor, getHoverColor(model.backgroundColor)], undefined, index);\r\n\t\tmodel.borderColor = resolve([custom.hoverBorderColor, dataset.hoverBorderColor, getHoverColor(model.borderColor)], undefined, index);\r\n\t\tmodel.borderWidth = resolve([custom.hoverBorderWidth, dataset.hoverBorderWidth, model.borderWidth], undefined, index);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_removeDatasetHoverStyle: function() {\r\n\t\tvar element = this.getMeta().dataset;\r\n\r\n\t\tif (element) {\r\n\t\t\tthis.removeHoverStyle(element);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_setDatasetHoverStyle: function() {\r\n\t\tvar element = this.getMeta().dataset;\r\n\t\tvar prev = {};\r\n\t\tvar i, ilen, key, keys, hoverOptions, model;\r\n\r\n\t\tif (!element) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tmodel = element._model;\r\n\t\thoverOptions = this._resolveDatasetElementOptions(element, true);\r\n\r\n\t\tkeys = Object.keys(hoverOptions);\r\n\t\tfor (i = 0, ilen = keys.length; i < ilen; ++i) {\r\n\t\t\tkey = keys[i];\r\n\t\t\tprev[key] = model[key];\r\n\t\t\tmodel[key] = hoverOptions[key];\r\n\t\t}\r\n\r\n\t\telement.$previousStyle = prev;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tresyncElements: function() {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar data = me.getDataset().data;\r\n\t\tvar numMeta = meta.data.length;\r\n\t\tvar numData = data.length;\r\n\r\n\t\tif (numData < numMeta) {\r\n\t\t\tmeta.data.splice(numData, numMeta - numData);\r\n\t\t} else if (numData > numMeta) {\r\n\t\t\tme.insertElements(numMeta, numData - numMeta);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tinsertElements: function(start, count) {\r\n\t\tfor (var i = 0; i < count; ++i) {\r\n\t\t\tthis.addElementAndReset(start + i);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tonDataPush: function() {\r\n\t\tvar count = arguments.length;\r\n\t\tthis.insertElements(this.getDataset().data.length - count, count);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tonDataPop: function() {\r\n\t\tthis.getMeta().data.pop();\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tonDataShift: function() {\r\n\t\tthis.getMeta().data.shift();\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tonDataSplice: function(start, count) {\r\n\t\tthis.getMeta().data.splice(start, count);\r\n\t\tthis.insertElements(start, arguments.length - 2);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tonDataUnshift: function() {\r\n\t\tthis.insertElements(0, arguments.length);\r\n\t}\r\n});\r\n\r\nDatasetController.extend = helpers$1.inherits;\r\n\r\nvar core_datasetController = DatasetController;\n\nvar TAU = Math.PI * 2;\r\n\r\ncore_defaults._set('global', {\r\n\telements: {\r\n\t\tarc: {\r\n\t\t\tbackgroundColor: core_defaults.global.defaultColor,\r\n\t\t\tborderColor: '#fff',\r\n\t\t\tborderWidth: 2,\r\n\t\t\tborderAlign: 'center'\r\n\t\t}\r\n\t}\r\n});\r\n\r\nfunction clipArc(ctx, arc) {\r\n\tvar startAngle = arc.startAngle;\r\n\tvar endAngle = arc.endAngle;\r\n\tvar pixelMargin = arc.pixelMargin;\r\n\tvar angleMargin = pixelMargin / arc.outerRadius;\r\n\tvar x = arc.x;\r\n\tvar y = arc.y;\r\n\r\n\t// Draw an inner border by cliping the arc and drawing a double-width border\r\n\t// Enlarge the clipping arc by 0.33 pixels to eliminate glitches between borders\r\n\tctx.beginPath();\r\n\tctx.arc(x, y, arc.outerRadius, startAngle - angleMargin, endAngle + angleMargin);\r\n\tif (arc.innerRadius > pixelMargin) {\r\n\t\tangleMargin = pixelMargin / arc.innerRadius;\r\n\t\tctx.arc(x, y, arc.innerRadius - pixelMargin, endAngle + angleMargin, startAngle - angleMargin, true);\r\n\t} else {\r\n\t\tctx.arc(x, y, pixelMargin, endAngle + Math.PI / 2, startAngle - Math.PI / 2);\r\n\t}\r\n\tctx.closePath();\r\n\tctx.clip();\r\n}\r\n\r\nfunction drawFullCircleBorders(ctx, vm, arc, inner) {\r\n\tvar endAngle = arc.endAngle;\r\n\tvar i;\r\n\r\n\tif (inner) {\r\n\t\tarc.endAngle = arc.startAngle + TAU;\r\n\t\tclipArc(ctx, arc);\r\n\t\tarc.endAngle = endAngle;\r\n\t\tif (arc.endAngle === arc.startAngle && arc.fullCircles) {\r\n\t\t\tarc.endAngle += TAU;\r\n\t\t\tarc.fullCircles--;\r\n\t\t}\r\n\t}\r\n\r\n\tctx.beginPath();\r\n\tctx.arc(arc.x, arc.y, arc.innerRadius, arc.startAngle + TAU, arc.startAngle, true);\r\n\tfor (i = 0; i < arc.fullCircles; ++i) {\r\n\t\tctx.stroke();\r\n\t}\r\n\r\n\tctx.beginPath();\r\n\tctx.arc(arc.x, arc.y, vm.outerRadius, arc.startAngle, arc.startAngle + TAU);\r\n\tfor (i = 0; i < arc.fullCircles; ++i) {\r\n\t\tctx.stroke();\r\n\t}\r\n}\r\n\r\nfunction drawBorder(ctx, vm, arc) {\r\n\tvar inner = vm.borderAlign === 'inner';\r\n\r\n\tif (inner) {\r\n\t\tctx.lineWidth = vm.borderWidth * 2;\r\n\t\tctx.lineJoin = 'round';\r\n\t} else {\r\n\t\tctx.lineWidth = vm.borderWidth;\r\n\t\tctx.lineJoin = 'bevel';\r\n\t}\r\n\r\n\tif (arc.fullCircles) {\r\n\t\tdrawFullCircleBorders(ctx, vm, arc, inner);\r\n\t}\r\n\r\n\tif (inner) {\r\n\t\tclipArc(ctx, arc);\r\n\t}\r\n\r\n\tctx.beginPath();\r\n\tctx.arc(arc.x, arc.y, vm.outerRadius, arc.startAngle, arc.endAngle);\r\n\tctx.arc(arc.x, arc.y, arc.innerRadius, arc.endAngle, arc.startAngle, true);\r\n\tctx.closePath();\r\n\tctx.stroke();\r\n}\r\n\r\nvar element_arc = core_element.extend({\r\n\t_type: 'arc',\r\n\r\n\tinLabelRange: function(mouseX) {\r\n\t\tvar vm = this._view;\r\n\r\n\t\tif (vm) {\r\n\t\t\treturn (Math.pow(mouseX - vm.x, 2) < Math.pow(vm.radius + vm.hoverRadius, 2));\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\tinRange: function(chartX, chartY) {\r\n\t\tvar vm = this._view;\r\n\r\n\t\tif (vm) {\r\n\t\t\tvar pointRelativePosition = helpers$1.getAngleFromPoint(vm, {x: chartX, y: chartY});\r\n\t\t\tvar angle = pointRelativePosition.angle;\r\n\t\t\tvar distance = pointRelativePosition.distance;\r\n\r\n\t\t\t// Sanitise angle range\r\n\t\t\tvar startAngle = vm.startAngle;\r\n\t\t\tvar endAngle = vm.endAngle;\r\n\t\t\twhile (endAngle < startAngle) {\r\n\t\t\t\tendAngle += TAU;\r\n\t\t\t}\r\n\t\t\twhile (angle > endAngle) {\r\n\t\t\t\tangle -= TAU;\r\n\t\t\t}\r\n\t\t\twhile (angle < startAngle) {\r\n\t\t\t\tangle += TAU;\r\n\t\t\t}\r\n\r\n\t\t\t// Check if within the range of the open/close angle\r\n\t\t\tvar betweenAngles = (angle >= startAngle && angle <= endAngle);\r\n\t\t\tvar withinRadius = (distance >= vm.innerRadius && distance <= vm.outerRadius);\r\n\r\n\t\t\treturn (betweenAngles && withinRadius);\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\tgetCenterPoint: function() {\r\n\t\tvar vm = this._view;\r\n\t\tvar halfAngle = (vm.startAngle + vm.endAngle) / 2;\r\n\t\tvar halfRadius = (vm.innerRadius + vm.outerRadius) / 2;\r\n\t\treturn {\r\n\t\t\tx: vm.x + Math.cos(halfAngle) * halfRadius,\r\n\t\t\ty: vm.y + Math.sin(halfAngle) * halfRadius\r\n\t\t};\r\n\t},\r\n\r\n\tgetArea: function() {\r\n\t\tvar vm = this._view;\r\n\t\treturn Math.PI * ((vm.endAngle - vm.startAngle) / (2 * Math.PI)) * (Math.pow(vm.outerRadius, 2) - Math.pow(vm.innerRadius, 2));\r\n\t},\r\n\r\n\ttooltipPosition: function() {\r\n\t\tvar vm = this._view;\r\n\t\tvar centreAngle = vm.startAngle + ((vm.endAngle - vm.startAngle) / 2);\r\n\t\tvar rangeFromCentre = (vm.outerRadius - vm.innerRadius) / 2 + vm.innerRadius;\r\n\r\n\t\treturn {\r\n\t\t\tx: vm.x + (Math.cos(centreAngle) * rangeFromCentre),\r\n\t\t\ty: vm.y + (Math.sin(centreAngle) * rangeFromCentre)\r\n\t\t};\r\n\t},\r\n\r\n\tdraw: function() {\r\n\t\tvar ctx = this._chart.ctx;\r\n\t\tvar vm = this._view;\r\n\t\tvar pixelMargin = (vm.borderAlign === 'inner') ? 0.33 : 0;\r\n\t\tvar arc = {\r\n\t\t\tx: vm.x,\r\n\t\t\ty: vm.y,\r\n\t\t\tinnerRadius: vm.innerRadius,\r\n\t\t\touterRadius: Math.max(vm.outerRadius - pixelMargin, 0),\r\n\t\t\tpixelMargin: pixelMargin,\r\n\t\t\tstartAngle: vm.startAngle,\r\n\t\t\tendAngle: vm.endAngle,\r\n\t\t\tfullCircles: Math.floor(vm.circumference / TAU)\r\n\t\t};\r\n\t\tvar i;\r\n\r\n\t\tctx.save();\r\n\r\n\t\tctx.fillStyle = vm.backgroundColor;\r\n\t\tctx.strokeStyle = vm.borderColor;\r\n\r\n\t\tif (arc.fullCircles) {\r\n\t\t\tarc.endAngle = arc.startAngle + TAU;\r\n\t\t\tctx.beginPath();\r\n\t\t\tctx.arc(arc.x, arc.y, arc.outerRadius, arc.startAngle, arc.endAngle);\r\n\t\t\tctx.arc(arc.x, arc.y, arc.innerRadius, arc.endAngle, arc.startAngle, true);\r\n\t\t\tctx.closePath();\r\n\t\t\tfor (i = 0; i < arc.fullCircles; ++i) {\r\n\t\t\t\tctx.fill();\r\n\t\t\t}\r\n\t\t\tarc.endAngle = arc.startAngle + vm.circumference % TAU;\r\n\t\t}\r\n\r\n\t\tctx.beginPath();\r\n\t\tctx.arc(arc.x, arc.y, arc.outerRadius, arc.startAngle, arc.endAngle);\r\n\t\tctx.arc(arc.x, arc.y, arc.innerRadius, arc.endAngle, arc.startAngle, true);\r\n\t\tctx.closePath();\r\n\t\tctx.fill();\r\n\r\n\t\tif (vm.borderWidth) {\r\n\t\t\tdrawBorder(ctx, vm, arc);\r\n\t\t}\r\n\r\n\t\tctx.restore();\r\n\t}\r\n});\n\nvar valueOrDefault$1 = helpers$1.valueOrDefault;\r\n\r\nvar defaultColor = core_defaults.global.defaultColor;\r\n\r\ncore_defaults._set('global', {\r\n\telements: {\r\n\t\tline: {\r\n\t\t\ttension: 0.4,\r\n\t\t\tbackgroundColor: defaultColor,\r\n\t\t\tborderWidth: 3,\r\n\t\t\tborderColor: defaultColor,\r\n\t\t\tborderCapStyle: 'butt',\r\n\t\t\tborderDash: [],\r\n\t\t\tborderDashOffset: 0.0,\r\n\t\t\tborderJoinStyle: 'miter',\r\n\t\t\tcapBezierPoints: true,\r\n\t\t\tfill: true, // do we fill in the area between the line and its base axis\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar element_line = core_element.extend({\r\n\t_type: 'line',\r\n\r\n\tdraw: function() {\r\n\t\tvar me = this;\r\n\t\tvar vm = me._view;\r\n\t\tvar ctx = me._chart.ctx;\r\n\t\tvar spanGaps = vm.spanGaps;\r\n\t\tvar points = me._children.slice(); // clone array\r\n\t\tvar globalDefaults = core_defaults.global;\r\n\t\tvar globalOptionLineElements = globalDefaults.elements.line;\r\n\t\tvar lastDrawnIndex = -1;\r\n\t\tvar closePath = me._loop;\r\n\t\tvar index, previous, currentVM;\r\n\r\n\t\tif (!points.length) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (me._loop) {\r\n\t\t\tfor (index = 0; index < points.length; ++index) {\r\n\t\t\t\tprevious = helpers$1.previousItem(points, index);\r\n\t\t\t\t// If the line has an open path, shift the point array\r\n\t\t\t\tif (!points[index]._view.skip && previous._view.skip) {\r\n\t\t\t\t\tpoints = points.slice(index).concat(points.slice(0, index));\r\n\t\t\t\t\tclosePath = spanGaps;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// If the line has a close path, add the first point again\r\n\t\t\tif (closePath) {\r\n\t\t\t\tpoints.push(points[0]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tctx.save();\r\n\r\n\t\t// Stroke Line Options\r\n\t\tctx.lineCap = vm.borderCapStyle || globalOptionLineElements.borderCapStyle;\r\n\r\n\t\t// IE 9 and 10 do not support line dash\r\n\t\tif (ctx.setLineDash) {\r\n\t\t\tctx.setLineDash(vm.borderDash || globalOptionLineElements.borderDash);\r\n\t\t}\r\n\r\n\t\tctx.lineDashOffset = valueOrDefault$1(vm.borderDashOffset, globalOptionLineElements.borderDashOffset);\r\n\t\tctx.lineJoin = vm.borderJoinStyle || globalOptionLineElements.borderJoinStyle;\r\n\t\tctx.lineWidth = valueOrDefault$1(vm.borderWidth, globalOptionLineElements.borderWidth);\r\n\t\tctx.strokeStyle = vm.borderColor || globalDefaults.defaultColor;\r\n\r\n\t\t// Stroke Line\r\n\t\tctx.beginPath();\r\n\r\n\t\t// First point moves to it's starting position no matter what\r\n\t\tcurrentVM = points[0]._view;\r\n\t\tif (!currentVM.skip) {\r\n\t\t\tctx.moveTo(currentVM.x, currentVM.y);\r\n\t\t\tlastDrawnIndex = 0;\r\n\t\t}\r\n\r\n\t\tfor (index = 1; index < points.length; ++index) {\r\n\t\t\tcurrentVM = points[index]._view;\r\n\t\t\tprevious = lastDrawnIndex === -1 ? helpers$1.previousItem(points, index) : points[lastDrawnIndex];\r\n\r\n\t\t\tif (!currentVM.skip) {\r\n\t\t\t\tif ((lastDrawnIndex !== (index - 1) && !spanGaps) || lastDrawnIndex === -1) {\r\n\t\t\t\t\t// There was a gap and this is the first point after the gap\r\n\t\t\t\t\tctx.moveTo(currentVM.x, currentVM.y);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Line to next point\r\n\t\t\t\t\thelpers$1.canvas.lineTo(ctx, previous._view, currentVM);\r\n\t\t\t\t}\r\n\t\t\t\tlastDrawnIndex = index;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (closePath) {\r\n\t\t\tctx.closePath();\r\n\t\t}\r\n\r\n\t\tctx.stroke();\r\n\t\tctx.restore();\r\n\t}\r\n});\n\nvar valueOrDefault$2 = helpers$1.valueOrDefault;\r\n\r\nvar defaultColor$1 = core_defaults.global.defaultColor;\r\n\r\ncore_defaults._set('global', {\r\n\telements: {\r\n\t\tpoint: {\r\n\t\t\tradius: 3,\r\n\t\t\tpointStyle: 'circle',\r\n\t\t\tbackgroundColor: defaultColor$1,\r\n\t\t\tborderColor: defaultColor$1,\r\n\t\t\tborderWidth: 1,\r\n\t\t\t// Hover\r\n\t\t\thitRadius: 1,\r\n\t\t\thoverRadius: 4,\r\n\t\t\thoverBorderWidth: 1\r\n\t\t}\r\n\t}\r\n});\r\n\r\nfunction xRange(mouseX) {\r\n\tvar vm = this._view;\r\n\treturn vm ? (Math.abs(mouseX - vm.x) < vm.radius + vm.hitRadius) : false;\r\n}\r\n\r\nfunction yRange(mouseY) {\r\n\tvar vm = this._view;\r\n\treturn vm ? (Math.abs(mouseY - vm.y) < vm.radius + vm.hitRadius) : false;\r\n}\r\n\r\nvar element_point = core_element.extend({\r\n\t_type: 'point',\r\n\r\n\tinRange: function(mouseX, mouseY) {\r\n\t\tvar vm = this._view;\r\n\t\treturn vm ? ((Math.pow(mouseX - vm.x, 2) + Math.pow(mouseY - vm.y, 2)) < Math.pow(vm.hitRadius + vm.radius, 2)) : false;\r\n\t},\r\n\r\n\tinLabelRange: xRange,\r\n\tinXRange: xRange,\r\n\tinYRange: yRange,\r\n\r\n\tgetCenterPoint: function() {\r\n\t\tvar vm = this._view;\r\n\t\treturn {\r\n\t\t\tx: vm.x,\r\n\t\t\ty: vm.y\r\n\t\t};\r\n\t},\r\n\r\n\tgetArea: function() {\r\n\t\treturn Math.PI * Math.pow(this._view.radius, 2);\r\n\t},\r\n\r\n\ttooltipPosition: function() {\r\n\t\tvar vm = this._view;\r\n\t\treturn {\r\n\t\t\tx: vm.x,\r\n\t\t\ty: vm.y,\r\n\t\t\tpadding: vm.radius + vm.borderWidth\r\n\t\t};\r\n\t},\r\n\r\n\tdraw: function(chartArea) {\r\n\t\tvar vm = this._view;\r\n\t\tvar ctx = this._chart.ctx;\r\n\t\tvar pointStyle = vm.pointStyle;\r\n\t\tvar rotation = vm.rotation;\r\n\t\tvar radius = vm.radius;\r\n\t\tvar x = vm.x;\r\n\t\tvar y = vm.y;\r\n\t\tvar globalDefaults = core_defaults.global;\r\n\t\tvar defaultColor = globalDefaults.defaultColor; // eslint-disable-line no-shadow\r\n\r\n\t\tif (vm.skip) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Clipping for Points.\r\n\t\tif (chartArea === undefined || helpers$1.canvas._isPointInArea(vm, chartArea)) {\r\n\t\t\tctx.strokeStyle = vm.borderColor || defaultColor;\r\n\t\t\tctx.lineWidth = valueOrDefault$2(vm.borderWidth, globalDefaults.elements.point.borderWidth);\r\n\t\t\tctx.fillStyle = vm.backgroundColor || defaultColor;\r\n\t\t\thelpers$1.canvas.drawPoint(ctx, pointStyle, radius, x, y, rotation);\r\n\t\t}\r\n\t}\r\n});\n\nvar defaultColor$2 = core_defaults.global.defaultColor;\r\n\r\ncore_defaults._set('global', {\r\n\telements: {\r\n\t\trectangle: {\r\n\t\t\tbackgroundColor: defaultColor$2,\r\n\t\t\tborderColor: defaultColor$2,\r\n\t\t\tborderSkipped: 'bottom',\r\n\t\t\tborderWidth: 0\r\n\t\t}\r\n\t}\r\n});\r\n\r\nfunction isVertical(vm) {\r\n\treturn vm && vm.width !== undefined;\r\n}\r\n\r\n/**\r\n * Helper function to get the bounds of the bar regardless of the orientation\r\n * @param bar {Chart.Element.Rectangle} the bar\r\n * @return {Bounds} bounds of the bar\r\n * @private\r\n */\r\nfunction getBarBounds(vm) {\r\n\tvar x1, x2, y1, y2, half;\r\n\r\n\tif (isVertical(vm)) {\r\n\t\thalf = vm.width / 2;\r\n\t\tx1 = vm.x - half;\r\n\t\tx2 = vm.x + half;\r\n\t\ty1 = Math.min(vm.y, vm.base);\r\n\t\ty2 = Math.max(vm.y, vm.base);\r\n\t} else {\r\n\t\thalf = vm.height / 2;\r\n\t\tx1 = Math.min(vm.x, vm.base);\r\n\t\tx2 = Math.max(vm.x, vm.base);\r\n\t\ty1 = vm.y - half;\r\n\t\ty2 = vm.y + half;\r\n\t}\r\n\r\n\treturn {\r\n\t\tleft: x1,\r\n\t\ttop: y1,\r\n\t\tright: x2,\r\n\t\tbottom: y2\r\n\t};\r\n}\r\n\r\nfunction swap(orig, v1, v2) {\r\n\treturn orig === v1 ? v2 : orig === v2 ? v1 : orig;\r\n}\r\n\r\nfunction parseBorderSkipped(vm) {\r\n\tvar edge = vm.borderSkipped;\r\n\tvar res = {};\r\n\r\n\tif (!edge) {\r\n\t\treturn res;\r\n\t}\r\n\r\n\tif (vm.horizontal) {\r\n\t\tif (vm.base > vm.x) {\r\n\t\t\tedge = swap(edge, 'left', 'right');\r\n\t\t}\r\n\t} else if (vm.base < vm.y) {\r\n\t\tedge = swap(edge, 'bottom', 'top');\r\n\t}\r\n\r\n\tres[edge] = true;\r\n\treturn res;\r\n}\r\n\r\nfunction parseBorderWidth(vm, maxW, maxH) {\r\n\tvar value = vm.borderWidth;\r\n\tvar skip = parseBorderSkipped(vm);\r\n\tvar t, r, b, l;\r\n\r\n\tif (helpers$1.isObject(value)) {\r\n\t\tt = +value.top || 0;\r\n\t\tr = +value.right || 0;\r\n\t\tb = +value.bottom || 0;\r\n\t\tl = +value.left || 0;\r\n\t} else {\r\n\t\tt = r = b = l = +value || 0;\r\n\t}\r\n\r\n\treturn {\r\n\t\tt: skip.top || (t < 0) ? 0 : t > maxH ? maxH : t,\r\n\t\tr: skip.right || (r < 0) ? 0 : r > maxW ? maxW : r,\r\n\t\tb: skip.bottom || (b < 0) ? 0 : b > maxH ? maxH : b,\r\n\t\tl: skip.left || (l < 0) ? 0 : l > maxW ? maxW : l\r\n\t};\r\n}\r\n\r\nfunction boundingRects(vm) {\r\n\tvar bounds = getBarBounds(vm);\r\n\tvar width = bounds.right - bounds.left;\r\n\tvar height = bounds.bottom - bounds.top;\r\n\tvar border = parseBorderWidth(vm, width / 2, height / 2);\r\n\r\n\treturn {\r\n\t\touter: {\r\n\t\t\tx: bounds.left,\r\n\t\t\ty: bounds.top,\r\n\t\t\tw: width,\r\n\t\t\th: height\r\n\t\t},\r\n\t\tinner: {\r\n\t\t\tx: bounds.left + border.l,\r\n\t\t\ty: bounds.top + border.t,\r\n\t\t\tw: width - border.l - border.r,\r\n\t\t\th: height - border.t - border.b\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction inRange(vm, x, y) {\r\n\tvar skipX = x === null;\r\n\tvar skipY = y === null;\r\n\tvar bounds = !vm || (skipX && skipY) ? false : getBarBounds(vm);\r\n\r\n\treturn bounds\r\n\t\t&& (skipX || x >= bounds.left && x <= bounds.right)\r\n\t\t&& (skipY || y >= bounds.top && y <= bounds.bottom);\r\n}\r\n\r\nvar element_rectangle = core_element.extend({\r\n\t_type: 'rectangle',\r\n\r\n\tdraw: function() {\r\n\t\tvar ctx = this._chart.ctx;\r\n\t\tvar vm = this._view;\r\n\t\tvar rects = boundingRects(vm);\r\n\t\tvar outer = rects.outer;\r\n\t\tvar inner = rects.inner;\r\n\r\n\t\tctx.fillStyle = vm.backgroundColor;\r\n\t\tctx.fillRect(outer.x, outer.y, outer.w, outer.h);\r\n\r\n\t\tif (outer.w === inner.w && outer.h === inner.h) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tctx.save();\r\n\t\tctx.beginPath();\r\n\t\tctx.rect(outer.x, outer.y, outer.w, outer.h);\r\n\t\tctx.clip();\r\n\t\tctx.fillStyle = vm.borderColor;\r\n\t\tctx.rect(inner.x, inner.y, inner.w, inner.h);\r\n\t\tctx.fill('evenodd');\r\n\t\tctx.restore();\r\n\t},\r\n\r\n\theight: function() {\r\n\t\tvar vm = this._view;\r\n\t\treturn vm.base - vm.y;\r\n\t},\r\n\r\n\tinRange: function(mouseX, mouseY) {\r\n\t\treturn inRange(this._view, mouseX, mouseY);\r\n\t},\r\n\r\n\tinLabelRange: function(mouseX, mouseY) {\r\n\t\tvar vm = this._view;\r\n\t\treturn isVertical(vm)\r\n\t\t\t? inRange(vm, mouseX, null)\r\n\t\t\t: inRange(vm, null, mouseY);\r\n\t},\r\n\r\n\tinXRange: function(mouseX) {\r\n\t\treturn inRange(this._view, mouseX, null);\r\n\t},\r\n\r\n\tinYRange: function(mouseY) {\r\n\t\treturn inRange(this._view, null, mouseY);\r\n\t},\r\n\r\n\tgetCenterPoint: function() {\r\n\t\tvar vm = this._view;\r\n\t\tvar x, y;\r\n\t\tif (isVertical(vm)) {\r\n\t\t\tx = vm.x;\r\n\t\t\ty = (vm.y + vm.base) / 2;\r\n\t\t} else {\r\n\t\t\tx = (vm.x + vm.base) / 2;\r\n\t\t\ty = vm.y;\r\n\t\t}\r\n\r\n\t\treturn {x: x, y: y};\r\n\t},\r\n\r\n\tgetArea: function() {\r\n\t\tvar vm = this._view;\r\n\r\n\t\treturn isVertical(vm)\r\n\t\t\t? vm.width * Math.abs(vm.y - vm.base)\r\n\t\t\t: vm.height * Math.abs(vm.x - vm.base);\r\n\t},\r\n\r\n\ttooltipPosition: function() {\r\n\t\tvar vm = this._view;\r\n\t\treturn {\r\n\t\t\tx: vm.x,\r\n\t\t\ty: vm.y\r\n\t\t};\r\n\t}\r\n});\n\nvar elements = {};\r\nvar Arc = element_arc;\r\nvar Line = element_line;\r\nvar Point = element_point;\r\nvar Rectangle = element_rectangle;\nelements.Arc = Arc;\nelements.Line = Line;\nelements.Point = Point;\nelements.Rectangle = Rectangle;\n\nvar deprecated = helpers$1._deprecated;\r\nvar valueOrDefault$3 = helpers$1.valueOrDefault;\r\n\r\ncore_defaults._set('bar', {\r\n\thover: {\r\n\t\tmode: 'label'\r\n\t},\r\n\r\n\tscales: {\r\n\t\txAxes: [{\r\n\t\t\ttype: 'category',\r\n\t\t\toffset: true,\r\n\t\t\tgridLines: {\r\n\t\t\t\toffsetGridLines: true\r\n\t\t\t}\r\n\t\t}],\r\n\r\n\t\tyAxes: [{\r\n\t\t\ttype: 'linear'\r\n\t\t}]\r\n\t}\r\n});\r\n\r\ncore_defaults._set('global', {\r\n\tdatasets: {\r\n\t\tbar: {\r\n\t\t\tcategoryPercentage: 0.8,\r\n\t\t\tbarPercentage: 0.9\r\n\t\t}\r\n\t}\r\n});\r\n\r\n/**\r\n * Computes the \"optimal\" sample size to maintain bars equally sized while preventing overlap.\r\n * @private\r\n */\r\nfunction computeMinSampleSize(scale, pixels) {\r\n\tvar min = scale._length;\r\n\tvar prev, curr, i, ilen;\r\n\r\n\tfor (i = 1, ilen = pixels.length; i < ilen; ++i) {\r\n\t\tmin = Math.min(min, Math.abs(pixels[i] - pixels[i - 1]));\r\n\t}\r\n\r\n\tfor (i = 0, ilen = scale.getTicks().length; i < ilen; ++i) {\r\n\t\tcurr = scale.getPixelForTick(i);\r\n\t\tmin = i > 0 ? Math.min(min, Math.abs(curr - prev)) : min;\r\n\t\tprev = curr;\r\n\t}\r\n\r\n\treturn min;\r\n}\r\n\r\n/**\r\n * Computes an \"ideal\" category based on the absolute bar thickness or, if undefined or null,\r\n * uses the smallest interval (see computeMinSampleSize) that prevents bar overlapping. This\r\n * mode currently always generates bars equally sized (until we introduce scriptable options?).\r\n * @private\r\n */\r\nfunction computeFitCategoryTraits(index, ruler, options) {\r\n\tvar thickness = options.barThickness;\r\n\tvar count = ruler.stackCount;\r\n\tvar curr = ruler.pixels[index];\r\n\tvar min = helpers$1.isNullOrUndef(thickness)\r\n\t\t? computeMinSampleSize(ruler.scale, ruler.pixels)\r\n\t\t: -1;\r\n\tvar size, ratio;\r\n\r\n\tif (helpers$1.isNullOrUndef(thickness)) {\r\n\t\tsize = min * options.categoryPercentage;\r\n\t\tratio = options.barPercentage;\r\n\t} else {\r\n\t\t// When bar thickness is enforced, category and bar percentages are ignored.\r\n\t\t// Note(SB): we could add support for relative bar thickness (e.g. barThickness: '50%')\r\n\t\t// and deprecate barPercentage since this value is ignored when thickness is absolute.\r\n\t\tsize = thickness * count;\r\n\t\tratio = 1;\r\n\t}\r\n\r\n\treturn {\r\n\t\tchunk: size / count,\r\n\t\tratio: ratio,\r\n\t\tstart: curr - (size / 2)\r\n\t};\r\n}\r\n\r\n/**\r\n * Computes an \"optimal\" category that globally arranges bars side by side (no gap when\r\n * percentage options are 1), based on the previous and following categories. This mode\r\n * generates bars with different widths when data are not evenly spaced.\r\n * @private\r\n */\r\nfunction computeFlexCategoryTraits(index, ruler, options) {\r\n\tvar pixels = ruler.pixels;\r\n\tvar curr = pixels[index];\r\n\tvar prev = index > 0 ? pixels[index - 1] : null;\r\n\tvar next = index < pixels.length - 1 ? pixels[index + 1] : null;\r\n\tvar percent = options.categoryPercentage;\r\n\tvar start, size;\r\n\r\n\tif (prev === null) {\r\n\t\t// first data: its size is double based on the next point or,\r\n\t\t// if it's also the last data, we use the scale size.\r\n\t\tprev = curr - (next === null ? ruler.end - ruler.start : next - curr);\r\n\t}\r\n\r\n\tif (next === null) {\r\n\t\t// last data: its size is also double based on the previous point.\r\n\t\tnext = curr + curr - prev;\r\n\t}\r\n\r\n\tstart = curr - (curr - Math.min(prev, next)) / 2 * percent;\r\n\tsize = Math.abs(next - prev) / 2 * percent;\r\n\r\n\treturn {\r\n\t\tchunk: size / ruler.stackCount,\r\n\t\tratio: options.barPercentage,\r\n\t\tstart: start\r\n\t};\r\n}\r\n\r\nvar controller_bar = core_datasetController.extend({\r\n\r\n\tdataElementType: elements.Rectangle,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderColor',\r\n\t\t'borderSkipped',\r\n\t\t'borderWidth',\r\n\t\t'barPercentage',\r\n\t\t'barThickness',\r\n\t\t'categoryPercentage',\r\n\t\t'maxBarThickness',\r\n\t\t'minBarLength'\r\n\t],\r\n\r\n\tinitialize: function() {\r\n\t\tvar me = this;\r\n\t\tvar meta, scaleOpts;\r\n\r\n\t\tcore_datasetController.prototype.initialize.apply(me, arguments);\r\n\r\n\t\tmeta = me.getMeta();\r\n\t\tmeta.stack = me.getDataset().stack;\r\n\t\tmeta.bar = true;\r\n\r\n\t\tscaleOpts = me._getIndexScale().options;\r\n\t\tdeprecated('bar chart', scaleOpts.barPercentage, 'scales.[x/y]Axes.barPercentage', 'dataset.barPercentage');\r\n\t\tdeprecated('bar chart', scaleOpts.barThickness, 'scales.[x/y]Axes.barThickness', 'dataset.barThickness');\r\n\t\tdeprecated('bar chart', scaleOpts.categoryPercentage, 'scales.[x/y]Axes.categoryPercentage', 'dataset.categoryPercentage');\r\n\t\tdeprecated('bar chart', me._getValueScale().options.minBarLength, 'scales.[x/y]Axes.minBarLength', 'dataset.minBarLength');\r\n\t\tdeprecated('bar chart', scaleOpts.maxBarThickness, 'scales.[x/y]Axes.maxBarThickness', 'dataset.maxBarThickness');\r\n\t},\r\n\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar rects = me.getMeta().data;\r\n\t\tvar i, ilen;\r\n\r\n\t\tme._ruler = me.getRuler();\r\n\r\n\t\tfor (i = 0, ilen = rects.length; i < ilen; ++i) {\r\n\t\t\tme.updateElement(rects[i], i, reset);\r\n\t\t}\r\n\t},\r\n\r\n\tupdateElement: function(rectangle, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar options = me._resolveDataElementOptions(rectangle, index);\r\n\r\n\t\trectangle._xScale = me.getScaleForId(meta.xAxisID);\r\n\t\trectangle._yScale = me.getScaleForId(meta.yAxisID);\r\n\t\trectangle._datasetIndex = me.index;\r\n\t\trectangle._index = index;\r\n\t\trectangle._model = {\r\n\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\tborderColor: options.borderColor,\r\n\t\t\tborderSkipped: options.borderSkipped,\r\n\t\t\tborderWidth: options.borderWidth,\r\n\t\t\tdatasetLabel: dataset.label,\r\n\t\t\tlabel: me.chart.data.labels[index]\r\n\t\t};\r\n\r\n\t\tif (helpers$1.isArray(dataset.data[index])) {\r\n\t\t\trectangle._model.borderSkipped = null;\r\n\t\t}\r\n\r\n\t\tme._updateElementGeometry(rectangle, index, reset, options);\r\n\r\n\t\trectangle.pivot();\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_updateElementGeometry: function(rectangle, index, reset, options) {\r\n\t\tvar me = this;\r\n\t\tvar model = rectangle._model;\r\n\t\tvar vscale = me._getValueScale();\r\n\t\tvar base = vscale.getBasePixel();\r\n\t\tvar horizontal = vscale.isHorizontal();\r\n\t\tvar ruler = me._ruler || me.getRuler();\r\n\t\tvar vpixels = me.calculateBarValuePixels(me.index, index, options);\r\n\t\tvar ipixels = me.calculateBarIndexPixels(me.index, index, ruler, options);\r\n\r\n\t\tmodel.horizontal = horizontal;\r\n\t\tmodel.base = reset ? base : vpixels.base;\r\n\t\tmodel.x = horizontal ? reset ? base : vpixels.head : ipixels.center;\r\n\t\tmodel.y = horizontal ? ipixels.center : reset ? base : vpixels.head;\r\n\t\tmodel.height = horizontal ? ipixels.size : undefined;\r\n\t\tmodel.width = horizontal ? undefined : ipixels.size;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the stacks based on groups and bar visibility.\r\n\t * @param {number} [last] - The dataset index\r\n\t * @returns {string[]} The list of stack IDs\r\n\t * @private\r\n\t */\r\n\t_getStacks: function(last) {\r\n\t\tvar me = this;\r\n\t\tvar scale = me._getIndexScale();\r\n\t\tvar metasets = scale._getMatchingVisibleMetas(me._type);\r\n\t\tvar stacked = scale.options.stacked;\r\n\t\tvar ilen = metasets.length;\r\n\t\tvar stacks = [];\r\n\t\tvar i, meta;\r\n\r\n\t\tfor (i = 0; i < ilen; ++i) {\r\n\t\t\tmeta = metasets[i];\r\n\t\t\t// stacked | meta.stack\r\n\t\t\t// | found | not found | undefined\r\n\t\t\t// false | x | x | x\r\n\t\t\t// true | | x |\r\n\t\t\t// undefined | | x | x\r\n\t\t\tif (stacked === false || stacks.indexOf(meta.stack) === -1 ||\r\n\t\t\t\t(stacked === undefined && meta.stack === undefined)) {\r\n\t\t\t\tstacks.push(meta.stack);\r\n\t\t\t}\r\n\t\t\tif (meta.index === last) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn stacks;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the effective number of stacks based on groups and bar visibility.\r\n\t * @private\r\n\t */\r\n\tgetStackCount: function() {\r\n\t\treturn this._getStacks().length;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the stack index for the given dataset based on groups and bar visibility.\r\n\t * @param {number} [datasetIndex] - The dataset index\r\n\t * @param {string} [name] - The stack name to find\r\n\t * @returns {number} The stack index\r\n\t * @private\r\n\t */\r\n\tgetStackIndex: function(datasetIndex, name) {\r\n\t\tvar stacks = this._getStacks(datasetIndex);\r\n\t\tvar index = (name !== undefined)\r\n\t\t\t? stacks.indexOf(name)\r\n\t\t\t: -1; // indexOf returns -1 if element is not present\r\n\r\n\t\treturn (index === -1)\r\n\t\t\t? stacks.length - 1\r\n\t\t\t: index;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tgetRuler: function() {\r\n\t\tvar me = this;\r\n\t\tvar scale = me._getIndexScale();\r\n\t\tvar pixels = [];\r\n\t\tvar i, ilen;\r\n\r\n\t\tfor (i = 0, ilen = me.getMeta().data.length; i < ilen; ++i) {\r\n\t\t\tpixels.push(scale.getPixelForValue(null, i, me.index));\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tpixels: pixels,\r\n\t\t\tstart: scale._startPixel,\r\n\t\t\tend: scale._endPixel,\r\n\t\t\tstackCount: me.getStackCount(),\r\n\t\t\tscale: scale\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * Note: pixel values are not clamped to the scale area.\r\n\t * @private\r\n\t */\r\n\tcalculateBarValuePixels: function(datasetIndex, index, options) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar scale = me._getValueScale();\r\n\t\tvar isHorizontal = scale.isHorizontal();\r\n\t\tvar datasets = chart.data.datasets;\r\n\t\tvar metasets = scale._getMatchingVisibleMetas(me._type);\r\n\t\tvar value = scale._parseValue(datasets[datasetIndex].data[index]);\r\n\t\tvar minBarLength = options.minBarLength;\r\n\t\tvar stacked = scale.options.stacked;\r\n\t\tvar stack = me.getMeta().stack;\r\n\t\tvar start = value.start === undefined ? 0 : value.max >= 0 && value.min >= 0 ? value.min : value.max;\r\n\t\tvar length = value.start === undefined ? value.end : value.max >= 0 && value.min >= 0 ? value.max - value.min : value.min - value.max;\r\n\t\tvar ilen = metasets.length;\r\n\t\tvar i, imeta, ivalue, base, head, size, stackLength;\r\n\r\n\t\tif (stacked || (stacked === undefined && stack !== undefined)) {\r\n\t\t\tfor (i = 0; i < ilen; ++i) {\r\n\t\t\t\timeta = metasets[i];\r\n\r\n\t\t\t\tif (imeta.index === datasetIndex) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (imeta.stack === stack) {\r\n\t\t\t\t\tstackLength = scale._parseValue(datasets[imeta.index].data[index]);\r\n\t\t\t\t\tivalue = stackLength.start === undefined ? stackLength.end : stackLength.min >= 0 && stackLength.max >= 0 ? stackLength.max : stackLength.min;\r\n\r\n\t\t\t\t\tif ((value.min < 0 && ivalue < 0) || (value.max >= 0 && ivalue > 0)) {\r\n\t\t\t\t\t\tstart += ivalue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tbase = scale.getPixelForValue(start);\r\n\t\thead = scale.getPixelForValue(start + length);\r\n\t\tsize = head - base;\r\n\r\n\t\tif (minBarLength !== undefined && Math.abs(size) < minBarLength) {\r\n\t\t\tsize = minBarLength;\r\n\t\t\tif (length >= 0 && !isHorizontal || length < 0 && isHorizontal) {\r\n\t\t\t\thead = base - minBarLength;\r\n\t\t\t} else {\r\n\t\t\t\thead = base + minBarLength;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tsize: size,\r\n\t\t\tbase: base,\r\n\t\t\thead: head,\r\n\t\t\tcenter: head + size / 2\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tcalculateBarIndexPixels: function(datasetIndex, index, ruler, options) {\r\n\t\tvar me = this;\r\n\t\tvar range = options.barThickness === 'flex'\r\n\t\t\t? computeFlexCategoryTraits(index, ruler, options)\r\n\t\t\t: computeFitCategoryTraits(index, ruler, options);\r\n\r\n\t\tvar stackIndex = me.getStackIndex(datasetIndex, me.getMeta().stack);\r\n\t\tvar center = range.start + (range.chunk * stackIndex) + (range.chunk / 2);\r\n\t\tvar size = Math.min(\r\n\t\t\tvalueOrDefault$3(options.maxBarThickness, Infinity),\r\n\t\t\trange.chunk * range.ratio);\r\n\r\n\t\treturn {\r\n\t\t\tbase: center - size / 2,\r\n\t\t\thead: center + size / 2,\r\n\t\t\tcenter: center,\r\n\t\t\tsize: size\r\n\t\t};\r\n\t},\r\n\r\n\tdraw: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar scale = me._getValueScale();\r\n\t\tvar rects = me.getMeta().data;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar ilen = rects.length;\r\n\t\tvar i = 0;\r\n\r\n\t\thelpers$1.canvas.clipArea(chart.ctx, chart.chartArea);\r\n\r\n\t\tfor (; i < ilen; ++i) {\r\n\t\t\tvar val = scale._parseValue(dataset.data[i]);\r\n\t\t\tif (!isNaN(val.min) && !isNaN(val.max)) {\r\n\t\t\t\trects[i].draw();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\thelpers$1.canvas.unclipArea(chart.ctx);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDataElementOptions: function() {\r\n\t\tvar me = this;\r\n\t\tvar values = helpers$1.extend({}, core_datasetController.prototype._resolveDataElementOptions.apply(me, arguments));\r\n\t\tvar indexOpts = me._getIndexScale().options;\r\n\t\tvar valueOpts = me._getValueScale().options;\r\n\r\n\t\tvalues.barPercentage = valueOrDefault$3(indexOpts.barPercentage, values.barPercentage);\r\n\t\tvalues.barThickness = valueOrDefault$3(indexOpts.barThickness, values.barThickness);\r\n\t\tvalues.categoryPercentage = valueOrDefault$3(indexOpts.categoryPercentage, values.categoryPercentage);\r\n\t\tvalues.maxBarThickness = valueOrDefault$3(indexOpts.maxBarThickness, values.maxBarThickness);\r\n\t\tvalues.minBarLength = valueOrDefault$3(valueOpts.minBarLength, values.minBarLength);\r\n\r\n\t\treturn values;\r\n\t}\r\n\r\n});\n\nvar valueOrDefault$4 = helpers$1.valueOrDefault;\r\nvar resolve$1 = helpers$1.options.resolve;\r\n\r\ncore_defaults._set('bubble', {\r\n\thover: {\r\n\t\tmode: 'single'\r\n\t},\r\n\r\n\tscales: {\r\n\t\txAxes: [{\r\n\t\t\ttype: 'linear', // bubble should probably use a linear scale by default\r\n\t\t\tposition: 'bottom',\r\n\t\t\tid: 'x-axis-0' // need an ID so datasets can reference the scale\r\n\t\t}],\r\n\t\tyAxes: [{\r\n\t\t\ttype: 'linear',\r\n\t\t\tposition: 'left',\r\n\t\t\tid: 'y-axis-0'\r\n\t\t}]\r\n\t},\r\n\r\n\ttooltips: {\r\n\t\tcallbacks: {\r\n\t\t\ttitle: function() {\r\n\t\t\t\t// Title doesn't make sense for scatter since we format the data as a point\r\n\t\t\t\treturn '';\r\n\t\t\t},\r\n\t\t\tlabel: function(item, data) {\r\n\t\t\t\tvar datasetLabel = data.datasets[item.datasetIndex].label || '';\r\n\t\t\t\tvar dataPoint = data.datasets[item.datasetIndex].data[item.index];\r\n\t\t\t\treturn datasetLabel + ': (' + item.xLabel + ', ' + item.yLabel + ', ' + dataPoint.r + ')';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar controller_bubble = core_datasetController.extend({\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tdataElementType: elements.Point,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderColor',\r\n\t\t'borderWidth',\r\n\t\t'hoverBackgroundColor',\r\n\t\t'hoverBorderColor',\r\n\t\t'hoverBorderWidth',\r\n\t\t'hoverRadius',\r\n\t\t'hitRadius',\r\n\t\t'pointStyle',\r\n\t\t'rotation'\r\n\t],\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar points = meta.data;\r\n\r\n\t\t// Update Points\r\n\t\thelpers$1.each(points, function(point, index) {\r\n\t\t\tme.updateElement(point, index, reset);\r\n\t\t});\r\n\t},\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tupdateElement: function(point, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar custom = point.custom || {};\r\n\t\tvar xScale = me.getScaleForId(meta.xAxisID);\r\n\t\tvar yScale = me.getScaleForId(meta.yAxisID);\r\n\t\tvar options = me._resolveDataElementOptions(point, index);\r\n\t\tvar data = me.getDataset().data[index];\r\n\t\tvar dsIndex = me.index;\r\n\r\n\t\tvar x = reset ? xScale.getPixelForDecimal(0.5) : xScale.getPixelForValue(typeof data === 'object' ? data : NaN, index, dsIndex);\r\n\t\tvar y = reset ? yScale.getBasePixel() : yScale.getPixelForValue(data, index, dsIndex);\r\n\r\n\t\tpoint._xScale = xScale;\r\n\t\tpoint._yScale = yScale;\r\n\t\tpoint._options = options;\r\n\t\tpoint._datasetIndex = dsIndex;\r\n\t\tpoint._index = index;\r\n\t\tpoint._model = {\r\n\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\tborderColor: options.borderColor,\r\n\t\t\tborderWidth: options.borderWidth,\r\n\t\t\thitRadius: options.hitRadius,\r\n\t\t\tpointStyle: options.pointStyle,\r\n\t\t\trotation: options.rotation,\r\n\t\t\tradius: reset ? 0 : options.radius,\r\n\t\t\tskip: custom.skip || isNaN(x) || isNaN(y),\r\n\t\t\tx: x,\r\n\t\t\ty: y,\r\n\t\t};\r\n\r\n\t\tpoint.pivot();\r\n\t},\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tsetHoverStyle: function(point) {\r\n\t\tvar model = point._model;\r\n\t\tvar options = point._options;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\r\n\t\tpoint.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth,\r\n\t\t\tradius: model.radius\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = valueOrDefault$4(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\r\n\t\tmodel.borderColor = valueOrDefault$4(options.hoverBorderColor, getHoverColor(options.borderColor));\r\n\t\tmodel.borderWidth = valueOrDefault$4(options.hoverBorderWidth, options.borderWidth);\r\n\t\tmodel.radius = options.radius + options.hoverRadius;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDataElementOptions: function(point, index) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar custom = point.custom || {};\r\n\t\tvar data = dataset.data[index] || {};\r\n\t\tvar values = core_datasetController.prototype._resolveDataElementOptions.apply(me, arguments);\r\n\r\n\t\t// Scriptable options\r\n\t\tvar context = {\r\n\t\t\tchart: chart,\r\n\t\t\tdataIndex: index,\r\n\t\t\tdataset: dataset,\r\n\t\t\tdatasetIndex: me.index\r\n\t\t};\r\n\r\n\t\t// In case values were cached (and thus frozen), we need to clone the values\r\n\t\tif (me._cachedDataOpts === values) {\r\n\t\t\tvalues = helpers$1.extend({}, values);\r\n\t\t}\r\n\r\n\t\t// Custom radius resolution\r\n\t\tvalues.radius = resolve$1([\r\n\t\t\tcustom.radius,\r\n\t\t\tdata.r,\r\n\t\t\tme._config.radius,\r\n\t\t\tchart.options.elements.point.radius\r\n\t\t], context, index);\r\n\r\n\t\treturn values;\r\n\t}\r\n});\n\nvar valueOrDefault$5 = helpers$1.valueOrDefault;\r\n\r\nvar PI$1 = Math.PI;\r\nvar DOUBLE_PI$1 = PI$1 * 2;\r\nvar HALF_PI$1 = PI$1 / 2;\r\n\r\ncore_defaults._set('doughnut', {\r\n\tanimation: {\r\n\t\t// Boolean - Whether we animate the rotation of the Doughnut\r\n\t\tanimateRotate: true,\r\n\t\t// Boolean - Whether we animate scaling the Doughnut from the centre\r\n\t\tanimateScale: false\r\n\t},\r\n\thover: {\r\n\t\tmode: 'single'\r\n\t},\r\n\tlegendCallback: function(chart) {\r\n\t\tvar list = document.createElement('ul');\r\n\t\tvar data = chart.data;\r\n\t\tvar datasets = data.datasets;\r\n\t\tvar labels = data.labels;\r\n\t\tvar i, ilen, listItem, listItemSpan;\r\n\r\n\t\tlist.setAttribute('class', chart.id + '-legend');\r\n\t\tif (datasets.length) {\r\n\t\t\tfor (i = 0, ilen = datasets[0].data.length; i < ilen; ++i) {\r\n\t\t\t\tlistItem = list.appendChild(document.createElement('li'));\r\n\t\t\t\tlistItemSpan = listItem.appendChild(document.createElement('span'));\r\n\t\t\t\tlistItemSpan.style.backgroundColor = datasets[0].backgroundColor[i];\r\n\t\t\t\tif (labels[i]) {\r\n\t\t\t\t\tlistItem.appendChild(document.createTextNode(labels[i]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn list.outerHTML;\r\n\t},\r\n\tlegend: {\r\n\t\tlabels: {\r\n\t\t\tgenerateLabels: function(chart) {\r\n\t\t\t\tvar data = chart.data;\r\n\t\t\t\tif (data.labels.length && data.datasets.length) {\r\n\t\t\t\t\treturn data.labels.map(function(label, i) {\r\n\t\t\t\t\t\tvar meta = chart.getDatasetMeta(0);\r\n\t\t\t\t\t\tvar style = meta.controller.getStyle(i);\r\n\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\ttext: label,\r\n\t\t\t\t\t\t\tfillStyle: style.backgroundColor,\r\n\t\t\t\t\t\t\tstrokeStyle: style.borderColor,\r\n\t\t\t\t\t\t\tlineWidth: style.borderWidth,\r\n\t\t\t\t\t\t\thidden: isNaN(data.datasets[0].data[i]) || meta.data[i].hidden,\r\n\r\n\t\t\t\t\t\t\t// Extra data used for toggling the correct item\r\n\t\t\t\t\t\t\tindex: i\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn [];\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tonClick: function(e, legendItem) {\r\n\t\t\tvar index = legendItem.index;\r\n\t\t\tvar chart = this.chart;\r\n\t\t\tvar i, ilen, meta;\r\n\r\n\t\t\tfor (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {\r\n\t\t\t\tmeta = chart.getDatasetMeta(i);\r\n\t\t\t\t// toggle visibility of index if exists\r\n\t\t\t\tif (meta.data[index]) {\r\n\t\t\t\t\tmeta.data[index].hidden = !meta.data[index].hidden;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tchart.update();\r\n\t\t}\r\n\t},\r\n\r\n\t// The percentage of the chart that we cut out of the middle.\r\n\tcutoutPercentage: 50,\r\n\r\n\t// The rotation of the chart, where the first data arc begins.\r\n\trotation: -HALF_PI$1,\r\n\r\n\t// The total circumference of the chart.\r\n\tcircumference: DOUBLE_PI$1,\r\n\r\n\t// Need to override these to give a nice default\r\n\ttooltips: {\r\n\t\tcallbacks: {\r\n\t\t\ttitle: function() {\r\n\t\t\t\treturn '';\r\n\t\t\t},\r\n\t\t\tlabel: function(tooltipItem, data) {\r\n\t\t\t\tvar dataLabel = data.labels[tooltipItem.index];\r\n\t\t\t\tvar value = ': ' + data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];\r\n\r\n\t\t\t\tif (helpers$1.isArray(dataLabel)) {\r\n\t\t\t\t\t// show value on first line of multiline label\r\n\t\t\t\t\t// need to clone because we are changing the value\r\n\t\t\t\t\tdataLabel = dataLabel.slice();\r\n\t\t\t\t\tdataLabel[0] += value;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdataLabel += value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn dataLabel;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar controller_doughnut = core_datasetController.extend({\r\n\r\n\tdataElementType: elements.Arc,\r\n\r\n\tlinkScales: helpers$1.noop,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderColor',\r\n\t\t'borderWidth',\r\n\t\t'borderAlign',\r\n\t\t'hoverBackgroundColor',\r\n\t\t'hoverBorderColor',\r\n\t\t'hoverBorderWidth',\r\n\t],\r\n\r\n\t// Get index of the dataset in relation to the visible datasets. This allows determining the inner and outer radius correctly\r\n\tgetRingIndex: function(datasetIndex) {\r\n\t\tvar ringIndex = 0;\r\n\r\n\t\tfor (var j = 0; j < datasetIndex; ++j) {\r\n\t\t\tif (this.chart.isDatasetVisible(j)) {\r\n\t\t\t\t++ringIndex;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ringIndex;\r\n\t},\r\n\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar chartArea = chart.chartArea;\r\n\t\tvar opts = chart.options;\r\n\t\tvar ratioX = 1;\r\n\t\tvar ratioY = 1;\r\n\t\tvar offsetX = 0;\r\n\t\tvar offsetY = 0;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar arcs = meta.data;\r\n\t\tvar cutout = opts.cutoutPercentage / 100 || 0;\r\n\t\tvar circumference = opts.circumference;\r\n\t\tvar chartWeight = me._getRingWeight(me.index);\r\n\t\tvar maxWidth, maxHeight, i, ilen;\r\n\r\n\t\t// If the chart's circumference isn't a full circle, calculate size as a ratio of the width/height of the arc\r\n\t\tif (circumference < DOUBLE_PI$1) {\r\n\t\t\tvar startAngle = opts.rotation % DOUBLE_PI$1;\r\n\t\t\tstartAngle += startAngle >= PI$1 ? -DOUBLE_PI$1 : startAngle < -PI$1 ? DOUBLE_PI$1 : 0;\r\n\t\t\tvar endAngle = startAngle + circumference;\r\n\t\t\tvar startX = Math.cos(startAngle);\r\n\t\t\tvar startY = Math.sin(startAngle);\r\n\t\t\tvar endX = Math.cos(endAngle);\r\n\t\t\tvar endY = Math.sin(endAngle);\r\n\t\t\tvar contains0 = (startAngle <= 0 && endAngle >= 0) || endAngle >= DOUBLE_PI$1;\r\n\t\t\tvar contains90 = (startAngle <= HALF_PI$1 && endAngle >= HALF_PI$1) || endAngle >= DOUBLE_PI$1 + HALF_PI$1;\r\n\t\t\tvar contains180 = startAngle === -PI$1 || endAngle >= PI$1;\r\n\t\t\tvar contains270 = (startAngle <= -HALF_PI$1 && endAngle >= -HALF_PI$1) || endAngle >= PI$1 + HALF_PI$1;\r\n\t\t\tvar minX = contains180 ? -1 : Math.min(startX, startX * cutout, endX, endX * cutout);\r\n\t\t\tvar minY = contains270 ? -1 : Math.min(startY, startY * cutout, endY, endY * cutout);\r\n\t\t\tvar maxX = contains0 ? 1 : Math.max(startX, startX * cutout, endX, endX * cutout);\r\n\t\t\tvar maxY = contains90 ? 1 : Math.max(startY, startY * cutout, endY, endY * cutout);\r\n\t\t\tratioX = (maxX - minX) / 2;\r\n\t\t\tratioY = (maxY - minY) / 2;\r\n\t\t\toffsetX = -(maxX + minX) / 2;\r\n\t\t\toffsetY = -(maxY + minY) / 2;\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = arcs.length; i < ilen; ++i) {\r\n\t\t\tarcs[i]._options = me._resolveDataElementOptions(arcs[i], i);\r\n\t\t}\r\n\r\n\t\tchart.borderWidth = me.getMaxBorderWidth();\r\n\t\tmaxWidth = (chartArea.right - chartArea.left - chart.borderWidth) / ratioX;\r\n\t\tmaxHeight = (chartArea.bottom - chartArea.top - chart.borderWidth) / ratioY;\r\n\t\tchart.outerRadius = Math.max(Math.min(maxWidth, maxHeight) / 2, 0);\r\n\t\tchart.innerRadius = Math.max(chart.outerRadius * cutout, 0);\r\n\t\tchart.radiusLength = (chart.outerRadius - chart.innerRadius) / (me._getVisibleDatasetWeightTotal() || 1);\r\n\t\tchart.offsetX = offsetX * chart.outerRadius;\r\n\t\tchart.offsetY = offsetY * chart.outerRadius;\r\n\r\n\t\tmeta.total = me.calculateTotal();\r\n\r\n\t\tme.outerRadius = chart.outerRadius - chart.radiusLength * me._getRingWeightOffset(me.index);\r\n\t\tme.innerRadius = Math.max(me.outerRadius - chart.radiusLength * chartWeight, 0);\r\n\r\n\t\tfor (i = 0, ilen = arcs.length; i < ilen; ++i) {\r\n\t\t\tme.updateElement(arcs[i], i, reset);\r\n\t\t}\r\n\t},\r\n\r\n\tupdateElement: function(arc, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar chartArea = chart.chartArea;\r\n\t\tvar opts = chart.options;\r\n\t\tvar animationOpts = opts.animation;\r\n\t\tvar centerX = (chartArea.left + chartArea.right) / 2;\r\n\t\tvar centerY = (chartArea.top + chartArea.bottom) / 2;\r\n\t\tvar startAngle = opts.rotation; // non reset case handled later\r\n\t\tvar endAngle = opts.rotation; // non reset case handled later\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar circumference = reset && animationOpts.animateRotate ? 0 : arc.hidden ? 0 : me.calculateCircumference(dataset.data[index]) * (opts.circumference / DOUBLE_PI$1);\r\n\t\tvar innerRadius = reset && animationOpts.animateScale ? 0 : me.innerRadius;\r\n\t\tvar outerRadius = reset && animationOpts.animateScale ? 0 : me.outerRadius;\r\n\t\tvar options = arc._options || {};\r\n\r\n\t\thelpers$1.extend(arc, {\r\n\t\t\t// Utility\r\n\t\t\t_datasetIndex: me.index,\r\n\t\t\t_index: index,\r\n\r\n\t\t\t// Desired view properties\r\n\t\t\t_model: {\r\n\t\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\t\tborderColor: options.borderColor,\r\n\t\t\t\tborderWidth: options.borderWidth,\r\n\t\t\t\tborderAlign: options.borderAlign,\r\n\t\t\t\tx: centerX + chart.offsetX,\r\n\t\t\t\ty: centerY + chart.offsetY,\r\n\t\t\t\tstartAngle: startAngle,\r\n\t\t\t\tendAngle: endAngle,\r\n\t\t\t\tcircumference: circumference,\r\n\t\t\t\touterRadius: outerRadius,\r\n\t\t\t\tinnerRadius: innerRadius,\r\n\t\t\t\tlabel: helpers$1.valueAtIndexOrDefault(dataset.label, index, chart.data.labels[index])\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tvar model = arc._model;\r\n\r\n\t\t// Set correct angles if not resetting\r\n\t\tif (!reset || !animationOpts.animateRotate) {\r\n\t\t\tif (index === 0) {\r\n\t\t\t\tmodel.startAngle = opts.rotation;\r\n\t\t\t} else {\r\n\t\t\t\tmodel.startAngle = me.getMeta().data[index - 1]._model.endAngle;\r\n\t\t\t}\r\n\r\n\t\t\tmodel.endAngle = model.startAngle + model.circumference;\r\n\t\t}\r\n\r\n\t\tarc.pivot();\r\n\t},\r\n\r\n\tcalculateTotal: function() {\r\n\t\tvar dataset = this.getDataset();\r\n\t\tvar meta = this.getMeta();\r\n\t\tvar total = 0;\r\n\t\tvar value;\r\n\r\n\t\thelpers$1.each(meta.data, function(element, index) {\r\n\t\t\tvalue = dataset.data[index];\r\n\t\t\tif (!isNaN(value) && !element.hidden) {\r\n\t\t\t\ttotal += Math.abs(value);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t/* if (total === 0) {\r\n\t\t\ttotal = NaN;\r\n\t\t}*/\r\n\r\n\t\treturn total;\r\n\t},\r\n\r\n\tcalculateCircumference: function(value) {\r\n\t\tvar total = this.getMeta().total;\r\n\t\tif (total > 0 && !isNaN(value)) {\r\n\t\t\treturn DOUBLE_PI$1 * (Math.abs(value) / total);\r\n\t\t}\r\n\t\treturn 0;\r\n\t},\r\n\r\n\t// gets the max border or hover width to properly scale pie charts\r\n\tgetMaxBorderWidth: function(arcs) {\r\n\t\tvar me = this;\r\n\t\tvar max = 0;\r\n\t\tvar chart = me.chart;\r\n\t\tvar i, ilen, meta, arc, controller, options, borderWidth, hoverWidth;\r\n\r\n\t\tif (!arcs) {\r\n\t\t\t// Find the outmost visible dataset\r\n\t\t\tfor (i = 0, ilen = chart.data.datasets.length; i < ilen; ++i) {\r\n\t\t\t\tif (chart.isDatasetVisible(i)) {\r\n\t\t\t\t\tmeta = chart.getDatasetMeta(i);\r\n\t\t\t\t\tarcs = meta.data;\r\n\t\t\t\t\tif (i !== me.index) {\r\n\t\t\t\t\t\tcontroller = meta.controller;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!arcs) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = arcs.length; i < ilen; ++i) {\r\n\t\t\tarc = arcs[i];\r\n\t\t\tif (controller) {\r\n\t\t\t\tcontroller._configure();\r\n\t\t\t\toptions = controller._resolveDataElementOptions(arc, i);\r\n\t\t\t} else {\r\n\t\t\t\toptions = arc._options;\r\n\t\t\t}\r\n\t\t\tif (options.borderAlign !== 'inner') {\r\n\t\t\t\tborderWidth = options.borderWidth;\r\n\t\t\t\thoverWidth = options.hoverBorderWidth;\r\n\r\n\t\t\t\tmax = borderWidth > max ? borderWidth : max;\r\n\t\t\t\tmax = hoverWidth > max ? hoverWidth : max;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn max;\r\n\t},\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tsetHoverStyle: function(arc) {\r\n\t\tvar model = arc._model;\r\n\t\tvar options = arc._options;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\r\n\t\tarc.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth,\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = valueOrDefault$5(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\r\n\t\tmodel.borderColor = valueOrDefault$5(options.hoverBorderColor, getHoverColor(options.borderColor));\r\n\t\tmodel.borderWidth = valueOrDefault$5(options.hoverBorderWidth, options.borderWidth);\r\n\t},\r\n\r\n\t/**\r\n\t * Get radius length offset of the dataset in relation to the visible datasets weights. This allows determining the inner and outer radius correctly\r\n\t * @private\r\n\t */\r\n\t_getRingWeightOffset: function(datasetIndex) {\r\n\t\tvar ringWeightOffset = 0;\r\n\r\n\t\tfor (var i = 0; i < datasetIndex; ++i) {\r\n\t\t\tif (this.chart.isDatasetVisible(i)) {\r\n\t\t\t\tringWeightOffset += this._getRingWeight(i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ringWeightOffset;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getRingWeight: function(dataSetIndex) {\r\n\t\treturn Math.max(valueOrDefault$5(this.chart.data.datasets[dataSetIndex].weight, 1), 0);\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the sum of all visibile data set weights. This value can be 0.\r\n\t * @private\r\n\t */\r\n\t_getVisibleDatasetWeightTotal: function() {\r\n\t\treturn this._getRingWeightOffset(this.chart.data.datasets.length);\r\n\t}\r\n});\n\ncore_defaults._set('horizontalBar', {\r\n\thover: {\r\n\t\tmode: 'index',\r\n\t\taxis: 'y'\r\n\t},\r\n\r\n\tscales: {\r\n\t\txAxes: [{\r\n\t\t\ttype: 'linear',\r\n\t\t\tposition: 'bottom'\r\n\t\t}],\r\n\r\n\t\tyAxes: [{\r\n\t\t\ttype: 'category',\r\n\t\t\tposition: 'left',\r\n\t\t\toffset: true,\r\n\t\t\tgridLines: {\r\n\t\t\t\toffsetGridLines: true\r\n\t\t\t}\r\n\t\t}]\r\n\t},\r\n\r\n\telements: {\r\n\t\trectangle: {\r\n\t\t\tborderSkipped: 'left'\r\n\t\t}\r\n\t},\r\n\r\n\ttooltips: {\r\n\t\tmode: 'index',\r\n\t\taxis: 'y'\r\n\t}\r\n});\r\n\r\ncore_defaults._set('global', {\r\n\tdatasets: {\r\n\t\thorizontalBar: {\r\n\t\t\tcategoryPercentage: 0.8,\r\n\t\t\tbarPercentage: 0.9\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar controller_horizontalBar = controller_bar.extend({\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getValueScaleId: function() {\r\n\t\treturn this.getMeta().xAxisID;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getIndexScaleId: function() {\r\n\t\treturn this.getMeta().yAxisID;\r\n\t}\r\n});\n\nvar valueOrDefault$6 = helpers$1.valueOrDefault;\r\nvar resolve$2 = helpers$1.options.resolve;\r\nvar isPointInArea = helpers$1.canvas._isPointInArea;\r\n\r\ncore_defaults._set('line', {\r\n\tshowLines: true,\r\n\tspanGaps: false,\r\n\r\n\thover: {\r\n\t\tmode: 'label'\r\n\t},\r\n\r\n\tscales: {\r\n\t\txAxes: [{\r\n\t\t\ttype: 'category',\r\n\t\t\tid: 'x-axis-0'\r\n\t\t}],\r\n\t\tyAxes: [{\r\n\t\t\ttype: 'linear',\r\n\t\t\tid: 'y-axis-0'\r\n\t\t}]\r\n\t}\r\n});\r\n\r\nfunction scaleClip(scale, halfBorderWidth) {\r\n\tvar tickOpts = scale && scale.options.ticks || {};\r\n\tvar reverse = tickOpts.reverse;\r\n\tvar min = tickOpts.min === undefined ? halfBorderWidth : 0;\r\n\tvar max = tickOpts.max === undefined ? halfBorderWidth : 0;\r\n\treturn {\r\n\t\tstart: reverse ? max : min,\r\n\t\tend: reverse ? min : max\r\n\t};\r\n}\r\n\r\nfunction defaultClip(xScale, yScale, borderWidth) {\r\n\tvar halfBorderWidth = borderWidth / 2;\r\n\tvar x = scaleClip(xScale, halfBorderWidth);\r\n\tvar y = scaleClip(yScale, halfBorderWidth);\r\n\r\n\treturn {\r\n\t\ttop: y.end,\r\n\t\tright: x.end,\r\n\t\tbottom: y.start,\r\n\t\tleft: x.start\r\n\t};\r\n}\r\n\r\nfunction toClip(value) {\r\n\tvar t, r, b, l;\r\n\r\n\tif (helpers$1.isObject(value)) {\r\n\t\tt = value.top;\r\n\t\tr = value.right;\r\n\t\tb = value.bottom;\r\n\t\tl = value.left;\r\n\t} else {\r\n\t\tt = r = b = l = value;\r\n\t}\r\n\r\n\treturn {\r\n\t\ttop: t,\r\n\t\tright: r,\r\n\t\tbottom: b,\r\n\t\tleft: l\r\n\t};\r\n}\r\n\r\n\r\nvar controller_line = core_datasetController.extend({\r\n\r\n\tdatasetElementType: elements.Line,\r\n\r\n\tdataElementType: elements.Point,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_datasetElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderCapStyle',\r\n\t\t'borderColor',\r\n\t\t'borderDash',\r\n\t\t'borderDashOffset',\r\n\t\t'borderJoinStyle',\r\n\t\t'borderWidth',\r\n\t\t'cubicInterpolationMode',\r\n\t\t'fill'\r\n\t],\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: {\r\n\t\tbackgroundColor: 'pointBackgroundColor',\r\n\t\tborderColor: 'pointBorderColor',\r\n\t\tborderWidth: 'pointBorderWidth',\r\n\t\thitRadius: 'pointHitRadius',\r\n\t\thoverBackgroundColor: 'pointHoverBackgroundColor',\r\n\t\thoverBorderColor: 'pointHoverBorderColor',\r\n\t\thoverBorderWidth: 'pointHoverBorderWidth',\r\n\t\thoverRadius: 'pointHoverRadius',\r\n\t\tpointStyle: 'pointStyle',\r\n\t\tradius: 'pointRadius',\r\n\t\trotation: 'pointRotation'\r\n\t},\r\n\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar line = meta.dataset;\r\n\t\tvar points = meta.data || [];\r\n\t\tvar options = me.chart.options;\r\n\t\tvar config = me._config;\r\n\t\tvar showLine = me._showLine = valueOrDefault$6(config.showLine, options.showLines);\r\n\t\tvar i, ilen;\r\n\r\n\t\tme._xScale = me.getScaleForId(meta.xAxisID);\r\n\t\tme._yScale = me.getScaleForId(meta.yAxisID);\r\n\r\n\t\t// Update Line\r\n\t\tif (showLine) {\r\n\t\t\t// Compatibility: If the properties are defined with only the old name, use those values\r\n\t\t\tif (config.tension !== undefined && config.lineTension === undefined) {\r\n\t\t\t\tconfig.lineTension = config.tension;\r\n\t\t\t}\r\n\r\n\t\t\t// Utility\r\n\t\t\tline._scale = me._yScale;\r\n\t\t\tline._datasetIndex = me.index;\r\n\t\t\t// Data\r\n\t\t\tline._children = points;\r\n\t\t\t// Model\r\n\t\t\tline._model = me._resolveDatasetElementOptions(line);\r\n\r\n\t\t\tline.pivot();\r\n\t\t}\r\n\r\n\t\t// Update Points\r\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\tme.updateElement(points[i], i, reset);\r\n\t\t}\r\n\r\n\t\tif (showLine && line._model.tension !== 0) {\r\n\t\t\tme.updateBezierControlPoints();\r\n\t\t}\r\n\r\n\t\t// Now pivot the point for animation\r\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\tpoints[i].pivot();\r\n\t\t}\r\n\t},\r\n\r\n\tupdateElement: function(point, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar custom = point.custom || {};\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar datasetIndex = me.index;\r\n\t\tvar value = dataset.data[index];\r\n\t\tvar xScale = me._xScale;\r\n\t\tvar yScale = me._yScale;\r\n\t\tvar lineModel = meta.dataset._model;\r\n\t\tvar x, y;\r\n\r\n\t\tvar options = me._resolveDataElementOptions(point, index);\r\n\r\n\t\tx = xScale.getPixelForValue(typeof value === 'object' ? value : NaN, index, datasetIndex);\r\n\t\ty = reset ? yScale.getBasePixel() : me.calculatePointY(value, index, datasetIndex);\r\n\r\n\t\t// Utility\r\n\t\tpoint._xScale = xScale;\r\n\t\tpoint._yScale = yScale;\r\n\t\tpoint._options = options;\r\n\t\tpoint._datasetIndex = datasetIndex;\r\n\t\tpoint._index = index;\r\n\r\n\t\t// Desired view properties\r\n\t\tpoint._model = {\r\n\t\t\tx: x,\r\n\t\t\ty: y,\r\n\t\t\tskip: custom.skip || isNaN(x) || isNaN(y),\r\n\t\t\t// Appearance\r\n\t\t\tradius: options.radius,\r\n\t\t\tpointStyle: options.pointStyle,\r\n\t\t\trotation: options.rotation,\r\n\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\tborderColor: options.borderColor,\r\n\t\t\tborderWidth: options.borderWidth,\r\n\t\t\ttension: valueOrDefault$6(custom.tension, lineModel ? lineModel.tension : 0),\r\n\t\t\tsteppedLine: lineModel ? lineModel.steppedLine : false,\r\n\t\t\t// Tooltip\r\n\t\t\thitRadius: options.hitRadius\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDatasetElementOptions: function(element) {\r\n\t\tvar me = this;\r\n\t\tvar config = me._config;\r\n\t\tvar custom = element.custom || {};\r\n\t\tvar options = me.chart.options;\r\n\t\tvar lineOptions = options.elements.line;\r\n\t\tvar values = core_datasetController.prototype._resolveDatasetElementOptions.apply(me, arguments);\r\n\r\n\t\t// The default behavior of lines is to break at null values, according\r\n\t\t// to https://github.com/chartjs/Chart.js/issues/2435#issuecomment-216718158\r\n\t\t// This option gives lines the ability to span gaps\r\n\t\tvalues.spanGaps = valueOrDefault$6(config.spanGaps, options.spanGaps);\r\n\t\tvalues.tension = valueOrDefault$6(config.lineTension, lineOptions.tension);\r\n\t\tvalues.steppedLine = resolve$2([custom.steppedLine, config.steppedLine, lineOptions.stepped]);\r\n\t\tvalues.clip = toClip(valueOrDefault$6(config.clip, defaultClip(me._xScale, me._yScale, values.borderWidth)));\r\n\r\n\t\treturn values;\r\n\t},\r\n\r\n\tcalculatePointY: function(value, index, datasetIndex) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar yScale = me._yScale;\r\n\t\tvar sumPos = 0;\r\n\t\tvar sumNeg = 0;\r\n\t\tvar i, ds, dsMeta, stackedRightValue, rightValue, metasets, ilen;\r\n\r\n\t\tif (yScale.options.stacked) {\r\n\t\t\trightValue = +yScale.getRightValue(value);\r\n\t\t\tmetasets = chart._getSortedVisibleDatasetMetas();\r\n\t\t\tilen = metasets.length;\r\n\r\n\t\t\tfor (i = 0; i < ilen; ++i) {\r\n\t\t\t\tdsMeta = metasets[i];\r\n\t\t\t\tif (dsMeta.index === datasetIndex) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tds = chart.data.datasets[dsMeta.index];\r\n\t\t\t\tif (dsMeta.type === 'line' && dsMeta.yAxisID === yScale.id) {\r\n\t\t\t\t\tstackedRightValue = +yScale.getRightValue(ds.data[index]);\r\n\t\t\t\t\tif (stackedRightValue < 0) {\r\n\t\t\t\t\t\tsumNeg += stackedRightValue || 0;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsumPos += stackedRightValue || 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (rightValue < 0) {\r\n\t\t\t\treturn yScale.getPixelForValue(sumNeg + rightValue);\r\n\t\t\t}\r\n\t\t\treturn yScale.getPixelForValue(sumPos + rightValue);\r\n\t\t}\r\n\t\treturn yScale.getPixelForValue(value);\r\n\t},\r\n\r\n\tupdateBezierControlPoints: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar lineModel = meta.dataset._model;\r\n\t\tvar area = chart.chartArea;\r\n\t\tvar points = meta.data || [];\r\n\t\tvar i, ilen, model, controlPoints;\r\n\r\n\t\t// Only consider points that are drawn in case the spanGaps option is used\r\n\t\tif (lineModel.spanGaps) {\r\n\t\t\tpoints = points.filter(function(pt) {\r\n\t\t\t\treturn !pt._model.skip;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tfunction capControlPoint(pt, min, max) {\r\n\t\t\treturn Math.max(Math.min(pt, max), min);\r\n\t\t}\r\n\r\n\t\tif (lineModel.cubicInterpolationMode === 'monotone') {\r\n\t\t\thelpers$1.splineCurveMonotone(points);\r\n\t\t} else {\r\n\t\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\t\tmodel = points[i]._model;\r\n\t\t\t\tcontrolPoints = helpers$1.splineCurve(\r\n\t\t\t\t\thelpers$1.previousItem(points, i)._model,\r\n\t\t\t\t\tmodel,\r\n\t\t\t\t\thelpers$1.nextItem(points, i)._model,\r\n\t\t\t\t\tlineModel.tension\r\n\t\t\t\t);\r\n\t\t\t\tmodel.controlPointPreviousX = controlPoints.previous.x;\r\n\t\t\t\tmodel.controlPointPreviousY = controlPoints.previous.y;\r\n\t\t\t\tmodel.controlPointNextX = controlPoints.next.x;\r\n\t\t\t\tmodel.controlPointNextY = controlPoints.next.y;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (chart.options.elements.line.capBezierPoints) {\r\n\t\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\t\tmodel = points[i]._model;\r\n\t\t\t\tif (isPointInArea(model, area)) {\r\n\t\t\t\t\tif (i > 0 && isPointInArea(points[i - 1]._model, area)) {\r\n\t\t\t\t\t\tmodel.controlPointPreviousX = capControlPoint(model.controlPointPreviousX, area.left, area.right);\r\n\t\t\t\t\t\tmodel.controlPointPreviousY = capControlPoint(model.controlPointPreviousY, area.top, area.bottom);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (i < points.length - 1 && isPointInArea(points[i + 1]._model, area)) {\r\n\t\t\t\t\t\tmodel.controlPointNextX = capControlPoint(model.controlPointNextX, area.left, area.right);\r\n\t\t\t\t\t\tmodel.controlPointNextY = capControlPoint(model.controlPointNextY, area.top, area.bottom);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tdraw: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar points = meta.data || [];\r\n\t\tvar area = chart.chartArea;\r\n\t\tvar canvas = chart.canvas;\r\n\t\tvar i = 0;\r\n\t\tvar ilen = points.length;\r\n\t\tvar clip;\r\n\r\n\t\tif (me._showLine) {\r\n\t\t\tclip = meta.dataset._model.clip;\r\n\r\n\t\t\thelpers$1.canvas.clipArea(chart.ctx, {\r\n\t\t\t\tleft: clip.left === false ? 0 : area.left - clip.left,\r\n\t\t\t\tright: clip.right === false ? canvas.width : area.right + clip.right,\r\n\t\t\t\ttop: clip.top === false ? 0 : area.top - clip.top,\r\n\t\t\t\tbottom: clip.bottom === false ? canvas.height : area.bottom + clip.bottom\r\n\t\t\t});\r\n\r\n\t\t\tmeta.dataset.draw();\r\n\r\n\t\t\thelpers$1.canvas.unclipArea(chart.ctx);\r\n\t\t}\r\n\r\n\t\t// Draw the points\r\n\t\tfor (; i < ilen; ++i) {\r\n\t\t\tpoints[i].draw(area);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tsetHoverStyle: function(point) {\r\n\t\tvar model = point._model;\r\n\t\tvar options = point._options;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\r\n\t\tpoint.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth,\r\n\t\t\tradius: model.radius\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = valueOrDefault$6(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\r\n\t\tmodel.borderColor = valueOrDefault$6(options.hoverBorderColor, getHoverColor(options.borderColor));\r\n\t\tmodel.borderWidth = valueOrDefault$6(options.hoverBorderWidth, options.borderWidth);\r\n\t\tmodel.radius = valueOrDefault$6(options.hoverRadius, options.radius);\r\n\t},\r\n});\n\nvar resolve$3 = helpers$1.options.resolve;\r\n\r\ncore_defaults._set('polarArea', {\r\n\tscale: {\r\n\t\ttype: 'radialLinear',\r\n\t\tangleLines: {\r\n\t\t\tdisplay: false\r\n\t\t},\r\n\t\tgridLines: {\r\n\t\t\tcircular: true\r\n\t\t},\r\n\t\tpointLabels: {\r\n\t\t\tdisplay: false\r\n\t\t},\r\n\t\tticks: {\r\n\t\t\tbeginAtZero: true\r\n\t\t}\r\n\t},\r\n\r\n\t// Boolean - Whether to animate the rotation of the chart\r\n\tanimation: {\r\n\t\tanimateRotate: true,\r\n\t\tanimateScale: true\r\n\t},\r\n\r\n\tstartAngle: -0.5 * Math.PI,\r\n\tlegendCallback: function(chart) {\r\n\t\tvar list = document.createElement('ul');\r\n\t\tvar data = chart.data;\r\n\t\tvar datasets = data.datasets;\r\n\t\tvar labels = data.labels;\r\n\t\tvar i, ilen, listItem, listItemSpan;\r\n\r\n\t\tlist.setAttribute('class', chart.id + '-legend');\r\n\t\tif (datasets.length) {\r\n\t\t\tfor (i = 0, ilen = datasets[0].data.length; i < ilen; ++i) {\r\n\t\t\t\tlistItem = list.appendChild(document.createElement('li'));\r\n\t\t\t\tlistItemSpan = listItem.appendChild(document.createElement('span'));\r\n\t\t\t\tlistItemSpan.style.backgroundColor = datasets[0].backgroundColor[i];\r\n\t\t\t\tif (labels[i]) {\r\n\t\t\t\t\tlistItem.appendChild(document.createTextNode(labels[i]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn list.outerHTML;\r\n\t},\r\n\tlegend: {\r\n\t\tlabels: {\r\n\t\t\tgenerateLabels: function(chart) {\r\n\t\t\t\tvar data = chart.data;\r\n\t\t\t\tif (data.labels.length && data.datasets.length) {\r\n\t\t\t\t\treturn data.labels.map(function(label, i) {\r\n\t\t\t\t\t\tvar meta = chart.getDatasetMeta(0);\r\n\t\t\t\t\t\tvar style = meta.controller.getStyle(i);\r\n\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\ttext: label,\r\n\t\t\t\t\t\t\tfillStyle: style.backgroundColor,\r\n\t\t\t\t\t\t\tstrokeStyle: style.borderColor,\r\n\t\t\t\t\t\t\tlineWidth: style.borderWidth,\r\n\t\t\t\t\t\t\thidden: isNaN(data.datasets[0].data[i]) || meta.data[i].hidden,\r\n\r\n\t\t\t\t\t\t\t// Extra data used for toggling the correct item\r\n\t\t\t\t\t\t\tindex: i\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn [];\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tonClick: function(e, legendItem) {\r\n\t\t\tvar index = legendItem.index;\r\n\t\t\tvar chart = this.chart;\r\n\t\t\tvar i, ilen, meta;\r\n\r\n\t\t\tfor (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {\r\n\t\t\t\tmeta = chart.getDatasetMeta(i);\r\n\t\t\t\tmeta.data[index].hidden = !meta.data[index].hidden;\r\n\t\t\t}\r\n\r\n\t\t\tchart.update();\r\n\t\t}\r\n\t},\r\n\r\n\t// Need to override these to give a nice default\r\n\ttooltips: {\r\n\t\tcallbacks: {\r\n\t\t\ttitle: function() {\r\n\t\t\t\treturn '';\r\n\t\t\t},\r\n\t\t\tlabel: function(item, data) {\r\n\t\t\t\treturn data.labels[item.index] + ': ' + item.yLabel;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar controller_polarArea = core_datasetController.extend({\r\n\r\n\tdataElementType: elements.Arc,\r\n\r\n\tlinkScales: helpers$1.noop,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderColor',\r\n\t\t'borderWidth',\r\n\t\t'borderAlign',\r\n\t\t'hoverBackgroundColor',\r\n\t\t'hoverBorderColor',\r\n\t\t'hoverBorderWidth',\r\n\t],\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getIndexScaleId: function() {\r\n\t\treturn this.chart.scale.id;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getValueScaleId: function() {\r\n\t\treturn this.chart.scale.id;\r\n\t},\r\n\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar start = me.chart.options.startAngle || 0;\r\n\t\tvar starts = me._starts = [];\r\n\t\tvar angles = me._angles = [];\r\n\t\tvar arcs = meta.data;\r\n\t\tvar i, ilen, angle;\r\n\r\n\t\tme._updateRadius();\r\n\r\n\t\tmeta.count = me.countVisibleElements();\r\n\r\n\t\tfor (i = 0, ilen = dataset.data.length; i < ilen; i++) {\r\n\t\t\tstarts[i] = start;\r\n\t\t\tangle = me._computeAngle(i);\r\n\t\t\tangles[i] = angle;\r\n\t\t\tstart += angle;\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = arcs.length; i < ilen; ++i) {\r\n\t\t\tarcs[i]._options = me._resolveDataElementOptions(arcs[i], i);\r\n\t\t\tme.updateElement(arcs[i], i, reset);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_updateRadius: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar chartArea = chart.chartArea;\r\n\t\tvar opts = chart.options;\r\n\t\tvar minSize = Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top);\r\n\r\n\t\tchart.outerRadius = Math.max(minSize / 2, 0);\r\n\t\tchart.innerRadius = Math.max(opts.cutoutPercentage ? (chart.outerRadius / 100) * (opts.cutoutPercentage) : 1, 0);\r\n\t\tchart.radiusLength = (chart.outerRadius - chart.innerRadius) / chart.getVisibleDatasetCount();\r\n\r\n\t\tme.outerRadius = chart.outerRadius - (chart.radiusLength * me.index);\r\n\t\tme.innerRadius = me.outerRadius - chart.radiusLength;\r\n\t},\r\n\r\n\tupdateElement: function(arc, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar opts = chart.options;\r\n\t\tvar animationOpts = opts.animation;\r\n\t\tvar scale = chart.scale;\r\n\t\tvar labels = chart.data.labels;\r\n\r\n\t\tvar centerX = scale.xCenter;\r\n\t\tvar centerY = scale.yCenter;\r\n\r\n\t\t// var negHalfPI = -0.5 * Math.PI;\r\n\t\tvar datasetStartAngle = opts.startAngle;\r\n\t\tvar distance = arc.hidden ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]);\r\n\t\tvar startAngle = me._starts[index];\r\n\t\tvar endAngle = startAngle + (arc.hidden ? 0 : me._angles[index]);\r\n\r\n\t\tvar resetRadius = animationOpts.animateScale ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]);\r\n\t\tvar options = arc._options || {};\r\n\r\n\t\thelpers$1.extend(arc, {\r\n\t\t\t// Utility\r\n\t\t\t_datasetIndex: me.index,\r\n\t\t\t_index: index,\r\n\t\t\t_scale: scale,\r\n\r\n\t\t\t// Desired view properties\r\n\t\t\t_model: {\r\n\t\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\t\tborderColor: options.borderColor,\r\n\t\t\t\tborderWidth: options.borderWidth,\r\n\t\t\t\tborderAlign: options.borderAlign,\r\n\t\t\t\tx: centerX,\r\n\t\t\t\ty: centerY,\r\n\t\t\t\tinnerRadius: 0,\r\n\t\t\t\touterRadius: reset ? resetRadius : distance,\r\n\t\t\t\tstartAngle: reset && animationOpts.animateRotate ? datasetStartAngle : startAngle,\r\n\t\t\t\tendAngle: reset && animationOpts.animateRotate ? datasetStartAngle : endAngle,\r\n\t\t\t\tlabel: helpers$1.valueAtIndexOrDefault(labels, index, labels[index])\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tarc.pivot();\r\n\t},\r\n\r\n\tcountVisibleElements: function() {\r\n\t\tvar dataset = this.getDataset();\r\n\t\tvar meta = this.getMeta();\r\n\t\tvar count = 0;\r\n\r\n\t\thelpers$1.each(meta.data, function(element, index) {\r\n\t\t\tif (!isNaN(dataset.data[index]) && !element.hidden) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn count;\r\n\t},\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tsetHoverStyle: function(arc) {\r\n\t\tvar model = arc._model;\r\n\t\tvar options = arc._options;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\t\tvar valueOrDefault = helpers$1.valueOrDefault;\r\n\r\n\t\tarc.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth,\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = valueOrDefault(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\r\n\t\tmodel.borderColor = valueOrDefault(options.hoverBorderColor, getHoverColor(options.borderColor));\r\n\t\tmodel.borderWidth = valueOrDefault(options.hoverBorderWidth, options.borderWidth);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_computeAngle: function(index) {\r\n\t\tvar me = this;\r\n\t\tvar count = this.getMeta().count;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar meta = me.getMeta();\r\n\r\n\t\tif (isNaN(dataset.data[index]) || meta.data[index].hidden) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\t// Scriptable options\r\n\t\tvar context = {\r\n\t\t\tchart: me.chart,\r\n\t\t\tdataIndex: index,\r\n\t\t\tdataset: dataset,\r\n\t\t\tdatasetIndex: me.index\r\n\t\t};\r\n\r\n\t\treturn resolve$3([\r\n\t\t\tme.chart.options.elements.arc.angle,\r\n\t\t\t(2 * Math.PI) / count\r\n\t\t], context, index);\r\n\t}\r\n});\n\ncore_defaults._set('pie', helpers$1.clone(core_defaults.doughnut));\r\ncore_defaults._set('pie', {\r\n\tcutoutPercentage: 0\r\n});\r\n\r\n// Pie charts are Doughnut chart with different defaults\r\nvar controller_pie = controller_doughnut;\n\nvar valueOrDefault$7 = helpers$1.valueOrDefault;\r\n\r\ncore_defaults._set('radar', {\r\n\tspanGaps: false,\r\n\tscale: {\r\n\t\ttype: 'radialLinear'\r\n\t},\r\n\telements: {\r\n\t\tline: {\r\n\t\t\tfill: 'start',\r\n\t\t\ttension: 0 // no bezier in radar\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar controller_radar = core_datasetController.extend({\r\n\tdatasetElementType: elements.Line,\r\n\r\n\tdataElementType: elements.Point,\r\n\r\n\tlinkScales: helpers$1.noop,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_datasetElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderWidth',\r\n\t\t'borderColor',\r\n\t\t'borderCapStyle',\r\n\t\t'borderDash',\r\n\t\t'borderDashOffset',\r\n\t\t'borderJoinStyle',\r\n\t\t'fill'\r\n\t],\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: {\r\n\t\tbackgroundColor: 'pointBackgroundColor',\r\n\t\tborderColor: 'pointBorderColor',\r\n\t\tborderWidth: 'pointBorderWidth',\r\n\t\thitRadius: 'pointHitRadius',\r\n\t\thoverBackgroundColor: 'pointHoverBackgroundColor',\r\n\t\thoverBorderColor: 'pointHoverBorderColor',\r\n\t\thoverBorderWidth: 'pointHoverBorderWidth',\r\n\t\thoverRadius: 'pointHoverRadius',\r\n\t\tpointStyle: 'pointStyle',\r\n\t\tradius: 'pointRadius',\r\n\t\trotation: 'pointRotation'\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getIndexScaleId: function() {\r\n\t\treturn this.chart.scale.id;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getValueScaleId: function() {\r\n\t\treturn this.chart.scale.id;\r\n\t},\r\n\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar line = meta.dataset;\r\n\t\tvar points = meta.data || [];\r\n\t\tvar scale = me.chart.scale;\r\n\t\tvar config = me._config;\r\n\t\tvar i, ilen;\r\n\r\n\t\t// Compatibility: If the properties are defined with only the old name, use those values\r\n\t\tif (config.tension !== undefined && config.lineTension === undefined) {\r\n\t\t\tconfig.lineTension = config.tension;\r\n\t\t}\r\n\r\n\t\t// Utility\r\n\t\tline._scale = scale;\r\n\t\tline._datasetIndex = me.index;\r\n\t\t// Data\r\n\t\tline._children = points;\r\n\t\tline._loop = true;\r\n\t\t// Model\r\n\t\tline._model = me._resolveDatasetElementOptions(line);\r\n\r\n\t\tline.pivot();\r\n\r\n\t\t// Update Points\r\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\tme.updateElement(points[i], i, reset);\r\n\t\t}\r\n\r\n\t\t// Update bezier control points\r\n\t\tme.updateBezierControlPoints();\r\n\r\n\t\t// Now pivot the point for animation\r\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\tpoints[i].pivot();\r\n\t\t}\r\n\t},\r\n\r\n\tupdateElement: function(point, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar custom = point.custom || {};\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar scale = me.chart.scale;\r\n\t\tvar pointPosition = scale.getPointPositionForValue(index, dataset.data[index]);\r\n\t\tvar options = me._resolveDataElementOptions(point, index);\r\n\t\tvar lineModel = me.getMeta().dataset._model;\r\n\t\tvar x = reset ? scale.xCenter : pointPosition.x;\r\n\t\tvar y = reset ? scale.yCenter : pointPosition.y;\r\n\r\n\t\t// Utility\r\n\t\tpoint._scale = scale;\r\n\t\tpoint._options = options;\r\n\t\tpoint._datasetIndex = me.index;\r\n\t\tpoint._index = index;\r\n\r\n\t\t// Desired view properties\r\n\t\tpoint._model = {\r\n\t\t\tx: x, // value not used in dataset scale, but we want a consistent API between scales\r\n\t\t\ty: y,\r\n\t\t\tskip: custom.skip || isNaN(x) || isNaN(y),\r\n\t\t\t// Appearance\r\n\t\t\tradius: options.radius,\r\n\t\t\tpointStyle: options.pointStyle,\r\n\t\t\trotation: options.rotation,\r\n\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\tborderColor: options.borderColor,\r\n\t\t\tborderWidth: options.borderWidth,\r\n\t\t\ttension: valueOrDefault$7(custom.tension, lineModel ? lineModel.tension : 0),\r\n\r\n\t\t\t// Tooltip\r\n\t\t\thitRadius: options.hitRadius\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDatasetElementOptions: function() {\r\n\t\tvar me = this;\r\n\t\tvar config = me._config;\r\n\t\tvar options = me.chart.options;\r\n\t\tvar values = core_datasetController.prototype._resolveDatasetElementOptions.apply(me, arguments);\r\n\r\n\t\tvalues.spanGaps = valueOrDefault$7(config.spanGaps, options.spanGaps);\r\n\t\tvalues.tension = valueOrDefault$7(config.lineTension, options.elements.line.tension);\r\n\r\n\t\treturn values;\r\n\t},\r\n\r\n\tupdateBezierControlPoints: function() {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar area = me.chart.chartArea;\r\n\t\tvar points = meta.data || [];\r\n\t\tvar i, ilen, model, controlPoints;\r\n\r\n\t\t// Only consider points that are drawn in case the spanGaps option is used\r\n\t\tif (meta.dataset._model.spanGaps) {\r\n\t\t\tpoints = points.filter(function(pt) {\r\n\t\t\t\treturn !pt._model.skip;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tfunction capControlPoint(pt, min, max) {\r\n\t\t\treturn Math.max(Math.min(pt, max), min);\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\tmodel = points[i]._model;\r\n\t\t\tcontrolPoints = helpers$1.splineCurve(\r\n\t\t\t\thelpers$1.previousItem(points, i, true)._model,\r\n\t\t\t\tmodel,\r\n\t\t\t\thelpers$1.nextItem(points, i, true)._model,\r\n\t\t\t\tmodel.tension\r\n\t\t\t);\r\n\r\n\t\t\t// Prevent the bezier going outside of the bounds of the graph\r\n\t\t\tmodel.controlPointPreviousX = capControlPoint(controlPoints.previous.x, area.left, area.right);\r\n\t\t\tmodel.controlPointPreviousY = capControlPoint(controlPoints.previous.y, area.top, area.bottom);\r\n\t\t\tmodel.controlPointNextX = capControlPoint(controlPoints.next.x, area.left, area.right);\r\n\t\t\tmodel.controlPointNextY = capControlPoint(controlPoints.next.y, area.top, area.bottom);\r\n\t\t}\r\n\t},\r\n\r\n\tsetHoverStyle: function(point) {\r\n\t\tvar model = point._model;\r\n\t\tvar options = point._options;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\r\n\t\tpoint.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth,\r\n\t\t\tradius: model.radius\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = valueOrDefault$7(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\r\n\t\tmodel.borderColor = valueOrDefault$7(options.hoverBorderColor, getHoverColor(options.borderColor));\r\n\t\tmodel.borderWidth = valueOrDefault$7(options.hoverBorderWidth, options.borderWidth);\r\n\t\tmodel.radius = valueOrDefault$7(options.hoverRadius, options.radius);\r\n\t}\r\n});\n\ncore_defaults._set('scatter', {\r\n\thover: {\r\n\t\tmode: 'single'\r\n\t},\r\n\r\n\tscales: {\r\n\t\txAxes: [{\r\n\t\t\tid: 'x-axis-1', // need an ID so datasets can reference the scale\r\n\t\t\ttype: 'linear', // scatter should not use a category axis\r\n\t\t\tposition: 'bottom'\r\n\t\t}],\r\n\t\tyAxes: [{\r\n\t\t\tid: 'y-axis-1',\r\n\t\t\ttype: 'linear',\r\n\t\t\tposition: 'left'\r\n\t\t}]\r\n\t},\r\n\r\n\ttooltips: {\r\n\t\tcallbacks: {\r\n\t\t\ttitle: function() {\r\n\t\t\t\treturn ''; // doesn't make sense for scatter since data are formatted as a point\r\n\t\t\t},\r\n\t\t\tlabel: function(item) {\r\n\t\t\t\treturn '(' + item.xLabel + ', ' + item.yLabel + ')';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\ncore_defaults._set('global', {\r\n\tdatasets: {\r\n\t\tscatter: {\r\n\t\t\tshowLine: false\r\n\t\t}\r\n\t}\r\n});\r\n\r\n// Scatter charts use line controllers\r\nvar controller_scatter = controller_line;\n\n// NOTE export a map in which the key represents the controller type, not\r\n// the class, and so must be CamelCase in order to be correctly retrieved\r\n// by the controller in core.controller.js (`controllers[meta.type]`).\r\n\r\nvar controllers = {\r\n\tbar: controller_bar,\r\n\tbubble: controller_bubble,\r\n\tdoughnut: controller_doughnut,\r\n\thorizontalBar: controller_horizontalBar,\r\n\tline: controller_line,\r\n\tpolarArea: controller_polarArea,\r\n\tpie: controller_pie,\r\n\tradar: controller_radar,\r\n\tscatter: controller_scatter\r\n};\n\n/**\r\n * Helper function to get relative position for an event\r\n * @param {Event|IEvent} event - The event to get the position for\r\n * @param {Chart} chart - The chart\r\n * @returns {object} the event position\r\n */\r\nfunction getRelativePosition(e, chart) {\r\n\tif (e.native) {\r\n\t\treturn {\r\n\t\t\tx: e.x,\r\n\t\t\ty: e.y\r\n\t\t};\r\n\t}\r\n\r\n\treturn helpers$1.getRelativePosition(e, chart);\r\n}\r\n\r\n/**\r\n * Helper function to traverse all of the visible elements in the chart\r\n * @param {Chart} chart - the chart\r\n * @param {function} handler - the callback to execute for each visible item\r\n */\r\nfunction parseVisibleItems(chart, handler) {\r\n\tvar metasets = chart._getSortedVisibleDatasetMetas();\r\n\tvar metadata, i, j, ilen, jlen, element;\r\n\r\n\tfor (i = 0, ilen = metasets.length; i < ilen; ++i) {\r\n\t\tmetadata = metasets[i].data;\r\n\t\tfor (j = 0, jlen = metadata.length; j < jlen; ++j) {\r\n\t\t\telement = metadata[j];\r\n\t\t\tif (!element._view.skip) {\r\n\t\t\t\thandler(element);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/**\r\n * Helper function to get the items that intersect the event position\r\n * @param {ChartElement[]} items - elements to filter\r\n * @param {object} position - the point to be nearest to\r\n * @return {ChartElement[]} the nearest items\r\n */\r\nfunction getIntersectItems(chart, position) {\r\n\tvar elements = [];\r\n\r\n\tparseVisibleItems(chart, function(element) {\r\n\t\tif (element.inRange(position.x, position.y)) {\r\n\t\t\telements.push(element);\r\n\t\t}\r\n\t});\r\n\r\n\treturn elements;\r\n}\r\n\r\n/**\r\n * Helper function to get the items nearest to the event position considering all visible items in teh chart\r\n * @param {Chart} chart - the chart to look at elements from\r\n * @param {object} position - the point to be nearest to\r\n * @param {boolean} intersect - if true, only consider items that intersect the position\r\n * @param {function} distanceMetric - function to provide the distance between points\r\n * @return {ChartElement[]} the nearest items\r\n */\r\nfunction getNearestItems(chart, position, intersect, distanceMetric) {\r\n\tvar minDistance = Number.POSITIVE_INFINITY;\r\n\tvar nearestItems = [];\r\n\r\n\tparseVisibleItems(chart, function(element) {\r\n\t\tif (intersect && !element.inRange(position.x, position.y)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar center = element.getCenterPoint();\r\n\t\tvar distance = distanceMetric(position, center);\r\n\t\tif (distance < minDistance) {\r\n\t\t\tnearestItems = [element];\r\n\t\t\tminDistance = distance;\r\n\t\t} else if (distance === minDistance) {\r\n\t\t\t// Can have multiple items at the same distance in which case we sort by size\r\n\t\t\tnearestItems.push(element);\r\n\t\t}\r\n\t});\r\n\r\n\treturn nearestItems;\r\n}\r\n\r\n/**\r\n * Get a distance metric function for two points based on the\r\n * axis mode setting\r\n * @param {string} axis - the axis mode. x|y|xy\r\n */\r\nfunction getDistanceMetricForAxis(axis) {\r\n\tvar useX = axis.indexOf('x') !== -1;\r\n\tvar useY = axis.indexOf('y') !== -1;\r\n\r\n\treturn function(pt1, pt2) {\r\n\t\tvar deltaX = useX ? Math.abs(pt1.x - pt2.x) : 0;\r\n\t\tvar deltaY = useY ? Math.abs(pt1.y - pt2.y) : 0;\r\n\t\treturn Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));\r\n\t};\r\n}\r\n\r\nfunction indexMode(chart, e, options) {\r\n\tvar position = getRelativePosition(e, chart);\r\n\t// Default axis for index mode is 'x' to match old behaviour\r\n\toptions.axis = options.axis || 'x';\r\n\tvar distanceMetric = getDistanceMetricForAxis(options.axis);\r\n\tvar items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false, distanceMetric);\r\n\tvar elements = [];\r\n\r\n\tif (!items.length) {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tchart._getSortedVisibleDatasetMetas().forEach(function(meta) {\r\n\t\tvar element = meta.data[items[0]._index];\r\n\r\n\t\t// don't count items that are skipped (null data)\r\n\t\tif (element && !element._view.skip) {\r\n\t\t\telements.push(element);\r\n\t\t}\r\n\t});\r\n\r\n\treturn elements;\r\n}\r\n\r\n/**\r\n * @interface IInteractionOptions\r\n */\r\n/**\r\n * If true, only consider items that intersect the point\r\n * @name IInterfaceOptions#boolean\r\n * @type Boolean\r\n */\r\n\r\n/**\r\n * Contains interaction related functions\r\n * @namespace Chart.Interaction\r\n */\r\nvar core_interaction = {\r\n\t// Helper function for different modes\r\n\tmodes: {\r\n\t\tsingle: function(chart, e) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\tvar elements = [];\r\n\r\n\t\t\tparseVisibleItems(chart, function(element) {\r\n\t\t\t\tif (element.inRange(position.x, position.y)) {\r\n\t\t\t\t\telements.push(element);\r\n\t\t\t\t\treturn elements;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treturn elements.slice(0, 1);\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * @function Chart.Interaction.modes.label\r\n\t\t * @deprecated since version 2.4.0\r\n\t\t * @todo remove at version 3\r\n\t\t * @private\r\n\t\t */\r\n\t\tlabel: indexMode,\r\n\r\n\t\t/**\r\n\t\t * Returns items at the same index. If the options.intersect parameter is true, we only return items if we intersect something\r\n\t\t * If the options.intersect mode is false, we find the nearest item and return the items at the same index as that item\r\n\t\t * @function Chart.Interaction.modes.index\r\n\t\t * @since v2.4.0\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @param {IInteractionOptions} options - options to use during interaction\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\tindex: indexMode,\r\n\r\n\t\t/**\r\n\t\t * Returns items in the same dataset. If the options.intersect parameter is true, we only return items if we intersect something\r\n\t\t * If the options.intersect is false, we find the nearest item and return the items in that dataset\r\n\t\t * @function Chart.Interaction.modes.dataset\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @param {IInteractionOptions} options - options to use during interaction\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\tdataset: function(chart, e, options) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\toptions.axis = options.axis || 'xy';\r\n\t\t\tvar distanceMetric = getDistanceMetricForAxis(options.axis);\r\n\t\t\tvar items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false, distanceMetric);\r\n\r\n\t\t\tif (items.length > 0) {\r\n\t\t\t\titems = chart.getDatasetMeta(items[0]._datasetIndex).data;\r\n\t\t\t}\r\n\r\n\t\t\treturn items;\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * @function Chart.Interaction.modes.x-axis\r\n\t\t * @deprecated since version 2.4.0. Use index mode and intersect == true\r\n\t\t * @todo remove at version 3\r\n\t\t * @private\r\n\t\t */\r\n\t\t'x-axis': function(chart, e) {\r\n\t\t\treturn indexMode(chart, e, {intersect: false});\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Point mode returns all elements that hit test based on the event position\r\n\t\t * of the event\r\n\t\t * @function Chart.Interaction.modes.intersect\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\tpoint: function(chart, e) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\treturn getIntersectItems(chart, position);\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * nearest mode returns the element closest to the point\r\n\t\t * @function Chart.Interaction.modes.intersect\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @param {IInteractionOptions} options - options to use\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\tnearest: function(chart, e, options) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\toptions.axis = options.axis || 'xy';\r\n\t\t\tvar distanceMetric = getDistanceMetricForAxis(options.axis);\r\n\t\t\treturn getNearestItems(chart, position, options.intersect, distanceMetric);\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * x mode returns the elements that hit-test at the current x coordinate\r\n\t\t * @function Chart.Interaction.modes.x\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @param {IInteractionOptions} options - options to use\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\tx: function(chart, e, options) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\tvar items = [];\r\n\t\t\tvar intersectsItem = false;\r\n\r\n\t\t\tparseVisibleItems(chart, function(element) {\r\n\t\t\t\tif (element.inXRange(position.x)) {\r\n\t\t\t\t\titems.push(element);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (element.inRange(position.x, position.y)) {\r\n\t\t\t\t\tintersectsItem = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t// If we want to trigger on an intersect and we don't have any items\r\n\t\t\t// that intersect the position, return nothing\r\n\t\t\tif (options.intersect && !intersectsItem) {\r\n\t\t\t\titems = [];\r\n\t\t\t}\r\n\t\t\treturn items;\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * y mode returns the elements that hit-test at the current y coordinate\r\n\t\t * @function Chart.Interaction.modes.y\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @param {IInteractionOptions} options - options to use\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\ty: function(chart, e, options) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\tvar items = [];\r\n\t\t\tvar intersectsItem = false;\r\n\r\n\t\t\tparseVisibleItems(chart, function(element) {\r\n\t\t\t\tif (element.inYRange(position.y)) {\r\n\t\t\t\t\titems.push(element);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (element.inRange(position.x, position.y)) {\r\n\t\t\t\t\tintersectsItem = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t// If we want to trigger on an intersect and we don't have any items\r\n\t\t\t// that intersect the position, return nothing\r\n\t\t\tif (options.intersect && !intersectsItem) {\r\n\t\t\t\titems = [];\r\n\t\t\t}\r\n\t\t\treturn items;\r\n\t\t}\r\n\t}\r\n};\n\nvar extend = helpers$1.extend;\r\n\r\nfunction filterByPosition(array, position) {\r\n\treturn helpers$1.where(array, function(v) {\r\n\t\treturn v.pos === position;\r\n\t});\r\n}\r\n\r\nfunction sortByWeight(array, reverse) {\r\n\treturn array.sort(function(a, b) {\r\n\t\tvar v0 = reverse ? b : a;\r\n\t\tvar v1 = reverse ? a : b;\r\n\t\treturn v0.weight === v1.weight ?\r\n\t\t\tv0.index - v1.index :\r\n\t\t\tv0.weight - v1.weight;\r\n\t});\r\n}\r\n\r\nfunction wrapBoxes(boxes) {\r\n\tvar layoutBoxes = [];\r\n\tvar i, ilen, box;\r\n\r\n\tfor (i = 0, ilen = (boxes || []).length; i < ilen; ++i) {\r\n\t\tbox = boxes[i];\r\n\t\tlayoutBoxes.push({\r\n\t\t\tindex: i,\r\n\t\t\tbox: box,\r\n\t\t\tpos: box.position,\r\n\t\t\thorizontal: box.isHorizontal(),\r\n\t\t\tweight: box.weight\r\n\t\t});\r\n\t}\r\n\treturn layoutBoxes;\r\n}\r\n\r\nfunction setLayoutDims(layouts, params) {\r\n\tvar i, ilen, layout;\r\n\tfor (i = 0, ilen = layouts.length; i < ilen; ++i) {\r\n\t\tlayout = layouts[i];\r\n\t\t// store width used instead of chartArea.w in fitBoxes\r\n\t\tlayout.width = layout.horizontal\r\n\t\t\t? layout.box.fullWidth && params.availableWidth\r\n\t\t\t: params.vBoxMaxWidth;\r\n\t\t// store height used instead of chartArea.h in fitBoxes\r\n\t\tlayout.height = layout.horizontal && params.hBoxMaxHeight;\r\n\t}\r\n}\r\n\r\nfunction buildLayoutBoxes(boxes) {\r\n\tvar layoutBoxes = wrapBoxes(boxes);\r\n\tvar left = sortByWeight(filterByPosition(layoutBoxes, 'left'), true);\r\n\tvar right = sortByWeight(filterByPosition(layoutBoxes, 'right'));\r\n\tvar top = sortByWeight(filterByPosition(layoutBoxes, 'top'), true);\r\n\tvar bottom = sortByWeight(filterByPosition(layoutBoxes, 'bottom'));\r\n\r\n\treturn {\r\n\t\tleftAndTop: left.concat(top),\r\n\t\trightAndBottom: right.concat(bottom),\r\n\t\tchartArea: filterByPosition(layoutBoxes, 'chartArea'),\r\n\t\tvertical: left.concat(right),\r\n\t\thorizontal: top.concat(bottom)\r\n\t};\r\n}\r\n\r\nfunction getCombinedMax(maxPadding, chartArea, a, b) {\r\n\treturn Math.max(maxPadding[a], chartArea[a]) + Math.max(maxPadding[b], chartArea[b]);\r\n}\r\n\r\nfunction updateDims(chartArea, params, layout) {\r\n\tvar box = layout.box;\r\n\tvar maxPadding = chartArea.maxPadding;\r\n\tvar newWidth, newHeight;\r\n\r\n\tif (layout.size) {\r\n\t\t// this layout was already counted for, lets first reduce old size\r\n\t\tchartArea[layout.pos] -= layout.size;\r\n\t}\r\n\tlayout.size = layout.horizontal ? box.height : box.width;\r\n\tchartArea[layout.pos] += layout.size;\r\n\r\n\tif (box.getPadding) {\r\n\t\tvar boxPadding = box.getPadding();\r\n\t\tmaxPadding.top = Math.max(maxPadding.top, boxPadding.top);\r\n\t\tmaxPadding.left = Math.max(maxPadding.left, boxPadding.left);\r\n\t\tmaxPadding.bottom = Math.max(maxPadding.bottom, boxPadding.bottom);\r\n\t\tmaxPadding.right = Math.max(maxPadding.right, boxPadding.right);\r\n\t}\r\n\r\n\tnewWidth = params.outerWidth - getCombinedMax(maxPadding, chartArea, 'left', 'right');\r\n\tnewHeight = params.outerHeight - getCombinedMax(maxPadding, chartArea, 'top', 'bottom');\r\n\r\n\tif (newWidth !== chartArea.w || newHeight !== chartArea.h) {\r\n\t\tchartArea.w = newWidth;\r\n\t\tchartArea.h = newHeight;\r\n\r\n\t\t// return true if chart area changed in layout's direction\r\n\t\tvar sizes = layout.horizontal ? [newWidth, chartArea.w] : [newHeight, chartArea.h];\r\n\t\treturn sizes[0] !== sizes[1] && (!isNaN(sizes[0]) || !isNaN(sizes[1]));\r\n\t}\r\n}\r\n\r\nfunction handleMaxPadding(chartArea) {\r\n\tvar maxPadding = chartArea.maxPadding;\r\n\r\n\tfunction updatePos(pos) {\r\n\t\tvar change = Math.max(maxPadding[pos] - chartArea[pos], 0);\r\n\t\tchartArea[pos] += change;\r\n\t\treturn change;\r\n\t}\r\n\tchartArea.y += updatePos('top');\r\n\tchartArea.x += updatePos('left');\r\n\tupdatePos('right');\r\n\tupdatePos('bottom');\r\n}\r\n\r\nfunction getMargins(horizontal, chartArea) {\r\n\tvar maxPadding = chartArea.maxPadding;\r\n\r\n\tfunction marginForPositions(positions) {\r\n\t\tvar margin = {left: 0, top: 0, right: 0, bottom: 0};\r\n\t\tpositions.forEach(function(pos) {\r\n\t\t\tmargin[pos] = Math.max(chartArea[pos], maxPadding[pos]);\r\n\t\t});\r\n\t\treturn margin;\r\n\t}\r\n\r\n\treturn horizontal\r\n\t\t? marginForPositions(['left', 'right'])\r\n\t\t: marginForPositions(['top', 'bottom']);\r\n}\r\n\r\nfunction fitBoxes(boxes, chartArea, params) {\r\n\tvar refitBoxes = [];\r\n\tvar i, ilen, layout, box, refit, changed;\r\n\r\n\tfor (i = 0, ilen = boxes.length; i < ilen; ++i) {\r\n\t\tlayout = boxes[i];\r\n\t\tbox = layout.box;\r\n\r\n\t\tbox.update(\r\n\t\t\tlayout.width || chartArea.w,\r\n\t\t\tlayout.height || chartArea.h,\r\n\t\t\tgetMargins(layout.horizontal, chartArea)\r\n\t\t);\r\n\t\tif (updateDims(chartArea, params, layout)) {\r\n\t\t\tchanged = true;\r\n\t\t\tif (refitBoxes.length) {\r\n\t\t\t\t// Dimensions changed and there were non full width boxes before this\r\n\t\t\t\t// -> we have to refit those\r\n\t\t\t\trefit = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!box.fullWidth) { // fullWidth boxes don't need to be re-fitted in any case\r\n\t\t\trefitBoxes.push(layout);\r\n\t\t}\r\n\t}\r\n\r\n\treturn refit ? fitBoxes(refitBoxes, chartArea, params) || changed : changed;\r\n}\r\n\r\nfunction placeBoxes(boxes, chartArea, params) {\r\n\tvar userPadding = params.padding;\r\n\tvar x = chartArea.x;\r\n\tvar y = chartArea.y;\r\n\tvar i, ilen, layout, box;\r\n\r\n\tfor (i = 0, ilen = boxes.length; i < ilen; ++i) {\r\n\t\tlayout = boxes[i];\r\n\t\tbox = layout.box;\r\n\t\tif (layout.horizontal) {\r\n\t\t\tbox.left = box.fullWidth ? userPadding.left : chartArea.left;\r\n\t\t\tbox.right = box.fullWidth ? params.outerWidth - userPadding.right : chartArea.left + chartArea.w;\r\n\t\t\tbox.top = y;\r\n\t\t\tbox.bottom = y + box.height;\r\n\t\t\tbox.width = box.right - box.left;\r\n\t\t\ty = box.bottom;\r\n\t\t} else {\r\n\t\t\tbox.left = x;\r\n\t\t\tbox.right = x + box.width;\r\n\t\t\tbox.top = chartArea.top;\r\n\t\t\tbox.bottom = chartArea.top + chartArea.h;\r\n\t\t\tbox.height = box.bottom - box.top;\r\n\t\t\tx = box.right;\r\n\t\t}\r\n\t}\r\n\r\n\tchartArea.x = x;\r\n\tchartArea.y = y;\r\n}\r\n\r\ncore_defaults._set('global', {\r\n\tlayout: {\r\n\t\tpadding: {\r\n\t\t\ttop: 0,\r\n\t\t\tright: 0,\r\n\t\t\tbottom: 0,\r\n\t\t\tleft: 0\r\n\t\t}\r\n\t}\r\n});\r\n\r\n/**\r\n * @interface ILayoutItem\r\n * @prop {string} position - The position of the item in the chart layout. Possible values are\r\n * 'left', 'top', 'right', 'bottom', and 'chartArea'\r\n * @prop {number} weight - The weight used to sort the item. Higher weights are further away from the chart area\r\n * @prop {boolean} fullWidth - if true, and the item is horizontal, then push vertical boxes down\r\n * @prop {function} isHorizontal - returns true if the layout item is horizontal (ie. top or bottom)\r\n * @prop {function} update - Takes two parameters: width and height. Returns size of item\r\n * @prop {function} getPadding - Returns an object with padding on the edges\r\n * @prop {number} width - Width of item. Must be valid after update()\r\n * @prop {number} height - Height of item. Must be valid after update()\r\n * @prop {number} left - Left edge of the item. Set by layout system and cannot be used in update\r\n * @prop {number} top - Top edge of the item. Set by layout system and cannot be used in update\r\n * @prop {number} right - Right edge of the item. Set by layout system and cannot be used in update\r\n * @prop {number} bottom - Bottom edge of the item. Set by layout system and cannot be used in update\r\n */\r\n\r\n// The layout service is very self explanatory. It's responsible for the layout within a chart.\r\n// Scales, Legends and Plugins all rely on the layout service and can easily register to be placed anywhere they need\r\n// It is this service's responsibility of carrying out that layout.\r\nvar core_layouts = {\r\n\tdefaults: {},\r\n\r\n\t/**\r\n\t * Register a box to a chart.\r\n\t * A box is simply a reference to an object that requires layout. eg. Scales, Legend, Title.\r\n\t * @param {Chart} chart - the chart to use\r\n\t * @param {ILayoutItem} item - the item to add to be layed out\r\n\t */\r\n\taddBox: function(chart, item) {\r\n\t\tif (!chart.boxes) {\r\n\t\t\tchart.boxes = [];\r\n\t\t}\r\n\r\n\t\t// initialize item with default values\r\n\t\titem.fullWidth = item.fullWidth || false;\r\n\t\titem.position = item.position || 'top';\r\n\t\titem.weight = item.weight || 0;\r\n\t\titem._layers = item._layers || function() {\r\n\t\t\treturn [{\r\n\t\t\t\tz: 0,\r\n\t\t\t\tdraw: function() {\r\n\t\t\t\t\titem.draw.apply(item, arguments);\r\n\t\t\t\t}\r\n\t\t\t}];\r\n\t\t};\r\n\r\n\t\tchart.boxes.push(item);\r\n\t},\r\n\r\n\t/**\r\n\t * Remove a layoutItem from a chart\r\n\t * @param {Chart} chart - the chart to remove the box from\r\n\t * @param {ILayoutItem} layoutItem - the item to remove from the layout\r\n\t */\r\n\tremoveBox: function(chart, layoutItem) {\r\n\t\tvar index = chart.boxes ? chart.boxes.indexOf(layoutItem) : -1;\r\n\t\tif (index !== -1) {\r\n\t\t\tchart.boxes.splice(index, 1);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Sets (or updates) options on the given `item`.\r\n\t * @param {Chart} chart - the chart in which the item lives (or will be added to)\r\n\t * @param {ILayoutItem} item - the item to configure with the given options\r\n\t * @param {object} options - the new item options.\r\n\t */\r\n\tconfigure: function(chart, item, options) {\r\n\t\tvar props = ['fullWidth', 'position', 'weight'];\r\n\t\tvar ilen = props.length;\r\n\t\tvar i = 0;\r\n\t\tvar prop;\r\n\r\n\t\tfor (; i < ilen; ++i) {\r\n\t\t\tprop = props[i];\r\n\t\t\tif (options.hasOwnProperty(prop)) {\r\n\t\t\t\titem[prop] = options[prop];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Fits boxes of the given chart into the given size by having each box measure itself\r\n\t * then running a fitting algorithm\r\n\t * @param {Chart} chart - the chart\r\n\t * @param {number} width - the width to fit into\r\n\t * @param {number} height - the height to fit into\r\n\t */\r\n\tupdate: function(chart, width, height) {\r\n\t\tif (!chart) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar layoutOptions = chart.options.layout || {};\r\n\t\tvar padding = helpers$1.options.toPadding(layoutOptions.padding);\r\n\r\n\t\tvar availableWidth = width - padding.width;\r\n\t\tvar availableHeight = height - padding.height;\r\n\t\tvar boxes = buildLayoutBoxes(chart.boxes);\r\n\t\tvar verticalBoxes = boxes.vertical;\r\n\t\tvar horizontalBoxes = boxes.horizontal;\r\n\r\n\t\t// Essentially we now have any number of boxes on each of the 4 sides.\r\n\t\t// Our canvas looks like the following.\r\n\t\t// The areas L1 and L2 are the left axes. R1 is the right axis, T1 is the top axis and\r\n\t\t// B1 is the bottom axis\r\n\t\t// There are also 4 quadrant-like locations (left to right instead of clockwise) reserved for chart overlays\r\n\t\t// These locations are single-box locations only, when trying to register a chartArea location that is already taken,\r\n\t\t// an error will be thrown.\r\n\t\t//\r\n\t\t// |----------------------------------------------------|\r\n\t\t// | T1 (Full Width) |\r\n\t\t// |----------------------------------------------------|\r\n\t\t// | | | T2 | |\r\n\t\t// | |----|-------------------------------------|----|\r\n\t\t// | | | C1 | | C2 | |\r\n\t\t// | | |----| |----| |\r\n\t\t// | | | | |\r\n\t\t// | L1 | L2 | ChartArea (C0) | R1 |\r\n\t\t// | | | | |\r\n\t\t// | | |----| |----| |\r\n\t\t// | | | C3 | | C4 | |\r\n\t\t// | |----|-------------------------------------|----|\r\n\t\t// | | | B1 | |\r\n\t\t// |----------------------------------------------------|\r\n\t\t// | B2 (Full Width) |\r\n\t\t// |----------------------------------------------------|\r\n\t\t//\r\n\r\n\t\tvar params = Object.freeze({\r\n\t\t\touterWidth: width,\r\n\t\t\touterHeight: height,\r\n\t\t\tpadding: padding,\r\n\t\t\tavailableWidth: availableWidth,\r\n\t\t\tvBoxMaxWidth: availableWidth / 2 / verticalBoxes.length,\r\n\t\t\thBoxMaxHeight: availableHeight / 2\r\n\t\t});\r\n\t\tvar chartArea = extend({\r\n\t\t\tmaxPadding: extend({}, padding),\r\n\t\t\tw: availableWidth,\r\n\t\t\th: availableHeight,\r\n\t\t\tx: padding.left,\r\n\t\t\ty: padding.top\r\n\t\t}, padding);\r\n\r\n\t\tsetLayoutDims(verticalBoxes.concat(horizontalBoxes), params);\r\n\r\n\t\t// First fit vertical boxes\r\n\t\tfitBoxes(verticalBoxes, chartArea, params);\r\n\r\n\t\t// Then fit horizontal boxes\r\n\t\tif (fitBoxes(horizontalBoxes, chartArea, params)) {\r\n\t\t\t// if the area changed, re-fit vertical boxes\r\n\t\t\tfitBoxes(verticalBoxes, chartArea, params);\r\n\t\t}\r\n\r\n\t\thandleMaxPadding(chartArea);\r\n\r\n\t\t// Finally place the boxes to correct coordinates\r\n\t\tplaceBoxes(boxes.leftAndTop, chartArea, params);\r\n\r\n\t\t// Move to opposite side of chart\r\n\t\tchartArea.x += chartArea.w;\r\n\t\tchartArea.y += chartArea.h;\r\n\r\n\t\tplaceBoxes(boxes.rightAndBottom, chartArea, params);\r\n\r\n\t\tchart.chartArea = {\r\n\t\t\tleft: chartArea.left,\r\n\t\t\ttop: chartArea.top,\r\n\t\t\tright: chartArea.left + chartArea.w,\r\n\t\t\tbottom: chartArea.top + chartArea.h\r\n\t\t};\r\n\r\n\t\t// Finally update boxes in chartArea (radial scale for example)\r\n\t\thelpers$1.each(boxes.chartArea, function(layout) {\r\n\t\t\tvar box = layout.box;\r\n\t\t\textend(box, chart.chartArea);\r\n\t\t\tbox.update(chartArea.w, chartArea.h);\r\n\t\t});\r\n\t}\r\n};\n\n/**\r\n * Platform fallback implementation (minimal).\r\n * @see https://github.com/chartjs/Chart.js/pull/4591#issuecomment-319575939\r\n */\r\n\r\nvar platform_basic = {\r\n\tacquireContext: function(item) {\r\n\t\tif (item && item.canvas) {\r\n\t\t\t// Support for any object associated to a canvas (including a context2d)\r\n\t\t\titem = item.canvas;\r\n\t\t}\r\n\r\n\t\treturn item && item.getContext('2d') || null;\r\n\t}\r\n};\n\nvar platform_dom = \"/*\\r\\n * DOM element rendering detection\\r\\n * https://davidwalsh.name/detect-node-insertion\\r\\n */\\r\\n@keyframes chartjs-render-animation {\\r\\n\\tfrom { opacity: 0.99; }\\r\\n\\tto { opacity: 1; }\\r\\n}\\r\\n\\r\\n.chartjs-render-monitor {\\r\\n\\tanimation: chartjs-render-animation 0.001s;\\r\\n}\\r\\n\\r\\n/*\\r\\n * DOM element resizing detection\\r\\n * https://github.com/marcj/css-element-queries\\r\\n */\\r\\n.chartjs-size-monitor,\\r\\n.chartjs-size-monitor-expand,\\r\\n.chartjs-size-monitor-shrink {\\r\\n\\tposition: absolute;\\r\\n\\tdirection: ltr;\\r\\n\\tleft: 0;\\r\\n\\ttop: 0;\\r\\n\\tright: 0;\\r\\n\\tbottom: 0;\\r\\n\\toverflow: hidden;\\r\\n\\tpointer-events: none;\\r\\n\\tvisibility: hidden;\\r\\n\\tz-index: -1;\\r\\n}\\r\\n\\r\\n.chartjs-size-monitor-expand > div {\\r\\n\\tposition: absolute;\\r\\n\\twidth: 1000000px;\\r\\n\\theight: 1000000px;\\r\\n\\tleft: 0;\\r\\n\\ttop: 0;\\r\\n}\\r\\n\\r\\n.chartjs-size-monitor-shrink > div {\\r\\n\\tposition: absolute;\\r\\n\\twidth: 200%;\\r\\n\\theight: 200%;\\r\\n\\tleft: 0;\\r\\n\\ttop: 0;\\r\\n}\\r\\n\";\n\nvar platform_dom$1 = /*#__PURE__*/Object.freeze({\n__proto__: null,\n'default': platform_dom\n});\n\nvar stylesheet = getCjsExportFromNamespace(platform_dom$1);\n\nvar EXPANDO_KEY = '$chartjs';\r\nvar CSS_PREFIX = 'chartjs-';\r\nvar CSS_SIZE_MONITOR = CSS_PREFIX + 'size-monitor';\r\nvar CSS_RENDER_MONITOR = CSS_PREFIX + 'render-monitor';\r\nvar CSS_RENDER_ANIMATION = CSS_PREFIX + 'render-animation';\r\nvar ANIMATION_START_EVENTS = ['animationstart', 'webkitAnimationStart'];\r\n\r\n/**\r\n * DOM event types -> Chart.js event types.\r\n * Note: only events with different types are mapped.\r\n * @see https://developer.mozilla.org/en-US/docs/Web/Events\r\n */\r\nvar EVENT_TYPES = {\r\n\ttouchstart: 'mousedown',\r\n\ttouchmove: 'mousemove',\r\n\ttouchend: 'mouseup',\r\n\tpointerenter: 'mouseenter',\r\n\tpointerdown: 'mousedown',\r\n\tpointermove: 'mousemove',\r\n\tpointerup: 'mouseup',\r\n\tpointerleave: 'mouseout',\r\n\tpointerout: 'mouseout'\r\n};\r\n\r\n/**\r\n * The \"used\" size is the final value of a dimension property after all calculations have\r\n * been performed. This method uses the computed style of `element` but returns undefined\r\n * if the computed style is not expressed in pixels. That can happen in some cases where\r\n * `element` has a size relative to its parent and this last one is not yet displayed,\r\n * for example because of `display: none` on a parent node.\r\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/used_value\r\n * @returns {number} Size in pixels or undefined if unknown.\r\n */\r\nfunction readUsedSize(element, property) {\r\n\tvar value = helpers$1.getStyle(element, property);\r\n\tvar matches = value && value.match(/^(\\d+)(\\.\\d+)?px$/);\r\n\treturn matches ? Number(matches[1]) : undefined;\r\n}\r\n\r\n/**\r\n * Initializes the canvas style and render size without modifying the canvas display size,\r\n * since responsiveness is handled by the controller.resize() method. The config is used\r\n * to determine the aspect ratio to apply in case no explicit height has been specified.\r\n */\r\nfunction initCanvas(canvas, config) {\r\n\tvar style = canvas.style;\r\n\r\n\t// NOTE(SB) canvas.getAttribute('width') !== canvas.width: in the first case it\r\n\t// returns null or '' if no explicit value has been set to the canvas attribute.\r\n\tvar renderHeight = canvas.getAttribute('height');\r\n\tvar renderWidth = canvas.getAttribute('width');\r\n\r\n\t// Chart.js modifies some canvas values that we want to restore on destroy\r\n\tcanvas[EXPANDO_KEY] = {\r\n\t\tinitial: {\r\n\t\t\theight: renderHeight,\r\n\t\t\twidth: renderWidth,\r\n\t\t\tstyle: {\r\n\t\t\t\tdisplay: style.display,\r\n\t\t\t\theight: style.height,\r\n\t\t\t\twidth: style.width\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t// Force canvas to display as block to avoid extra space caused by inline\r\n\t// elements, which would interfere with the responsive resize process.\r\n\t// https://github.com/chartjs/Chart.js/issues/2538\r\n\tstyle.display = style.display || 'block';\r\n\r\n\tif (renderWidth === null || renderWidth === '') {\r\n\t\tvar displayWidth = readUsedSize(canvas, 'width');\r\n\t\tif (displayWidth !== undefined) {\r\n\t\t\tcanvas.width = displayWidth;\r\n\t\t}\r\n\t}\r\n\r\n\tif (renderHeight === null || renderHeight === '') {\r\n\t\tif (canvas.style.height === '') {\r\n\t\t\t// If no explicit render height and style height, let's apply the aspect ratio,\r\n\t\t\t// which one can be specified by the user but also by charts as default option\r\n\t\t\t// (i.e. options.aspectRatio). If not specified, use canvas aspect ratio of 2.\r\n\t\t\tcanvas.height = canvas.width / (config.options.aspectRatio || 2);\r\n\t\t} else {\r\n\t\t\tvar displayHeight = readUsedSize(canvas, 'height');\r\n\t\t\tif (displayWidth !== undefined) {\r\n\t\t\t\tcanvas.height = displayHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn canvas;\r\n}\r\n\r\n/**\r\n * Detects support for options object argument in addEventListener.\r\n * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\r\n * @private\r\n */\r\nvar supportsEventListenerOptions = (function() {\r\n\tvar supports = false;\r\n\ttry {\r\n\t\tvar options = Object.defineProperty({}, 'passive', {\r\n\t\t\t// eslint-disable-next-line getter-return\r\n\t\t\tget: function() {\r\n\t\t\t\tsupports = true;\r\n\t\t\t}\r\n\t\t});\r\n\t\twindow.addEventListener('e', null, options);\r\n\t} catch (e) {\r\n\t\t// continue regardless of error\r\n\t}\r\n\treturn supports;\r\n}());\r\n\r\n// Default passive to true as expected by Chrome for 'touchstart' and 'touchend' events.\r\n// https://github.com/chartjs/Chart.js/issues/4287\r\nvar eventListenerOptions = supportsEventListenerOptions ? {passive: true} : false;\r\n\r\nfunction addListener(node, type, listener) {\r\n\tnode.addEventListener(type, listener, eventListenerOptions);\r\n}\r\n\r\nfunction removeListener(node, type, listener) {\r\n\tnode.removeEventListener(type, listener, eventListenerOptions);\r\n}\r\n\r\nfunction createEvent(type, chart, x, y, nativeEvent) {\r\n\treturn {\r\n\t\ttype: type,\r\n\t\tchart: chart,\r\n\t\tnative: nativeEvent || null,\r\n\t\tx: x !== undefined ? x : null,\r\n\t\ty: y !== undefined ? y : null,\r\n\t};\r\n}\r\n\r\nfunction fromNativeEvent(event, chart) {\r\n\tvar type = EVENT_TYPES[event.type] || event.type;\r\n\tvar pos = helpers$1.getRelativePosition(event, chart);\r\n\treturn createEvent(type, chart, pos.x, pos.y, event);\r\n}\r\n\r\nfunction throttled(fn, thisArg) {\r\n\tvar ticking = false;\r\n\tvar args = [];\r\n\r\n\treturn function() {\r\n\t\targs = Array.prototype.slice.call(arguments);\r\n\t\tthisArg = thisArg || this;\r\n\r\n\t\tif (!ticking) {\r\n\t\t\tticking = true;\r\n\t\t\thelpers$1.requestAnimFrame.call(window, function() {\r\n\t\t\t\tticking = false;\r\n\t\t\t\tfn.apply(thisArg, args);\r\n\t\t\t});\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction createDiv(cls) {\r\n\tvar el = document.createElement('div');\r\n\tel.className = cls || '';\r\n\treturn el;\r\n}\r\n\r\n// Implementation based on https://github.com/marcj/css-element-queries\r\nfunction createResizer(handler) {\r\n\tvar maxSize = 1000000;\r\n\r\n\t// NOTE(SB) Don't use innerHTML because it could be considered unsafe.\r\n\t// https://github.com/chartjs/Chart.js/issues/5902\r\n\tvar resizer = createDiv(CSS_SIZE_MONITOR);\r\n\tvar expand = createDiv(CSS_SIZE_MONITOR + '-expand');\r\n\tvar shrink = createDiv(CSS_SIZE_MONITOR + '-shrink');\r\n\r\n\texpand.appendChild(createDiv());\r\n\tshrink.appendChild(createDiv());\r\n\r\n\tresizer.appendChild(expand);\r\n\tresizer.appendChild(shrink);\r\n\tresizer._reset = function() {\r\n\t\texpand.scrollLeft = maxSize;\r\n\t\texpand.scrollTop = maxSize;\r\n\t\tshrink.scrollLeft = maxSize;\r\n\t\tshrink.scrollTop = maxSize;\r\n\t};\r\n\r\n\tvar onScroll = function() {\r\n\t\tresizer._reset();\r\n\t\thandler();\r\n\t};\r\n\r\n\taddListener(expand, 'scroll', onScroll.bind(expand, 'expand'));\r\n\taddListener(shrink, 'scroll', onScroll.bind(shrink, 'shrink'));\r\n\r\n\treturn resizer;\r\n}\r\n\r\n// https://davidwalsh.name/detect-node-insertion\r\nfunction watchForRender(node, handler) {\r\n\tvar expando = node[EXPANDO_KEY] || (node[EXPANDO_KEY] = {});\r\n\tvar proxy = expando.renderProxy = function(e) {\r\n\t\tif (e.animationName === CSS_RENDER_ANIMATION) {\r\n\t\t\thandler();\r\n\t\t}\r\n\t};\r\n\r\n\thelpers$1.each(ANIMATION_START_EVENTS, function(type) {\r\n\t\taddListener(node, type, proxy);\r\n\t});\r\n\r\n\t// #4737: Chrome might skip the CSS animation when the CSS_RENDER_MONITOR class\r\n\t// is removed then added back immediately (same animation frame?). Accessing the\r\n\t// `offsetParent` property will force a reflow and re-evaluate the CSS animation.\r\n\t// https://gist.github.com/paulirish/5d52fb081b3570c81e3a#box-metrics\r\n\t// https://github.com/chartjs/Chart.js/issues/4737\r\n\texpando.reflow = !!node.offsetParent;\r\n\r\n\tnode.classList.add(CSS_RENDER_MONITOR);\r\n}\r\n\r\nfunction unwatchForRender(node) {\r\n\tvar expando = node[EXPANDO_KEY] || {};\r\n\tvar proxy = expando.renderProxy;\r\n\r\n\tif (proxy) {\r\n\t\thelpers$1.each(ANIMATION_START_EVENTS, function(type) {\r\n\t\t\tremoveListener(node, type, proxy);\r\n\t\t});\r\n\r\n\t\tdelete expando.renderProxy;\r\n\t}\r\n\r\n\tnode.classList.remove(CSS_RENDER_MONITOR);\r\n}\r\n\r\nfunction addResizeListener(node, listener, chart) {\r\n\tvar expando = node[EXPANDO_KEY] || (node[EXPANDO_KEY] = {});\r\n\r\n\t// Let's keep track of this added resizer and thus avoid DOM query when removing it.\r\n\tvar resizer = expando.resizer = createResizer(throttled(function() {\r\n\t\tif (expando.resizer) {\r\n\t\t\tvar container = chart.options.maintainAspectRatio && node.parentNode;\r\n\t\t\tvar w = container ? container.clientWidth : 0;\r\n\t\t\tlistener(createEvent('resize', chart));\r\n\t\t\tif (container && container.clientWidth < w && chart.canvas) {\r\n\t\t\t\t// If the container size shrank during chart resize, let's assume\r\n\t\t\t\t// scrollbar appeared. So we resize again with the scrollbar visible -\r\n\t\t\t\t// effectively making chart smaller and the scrollbar hidden again.\r\n\t\t\t\t// Because we are inside `throttled`, and currently `ticking`, scroll\r\n\t\t\t\t// events are ignored during this whole 2 resize process.\r\n\t\t\t\t// If we assumed wrong and something else happened, we are resizing\r\n\t\t\t\t// twice in a frame (potential performance issue)\r\n\t\t\t\tlistener(createEvent('resize', chart));\r\n\t\t\t}\r\n\t\t}\r\n\t}));\r\n\r\n\t// The resizer needs to be attached to the node parent, so we first need to be\r\n\t// sure that `node` is attached to the DOM before injecting the resizer element.\r\n\twatchForRender(node, function() {\r\n\t\tif (expando.resizer) {\r\n\t\t\tvar container = node.parentNode;\r\n\t\t\tif (container && container !== resizer.parentNode) {\r\n\t\t\t\tcontainer.insertBefore(resizer, container.firstChild);\r\n\t\t\t}\r\n\r\n\t\t\t// The container size might have changed, let's reset the resizer state.\r\n\t\t\tresizer._reset();\r\n\t\t}\r\n\t});\r\n}\r\n\r\nfunction removeResizeListener(node) {\r\n\tvar expando = node[EXPANDO_KEY] || {};\r\n\tvar resizer = expando.resizer;\r\n\r\n\tdelete expando.resizer;\r\n\tunwatchForRender(node);\r\n\r\n\tif (resizer && resizer.parentNode) {\r\n\t\tresizer.parentNode.removeChild(resizer);\r\n\t}\r\n}\r\n\r\n/**\r\n * Injects CSS styles inline if the styles are not already present.\r\n * @param {HTMLDocument|ShadowRoot} rootNode - the node to contain the \n","import { render, staticRenderFns } from \"./VueTypeaheadBootstrapListItem.vue?vue&type=template&id=6230cb76&scoped=true&\"\nimport script from \"./VueTypeaheadBootstrapListItem.vue?vue&type=script&lang=js&\"\nexport * from \"./VueTypeaheadBootstrapListItem.vue?vue&type=script&lang=js&\"\nimport style0 from \"./VueTypeaheadBootstrapListItem.vue?vue&type=style&index=0&id=6230cb76&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"6230cb76\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('a',{class:_vm.textClasses,attrs:{\"tabindex\":\"0\",\"href\":\"#\"},on:{\"keydown\":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"tab\",9,$event.key,\"Tab\")){ return null; }return _vm.$emit('listItemBlur')},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"esc\",27,$event.key,[\"Esc\",\"Escape\"])){ return null; }$event.stopPropagation();$event.preventDefault();return _vm.$emit('listItemBlur')},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"down\",40,$event.key,[\"Down\",\"ArrowDown\"])){ return null; }$event.preventDefault();},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"up\",38,$event.key,[\"Up\",\"ArrowUp\"])){ return null; }$event.preventDefault();}],\"keyup\":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"down\",40,$event.key,[\"Down\",\"ArrowDown\"])){ return null; }return _vm.$parent.selectNextListItem($event)},function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"up\",38,$event.key,[\"Up\",\"ArrowUp\"])){ return null; }return _vm.$parent.selectPreviousListItem($event)}],\"blur\":_vm.processFocusOut}},[_c('div',{staticClass:\"sr-only\"},[_vm._v(_vm._s(_vm.screenReaderText))]),_vm._v(\" \"),_c('div',{attrs:{\"aria-hidden\":\"true\"}},[_vm._t(\"suggestion\",[_c('span',{domProps:{\"innerHTML\":_vm._s(_vm.htmlText)}})],null,{ data: _vm.data, htmlText: _vm.htmlText })],2)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n \n \n \n \n \n \n
\n \n\n\n","import mod from \"-!../../../vue-loader/lib/index.js??vue-loader-options!./VueTypeaheadBootstrapList.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../vue-loader/lib/index.js??vue-loader-options!./VueTypeaheadBootstrapList.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./VueTypeaheadBootstrapList.vue?vue&type=template&id=e64f5270&\"\nimport script from \"./VueTypeaheadBootstrapList.vue?vue&type=script&lang=js&\"\nexport * from \"./VueTypeaheadBootstrapList.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{ref:\"suggestionList\",staticClass:\"list-group shadow\"},_vm._l((_vm.matchedItems),function(item,id){return _c('vue-typeahead-bootstrap-list-item',_vm._g({key:id,attrs:{\"active\":_vm.isListItemActive(id),\"id\":(_vm.isListItemActive(id)) ? (\"selected-option-\" + _vm.vbtUniqueId) : false,\"data\":item.data,\"html-text\":_vm.highlight(item.text),\"role\":\"option\",\"aria-selected\":(_vm.isListItemActive(id)) ? 'true' : 'false',\"screen-reader-text\":item.text,\"disabled\":_vm.isDisabledItem(item),\"background-variant\":_vm.backgroundVariant,\"background-variant-resolver\":_vm.backgroundVariantResolver,\"text-variant\":_vm.textVariant},nativeOn:{\"click\":function($event){return _vm.handleHit(item, $event)}},scopedSlots:_vm._u([{key:\"suggestion\",fn:function(ref){\nvar data = ref.data;\nvar htmlText = ref.htmlText;\nreturn (_vm.$scopedSlots.suggestion)?[_vm._t(\"suggestion\",null,null,{ data: data, htmlText: htmlText })]:undefined}}],null,true)},_vm.$listeners))}),1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../vue-loader/lib/index.js??vue-loader-options!./VueTypeaheadBootstrap.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../vue-loader/lib/index.js??vue-loader-options!./VueTypeaheadBootstrap.vue?vue&type=script&lang=js&\"","\n 0) ? 'true' : 'false'\"\n >\n
\n
\n \n {{ prepend }} \n \n
\n
\n
\n \n {{ append }} \n \n
\n
\n
0\"\n :query=\"inputValue\"\n :data=\"formattedData\"\n :background-variant=\"backgroundVariant\"\n :background-variant-resolver=\"backgroundVariantResolver\"\n :text-variant=\"textVariant\"\n :maxMatches=\"maxMatches\"\n :minMatchingChars=\"minMatchingChars\"\n :disableSort=\"disableSort\"\n :showOnFocus=\"showOnFocus\"\n :showAllResults=\"showAllResults\"\n @hit=\"handleHit\"\n @listItemBlur=\"handleChildBlur\"\n :highlightClass='highlightClass'\n :disabledValues=\"disabledValues\"\n :vbtUniqueId=\"id\"\n role=\"listbox\"\n >\n \n \n \n \n \n \n
\n \n\n\n\n\n","import { render, staticRenderFns } from \"./VueTypeaheadBootstrap.vue?vue&type=template&id=dbe69e32&scoped=true&\"\nimport script from \"./VueTypeaheadBootstrap.vue?vue&type=script&lang=js&\"\nexport * from \"./VueTypeaheadBootstrap.vue?vue&type=script&lang=js&\"\nimport style0 from \"./VueTypeaheadBootstrap.vue?vue&type=style&index=0&id=dbe69e32&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"dbe69e32\",\n null\n \n)\n\nexport default component.exports","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/*!\n * vue-i18n v8.24.1 \n * (c) 2021 kazuya kawaguchi\n * Released under the MIT License.\n */\n/* */\n\n/**\n * constants\n */\n\nvar numberFormatKeys = [\n 'compactDisplay',\n 'currency',\n 'currencyDisplay',\n 'currencySign',\n 'localeMatcher',\n 'notation',\n 'numberingSystem',\n 'signDisplay',\n 'style',\n 'unit',\n 'unitDisplay',\n 'useGrouping',\n 'minimumIntegerDigits',\n 'minimumFractionDigits',\n 'maximumFractionDigits',\n 'minimumSignificantDigits',\n 'maximumSignificantDigits'\n];\n\n/**\n * utilities\n */\n\nfunction warn (msg, err) {\n if (typeof console !== 'undefined') {\n console.warn('[vue-i18n] ' + msg);\n /* istanbul ignore if */\n if (err) {\n console.warn(err.stack);\n }\n }\n}\n\nfunction error (msg, err) {\n if (typeof console !== 'undefined') {\n console.error('[vue-i18n] ' + msg);\n /* istanbul ignore if */\n if (err) {\n console.error(err.stack);\n }\n }\n}\n\nvar isArray = Array.isArray;\n\nfunction isObject (obj) {\n return obj !== null && typeof obj === 'object'\n}\n\nfunction isBoolean (val) {\n return typeof val === 'boolean'\n}\n\nfunction isString (val) {\n return typeof val === 'string'\n}\n\nvar toString = Object.prototype.toString;\nvar OBJECT_STRING = '[object Object]';\nfunction isPlainObject (obj) {\n return toString.call(obj) === OBJECT_STRING\n}\n\nfunction isNull (val) {\n return val === null || val === undefined\n}\n\nfunction isFunction (val) {\n return typeof val === 'function'\n}\n\nfunction parseArgs () {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var locale = null;\n var params = null;\n if (args.length === 1) {\n if (isObject(args[0]) || isArray(args[0])) {\n params = args[0];\n } else if (typeof args[0] === 'string') {\n locale = args[0];\n }\n } else if (args.length === 2) {\n if (typeof args[0] === 'string') {\n locale = args[0];\n }\n /* istanbul ignore if */\n if (isObject(args[1]) || isArray(args[1])) {\n params = args[1];\n }\n }\n\n return { locale: locale, params: params }\n}\n\nfunction looseClone (obj) {\n return JSON.parse(JSON.stringify(obj))\n}\n\nfunction remove (arr, item) {\n if (arr.length) {\n var index = arr.indexOf(item);\n if (index > -1) {\n return arr.splice(index, 1)\n }\n }\n}\n\nfunction includes (arr, item) {\n return !!~arr.indexOf(item)\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction hasOwn (obj, key) {\n return hasOwnProperty.call(obj, key)\n}\n\nfunction merge (target) {\n var arguments$1 = arguments;\n\n var output = Object(target);\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments$1[i];\n if (source !== undefined && source !== null) {\n var key = (void 0);\n for (key in source) {\n if (hasOwn(source, key)) {\n if (isObject(source[key])) {\n output[key] = merge(output[key], source[key]);\n } else {\n output[key] = source[key];\n }\n }\n }\n }\n }\n return output\n}\n\nfunction looseEqual (a, b) {\n if (a === b) { return true }\n var isObjectA = isObject(a);\n var isObjectB = isObject(b);\n if (isObjectA && isObjectB) {\n try {\n var isArrayA = isArray(a);\n var isArrayB = isArray(b);\n if (isArrayA && isArrayB) {\n return a.length === b.length && a.every(function (e, i) {\n return looseEqual(e, b[i])\n })\n } else if (!isArrayA && !isArrayB) {\n var keysA = Object.keys(a);\n var keysB = Object.keys(b);\n return keysA.length === keysB.length && keysA.every(function (key) {\n return looseEqual(a[key], b[key])\n })\n } else {\n /* istanbul ignore next */\n return false\n }\n } catch (e) {\n /* istanbul ignore next */\n return false\n }\n } else if (!isObjectA && !isObjectB) {\n return String(a) === String(b)\n } else {\n return false\n }\n}\n\n/**\n * Sanitizes html special characters from input strings. For mitigating risk of XSS attacks.\n * @param rawText The raw input from the user that should be escaped.\n */\nfunction escapeHtml(rawText) {\n return rawText\n .replace(//g, '>')\n .replace(/\"/g, '"')\n .replace(/'/g, ''')\n}\n\n/**\n * Escapes html tags and special symbols from all provided params which were returned from parseArgs().params.\n * This method performs an in-place operation on the params object.\n *\n * @param {any} params Parameters as provided from `parseArgs().params`.\n * May be either an array of strings or a string->any map.\n *\n * @returns The manipulated `params` object.\n */\nfunction escapeParams(params) {\n if(params != null) {\n Object.keys(params).forEach(function (key) {\n if(typeof(params[key]) == 'string') {\n params[key] = escapeHtml(params[key]);\n }\n });\n }\n return params\n}\n\n/* */\n\nfunction extend (Vue) {\n if (!Vue.prototype.hasOwnProperty('$i18n')) {\n // $FlowFixMe\n Object.defineProperty(Vue.prototype, '$i18n', {\n get: function get () { return this._i18n }\n });\n }\n\n Vue.prototype.$t = function (key) {\n var values = [], len = arguments.length - 1;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];\n\n var i18n = this.$i18n;\n return i18n._t.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this ].concat( values ))\n };\n\n Vue.prototype.$tc = function (key, choice) {\n var values = [], len = arguments.length - 2;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];\n\n var i18n = this.$i18n;\n return i18n._tc.apply(i18n, [ key, i18n.locale, i18n._getMessages(), this, choice ].concat( values ))\n };\n\n Vue.prototype.$te = function (key, locale) {\n var i18n = this.$i18n;\n return i18n._te(key, i18n.locale, i18n._getMessages(), locale)\n };\n\n Vue.prototype.$d = function (value) {\n var ref;\n\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n return (ref = this.$i18n).d.apply(ref, [ value ].concat( args ))\n };\n\n Vue.prototype.$n = function (value) {\n var ref;\n\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n return (ref = this.$i18n).n.apply(ref, [ value ].concat( args ))\n };\n}\n\n/* */\n\nvar mixin = {\n beforeCreate: function beforeCreate () {\n var options = this.$options;\n options.i18n = options.i18n || (options.__i18n ? {} : null);\n\n if (options.i18n) {\n if (options.i18n instanceof VueI18n) {\n // init locale messages via custom blocks\n if (options.__i18n) {\n try {\n var localeMessages = options.i18n && options.i18n.messages ? options.i18n.messages : {};\n options.__i18n.forEach(function (resource) {\n localeMessages = merge(localeMessages, JSON.parse(resource));\n });\n Object.keys(localeMessages).forEach(function (locale) {\n options.i18n.mergeLocaleMessage(locale, localeMessages[locale]);\n });\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n error(\"Cannot parse locale messages via custom blocks.\", e);\n }\n }\n }\n this._i18n = options.i18n;\n this._i18nWatcher = this._i18n.watchI18nData();\n } else if (isPlainObject(options.i18n)) {\n var rootI18n = this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n\n ? this.$root.$i18n\n : null;\n // component local i18n\n if (rootI18n) {\n options.i18n.root = this.$root;\n options.i18n.formatter = rootI18n.formatter;\n options.i18n.fallbackLocale = rootI18n.fallbackLocale;\n options.i18n.formatFallbackMessages = rootI18n.formatFallbackMessages;\n options.i18n.silentTranslationWarn = rootI18n.silentTranslationWarn;\n options.i18n.silentFallbackWarn = rootI18n.silentFallbackWarn;\n options.i18n.pluralizationRules = rootI18n.pluralizationRules;\n options.i18n.preserveDirectiveContent = rootI18n.preserveDirectiveContent;\n }\n\n // init locale messages via custom blocks\n if (options.__i18n) {\n try {\n var localeMessages$1 = options.i18n && options.i18n.messages ? options.i18n.messages : {};\n options.__i18n.forEach(function (resource) {\n localeMessages$1 = merge(localeMessages$1, JSON.parse(resource));\n });\n options.i18n.messages = localeMessages$1;\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot parse locale messages via custom blocks.\", e);\n }\n }\n }\n\n var ref = options.i18n;\n var sharedMessages = ref.sharedMessages;\n if (sharedMessages && isPlainObject(sharedMessages)) {\n options.i18n.messages = merge(options.i18n.messages, sharedMessages);\n }\n\n this._i18n = new VueI18n(options.i18n);\n this._i18nWatcher = this._i18n.watchI18nData();\n\n if (options.i18n.sync === undefined || !!options.i18n.sync) {\n this._localeWatcher = this.$i18n.watchLocale();\n }\n\n if (rootI18n) {\n rootI18n.onComponentInstanceCreated(this._i18n);\n }\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot be interpreted 'i18n' option.\");\n }\n }\n } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {\n // root i18n\n this._i18n = this.$root.$i18n;\n } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {\n // parent i18n\n this._i18n = options.parent.$i18n;\n }\n },\n\n beforeMount: function beforeMount () {\n var options = this.$options;\n options.i18n = options.i18n || (options.__i18n ? {} : null);\n\n if (options.i18n) {\n if (options.i18n instanceof VueI18n) {\n // init locale messages via custom blocks\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else if (isPlainObject(options.i18n)) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Cannot be interpreted 'i18n' option.\");\n }\n }\n } else if (this.$root && this.$root.$i18n && this.$root.$i18n instanceof VueI18n) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n } else if (options.parent && options.parent.$i18n && options.parent.$i18n instanceof VueI18n) {\n this._i18n.subscribeDataChanging(this);\n this._subscribing = true;\n }\n },\n\n mounted: function mounted () {\n if (this !== this.$root && this.$options.__INTLIFY_META__ && this.$el) {\n this.$el.setAttribute('data-intlify', this.$options.__INTLIFY_META__);\n }\n },\n\n beforeDestroy: function beforeDestroy () {\n if (!this._i18n) { return }\n\n var self = this;\n this.$nextTick(function () {\n if (self._subscribing) {\n self._i18n.unsubscribeDataChanging(self);\n delete self._subscribing;\n }\n\n if (self._i18nWatcher) {\n self._i18nWatcher();\n self._i18n.destroyVM();\n delete self._i18nWatcher;\n }\n\n if (self._localeWatcher) {\n self._localeWatcher();\n delete self._localeWatcher;\n }\n });\n }\n};\n\n/* */\n\nvar interpolationComponent = {\n name: 'i18n',\n functional: true,\n props: {\n tag: {\n type: [String, Boolean, Object],\n default: 'span'\n },\n path: {\n type: String,\n required: true\n },\n locale: {\n type: String\n },\n places: {\n type: [Array, Object]\n }\n },\n render: function render (h, ref) {\n var data = ref.data;\n var parent = ref.parent;\n var props = ref.props;\n var slots = ref.slots;\n\n var $i18n = parent.$i18n;\n if (!$i18n) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot find VueI18n instance!');\n }\n return\n }\n\n var path = props.path;\n var locale = props.locale;\n var places = props.places;\n var params = slots();\n var children = $i18n.i(\n path,\n locale,\n onlyHasDefaultPlace(params) || places\n ? useLegacyPlaces(params.default, places)\n : params\n );\n\n var tag = (!!props.tag && props.tag !== true) || props.tag === false ? props.tag : 'span';\n return tag ? h(tag, data, children) : children\n }\n};\n\nfunction onlyHasDefaultPlace (params) {\n var prop;\n for (prop in params) {\n if (prop !== 'default') { return false }\n }\n return Boolean(prop)\n}\n\nfunction useLegacyPlaces (children, places) {\n var params = places ? createParamsFromPlaces(places) : {};\n\n if (!children) { return params }\n\n // Filter empty text nodes\n children = children.filter(function (child) {\n return child.tag || child.text.trim() !== ''\n });\n\n var everyPlace = children.every(vnodeHasPlaceAttribute);\n if (process.env.NODE_ENV !== 'production' && everyPlace) {\n warn('`place` attribute is deprecated in next major version. Please switch to Vue slots.');\n }\n\n return children.reduce(\n everyPlace ? assignChildPlace : assignChildIndex,\n params\n )\n}\n\nfunction createParamsFromPlaces (places) {\n if (process.env.NODE_ENV !== 'production') {\n warn('`places` prop is deprecated in next major version. Please switch to Vue slots.');\n }\n\n return Array.isArray(places)\n ? places.reduce(assignChildIndex, {})\n : Object.assign({}, places)\n}\n\nfunction assignChildPlace (params, child) {\n if (child.data && child.data.attrs && child.data.attrs.place) {\n params[child.data.attrs.place] = child;\n }\n return params\n}\n\nfunction assignChildIndex (params, child, index) {\n params[index] = child;\n return params\n}\n\nfunction vnodeHasPlaceAttribute (vnode) {\n return Boolean(vnode.data && vnode.data.attrs && vnode.data.attrs.place)\n}\n\n/* */\n\nvar numberComponent = {\n name: 'i18n-n',\n functional: true,\n props: {\n tag: {\n type: [String, Boolean, Object],\n default: 'span'\n },\n value: {\n type: Number,\n required: true\n },\n format: {\n type: [String, Object]\n },\n locale: {\n type: String\n }\n },\n render: function render (h, ref) {\n var props = ref.props;\n var parent = ref.parent;\n var data = ref.data;\n\n var i18n = parent.$i18n;\n\n if (!i18n) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot find VueI18n instance!');\n }\n return null\n }\n\n var key = null;\n var options = null;\n\n if (isString(props.format)) {\n key = props.format;\n } else if (isObject(props.format)) {\n if (props.format.key) {\n key = props.format.key;\n }\n\n // Filter out number format options only\n options = Object.keys(props.format).reduce(function (acc, prop) {\n var obj;\n\n if (includes(numberFormatKeys, prop)) {\n return Object.assign({}, acc, ( obj = {}, obj[prop] = props.format[prop], obj ))\n }\n return acc\n }, null);\n }\n\n var locale = props.locale || i18n.locale;\n var parts = i18n._ntp(props.value, locale, key, options);\n\n var values = parts.map(function (part, index) {\n var obj;\n\n var slot = data.scopedSlots && data.scopedSlots[part.type];\n return slot ? slot(( obj = {}, obj[part.type] = part.value, obj.index = index, obj.parts = parts, obj )) : part.value\n });\n\n var tag = (!!props.tag && props.tag !== true) || props.tag === false ? props.tag : 'span';\n return tag\n ? h(tag, {\n attrs: data.attrs,\n 'class': data['class'],\n staticClass: data.staticClass\n }, values)\n : values\n }\n};\n\n/* */\n\nfunction bind (el, binding, vnode) {\n if (!assert(el, vnode)) { return }\n\n t(el, binding, vnode);\n}\n\nfunction update (el, binding, vnode, oldVNode) {\n if (!assert(el, vnode)) { return }\n\n var i18n = vnode.context.$i18n;\n if (localeEqual(el, vnode) &&\n (looseEqual(binding.value, binding.oldValue) &&\n looseEqual(el._localeMessage, i18n.getLocaleMessage(i18n.locale)))) { return }\n\n t(el, binding, vnode);\n}\n\nfunction unbind (el, binding, vnode, oldVNode) {\n var vm = vnode.context;\n if (!vm) {\n warn('Vue instance does not exists in VNode context');\n return\n }\n\n var i18n = vnode.context.$i18n || {};\n if (!binding.modifiers.preserve && !i18n.preserveDirectiveContent) {\n el.textContent = '';\n }\n el._vt = undefined;\n delete el['_vt'];\n el._locale = undefined;\n delete el['_locale'];\n el._localeMessage = undefined;\n delete el['_localeMessage'];\n}\n\nfunction assert (el, vnode) {\n var vm = vnode.context;\n if (!vm) {\n warn('Vue instance does not exists in VNode context');\n return false\n }\n\n if (!vm.$i18n) {\n warn('VueI18n instance does not exists in Vue instance');\n return false\n }\n\n return true\n}\n\nfunction localeEqual (el, vnode) {\n var vm = vnode.context;\n return el._locale === vm.$i18n.locale\n}\n\nfunction t (el, binding, vnode) {\n var ref$1, ref$2;\n\n var value = binding.value;\n\n var ref = parseValue(value);\n var path = ref.path;\n var locale = ref.locale;\n var args = ref.args;\n var choice = ref.choice;\n if (!path && !locale && !args) {\n warn('value type not supported');\n return\n }\n\n if (!path) {\n warn('`path` is required in v-t directive');\n return\n }\n\n var vm = vnode.context;\n if (choice != null) {\n el._vt = el.textContent = (ref$1 = vm.$i18n).tc.apply(ref$1, [ path, choice ].concat( makeParams(locale, args) ));\n } else {\n el._vt = el.textContent = (ref$2 = vm.$i18n).t.apply(ref$2, [ path ].concat( makeParams(locale, args) ));\n }\n el._locale = vm.$i18n.locale;\n el._localeMessage = vm.$i18n.getLocaleMessage(vm.$i18n.locale);\n}\n\nfunction parseValue (value) {\n var path;\n var locale;\n var args;\n var choice;\n\n if (isString(value)) {\n path = value;\n } else if (isPlainObject(value)) {\n path = value.path;\n locale = value.locale;\n args = value.args;\n choice = value.choice;\n }\n\n return { path: path, locale: locale, args: args, choice: choice }\n}\n\nfunction makeParams (locale, args) {\n var params = [];\n\n locale && params.push(locale);\n if (args && (Array.isArray(args) || isPlainObject(args))) {\n params.push(args);\n }\n\n return params\n}\n\nvar Vue;\n\nfunction install (_Vue) {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && install.installed && _Vue === Vue) {\n warn('already installed.');\n return\n }\n install.installed = true;\n\n Vue = _Vue;\n\n var version = (Vue.version && Number(Vue.version.split('.')[0])) || -1;\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && version < 2) {\n warn((\"vue-i18n (\" + (install.version) + \") need to use Vue 2.0 or later (Vue: \" + (Vue.version) + \").\"));\n return\n }\n\n extend(Vue);\n Vue.mixin(mixin);\n Vue.directive('t', { bind: bind, update: update, unbind: unbind });\n Vue.component(interpolationComponent.name, interpolationComponent);\n Vue.component(numberComponent.name, numberComponent);\n\n // use simple mergeStrategies to prevent i18n instance lose '__proto__'\n var strats = Vue.config.optionMergeStrategies;\n strats.i18n = function (parentVal, childVal) {\n return childVal === undefined\n ? parentVal\n : childVal\n };\n}\n\n/* */\n\nvar BaseFormatter = function BaseFormatter () {\n this._caches = Object.create(null);\n};\n\nBaseFormatter.prototype.interpolate = function interpolate (message, values) {\n if (!values) {\n return [message]\n }\n var tokens = this._caches[message];\n if (!tokens) {\n tokens = parse(message);\n this._caches[message] = tokens;\n }\n return compile(tokens, values)\n};\n\n\n\nvar RE_TOKEN_LIST_VALUE = /^(?:\\d)+/;\nvar RE_TOKEN_NAMED_VALUE = /^(?:\\w)+/;\n\nfunction parse (format) {\n var tokens = [];\n var position = 0;\n\n var text = '';\n while (position < format.length) {\n var char = format[position++];\n if (char === '{') {\n if (text) {\n tokens.push({ type: 'text', value: text });\n }\n\n text = '';\n var sub = '';\n char = format[position++];\n while (char !== undefined && char !== '}') {\n sub += char;\n char = format[position++];\n }\n var isClosed = char === '}';\n\n var type = RE_TOKEN_LIST_VALUE.test(sub)\n ? 'list'\n : isClosed && RE_TOKEN_NAMED_VALUE.test(sub)\n ? 'named'\n : 'unknown';\n tokens.push({ value: sub, type: type });\n } else if (char === '%') {\n // when found rails i18n syntax, skip text capture\n if (format[(position)] !== '{') {\n text += char;\n }\n } else {\n text += char;\n }\n }\n\n text && tokens.push({ type: 'text', value: text });\n\n return tokens\n}\n\nfunction compile (tokens, values) {\n var compiled = [];\n var index = 0;\n\n var mode = Array.isArray(values)\n ? 'list'\n : isObject(values)\n ? 'named'\n : 'unknown';\n if (mode === 'unknown') { return compiled }\n\n while (index < tokens.length) {\n var token = tokens[index];\n switch (token.type) {\n case 'text':\n compiled.push(token.value);\n break\n case 'list':\n compiled.push(values[parseInt(token.value, 10)]);\n break\n case 'named':\n if (mode === 'named') {\n compiled.push((values)[token.value]);\n } else {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Type of token '\" + (token.type) + \"' and format of value '\" + mode + \"' don't match!\"));\n }\n }\n break\n case 'unknown':\n if (process.env.NODE_ENV !== 'production') {\n warn(\"Detect 'unknown' type of token!\");\n }\n break\n }\n index++;\n }\n\n return compiled\n}\n\n/* */\n\n/**\n * Path parser\n * - Inspired:\n * Vue.js Path parser\n */\n\n// actions\nvar APPEND = 0;\nvar PUSH = 1;\nvar INC_SUB_PATH_DEPTH = 2;\nvar PUSH_SUB_PATH = 3;\n\n// states\nvar BEFORE_PATH = 0;\nvar IN_PATH = 1;\nvar BEFORE_IDENT = 2;\nvar IN_IDENT = 3;\nvar IN_SUB_PATH = 4;\nvar IN_SINGLE_QUOTE = 5;\nvar IN_DOUBLE_QUOTE = 6;\nvar AFTER_PATH = 7;\nvar ERROR = 8;\n\nvar pathStateMachine = [];\n\npathStateMachine[BEFORE_PATH] = {\n 'ws': [BEFORE_PATH],\n 'ident': [IN_IDENT, APPEND],\n '[': [IN_SUB_PATH],\n 'eof': [AFTER_PATH]\n};\n\npathStateMachine[IN_PATH] = {\n 'ws': [IN_PATH],\n '.': [BEFORE_IDENT],\n '[': [IN_SUB_PATH],\n 'eof': [AFTER_PATH]\n};\n\npathStateMachine[BEFORE_IDENT] = {\n 'ws': [BEFORE_IDENT],\n 'ident': [IN_IDENT, APPEND],\n '0': [IN_IDENT, APPEND],\n 'number': [IN_IDENT, APPEND]\n};\n\npathStateMachine[IN_IDENT] = {\n 'ident': [IN_IDENT, APPEND],\n '0': [IN_IDENT, APPEND],\n 'number': [IN_IDENT, APPEND],\n 'ws': [IN_PATH, PUSH],\n '.': [BEFORE_IDENT, PUSH],\n '[': [IN_SUB_PATH, PUSH],\n 'eof': [AFTER_PATH, PUSH]\n};\n\npathStateMachine[IN_SUB_PATH] = {\n \"'\": [IN_SINGLE_QUOTE, APPEND],\n '\"': [IN_DOUBLE_QUOTE, APPEND],\n '[': [IN_SUB_PATH, INC_SUB_PATH_DEPTH],\n ']': [IN_PATH, PUSH_SUB_PATH],\n 'eof': ERROR,\n 'else': [IN_SUB_PATH, APPEND]\n};\n\npathStateMachine[IN_SINGLE_QUOTE] = {\n \"'\": [IN_SUB_PATH, APPEND],\n 'eof': ERROR,\n 'else': [IN_SINGLE_QUOTE, APPEND]\n};\n\npathStateMachine[IN_DOUBLE_QUOTE] = {\n '\"': [IN_SUB_PATH, APPEND],\n 'eof': ERROR,\n 'else': [IN_DOUBLE_QUOTE, APPEND]\n};\n\n/**\n * Check if an expression is a literal value.\n */\n\nvar literalValueRE = /^\\s?(?:true|false|-?[\\d.]+|'[^']*'|\"[^\"]*\")\\s?$/;\nfunction isLiteral (exp) {\n return literalValueRE.test(exp)\n}\n\n/**\n * Strip quotes from a string\n */\n\nfunction stripQuotes (str) {\n var a = str.charCodeAt(0);\n var b = str.charCodeAt(str.length - 1);\n return a === b && (a === 0x22 || a === 0x27)\n ? str.slice(1, -1)\n : str\n}\n\n/**\n * Determine the type of a character in a keypath.\n */\n\nfunction getPathCharType (ch) {\n if (ch === undefined || ch === null) { return 'eof' }\n\n var code = ch.charCodeAt(0);\n\n switch (code) {\n case 0x5B: // [\n case 0x5D: // ]\n case 0x2E: // .\n case 0x22: // \"\n case 0x27: // '\n return ch\n\n case 0x5F: // _\n case 0x24: // $\n case 0x2D: // -\n return 'ident'\n\n case 0x09: // Tab\n case 0x0A: // Newline\n case 0x0D: // Return\n case 0xA0: // No-break space\n case 0xFEFF: // Byte Order Mark\n case 0x2028: // Line Separator\n case 0x2029: // Paragraph Separator\n return 'ws'\n }\n\n return 'ident'\n}\n\n/**\n * Format a subPath, return its plain form if it is\n * a literal string or number. Otherwise prepend the\n * dynamic indicator (*).\n */\n\nfunction formatSubPath (path) {\n var trimmed = path.trim();\n // invalid leading 0\n if (path.charAt(0) === '0' && isNaN(path)) { return false }\n\n return isLiteral(trimmed) ? stripQuotes(trimmed) : '*' + trimmed\n}\n\n/**\n * Parse a string path into an array of segments\n */\n\nfunction parse$1 (path) {\n var keys = [];\n var index = -1;\n var mode = BEFORE_PATH;\n var subPathDepth = 0;\n var c;\n var key;\n var newChar;\n var type;\n var transition;\n var action;\n var typeMap;\n var actions = [];\n\n actions[PUSH] = function () {\n if (key !== undefined) {\n keys.push(key);\n key = undefined;\n }\n };\n\n actions[APPEND] = function () {\n if (key === undefined) {\n key = newChar;\n } else {\n key += newChar;\n }\n };\n\n actions[INC_SUB_PATH_DEPTH] = function () {\n actions[APPEND]();\n subPathDepth++;\n };\n\n actions[PUSH_SUB_PATH] = function () {\n if (subPathDepth > 0) {\n subPathDepth--;\n mode = IN_SUB_PATH;\n actions[APPEND]();\n } else {\n subPathDepth = 0;\n if (key === undefined) { return false }\n key = formatSubPath(key);\n if (key === false) {\n return false\n } else {\n actions[PUSH]();\n }\n }\n };\n\n function maybeUnescapeQuote () {\n var nextChar = path[index + 1];\n if ((mode === IN_SINGLE_QUOTE && nextChar === \"'\") ||\n (mode === IN_DOUBLE_QUOTE && nextChar === '\"')) {\n index++;\n newChar = '\\\\' + nextChar;\n actions[APPEND]();\n return true\n }\n }\n\n while (mode !== null) {\n index++;\n c = path[index];\n\n if (c === '\\\\' && maybeUnescapeQuote()) {\n continue\n }\n\n type = getPathCharType(c);\n typeMap = pathStateMachine[mode];\n transition = typeMap[type] || typeMap['else'] || ERROR;\n\n if (transition === ERROR) {\n return // parse error\n }\n\n mode = transition[0];\n action = actions[transition[1]];\n if (action) {\n newChar = transition[2];\n newChar = newChar === undefined\n ? c\n : newChar;\n if (action() === false) {\n return\n }\n }\n\n if (mode === AFTER_PATH) {\n return keys\n }\n }\n}\n\n\n\n\n\nvar I18nPath = function I18nPath () {\n this._cache = Object.create(null);\n};\n\n/**\n * External parse that check for a cache hit first\n */\nI18nPath.prototype.parsePath = function parsePath (path) {\n var hit = this._cache[path];\n if (!hit) {\n hit = parse$1(path);\n if (hit) {\n this._cache[path] = hit;\n }\n }\n return hit || []\n};\n\n/**\n * Get path value from path string\n */\nI18nPath.prototype.getPathValue = function getPathValue (obj, path) {\n if (!isObject(obj)) { return null }\n\n var paths = this.parsePath(path);\n if (paths.length === 0) {\n return null\n } else {\n var length = paths.length;\n var last = obj;\n var i = 0;\n while (i < length) {\n var value = last[paths[i]];\n if (value === undefined || value === null) {\n return null\n }\n last = value;\n i++;\n }\n\n return last\n }\n};\n\n/* */\n\n\n\nvar htmlTagMatcher = /<\\/?[\\w\\s=\"/.':;#-\\/]+>/;\nvar linkKeyMatcher = /(?:@(?:\\.[a-z]+)?:(?:[\\w\\-_|.]+|\\([\\w\\-_|.]+\\)))/g;\nvar linkKeyPrefixMatcher = /^@(?:\\.([a-z]+))?:/;\nvar bracketsMatcher = /[()]/g;\nvar defaultModifiers = {\n 'upper': function (str) { return str.toLocaleUpperCase(); },\n 'lower': function (str) { return str.toLocaleLowerCase(); },\n 'capitalize': function (str) { return (\"\" + (str.charAt(0).toLocaleUpperCase()) + (str.substr(1))); }\n};\n\nvar defaultFormatter = new BaseFormatter();\n\nvar VueI18n = function VueI18n (options) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n // Auto install if it is not done yet and `window` has `Vue`.\n // To allow users to avoid auto-installation in some cases,\n // this code should be placed here. See #290\n /* istanbul ignore if */\n if (!Vue && typeof window !== 'undefined' && window.Vue) {\n install(window.Vue);\n }\n\n var locale = options.locale || 'en-US';\n var fallbackLocale = options.fallbackLocale === false\n ? false\n : options.fallbackLocale || 'en-US';\n var messages = options.messages || {};\n var dateTimeFormats = options.dateTimeFormats || {};\n var numberFormats = options.numberFormats || {};\n\n this._vm = null;\n this._formatter = options.formatter || defaultFormatter;\n this._modifiers = options.modifiers || {};\n this._missing = options.missing || null;\n this._root = options.root || null;\n this._sync = options.sync === undefined ? true : !!options.sync;\n this._fallbackRoot = options.fallbackRoot === undefined\n ? true\n : !!options.fallbackRoot;\n this._formatFallbackMessages = options.formatFallbackMessages === undefined\n ? false\n : !!options.formatFallbackMessages;\n this._silentTranslationWarn = options.silentTranslationWarn === undefined\n ? false\n : options.silentTranslationWarn;\n this._silentFallbackWarn = options.silentFallbackWarn === undefined\n ? false\n : !!options.silentFallbackWarn;\n this._dateTimeFormatters = {};\n this._numberFormatters = {};\n this._path = new I18nPath();\n this._dataListeners = [];\n this._componentInstanceCreatedListener = options.componentInstanceCreatedListener || null;\n this._preserveDirectiveContent = options.preserveDirectiveContent === undefined\n ? false\n : !!options.preserveDirectiveContent;\n this.pluralizationRules = options.pluralizationRules || {};\n this._warnHtmlInMessage = options.warnHtmlInMessage || 'off';\n this._postTranslation = options.postTranslation || null;\n this._escapeParameterHtml = options.escapeParameterHtml || false;\n\n /**\n * @param choice {number} a choice index given by the input to $tc: `$tc('path.to.rule', choiceIndex)`\n * @param choicesLength {number} an overall amount of available choices\n * @returns a final choice index\n */\n this.getChoiceIndex = function (choice, choicesLength) {\n var thisPrototype = Object.getPrototypeOf(this$1);\n if (thisPrototype && thisPrototype.getChoiceIndex) {\n var prototypeGetChoiceIndex = (thisPrototype.getChoiceIndex);\n return (prototypeGetChoiceIndex).call(this$1, choice, choicesLength)\n }\n\n // Default (old) getChoiceIndex implementation - english-compatible\n var defaultImpl = function (_choice, _choicesLength) {\n _choice = Math.abs(_choice);\n\n if (_choicesLength === 2) {\n return _choice\n ? _choice > 1\n ? 1\n : 0\n : 1\n }\n\n return _choice ? Math.min(_choice, 2) : 0\n };\n\n if (this$1.locale in this$1.pluralizationRules) {\n return this$1.pluralizationRules[this$1.locale].apply(this$1, [choice, choicesLength])\n } else {\n return defaultImpl(choice, choicesLength)\n }\n };\n\n\n this._exist = function (message, key) {\n if (!message || !key) { return false }\n if (!isNull(this$1._path.getPathValue(message, key))) { return true }\n // fallback for flat key\n if (message[key]) { return true }\n return false\n };\n\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n Object.keys(messages).forEach(function (locale) {\n this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);\n });\n }\n\n this._initVM({\n locale: locale,\n fallbackLocale: fallbackLocale,\n messages: messages,\n dateTimeFormats: dateTimeFormats,\n numberFormats: numberFormats\n });\n};\n\nvar prototypeAccessors = { vm: { configurable: true },messages: { configurable: true },dateTimeFormats: { configurable: true },numberFormats: { configurable: true },availableLocales: { configurable: true },locale: { configurable: true },fallbackLocale: { configurable: true },formatFallbackMessages: { configurable: true },missing: { configurable: true },formatter: { configurable: true },silentTranslationWarn: { configurable: true },silentFallbackWarn: { configurable: true },preserveDirectiveContent: { configurable: true },warnHtmlInMessage: { configurable: true },postTranslation: { configurable: true } };\n\nVueI18n.prototype._checkLocaleMessage = function _checkLocaleMessage (locale, level, message) {\n var paths = [];\n\n var fn = function (level, locale, message, paths) {\n if (isPlainObject(message)) {\n Object.keys(message).forEach(function (key) {\n var val = message[key];\n if (isPlainObject(val)) {\n paths.push(key);\n paths.push('.');\n fn(level, locale, val, paths);\n paths.pop();\n paths.pop();\n } else {\n paths.push(key);\n fn(level, locale, val, paths);\n paths.pop();\n }\n });\n } else if (isArray(message)) {\n message.forEach(function (item, index) {\n if (isPlainObject(item)) {\n paths.push((\"[\" + index + \"]\"));\n paths.push('.');\n fn(level, locale, item, paths);\n paths.pop();\n paths.pop();\n } else {\n paths.push((\"[\" + index + \"]\"));\n fn(level, locale, item, paths);\n paths.pop();\n }\n });\n } else if (isString(message)) {\n var ret = htmlTagMatcher.test(message);\n if (ret) {\n var msg = \"Detected HTML in message '\" + message + \"' of keypath '\" + (paths.join('')) + \"' at '\" + locale + \"'. Consider component interpolation with '' to avoid XSS. See https://bit.ly/2ZqJzkp\";\n if (level === 'warn') {\n warn(msg);\n } else if (level === 'error') {\n error(msg);\n }\n }\n }\n };\n\n fn(level, locale, message, paths);\n};\n\nVueI18n.prototype._initVM = function _initVM (data) {\n var silent = Vue.config.silent;\n Vue.config.silent = true;\n this._vm = new Vue({ data: data });\n Vue.config.silent = silent;\n};\n\nVueI18n.prototype.destroyVM = function destroyVM () {\n this._vm.$destroy();\n};\n\nVueI18n.prototype.subscribeDataChanging = function subscribeDataChanging (vm) {\n this._dataListeners.push(vm);\n};\n\nVueI18n.prototype.unsubscribeDataChanging = function unsubscribeDataChanging (vm) {\n remove(this._dataListeners, vm);\n};\n\nVueI18n.prototype.watchI18nData = function watchI18nData () {\n var self = this;\n return this._vm.$watch('$data', function () {\n var i = self._dataListeners.length;\n while (i--) {\n Vue.nextTick(function () {\n self._dataListeners[i] && self._dataListeners[i].$forceUpdate();\n });\n }\n }, { deep: true })\n};\n\nVueI18n.prototype.watchLocale = function watchLocale () {\n /* istanbul ignore if */\n if (!this._sync || !this._root) { return null }\n var target = this._vm;\n return this._root.$i18n.vm.$watch('locale', function (val) {\n target.$set(target, 'locale', val);\n target.$forceUpdate();\n }, { immediate: true })\n};\n\nVueI18n.prototype.onComponentInstanceCreated = function onComponentInstanceCreated (newI18n) {\n if (this._componentInstanceCreatedListener) {\n this._componentInstanceCreatedListener(newI18n, this);\n }\n};\n\nprototypeAccessors.vm.get = function () { return this._vm };\n\nprototypeAccessors.messages.get = function () { return looseClone(this._getMessages()) };\nprototypeAccessors.dateTimeFormats.get = function () { return looseClone(this._getDateTimeFormats()) };\nprototypeAccessors.numberFormats.get = function () { return looseClone(this._getNumberFormats()) };\nprototypeAccessors.availableLocales.get = function () { return Object.keys(this.messages).sort() };\n\nprototypeAccessors.locale.get = function () { return this._vm.locale };\nprototypeAccessors.locale.set = function (locale) {\n this._vm.$set(this._vm, 'locale', locale);\n};\n\nprototypeAccessors.fallbackLocale.get = function () { return this._vm.fallbackLocale };\nprototypeAccessors.fallbackLocale.set = function (locale) {\n this._localeChainCache = {};\n this._vm.$set(this._vm, 'fallbackLocale', locale);\n};\n\nprototypeAccessors.formatFallbackMessages.get = function () { return this._formatFallbackMessages };\nprototypeAccessors.formatFallbackMessages.set = function (fallback) { this._formatFallbackMessages = fallback; };\n\nprototypeAccessors.missing.get = function () { return this._missing };\nprototypeAccessors.missing.set = function (handler) { this._missing = handler; };\n\nprototypeAccessors.formatter.get = function () { return this._formatter };\nprototypeAccessors.formatter.set = function (formatter) { this._formatter = formatter; };\n\nprototypeAccessors.silentTranslationWarn.get = function () { return this._silentTranslationWarn };\nprototypeAccessors.silentTranslationWarn.set = function (silent) { this._silentTranslationWarn = silent; };\n\nprototypeAccessors.silentFallbackWarn.get = function () { return this._silentFallbackWarn };\nprototypeAccessors.silentFallbackWarn.set = function (silent) { this._silentFallbackWarn = silent; };\n\nprototypeAccessors.preserveDirectiveContent.get = function () { return this._preserveDirectiveContent };\nprototypeAccessors.preserveDirectiveContent.set = function (preserve) { this._preserveDirectiveContent = preserve; };\n\nprototypeAccessors.warnHtmlInMessage.get = function () { return this._warnHtmlInMessage };\nprototypeAccessors.warnHtmlInMessage.set = function (level) {\n var this$1 = this;\n\n var orgLevel = this._warnHtmlInMessage;\n this._warnHtmlInMessage = level;\n if (orgLevel !== level && (level === 'warn' || level === 'error')) {\n var messages = this._getMessages();\n Object.keys(messages).forEach(function (locale) {\n this$1._checkLocaleMessage(locale, this$1._warnHtmlInMessage, messages[locale]);\n });\n }\n};\n\nprototypeAccessors.postTranslation.get = function () { return this._postTranslation };\nprototypeAccessors.postTranslation.set = function (handler) { this._postTranslation = handler; };\n\nVueI18n.prototype._getMessages = function _getMessages () { return this._vm.messages };\nVueI18n.prototype._getDateTimeFormats = function _getDateTimeFormats () { return this._vm.dateTimeFormats };\nVueI18n.prototype._getNumberFormats = function _getNumberFormats () { return this._vm.numberFormats };\n\nVueI18n.prototype._warnDefault = function _warnDefault (locale, key, result, vm, values, interpolateMode) {\n if (!isNull(result)) { return result }\n if (this._missing) {\n var missingRet = this._missing.apply(null, [locale, key, vm, values]);\n if (isString(missingRet)) {\n return missingRet\n }\n } else {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn(\n \"Cannot translate the value of keypath '\" + key + \"'. \" +\n 'Use the value of keypath as default.'\n );\n }\n }\n\n if (this._formatFallbackMessages) {\n var parsedArgs = parseArgs.apply(void 0, values);\n return this._render(key, interpolateMode, parsedArgs.params, key)\n } else {\n return key\n }\n};\n\nVueI18n.prototype._isFallbackRoot = function _isFallbackRoot (val) {\n return !val && !isNull(this._root) && this._fallbackRoot\n};\n\nVueI18n.prototype._isSilentFallbackWarn = function _isSilentFallbackWarn (key) {\n return this._silentFallbackWarn instanceof RegExp\n ? this._silentFallbackWarn.test(key)\n : this._silentFallbackWarn\n};\n\nVueI18n.prototype._isSilentFallback = function _isSilentFallback (locale, key) {\n return this._isSilentFallbackWarn(key) && (this._isFallbackRoot() || locale !== this.fallbackLocale)\n};\n\nVueI18n.prototype._isSilentTranslationWarn = function _isSilentTranslationWarn (key) {\n return this._silentTranslationWarn instanceof RegExp\n ? this._silentTranslationWarn.test(key)\n : this._silentTranslationWarn\n};\n\nVueI18n.prototype._interpolate = function _interpolate (\n locale,\n message,\n key,\n host,\n interpolateMode,\n values,\n visitedLinkStack\n) {\n if (!message) { return null }\n\n var pathRet = this._path.getPathValue(message, key);\n if (isArray(pathRet) || isPlainObject(pathRet)) { return pathRet }\n\n var ret;\n if (isNull(pathRet)) {\n /* istanbul ignore else */\n if (isPlainObject(message)) {\n ret = message[key];\n if (!(isString(ret) || isFunction(ret))) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallback(locale, key)) {\n warn((\"Value of key '\" + key + \"' is not a string or function !\"));\n }\n return null\n }\n } else {\n return null\n }\n } else {\n /* istanbul ignore else */\n if (isString(pathRet) || isFunction(pathRet)) {\n ret = pathRet;\n } else {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallback(locale, key)) {\n warn((\"Value of key '\" + key + \"' is not a string or function!\"));\n }\n return null\n }\n }\n\n // Check for the existence of links within the translated string\n if (isString(ret) && (ret.indexOf('@:') >= 0 || ret.indexOf('@.') >= 0)) {\n ret = this._link(locale, message, ret, host, 'raw', values, visitedLinkStack);\n }\n\n return this._render(ret, interpolateMode, values, key)\n};\n\nVueI18n.prototype._link = function _link (\n locale,\n message,\n str,\n host,\n interpolateMode,\n values,\n visitedLinkStack\n) {\n var ret = str;\n\n // Match all the links within the local\n // We are going to replace each of\n // them with its translation\n var matches = ret.match(linkKeyMatcher);\n for (var idx in matches) {\n // ie compatible: filter custom array\n // prototype method\n if (!matches.hasOwnProperty(idx)) {\n continue\n }\n var link = matches[idx];\n var linkKeyPrefixMatches = link.match(linkKeyPrefixMatcher);\n var linkPrefix = linkKeyPrefixMatches[0];\n var formatterName = linkKeyPrefixMatches[1];\n\n // Remove the leading @:, @.case: and the brackets\n var linkPlaceholder = link.replace(linkPrefix, '').replace(bracketsMatcher, '');\n\n if (includes(visitedLinkStack, linkPlaceholder)) {\n if (process.env.NODE_ENV !== 'production') {\n warn((\"Circular reference found. \\\"\" + link + \"\\\" is already visited in the chain of \" + (visitedLinkStack.reverse().join(' <- '))));\n }\n return ret\n }\n visitedLinkStack.push(linkPlaceholder);\n\n // Translate the link\n var translated = this._interpolate(\n locale, message, linkPlaceholder, host,\n interpolateMode === 'raw' ? 'string' : interpolateMode,\n interpolateMode === 'raw' ? undefined : values,\n visitedLinkStack\n );\n\n if (this._isFallbackRoot(translated)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(linkPlaceholder)) {\n warn((\"Fall back to translate the link placeholder '\" + linkPlaceholder + \"' with root locale.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n var root = this._root.$i18n;\n translated = root._translate(\n root._getMessages(), root.locale, root.fallbackLocale,\n linkPlaceholder, host, interpolateMode, values\n );\n }\n translated = this._warnDefault(\n locale, linkPlaceholder, translated, host,\n isArray(values) ? values : [values],\n interpolateMode\n );\n\n if (this._modifiers.hasOwnProperty(formatterName)) {\n translated = this._modifiers[formatterName](translated);\n } else if (defaultModifiers.hasOwnProperty(formatterName)) {\n translated = defaultModifiers[formatterName](translated);\n }\n\n visitedLinkStack.pop();\n\n // Replace the link with the translated\n ret = !translated ? ret : ret.replace(link, translated);\n }\n\n return ret\n};\n\nVueI18n.prototype._createMessageContext = function _createMessageContext (values) {\n var _list = isArray(values) ? values : [];\n var _named = isObject(values) ? values : {};\n var list = function (index) { return _list[index]; };\n var named = function (key) { return _named[key]; };\n return {\n list: list,\n named: named\n }\n};\n\nVueI18n.prototype._render = function _render (message, interpolateMode, values, path) {\n if (isFunction(message)) {\n return message(this._createMessageContext(values))\n }\n\n var ret = this._formatter.interpolate(message, values, path);\n\n // If the custom formatter refuses to work - apply the default one\n if (!ret) {\n ret = defaultFormatter.interpolate(message, values, path);\n }\n\n // if interpolateMode is **not** 'string' ('row'),\n // return the compiled data (e.g. ['foo', VNode, 'bar']) with formatter\n return interpolateMode === 'string' && !isString(ret) ? ret.join('') : ret\n};\n\nVueI18n.prototype._appendItemToChain = function _appendItemToChain (chain, item, blocks) {\n var follow = false;\n if (!includes(chain, item)) {\n follow = true;\n if (item) {\n follow = item[item.length - 1] !== '!';\n item = item.replace(/!/g, '');\n chain.push(item);\n if (blocks && blocks[item]) {\n follow = blocks[item];\n }\n }\n }\n return follow\n};\n\nVueI18n.prototype._appendLocaleToChain = function _appendLocaleToChain (chain, locale, blocks) {\n var follow;\n var tokens = locale.split('-');\n do {\n var item = tokens.join('-');\n follow = this._appendItemToChain(chain, item, blocks);\n tokens.splice(-1, 1);\n } while (tokens.length && (follow === true))\n return follow\n};\n\nVueI18n.prototype._appendBlockToChain = function _appendBlockToChain (chain, block, blocks) {\n var follow = true;\n for (var i = 0; (i < block.length) && (isBoolean(follow)); i++) {\n var locale = block[i];\n if (isString(locale)) {\n follow = this._appendLocaleToChain(chain, locale, blocks);\n }\n }\n return follow\n};\n\nVueI18n.prototype._getLocaleChain = function _getLocaleChain (start, fallbackLocale) {\n if (start === '') { return [] }\n\n if (!this._localeChainCache) {\n this._localeChainCache = {};\n }\n\n var chain = this._localeChainCache[start];\n if (!chain) {\n if (!fallbackLocale) {\n fallbackLocale = this.fallbackLocale;\n }\n chain = [];\n\n // first block defined by start\n var block = [start];\n\n // while any intervening block found\n while (isArray(block)) {\n block = this._appendBlockToChain(\n chain,\n block,\n fallbackLocale\n );\n }\n\n // last block defined by default\n var defaults;\n if (isArray(fallbackLocale)) {\n defaults = fallbackLocale;\n } else if (isObject(fallbackLocale)) {\n /* $FlowFixMe */\n if (fallbackLocale['default']) {\n defaults = fallbackLocale['default'];\n } else {\n defaults = null;\n }\n } else {\n defaults = fallbackLocale;\n }\n\n // convert defaults to array\n if (isString(defaults)) {\n block = [defaults];\n } else {\n block = defaults;\n }\n if (block) {\n this._appendBlockToChain(\n chain,\n block,\n null\n );\n }\n this._localeChainCache[start] = chain;\n }\n return chain\n};\n\nVueI18n.prototype._translate = function _translate (\n messages,\n locale,\n fallback,\n key,\n host,\n interpolateMode,\n args\n) {\n var chain = this._getLocaleChain(locale, fallback);\n var res;\n for (var i = 0; i < chain.length; i++) {\n var step = chain[i];\n res =\n this._interpolate(step, messages[step], key, host, interpolateMode, args, [key]);\n if (!isNull(res)) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to translate the keypath '\" + key + \"' with '\" + step + \"' locale.\"));\n }\n return res\n }\n }\n return null\n};\n\nVueI18n.prototype._t = function _t (key, _locale, messages, host) {\n var ref;\n\n var values = [], len = arguments.length - 4;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 4 ];\n if (!key) { return '' }\n\n var parsedArgs = parseArgs.apply(void 0, values);\n if(this._escapeParameterHtml) {\n parsedArgs.params = escapeParams(parsedArgs.params);\n }\n\n var locale = parsedArgs.locale || _locale;\n\n var ret = this._translate(\n messages, locale, this.fallbackLocale, key,\n host, 'string', parsedArgs.params\n );\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to translate the keypath '\" + key + \"' with root locale.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return (ref = this._root).$t.apply(ref, [ key ].concat( values ))\n } else {\n ret = this._warnDefault(locale, key, ret, host, values, 'string');\n if (this._postTranslation && ret !== null && ret !== undefined) {\n ret = this._postTranslation(ret, key);\n }\n return ret\n }\n};\n\nVueI18n.prototype.t = function t (key) {\n var ref;\n\n var values = [], len = arguments.length - 1;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 1 ];\n return (ref = this)._t.apply(ref, [ key, this.locale, this._getMessages(), null ].concat( values ))\n};\n\nVueI18n.prototype._i = function _i (key, locale, messages, host, values) {\n var ret =\n this._translate(messages, locale, this.fallbackLocale, key, host, 'raw', values);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn((\"Fall back to interpolate the keypath '\" + key + \"' with root locale.\"));\n }\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.i(key, locale, values)\n } else {\n return this._warnDefault(locale, key, ret, host, [values], 'raw')\n }\n};\n\nVueI18n.prototype.i = function i (key, locale, values) {\n /* istanbul ignore if */\n if (!key) { return '' }\n\n if (!isString(locale)) {\n locale = this.locale;\n }\n\n return this._i(key, locale, this._getMessages(), null, values)\n};\n\nVueI18n.prototype._tc = function _tc (\n key,\n _locale,\n messages,\n host,\n choice\n) {\n var ref;\n\n var values = [], len = arguments.length - 5;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 5 ];\n if (!key) { return '' }\n if (choice === undefined) {\n choice = 1;\n }\n\n var predefined = { 'count': choice, 'n': choice };\n var parsedArgs = parseArgs.apply(void 0, values);\n parsedArgs.params = Object.assign(predefined, parsedArgs.params);\n values = parsedArgs.locale === null ? [parsedArgs.params] : [parsedArgs.locale, parsedArgs.params];\n return this.fetchChoice((ref = this)._t.apply(ref, [ key, _locale, messages, host ].concat( values )), choice)\n};\n\nVueI18n.prototype.fetchChoice = function fetchChoice (message, choice) {\n /* istanbul ignore if */\n if (!message || !isString(message)) { return null }\n var choices = message.split('|');\n\n choice = this.getChoiceIndex(choice, choices.length);\n if (!choices[choice]) { return message }\n return choices[choice].trim()\n};\n\nVueI18n.prototype.tc = function tc (key, choice) {\n var ref;\n\n var values = [], len = arguments.length - 2;\n while ( len-- > 0 ) values[ len ] = arguments[ len + 2 ];\n return (ref = this)._tc.apply(ref, [ key, this.locale, this._getMessages(), null, choice ].concat( values ))\n};\n\nVueI18n.prototype._te = function _te (key, locale, messages) {\n var args = [], len = arguments.length - 3;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 3 ];\n\n var _locale = parseArgs.apply(void 0, args).locale || locale;\n return this._exist(messages[_locale], key)\n};\n\nVueI18n.prototype.te = function te (key, locale) {\n return this._te(key, this.locale, this._getMessages(), locale)\n};\n\nVueI18n.prototype.getLocaleMessage = function getLocaleMessage (locale) {\n return looseClone(this._vm.messages[locale] || {})\n};\n\nVueI18n.prototype.setLocaleMessage = function setLocaleMessage (locale, message) {\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);\n }\n this._vm.$set(this._vm.messages, locale, message);\n};\n\nVueI18n.prototype.mergeLocaleMessage = function mergeLocaleMessage (locale, message) {\n if (this._warnHtmlInMessage === 'warn' || this._warnHtmlInMessage === 'error') {\n this._checkLocaleMessage(locale, this._warnHtmlInMessage, message);\n }\n this._vm.$set(this._vm.messages, locale, merge(\n typeof this._vm.messages[locale] !== 'undefined' && Object.keys(this._vm.messages[locale]).length\n ? this._vm.messages[locale]\n : {},\n message\n ));\n};\n\nVueI18n.prototype.getDateTimeFormat = function getDateTimeFormat (locale) {\n return looseClone(this._vm.dateTimeFormats[locale] || {})\n};\n\nVueI18n.prototype.setDateTimeFormat = function setDateTimeFormat (locale, format) {\n this._vm.$set(this._vm.dateTimeFormats, locale, format);\n this._clearDateTimeFormat(locale, format);\n};\n\nVueI18n.prototype.mergeDateTimeFormat = function mergeDateTimeFormat (locale, format) {\n this._vm.$set(this._vm.dateTimeFormats, locale, merge(this._vm.dateTimeFormats[locale] || {}, format));\n this._clearDateTimeFormat(locale, format);\n};\n\nVueI18n.prototype._clearDateTimeFormat = function _clearDateTimeFormat (locale, format) {\n for (var key in format) {\n var id = locale + \"__\" + key;\n\n if (!this._dateTimeFormatters.hasOwnProperty(id)) {\n continue\n }\n\n delete this._dateTimeFormatters[id];\n }\n};\n\nVueI18n.prototype._localizeDateTime = function _localizeDateTime (\n value,\n locale,\n fallback,\n dateTimeFormats,\n key\n) {\n var _locale = locale;\n var formats = dateTimeFormats[_locale];\n\n var chain = this._getLocaleChain(locale, fallback);\n for (var i = 0; i < chain.length; i++) {\n var current = _locale;\n var step = chain[i];\n formats = dateTimeFormats[step];\n _locale = step;\n // fallback locale\n if (isNull(formats) || isNull(formats[key])) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to '\" + step + \"' datetime formats from '\" + current + \"' datetime formats.\"));\n }\n } else {\n break\n }\n }\n\n if (isNull(formats) || isNull(formats[key])) {\n return null\n } else {\n var format = formats[key];\n var id = _locale + \"__\" + key;\n var formatter = this._dateTimeFormatters[id];\n if (!formatter) {\n formatter = this._dateTimeFormatters[id] = new Intl.DateTimeFormat(_locale, format);\n }\n return formatter.format(value)\n }\n};\n\nVueI18n.prototype._d = function _d (value, locale, key) {\n /* istanbul ignore if */\n if (process.env.NODE_ENV !== 'production' && !VueI18n.availabilities.dateTimeFormat) {\n warn('Cannot format a Date value due to not supported Intl.DateTimeFormat.');\n return ''\n }\n\n if (!key) {\n return new Intl.DateTimeFormat(locale).format(value)\n }\n\n var ret =\n this._localizeDateTime(value, locale, this.fallbackLocale, this._getDateTimeFormats(), key);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to datetime localization of root: key '\" + key + \"'.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.d(value, key, locale)\n } else {\n return ret || ''\n }\n};\n\nVueI18n.prototype.d = function d (value) {\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n var locale = this.locale;\n var key = null;\n\n if (args.length === 1) {\n if (isString(args[0])) {\n key = args[0];\n } else if (isObject(args[0])) {\n if (args[0].locale) {\n locale = args[0].locale;\n }\n if (args[0].key) {\n key = args[0].key;\n }\n }\n } else if (args.length === 2) {\n if (isString(args[0])) {\n key = args[0];\n }\n if (isString(args[1])) {\n locale = args[1];\n }\n }\n\n return this._d(value, locale, key)\n};\n\nVueI18n.prototype.getNumberFormat = function getNumberFormat (locale) {\n return looseClone(this._vm.numberFormats[locale] || {})\n};\n\nVueI18n.prototype.setNumberFormat = function setNumberFormat (locale, format) {\n this._vm.$set(this._vm.numberFormats, locale, format);\n this._clearNumberFormat(locale, format);\n};\n\nVueI18n.prototype.mergeNumberFormat = function mergeNumberFormat (locale, format) {\n this._vm.$set(this._vm.numberFormats, locale, merge(this._vm.numberFormats[locale] || {}, format));\n this._clearNumberFormat(locale, format);\n};\n\nVueI18n.prototype._clearNumberFormat = function _clearNumberFormat (locale, format) {\n for (var key in format) {\n var id = locale + \"__\" + key;\n\n if (!this._numberFormatters.hasOwnProperty(id)) {\n continue\n }\n\n delete this._numberFormatters[id];\n }\n};\n\nVueI18n.prototype._getNumberFormatter = function _getNumberFormatter (\n value,\n locale,\n fallback,\n numberFormats,\n key,\n options\n) {\n var _locale = locale;\n var formats = numberFormats[_locale];\n\n var chain = this._getLocaleChain(locale, fallback);\n for (var i = 0; i < chain.length; i++) {\n var current = _locale;\n var step = chain[i];\n formats = numberFormats[step];\n _locale = step;\n // fallback locale\n if (isNull(formats) || isNull(formats[key])) {\n if (step !== locale && process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to '\" + step + \"' number formats from '\" + current + \"' number formats.\"));\n }\n } else {\n break\n }\n }\n\n if (isNull(formats) || isNull(formats[key])) {\n return null\n } else {\n var format = formats[key];\n\n var formatter;\n if (options) {\n // If options specified - create one time number formatter\n formatter = new Intl.NumberFormat(_locale, Object.assign({}, format, options));\n } else {\n var id = _locale + \"__\" + key;\n formatter = this._numberFormatters[id];\n if (!formatter) {\n formatter = this._numberFormatters[id] = new Intl.NumberFormat(_locale, format);\n }\n }\n return formatter\n }\n};\n\nVueI18n.prototype._n = function _n (value, locale, key, options) {\n /* istanbul ignore if */\n if (!VueI18n.availabilities.numberFormat) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot format a Number value due to not supported Intl.NumberFormat.');\n }\n return ''\n }\n\n if (!key) {\n var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);\n return nf.format(value)\n }\n\n var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);\n var ret = formatter && formatter.format(value);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key) && !this._isSilentFallbackWarn(key)) {\n warn((\"Fall back to number localization of root: key '\" + key + \"'.\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n.n(value, Object.assign({}, { key: key, locale: locale }, options))\n } else {\n return ret || ''\n }\n};\n\nVueI18n.prototype.n = function n (value) {\n var args = [], len = arguments.length - 1;\n while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];\n\n var locale = this.locale;\n var key = null;\n var options = null;\n\n if (args.length === 1) {\n if (isString(args[0])) {\n key = args[0];\n } else if (isObject(args[0])) {\n if (args[0].locale) {\n locale = args[0].locale;\n }\n if (args[0].key) {\n key = args[0].key;\n }\n\n // Filter out number format options only\n options = Object.keys(args[0]).reduce(function (acc, key) {\n var obj;\n\n if (includes(numberFormatKeys, key)) {\n return Object.assign({}, acc, ( obj = {}, obj[key] = args[0][key], obj ))\n }\n return acc\n }, null);\n }\n } else if (args.length === 2) {\n if (isString(args[0])) {\n key = args[0];\n }\n if (isString(args[1])) {\n locale = args[1];\n }\n }\n\n return this._n(value, locale, key, options)\n};\n\nVueI18n.prototype._ntp = function _ntp (value, locale, key, options) {\n /* istanbul ignore if */\n if (!VueI18n.availabilities.numberFormat) {\n if (process.env.NODE_ENV !== 'production') {\n warn('Cannot format to parts a Number value due to not supported Intl.NumberFormat.');\n }\n return []\n }\n\n if (!key) {\n var nf = !options ? new Intl.NumberFormat(locale) : new Intl.NumberFormat(locale, options);\n return nf.formatToParts(value)\n }\n\n var formatter = this._getNumberFormatter(value, locale, this.fallbackLocale, this._getNumberFormats(), key, options);\n var ret = formatter && formatter.formatToParts(value);\n if (this._isFallbackRoot(ret)) {\n if (process.env.NODE_ENV !== 'production' && !this._isSilentTranslationWarn(key)) {\n warn((\"Fall back to format number to parts of root: key '\" + key + \"' .\"));\n }\n /* istanbul ignore if */\n if (!this._root) { throw Error('unexpected error') }\n return this._root.$i18n._ntp(value, locale, key, options)\n } else {\n return ret || []\n }\n};\n\nObject.defineProperties( VueI18n.prototype, prototypeAccessors );\n\nvar availabilities;\n// $FlowFixMe\nObject.defineProperty(VueI18n, 'availabilities', {\n get: function get () {\n if (!availabilities) {\n var intlDefined = typeof Intl !== 'undefined';\n availabilities = {\n dateTimeFormat: intlDefined && typeof Intl.DateTimeFormat !== 'undefined',\n numberFormat: intlDefined && typeof Intl.NumberFormat !== 'undefined'\n };\n }\n\n return availabilities\n }\n});\n\nVueI18n.install = install;\nVueI18n.version = '8.24.1';\n\nexport default VueI18n;\n","import Vue from 'vue';\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill\nfunction assign (target, varArgs) {\n var arguments$1 = arguments;\n\n if (target === null || target === undefined) {\n throw new TypeError('Cannot convert undefined or null to object')\n }\n var to = Object(target);\n for (var index = 1; index < arguments.length; index++) {\n var nextSource = arguments$1[index];\n if (nextSource !== null && nextSource !== undefined) {\n for (var nextKey in nextSource) {\n // Avoid bugs when hasOwnProperty is shadowed\n /* istanbul ignore else */\n if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n return to\n}\n\nfunction isExist (obj) {\n return typeof obj !== 'undefined' && obj !== null\n}\n\nfunction isFunction (obj) {\n return typeof obj === 'function'\n}\n\nfunction isNumber (obj) {\n return typeof obj === 'number'\n}\n\nfunction isString (obj) {\n return typeof obj === 'string'\n}\n\nfunction isBoolean (obj) {\n return typeof obj === 'boolean'\n}\n\nfunction isPromiseSupported () {\n return typeof window !== 'undefined' && isExist(window.Promise)\n}\n\nfunction hasOwnProperty (o, k) {\n return Object.prototype.hasOwnProperty.call(o, k)\n}\n\nvar script$h = {\n props: {\n value: Number,\n indicators: {\n type: Boolean,\n default: true\n },\n controls: {\n type: Boolean,\n default: true\n },\n interval: {\n type: Number,\n default: 5000\n },\n iconControlLeft: {\n type: String,\n default: 'glyphicon glyphicon-chevron-left'\n },\n iconControlRight: {\n type: String,\n default: 'glyphicon glyphicon-chevron-right'\n }\n },\n data: function data () {\n return {\n slides: [],\n activeIndex: 0, // Make v-model not required\n timeoutId: 0,\n intervalId: 0\n }\n },\n watch: {\n interval: function interval () {\n this.startInterval();\n },\n value: function value (index, oldValue) {\n this.run(index, oldValue);\n this.activeIndex = index;\n }\n },\n mounted: function mounted () {\n if (isExist(this.value)) {\n this.activeIndex = this.value;\n }\n if (this.slides.length > 0) {\n this.$select(this.activeIndex);\n }\n this.startInterval();\n },\n beforeDestroy: function beforeDestroy () {\n this.stopInterval();\n },\n methods: {\n run: function run (newIndex, oldIndex) {\n var this$1 = this;\n\n var currentActiveIndex = oldIndex || 0;\n var direction;\n if (newIndex > currentActiveIndex) {\n direction = ['next', 'left'];\n } else {\n direction = ['prev', 'right'];\n }\n this.slides[newIndex].slideClass[direction[0]] = true;\n this.$nextTick(function () {\n this$1.slides[newIndex].$el.offsetHeight;\n this$1.slides.forEach(function (slide, i) {\n if (i === currentActiveIndex) {\n slide.slideClass.active = true;\n slide.slideClass[direction[1]] = true;\n } else if (i === newIndex) {\n slide.slideClass[direction[1]] = true;\n }\n });\n this$1.timeoutId = setTimeout(function () {\n this$1.$select(newIndex);\n this$1.$emit('change', newIndex);\n this$1.timeoutId = 0;\n }, 600);\n });\n },\n startInterval: function startInterval () {\n var this$1 = this;\n\n this.stopInterval();\n if (this.interval > 0) {\n this.intervalId = setInterval(function () {\n this$1.next();\n }, this.interval);\n }\n },\n stopInterval: function stopInterval () {\n clearInterval(this.intervalId);\n this.intervalId = 0;\n },\n resetAllSlideClass: function resetAllSlideClass () {\n this.slides.forEach(function (slide) {\n slide.slideClass.active = false;\n slide.slideClass.left = false;\n slide.slideClass.right = false;\n slide.slideClass.next = false;\n slide.slideClass.prev = false;\n });\n },\n $select: function $select (index) {\n this.resetAllSlideClass();\n this.slides[index].slideClass.active = true;\n },\n select: function select (index) {\n if (this.timeoutId !== 0 || index === this.activeIndex) {\n return\n }\n if (isExist(this.value)) {\n this.$emit('input', index);\n } else {\n this.run(index, this.activeIndex);\n this.activeIndex = index;\n }\n },\n prev: function prev () {\n this.select(this.activeIndex === 0 ? this.slides.length - 1 : this.activeIndex - 1);\n },\n next: function next () {\n this.select(this.activeIndex === this.slides.length - 1 ? 0 : this.activeIndex + 1);\n }\n }\n};\n\nfunction normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {\r\n if (typeof shadowMode !== 'boolean') {\r\n createInjectorSSR = createInjector;\r\n createInjector = shadowMode;\r\n shadowMode = false;\r\n }\r\n // Vue.extend constructor export interop.\r\n var options = typeof script === 'function' ? script.options : script;\r\n // render functions\r\n if (template && template.render) {\r\n options.render = template.render;\r\n options.staticRenderFns = template.staticRenderFns;\r\n options._compiled = true;\r\n // functional template\r\n if (isFunctionalTemplate) {\r\n options.functional = true;\r\n }\r\n }\r\n // scopedId\r\n if (scopeId) {\r\n options._scopeId = scopeId;\r\n }\r\n var hook;\r\n if (moduleIdentifier) {\r\n // server build\r\n hook = function (context) {\r\n // 2.3 injection\r\n context =\r\n context || // cached call\r\n (this.$vnode && this.$vnode.ssrContext) || // stateful\r\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional\r\n // 2.2 with runInNewContext: true\r\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\r\n context = __VUE_SSR_CONTEXT__;\r\n }\r\n // inject component styles\r\n if (style) {\r\n style.call(this, createInjectorSSR(context));\r\n }\r\n // register component module identifier for async chunk inference\r\n if (context && context._registeredComponents) {\r\n context._registeredComponents.add(moduleIdentifier);\r\n }\r\n };\r\n // used by ssr in case component is cached and beforeCreate\r\n // never gets called\r\n options._ssrRegister = hook;\r\n }\r\n else if (style) {\r\n hook = shadowMode\r\n ? function (context) {\r\n style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));\r\n }\r\n : function (context) {\r\n style.call(this, createInjector(context));\r\n };\r\n }\r\n if (hook) {\r\n if (options.functional) {\r\n // register for functional component in vue file\r\n var originalRender = options.render;\r\n options.render = function renderWithStyleInjection(h, context) {\r\n hook.call(context);\r\n return originalRender(h, context);\r\n };\r\n }\r\n else {\r\n // inject component registration as beforeCreate hook\r\n var existing = options.beforeCreate;\r\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook];\r\n }\r\n }\r\n return script;\r\n}\n\n/* script */\nvar __vue_script__$h = script$h;\n\n/* template */\nvar __vue_render__$h = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"div\",\n {\n staticClass: \"carousel slide\",\n attrs: { \"data-ride\": \"carousel\" },\n on: { mouseenter: _vm.stopInterval, mouseleave: _vm.startInterval }\n },\n [\n _vm.indicators\n ? _vm._t(\n \"indicators\",\n [\n _c(\n \"ol\",\n { staticClass: \"carousel-indicators\" },\n _vm._l(_vm.slides, function(slide, index) {\n return _c(\"li\", {\n class: { active: index === _vm.activeIndex },\n on: {\n click: function($event) {\n return _vm.select(index)\n }\n }\n })\n }),\n 0\n )\n ],\n { select: _vm.select, activeIndex: _vm.activeIndex }\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"div\",\n { staticClass: \"carousel-inner\", attrs: { role: \"listbox\" } },\n [_vm._t(\"default\")],\n 2\n ),\n _vm._v(\" \"),\n _vm.controls\n ? _c(\n \"a\",\n {\n staticClass: \"left carousel-control\",\n attrs: { href: \"#\", role: \"button\" },\n on: {\n click: function($event) {\n $event.preventDefault();\n return _vm.prev()\n }\n }\n },\n [\n _c(\"span\", {\n class: _vm.iconControlLeft,\n attrs: { \"aria-hidden\": \"true\" }\n }),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"sr-only\" }, [_vm._v(\"Previous\")])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.controls\n ? _c(\n \"a\",\n {\n staticClass: \"right carousel-control\",\n attrs: { href: \"#\", role: \"button\" },\n on: {\n click: function($event) {\n $event.preventDefault();\n return _vm.next()\n }\n }\n },\n [\n _c(\"span\", {\n class: _vm.iconControlRight,\n attrs: { \"aria-hidden\": \"true\" }\n }),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"sr-only\" }, [_vm._v(\"Next\")])\n ]\n )\n : _vm._e()\n ],\n 2\n )\n};\nvar __vue_staticRenderFns__$h = [];\n__vue_render__$h._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$h = undefined;\n /* scoped */\n var __vue_scope_id__$h = undefined;\n /* module identifier */\n var __vue_module_identifier__$h = undefined;\n /* functional template */\n var __vue_is_functional_template__$h = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$h = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$h, staticRenderFns: __vue_staticRenderFns__$h },\n __vue_inject_styles__$h,\n __vue_script__$h,\n __vue_scope_id__$h,\n __vue_is_functional_template__$h,\n __vue_module_identifier__$h,\n false,\n undefined,\n undefined,\n undefined\n );\n\nfunction spliceIfExist (arr, item) {\n if (Array.isArray(arr)) {\n var index = arr.indexOf(item);\n if (index >= 0) {\n arr.splice(index, 1);\n }\n }\n}\n\nfunction range (end, start, step) {\n if ( start === void 0 ) start = 0;\n if ( step === void 0 ) step = 1;\n\n var arr = [];\n for (var i = start; i < end; i += step) {\n arr.push(i);\n }\n return arr\n}\n\nfunction nodeListToArray (nodeList) {\n return Array.prototype.slice.call(nodeList || [])\n}\n\nfunction onlyUnique (value, index, self) {\n return self.indexOf(value) === index\n}\n\nvar script$g = {\n data: function data () {\n return {\n slideClass: {\n active: false,\n prev: false,\n next: false,\n left: false,\n right: false\n }\n }\n },\n created: function created () {\n try {\n this.$parent.slides.push(this);\n } catch (e) {\n throw new Error('Slide parent must be Carousel.')\n }\n },\n beforeDestroy: function beforeDestroy () {\n var slides = this.$parent && this.$parent.slides;\n spliceIfExist(slides, this);\n }\n};\n\n/* script */\nvar __vue_script__$g = script$g;\n\n/* template */\nvar __vue_render__$g = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"div\",\n { staticClass: \"item\", class: _vm.slideClass },\n [_vm._t(\"default\")],\n 2\n )\n};\nvar __vue_staticRenderFns__$g = [];\n__vue_render__$g._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$g = undefined;\n /* scoped */\n var __vue_scope_id__$g = undefined;\n /* module identifier */\n var __vue_module_identifier__$g = undefined;\n /* functional template */\n var __vue_is_functional_template__$g = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$g = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$g, staticRenderFns: __vue_staticRenderFns__$g },\n __vue_inject_styles__$g,\n __vue_script__$g,\n __vue_scope_id__$g,\n __vue_is_functional_template__$g,\n __vue_module_identifier__$g,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar EVENTS = {\n MOUSE_ENTER: 'mouseenter',\n MOUSE_LEAVE: 'mouseleave',\n MOUSE_DOWN: 'mousedown',\n MOUSE_UP: 'mouseup',\n FOCUS: 'focus',\n BLUR: 'blur',\n CLICK: 'click',\n INPUT: 'input',\n KEY_DOWN: 'keydown',\n KEY_UP: 'keyup',\n KEY_PRESS: 'keypress',\n RESIZE: 'resize',\n SCROLL: 'scroll',\n TOUCH_START: 'touchstart',\n TOUCH_END: 'touchend'\n};\n\nvar TRIGGERS = {\n CLICK: 'click',\n HOVER: 'hover',\n FOCUS: 'focus',\n HOVER_FOCUS: 'hover-focus',\n OUTSIDE_CLICK: 'outside-click',\n MANUAL: 'manual'\n};\n\nvar PLACEMENTS$1 = {\n TOP: 'top',\n RIGHT: 'right',\n BOTTOM: 'bottom',\n LEFT: 'left'\n};\n\nfunction isIE11 () {\n /* istanbul ignore next */\n return !!window.MSInputMethodContext && !!document.documentMode\n}\n\nfunction isIE10 () {\n return window.navigator.appVersion.indexOf('MSIE 10') !== -1\n}\n\nfunction getComputedStyle (el) {\n return window.getComputedStyle(el)\n}\n\nfunction getViewportSize () {\n /* istanbul ignore next */\n var width = Math.max(document.documentElement.clientWidth, window.innerWidth) || 0;\n /* istanbul ignore next */\n var height = Math.max(document.documentElement.clientHeight, window.innerHeight) || 0;\n return { width: width, height: height }\n}\n\nvar scrollbarWidth = null;\nvar savedScreenSize = null;\n\nfunction getScrollbarWidth (recalculate) {\n if ( recalculate === void 0 ) recalculate = false;\n\n var screenSize = getViewportSize();\n // return directly when already calculated & not force recalculate & screen size not changed\n if (scrollbarWidth !== null && !recalculate &&\n screenSize.height === savedScreenSize.height && screenSize.width === savedScreenSize.width) {\n return scrollbarWidth\n }\n /* istanbul ignore next */\n if (document.readyState === 'loading') {\n return null\n }\n var div1 = document.createElement('div');\n var div2 = document.createElement('div');\n div1.style.width = div2.style.width = div1.style.height = div2.style.height = '100px';\n div1.style.overflow = 'scroll';\n div2.style.overflow = 'hidden';\n document.body.appendChild(div1);\n document.body.appendChild(div2);\n scrollbarWidth = Math.abs(div1.scrollHeight - div2.scrollHeight);\n document.body.removeChild(div1);\n document.body.removeChild(div2);\n // save new screen size\n savedScreenSize = screenSize;\n return scrollbarWidth\n}\n\nfunction on (element, event, handler) {\n /* istanbul ignore next */\n element.addEventListener(event, handler);\n}\n\nfunction off (element, event, handler) {\n /* istanbul ignore next */\n element.removeEventListener(event, handler);\n}\n\nfunction isElement (el) {\n return el && el.nodeType === Node.ELEMENT_NODE\n}\n\nfunction removeFromDom (el) {\n isElement(el) && isElement(el.parentNode) && el.parentNode.removeChild(el);\n}\n\nfunction ensureElementMatchesFunction () {\n /* istanbul ignore next */\n if (!Element.prototype.matches) {\n Element.prototype.matches =\n Element.prototype.matchesSelector ||\n Element.prototype.mozMatchesSelector ||\n Element.prototype.msMatchesSelector ||\n Element.prototype.oMatchesSelector ||\n Element.prototype.webkitMatchesSelector ||\n function (s) {\n var matches = (this.document || this.ownerDocument).querySelectorAll(s);\n var i = matches.length;\n // eslint-disable-next-line no-empty\n while (--i >= 0 && matches.item(i) !== this) {}\n return i > -1\n };\n }\n}\n\nfunction addClass (el, className) {\n if (!isElement(el)) {\n return\n }\n if (el.className) {\n var classes = el.className.split(' ');\n if (classes.indexOf(className) < 0) {\n classes.push(className);\n el.className = classes.join(' ');\n }\n } else {\n el.className = className;\n }\n}\n\nfunction removeClass (el, className) {\n if (!isElement(el)) {\n return\n }\n if (el.className) {\n var classes = el.className.split(' ');\n var newClasses = [];\n for (var i = 0, l = classes.length; i < l; i++) {\n if (classes[i] !== className) {\n newClasses.push(classes[i]);\n }\n }\n el.className = newClasses.join(' ');\n }\n}\n\nfunction hasClass (el, className) {\n if (!isElement(el)) {\n return false\n }\n var classes = el.className.split(' ');\n for (var i = 0, l = classes.length; i < l; i++) {\n if (classes[i] === className) {\n return true\n }\n }\n return false\n}\n\nfunction setDropdownPosition (dropdown, trigger, options) {\n if ( options === void 0 ) options = {};\n\n var doc = document.documentElement;\n var containerScrollLeft = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);\n var containerScrollTop = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);\n var rect = trigger.getBoundingClientRect();\n var dropdownRect = dropdown.getBoundingClientRect();\n dropdown.style.right = 'auto';\n dropdown.style.bottom = 'auto';\n if (options.menuRight) {\n dropdown.style.left = containerScrollLeft + rect.left + rect.width - dropdownRect.width + 'px';\n } else {\n dropdown.style.left = containerScrollLeft + rect.left + 'px';\n }\n if (options.dropup) {\n dropdown.style.top = containerScrollTop + rect.top - dropdownRect.height - 4 + 'px';\n } else {\n dropdown.style.top = containerScrollTop + rect.top + rect.height + 'px';\n }\n}\n\nfunction isAvailableAtPosition (trigger, popup, placement) {\n var triggerRect = trigger.getBoundingClientRect();\n var popupRect = popup.getBoundingClientRect();\n var viewPortSize = getViewportSize();\n var top = true;\n var right = true;\n var bottom = true;\n var left = true;\n switch (placement) {\n case PLACEMENTS$1.TOP:\n top = triggerRect.top >= popupRect.height;\n left = triggerRect.left + triggerRect.width / 2 >= popupRect.width / 2;\n right = triggerRect.right - triggerRect.width / 2 + popupRect.width / 2 <= viewPortSize.width;\n break\n case PLACEMENTS$1.BOTTOM:\n bottom = triggerRect.bottom + popupRect.height <= viewPortSize.height;\n left = triggerRect.left + triggerRect.width / 2 >= popupRect.width / 2;\n right = triggerRect.right - triggerRect.width / 2 + popupRect.width / 2 <= viewPortSize.width;\n break\n case PLACEMENTS$1.RIGHT:\n right = triggerRect.right + popupRect.width <= viewPortSize.width;\n top = triggerRect.top + triggerRect.height / 2 >= popupRect.height / 2;\n bottom = triggerRect.bottom - triggerRect.height / 2 + popupRect.height / 2 <= viewPortSize.height;\n break\n case PLACEMENTS$1.LEFT:\n left = triggerRect.left >= popupRect.width;\n top = triggerRect.top + triggerRect.height / 2 >= popupRect.height / 2;\n bottom = triggerRect.bottom - triggerRect.height / 2 + popupRect.height / 2 <= viewPortSize.height;\n break\n }\n return top && right && bottom && left\n}\n\nfunction setTooltipPosition (tooltip, trigger, placement, auto, appendTo, positionBy, viewport) {\n if (!isElement(tooltip) || !isElement(trigger)) {\n return\n }\n var isPopover = tooltip && tooltip.className && tooltip.className.indexOf('popover') >= 0;\n var containerScrollTop;\n var containerScrollLeft;\n if (!isExist(appendTo) || appendTo === 'body' || positionBy === 'body') {\n var doc = document.documentElement;\n containerScrollLeft = (window.pageXOffset || doc.scrollLeft) - (doc.clientLeft || 0);\n containerScrollTop = (window.pageYOffset || doc.scrollTop) - (doc.clientTop || 0);\n } else {\n var container = getElementBySelectorOrRef(positionBy || appendTo);\n containerScrollLeft = container.scrollLeft;\n containerScrollTop = container.scrollTop;\n }\n // auto adjust placement\n if (auto) {\n // Try: right -> bottom -> left -> top\n // Cause the default placement is top\n var placements = [PLACEMENTS$1.RIGHT, PLACEMENTS$1.BOTTOM, PLACEMENTS$1.LEFT, PLACEMENTS$1.TOP];\n // The class switch helper function\n var changePlacementClass = function (placement) {\n // console.log(placement)\n placements.forEach(function (placement) {\n removeClass(tooltip, placement);\n });\n addClass(tooltip, placement);\n };\n // No need to adjust if the default placement fits\n if (!isAvailableAtPosition(trigger, tooltip, placement)) {\n for (var i = 0, l = placements.length; i < l; i++) {\n // Re-assign placement class\n changePlacementClass(placements[i]);\n // Break if new placement fits\n if (isAvailableAtPosition(trigger, tooltip, placements[i])) {\n placement = placements[i];\n break\n }\n }\n changePlacementClass(placement);\n }\n }\n // fix left and top for tooltip\n var rect = trigger.getBoundingClientRect();\n var tooltipRect = tooltip.getBoundingClientRect();\n var top;\n var left;\n if (placement === PLACEMENTS$1.BOTTOM) {\n top = containerScrollTop + rect.top + rect.height;\n left = containerScrollLeft + rect.left + rect.width / 2 - tooltipRect.width / 2;\n } else if (placement === PLACEMENTS$1.LEFT) {\n top = containerScrollTop + rect.top + rect.height / 2 - tooltipRect.height / 2;\n left = containerScrollLeft + rect.left - tooltipRect.width;\n } else if (placement === PLACEMENTS$1.RIGHT) {\n top = containerScrollTop + rect.top + rect.height / 2 - tooltipRect.height / 2;\n // https://github.com/uiv-lib/uiv/issues/272\n // add 1px to fix above issue\n left = containerScrollLeft + rect.left + rect.width + 1;\n } else {\n top = containerScrollTop + rect.top - tooltipRect.height;\n left = containerScrollLeft + rect.left + rect.width / 2 - tooltipRect.width / 2;\n }\n var viewportEl;\n // viewport option\n if (isString(viewport)) {\n viewportEl = document.querySelector(viewport);\n } else if (isFunction(viewport)) {\n viewportEl = viewport(trigger);\n }\n if (isElement(viewportEl)) {\n var popoverFix = isPopover ? 11 : 0;\n var viewportReact = viewportEl.getBoundingClientRect();\n var viewportTop = containerScrollTop + viewportReact.top;\n var viewportLeft = containerScrollLeft + viewportReact.left;\n var viewportBottom = viewportTop + viewportReact.height;\n var viewportRight = viewportLeft + viewportReact.width;\n // fix top\n if (top < viewportTop) {\n top = viewportTop;\n } else if (top + tooltipRect.height > viewportBottom) {\n top = viewportBottom - tooltipRect.height;\n }\n // fix left\n if (left < viewportLeft) {\n left = viewportLeft;\n } else if (left + tooltipRect.width > viewportRight) {\n left = viewportRight - tooltipRect.width;\n }\n // fix for popover pointer\n if (placement === PLACEMENTS$1.BOTTOM) {\n top -= popoverFix;\n } else if (placement === PLACEMENTS$1.LEFT) {\n left += popoverFix;\n } else if (placement === PLACEMENTS$1.RIGHT) {\n left -= popoverFix;\n } else {\n top += popoverFix;\n }\n }\n // set position finally\n tooltip.style.top = top + \"px\";\n tooltip.style.left = left + \"px\";\n}\n\nfunction hasScrollbar (el) {\n var SCROLL = 'scroll';\n var hasVScroll = el.scrollHeight > el.clientHeight;\n var style = getComputedStyle(el);\n return hasVScroll || style.overflow === SCROLL || style.overflowY === SCROLL\n}\n\nfunction toggleBodyOverflow (enable) {\n var MODAL_OPEN = 'modal-open';\n var FIXED_CONTENT = '.navbar-fixed-top, .navbar-fixed-bottom';\n var body = document.body;\n if (enable) {\n removeClass(body, MODAL_OPEN);\n body.style.paddingRight = null;\n nodeListToArray(document.querySelectorAll(FIXED_CONTENT)).forEach(function (node) {\n node.style.paddingRight = null;\n });\n } else {\n var browsersWithFloatingScrollbar = isIE10() || isIE11();\n var documentHasScrollbar = hasScrollbar(document.documentElement) || hasScrollbar(document.body);\n if (documentHasScrollbar && !browsersWithFloatingScrollbar) {\n var scrollbarWidth = getScrollbarWidth();\n body.style.paddingRight = scrollbarWidth + \"px\";\n nodeListToArray(document.querySelectorAll(FIXED_CONTENT)).forEach(function (node) {\n node.style.paddingRight = scrollbarWidth + \"px\";\n });\n }\n addClass(body, MODAL_OPEN);\n }\n}\n\nfunction getClosest (el, selector) {\n ensureElementMatchesFunction();\n var parent;\n var _el = el;\n while (_el) {\n parent = _el.parentElement;\n if (parent && parent.matches(selector)) {\n return parent\n }\n _el = parent;\n }\n return null\n}\n\nfunction getParents (el, selector, until) {\n if ( until === void 0 ) until = null;\n\n ensureElementMatchesFunction();\n var parents = [];\n var parent = el.parentElement;\n while (parent) {\n if (parent.matches(selector)) {\n parents.push(parent);\n } else if (until && (until === parent || parent.matches(until))) {\n break\n }\n parent = parent.parentElement;\n }\n return parents\n}\n\nfunction focus (el) {\n if (!isElement(el)) {\n return\n }\n el.getAttribute('tabindex') ? null : el.setAttribute('tabindex', '-1');\n el.focus();\n}\n\nvar MODAL_BACKDROP = 'modal-backdrop';\n\nfunction getOpenModals () {\n return document.querySelectorAll((\".\" + MODAL_BACKDROP))\n}\n\nfunction getOpenModalNum () {\n return getOpenModals().length\n}\n\nfunction getElementBySelectorOrRef (q) {\n if (isString(q)) { // is selector\n return document.querySelector(q)\n } else if (isElement(q)) { // is element\n return q\n } else if (isElement(q.$el)) { // is component\n return q.$el\n } else {\n return null\n }\n}\n\nvar COLLAPSE = 'collapse';\nvar IN$1 = 'in';\nvar COLLAPSING = 'collapsing';\n\nvar Collapse = {\n render: function render (h) {\n return h(this.tag, {}, this.$slots.default)\n },\n props: {\n tag: {\n type: String,\n default: 'div'\n },\n value: {\n type: Boolean,\n default: false\n },\n transition: {\n type: Number,\n default: 350\n }\n },\n data: function data () {\n return {\n timeoutId: 0\n }\n },\n watch: {\n value: function value (show) {\n this.toggle(show);\n }\n },\n mounted: function mounted () {\n var el = this.$el;\n addClass(el, COLLAPSE);\n if (this.value) {\n addClass(el, IN$1);\n }\n },\n methods: {\n toggle: function toggle (show) {\n var this$1 = this;\n\n clearTimeout(this.timeoutId);\n var el = this.$el;\n if (show) {\n this.$emit('show');\n removeClass(el, COLLAPSE);\n el.style.height = 'auto';\n var height = window.getComputedStyle(el).height;\n el.style.height = null;\n addClass(el, COLLAPSING);\n el.offsetHeight; // force repaint\n el.style.height = height;\n this.timeoutId = setTimeout(function () {\n removeClass(el, COLLAPSING);\n addClass(el, COLLAPSE);\n addClass(el, IN$1);\n el.style.height = null;\n this$1.timeoutId = 0;\n this$1.$emit('shown');\n }, this.transition);\n } else {\n this.$emit('hide');\n el.style.height = window.getComputedStyle(el).height;\n removeClass(el, IN$1);\n removeClass(el, COLLAPSE);\n el.offsetHeight;\n el.style.height = null;\n addClass(el, COLLAPSING);\n this.timeoutId = setTimeout(function () {\n addClass(el, COLLAPSE);\n removeClass(el, COLLAPSING);\n el.style.height = null;\n this$1.timeoutId = 0;\n this$1.$emit('hidden');\n }, this.transition);\n }\n }\n }\n};\n\nvar DEFAULT_TAG = 'div';\n\nvar Dropdown = {\n render: function render (h) {\n return h(\n this.tag,\n {\n class: {\n 'btn-group': this.tag === DEFAULT_TAG,\n dropdown: !this.dropup,\n dropup: this.dropup,\n open: this.show\n }\n },\n [\n this.$slots.default,\n h(\n 'ul',\n {\n class: {\n 'dropdown-menu': true,\n 'dropdown-menu-right': this.menuRight\n },\n ref: 'dropdown'\n },\n [this.$slots.dropdown]\n )\n ]\n )\n },\n props: {\n tag: {\n type: String,\n default: DEFAULT_TAG\n },\n appendToBody: {\n type: Boolean,\n default: false\n },\n value: Boolean,\n dropup: {\n type: Boolean,\n default: false\n },\n menuRight: {\n type: Boolean,\n default: false\n },\n disabled: {\n type: Boolean,\n default: false\n },\n notCloseElements: Array,\n positionElement: null\n },\n data: function data () {\n return {\n show: false,\n triggerEl: undefined\n }\n },\n watch: {\n value: function value (v) {\n this.toggle(v);\n }\n },\n mounted: function mounted () {\n this.initTrigger();\n if (this.triggerEl) {\n on(this.triggerEl, EVENTS.CLICK, this.toggle);\n on(this.triggerEl, EVENTS.KEY_DOWN, this.onKeyPress);\n }\n on(this.$refs.dropdown, EVENTS.KEY_DOWN, this.onKeyPress);\n on(window, EVENTS.CLICK, this.windowClicked);\n on(window, EVENTS.TOUCH_END, this.windowClicked);\n if (this.value) {\n this.toggle(true);\n }\n },\n beforeDestroy: function beforeDestroy () {\n this.removeDropdownFromBody();\n if (this.triggerEl) {\n off(this.triggerEl, EVENTS.CLICK, this.toggle);\n off(this.triggerEl, EVENTS.KEY_DOWN, this.onKeyPress);\n }\n off(this.$refs.dropdown, EVENTS.KEY_DOWN, this.onKeyPress);\n off(window, EVENTS.CLICK, this.windowClicked);\n off(window, EVENTS.TOUCH_END, this.windowClicked);\n },\n methods: {\n getFocusItem: function getFocusItem () {\n var dropdownEl = this.$refs.dropdown;\n /* istanbul ignore next */\n return dropdownEl.querySelector('li > a:focus')\n },\n onKeyPress: function onKeyPress (event) {\n if (this.show) {\n var dropdownEl = this.$refs.dropdown;\n var keyCode = event.keyCode;\n if (keyCode === 27) {\n // esc\n this.toggle(false);\n this.triggerEl && this.triggerEl.focus();\n } else if (keyCode === 13) {\n // enter\n var currentFocus = this.getFocusItem();\n currentFocus && currentFocus.click();\n } else if (keyCode === 38 || keyCode === 40) {\n // up || down\n event.preventDefault();\n event.stopPropagation();\n var currentFocus$1 = this.getFocusItem();\n var items = dropdownEl.querySelectorAll('li:not(.disabled) > a');\n if (!currentFocus$1) {\n focus(items[0]);\n } else {\n for (var i = 0; i < items.length; i++) {\n if (currentFocus$1 === items[i]) {\n if (keyCode === 38 && i < items.length > 0) {\n focus(items[i - 1]);\n } else if (keyCode === 40 && i < items.length - 1) {\n focus(items[i + 1]);\n }\n break\n }\n }\n }\n }\n }\n },\n initTrigger: function initTrigger () {\n var trigger = this.$el.querySelector('[data-role=\"trigger\"]') || this.$el.querySelector('.dropdown-toggle') || this.$el.firstChild;\n this.triggerEl = trigger && trigger !== this.$refs.dropdown ? trigger : null;\n },\n toggle: function toggle (show) {\n if (this.disabled) {\n return\n }\n if (isBoolean(show)) {\n this.show = show;\n } else {\n this.show = !this.show;\n }\n if (this.appendToBody) {\n this.show ? this.appendDropdownToBody() : this.removeDropdownFromBody();\n }\n this.$emit('input', this.show);\n },\n windowClicked: function windowClicked (event) {\n var target = event.target;\n if (this.show && target) {\n var targetInNotCloseElements = false;\n if (this.notCloseElements) {\n for (var i = 0, l = this.notCloseElements.length; i < l; i++) {\n var isTargetInElement = this.notCloseElements[i].contains(target);\n var shouldBreak = isTargetInElement;\n /* istanbul ignore else */\n if (this.appendToBody) {\n var isTargetInDropdown = this.$refs.dropdown.contains(target);\n var isElInElements = this.notCloseElements.indexOf(this.$el) >= 0;\n shouldBreak = isTargetInElement || (isTargetInDropdown && isElInElements);\n }\n if (shouldBreak) {\n targetInNotCloseElements = true;\n break\n }\n }\n }\n var targetInDropdownBody = this.$refs.dropdown.contains(target);\n var targetInTrigger = this.$el.contains(target) && !targetInDropdownBody;\n // normally, a dropdown select event is handled by @click that trigger after @touchend\n // then @touchend event have to be ignore in this case\n var targetInDropdownAndIsTouchEvent = targetInDropdownBody && event.type === 'touchend';\n if (!targetInTrigger && !targetInNotCloseElements && !targetInDropdownAndIsTouchEvent) {\n this.toggle(false);\n }\n }\n },\n appendDropdownToBody: function appendDropdownToBody () {\n try {\n var el = this.$refs.dropdown;\n el.style.display = 'block';\n document.body.appendChild(el);\n var positionElement = this.positionElement || this.$el;\n setDropdownPosition(el, positionElement, this);\n } catch (e) {\n // Silent\n }\n },\n removeDropdownFromBody: function removeDropdownFromBody () {\n try {\n var el = this.$refs.dropdown;\n el.removeAttribute('style');\n this.$el.appendChild(el);\n } catch (e) {\n // Silent\n }\n }\n }\n};\n\nvar defaultLang = {\n uiv: {\n datePicker: {\n clear: 'Clear',\n today: 'Today',\n month: 'Month',\n month1: 'January',\n month2: 'February',\n month3: 'March',\n month4: 'April',\n month5: 'May',\n month6: 'June',\n month7: 'July',\n month8: 'August',\n month9: 'September',\n month10: 'October',\n month11: 'November',\n month12: 'December',\n year: 'Year',\n week1: 'Mon',\n week2: 'Tue',\n week3: 'Wed',\n week4: 'Thu',\n week5: 'Fri',\n week6: 'Sat',\n week7: 'Sun'\n },\n timePicker: {\n am: 'AM',\n pm: 'PM'\n },\n modal: {\n cancel: 'Cancel',\n ok: 'OK'\n },\n multiSelect: {\n placeholder: 'Select...',\n filterPlaceholder: 'Search...'\n }\n }\n};\n\n// https://github.com/ElemeFE/element/blob/dev/src/locale/index.js\n\nvar lang = defaultLang;\n\nvar i18nHandler = function () {\n var vuei18n = Object.getPrototypeOf(this).$t;\n /* istanbul ignore else */\n /* istanbul ignore next */\n if (isFunction(vuei18n)) {\n /* istanbul ignore next */\n try {\n return vuei18n.apply(this, arguments)\n } catch (err) {\n return this.$t.apply(this, arguments)\n }\n }\n};\n\nvar t$1 = function (path, options) {\n options = options || {};\n var value;\n try {\n value = i18nHandler.apply(this, arguments);\n /* istanbul ignore next */\n if (isExist(value) && !options.$$locale) {\n return value\n }\n } catch (e) {\n // ignore\n }\n var array = path.split('.');\n var current = options.$$locale || lang;\n\n for (var i = 0, j = array.length; i < j; i++) {\n var property = array[i];\n value = current[property];\n if (i === j - 1) { return value }\n if (!value) { return '' }\n current = value;\n }\n /* istanbul ignore next */\n return ''\n};\n\nvar use = function (l) {\n lang = l || lang;\n};\n\nvar i18n = function (fn) {\n i18nHandler = fn || i18nHandler;\n};\n\nvar locale = { use: use, t: t$1, i18n: i18n };\n\nvar Local = {\n methods: {\n t: function t$1$1 () {\n var arguments$1 = arguments;\n\n var args = [];\n for (var i = 0; i < arguments.length; ++i) {\n args.push(arguments$1[i]);\n }\n args[1] = assign({}, { $$locale: this.locale }, args[1]);\n return t$1.apply(this, args)\n }\n },\n props: {\n locale: Object\n }\n};\n\nvar e=function(){return (e=Object.assign||function(e){for(var t,r=1,s=arguments.length;r props\n href: String,\n target: String,\n // props\n to: null,\n replace: {\n type: Boolean,\n default: false\n },\n append: {\n type: Boolean,\n default: false\n },\n exact: {\n type: Boolean,\n default: false\n }\n }\n};\n\nvar BtnGroup = {\n functional: true,\n render: function render (h, ref) {\n var obj;\n\n var props = ref.props;\n var children = ref.children;\n var data = ref.data;\n return h(\n 'div',\n a(data, {\n class: ( obj = {\n 'btn-group': !props.vertical,\n 'btn-group-vertical': props.vertical,\n 'btn-group-justified': props.justified\n }, obj[(\"btn-group-\" + (props.size))] = props.size, obj ),\n attrs: {\n role: 'group',\n 'data-toggle': 'buttons'\n }\n }),\n children\n )\n },\n props: {\n size: String,\n vertical: {\n type: Boolean,\n default: false\n },\n justified: {\n type: Boolean,\n default: false\n }\n }\n};\n\nvar INPUT_TYPE_CHECKBOX = 'checkbox';\nvar INPUT_TYPE_RADIO = 'radio';\n\nvar Btn = {\n functional: true,\n mixins: [linkMixin],\n render: function render (h, ref) {\n var children = ref.children;\n var props = ref.props;\n var data = ref.data;\n\n // event listeners\n var listeners = data.on || {};\n // checkbox: model contain inputValue\n // radio: model === inputValue\n var isInputActive = props.inputType === INPUT_TYPE_CHECKBOX ? props.value.indexOf(props.inputValue) >= 0 : props.value === props.inputValue;\n // button class\n var classes = {\n btn: true,\n active: props.inputType ? isInputActive : props.active,\n disabled: props.disabled,\n 'btn-block': props.block\n };\n classes[(\"btn-\" + (props.type))] = Boolean(props.type);\n classes[(\"btn-\" + (props.size))] = Boolean(props.size);\n // prevent event for disabled links\n var on = {\n click: function click (e) {\n if (props.disabled && e instanceof Event) {\n e.preventDefault();\n e.stopPropagation();\n }\n }\n };\n // render params\n var tag, options, slot;\n\n if (props.href) {\n // is native link\n tag = 'a';\n slot = children;\n options = a(data, {\n on: on,\n class: classes,\n attrs: {\n role: 'button',\n href: props.href,\n target: props.target\n }\n });\n } else if (props.to) {\n // is vue router link\n tag = 'router-link';\n slot = children;\n options = a(data, {\n nativeOn: on,\n class: classes,\n props: {\n event: props.disabled ? '' : 'click', // prevent nav while disabled\n to: props.to,\n replace: props.replace,\n append: props.append,\n exact: props.exact\n },\n attrs: {\n role: 'button'\n }\n });\n } else if (props.inputType) {\n // is input checkbox or radio\n tag = 'label';\n options = a(data, {\n on: on,\n class: classes\n });\n slot = [\n h('input', {\n attrs: {\n autocomplete: 'off',\n type: props.inputType,\n checked: isInputActive ? 'checked' : null,\n disabled: props.disabled\n },\n domProps: {\n checked: isInputActive // required\n },\n on: {\n input: function input (evt) {\n evt.stopPropagation();\n },\n change: function change () {\n if (props.inputType === INPUT_TYPE_CHECKBOX) {\n var valueCopied = props.value.slice();\n if (isInputActive) {\n valueCopied.splice(valueCopied.indexOf(props.inputValue), 1);\n } else {\n valueCopied.push(props.inputValue);\n }\n listeners.input(valueCopied);\n } else {\n listeners.input(props.inputValue);\n }\n }\n }\n }),\n children\n ];\n } else if (props.justified) {\n // is in justified btn-group\n tag = BtnGroup;\n options = {};\n slot = [\n h('button', a(data, {\n on: on,\n class: classes,\n attrs: {\n type: props.nativeType,\n disabled: props.disabled\n }\n }), children)\n ];\n } else {\n // is button\n tag = 'button';\n slot = children;\n options = a(data, {\n on: on,\n class: classes,\n attrs: {\n type: props.nativeType,\n disabled: props.disabled\n }\n });\n }\n\n return h(tag, options, slot)\n },\n props: {\n justified: {\n type: Boolean,\n default: false\n },\n type: {\n type: String,\n default: 'default'\n },\n nativeType: {\n type: String,\n default: 'button'\n },\n size: String,\n block: {\n type: Boolean,\n default: false\n },\n active: {\n type: Boolean,\n default: false\n },\n disabled: {\n type: Boolean,\n default: false\n },\n // props\n value: null,\n inputValue: null,\n inputType: {\n type: String,\n validator: function validator (value) {\n return value === INPUT_TYPE_CHECKBOX || value === INPUT_TYPE_RADIO\n }\n }\n }\n};\n\nvar IN = 'in';\n\nvar script$f = {\n mixins: [Local],\n components: { Btn: Btn },\n props: {\n value: {\n type: Boolean,\n default: false\n },\n title: String,\n size: String,\n backdrop: {\n type: Boolean,\n default: true\n },\n footer: {\n type: Boolean,\n default: true\n },\n header: {\n type: Boolean,\n default: true\n },\n cancelText: String,\n cancelType: {\n type: String,\n default: 'default'\n },\n okText: String,\n okType: {\n type: String,\n default: 'primary'\n },\n dismissBtn: {\n type: Boolean,\n default: true\n },\n transition: {\n type: Number,\n default: 150\n },\n autoFocus: {\n type: Boolean,\n default: false\n },\n keyboard: {\n type: Boolean,\n default: true\n },\n beforeClose: Function,\n zOffset: {\n type: Number,\n default: 20\n },\n appendToBody: {\n type: Boolean,\n default: false\n },\n displayStyle: {\n type: String,\n default: 'block'\n }\n },\n data: function data () {\n return {\n msg: ''\n }\n },\n computed: {\n modalSizeClass: function modalSizeClass () {\n var obj;\n\n return ( obj = {}, obj[(\"modal-\" + (this.size))] = Boolean(this.size), obj )\n }\n },\n watch: {\n value: function value (v) {\n this.$toggle(v);\n }\n },\n mounted: function mounted () {\n removeFromDom(this.$refs.backdrop);\n on(window, EVENTS.MOUSE_DOWN, this.suppressBackgroundClose);\n on(window, EVENTS.KEY_UP, this.onKeyPress);\n if (this.value) {\n this.$toggle(true);\n }\n },\n beforeDestroy: function beforeDestroy () {\n clearTimeout(this.timeoutId);\n removeFromDom(this.$refs.backdrop);\n removeFromDom(this.$el);\n if (getOpenModalNum() === 0) {\n toggleBodyOverflow(true);\n }\n off(window, EVENTS.MOUSE_DOWN, this.suppressBackgroundClose);\n off(window, EVENTS.MOUSE_UP, this.unsuppressBackgroundClose);\n off(window, EVENTS.KEY_UP, this.onKeyPress);\n },\n methods: {\n onKeyPress: function onKeyPress (event) {\n if (this.keyboard && this.value && event.keyCode === 27) {\n var thisModal = this.$refs.backdrop;\n var thisZIndex = thisModal.style.zIndex;\n thisZIndex = thisZIndex && thisZIndex !== 'auto' ? parseInt(thisZIndex) : 0;\n // Find out if this modal is the top most one.\n var modals = getOpenModals();\n var modalsLength = modals.length;\n for (var i = 0; i < modalsLength; i++) {\n if (modals[i] !== thisModal) {\n var zIndex = modals[i].style.zIndex;\n zIndex = zIndex && zIndex !== 'auto' ? parseInt(zIndex) : 0;\n // if any existing modal has higher zIndex, ignore\n if (zIndex > thisZIndex) {\n return\n }\n }\n }\n this.toggle(false);\n }\n },\n toggle: function toggle (show, msg) {\n var this$1 = this;\n\n var shouldClose = true;\n if (isFunction(this.beforeClose)) {\n shouldClose = this.beforeClose(msg);\n }\n\n if (isPromiseSupported()) {\n // Skip the hiding when beforeClose returning falsely value or returned Promise resolves to falsely value\n // Use Promise.resolve to accept both Boolean values and Promises\n Promise.resolve(shouldClose).then(function (shouldClose) {\n // Skip the hiding while show===false\n if (!show && shouldClose) {\n this$1.msg = msg;\n this$1.$emit('input', show);\n }\n });\n } else {\n // Fallback to old version if promise is not supported\n // skip the hiding while show===false & beforeClose returning falsely value\n if (!show && !shouldClose) {\n return\n }\n\n this.msg = msg;\n this.$emit('input', show);\n }\n },\n $toggle: function $toggle (show) {\n var this$1 = this;\n\n var modal = this.$el;\n var backdrop = this.$refs.backdrop;\n clearTimeout(this.timeoutId);\n if (show) {\n // If two modals share the same v-if condition the calculated z-index is incorrect,\n // resulting in popover misbehaviour.\n // solved by adding a nextTick.\n // https://github.com/uiv-lib/uiv/issues/342\n this.$nextTick(function () {\n var alreadyOpenModalNum = getOpenModalNum();\n document.body.appendChild(backdrop);\n if (this$1.appendToBody) {\n document.body.appendChild(modal);\n }\n modal.style.display = this$1.displayStyle;\n modal.scrollTop = 0;\n backdrop.offsetHeight; // force repaint\n toggleBodyOverflow(false);\n addClass(backdrop, IN);\n addClass(modal, IN);\n // fix z-index for nested modals\n // no need to calculate if no modal is already open\n if (alreadyOpenModalNum > 0) {\n var modalBaseZ = parseInt(getComputedStyle(modal).zIndex) || 1050; // 1050 is default modal z-Index\n var backdropBaseZ = parseInt(getComputedStyle(backdrop).zIndex) || 1040; // 1040 is default backdrop z-Index\n var offset = alreadyOpenModalNum * this$1.zOffset;\n modal.style.zIndex = \"\" + (modalBaseZ + offset);\n backdrop.style.zIndex = \"\" + (backdropBaseZ + offset);\n }\n // z-index fix end\n this$1.timeoutId = setTimeout(function () {\n if (this$1.autoFocus) {\n var btn = this$1.$el.querySelector('[data-action=\"auto-focus\"]');\n if (btn) {\n btn.focus();\n }\n }\n this$1.$emit('show');\n this$1.timeoutId = 0;\n }, this$1.transition);\n });\n } else {\n removeClass(backdrop, IN);\n removeClass(modal, IN);\n this.timeoutId = setTimeout(function () {\n modal.style.display = 'none';\n removeFromDom(backdrop);\n if (this$1.appendToBody) {\n removeFromDom(modal);\n }\n if (getOpenModalNum() === 0) {\n toggleBodyOverflow(true);\n }\n this$1.$emit('hide', this$1.msg || 'dismiss');\n this$1.msg = '';\n this$1.timeoutId = 0;\n // restore z-index for nested modals\n modal.style.zIndex = '';\n backdrop.style.zIndex = '';\n // z-index fix end\n }, this.transition);\n }\n },\n suppressBackgroundClose: function suppressBackgroundClose (event) {\n if (event && event.target === this.$el) {\n return\n }\n this.isCloseSuppressed = true;\n on(window, 'mouseup', this.unsuppressBackgroundClose);\n },\n unsuppressBackgroundClose: function unsuppressBackgroundClose () {\n var this$1 = this;\n\n if (this.isCloseSuppressed) {\n off(window, 'mouseup', this.unsuppressBackgroundClose);\n setTimeout(function () {\n this$1.isCloseSuppressed = false;\n }, 1);\n }\n },\n backdropClicked: function backdropClicked (event) {\n if (this.backdrop && !this.isCloseSuppressed) {\n this.toggle(false);\n }\n }\n }\n};\n\n/* script */\nvar __vue_script__$f = script$f;\n\n/* template */\nvar __vue_render__$f = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"div\",\n {\n staticClass: \"modal\",\n class: { fade: _vm.transition > 0 },\n attrs: { tabindex: \"-1\", role: \"dialog\" },\n on: {\n click: function($event) {\n if ($event.target !== $event.currentTarget) {\n return null\n }\n return _vm.backdropClicked($event)\n }\n }\n },\n [\n _c(\n \"div\",\n {\n ref: \"dialog\",\n staticClass: \"modal-dialog\",\n class: _vm.modalSizeClass,\n attrs: { role: \"document\" }\n },\n [\n _c(\"div\", { staticClass: \"modal-content\" }, [\n _vm.header\n ? _c(\n \"div\",\n { staticClass: \"modal-header\" },\n [\n _vm._t(\"header\", [\n _vm.dismissBtn\n ? _c(\n \"button\",\n {\n staticClass: \"close\",\n staticStyle: {\n position: \"relative\",\n \"z-index\": \"1060\"\n },\n attrs: { type: \"button\", \"aria-label\": \"Close\" },\n on: {\n click: function($event) {\n return _vm.toggle(false)\n }\n }\n },\n [\n _c(\"span\", { attrs: { \"aria-hidden\": \"true\" } }, [\n _vm._v(\"×\")\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"h4\",\n { staticClass: \"modal-title\" },\n [_vm._t(\"title\", [_vm._v(_vm._s(_vm.title))])],\n 2\n )\n ])\n ],\n 2\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"modal-body\" }, [_vm._t(\"default\")], 2),\n _vm._v(\" \"),\n _vm.footer\n ? _c(\n \"div\",\n { staticClass: \"modal-footer\" },\n [\n _vm._t(\"footer\", [\n _c(\n \"btn\",\n {\n attrs: { type: _vm.cancelType },\n on: {\n click: function($event) {\n return _vm.toggle(false, \"cancel\")\n }\n }\n },\n [\n _c(\"span\", [\n _vm._v(\n _vm._s(\n _vm.cancelText || _vm.t(\"uiv.modal.cancel\")\n )\n )\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"btn\",\n {\n attrs: {\n type: _vm.okType,\n \"data-action\": \"auto-focus\"\n },\n on: {\n click: function($event) {\n return _vm.toggle(false, \"ok\")\n }\n }\n },\n [\n _c(\"span\", [\n _vm._v(_vm._s(_vm.okText || _vm.t(\"uiv.modal.ok\")))\n ])\n ]\n )\n ])\n ],\n 2\n )\n : _vm._e()\n ])\n ]\n ),\n _vm._v(\" \"),\n _c(\"div\", {\n ref: \"backdrop\",\n staticClass: \"modal-backdrop\",\n class: { fade: _vm.transition > 0 }\n })\n ]\n )\n};\nvar __vue_staticRenderFns__$f = [];\n__vue_render__$f._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$f = undefined;\n /* scoped */\n var __vue_scope_id__$f = undefined;\n /* module identifier */\n var __vue_module_identifier__$f = undefined;\n /* functional template */\n var __vue_is_functional_template__$f = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$f = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$f, staticRenderFns: __vue_staticRenderFns__$f },\n __vue_inject_styles__$f,\n __vue_script__$f,\n __vue_scope_id__$f,\n __vue_is_functional_template__$f,\n __vue_module_identifier__$f,\n false,\n undefined,\n undefined,\n undefined\n );\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; }\n\n return arr2;\n }\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") { return Array.from(iter); }\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nvar inBrowser = typeof window !== 'undefined';\nfunction freeze(item) {\n if (Array.isArray(item) || _typeof(item) === 'object') {\n return Object.freeze(item);\n }\n\n return item;\n}\nfunction combinePassengers(transports) {\n var slotProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return transports.reduce(function (passengers, transport) {\n var temp = transport.passengers[0];\n var newPassengers = typeof temp === 'function' ? temp(slotProps) : transport.passengers;\n return passengers.concat(newPassengers);\n }, []);\n}\nfunction stableSort(array, compareFn) {\n return array.map(function (v, idx) {\n return [idx, v];\n }).sort(function (a, b) {\n return compareFn(a[1], b[1]) || a[0] - b[0];\n }).map(function (c) {\n return c[1];\n });\n}\nfunction pick(obj, keys) {\n return keys.reduce(function (acc, key) {\n if (obj.hasOwnProperty(key)) {\n acc[key] = obj[key];\n }\n\n return acc;\n }, {});\n}\n\nvar transports = {};\nvar targets = {};\nvar sources = {};\nvar Wormhole = Vue.extend({\n data: function data() {\n return {\n transports: transports,\n targets: targets,\n sources: sources,\n trackInstances: inBrowser\n };\n },\n methods: {\n open: function open(transport) {\n if (!inBrowser) { return; }\n var to = transport.to,\n from = transport.from,\n passengers = transport.passengers,\n _transport$order = transport.order,\n order = _transport$order === void 0 ? Infinity : _transport$order;\n if (!to || !from || !passengers) { return; }\n var newTransport = {\n to: to,\n from: from,\n passengers: freeze(passengers),\n order: order\n };\n var keys = Object.keys(this.transports);\n\n if (keys.indexOf(to) === -1) {\n Vue.set(this.transports, to, []);\n }\n\n var currentIndex = this.$_getTransportIndex(newTransport); // Copying the array here so that the PortalTarget change event will actually contain two distinct arrays\n\n var newTransports = this.transports[to].slice(0);\n\n if (currentIndex === -1) {\n newTransports.push(newTransport);\n } else {\n newTransports[currentIndex] = newTransport;\n }\n\n this.transports[to] = stableSort(newTransports, function (a, b) {\n return a.order - b.order;\n });\n },\n close: function close(transport) {\n var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var to = transport.to,\n from = transport.from;\n if (!to || !from && force === false) { return; }\n\n if (!this.transports[to]) {\n return;\n }\n\n if (force) {\n this.transports[to] = [];\n } else {\n var index = this.$_getTransportIndex(transport);\n\n if (index >= 0) {\n // Copying the array here so that the PortalTarget change event will actually contain two distinct arrays\n var newTransports = this.transports[to].slice(0);\n newTransports.splice(index, 1);\n this.transports[to] = newTransports;\n }\n }\n },\n registerTarget: function registerTarget(target, vm, force) {\n if (!inBrowser) { return; }\n\n if (this.trackInstances && !force && this.targets[target]) {\n console.warn(\"[portal-vue]: Target \".concat(target, \" already exists\"));\n }\n\n this.$set(this.targets, target, Object.freeze([vm]));\n },\n unregisterTarget: function unregisterTarget(target) {\n this.$delete(this.targets, target);\n },\n registerSource: function registerSource(source, vm, force) {\n if (!inBrowser) { return; }\n\n if (this.trackInstances && !force && this.sources[source]) {\n console.warn(\"[portal-vue]: source \".concat(source, \" already exists\"));\n }\n\n this.$set(this.sources, source, Object.freeze([vm]));\n },\n unregisterSource: function unregisterSource(source) {\n this.$delete(this.sources, source);\n },\n hasTarget: function hasTarget(to) {\n return !!(this.targets[to] && this.targets[to][0]);\n },\n hasSource: function hasSource(to) {\n return !!(this.sources[to] && this.sources[to][0]);\n },\n hasContentFor: function hasContentFor(to) {\n return !!this.transports[to] && !!this.transports[to].length;\n },\n // Internal\n $_getTransportIndex: function $_getTransportIndex(_ref) {\n var to = _ref.to,\n from = _ref.from;\n\n for (var i in this.transports[to]) {\n if (this.transports[to][i].from === from) {\n return +i;\n }\n }\n\n return -1;\n }\n }\n});\nvar wormhole = new Wormhole(transports);\n\nvar _id = 1;\nvar Portal = Vue.extend({\n name: 'portal',\n props: {\n disabled: {\n type: Boolean\n },\n name: {\n type: String,\n default: function _default() {\n return String(_id++);\n }\n },\n order: {\n type: Number,\n default: 0\n },\n slim: {\n type: Boolean\n },\n slotProps: {\n type: Object,\n default: function _default() {\n return {};\n }\n },\n tag: {\n type: String,\n default: 'DIV'\n },\n to: {\n type: String,\n default: function _default() {\n return String(Math.round(Math.random() * 10000000));\n }\n }\n },\n created: function created() {\n var _this = this;\n\n this.$nextTick(function () {\n wormhole.registerSource(_this.name, _this);\n });\n },\n mounted: function mounted() {\n if (!this.disabled) {\n this.sendUpdate();\n }\n },\n updated: function updated() {\n if (this.disabled) {\n this.clear();\n } else {\n this.sendUpdate();\n }\n },\n beforeDestroy: function beforeDestroy() {\n wormhole.unregisterSource(this.name);\n this.clear();\n },\n watch: {\n to: function to(newValue, oldValue) {\n oldValue && oldValue !== newValue && this.clear(oldValue);\n this.sendUpdate();\n }\n },\n methods: {\n clear: function clear(target) {\n var closer = {\n from: this.name,\n to: target || this.to\n };\n wormhole.close(closer);\n },\n normalizeSlots: function normalizeSlots() {\n return this.$scopedSlots.default ? [this.$scopedSlots.default] : this.$slots.default;\n },\n normalizeOwnChildren: function normalizeOwnChildren(children) {\n return typeof children === 'function' ? children(this.slotProps) : children;\n },\n sendUpdate: function sendUpdate() {\n var slotContent = this.normalizeSlots();\n\n if (slotContent) {\n var transport = {\n from: this.name,\n to: this.to,\n passengers: _toConsumableArray(slotContent),\n order: this.order\n };\n wormhole.open(transport);\n } else {\n this.clear();\n }\n }\n },\n render: function render(h) {\n var children = this.$slots.default || this.$scopedSlots.default || [];\n var Tag = this.tag;\n\n if (children && this.disabled) {\n return children.length <= 1 && this.slim ? this.normalizeOwnChildren(children)[0] : h(Tag, [this.normalizeOwnChildren(children)]);\n } else {\n return this.slim ? h() : h(Tag, {\n class: {\n 'v-portal': true\n },\n style: {\n display: 'none'\n },\n key: 'v-portal-placeholder'\n });\n }\n }\n});\n\nvar PortalTarget = Vue.extend({\n name: 'portalTarget',\n props: {\n multiple: {\n type: Boolean,\n default: false\n },\n name: {\n type: String,\n required: true\n },\n slim: {\n type: Boolean,\n default: false\n },\n slotProps: {\n type: Object,\n default: function _default() {\n return {};\n }\n },\n tag: {\n type: String,\n default: 'div'\n },\n transition: {\n type: [String, Object, Function]\n }\n },\n data: function data() {\n return {\n transports: wormhole.transports,\n firstRender: true\n };\n },\n created: function created() {\n var _this = this;\n\n this.$nextTick(function () {\n wormhole.registerTarget(_this.name, _this);\n });\n },\n watch: {\n ownTransports: function ownTransports() {\n this.$emit('change', this.children().length > 0);\n },\n name: function name(newVal, oldVal) {\n /**\r\n * TODO\r\n * This should warn as well ...\r\n */\n wormhole.unregisterTarget(oldVal);\n wormhole.registerTarget(newVal, this);\n }\n },\n mounted: function mounted() {\n var _this2 = this;\n\n if (this.transition) {\n this.$nextTick(function () {\n // only when we have a transition, because it causes a re-render\n _this2.firstRender = false;\n });\n }\n },\n beforeDestroy: function beforeDestroy() {\n wormhole.unregisterTarget(this.name);\n },\n computed: {\n ownTransports: function ownTransports() {\n var transports = this.transports[this.name] || [];\n\n if (this.multiple) {\n return transports;\n }\n\n return transports.length === 0 ? [] : [transports[transports.length - 1]];\n },\n passengers: function passengers() {\n return combinePassengers(this.ownTransports, this.slotProps);\n }\n },\n methods: {\n // can't be a computed prop because it has to \"react\" to $slot changes.\n children: function children() {\n return this.passengers.length !== 0 ? this.passengers : this.$scopedSlots.default ? this.$scopedSlots.default(this.slotProps) : this.$slots.default || [];\n },\n // can't be a computed prop because it has to \"react\" to this.children().\n noWrapper: function noWrapper() {\n var noWrapper = this.slim && !this.transition;\n\n if (noWrapper && this.children().length > 1) {\n console.warn('[portal-vue]: PortalTarget with `slim` option received more than one child element.');\n }\n\n return noWrapper;\n }\n },\n render: function render(h) {\n var noWrapper = this.noWrapper();\n var children = this.children();\n var Tag = this.transition || this.tag;\n return noWrapper ? children[0] : this.slim && !Tag ? h() : h(Tag, {\n props: {\n // if we have a transition component, pass the tag if it exists\n tag: this.transition && this.tag ? this.tag : undefined\n },\n class: {\n 'vue-portal-target': true\n }\n }, children);\n }\n});\n\nvar _id$1 = 0;\nvar portalProps = ['disabled', 'name', 'order', 'slim', 'slotProps', 'tag', 'to'];\nvar targetProps = ['multiple', 'transition'];\nVue.extend({\n name: 'MountingPortal',\n inheritAttrs: false,\n props: {\n append: {\n type: [Boolean, String]\n },\n bail: {\n type: Boolean\n },\n mountTo: {\n type: String,\n required: true\n },\n // Portal\n disabled: {\n type: Boolean\n },\n // name for the portal\n name: {\n type: String,\n default: function _default() {\n return 'mounted_' + String(_id$1++);\n }\n },\n order: {\n type: Number,\n default: 0\n },\n slim: {\n type: Boolean\n },\n slotProps: {\n type: Object,\n default: function _default() {\n return {};\n }\n },\n tag: {\n type: String,\n default: 'DIV'\n },\n // name for the target\n to: {\n type: String,\n default: function _default() {\n return String(Math.round(Math.random() * 10000000));\n }\n },\n // Target\n multiple: {\n type: Boolean,\n default: false\n },\n targetSlim: {\n type: Boolean\n },\n targetSlotProps: {\n type: Object,\n default: function _default() {\n return {};\n }\n },\n targetTag: {\n type: String,\n default: 'div'\n },\n transition: {\n type: [String, Object, Function]\n }\n },\n created: function created() {\n if (typeof document === 'undefined') { return; }\n var el = document.querySelector(this.mountTo);\n\n if (!el) {\n console.error(\"[portal-vue]: Mount Point '\".concat(this.mountTo, \"' not found in document\"));\n return;\n }\n\n var props = this.$props; // Target already exists\n\n if (wormhole.targets[props.name]) {\n if (props.bail) {\n console.warn(\"[portal-vue]: Target \".concat(props.name, \" is already mounted.\\n Aborting because 'bail: true' is set\"));\n } else {\n this.portalTarget = wormhole.targets[props.name];\n }\n\n return;\n }\n\n var append = props.append;\n\n if (append) {\n var type = typeof append === 'string' ? append : 'DIV';\n var mountEl = document.createElement(type);\n el.appendChild(mountEl);\n el = mountEl;\n } // get props for target from $props\n // we have to rename a few of them\n\n\n var _props = pick(this.$props, targetProps);\n\n _props.slim = this.targetSlim;\n _props.tag = this.targetTag;\n _props.slotProps = this.targetSlotProps;\n _props.name = this.to;\n this.portalTarget = new PortalTarget({\n el: el,\n parent: this.$parent || this,\n propsData: _props\n });\n },\n beforeDestroy: function beforeDestroy() {\n var target = this.portalTarget;\n\n if (this.append) {\n var el = target.$el;\n el.parentNode.removeChild(el);\n }\n\n target.$destroy();\n },\n render: function render(h) {\n if (!this.portalTarget) {\n console.warn(\"[portal-vue] Target wasn't mounted\");\n return h();\n } // if there's no \"manual\" scoped slot, so we create a ourselves\n\n\n if (!this.$scopedSlots.manual) {\n var props = pick(this.$props, portalProps);\n return h(Portal, {\n props: props,\n attrs: this.$attrs,\n on: this.$listeners,\n scopedSlots: this.$scopedSlots\n }, this.$slots.default);\n } // else, we render the scoped slot\n\n\n var content = this.$scopedSlots.manual({\n to: this.to\n }); // if user used for the scoped slot\n // content will be an array\n\n if (Array.isArray(content)) {\n content = content[0];\n }\n\n if (!content) { return h(); }\n return content;\n }\n});\n\nvar ACTIVE_CLASS = 'active';\nvar IN_CLASS$1 = 'in';\n\nvar script$e = {\n components: { Portal: Portal },\n props: {\n title: {\n type: String,\n default: 'Tab Title'\n },\n disabled: {\n type: Boolean,\n default: false\n },\n tabClasses: {\n type: Object,\n default: function () { return {} }\n },\n group: String,\n pullRight: {\n type: Boolean,\n default: false\n },\n hidden: {\n type: Boolean,\n default: false\n }\n },\n data: function data () {\n return {\n active: true,\n transition: 150\n }\n },\n watch: {\n active: function active (active$1) {\n var this$1 = this;\n\n if (active$1) {\n setTimeout(function () {\n addClass(this$1.$el, ACTIVE_CLASS);\n this$1.$el.offsetHeight;\n addClass(this$1.$el, IN_CLASS$1);\n try {\n this$1.$parent.$emit('changed', this$1.$parent.activeIndex);\n } catch (e) {\n throw new Error(' parent must be .')\n }\n }, this.transition);\n } else {\n removeClass(this.$el, IN_CLASS$1);\n setTimeout(function () {\n removeClass(this$1.$el, ACTIVE_CLASS);\n }, this.transition);\n }\n }\n },\n created: function created () {\n try {\n this.$parent.tabs.push(this);\n } catch (e) {\n throw new Error(' parent must be .')\n }\n },\n beforeDestroy: function beforeDestroy () {\n var tabs = this.$parent && this.$parent.tabs;\n spliceIfExist(tabs, this);\n },\n methods: {\n show: function show () {\n var this$1 = this;\n\n this.$nextTick(function () {\n addClass(this$1.$el, ACTIVE_CLASS);\n addClass(this$1.$el, IN_CLASS$1);\n });\n }\n }\n};\n\n/* script */\nvar __vue_script__$e = script$e;\n\n/* template */\nvar __vue_render__$e = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"div\",\n {\n staticClass: \"tab-pane\",\n class: { fade: _vm.transition > 0 },\n attrs: { role: \"tabpanel\" }\n },\n [\n _vm._t(\"default\"),\n _vm._v(\" \"),\n _c(\"portal\", { attrs: { to: _vm._uid.toString() } }, [_vm._t(\"title\")], 2)\n ],\n 2\n )\n};\nvar __vue_staticRenderFns__$e = [];\n__vue_render__$e._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$e = undefined;\n /* scoped */\n var __vue_scope_id__$e = undefined;\n /* module identifier */\n var __vue_module_identifier__$e = undefined;\n /* functional template */\n var __vue_is_functional_template__$e = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$e = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$e, staticRenderFns: __vue_staticRenderFns__$e },\n __vue_inject_styles__$e,\n __vue_script__$e,\n __vue_scope_id__$e,\n __vue_is_functional_template__$e,\n __vue_module_identifier__$e,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar BEFORE_CHANGE_EVENT = 'before-change';\n\nvar script$d = {\n components: { Dropdown: Dropdown, PortalTarget: PortalTarget },\n props: {\n value: {\n type: Number,\n validator: function (v) { return v >= 0; }\n },\n transition: {\n type: Number,\n default: 150\n },\n justified: Boolean,\n pills: Boolean,\n stacked: Boolean,\n customNavClass: null,\n customContentClass: null\n },\n data: function data () {\n return {\n tabs: [],\n activeIndex: 0 // Make v-model not required\n }\n },\n watch: {\n value: {\n immediate: true,\n handler: function handler (value) {\n if (isNumber(value)) {\n this.activeIndex = value;\n this.selectCurrent();\n }\n }\n },\n tabs: function tabs (tabs$1) {\n var this$1 = this;\n\n tabs$1.forEach(function (tab, index) {\n tab.transition = this$1.transition;\n if (index === this$1.activeIndex) {\n tab.show();\n }\n });\n this.selectCurrent();\n }\n },\n computed: {\n navClasses: function navClasses () {\n var obj;\n\n var tabClasses = {\n nav: true,\n 'nav-justified': this.justified,\n 'nav-tabs': !this.pills,\n 'nav-pills': this.pills,\n 'nav-stacked': this.stacked && this.pills\n };\n var customNavClass = this.customNavClass;\n if (isExist(customNavClass)) {\n if (isString(customNavClass)) {\n return assign({}, tabClasses, ( obj = {}, obj[customNavClass] = true, obj ))\n } else {\n return assign({}, tabClasses, customNavClass)\n }\n } else {\n return tabClasses\n }\n },\n contentClasses: function contentClasses () {\n var obj;\n\n var contentClasses = {\n 'tab-content': true\n };\n var customContentClass = this.customContentClass;\n if (isExist(customContentClass)) {\n if (isString(customContentClass)) {\n return assign({}, contentClasses, ( obj = {}, obj[customContentClass] = true, obj ))\n } else {\n return assign({}, contentClasses, customContentClass)\n }\n } else {\n return contentClasses\n }\n },\n groupedTabs: function groupedTabs () {\n var tabs = [];\n var hash = {};\n this.tabs.forEach(function (tab) {\n if (tab.group) {\n if (hasOwnProperty(hash, tab.group)) {\n tabs[hash[tab.group]].tabs.push(tab);\n } else {\n tabs.push({\n tabs: [tab],\n group: tab.group\n });\n hash[tab.group] = tabs.length - 1;\n }\n if (tab.active) {\n tabs[hash[tab.group]].active = true;\n }\n if (tab.pullRight) {\n tabs[hash[tab.group]].pullRight = true;\n }\n } else {\n tabs.push(tab);\n }\n });\n tabs = tabs.map(function (tab) {\n if (Array.isArray(tab.tabs)) {\n tab.hidden = tab.tabs.filter(function (v) { return v.hidden; }).length === tab.tabs.length;\n }\n return tab\n });\n return tabs\n }\n },\n methods: {\n getTabClasses: function getTabClasses (tab, isSubTab) {\n if ( isSubTab === void 0 ) isSubTab = false;\n\n var defaultClasses = {\n active: tab.active,\n disabled: tab.disabled,\n 'pull-right': tab.pullRight && !isSubTab\n };\n\n // return with new classes added to tab\n return assign(defaultClasses, tab.tabClasses)\n },\n selectCurrent: function selectCurrent () {\n var this$1 = this;\n\n var found = false;\n this.tabs.forEach(function (tab, index) {\n if (index === this$1.activeIndex) {\n found = !tab.active;\n tab.active = true;\n } else {\n tab.active = false;\n }\n });\n if (found) {\n this.$emit('change', this.activeIndex);\n }\n },\n selectValidate: function selectValidate (index) {\n var this$1 = this;\n\n if (isFunction(this.$listeners[BEFORE_CHANGE_EVENT])) {\n this.$emit(BEFORE_CHANGE_EVENT, this.activeIndex, index, function (result) {\n if (!isExist(result)) {\n this$1.$select(index);\n }\n });\n } else {\n this.$select(index);\n }\n },\n select: function select (index) {\n if (!this.tabs[index].disabled && index !== this.activeIndex) {\n this.selectValidate(index);\n }\n },\n $select: function $select (index) {\n if (isNumber(this.value)) {\n this.$emit('input', index);\n } else {\n this.activeIndex = index;\n this.selectCurrent();\n }\n }\n }\n};\n\n/* script */\nvar __vue_script__$d = script$d;\n\n/* template */\nvar __vue_render__$d = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\"section\", [\n _c(\n \"ul\",\n { class: _vm.navClasses, attrs: { role: \"tablist\" } },\n [\n _vm._l(_vm.groupedTabs, function(tab, index) {\n return [\n tab.tabs\n ? _c(\n \"dropdown\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: !tab.hidden,\n expression: \"!tab.hidden\"\n }\n ],\n class: _vm.getTabClasses(tab),\n attrs: { role: \"presentation\", tag: \"li\" }\n },\n [\n _c(\n \"a\",\n {\n staticClass: \"dropdown-toggle\",\n attrs: { role: \"tab\", href: \"#\" },\n on: {\n click: function($event) {\n $event.preventDefault();\n }\n }\n },\n [\n _vm._v(_vm._s(tab.group) + \" \"),\n _c(\"span\", { staticClass: \"caret\" })\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"template\",\n { slot: \"dropdown\" },\n _vm._l(tab.tabs, function(subTab) {\n return _c(\n \"li\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: !subTab.hidden,\n expression: \"!subTab.hidden\"\n }\n ],\n class: _vm.getTabClasses(subTab, true)\n },\n [\n _c(\n \"a\",\n {\n attrs: { href: \"#\" },\n on: {\n click: function($event) {\n $event.preventDefault();\n _vm.select(_vm.tabs.indexOf(subTab));\n }\n }\n },\n [_vm._v(_vm._s(subTab.title))]\n )\n ]\n )\n }),\n 0\n )\n ],\n 2\n )\n : _c(\n \"li\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: !tab.hidden,\n expression: \"!tab.hidden\"\n }\n ],\n class: _vm.getTabClasses(tab),\n attrs: { role: \"presentation\" }\n },\n [\n tab.$slots.title\n ? _c(\"portal-target\", {\n attrs: {\n name: tab._uid.toString(),\n tag: \"a\",\n role: \"tab\",\n href: \"#\"\n },\n nativeOn: {\n click: function($event) {\n $event.preventDefault();\n _vm.select(_vm.tabs.indexOf(tab));\n }\n }\n })\n : _c(\"a\", {\n attrs: { role: \"tab\", href: \"#\" },\n domProps: { textContent: _vm._s(tab.title) },\n on: {\n click: function($event) {\n $event.preventDefault();\n _vm.select(_vm.tabs.indexOf(tab));\n }\n }\n })\n ],\n 1\n )\n ]\n }),\n _vm._v(\" \"),\n !_vm.justified && _vm.$slots[\"nav-right\"]\n ? _c(\"li\", { staticClass: \"pull-right\" }, [_vm._t(\"nav-right\")], 2)\n : _vm._e()\n ],\n 2\n ),\n _vm._v(\" \"),\n _c(\"div\", { class: _vm.contentClasses }, [_vm._t(\"default\")], 2)\n ])\n};\nvar __vue_staticRenderFns__$d = [];\n__vue_render__$d._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$d = undefined;\n /* scoped */\n var __vue_scope_id__$d = undefined;\n /* module identifier */\n var __vue_module_identifier__$d = undefined;\n /* functional template */\n var __vue_is_functional_template__$d = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$d = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$d, staticRenderFns: __vue_staticRenderFns__$d },\n __vue_inject_styles__$d,\n __vue_script__$d,\n __vue_scope_id__$d,\n __vue_is_functional_template__$d,\n __vue_module_identifier__$d,\n false,\n undefined,\n undefined,\n undefined\n );\n\nfunction pad (value, num) {\n value = value + '';\n for (var i = num - value.length; i > 0; i--) {\n value = '0' + value;\n }\n return value\n}\n\nvar monthNames = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December'\n];\n\n/**\n * Get total days number in a month.\n * because we're using 0 as the day so that it returns the last day\n * of the last month, so you have to add 1 to the month number\n * so it returns the correct amount of days.\n * https://stackoverflow.com/questions/1184334/get-number-days-in-a-specified-month-using-javascript\n * @param month 0-based\n * @param year\n * @returns {number}\n */\nfunction daysInMonth (month, year) {\n return new Date(year, month + 1, 0).getDate()\n}\n\nfunction stringify (date, format) {\n try {\n var year = date.getFullYear();\n var month = date.getMonth() + 1;\n var day = date.getDate();\n var monthName = monthNames[month - 1];\n return format\n .replace(/yyyy/g, year)\n .replace(/MMMM/g, monthName)\n .replace(/MMM/g, monthName.substring(0, 3))\n .replace(/MM/g, pad(month, 2))\n .replace(/dd/g, pad(day, 2))\n .replace(/yy/g, year)\n .replace(/M(?!a)/g, month)\n .replace(/d/g, day)\n } catch (e) {\n return ''\n }\n}\n\nfunction convertDateToUTC (date) {\n return new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), date.getUTCHours(), date.getUTCMinutes(), date.getUTCSeconds())\n}\n\n/**\n * https://stackoverflow.com/questions/6117814/get-week-of-year-in-javascript-like-in-php\n * For a given date, get the ISO week number\n * Based on information at:\n * http://www.merlyn.demon.co.uk/weekcalc.htm#WNR\n *\n * Algorithm is to find nearest thursday, it's year\n * is the year of the week number. Then get weeks\n * between that date and the first day of that year.\n *\n * Note that dates in one year can be weeks of previous\n * or next year, overlap is up to 3 days.\n *\n * e.g. 2014/12/29 is Monday in week 1 of 2015\n * 2012/1/1 is Sunday in week 52 of 2011\n *\n * @param {number} d.year year of date\n * @param {number} d.month month of date\n * @param {number} d.date date of date\n * @returns {number}\n */\nfunction getWeekNumber (d) {\n // Copy date so don't modify original\n var _d = new Date(Date.UTC(d.year, d.month, d.date));\n // Set to nearest Thursday: current date + 4 - current day number\n // Make Sunday's day number 7\n _d.setUTCDate(_d.getUTCDate() + 4 - (_d.getUTCDay() || 7));\n // Get first day of year\n var yearStart = new Date(Date.UTC(_d.getUTCFullYear(), 0, 1));\n // Calculate full weeks to nearest Thursday\n return Math.ceil((((_d - yearStart) / 86400000) + 1) / 7)\n}\n\nvar script$c = {\n mixins: [Local],\n props: {\n month: Number,\n year: Number,\n date: Date,\n today: Date,\n limit: Object,\n weekStartsWith: Number,\n iconControlLeft: String,\n iconControlRight: String,\n dateClass: Function,\n yearMonthFormatter: Function,\n weekNumbers: Boolean\n },\n components: { Btn: Btn },\n computed: {\n weekDays: function weekDays () {\n var days = [];\n var firstDay = this.weekStartsWith;\n while (days.length < 7) {\n days.push(firstDay++);\n if (firstDay > 6) {\n firstDay = 0;\n }\n }\n return days\n },\n yearMonthStr: function yearMonthStr () {\n if (this.yearMonthFormatter) {\n return this.yearMonthFormatter(this.year, this.month)\n } else {\n return isExist(this.month) ? ((this.year) + \" \" + (this.t((\"uiv.datePicker.month\" + (this.month + 1))))) : this.year\n }\n },\n monthDayRows: function monthDayRows () {\n var rows = [];\n var firstDay = new Date(this.year, this.month, 1);\n var prevMonthLastDate = new Date(this.year, this.month, 0).getDate();\n var startIndex = firstDay.getDay();\n // console.log(startIndex)\n var daysNum = daysInMonth(this.month, this.year);\n var weekOffset = 0;\n if (this.weekStartsWith > startIndex) {\n weekOffset = 7 - this.weekStartsWith;\n } else {\n weekOffset = 0 - this.weekStartsWith;\n }\n // console.log(prevMonthLastDate, startIndex, daysNum)\n for (var i = 0; i < 6; i++) {\n rows.push([]);\n for (var j = 0 - weekOffset; j < 7 - weekOffset; j++) {\n var currentIndex = i * 7 + j;\n var date = { year: this.year, disabled: false };\n // date in and not in current month\n if (currentIndex < startIndex) {\n date.date = prevMonthLastDate - startIndex + currentIndex + 1;\n if (this.month > 0) {\n date.month = this.month - 1;\n } else {\n date.month = 11;\n date.year--;\n }\n } else if (currentIndex < startIndex + daysNum) {\n date.date = currentIndex - startIndex + 1;\n date.month = this.month;\n } else {\n date.date = currentIndex - startIndex - daysNum + 1;\n if (this.month < 11) {\n date.month = this.month + 1;\n } else {\n date.month = 0;\n date.year++;\n }\n }\n // process limit dates\n var dateObj = new Date(date.year, date.month, date.date);\n var afterFrom = true;\n var beforeTo = true;\n if (this.limit && this.limit.from) {\n afterFrom = dateObj >= this.limit.from;\n }\n if (this.limit && this.limit.to) {\n beforeTo = dateObj < this.limit.to;\n }\n date.disabled = !afterFrom || !beforeTo;\n if (isFunction(this.dateClass)) {\n date.classes = this.dateClass(dateObj, {\n currentMonth: this.month,\n currentYear: this.year\n });\n } else {\n date.classes = '';\n }\n rows[i].push(date);\n }\n }\n return rows\n }\n },\n methods: {\n getWeekNumber: getWeekNumber,\n tWeekName: function tWeekName (index) {\n return this.t((\"uiv.datePicker.week\" + index))\n },\n getBtnType: function getBtnType (date) {\n if (this.date &&\n date.date === this.date.getDate() &&\n date.month === this.date.getMonth() &&\n date.year === this.date.getFullYear()) {\n return 'primary'\n } else if (date.date === this.today.getDate() &&\n date.month === this.today.getMonth() &&\n date.year === this.today.getFullYear()) {\n return 'info'\n } else {\n return 'default'\n }\n },\n select: function select (date) {\n this.$emit('date-change', date);\n },\n goPrevMonth: function goPrevMonth () {\n var month = this.month;\n var year = this.year;\n if (this.month > 0) {\n month--;\n } else {\n month = 11;\n year--;\n this.$emit('year-change', year);\n }\n this.$emit('month-change', month);\n },\n goNextMonth: function goNextMonth () {\n var month = this.month;\n var year = this.year;\n if (this.month < 11) {\n month++;\n } else {\n month = 0;\n year++;\n this.$emit('year-change', year);\n }\n this.$emit('month-change', month);\n },\n changeView: function changeView () {\n this.$emit('view-change', 'm');\n }\n }\n};\n\n/* script */\nvar __vue_script__$c = script$c;\n\n/* template */\nvar __vue_render__$c = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"table\",\n { staticStyle: { width: \"100%\" }, attrs: { role: \"grid\" } },\n [\n _c(\"thead\", [\n _c(\"tr\", [\n _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n staticClass: \"uiv-datepicker-pager-prev\",\n staticStyle: { border: \"none\" },\n attrs: { block: \"\", size: \"sm\" },\n on: { click: _vm.goPrevMonth }\n },\n [_c(\"i\", { class: _vm.iconControlLeft })]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"td\",\n { attrs: { colspan: _vm.weekNumbers ? 6 : 5 } },\n [\n _c(\n \"btn\",\n {\n staticClass: \"uiv-datepicker-title\",\n staticStyle: { border: \"none\" },\n attrs: { block: \"\", size: \"sm\" },\n on: { click: _vm.changeView }\n },\n [_c(\"b\", [_vm._v(_vm._s(_vm.yearMonthStr))])]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n staticClass: \"uiv-datepicker-pager-next\",\n staticStyle: { border: \"none\" },\n attrs: { block: \"\", size: \"sm\" },\n on: { click: _vm.goNextMonth }\n },\n [_c(\"i\", { class: _vm.iconControlRight })]\n )\n ],\n 1\n )\n ]),\n _vm._v(\" \"),\n _c(\n \"tr\",\n { attrs: { align: \"center\" } },\n [\n _vm.weekNumbers ? _c(\"td\") : _vm._e(),\n _vm._v(\" \"),\n _vm._l(_vm.weekDays, function(day) {\n return _c(\"td\", { attrs: { width: \"14.2857142857%\" } }, [\n _c(\"small\", { staticClass: \"uiv-datepicker-week\" }, [\n _vm._v(_vm._s(_vm.tWeekName(day === 0 ? 7 : day)))\n ])\n ])\n })\n ],\n 2\n )\n ]),\n _vm._v(\" \"),\n _c(\n \"tbody\",\n _vm._l(_vm.monthDayRows, function(row) {\n return _c(\n \"tr\",\n [\n _vm.weekNumbers\n ? _c(\n \"td\",\n {\n staticClass: \"text-center\",\n staticStyle: { \"border-right\": \"1px solid #eee\" }\n },\n [\n _c(\"small\", { staticClass: \"text-muted\" }, [\n _vm._v(\n _vm._s(_vm.getWeekNumber(row[_vm.weekStartsWith]))\n )\n ])\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm._l(row, function(date) {\n return _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n class: date.classes,\n staticStyle: { border: \"none\" },\n attrs: {\n block: \"\",\n size: \"sm\",\n \"data-action\": \"select\",\n type: _vm.getBtnType(date),\n disabled: date.disabled\n },\n on: {\n click: function($event) {\n return _vm.select(date)\n }\n }\n },\n [\n _c(\n \"span\",\n {\n class: { \"text-muted\": _vm.month !== date.month },\n attrs: { \"data-action\": \"select\" }\n },\n [_vm._v(_vm._s(date.date))]\n )\n ]\n )\n ],\n 1\n )\n })\n ],\n 2\n )\n }),\n 0\n )\n ]\n )\n};\nvar __vue_staticRenderFns__$c = [];\n__vue_render__$c._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$c = undefined;\n /* scoped */\n var __vue_scope_id__$c = undefined;\n /* module identifier */\n var __vue_module_identifier__$c = undefined;\n /* functional template */\n var __vue_is_functional_template__$c = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$c = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$c, staticRenderFns: __vue_staticRenderFns__$c },\n __vue_inject_styles__$c,\n __vue_script__$c,\n __vue_scope_id__$c,\n __vue_is_functional_template__$c,\n __vue_module_identifier__$c,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar script$b = {\n components: { Btn: Btn },\n mixins: [Local],\n props: {\n month: Number,\n year: Number,\n iconControlLeft: String,\n iconControlRight: String\n },\n data: function data () {\n return {\n rows: []\n }\n },\n mounted: function mounted () {\n for (var i = 0; i < 4; i++) {\n this.rows.push([]);\n for (var j = 0; j < 3; j++) {\n this.rows[i].push(i * 3 + j + 1);\n }\n }\n },\n methods: {\n tCell: function tCell (cell) {\n return this.t((\"uiv.datePicker.month\" + cell))\n },\n getBtnClass: function getBtnClass (month) {\n if (month === this.month) {\n return 'primary'\n } else {\n return 'default'\n }\n },\n goPrevYear: function goPrevYear () {\n this.$emit('year-change', this.year - 1);\n },\n goNextYear: function goNextYear () {\n this.$emit('year-change', this.year + 1);\n },\n changeView: function changeView (monthIndex) {\n if (isExist(monthIndex)) {\n this.$emit('month-change', monthIndex);\n this.$emit('view-change', 'd');\n } else {\n this.$emit('view-change', 'y');\n }\n }\n }\n};\n\n/* script */\nvar __vue_script__$b = script$b;\n\n/* template */\nvar __vue_render__$b = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"table\",\n { staticStyle: { width: \"100%\" }, attrs: { role: \"grid\" } },\n [\n _c(\"thead\", [\n _c(\"tr\", [\n _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n staticClass: \"uiv-datepicker-pager-prev\",\n staticStyle: { border: \"none\" },\n attrs: { block: \"\", size: \"sm\" },\n on: { click: _vm.goPrevYear }\n },\n [_c(\"i\", { class: _vm.iconControlLeft })]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"td\",\n { attrs: { colspan: \"4\" } },\n [\n _c(\n \"btn\",\n {\n staticClass: \"uiv-datepicker-title\",\n staticStyle: { border: \"none\" },\n attrs: { block: \"\", size: \"sm\" },\n on: {\n click: function($event) {\n return _vm.changeView()\n }\n }\n },\n [_c(\"b\", [_vm._v(_vm._s(_vm.year))])]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n staticClass: \"uiv-datepicker-pager-next\",\n staticStyle: { border: \"none\" },\n attrs: { block: \"\", size: \"sm\" },\n on: { click: _vm.goNextYear }\n },\n [_c(\"i\", { class: _vm.iconControlRight })]\n )\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\n \"tbody\",\n _vm._l(_vm.rows, function(row, i) {\n return _c(\n \"tr\",\n _vm._l(row, function(month, j) {\n return _c(\n \"td\",\n { attrs: { colspan: \"2\", width: \"33.333333%\" } },\n [\n _c(\n \"btn\",\n {\n staticStyle: { border: \"none\" },\n attrs: {\n block: \"\",\n size: \"sm\",\n type: _vm.getBtnClass(i * 3 + j)\n },\n on: {\n click: function($event) {\n return _vm.changeView(i * 3 + j)\n }\n }\n },\n [_c(\"span\", [_vm._v(_vm._s(_vm.tCell(month)))])]\n )\n ],\n 1\n )\n }),\n 0\n )\n }),\n 0\n )\n ]\n )\n};\nvar __vue_staticRenderFns__$b = [];\n__vue_render__$b._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$b = undefined;\n /* scoped */\n var __vue_scope_id__$b = undefined;\n /* module identifier */\n var __vue_module_identifier__$b = undefined;\n /* functional template */\n var __vue_is_functional_template__$b = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$b = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$b, staticRenderFns: __vue_staticRenderFns__$b },\n __vue_inject_styles__$b,\n __vue_script__$b,\n __vue_scope_id__$b,\n __vue_is_functional_template__$b,\n __vue_module_identifier__$b,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar script$a = {\n components: { Btn: Btn },\n props: {\n year: Number,\n iconControlLeft: String,\n iconControlRight: String\n },\n computed: {\n rows: function rows () {\n var rows = [];\n var yearGroupStart = this.year - this.year % 20;\n for (var i = 0; i < 4; i++) {\n rows.push([]);\n for (var j = 0; j < 5; j++) {\n rows[i].push(yearGroupStart + i * 5 + j);\n }\n }\n return rows\n },\n yearStr: function yearStr () {\n var start = this.year - this.year % 20;\n return (start + \" ~ \" + (start + 19))\n }\n },\n methods: {\n getBtnClass: function getBtnClass (year) {\n if (year === this.year) {\n return 'primary'\n } else {\n return 'default'\n }\n },\n goPrevYear: function goPrevYear () {\n this.$emit('year-change', this.year - 20);\n },\n goNextYear: function goNextYear () {\n this.$emit('year-change', this.year + 20);\n },\n changeView: function changeView (year) {\n this.$emit('year-change', year);\n this.$emit('view-change', 'm');\n }\n }\n};\n\n/* script */\nvar __vue_script__$a = script$a;\n\n/* template */\nvar __vue_render__$a = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"table\",\n { staticStyle: { width: \"100%\" }, attrs: { role: \"grid\" } },\n [\n _c(\"thead\", [\n _c(\"tr\", [\n _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n staticClass: \"uiv-datepicker-pager-prev\",\n staticStyle: { border: \"none\" },\n attrs: { block: \"\", size: \"sm\" },\n on: { click: _vm.goPrevYear }\n },\n [_c(\"i\", { class: _vm.iconControlLeft })]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"td\",\n { attrs: { colspan: \"3\" } },\n [\n _c(\n \"btn\",\n {\n staticClass: \"uiv-datepicker-title\",\n staticStyle: { border: \"none\" },\n attrs: { block: \"\", size: \"sm\" }\n },\n [_c(\"b\", [_vm._v(_vm._s(_vm.yearStr))])]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n staticClass: \"uiv-datepicker-pager-next\",\n staticStyle: { border: \"none\" },\n attrs: { block: \"\", size: \"sm\" },\n on: { click: _vm.goNextYear }\n },\n [_c(\"i\", { class: _vm.iconControlRight })]\n )\n ],\n 1\n )\n ])\n ]),\n _vm._v(\" \"),\n _c(\n \"tbody\",\n _vm._l(_vm.rows, function(row) {\n return _c(\n \"tr\",\n _vm._l(row, function(year) {\n return _c(\n \"td\",\n { attrs: { width: \"20%\" } },\n [\n _c(\n \"btn\",\n {\n staticStyle: { border: \"none\" },\n attrs: {\n block: \"\",\n size: \"sm\",\n type: _vm.getBtnClass(year)\n },\n on: {\n click: function($event) {\n return _vm.changeView(year)\n }\n }\n },\n [_c(\"span\", [_vm._v(_vm._s(year))])]\n )\n ],\n 1\n )\n }),\n 0\n )\n }),\n 0\n )\n ]\n )\n};\nvar __vue_staticRenderFns__$a = [];\n__vue_render__$a._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$a = undefined;\n /* scoped */\n var __vue_scope_id__$a = undefined;\n /* module identifier */\n var __vue_module_identifier__$a = undefined;\n /* functional template */\n var __vue_is_functional_template__$a = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$a = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$a, staticRenderFns: __vue_staticRenderFns__$a },\n __vue_inject_styles__$a,\n __vue_script__$a,\n __vue_scope_id__$a,\n __vue_is_functional_template__$a,\n __vue_module_identifier__$a,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar script$9 = {\n mixins: [Local],\n components: { DateView: __vue_component__$c, MonthView: __vue_component__$b, YearView: __vue_component__$a, Btn: Btn },\n props: {\n value: null,\n width: {\n type: Number,\n default: 270\n },\n todayBtn: {\n type: Boolean,\n default: true\n },\n clearBtn: {\n type: Boolean,\n default: true\n },\n closeOnSelected: {\n type: Boolean,\n default: true\n },\n limitFrom: null,\n limitTo: null,\n format: {\n type: String,\n default: 'yyyy-MM-dd'\n },\n initialView: {\n type: String,\n default: 'd'\n },\n dateParser: {\n type: Function,\n default: Date.parse\n },\n dateClass: Function,\n yearMonthFormatter: Function,\n weekStartsWith: {\n type: Number,\n default: 0,\n validator: function validator (value) {\n return value >= 0 && value <= 6\n }\n },\n weekNumbers: Boolean,\n iconControlLeft: {\n type: String,\n default: 'glyphicon glyphicon-chevron-left'\n },\n iconControlRight: {\n type: String,\n default: 'glyphicon glyphicon-chevron-right'\n }\n },\n data: function data () {\n return {\n show: false,\n now: new Date(),\n currentMonth: 0,\n currentYear: 0,\n view: 'd'\n }\n },\n computed: {\n valueDateObj: function valueDateObj () {\n var ts = this.dateParser(this.value);\n if (isNaN(ts)) {\n return null\n } else {\n var date = new Date(ts);\n if (date.getHours() !== 0) {\n date = new Date(ts + date.getTimezoneOffset() * 60 * 1000);\n }\n return date\n }\n },\n pickerStyle: function pickerStyle () {\n return {\n width: this.width + 'px'\n }\n },\n pickerClass: function pickerClass () {\n return {\n 'uiv-datepicker': true,\n 'uiv-datepicker-date': this.view === 'd',\n 'uiv-datepicker-month': this.view === 'm',\n 'uiv-datepicker-year': this.view === 'y'\n }\n },\n limit: function limit () {\n var limit = {};\n if (this.limitFrom) {\n var limitFrom = this.dateParser(this.limitFrom);\n if (!isNaN(limitFrom)) {\n limitFrom = convertDateToUTC(new Date(limitFrom));\n limitFrom.setHours(0, 0, 0, 0);\n limit.from = limitFrom;\n }\n }\n if (this.limitTo) {\n var limitTo = this.dateParser(this.limitTo);\n if (!isNaN(limitTo)) {\n limitTo = convertDateToUTC(new Date(limitTo));\n limitTo.setHours(0, 0, 0, 0);\n limit.to = limitTo;\n }\n }\n return limit\n }\n },\n mounted: function mounted () {\n if (this.value) {\n this.setMonthAndYearByValue(this.value);\n } else {\n this.currentMonth = this.now.getMonth();\n this.currentYear = this.now.getFullYear();\n this.view = this.initialView;\n }\n },\n watch: {\n value: function value (val, oldVal) {\n this.setMonthAndYearByValue(val, oldVal);\n }\n },\n methods: {\n setMonthAndYearByValue: function setMonthAndYearByValue (val, oldVal) {\n var ts = this.dateParser(val);\n if (!isNaN(ts)) {\n var date = new Date(ts);\n if (date.getHours() !== 0) {\n date = new Date(ts + date.getTimezoneOffset() * 60 * 1000);\n }\n if (this.limit && ((this.limit.from && date < this.limit.from) || (this.limit.to && date >= this.limit.to))) {\n this.$emit('input', oldVal || '');\n } else {\n this.currentMonth = date.getMonth();\n this.currentYear = date.getFullYear();\n }\n }\n },\n onMonthChange: function onMonthChange (month) {\n this.currentMonth = month;\n },\n onYearChange: function onYearChange (year) {\n this.currentYear = year;\n this.currentMonth = undefined;\n },\n onDateChange: function onDateChange (date) {\n if (date && isNumber(date.date) && isNumber(date.month) && isNumber(date.year)) {\n var _date = new Date(date.year, date.month, date.date);\n this.$emit('input', this.format ? stringify(_date, this.format) : _date);\n // if the input event trigger nothing (same value)\n // manually correct\n this.currentMonth = date.month;\n this.currentYear = date.year;\n } else {\n this.$emit('input', '');\n }\n },\n onViewChange: function onViewChange (view) {\n this.view = view;\n },\n selectToday: function selectToday () {\n this.view = 'd';\n this.onDateChange({\n date: this.now.getDate(),\n month: this.now.getMonth(),\n year: this.now.getFullYear()\n });\n },\n clearSelect: function clearSelect () {\n this.currentMonth = this.now.getMonth();\n this.currentYear = this.now.getFullYear();\n this.view = this.initialView;\n this.onDateChange();\n },\n onPickerClick: function onPickerClick (event) {\n if (event.target.getAttribute('data-action') !== 'select' || !this.closeOnSelected) {\n event.stopPropagation();\n }\n }\n }\n};\n\n/* script */\nvar __vue_script__$9 = script$9;\n\n/* template */\nvar __vue_render__$9 = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"div\",\n {\n class: _vm.pickerClass,\n style: _vm.pickerStyle,\n attrs: { \"data-role\": \"date-picker\" },\n on: { click: _vm.onPickerClick }\n },\n [\n _c(\"date-view\", {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.view === \"d\",\n expression: \"view==='d'\"\n }\n ],\n attrs: {\n month: _vm.currentMonth,\n year: _vm.currentYear,\n date: _vm.valueDateObj,\n today: _vm.now,\n limit: _vm.limit,\n \"week-starts-with\": _vm.weekStartsWith,\n \"icon-control-left\": _vm.iconControlLeft,\n \"icon-control-right\": _vm.iconControlRight,\n \"date-class\": _vm.dateClass,\n \"year-month-formatter\": _vm.yearMonthFormatter,\n \"week-numbers\": _vm.weekNumbers,\n locale: _vm.locale\n },\n on: {\n \"month-change\": _vm.onMonthChange,\n \"year-change\": _vm.onYearChange,\n \"date-change\": _vm.onDateChange,\n \"view-change\": _vm.onViewChange\n }\n }),\n _vm._v(\" \"),\n _c(\"month-view\", {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.view === \"m\",\n expression: \"view==='m'\"\n }\n ],\n attrs: {\n month: _vm.currentMonth,\n year: _vm.currentYear,\n \"icon-control-left\": _vm.iconControlLeft,\n \"icon-control-right\": _vm.iconControlRight,\n locale: _vm.locale\n },\n on: {\n \"month-change\": _vm.onMonthChange,\n \"year-change\": _vm.onYearChange,\n \"view-change\": _vm.onViewChange\n }\n }),\n _vm._v(\" \"),\n _c(\"year-view\", {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.view === \"y\",\n expression: \"view==='y'\"\n }\n ],\n attrs: {\n year: _vm.currentYear,\n \"icon-control-left\": _vm.iconControlLeft,\n \"icon-control-right\": _vm.iconControlRight\n },\n on: { \"year-change\": _vm.onYearChange, \"view-change\": _vm.onViewChange }\n }),\n _vm._v(\" \"),\n _vm.todayBtn || _vm.clearBtn\n ? _c(\"div\", [\n _c(\"br\"),\n _vm._v(\" \"),\n _c(\n \"div\",\n { staticClass: \"text-center\" },\n [\n _vm.todayBtn\n ? _c(\"btn\", {\n attrs: {\n \"data-action\": \"select\",\n type: \"info\",\n size: \"sm\"\n },\n domProps: {\n textContent: _vm._s(_vm.t(\"uiv.datePicker.today\"))\n },\n on: { click: _vm.selectToday }\n })\n : _vm._e(),\n _vm._v(\" \"),\n _vm.clearBtn\n ? _c(\"btn\", {\n attrs: { \"data-action\": \"select\", size: \"sm\" },\n domProps: {\n textContent: _vm._s(_vm.t(\"uiv.datePicker.clear\"))\n },\n on: { click: _vm.clearSelect }\n })\n : _vm._e()\n ],\n 1\n )\n ])\n : _vm._e()\n ],\n 1\n )\n};\nvar __vue_staticRenderFns__$9 = [];\n__vue_render__$9._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$9 = undefined;\n /* scoped */\n var __vue_scope_id__$9 = undefined;\n /* module identifier */\n var __vue_module_identifier__$9 = undefined;\n /* functional template */\n var __vue_is_functional_template__$9 = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$9 = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$9, staticRenderFns: __vue_staticRenderFns__$9 },\n __vue_inject_styles__$9,\n __vue_script__$9,\n __vue_scope_id__$9,\n __vue_is_functional_template__$9,\n __vue_module_identifier__$9,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar HANDLER = '_uiv_scroll_handler';\nvar events$1 = [EVENTS.RESIZE, EVENTS.SCROLL];\n\nvar bind$3 = function (el, binding) {\n var callback = binding.value;\n if (!isFunction(callback)) {\n return\n }\n unbind$3(el);\n el[HANDLER] = callback;\n events$1.forEach(function (event) {\n on(window, event, el[HANDLER]);\n });\n};\n\nvar unbind$3 = function (el) {\n events$1.forEach(function (event) {\n off(window, event, el[HANDLER]);\n });\n delete el[HANDLER];\n};\n\nvar update$3 = function (el, binding) {\n if (binding.value !== binding.oldValue) {\n bind$3(el, binding);\n }\n};\n\nvar scroll = { bind: bind$3, unbind: unbind$3, update: update$3 };\n\nvar script$8 = {\n directives: {\n scroll: scroll\n },\n props: {\n offset: {\n type: Number,\n default: 0\n }\n },\n data: function data () {\n return {\n affixed: false\n }\n },\n computed: {\n classes: function classes () {\n return {\n affix: this.affixed\n }\n },\n styles: function styles () {\n return {\n top: this.affixed ? this.offset + 'px' : null\n }\n }\n },\n methods: {\n // from https://github.com/ant-design/ant-design/blob/master/components/affix/index.jsx#L20\n onScroll: function onScroll () {\n var this$1 = this;\n\n // if is hidden don't calculate anything\n if (!(this.$el.offsetWidth || this.$el.offsetHeight || this.$el.getClientRects().length)) {\n return\n }\n // get window scroll and element position to detect if have to be normal or affixed\n var scroll = {};\n var element = {};\n var rect = this.$el.getBoundingClientRect();\n var body = document.body;\n var types = ['Top', 'Left'];\n types.forEach(function (type) {\n var t = type.toLowerCase();\n scroll[t] = window['page' + (type === 'Top' ? 'Y' : 'X') + 'Offset'];\n element[t] = scroll[t] + rect[t] - (this$1.$el['client' + type] || body['client' + type] || 0);\n });\n var fix = scroll.top > element.top - this.offset;\n if (this.affixed !== fix) {\n this.affixed = fix;\n this.$emit(this.affixed ? 'affix' : 'unfix');\n this.$nextTick(function () {\n this$1.$emit(this$1.affixed ? 'affixed' : 'unfixed');\n });\n }\n }\n }\n};\n\n/* script */\nvar __vue_script__$8 = script$8;\n\n/* template */\nvar __vue_render__$8 = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\"div\", { staticClass: \"hidden-print\" }, [\n _c(\n \"div\",\n {\n directives: [\n {\n name: \"scroll\",\n rawName: \"v-scroll\",\n value: _vm.onScroll,\n expression: \"onScroll\"\n }\n ],\n class: _vm.classes,\n style: _vm.styles\n },\n [_vm._t(\"default\")],\n 2\n )\n ])\n};\nvar __vue_staticRenderFns__$8 = [];\n__vue_render__$8._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$8 = undefined;\n /* scoped */\n var __vue_scope_id__$8 = undefined;\n /* module identifier */\n var __vue_module_identifier__$8 = undefined;\n /* functional template */\n var __vue_is_functional_template__$8 = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$8 = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$8, staticRenderFns: __vue_staticRenderFns__$8 },\n __vue_inject_styles__$8,\n __vue_script__$8,\n __vue_scope_id__$8,\n __vue_is_functional_template__$8,\n __vue_module_identifier__$8,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar script$7 = {\n props: {\n dismissible: {\n type: Boolean,\n default: false\n },\n duration: {\n type: Number,\n default: 0\n },\n type: {\n type: String,\n default: 'info'\n }\n },\n data: function data () {\n return {\n timeout: 0\n }\n },\n computed: {\n alertClass: function alertClass () {\n var obj;\n\n return ( obj = {\n alert: true\n }, obj[(\"alert-\" + (this.type))] = Boolean(this.type), obj['alert-dismissible'] = this.dismissible, obj )\n }\n },\n methods: {\n closeAlert: function closeAlert () {\n clearTimeout(this.timeout);\n this.$emit('dismissed');\n }\n },\n mounted: function mounted () {\n if (this.duration > 0) {\n this.timeout = setTimeout(this.closeAlert, this.duration);\n }\n },\n destroyed: function destroyed () {\n clearTimeout(this.timeout);\n }\n};\n\n/* script */\nvar __vue_script__$7 = script$7;\n\n/* template */\nvar __vue_render__$7 = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"div\",\n { class: _vm.alertClass, attrs: { role: \"alert\" } },\n [\n _vm.dismissible\n ? _c(\n \"button\",\n {\n staticClass: \"close\",\n attrs: { type: \"button\", \"aria-label\": \"Close\" },\n on: { click: _vm.closeAlert }\n },\n [_c(\"span\", { attrs: { \"aria-hidden\": \"true\" } }, [_vm._v(\"×\")])]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm._t(\"default\")\n ],\n 2\n )\n};\nvar __vue_staticRenderFns__$7 = [];\n__vue_render__$7._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$7 = undefined;\n /* scoped */\n var __vue_scope_id__$7 = undefined;\n /* module identifier */\n var __vue_module_identifier__$7 = undefined;\n /* functional template */\n var __vue_is_functional_template__$7 = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$7 = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$7, staticRenderFns: __vue_staticRenderFns__$7 },\n __vue_inject_styles__$7,\n __vue_script__$7,\n __vue_scope_id__$7,\n __vue_is_functional_template__$7,\n __vue_module_identifier__$7,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar script$6 = {\n props: {\n value: {\n type: Number,\n required: true,\n validator: function (v) { return v >= 1; }\n },\n boundaryLinks: {\n type: Boolean,\n default: false\n },\n directionLinks: {\n type: Boolean,\n default: true\n },\n size: String,\n align: String,\n totalPage: {\n type: Number,\n required: true,\n validator: function (v) { return v >= 0; }\n },\n maxSize: {\n type: Number,\n default: 5,\n validator: function (v) { return v >= 0; }\n },\n disabled: Boolean\n },\n data: function data () {\n return {\n sliceStart: 0\n }\n },\n computed: {\n navClasses: function navClasses () {\n var obj;\n\n return ( obj = {}, obj[(\"text-\" + (this.align))] = Boolean(this.align), obj )\n },\n classes: function classes () {\n var obj;\n\n return ( obj = {}, obj[(\"pagination-\" + (this.size))] = Boolean(this.size), obj )\n },\n sliceArray: function sliceArray () {\n return range(this.totalPage).slice(this.sliceStart, this.sliceStart + this.maxSize)\n }\n },\n methods: {\n calculateSliceStart: function calculateSliceStart () {\n var currentPage = this.value;\n var chunkSize = this.maxSize;\n var currentChunkStart = this.sliceStart;\n var currentChunkEnd = currentChunkStart + chunkSize;\n if (currentPage > currentChunkEnd) {\n var lastChunkStart = this.totalPage - chunkSize;\n if (currentPage > lastChunkStart) {\n this.sliceStart = lastChunkStart;\n } else {\n this.sliceStart = currentPage - 1;\n }\n } else if (currentPage < currentChunkStart + 1) {\n if (currentPage > chunkSize) {\n this.sliceStart = currentPage - chunkSize;\n } else {\n this.sliceStart = 0;\n }\n }\n },\n onPageChange: function onPageChange (page) {\n if (!this.disabled && page > 0 && page <= this.totalPage && page !== this.value) {\n this.$emit('input', page);\n this.$emit('change', page);\n }\n },\n toPage: function toPage (pre) {\n if (this.disabled) {\n return\n }\n var chunkSize = this.maxSize;\n var currentChunkStart = this.sliceStart;\n var lastChunkStart = this.totalPage - chunkSize;\n var start = pre ? currentChunkStart - chunkSize : currentChunkStart + chunkSize;\n if (start < 0) {\n this.sliceStart = 0;\n } else if (start > lastChunkStart) {\n this.sliceStart = lastChunkStart;\n } else {\n this.sliceStart = start;\n }\n }\n },\n created: function created () {\n this.$watch(function (vm) { return [vm.value, vm.maxSize, vm.totalPage].join(); }, this.calculateSliceStart, {\n immediate: true\n });\n }\n};\n\n/* script */\nvar __vue_script__$6 = script$6;\n\n/* template */\nvar __vue_render__$6 = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"nav\",\n { class: _vm.navClasses, attrs: { \"aria-label\": \"Page navigation\" } },\n [\n _c(\n \"ul\",\n { staticClass: \"pagination\", class: _vm.classes },\n [\n _vm.boundaryLinks\n ? _c(\n \"li\",\n { class: { disabled: _vm.value <= 1 || _vm.disabled } },\n [\n _c(\n \"a\",\n {\n attrs: {\n href: \"#\",\n role: \"button\",\n \"aria-label\": \"First\"\n },\n on: {\n click: function($event) {\n $event.preventDefault();\n return _vm.onPageChange(1)\n }\n }\n },\n [\n _c(\"span\", { attrs: { \"aria-hidden\": \"true\" } }, [\n _vm._v(\"«\")\n ])\n ]\n )\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.directionLinks\n ? _c(\n \"li\",\n { class: { disabled: _vm.value <= 1 || _vm.disabled } },\n [\n _c(\n \"a\",\n {\n attrs: {\n href: \"#\",\n role: \"button\",\n \"aria-label\": \"Previous\"\n },\n on: {\n click: function($event) {\n $event.preventDefault();\n return _vm.onPageChange(_vm.value - 1)\n }\n }\n },\n [\n _c(\"span\", { attrs: { \"aria-hidden\": \"true\" } }, [\n _vm._v(\"‹\")\n ])\n ]\n )\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.sliceStart > 0\n ? _c(\"li\", { class: { disabled: _vm.disabled } }, [\n _c(\n \"a\",\n {\n attrs: {\n href: \"#\",\n role: \"button\",\n \"aria-label\": \"Previous group\"\n },\n on: {\n click: function($event) {\n $event.preventDefault();\n return _vm.toPage(1)\n }\n }\n },\n [\n _c(\"span\", { attrs: { \"aria-hidden\": \"true\" } }, [\n _vm._v(\"…\")\n ])\n ]\n )\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _vm._l(_vm.sliceArray, function(item) {\n return _c(\n \"li\",\n {\n key: item,\n class: {\n active: _vm.value === item + 1,\n disabled: _vm.disabled\n }\n },\n [\n _c(\n \"a\",\n {\n attrs: { href: \"#\", role: \"button\" },\n on: {\n click: function($event) {\n $event.preventDefault();\n return _vm.onPageChange(item + 1)\n }\n }\n },\n [_vm._v(_vm._s(item + 1))]\n )\n ]\n )\n }),\n _vm._v(\" \"),\n _vm.sliceStart < _vm.totalPage - _vm.maxSize\n ? _c(\"li\", { class: { disabled: _vm.disabled } }, [\n _c(\n \"a\",\n {\n attrs: {\n href: \"#\",\n role: \"button\",\n \"aria-label\": \"Next group\"\n },\n on: {\n click: function($event) {\n $event.preventDefault();\n return _vm.toPage(0)\n }\n }\n },\n [\n _c(\"span\", { attrs: { \"aria-hidden\": \"true\" } }, [\n _vm._v(\"…\")\n ])\n ]\n )\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _vm.directionLinks\n ? _c(\n \"li\",\n {\n class: {\n disabled: _vm.value >= _vm.totalPage || _vm.disabled\n }\n },\n [\n _c(\n \"a\",\n {\n attrs: {\n href: \"#\",\n role: \"button\",\n \"aria-label\": \"Next\"\n },\n on: {\n click: function($event) {\n $event.preventDefault();\n return _vm.onPageChange(_vm.value + 1)\n }\n }\n },\n [\n _c(\"span\", { attrs: { \"aria-hidden\": \"true\" } }, [\n _vm._v(\"›\")\n ])\n ]\n )\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _vm.boundaryLinks\n ? _c(\n \"li\",\n {\n class: {\n disabled: _vm.value >= _vm.totalPage || _vm.disabled\n }\n },\n [\n _c(\n \"a\",\n {\n attrs: {\n href: \"#\",\n role: \"button\",\n \"aria-label\": \"Last\"\n },\n on: {\n click: function($event) {\n $event.preventDefault();\n return _vm.onPageChange(_vm.totalPage)\n }\n }\n },\n [\n _c(\"span\", { attrs: { \"aria-hidden\": \"true\" } }, [\n _vm._v(\"»\")\n ])\n ]\n )\n ]\n )\n : _vm._e()\n ],\n 2\n )\n ]\n )\n};\nvar __vue_staticRenderFns__$6 = [];\n__vue_render__$6._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$6 = undefined;\n /* scoped */\n var __vue_scope_id__$6 = undefined;\n /* module identifier */\n var __vue_module_identifier__$6 = undefined;\n /* functional template */\n var __vue_is_functional_template__$6 = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$6 = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$6, staticRenderFns: __vue_staticRenderFns__$6 },\n __vue_inject_styles__$6,\n __vue_script__$6,\n __vue_scope_id__$6,\n __vue_is_functional_template__$6,\n __vue_module_identifier__$6,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar SHOW_CLASS = 'in';\n\nvar popupMixin = {\n props: {\n value: {\n type: Boolean,\n default: false\n },\n tag: {\n type: String,\n default: 'span'\n },\n placement: {\n type: String,\n default: PLACEMENTS$1.TOP\n },\n autoPlacement: {\n type: Boolean,\n default: true\n },\n appendTo: {\n type: null,\n default: 'body'\n },\n positionBy: {\n type: null,\n default: null\n },\n transition: {\n type: Number,\n default: 150\n },\n hideDelay: {\n type: Number,\n default: 0\n },\n showDelay: {\n type: Number,\n default: 0\n },\n enable: {\n type: Boolean,\n default: true\n },\n enterable: {\n type: Boolean,\n default: true\n },\n target: null,\n viewport: null,\n customClass: String\n },\n data: function data () {\n return {\n triggerEl: null,\n hideTimeoutId: 0,\n showTimeoutId: 0,\n transitionTimeoutId: 0,\n autoTimeoutId: 0\n }\n },\n watch: {\n value: function value (v) {\n v ? this.show() : this.hide();\n },\n trigger: function trigger () {\n this.clearListeners();\n this.initListeners();\n },\n target: function target (value) {\n this.clearListeners();\n this.initTriggerElByTarget(value);\n this.initListeners();\n },\n allContent: function allContent (value) {\n var this$1 = this;\n\n // can not use value because it can not detect slot changes\n if (this.isNotEmpty()) {\n // reset position while content changed & is shown\n // nextTick is required\n this.$nextTick(function () {\n /* istanbul ignore else */\n if (this$1.isShown()) {\n this$1.resetPosition();\n }\n });\n } else {\n this.hide();\n }\n },\n enable: function enable (value) {\n // hide if enable changed to false\n /* istanbul ignore else */\n if (!value) {\n this.hide();\n }\n }\n },\n mounted: function mounted () {\n var this$1 = this;\n\n ensureElementMatchesFunction();\n removeFromDom(this.$refs.popup);\n this.$nextTick(function () {\n this$1.initTriggerElByTarget(this$1.target);\n this$1.initListeners();\n if (this$1.value) {\n this$1.show();\n }\n });\n },\n beforeDestroy: function beforeDestroy () {\n this.clearListeners();\n removeFromDom(this.$refs.popup);\n },\n methods: {\n initTriggerElByTarget: function initTriggerElByTarget (target) {\n if (target) {\n // target exist\n this.triggerEl = getElementBySelectorOrRef(target);\n } else {\n // find special element\n var trigger = this.$el.querySelector('[data-role=\"trigger\"]');\n if (trigger) {\n this.triggerEl = trigger;\n } else {\n // use the first child\n var firstChild = this.$el.firstChild;\n this.triggerEl = firstChild === this.$refs.popup ? null : firstChild;\n }\n }\n },\n initListeners: function initListeners () {\n if (this.triggerEl) {\n if (this.trigger === TRIGGERS.HOVER) {\n on(this.triggerEl, EVENTS.MOUSE_ENTER, this.show);\n on(this.triggerEl, EVENTS.MOUSE_LEAVE, this.hide);\n } else if (this.trigger === TRIGGERS.FOCUS) {\n on(this.triggerEl, EVENTS.FOCUS, this.show);\n on(this.triggerEl, EVENTS.BLUR, this.hide);\n } else if (this.trigger === TRIGGERS.HOVER_FOCUS) {\n on(this.triggerEl, EVENTS.MOUSE_ENTER, this.handleAuto);\n on(this.triggerEl, EVENTS.MOUSE_LEAVE, this.handleAuto);\n on(this.triggerEl, EVENTS.FOCUS, this.handleAuto);\n on(this.triggerEl, EVENTS.BLUR, this.handleAuto);\n } else if (this.trigger === TRIGGERS.CLICK || this.trigger === TRIGGERS.OUTSIDE_CLICK) {\n on(this.triggerEl, EVENTS.CLICK, this.toggle);\n }\n }\n on(window, EVENTS.CLICK, this.windowClicked);\n },\n clearListeners: function clearListeners () {\n if (this.triggerEl) {\n off(this.triggerEl, EVENTS.FOCUS, this.show);\n off(this.triggerEl, EVENTS.BLUR, this.hide);\n off(this.triggerEl, EVENTS.MOUSE_ENTER, this.show);\n off(this.triggerEl, EVENTS.MOUSE_LEAVE, this.hide);\n off(this.triggerEl, EVENTS.CLICK, this.toggle);\n off(this.triggerEl, EVENTS.MOUSE_ENTER, this.handleAuto);\n off(this.triggerEl, EVENTS.MOUSE_LEAVE, this.handleAuto);\n off(this.triggerEl, EVENTS.FOCUS, this.handleAuto);\n off(this.triggerEl, EVENTS.BLUR, this.handleAuto);\n }\n off(window, EVENTS.CLICK, this.windowClicked);\n this.clearTimeouts();\n },\n clearTimeouts: function clearTimeouts () {\n if (this.hideTimeoutId) {\n clearTimeout(this.hideTimeoutId);\n this.hideTimeoutId = 0;\n }\n if (this.showTimeoutId) {\n clearTimeout(this.showTimeoutId);\n this.showTimeoutId = 0;\n }\n if (this.transitionTimeoutId) {\n clearTimeout(this.transitionTimeoutId);\n this.transitionTimeoutId = 0;\n }\n if (this.autoTimeoutId) {\n clearTimeout(this.autoTimeoutId);\n this.autoTimeoutId = 0;\n }\n },\n resetPosition: function resetPosition () {\n var popup = this.$refs.popup;\n /* istanbul ignore else */\n if (popup) {\n setTooltipPosition(popup, this.triggerEl, this.placement, this.autoPlacement, this.appendTo, this.positionBy, this.viewport);\n popup.offsetHeight;\n }\n },\n hideOnLeave: function hideOnLeave () {\n if (this.trigger === TRIGGERS.HOVER || (this.trigger === TRIGGERS.HOVER_FOCUS && !this.triggerEl.matches(':focus'))) {\n this.$hide();\n }\n },\n toggle: function toggle () {\n if (this.isShown()) {\n this.hide();\n } else {\n this.show();\n }\n },\n show: function show () {\n var this$1 = this;\n\n if (this.enable && this.triggerEl && this.isNotEmpty() && !this.isShown()) {\n var popUpAppendedContainer = this.hideTimeoutId > 0; // weird condition\n if (popUpAppendedContainer) {\n clearTimeout(this.hideTimeoutId);\n this.hideTimeoutId = 0;\n }\n if (this.transitionTimeoutId > 0) {\n clearTimeout(this.transitionTimeoutId);\n this.transitionTimeoutId = 0;\n }\n clearTimeout(this.showTimeoutId);\n this.showTimeoutId = setTimeout(function () {\n this$1.showTimeoutId = 0;\n var popup = this$1.$refs.popup;\n if (popup) {\n var alreadyOpenModalNum = getOpenModalNum();\n if (alreadyOpenModalNum > 1) {\n var defaultZ = this$1.name === 'popover' ? 1060 : 1070;\n var offset = (alreadyOpenModalNum - 1) * 20;\n popup.style.zIndex = \"\" + (defaultZ + offset);\n }\n // add to dom\n if (!popUpAppendedContainer) {\n popup.className = (this$1.name) + \" \" + (this$1.placement) + \" \" + (this$1.customClass ? this$1.customClass : '') + \" fade\";\n var container = getElementBySelectorOrRef(this$1.appendTo);\n container.appendChild(popup);\n this$1.resetPosition();\n }\n addClass(popup, SHOW_CLASS);\n this$1.$emit('input', true);\n this$1.$emit('show');\n }\n }, this.showDelay);\n }\n },\n hide: function hide () {\n var this$1 = this;\n\n if (this.showTimeoutId > 0) {\n clearTimeout(this.showTimeoutId);\n this.showTimeoutId = 0;\n }\n\n if (!this.isShown()) {\n return\n }\n if (this.enterable && (this.trigger === TRIGGERS.HOVER || this.trigger === TRIGGERS.HOVER_FOCUS)) {\n clearTimeout(this.hideTimeoutId);\n this.hideTimeoutId = setTimeout(function () {\n this$1.hideTimeoutId = 0;\n var popup = this$1.$refs.popup;\n if (popup && !popup.matches(':hover')) {\n this$1.$hide();\n }\n }, 100);\n } else {\n this.$hide();\n }\n },\n $hide: function $hide () {\n var this$1 = this;\n\n if (this.isShown()) {\n clearTimeout(this.hideTimeoutId);\n this.hideTimeoutId = setTimeout(function () {\n this$1.hideTimeoutId = 0;\n removeClass(this$1.$refs.popup, SHOW_CLASS);\n // gives fade out time\n this$1.transitionTimeoutId = setTimeout(function () {\n this$1.transitionTimeoutId = 0;\n removeFromDom(this$1.$refs.popup);\n this$1.$emit('input', false);\n this$1.$emit('hide');\n }, this$1.transition);\n }, this.hideDelay);\n }\n },\n isShown: function isShown () {\n return hasClass(this.$refs.popup, SHOW_CLASS)\n },\n windowClicked: function windowClicked (event) {\n if (this.triggerEl && isFunction(this.triggerEl.contains) && !this.triggerEl.contains(event.target) &&\n this.trigger === TRIGGERS.OUTSIDE_CLICK && !(this.$refs.popup && this.$refs.popup.contains(event.target)) &&\n this.isShown()) {\n this.hide();\n }\n },\n handleAuto: function handleAuto () {\n var this$1 = this;\n\n clearTimeout(this.autoTimeoutId);\n this.autoTimeoutId = setTimeout(function () {\n this$1.autoTimeoutId = 0;\n if (this$1.triggerEl.matches(':hover, :focus')) {\n this$1.show();\n } else {\n this$1.hide();\n }\n }, 20); // 20ms make firefox happy\n }\n }\n};\n\nvar Tooltip = {\n mixins: [popupMixin],\n data: function data () {\n return {\n name: 'tooltip'\n }\n },\n render: function render (h) {\n return h(\n this.tag,\n [\n this.$slots.default,\n h('div',\n {\n ref: 'popup',\n attrs: {\n role: 'tooltip'\n },\n on: {\n mouseleave: this.hideOnLeave\n }\n },\n [\n h('div', { class: 'tooltip-arrow' }),\n h('div', {\n class: 'tooltip-inner',\n domProps: { innerHTML: this.text }\n })\n ]\n )\n ]\n )\n },\n props: {\n text: {\n type: String,\n default: ''\n },\n trigger: {\n type: String,\n default: TRIGGERS.HOVER_FOCUS\n }\n },\n computed: {\n allContent: function allContent () {\n return this.text\n }\n },\n methods: {\n isNotEmpty: function isNotEmpty () {\n return this.text\n }\n }\n};\n\nvar Popover = {\n mixins: [popupMixin],\n data: function data () {\n return {\n name: 'popover'\n }\n },\n render: function render (h) {\n return h(this.tag,\n [\n this.$slots.default,\n h('div',\n {\n style: {\n display: 'block'\n },\n ref: 'popup',\n on: {\n mouseleave: this.hideOnLeave\n }\n },\n [\n h('div', { class: 'arrow' }),\n h('h3', {\n class: 'popover-title',\n directives: [\n { name: 'show', value: this.title }\n ]\n }, this.title),\n h('div', { class: 'popover-content' }, [this.content || this.$slots.popover])\n ]\n )\n ]\n )\n },\n props: {\n title: {\n type: String,\n default: ''\n },\n content: {\n type: String,\n default: ''\n },\n trigger: {\n type: String,\n default: TRIGGERS.OUTSIDE_CLICK\n }\n },\n computed: {\n allContent: function allContent () {\n return this.title + this.content\n }\n },\n methods: {\n isNotEmpty: function isNotEmpty () {\n return this.title || this.content || this.$slots.popover\n }\n }\n};\n\nvar maxHours = 23;\nvar zero = 0;\nvar maxMinutes = 59;\nvar cutUpAmAndPm = 12;\n\nvar script$5 = {\n components: { Btn: Btn },\n mixins: [Local],\n props: {\n value: {\n type: Date,\n required: true\n },\n showMeridian: {\n type: Boolean,\n default: true\n },\n min: Date,\n max: Date,\n hourStep: {\n type: Number,\n default: 1\n },\n minStep: {\n type: Number,\n default: 1\n },\n readonly: {\n type: Boolean,\n default: false\n },\n controls: {\n type: Boolean,\n default: true\n },\n iconControlUp: {\n type: String,\n default: 'glyphicon glyphicon-chevron-up'\n },\n iconControlDown: {\n type: String,\n default: 'glyphicon glyphicon-chevron-down'\n },\n inputWidth: {\n type: Number,\n default: 50\n }\n },\n data: function data () {\n return {\n hours: 0,\n minutes: 0,\n meridian: true,\n hoursText: '',\n minutesText: ''\n }\n },\n mounted: function mounted () {\n this.updateByValue(this.value);\n },\n computed: {\n inputStyles: function inputStyles () {\n return {\n width: ((this.inputWidth) + \"px\")\n }\n }\n },\n watch: {\n value: function value (value$1) {\n this.updateByValue(value$1);\n },\n showMeridian: function showMeridian (value) {\n this.setTime();\n },\n hoursText: function hoursText (value) {\n if (this.hours === 0 && value === '') {\n // Prevent a runtime reset from being overwritten\n return\n }\n var hour = parseInt(value);\n if (this.showMeridian) {\n if (hour >= 1 && hour <= cutUpAmAndPm) {\n if (this.meridian) {\n this.hours = hour === cutUpAmAndPm ? 0 : hour;\n } else {\n this.hours = hour === cutUpAmAndPm ? cutUpAmAndPm : hour + cutUpAmAndPm;\n }\n }\n } else if (hour >= zero && hour <= maxHours) {\n this.hours = hour;\n }\n this.setTime();\n },\n minutesText: function minutesText (value) {\n if (this.minutes === 0 && value === '') {\n // Prevent a runtime reset from being overwritten\n return\n }\n var minutesStr = parseInt(value);\n if (minutesStr >= zero && minutesStr <= maxMinutes) {\n this.minutes = minutesStr;\n }\n this.setTime();\n }\n },\n methods: {\n updateByValue: function updateByValue (value) {\n if (isNaN(value.getTime())) {\n this.hours = 0;\n this.minutes = 0;\n this.hoursText = '';\n this.minutesText = '';\n this.meridian = true;\n return\n }\n this.hours = value.getHours();\n this.minutes = value.getMinutes();\n if (!this.showMeridian) {\n this.hoursText = pad(this.hours, 2);\n } else {\n if (this.hours >= cutUpAmAndPm) {\n if (this.hours === cutUpAmAndPm) {\n this.hoursText = this.hours + '';\n } else {\n this.hoursText = pad(this.hours - cutUpAmAndPm, 2);\n }\n this.meridian = false;\n } else {\n if (this.hours === zero) {\n this.hoursText = cutUpAmAndPm.toString();\n } else {\n this.hoursText = pad(this.hours, 2);\n }\n this.meridian = true;\n }\n }\n this.minutesText = pad(this.minutes, 2);\n // lazy model won't update when using keyboard up/down\n this.$refs.hoursInput.value = this.hoursText;\n this.$refs.minutesInput.value = this.minutesText;\n },\n addHour: function addHour (step) {\n step = step || this.hourStep;\n this.hours = this.hours >= maxHours ? zero : this.hours + step;\n },\n reduceHour: function reduceHour (step) {\n step = step || this.hourStep;\n this.hours = this.hours <= zero ? maxHours : this.hours - step;\n },\n addMinute: function addMinute () {\n if (this.minutes >= maxMinutes) {\n this.minutes = zero;\n this.addHour(1);\n } else {\n this.minutes += this.minStep;\n }\n },\n reduceMinute: function reduceMinute () {\n if (this.minutes <= zero) {\n this.minutes = maxMinutes + 1 - this.minStep;\n this.reduceHour(1);\n } else {\n this.minutes -= this.minStep;\n }\n },\n changeTime: function changeTime (isHour, isPlus) {\n if (!this.readonly) {\n if (isHour && isPlus) {\n this.addHour();\n } else if (isHour && !isPlus) {\n this.reduceHour();\n } else if (!isHour && isPlus) {\n this.addMinute();\n } else {\n this.reduceMinute();\n }\n this.setTime();\n }\n },\n toggleMeridian: function toggleMeridian () {\n this.meridian = !this.meridian;\n if (this.meridian) {\n this.hours -= cutUpAmAndPm;\n } else {\n this.hours += cutUpAmAndPm;\n }\n this.setTime();\n },\n onWheel: function onWheel (e, isHour) {\n if (!this.readonly) {\n e.preventDefault();\n this.changeTime(isHour, e.deltaY < 0);\n }\n },\n setTime: function setTime () {\n var time = this.value;\n if (isNaN(time.getTime())) {\n time = new Date();\n time.setHours(0);\n time.setMinutes(0);\n }\n time.setHours(this.hours);\n time.setMinutes(this.minutes);\n if (this.max) {\n var max = new Date(time);\n max.setHours(this.max.getHours());\n max.setMinutes(this.max.getMinutes());\n time = time > max ? max : time;\n }\n if (this.min) {\n var min = new Date(time);\n min.setHours(this.min.getHours());\n min.setMinutes(this.min.getMinutes());\n time = time < min ? min : time;\n }\n this.$emit('input', new Date(time));\n },\n selectInputValue: function selectInputValue (e) {\n // mouseup should be prevented!\n // See various comments in https://stackoverflow.com/questions/3272089/programmatically-selecting-text-in-an-input-field-on-ios-devices-mobile-safari\n e.target.setSelectionRange(0, 2);\n }\n }\n};\n\n/* script */\nvar __vue_script__$5 = script$5;\n\n/* template */\nvar __vue_render__$5 = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"section\",\n {\n on: {\n click: function($event) {\n $event.stopPropagation();\n }\n }\n },\n [\n _c(\"table\", [\n _c(\"tbody\", [\n _vm.controls\n ? _c(\"tr\", { staticClass: \"text-center\" }, [\n _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n attrs: {\n type: \"link\",\n size: \"sm\",\n disabled: _vm.readonly\n },\n on: {\n click: function($event) {\n return _vm.changeTime(1, 1)\n }\n }\n },\n [_c(\"i\", { class: _vm.iconControlUp })]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"td\", [_vm._v(\" \")]),\n _vm._v(\" \"),\n _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n attrs: {\n type: \"link\",\n size: \"sm\",\n disabled: _vm.readonly\n },\n on: {\n click: function($event) {\n return _vm.changeTime(0, 1)\n }\n }\n },\n [_c(\"i\", { class: _vm.iconControlUp })]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _vm.showMeridian ? _c(\"td\") : _vm._e()\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _c(\"tr\", [\n _c(\"td\", { staticClass: \"form-group\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model.lazy\",\n value: _vm.hoursText,\n expression: \"hoursText\",\n modifiers: { lazy: true }\n }\n ],\n ref: \"hoursInput\",\n staticClass: \"form-control text-center\",\n style: _vm.inputStyles,\n attrs: {\n type: \"tel\",\n pattern: \"\\\\d*\",\n placeholder: \"HH\",\n readonly: _vm.readonly,\n maxlength: \"2\",\n size: \"2\"\n },\n domProps: { value: _vm.hoursText },\n on: {\n mouseup: _vm.selectInputValue,\n keydown: [\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"up\", 38, $event.key, [\n \"Up\",\n \"ArrowUp\"\n ])\n ) {\n return null\n }\n $event.preventDefault();\n return _vm.changeTime(1, 1)\n },\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"down\", 40, $event.key, [\n \"Down\",\n \"ArrowDown\"\n ])\n ) {\n return null\n }\n $event.preventDefault();\n return _vm.changeTime(1, 0)\n }\n ],\n wheel: function($event) {\n return _vm.onWheel($event, true)\n },\n change: function($event) {\n _vm.hoursText = $event.target.value;\n }\n }\n })\n ]),\n _vm._v(\" \"),\n _vm._m(0),\n _vm._v(\" \"),\n _c(\"td\", { staticClass: \"form-group\" }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model.lazy\",\n value: _vm.minutesText,\n expression: \"minutesText\",\n modifiers: { lazy: true }\n }\n ],\n ref: \"minutesInput\",\n staticClass: \"form-control text-center\",\n style: _vm.inputStyles,\n attrs: {\n type: \"tel\",\n pattern: \"\\\\d*\",\n placeholder: \"MM\",\n readonly: _vm.readonly,\n maxlength: \"2\",\n size: \"2\"\n },\n domProps: { value: _vm.minutesText },\n on: {\n mouseup: _vm.selectInputValue,\n keydown: [\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"up\", 38, $event.key, [\n \"Up\",\n \"ArrowUp\"\n ])\n ) {\n return null\n }\n $event.preventDefault();\n return _vm.changeTime(0, 1)\n },\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"down\", 40, $event.key, [\n \"Down\",\n \"ArrowDown\"\n ])\n ) {\n return null\n }\n $event.preventDefault();\n return _vm.changeTime(0, 0)\n }\n ],\n wheel: function($event) {\n return _vm.onWheel($event, false)\n },\n change: function($event) {\n _vm.minutesText = $event.target.value;\n }\n }\n })\n ]),\n _vm._v(\" \"),\n _vm.showMeridian\n ? _c(\n \"td\",\n [\n _vm._v(\"\\n \\n \"),\n _c(\"btn\", {\n attrs: {\n \"data-action\": \"toggleMeridian\",\n disabled: _vm.readonly\n },\n domProps: {\n textContent: _vm._s(\n _vm.meridian\n ? _vm.t(\"uiv.timePicker.am\")\n : _vm.t(\"uiv.timePicker.pm\")\n )\n },\n on: { click: _vm.toggleMeridian }\n })\n ],\n 1\n )\n : _vm._e()\n ]),\n _vm._v(\" \"),\n _vm.controls\n ? _c(\"tr\", { staticClass: \"text-center\" }, [\n _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n attrs: {\n type: \"link\",\n size: \"sm\",\n disabled: _vm.readonly\n },\n on: {\n click: function($event) {\n return _vm.changeTime(1, 0)\n }\n }\n },\n [_c(\"i\", { class: _vm.iconControlDown })]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _c(\"td\", [_vm._v(\" \")]),\n _vm._v(\" \"),\n _c(\n \"td\",\n [\n _c(\n \"btn\",\n {\n attrs: {\n type: \"link\",\n size: \"sm\",\n disabled: _vm.readonly\n },\n on: {\n click: function($event) {\n return _vm.changeTime(0, 0)\n }\n }\n },\n [_c(\"i\", { class: _vm.iconControlDown })]\n )\n ],\n 1\n ),\n _vm._v(\" \"),\n _vm.showMeridian ? _c(\"td\") : _vm._e()\n ])\n : _vm._e()\n ])\n ])\n ]\n )\n};\nvar __vue_staticRenderFns__$5 = [\n function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\"td\", [_vm._v(\" \"), _c(\"b\", [_vm._v(\":\")]), _vm._v(\" \")])\n }\n];\n__vue_render__$5._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$5 = undefined;\n /* scoped */\n var __vue_scope_id__$5 = undefined;\n /* module identifier */\n var __vue_module_identifier__$5 = undefined;\n /* functional template */\n var __vue_is_functional_template__$5 = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$5 = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$5, staticRenderFns: __vue_staticRenderFns__$5 },\n __vue_inject_styles__$5,\n __vue_script__$5,\n __vue_scope_id__$5,\n __vue_is_functional_template__$5,\n __vue_module_identifier__$5,\n false,\n undefined,\n undefined,\n undefined\n );\n\nfunction request (url, method) {\n if ( method === void 0 ) method = 'GET';\n\n var request = new window.XMLHttpRequest();\n var data = {};\n var p = {\n then: function (fn1, fn2) { return p.done(fn1).fail(fn2); },\n catch: function (fn) { return p.fail(fn); },\n always: function (fn) { return p.done(fn).fail(fn); }\n };\n var statuses = ['done', 'fail'];\n statuses.forEach(function (name) {\n data[name] = [];\n p[name] = function (fn) {\n if (fn instanceof Function) { data[name].push(fn); }\n return p\n };\n });\n p.done(JSON.parse);\n request.onreadystatechange = function () {\n if (request.readyState === 4) {\n var e = { status: request.status };\n if (request.status === 200) {\n var response = request.responseText;\n for (var i in data.done) {\n /* istanbul ignore else */\n if (hasOwnProperty(data.done, i) && isFunction(data.done[i])) {\n var value = data.done[i](response);\n if (isExist(value)) {\n response = value;\n }\n }\n }\n } else {\n data.fail.forEach(function (fail) { return fail(e); });\n }\n }\n };\n request.open(method, url);\n request.setRequestHeader('Accept', 'application/json');\n request.send();\n return p\n}\n\nvar script$4 = {\n components: { Dropdown: Dropdown },\n props: {\n value: {\n required: true\n },\n data: Array,\n itemKey: String,\n appendToBody: {\n type: Boolean,\n default: false\n },\n ignoreCase: {\n type: Boolean,\n default: true\n },\n matchStart: {\n type: Boolean,\n default: false\n },\n forceSelect: {\n type: Boolean,\n default: false\n },\n forceClear: {\n type: Boolean,\n default: false\n },\n limit: {\n type: Number,\n default: 10\n },\n asyncSrc: String,\n asyncKey: String,\n asyncFunction: Function,\n debounce: {\n type: Number,\n default: 200\n },\n openOnFocus: {\n type: Boolean,\n default: true\n },\n openOnEmpty: {\n type: Boolean,\n default: false\n },\n target: {\n required: true\n },\n preselect: {\n type: Boolean,\n default: true\n }\n },\n data: function data () {\n return {\n inputEl: null,\n items: [],\n activeIndex: 0,\n timeoutID: 0,\n elements: [],\n open: false,\n dropdownMenuEl: null\n }\n },\n computed: {\n regexOptions: function regexOptions () {\n var options = '';\n if (this.ignoreCase) {\n options += 'i';\n }\n if (!this.matchStart) {\n options += 'g';\n }\n return options\n }\n },\n mounted: function mounted () {\n var this$1 = this;\n\n ensureElementMatchesFunction();\n this.$nextTick(function () {\n this$1.initInputElByTarget(this$1.target);\n this$1.initListeners();\n this$1.dropdownMenuEl = this$1.$refs.dropdown.$el.querySelector('.dropdown-menu');\n // set input text if v-model not empty\n if (this$1.value) {\n this$1.setInputTextByValue(this$1.value);\n }\n });\n },\n beforeDestroy: function beforeDestroy () {\n this.removeListeners();\n },\n watch: {\n target: function target (el) {\n this.removeListeners();\n this.initInputElByTarget(el);\n this.initListeners();\n },\n value: function value (value$1) {\n this.setInputTextByValue(value$1);\n }\n },\n methods: {\n setInputTextByValue: function setInputTextByValue (value) {\n if (isString(value)) {\n // direct\n this.inputEl.value = value;\n } else if (value) {\n // is object\n this.inputEl.value = this.itemKey ? value[this.itemKey] : value;\n } else if (value === null) {\n // is null or undefined or something else not valid\n this.inputEl.value = '';\n }\n },\n hasEmptySlot: function hasEmptySlot () {\n return !!this.$slots.empty || !!this.$scopedSlots.empty\n },\n initInputElByTarget: function initInputElByTarget (target) {\n if (!target) {\n return\n }\n this.inputEl = getElementBySelectorOrRef(target);\n },\n initListeners: function initListeners () {\n if (this.inputEl) {\n this.elements = [this.inputEl];\n on(this.inputEl, EVENTS.FOCUS, this.inputFocused);\n on(this.inputEl, EVENTS.BLUR, this.inputBlured);\n on(this.inputEl, EVENTS.INPUT, this.inputChanged);\n on(this.inputEl, EVENTS.KEY_DOWN, this.inputKeyPressed);\n }\n },\n removeListeners: function removeListeners () {\n this.elements = [];\n if (this.inputEl) {\n off(this.inputEl, EVENTS.FOCUS, this.inputFocused);\n off(this.inputEl, EVENTS.BLUR, this.inputBlured);\n off(this.inputEl, EVENTS.INPUT, this.inputChanged);\n off(this.inputEl, EVENTS.KEY_DOWN, this.inputKeyPressed);\n }\n },\n prepareItems: function prepareItems (data, disableFilters) {\n if ( disableFilters === void 0 ) disableFilters = false;\n\n if (disableFilters) {\n this.items = data.slice(0, this.limit);\n return\n }\n this.items = [];\n this.activeIndex = this.preselect ? 0 : -1;\n for (var i = 0, l = data.length; i < l; i++) {\n var item = data[i];\n var key = this.itemKey ? item[this.itemKey] : item;\n key = key.toString();\n var index = -1;\n if (this.ignoreCase) {\n index = key.toLowerCase().indexOf(this.inputEl.value.toLowerCase());\n } else {\n index = key.indexOf(this.inputEl.value);\n }\n if (this.matchStart ? index === 0 : index >= 0) {\n this.items.push(item);\n }\n if (this.items.length >= this.limit) {\n break\n }\n }\n },\n fetchItems: function fetchItems (value, debounce) {\n var this$1 = this;\n\n clearTimeout(this.timeoutID);\n if (value === '' && !this.openOnEmpty) {\n this.open = false;\n } else if (this.data) {\n this.prepareItems(this.data);\n this.open = this.hasEmptySlot() || Boolean(this.items.length);\n } else if (this.asyncSrc) {\n this.timeoutID = setTimeout(function () {\n this$1.$emit('loading');\n request(this$1.asyncSrc + encodeURIComponent(value))\n .then(function (data) {\n if (this$1.inputEl.matches(':focus')) {\n this$1.prepareItems(this$1.asyncKey ? data[this$1.asyncKey] : data, true);\n this$1.open = this$1.hasEmptySlot() || Boolean(this$1.items.length);\n }\n this$1.$emit('loaded');\n })\n .catch(function (err) {\n console.error(err);\n this$1.$emit('loaded-error');\n });\n }, debounce);\n } else if (this.asyncFunction) {\n var cb = function (data) {\n if (this$1.inputEl.matches(':focus')) {\n this$1.prepareItems(data, true);\n this$1.open = this$1.hasEmptySlot() || Boolean(this$1.items.length);\n }\n this$1.$emit('loaded');\n };\n this.timeoutID = setTimeout(function () {\n this$1.$emit('loading');\n this$1.asyncFunction(value, cb);\n }, debounce);\n }\n },\n inputChanged: function inputChanged () {\n var value = this.inputEl.value;\n this.fetchItems(value, this.debounce);\n this.$emit('input', this.forceSelect ? undefined : value);\n },\n inputFocused: function inputFocused () {\n if (this.openOnFocus) {\n var value = this.inputEl.value;\n this.fetchItems(value, 0);\n }\n },\n inputBlured: function inputBlured () {\n var this$1 = this;\n\n if (!this.dropdownMenuEl.matches(':hover')) {\n this.open = false;\n }\n if (this.inputEl && this.forceClear) {\n this.$nextTick(function () {\n if (typeof this$1.value === 'undefined') {\n this$1.inputEl.value = '';\n }\n });\n }\n },\n inputKeyPressed: function inputKeyPressed (event) {\n event.stopPropagation();\n if (this.open) {\n switch (event.keyCode) {\n case 13:\n if (this.activeIndex >= 0) {\n this.selectItem(this.items[this.activeIndex]);\n } else {\n this.open = false;\n }\n event.preventDefault();\n break\n case 27:\n this.open = false;\n break\n case 38:\n this.activeIndex = this.activeIndex > 0 ? this.activeIndex - 1 : 0;\n break\n case 40: {\n var maxIndex = this.items.length - 1;\n this.activeIndex = this.activeIndex < maxIndex ? this.activeIndex + 1 : maxIndex;\n break\n }\n }\n }\n },\n selectItem: function selectItem (item) {\n this.$emit('input', item);\n this.open = false;\n },\n highlight: function highlight (item) {\n var value = this.itemKey ? item[this.itemKey] : item;\n var inputValue = this.inputEl.value.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&');\n return value.replace(new RegExp((\"\" + inputValue), this.regexOptions), '$& ')\n }\n }\n};\n\n/* script */\nvar __vue_script__$4 = script$4;\n\n/* template */\nvar __vue_render__$4 = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"dropdown\",\n {\n ref: \"dropdown\",\n attrs: {\n tag: \"section\",\n \"append-to-body\": _vm.appendToBody,\n \"not-close-elements\": _vm.elements,\n \"position-element\": _vm.inputEl\n },\n model: {\n value: _vm.open,\n callback: function($$v) {\n _vm.open = $$v;\n },\n expression: \"open\"\n }\n },\n [\n _c(\n \"template\",\n { slot: \"dropdown\" },\n [\n _vm._t(\n \"item\",\n _vm._l(_vm.items, function(item, index) {\n return _c(\n \"li\",\n { class: { active: _vm.activeIndex === index } },\n [\n _c(\n \"a\",\n {\n attrs: { href: \"#\" },\n on: {\n click: function($event) {\n $event.preventDefault();\n return _vm.selectItem(item)\n }\n }\n },\n [\n _c(\"span\", {\n domProps: { innerHTML: _vm._s(_vm.highlight(item)) }\n })\n ]\n )\n ]\n )\n }),\n {\n items: _vm.items,\n activeIndex: _vm.activeIndex,\n select: _vm.selectItem,\n highlight: _vm.highlight\n }\n ),\n _vm._v(\" \"),\n !_vm.items || _vm.items.length === 0 ? _vm._t(\"empty\") : _vm._e()\n ],\n 2\n )\n ],\n 2\n )\n};\nvar __vue_staticRenderFns__$4 = [];\n__vue_render__$4._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$4 = undefined;\n /* scoped */\n var __vue_scope_id__$4 = undefined;\n /* module identifier */\n var __vue_module_identifier__$4 = undefined;\n /* functional template */\n var __vue_is_functional_template__$4 = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$4 = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$4, staticRenderFns: __vue_staticRenderFns__$4 },\n __vue_inject_styles__$4,\n __vue_script__$4,\n __vue_scope_id__$4,\n __vue_is_functional_template__$4,\n __vue_module_identifier__$4,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar ProgressBarStack = {\n functional: true,\n render: function render (h, ref) {\n var obj;\n\n var props = ref.props;\n var data = ref.data;\n return h(\n 'div',\n a(data, {\n class: ( obj = {\n 'progress-bar': true,\n 'progress-bar-striped': props.striped,\n active: props.striped && props.active\n }, obj[(\"progress-bar-\" + (props.type))] = Boolean(props.type), obj ),\n style: {\n minWidth: props.minWidth ? '2em' : null,\n width: ((props.value) + \"%\")\n },\n attrs: {\n role: 'progressbar',\n 'aria-valuemin': 0,\n 'aria-valuenow': props.value,\n 'aria-valuemax': 100\n }\n }),\n props.label ? (props.labelText ? props.labelText : ((props.value) + \"%\")) : null\n )\n },\n props: {\n value: {\n type: Number,\n required: true,\n validator: function validator (value) {\n return value >= 0 && value <= 100\n }\n },\n labelText: String,\n type: String,\n label: {\n type: Boolean,\n default: false\n },\n minWidth: {\n type: Boolean,\n default: false\n },\n striped: {\n type: Boolean,\n default: false\n },\n active: {\n type: Boolean,\n default: false\n }\n }\n};\n\nvar ProgressBar = {\n functional: true,\n render: function render (h, ref) {\n var props = ref.props;\n var data = ref.data;\n var children = ref.children;\n\n return h(\n 'div',\n a(data, { class: 'progress' }),\n children && children.length ? children : [h(ProgressBarStack, { props: props })]\n )\n }\n};\n\nvar BreadcrumbItem = {\n functional: true,\n mixins: [linkMixin],\n render: function render (h, ref) {\n var props = ref.props;\n var data = ref.data;\n var children = ref.children;\n\n var slot;\n if (props.active) {\n slot = children;\n } else if (props.to) {\n slot = [\n h('router-link', {\n props: {\n to: props.to,\n replace: props.replace,\n append: props.append,\n exact: props.exact\n }\n }, children)\n ];\n } else {\n slot = [\n h('a', {\n attrs: {\n href: props.href,\n target: props.target\n }\n }, children)\n ];\n }\n return h('li', a(data, { class: { active: props.active } }), slot)\n },\n props: {\n active: {\n type: Boolean,\n default: false\n }\n }\n};\n\nvar Breadcrumbs = {\n functional: true,\n render: function render (h, ref) {\n var props = ref.props;\n var data = ref.data;\n var children = ref.children;\n\n var slot = [];\n if (children && children.length) {\n slot = children;\n } else if (props.items) {\n slot = props.items.map(function (item, index) {\n return h(\n BreadcrumbItem,\n {\n key: hasOwnProperty(item, 'key') ? item.key : index,\n props: {\n active: hasOwnProperty(item, 'active') ? item.active : index === props.items.length - 1,\n href: item.href,\n target: item.target,\n to: item.to,\n replace: item.replace,\n append: item.append,\n exact: item.exact\n }\n },\n item.text\n )\n });\n }\n return h('ol', a(data, { class: 'breadcrumb' }), slot)\n },\n props: {\n items: Array\n }\n};\n\nvar BtnToolbar = {\n functional: true,\n render: function render (h, ref) {\n var children = ref.children;\n var data = ref.data;\n\n return h(\n 'div',\n a(data, {\n class: {\n 'btn-toolbar': true\n },\n attrs: {\n role: 'toolbar'\n }\n }),\n children\n )\n }\n};\n\nvar script$3 = {\n mixins: [Local],\n components: { Dropdown: Dropdown },\n props: {\n value: {\n type: Array,\n required: true\n },\n options: {\n type: Array,\n required: true\n },\n labelKey: {\n type: String,\n default: 'label'\n },\n valueKey: {\n type: String,\n default: 'value'\n },\n limit: {\n type: Number,\n default: 0\n },\n size: String,\n placeholder: String,\n split: {\n type: String,\n default: ', '\n },\n disabled: {\n type: Boolean,\n default: false\n },\n appendToBody: {\n type: Boolean,\n default: false\n },\n block: {\n type: Boolean,\n default: false\n },\n collapseSelected: {\n type: Boolean,\n default: false\n },\n filterable: {\n type: Boolean,\n default: false\n },\n filterAutoFocus: {\n type: Boolean,\n default: true\n },\n filterFunction: Function,\n filterPlaceholder: String,\n selectedIcon: {\n type: String,\n default: 'glyphicon glyphicon-ok'\n },\n itemSelectedClass: String\n },\n data: function data () {\n return {\n showDropdown: false,\n els: [],\n filterInput: '',\n currentActive: -1\n }\n },\n computed: {\n containerStyles: function containerStyles () {\n return {\n width: this.block ? '100%' : ''\n }\n },\n filteredOptions: function filteredOptions () {\n var this$1 = this;\n\n if (this.filterable && this.filterInput) {\n if (this.filterFunction) {\n return this.filterFunction(this.filterInput)\n } else {\n var filterInput = this.filterInput.toLowerCase();\n return this.options.filter(function (v) { return (\n v[this$1.valueKey].toString().toLowerCase().indexOf(filterInput) >= 0 ||\n v[this$1.labelKey].toString().toLowerCase().indexOf(filterInput) >= 0\n ); })\n }\n } else {\n return this.options\n }\n },\n groupedOptions: function groupedOptions () {\n var this$1 = this;\n\n return this.filteredOptions\n .map(function (v) { return v.group; })\n .filter(onlyUnique)\n .map(function (v) { return ({\n options: this$1.filteredOptions.filter(function (option) { return option.group === v; }),\n $group: v\n }); })\n },\n flattenGroupedOptions: function flattenGroupedOptions () {\n var ref;\n\n return (ref = []).concat.apply(ref, this.groupedOptions.map(function (v) { return v.options; }))\n },\n selectClasses: function selectClasses () {\n var obj;\n\n return ( obj = {}, obj[(\"input-\" + (this.size))] = this.size, obj )\n },\n selectedIconClasses: function selectedIconClasses () {\n var obj;\n\n return ( obj = {}, obj[this.selectedIcon] = true, obj['pull-right'] = true, obj )\n },\n selectTextClasses: function selectTextClasses () {\n return {\n 'text-muted': this.value.length === 0\n }\n },\n labelValue: function labelValue () {\n var this$1 = this;\n\n var optionsByValue = this.options.map(function (v) { return v[this$1.valueKey]; });\n return this.value.map(function (v) {\n var index = optionsByValue.indexOf(v);\n return index >= 0 ? this$1.options[index][this$1.labelKey] : v\n })\n },\n selectedText: function selectedText () {\n if (this.value.length) {\n var labelValue = this.labelValue;\n if (this.collapseSelected) {\n var str = labelValue[0];\n str += labelValue.length > 1 ? ((this.split) + \"+\" + (labelValue.length - 1)) : '';\n return str\n } else {\n return labelValue.join(this.split)\n }\n } else {\n return this.placeholder || this.t('uiv.multiSelect.placeholder')\n }\n },\n customOptionsVisible: function customOptionsVisible () {\n return !!this.$slots.option || !!this.$scopedSlots.option\n }\n },\n watch: {\n showDropdown: function showDropdown (v) {\n var this$1 = this;\n\n // clear filter input when dropdown toggles\n this.filterInput = '';\n this.currentActive = -1;\n this.$emit('visible-change', v);\n if (v && this.filterable && this.filterAutoFocus) {\n this.$nextTick(function () {\n this$1.$refs.filterInput.focus();\n });\n }\n }\n },\n mounted: function mounted () {\n this.els = [this.$el];\n },\n methods: {\n goPrevOption: function goPrevOption () {\n if (!this.showDropdown) {\n return\n }\n this.currentActive > 0 ? this.currentActive-- : this.currentActive = this.flattenGroupedOptions.length - 1;\n },\n goNextOption: function goNextOption () {\n if (!this.showDropdown) {\n return\n }\n this.currentActive < this.flattenGroupedOptions.length - 1 ? this.currentActive++ : this.currentActive = 0;\n },\n selectOption: function selectOption () {\n var index = this.currentActive;\n var options = this.flattenGroupedOptions;\n if (!this.showDropdown) {\n this.showDropdown = true;\n } else if (index >= 0 && index < options.length) {\n this.toggle(options[index]);\n }\n },\n itemClasses: function itemClasses (item) {\n var result = {\n disabled: item.disabled,\n active: this.currentActive === this.flattenGroupedOptions.indexOf(item)\n };\n if (this.itemSelectedClass) {\n result[this.itemSelectedClass] = this.isItemSelected(item);\n }\n return result\n },\n isItemSelected: function isItemSelected (item) {\n return this.value.indexOf(item[this.valueKey]) >= 0\n },\n toggle: function toggle (item) {\n if (item.disabled) {\n return\n }\n var value = item[this.valueKey];\n var index = this.value.indexOf(value);\n if (this.limit === 1) {\n var newValue = index >= 0 ? [] : [value];\n this.$emit('input', newValue);\n this.$emit('change', newValue);\n } else {\n if (index >= 0) {\n var newVal = this.value.slice();\n newVal.splice(index, 1);\n this.$emit('input', newVal);\n this.$emit('change', newVal);\n } else if (this.limit === 0 || this.value.length < this.limit) {\n var newVal$1 = this.value.slice();\n newVal$1.push(value);\n this.$emit('input', newVal$1);\n this.$emit('change', newVal$1);\n } else {\n this.$emit('limit-exceed');\n }\n }\n },\n searchClicked: function searchClicked () {\n this.$emit('search', this.filterInput);\n }\n }\n};\n\n/* script */\nvar __vue_script__$3 = script$3;\n\n/* template */\nvar __vue_render__$3 = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"dropdown\",\n {\n ref: \"dropdown\",\n style: _vm.containerStyles,\n attrs: {\n \"not-close-elements\": _vm.els,\n \"append-to-body\": _vm.appendToBody,\n disabled: _vm.disabled\n },\n nativeOn: {\n keydown: function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"esc\", 27, $event.key, [\"Esc\", \"Escape\"])\n ) {\n return null\n }\n _vm.showDropdown = false;\n }\n },\n model: {\n value: _vm.showDropdown,\n callback: function($$v) {\n _vm.showDropdown = $$v;\n },\n expression: \"showDropdown\"\n }\n },\n [\n _c(\n \"div\",\n {\n staticClass: \"form-control dropdown-toggle clearfix\",\n class: _vm.selectClasses,\n attrs: {\n disabled: _vm.disabled,\n tabindex: \"0\",\n \"data-role\": \"trigger\"\n },\n on: {\n focus: function($event) {\n return _vm.$emit(\"focus\", $event)\n },\n blur: function($event) {\n return _vm.$emit(\"blur\", $event)\n },\n keydown: [\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"down\", 40, $event.key, [\n \"Down\",\n \"ArrowDown\"\n ])\n ) {\n return null\n }\n $event.preventDefault();\n $event.stopPropagation();\n return _vm.goNextOption($event)\n },\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"up\", 38, $event.key, [\n \"Up\",\n \"ArrowUp\"\n ])\n ) {\n return null\n }\n $event.preventDefault();\n $event.stopPropagation();\n return _vm.goPrevOption($event)\n },\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"enter\", 13, $event.key, \"Enter\")\n ) {\n return null\n }\n $event.preventDefault();\n $event.stopPropagation();\n return _vm.selectOption($event)\n }\n ]\n }\n },\n [\n _c(\n \"div\",\n {\n staticClass: \"pull-right\",\n staticStyle: {\n display: \"inline-block\",\n \"vertical-align\": \"middle\"\n }\n },\n [\n _c(\"span\", [_vm._v(\" \")]),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"caret\" })\n ]\n ),\n _vm._v(\" \"),\n _c(\"div\", {\n class: _vm.selectTextClasses,\n staticStyle: {\n \"overflow-x\": \"hidden\",\n \"text-overflow\": \"ellipsis\",\n \"white-space\": \"nowrap\"\n },\n domProps: { textContent: _vm._s(_vm.selectedText) }\n })\n ]\n ),\n _vm._v(\" \"),\n _c(\n \"template\",\n { slot: \"dropdown\" },\n [\n _vm.filterable\n ? _c(\"li\", { staticStyle: { padding: \"4px 8px\" } }, [\n _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.filterInput,\n expression: \"filterInput\"\n }\n ],\n ref: \"filterInput\",\n staticClass: \"form-control input-sm\",\n attrs: {\n \"aria-label\": \"Filter...\",\n type: \"text\",\n placeholder:\n _vm.filterPlaceholder ||\n _vm.t(\"uiv.multiSelect.filterPlaceholder\")\n },\n domProps: { value: _vm.filterInput },\n on: {\n keyup: function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"enter\", 13, $event.key, \"Enter\")\n ) {\n return null\n }\n return _vm.searchClicked($event)\n },\n keydown: [\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"down\", 40, $event.key, [\n \"Down\",\n \"ArrowDown\"\n ])\n ) {\n return null\n }\n $event.preventDefault();\n $event.stopPropagation();\n return _vm.goNextOption($event)\n },\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"up\", 38, $event.key, [\n \"Up\",\n \"ArrowUp\"\n ])\n ) {\n return null\n }\n $event.preventDefault();\n $event.stopPropagation();\n return _vm.goPrevOption($event)\n },\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k(\n $event.keyCode,\n \"enter\",\n 13,\n $event.key,\n \"Enter\"\n )\n ) {\n return null\n }\n $event.preventDefault();\n $event.stopPropagation();\n return _vm.selectOption($event)\n }\n ],\n input: function($event) {\n if ($event.target.composing) {\n return\n }\n _vm.filterInput = $event.target.value;\n }\n }\n })\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _vm._l(_vm.groupedOptions, function(item) {\n return [\n item.$group\n ? _c(\"li\", {\n staticClass: \"dropdown-header\",\n domProps: { textContent: _vm._s(item.$group) }\n })\n : _vm._e(),\n _vm._v(\" \"),\n _vm._l(item.options, function(_item) {\n return [\n _c(\n \"li\",\n {\n class: _vm.itemClasses(_item),\n staticStyle: { outline: \"0\" },\n on: {\n keydown: [\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"down\", 40, $event.key, [\n \"Down\",\n \"ArrowDown\"\n ])\n ) {\n return null\n }\n $event.preventDefault();\n $event.stopPropagation();\n return _vm.goNextOption($event)\n },\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k($event.keyCode, \"up\", 38, $event.key, [\n \"Up\",\n \"ArrowUp\"\n ])\n ) {\n return null\n }\n $event.preventDefault();\n $event.stopPropagation();\n return _vm.goPrevOption($event)\n },\n function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k(\n $event.keyCode,\n \"enter\",\n 13,\n $event.key,\n \"Enter\"\n )\n ) {\n return null\n }\n $event.preventDefault();\n $event.stopPropagation();\n return _vm.selectOption($event)\n }\n ],\n click: function($event) {\n $event.stopPropagation();\n return _vm.toggle(_item)\n },\n mouseenter: function($event) {\n _vm.currentActive = -1;\n }\n }\n },\n [\n _vm.customOptionsVisible\n ? _c(\n \"a\",\n {\n staticStyle: { outline: \"0\" },\n attrs: { role: \"button\" }\n },\n [\n _vm._t(\"option\", null, { item: _item }),\n _vm._v(\" \"),\n _vm.selectedIcon && _vm.isItemSelected(_item)\n ? _c(\"span\", { class: _vm.selectedIconClasses })\n : _vm._e()\n ],\n 2\n )\n : _vm.isItemSelected(_item)\n ? _c(\n \"a\",\n {\n staticStyle: { outline: \"0\" },\n attrs: { role: \"button\" }\n },\n [\n _c(\"b\", [_vm._v(_vm._s(_item[_vm.labelKey]))]),\n _vm._v(\" \"),\n _vm.selectedIcon\n ? _c(\"span\", { class: _vm.selectedIconClasses })\n : _vm._e()\n ]\n )\n : _c(\n \"a\",\n {\n staticStyle: { outline: \"0\" },\n attrs: { role: \"button\" }\n },\n [_c(\"span\", [_vm._v(_vm._s(_item[_vm.labelKey]))])]\n )\n ]\n )\n ]\n })\n ]\n })\n ],\n 2\n )\n ],\n 2\n )\n};\nvar __vue_staticRenderFns__$3 = [];\n__vue_render__$3._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$3 = undefined;\n /* scoped */\n var __vue_scope_id__$3 = undefined;\n /* module identifier */\n var __vue_module_identifier__$3 = undefined;\n /* functional template */\n var __vue_is_functional_template__$3 = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$3 = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$3, staticRenderFns: __vue_staticRenderFns__$3 },\n __vue_inject_styles__$3,\n __vue_script__$3,\n __vue_scope_id__$3,\n __vue_is_functional_template__$3,\n __vue_module_identifier__$3,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar script$2 = {\n components: { Collapse: Collapse },\n props: {\n value: Boolean,\n fluid: {\n type: Boolean,\n default: true\n },\n fixedTop: Boolean,\n fixedBottom: Boolean,\n staticTop: Boolean,\n inverse: Boolean\n },\n data: function data () {\n return {\n show: false\n }\n },\n computed: {\n navClasses: function navClasses () {\n return {\n navbar: true,\n 'navbar-default': !this.inverse,\n 'navbar-inverse': this.inverse,\n 'navbar-static-top': this.staticTop,\n 'navbar-fixed-bottom': this.fixedBottom,\n 'navbar-fixed-top': this.fixedTop\n }\n }\n },\n mounted: function mounted () {\n this.show = !!this.value;\n },\n watch: {\n value: function value (v) {\n this.show = v;\n }\n },\n methods: {\n toggle: function toggle () {\n this.show = !this.show;\n this.$emit('input', this.show);\n }\n }\n};\n\n/* script */\nvar __vue_script__$2 = script$2;\n\n/* template */\nvar __vue_render__$2 = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\"nav\", { class: _vm.navClasses }, [\n _c(\n \"div\",\n { class: _vm.fluid ? \"container-fluid\" : \"container\" },\n [\n _c(\n \"div\",\n { staticClass: \"navbar-header\" },\n [\n _vm._t(\"collapse-btn\", [\n _c(\n \"button\",\n {\n staticClass: \"navbar-toggle collapsed\",\n attrs: { type: \"button\" },\n on: { click: _vm.toggle }\n },\n [\n _c(\"span\", { staticClass: \"sr-only\" }, [\n _vm._v(\"Toggle navigation\")\n ]),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"icon-bar\" }),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"icon-bar\" }),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"icon-bar\" })\n ]\n )\n ]),\n _vm._v(\" \"),\n _vm._t(\"brand\")\n ],\n 2\n ),\n _vm._v(\" \"),\n _vm._t(\"default\"),\n _vm._v(\" \"),\n _c(\n \"collapse\",\n {\n staticClass: \"navbar-collapse\",\n model: {\n value: _vm.show,\n callback: function($$v) {\n _vm.show = $$v;\n },\n expression: \"show\"\n }\n },\n [_vm._t(\"collapse\")],\n 2\n )\n ],\n 2\n )\n ])\n};\nvar __vue_staticRenderFns__$2 = [];\n__vue_render__$2._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$2 = undefined;\n /* scoped */\n var __vue_scope_id__$2 = undefined;\n /* module identifier */\n var __vue_module_identifier__$2 = undefined;\n /* functional template */\n var __vue_is_functional_template__$2 = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$2 = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$2, staticRenderFns: __vue_staticRenderFns__$2 },\n __vue_inject_styles__$2,\n __vue_script__$2,\n __vue_scope_id__$2,\n __vue_is_functional_template__$2,\n __vue_module_identifier__$2,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar NavbarNav = {\n functional: true,\n render: function render (h, ref) {\n var children = ref.children;\n var data = ref.data;\n var props = ref.props;\n\n return h(\n 'ul',\n a(data, {\n class: {\n nav: true,\n 'navbar-nav': true,\n 'navbar-left': props.left,\n 'navbar-right': props.right\n }\n }),\n children\n )\n },\n props: {\n left: Boolean,\n right: Boolean\n }\n};\n\nvar NavbarForm = {\n functional: true,\n render: function render (h, ref) {\n var children = ref.children;\n var data = ref.data;\n var props = ref.props;\n\n return h(\n 'form',\n a(data, {\n class: {\n 'navbar-form': true,\n 'navbar-left': props.left,\n 'navbar-right': props.right\n }\n }),\n children\n )\n },\n props: {\n left: Boolean,\n right: Boolean\n }\n};\n\nvar NavbarText = {\n functional: true,\n render: function render (h, ref) {\n var children = ref.children;\n var data = ref.data;\n var props = ref.props;\n\n return h(\n 'p',\n a(data, {\n class: {\n 'navbar-text': true,\n 'navbar-left': props.left,\n 'navbar-right': props.right\n }\n }),\n children\n )\n },\n props: {\n left: Boolean,\n right: Boolean\n }\n};\n\nvar components = /*#__PURE__*/Object.freeze({\n __proto__: null,\n Carousel: __vue_component__$h,\n Slide: __vue_component__$g,\n Collapse: Collapse,\n Dropdown: Dropdown,\n Modal: __vue_component__$f,\n Tab: __vue_component__$e,\n Tabs: __vue_component__$d,\n DatePicker: __vue_component__$9,\n Affix: __vue_component__$8,\n Alert: __vue_component__$7,\n Pagination: __vue_component__$6,\n Tooltip: Tooltip,\n Popover: Popover,\n TimePicker: __vue_component__$5,\n Typeahead: __vue_component__$4,\n ProgressBar: ProgressBar,\n ProgressBarStack: ProgressBarStack,\n Breadcrumbs: Breadcrumbs,\n BreadcrumbItem: BreadcrumbItem,\n Btn: Btn,\n BtnGroup: BtnGroup,\n BtnToolbar: BtnToolbar,\n MultiSelect: __vue_component__$3,\n Navbar: __vue_component__$2,\n NavbarNav: NavbarNav,\n NavbarForm: NavbarForm,\n NavbarText: NavbarText\n});\n\nvar INSTANCE$2 = '_uiv_tooltip_instance';\n\nvar bind$2 = function (el, binding) {\n // console.log('bind')\n unbind$2(el);\n var Constructor = Vue.extend(Tooltip);\n var vm = new Constructor({\n propsData: {\n target: el,\n appendTo: binding.arg && '#' + binding.arg,\n text: typeof binding.value === 'string' ? (binding.value && binding.value.toString()) : (binding.value && binding.value.text && binding.value.text.toString()),\n positionBy: binding.value && binding.value.positionBy && binding.value.positionBy.toString(),\n viewport: binding.value && binding.value.viewport && binding.value.viewport.toString(),\n customClass: binding.value && binding.value.customClass && binding.value.customClass.toString(),\n showDelay: binding.value && binding.value.showDelay,\n hideDelay: binding.value && binding.value.hideDelay\n }\n });\n var options = [];\n for (var key in binding.modifiers) {\n if (hasOwnProperty(binding.modifiers, key) && binding.modifiers[key]) {\n options.push(key);\n }\n }\n options.forEach(function (option) {\n if (/(top)|(left)|(right)|(bottom)/.test(option)) {\n vm.placement = option;\n } else if (/(hover)|(focus)|(click)/.test(option)) {\n vm.trigger = option;\n } else if (/unenterable/.test(option)) {\n vm.enterable = false;\n }\n });\n vm.$mount();\n el[INSTANCE$2] = vm;\n};\n\nvar unbind$2 = function (el) {\n // console.log('unbind')\n var vm = el[INSTANCE$2];\n if (vm) {\n vm.$destroy();\n }\n delete el[INSTANCE$2];\n};\n\nvar update$2 = function (el, binding) {\n // console.log('update')\n if (binding.value !== binding.oldValue) {\n bind$2(el, binding);\n }\n};\n\nvar tooltip = { bind: bind$2, unbind: unbind$2, update: update$2 };\n\nvar INSTANCE$1 = '_uiv_popover_instance';\n\nvar bind$1 = function (el, binding) {\n // console.log('bind')\n unbind$1(el);\n var Constructor = Vue.extend(Popover);\n var vm = new Constructor({\n propsData: {\n target: el,\n appendTo: binding.arg && '#' + binding.arg,\n title: binding.value && binding.value.title && binding.value.title.toString(),\n positionBy: binding.value && binding.value.positionBy && binding.value.positionBy.toString(),\n content: binding.value && binding.value.content && binding.value.content.toString(),\n viewport: binding.value && binding.value.viewport && binding.value.viewport.toString(),\n customClass: binding.value && binding.value.customClass && binding.value.customClass.toString()\n }\n });\n var options = [];\n for (var key in binding.modifiers) {\n if (hasOwnProperty(binding.modifiers, key) && binding.modifiers[key]) {\n options.push(key);\n }\n }\n options.forEach(function (option) {\n if (/(top)|(left)|(right)|(bottom)/.test(option)) {\n vm.placement = option;\n } else if (/(hover)|(focus)|(click)/.test(option)) {\n vm.trigger = option;\n } else if (/unenterable/.test(option)) {\n vm.enterable = false;\n }\n });\n vm.$mount();\n el[INSTANCE$1] = vm;\n};\n\nvar unbind$1 = function (el) {\n // console.log('unbind')\n var vm = el[INSTANCE$1];\n if (vm) {\n vm.$destroy();\n }\n delete el[INSTANCE$1];\n};\n\nvar update$1 = function (el, binding) {\n // console.log('update')\n if (binding.value !== binding.oldValue) {\n bind$1(el, binding);\n }\n};\n\nvar popover = { bind: bind$1, unbind: unbind$1, update: update$1 };\n\nfunction ScrollSpy (element, target, options) {\n if ( target === void 0 ) target = 'body';\n if ( options === void 0 ) options = {};\n\n this.el = element;\n this.opts = assign({}, ScrollSpy.DEFAULTS, options);\n this.opts.target = target;\n if (target === 'body') {\n this.scrollElement = window;\n } else {\n this.scrollElement = document.querySelector((\"[id=\" + target + \"]\"));\n }\n this.selector = 'li > a';\n this.offsets = [];\n this.targets = [];\n this.activeTarget = null;\n this.scrollHeight = 0;\n if (this.scrollElement) {\n this.refresh();\n this.process();\n }\n}\n\nScrollSpy.DEFAULTS = {\n offset: 10,\n callback: function (ele) { return 0; }\n};\n\nScrollSpy.prototype.getScrollHeight = function () {\n return this.scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight)\n};\n\nScrollSpy.prototype.refresh = function () {\n var this$1 = this;\n\n this.offsets = [];\n this.targets = [];\n this.scrollHeight = this.getScrollHeight();\n var list = nodeListToArray(this.el.querySelectorAll(this.selector));\n var isWindow = this.scrollElement === window;\n list\n .map(function (ele) {\n var href = ele.getAttribute('href');\n if (/^#./.test(href)) {\n var rootEl = isWindow ? document : this$1.scrollElement;\n var hrefEl = rootEl.querySelector((\"[id='\" + (href.slice(1)) + \"']\"));\n var offset = isWindow ? hrefEl.getBoundingClientRect().top : hrefEl.offsetTop;\n return [offset, href]\n } else {\n return null\n }\n })\n .filter(function (item) { return item; })\n .sort(function (a, b) { return a[0] - b[0]; })\n .forEach(function (item) {\n this$1.offsets.push(item[0]);\n this$1.targets.push(item[1]);\n });\n // console.log(this.offsets, this.targets)\n};\n\nScrollSpy.prototype.process = function () {\n var isWindow = this.scrollElement === window;\n var scrollTop = (isWindow ? window.pageYOffset : this.scrollElement.scrollTop) + this.opts.offset;\n var scrollHeight = this.getScrollHeight();\n var scrollElementHeight = isWindow ? getViewportSize().height : this.scrollElement.getBoundingClientRect().height;\n var maxScroll = this.opts.offset + scrollHeight - scrollElementHeight;\n var offsets = this.offsets;\n var targets = this.targets;\n var activeTarget = this.activeTarget;\n var i;\n if (this.scrollHeight !== scrollHeight) {\n this.refresh();\n }\n if (scrollTop >= maxScroll) {\n return activeTarget !== (i = targets[targets.length - 1]) && this.activate(i)\n }\n if (activeTarget && scrollTop < offsets[0]) {\n this.activeTarget = null;\n return this.clear()\n }\n for (i = offsets.length; i--;) {\n activeTarget !== targets[i] &&\n scrollTop >= offsets[i] &&\n (offsets[i + 1] === undefined || scrollTop < offsets[i + 1]) &&\n this.activate(targets[i]);\n }\n};\n\nScrollSpy.prototype.activate = function (target) {\n this.activeTarget = target;\n this.clear();\n var selector = this.selector +\n '[data-target=\"' + target + '\"],' +\n this.selector + '[href=\"' + target + '\"]';\n var activeCallback = this.opts.callback;\n var active = nodeListToArray(this.el.querySelectorAll(selector));\n active.forEach(function (ele) {\n getParents(ele, 'li')\n .forEach(function (item) {\n addClass(item, 'active');\n activeCallback(item);\n });\n if (getParents(ele, '.dropdown-menu').length) {\n addClass(getClosest(ele, 'li.dropdown'), 'active');\n }\n });\n};\n\nScrollSpy.prototype.clear = function () {\n var this$1 = this;\n\n var list = nodeListToArray(this.el.querySelectorAll(this.selector));\n list.forEach(function (ele) {\n getParents(ele, '.active', this$1.opts.target).forEach(function (item) {\n removeClass(item, 'active');\n });\n });\n};\n\nvar INSTANCE = '_uiv_scrollspy_instance';\nvar events = [EVENTS.RESIZE, EVENTS.SCROLL];\n\nvar bind = function (el, binding) {\n // console.log('bind')\n unbind(el);\n};\n\nvar inserted = function (el, binding) {\n // console.log('inserted')\n var scrollSpy = new ScrollSpy(el, binding.arg, binding.value);\n if (scrollSpy.scrollElement) {\n scrollSpy.handler = function () {\n scrollSpy.process();\n };\n events.forEach(function (event) {\n on(scrollSpy.scrollElement, event, scrollSpy.handler);\n });\n }\n el[INSTANCE] = scrollSpy;\n};\n\nvar unbind = function (el) {\n // console.log('unbind')\n var instance = el[INSTANCE];\n if (instance && instance.scrollElement) {\n events.forEach(function (event) {\n off(instance.scrollElement, event, instance.handler);\n });\n delete el[INSTANCE];\n }\n};\n\nvar update = function (el, binding) {\n // console.log('update')\n var isArgUpdated = binding.arg !== binding.oldArg;\n var isValueUpdated = binding.value !== binding.oldValue;\n if (isArgUpdated || isValueUpdated) {\n bind(el);\n inserted(el, binding);\n }\n};\n\nvar scrollspy = { bind: bind, unbind: unbind, update: update, inserted: inserted };\n\nvar directives = /*#__PURE__*/Object.freeze({\n __proto__: null,\n tooltip: tooltip,\n popover: popover,\n scrollspy: scrollspy\n});\n\nvar TYPES$1 = {\n ALERT: 0,\n CONFIRM: 1,\n PROMPT: 2\n};\n\nvar script$1 = {\n mixins: [Local],\n components: { Modal: __vue_component__$f, Btn: Btn },\n props: {\n backdrop: null,\n title: String,\n content: String,\n html: {\n type: Boolean,\n default: false\n },\n okText: String,\n okType: {\n type: String,\n default: 'primary'\n },\n cancelText: String,\n cancelType: {\n type: String,\n default: 'default'\n },\n type: {\n type: Number,\n default: TYPES$1.ALERT\n },\n size: {\n type: String,\n default: 'sm'\n },\n cb: {\n type: Function,\n required: true\n },\n validator: {\n type: Function,\n default: function () { return null; }\n },\n customClass: null,\n defaultValue: String,\n inputType: {\n type: String,\n default: 'text'\n },\n autoFocus: {\n type: String,\n default: 'ok'\n },\n reverseButtons: {\n type: Boolean,\n default: false\n }\n },\n data: function data () {\n return {\n TYPES: TYPES$1,\n show: false,\n input: '',\n dirty: false\n }\n },\n mounted: function mounted () {\n if (this.defaultValue) {\n this.input = this.defaultValue;\n }\n },\n computed: {\n closeOnBackdropClick: function closeOnBackdropClick () {\n // use backdrop prop if exist\n // otherwise, only not available if render as alert\n return isExist(this.backdrop) ? Boolean(this.backdrop) : (this.type !== TYPES$1.ALERT)\n },\n inputError: function inputError () {\n return this.validator(this.input)\n },\n inputNotValid: function inputNotValid () {\n return this.dirty && this.inputError\n },\n okBtnText: function okBtnText () {\n return this.okText || this.t('uiv.modal.ok')\n },\n cancelBtnText: function cancelBtnText () {\n return this.cancelText || this.t('uiv.modal.cancel')\n }\n },\n methods: {\n toggle: function toggle (show, msg) {\n this.$refs.modal.toggle(show, msg);\n },\n validate: function validate () {\n this.dirty = true;\n if (!isExist(this.inputError)) {\n this.toggle(false, { value: this.input });\n }\n }\n }\n};\n\n/* script */\nvar __vue_script__$1 = script$1;\n\n/* template */\nvar __vue_render__$1 = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"modal\",\n {\n ref: \"modal\",\n class: _vm.customClass,\n attrs: {\n \"auto-focus\": \"\",\n size: _vm.size,\n title: _vm.title,\n header: !!_vm.title,\n backdrop: _vm.closeOnBackdropClick,\n \"cancel-text\": _vm.cancelText,\n \"ok-text\": _vm.okText\n },\n on: { hide: _vm.cb },\n model: {\n value: _vm.show,\n callback: function($$v) {\n _vm.show = $$v;\n },\n expression: \"show\"\n }\n },\n [\n _vm.html\n ? _c(\"div\", { domProps: { innerHTML: _vm._s(_vm.content) } })\n : _c(\"p\", [_vm._v(_vm._s(_vm.content))]),\n _vm._v(\" \"),\n _vm.type === _vm.TYPES.PROMPT\n ? _c(\"div\", [\n _c(\n \"div\",\n {\n staticClass: \"form-group\",\n class: { \"has-error\": _vm.inputNotValid }\n },\n [\n _vm.inputType === \"checkbox\"\n ? _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.input,\n expression: \"input\"\n }\n ],\n ref: \"input\",\n staticClass: \"form-control\",\n attrs: {\n required: \"\",\n \"data-action\": \"auto-focus\",\n type: \"checkbox\"\n },\n domProps: {\n checked: Array.isArray(_vm.input)\n ? _vm._i(_vm.input, null) > -1\n : _vm.input\n },\n on: {\n change: [\n function($event) {\n var $$a = _vm.input,\n $$el = $event.target,\n $$c = $$el.checked ? true : false;\n if (Array.isArray($$a)) {\n var $$v = null,\n $$i = _vm._i($$a, $$v);\n if ($$el.checked) {\n $$i < 0 && (_vm.input = $$a.concat([$$v]));\n } else {\n $$i > -1 &&\n (_vm.input = $$a\n .slice(0, $$i)\n .concat($$a.slice($$i + 1)));\n }\n } else {\n _vm.input = $$c;\n }\n },\n function($event) {\n _vm.dirty = true;\n }\n ],\n keyup: function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k(\n $event.keyCode,\n \"enter\",\n 13,\n $event.key,\n \"Enter\"\n )\n ) {\n return null\n }\n return _vm.validate($event)\n }\n }\n })\n : _vm.inputType === \"radio\"\n ? _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.input,\n expression: \"input\"\n }\n ],\n ref: \"input\",\n staticClass: \"form-control\",\n attrs: {\n required: \"\",\n \"data-action\": \"auto-focus\",\n type: \"radio\"\n },\n domProps: { checked: _vm._q(_vm.input, null) },\n on: {\n change: [\n function($event) {\n _vm.input = null;\n },\n function($event) {\n _vm.dirty = true;\n }\n ],\n keyup: function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k(\n $event.keyCode,\n \"enter\",\n 13,\n $event.key,\n \"Enter\"\n )\n ) {\n return null\n }\n return _vm.validate($event)\n }\n }\n })\n : _c(\"input\", {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.input,\n expression: \"input\"\n }\n ],\n ref: \"input\",\n staticClass: \"form-control\",\n attrs: {\n required: \"\",\n \"data-action\": \"auto-focus\",\n type: _vm.inputType\n },\n domProps: { value: _vm.input },\n on: {\n change: function($event) {\n _vm.dirty = true;\n },\n keyup: function($event) {\n if (\n !$event.type.indexOf(\"key\") &&\n _vm._k(\n $event.keyCode,\n \"enter\",\n 13,\n $event.key,\n \"Enter\"\n )\n ) {\n return null\n }\n return _vm.validate($event)\n },\n input: function($event) {\n if ($event.target.composing) {\n return\n }\n _vm.input = $event.target.value;\n }\n }\n }),\n _vm._v(\" \"),\n _c(\n \"span\",\n {\n directives: [\n {\n name: \"show\",\n rawName: \"v-show\",\n value: _vm.inputNotValid,\n expression: \"inputNotValid\"\n }\n ],\n staticClass: \"help-block\"\n },\n [_vm._v(_vm._s(_vm.inputError))]\n )\n ]\n )\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _vm.type === _vm.TYPES.ALERT\n ? _c(\n \"template\",\n { slot: \"footer\" },\n [\n _c(\"btn\", {\n attrs: {\n type: _vm.okType,\n \"data-action\": _vm.autoFocus === \"ok\" ? \"auto-focus\" : \"\"\n },\n domProps: { textContent: _vm._s(_vm.okBtnText) },\n on: {\n click: function($event) {\n return _vm.toggle(false, \"ok\")\n }\n }\n })\n ],\n 1\n )\n : _c(\n \"template\",\n { slot: \"footer\" },\n [\n _vm.reverseButtons\n ? [\n _vm.type === _vm.TYPES.CONFIRM\n ? _c(\"btn\", {\n attrs: {\n type: _vm.okType,\n \"data-action\":\n _vm.autoFocus === \"ok\" ? \"auto-focus\" : \"\"\n },\n domProps: { textContent: _vm._s(_vm.okBtnText) },\n on: {\n click: function($event) {\n return _vm.toggle(false, \"ok\")\n }\n }\n })\n : _c(\"btn\", {\n attrs: { type: _vm.okType },\n domProps: { textContent: _vm._s(_vm.okBtnText) },\n on: { click: _vm.validate }\n }),\n _vm._v(\" \"),\n _c(\"btn\", {\n attrs: {\n type: _vm.cancelType,\n \"data-action\":\n _vm.autoFocus === \"cancel\" ? \"auto-focus\" : \"\"\n },\n domProps: { textContent: _vm._s(_vm.cancelBtnText) },\n on: {\n click: function($event) {\n return _vm.toggle(false, \"cancel\")\n }\n }\n })\n ]\n : [\n _c(\"btn\", {\n attrs: {\n type: _vm.cancelType,\n \"data-action\":\n _vm.autoFocus === \"cancel\" ? \"auto-focus\" : \"\"\n },\n domProps: { textContent: _vm._s(_vm.cancelBtnText) },\n on: {\n click: function($event) {\n return _vm.toggle(false, \"cancel\")\n }\n }\n }),\n _vm._v(\" \"),\n _vm.type === _vm.TYPES.CONFIRM\n ? _c(\"btn\", {\n attrs: {\n type: _vm.okType,\n \"data-action\":\n _vm.autoFocus === \"ok\" ? \"auto-focus\" : \"\"\n },\n domProps: { textContent: _vm._s(_vm.okBtnText) },\n on: {\n click: function($event) {\n return _vm.toggle(false, \"ok\")\n }\n }\n })\n : _c(\"btn\", {\n attrs: { type: _vm.okType },\n domProps: { textContent: _vm._s(_vm.okBtnText) },\n on: { click: _vm.validate }\n })\n ]\n ],\n 2\n )\n ],\n 2\n )\n};\nvar __vue_staticRenderFns__$1 = [];\n__vue_render__$1._withStripped = true;\n\n /* style */\n var __vue_inject_styles__$1 = undefined;\n /* scoped */\n var __vue_scope_id__$1 = undefined;\n /* module identifier */\n var __vue_module_identifier__$1 = undefined;\n /* functional template */\n var __vue_is_functional_template__$1 = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__$1 = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__$1, staticRenderFns: __vue_staticRenderFns__$1 },\n __vue_inject_styles__$1,\n __vue_script__$1,\n __vue_scope_id__$1,\n __vue_is_functional_template__$1,\n __vue_module_identifier__$1,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar queue = [];\n\nvar destroy$1 = function (instance) {\n // console.log('destroyModal')\n removeFromDom(instance.$el);\n instance.$destroy();\n spliceIfExist(queue, instance);\n};\n\n// handel cancel or ok for confirm & prompt\nvar shallResolve = function (type, msg) {\n if (type === TYPES$1.CONFIRM) {\n // is confirm\n return msg === 'ok'\n } else {\n // is prompt\n return isExist(msg) && isString(msg.value)\n }\n};\n\nvar init$1 = function (type, options, cb, resolve, reject) {\n if ( resolve === void 0 ) resolve = null;\n if ( reject === void 0 ) reject = null;\n\n var i18n = this.$i18n;\n var instance = new Vue({\n extends: __vue_component__$1,\n i18n: i18n,\n propsData: assign({}, { type: type }, options, {\n cb: function cb$1 (msg) {\n destroy$1(instance);\n if (isFunction(cb)) {\n if (type === TYPES$1.CONFIRM) {\n shallResolve(type, msg) ? cb(null, msg) : cb(msg);\n } else if (type === TYPES$1.PROMPT) {\n shallResolve(type, msg) ? cb(null, msg.value) : cb(msg);\n } else {\n cb(msg);\n }\n } else if (resolve && reject) {\n if (type === TYPES$1.CONFIRM) {\n shallResolve(type, msg) ? resolve(msg) : reject(msg);\n } else if (type === TYPES$1.PROMPT) {\n shallResolve(type, msg) ? resolve(msg.value) : reject(msg);\n } else {\n resolve(msg);\n }\n }\n }\n })\n });\n instance.$mount();\n document.body.appendChild(instance.$el);\n instance.show = true;\n queue.push(instance);\n};\n\n// eslint-disable-next-line default-param-last\nvar initModal = function (type, options, cb) {\n var this$1 = this;\n if ( options === void 0 ) options = {};\n\n if (isPromiseSupported()) {\n return new Promise(function (resolve, reject) {\n init$1.apply(this$1, [type, options, cb, resolve, reject]);\n })\n } else {\n init$1.apply(this, [type, options, cb]);\n }\n};\n\nvar alert = function (options, cb) {\n return initModal.apply(this, [TYPES$1.ALERT, options, cb])\n};\n\nvar confirm = function (options, cb) {\n return initModal.apply(this, [TYPES$1.CONFIRM, options, cb])\n};\n\nvar prompt = function (options, cb) {\n return initModal.apply(this, [TYPES$1.PROMPT, options, cb])\n};\n\nvar MessageBox = { alert: alert, confirm: confirm, prompt: prompt };\n\nvar TYPES = {\n SUCCESS: 'success',\n INFO: 'info',\n DANGER: 'danger',\n WARNING: 'warning'\n};\n\nvar PLACEMENTS = {\n TOP_LEFT: 'top-left',\n TOP_RIGHT: 'top-right',\n BOTTOM_LEFT: 'bottom-left',\n BOTTOM_RIGHT: 'bottom-right'\n};\n\nvar IN_CLASS = 'in';\nvar ICON = 'glyphicon';\nvar WIDTH = 300;\nvar TRANSITION_DURATION = 300;\n\nvar script = {\n components: { Alert: __vue_component__$7 },\n props: {\n title: String,\n content: String,\n html: {\n type: Boolean,\n default: false\n },\n duration: {\n type: Number,\n default: 5000\n },\n dismissible: {\n type: Boolean,\n default: true\n },\n type: String,\n placement: String,\n icon: String,\n customClass: null,\n cb: {\n type: Function,\n required: true\n },\n queue: {\n type: Array,\n required: true\n },\n offsetY: {\n type: Number,\n default: 15\n },\n offsetX: {\n type: Number,\n default: 15\n },\n offset: {\n type: Number,\n default: 15\n }\n },\n data: function data () {\n return {\n height: 0,\n top: 0,\n horizontal: this.placement === PLACEMENTS.TOP_LEFT || this.placement === PLACEMENTS.BOTTOM_LEFT ? 'left' : 'right',\n vertical: this.placement === PLACEMENTS.TOP_LEFT || this.placement === PLACEMENTS.TOP_RIGHT ? 'top' : 'bottom'\n }\n },\n created: function created () {\n // get prev notifications total height in the queue\n this.top = this.getTotalHeightOfQueue(this.queue);\n },\n mounted: function mounted () {\n var this$1 = this;\n\n var el = this.$el;\n el.style[this.vertical] = this.top + 'px';\n this.$nextTick(function () {\n el.style[this$1.horizontal] = \"-\" + WIDTH + \"px\";\n this$1.height = el.offsetHeight;\n el.style[this$1.horizontal] = (this$1.offsetX) + \"px\";\n addClass(el, IN_CLASS);\n });\n },\n computed: {\n styles: function styles () {\n var obj;\n\n var queue = this.queue;\n var thisIndex = queue.indexOf(this);\n return ( obj = {\n position: 'fixed'\n }, obj[this.vertical] = ((this.getTotalHeightOfQueue(queue, thisIndex)) + \"px\"), obj.width = (WIDTH + \"px\"), obj.transition = (\"all \" + (TRANSITION_DURATION / 1000) + \"s ease-in-out\"), obj )\n },\n icons: function icons () {\n if (isString(this.icon)) {\n return this.icon\n }\n switch (this.type) {\n case TYPES.INFO:\n case TYPES.WARNING:\n return (ICON + \" \" + ICON + \"-info-sign\")\n case TYPES.SUCCESS:\n return (ICON + \" \" + ICON + \"-ok-sign\")\n case TYPES.DANGER:\n return (ICON + \" \" + ICON + \"-remove-sign\")\n default:\n return null\n }\n }\n },\n methods: {\n getTotalHeightOfQueue: function getTotalHeightOfQueue (queue, lastIndex) {\n if ( lastIndex === void 0 ) lastIndex = queue.length;\n\n var totalHeight = this.offsetY;\n for (var i = 0; i < lastIndex; i++) {\n totalHeight += queue[i].height + this.offset;\n }\n return totalHeight\n },\n onDismissed: function onDismissed () {\n removeClass(this.$el, IN_CLASS);\n setTimeout(this.cb, TRANSITION_DURATION);\n }\n }\n};\n\n/* script */\nvar __vue_script__ = script;\n\n/* template */\nvar __vue_render__ = function() {\n var _vm = this;\n var _h = _vm.$createElement;\n var _c = _vm._self._c || _h;\n return _c(\n \"alert\",\n {\n staticClass: \"fade\",\n class: _vm.customClass,\n style: _vm.styles,\n attrs: {\n type: _vm.type,\n duration: _vm.duration,\n dismissible: _vm.dismissible\n },\n on: { dismissed: _vm.onDismissed }\n },\n [\n _c(\"div\", { staticClass: \"media\", staticStyle: { margin: \"0\" } }, [\n _vm.icons\n ? _c(\"div\", { staticClass: \"media-left\" }, [\n _c(\"span\", {\n class: _vm.icons,\n staticStyle: { \"font-size\": \"1.5em\" }\n })\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"media-body\" }, [\n _vm.title\n ? _c(\"div\", { staticClass: \"media-heading\" }, [\n _c(\"b\", [_vm._v(_vm._s(_vm.title))])\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _vm.html\n ? _c(\"div\", { domProps: { innerHTML: _vm._s(_vm.content) } })\n : _c(\"div\", [_vm._v(_vm._s(_vm.content))])\n ])\n ])\n ]\n )\n};\nvar __vue_staticRenderFns__ = [];\n__vue_render__._withStripped = true;\n\n /* style */\n var __vue_inject_styles__ = undefined;\n /* scoped */\n var __vue_scope_id__ = undefined;\n /* module identifier */\n var __vue_module_identifier__ = undefined;\n /* functional template */\n var __vue_is_functional_template__ = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__ = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },\n __vue_inject_styles__,\n __vue_script__,\n __vue_scope_id__,\n __vue_is_functional_template__,\n __vue_module_identifier__,\n false,\n undefined,\n undefined,\n undefined\n );\n\nvar queues = {};\nqueues[PLACEMENTS.TOP_LEFT] = [];\nqueues[PLACEMENTS.TOP_RIGHT] = [];\nqueues[PLACEMENTS.BOTTOM_LEFT] = [];\nqueues[PLACEMENTS.BOTTOM_RIGHT] = [];\n\nvar destroy = function (queue, instance) {\n // console.log('destroyNotification')\n removeFromDom(instance.$el);\n instance.$destroy();\n spliceIfExist(queue, instance);\n};\n\nvar init = function (options, cb, resolve, reject) {\n if ( resolve === void 0 ) resolve = null;\n if ( reject === void 0 ) reject = null;\n\n var placement = options.placement;\n var queue = queues[placement];\n // check if placement is valid\n if (!isExist(queue)) {\n return\n }\n /* istanbul ignore else */\n // `error` alias of `danger`\n if (options.type === 'error') {\n options.type = 'danger';\n }\n var instance = new Vue({\n extends: __vue_component__,\n propsData: assign({}, { queue: queue, placement: placement }, options, {\n cb: function cb$1 (msg) {\n destroy(queue, instance);\n if (isFunction(cb)) {\n cb(msg);\n } else if (resolve && reject) {\n resolve(msg);\n }\n }\n })\n });\n instance.$mount();\n document.body.appendChild(instance.$el);\n queue.push(instance);\n};\n\n// eslint-disable-next-line default-param-last\nvar _notify = function (options, cb) {\n if ( options === void 0 ) options = {};\n\n // simplify usage: pass string as option.content\n if (isString(options)) {\n options = {\n content: options\n };\n }\n // set default placement as top-right\n if (!isExist(options.placement)) {\n options.placement = PLACEMENTS.TOP_RIGHT;\n }\n if (isPromiseSupported()) {\n return new Promise(function (resolve, reject) {\n init(options, cb, resolve, reject);\n })\n } else {\n init(options, cb);\n }\n};\n\nfunction _notify2 (type, args) {\n if (isString(args)) {\n _notify({\n content: args,\n type: type\n });\n } else {\n _notify(assign({}, args, {\n type: type\n }));\n }\n}\n\nvar notify = Object.defineProperties(_notify, {\n success: {\n configurable: false,\n writable: false,\n value: function value (args) {\n _notify2('success', args);\n }\n },\n info: {\n configurable: false,\n writable: false,\n value: function value (args) {\n _notify2('info', args);\n }\n },\n warning: {\n configurable: false,\n writable: false,\n value: function value (args) {\n _notify2('warning', args);\n }\n },\n danger: {\n configurable: false,\n writable: false,\n value: function value (args) {\n _notify2('danger', args);\n }\n },\n error: {\n configurable: false,\n writable: false,\n value: function value (args) {\n _notify2('danger', args);\n }\n },\n dismissAll: {\n configurable: false,\n writable: false,\n value: function value () {\n for (var key in queues) {\n /* istanbul ignore else */\n if (hasOwnProperty(queues, key)) {\n queues[key].forEach(function (instance) {\n instance.onDismissed();\n });\n }\n }\n }\n }\n});\n\nvar Notification = { notify: notify };\n\nvar services = /*#__PURE__*/Object.freeze({\n __proto__: null,\n MessageBox: MessageBox,\n Notification: Notification\n});\n\nvar install = function (Vue, options) {\n if ( options === void 0 ) options = {};\n\n // Setup language, en-US for default\n locale.use(options.locale);\n locale.i18n(options.i18n);\n // Register components\n Object.keys(components).forEach(function (key) {\n var _key = options.prefix ? options.prefix + key : key;\n Vue.component(_key, components[key]);\n });\n // Register directives\n Object.keys(directives).forEach(function (key) {\n var _key = options.prefix ? options.prefix + '-' + key : key;\n Vue.directive(_key, directives[key]);\n });\n // Register services\n Object.keys(services).forEach(function (key) {\n var service = services[key];\n Object.keys(service).forEach(function (serviceKey) {\n var _key = options.prefix ? options.prefix + '_' + serviceKey : serviceKey;\n Vue.prototype['$' + _key] = service[serviceKey];\n });\n });\n};\n\nexport { __vue_component__$8 as Affix, __vue_component__$7 as Alert, BreadcrumbItem, Breadcrumbs, Btn, BtnGroup, BtnToolbar, __vue_component__$h as Carousel, Collapse, __vue_component__$9 as DatePicker, Dropdown, MessageBox, __vue_component__$f as Modal, __vue_component__$3 as MultiSelect, __vue_component__$2 as Navbar, NavbarForm, NavbarNav, NavbarText, Notification, __vue_component__$6 as Pagination, Popover, ProgressBar, ProgressBarStack, __vue_component__$g as Slide, __vue_component__$e as Tab, __vue_component__$d as Tabs, __vue_component__$5 as TimePicker, Tooltip, __vue_component__$4 as Typeahead, install, popover, scrollspy, tooltip };\n//# sourceMappingURL=uiv.esm.js.map\n","/*\n * bootstrap.js\n * Copyright (c) 2020 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\n// // imports\nimport Vue from 'vue';\nimport VueI18n from 'vue-i18n'\nimport * as uiv from 'uiv';\n\n// export jquery for others scripts to use\nwindow.$ = window.jQuery = require('jquery');\n\n// axios\nwindow.axios = require('axios');\nwindow.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';\n\n// CSRF\nlet token = document.head.querySelector('meta[name=\"csrf-token\"]');\n\nif (token) {\n window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;\n} else {\n console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');\n}\n\n// locale\nlet localeToken = document.head.querySelector('meta[name=\"locale\"]');\n\nif (localeToken) {\n localStorage.locale = localeToken.content;\n} else {\n localStorage.locale = 'en_US';\n}\n\n// admin stuff\nrequire('jquery-ui');\nrequire('bootstrap'); // bootstrap CSS?\n\nrequire('./dist/js/adminlte');\nrequire('overlayscrollbars');\n\n\n// vue\nwindow.vuei18n = VueI18n;\nwindow.uiv = uiv;\nVue.use(vuei18n);\nVue.use(uiv);\nwindow.Vue = Vue;","/*\n * create.js\n * Copyright (c) 2020 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\nconst lodashClonedeep = require('lodash.clonedeep');\n\nimport {getDefaultTransaction, getDefaultErrors} from '../../../shared/transactions';\n\n// initial state\nconst state = () => ({\n transactionType: 'any',\n groupTitle: '',\n transactions: [],\n customDateFields: {\n interest_date: false,\n book_date: false,\n process_date: false,\n due_date: false,\n payment_date: false,\n invoice_date: false,\n },\n defaultTransaction: getDefaultTransaction(),\n defaultErrors: getDefaultErrors()\n }\n)\n\n\n// getters\nconst getters = {\n transactions: state => {\n return state.transactions;\n },\n groupTitle: state => {\n return state.groupTitle;\n },\n transactionType: state => {\n return state.transactionType;\n },\n accountToTransaction: state => {\n // TODO better architecture here, does not need the store.\n // possible API point!!\n return state.accountToTransaction;\n },\n defaultTransaction: state => {\n return state.defaultTransaction;\n },\n sourceAllowedTypes: state => {\n return state.sourceAllowedTypes;\n },\n destinationAllowedTypes: state => {\n return state.destinationAllowedTypes;\n },\n allowedOpposingTypes: state => {\n return state.allowedOpposingTypes;\n },\n customDateFields: state => {\n return state.customDateFields;\n }\n // // `getters` is localized to this module's getters\n // // you can use rootGetters via 4th argument of getters\n // someGetter (state, getters, rootState, rootGetters) {\n // getters.someOtherGetter // -> 'foo/someOtherGetter'\n // rootGetters.someOtherGetter // -> 'someOtherGetter'\n // rootGetters['bar/someOtherGetter'] // -> 'bar/someOtherGetter'\n // },\n\n}\n\n// actions\nconst actions = {}\n\n// mutations\nconst mutations = {\n addTransaction(state) {\n let newTransaction = lodashClonedeep(state.defaultTransaction);\n newTransaction.errors = lodashClonedeep(state.defaultErrors);\n state.transactions.push(newTransaction);\n },\n resetErrors(state, payload) {\n //console.log('resetErrors for index ' + payload.index);\n state.transactions[payload.index].errors = lodashClonedeep(state.defaultErrors);\n },\n resetTransactions(state) {\n state.transactions = [];\n },\n setGroupTitle(state, payload) {\n state.groupTitle = payload.groupTitle;\n },\n setCustomDateFields(state, payload) {\n state.customDateFields = payload;\n },\n deleteTransaction(state, payload) {\n state.transactions.splice(payload.index, 1);\n // console.log('Deleted transaction ' + payload.index);\n // console.log(state.transactions);\n if (0 === state.transactions.length) {\n // console.log('array is empty!');\n }\n },\n setTransactionType(state, transactionType) {\n state.transactionType = transactionType;\n },\n setAllowedOpposingTypes(state, allowedOpposingTypes) {\n state.allowedOpposingTypes = allowedOpposingTypes;\n },\n setAccountToTransaction(state, payload) {\n state.accountToTransaction = payload;\n },\n updateField(state, payload) {\n state.transactions[payload.index][payload.field] = payload.value;\n },\n setTransactionError(state, payload) {\n //console.log('Will set transactions[' + payload.index + '][errors][' + payload.field + '] to ');\n //console.log(payload.errors);\n state.transactions[payload.index].errors[payload.field] = payload.errors;\n },\n setDestinationAllowedTypes(state, payload) {\n // console.log('Destination allowed types was changed!');\n state.destinationAllowedTypes = payload;\n },\n setSourceAllowedTypes(state, payload) {\n state.sourceAllowedTypes = payload;\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","/*\n * edit.js\n * Copyright (c) 2021 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\n// initial state\nconst state = () => ({});\n\n\n// getters\nconst getters = {};\n\n// actions\nconst actions = {};\n\n// mutations\nconst mutations = {};\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","/*\n * index.js\n * Copyright (c) 2020 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\n// initial state\nconst state = () => (\n {\n viewRange: 'default',\n start: null,\n end: null,\n // default range:\n defaultStart: null,\n defaultEnd: null,\n }\n)\n\n\n// getters\nconst getters = {\n start: state => {\n return state.start;\n },\n end: state => {\n return state.end;\n },\n defaultStart: state => {\n return state.defaultStart;\n },\n defaultEnd: state => {\n return state.defaultEnd;\n },\n viewRange: state => {\n return state.viewRange;\n }\n}\n\n// actions\nconst actions = {\n initialiseStore(context) {\n if ('default' === context.state.viewRange) {\n axios.get('./api/v1/preferences/viewRange')\n .then(response => {\n let viewRange = response.data.data.attributes.data;\n context.commit('setViewRange', viewRange);\n // call another action:\n context.dispatch('setDatesFromViewRange');\n }\n ).catch(error => {\n // console.log(error);\n context.commit('setViewRange', '1M');\n // call another action:\n context.dispatch('setDatesFromViewRange');\n });\n }\n },\n setDatesFromViewRange(context) {\n // console.log('Must set dates from viewRange \"' + context.state.viewRange + '\"');\n // check local storage first?\n if (localStorage.viewRangeStart) {\n // console.log('view range start set from local storage.');\n context.commit('setStart', new Date(localStorage.viewRangeStart));\n }\n if (localStorage.viewRangeEnd) {\n // console.log('view range end set from local storage.');\n context.commit('setEnd', new Date(localStorage.viewRangeEnd));\n }\n // also set default:\n if (localStorage.viewRangeDefaultStart) {\n // console.log('view range default start set from local storage.');\n // console.log(localStorage.viewRangeDefaultStart);\n context.commit('setDefaultStart', new Date(localStorage.viewRangeDefaultStart));\n }\n if (localStorage.viewRangeDefaultEnd) {\n // console.log('view range default end set from local storage.');\n // console.log(localStorage.viewRangeDefaultEnd);\n context.commit('setDefaultEnd', new Date(localStorage.viewRangeDefaultEnd));\n }\n\n if (null !== context.getters.end && null !== context.getters.start) {\n return;\n }\n let start;\n let end;\n let viewRange = context.getters.viewRange;\n // console.log('Will recreate view range on ' + viewRange);\n switch (viewRange) {\n case '1D':\n // one day:\n start = new Date;\n end = new Date(start.getTime());\n start.setHours(0, 0, 0, 0);\n end.setHours(23, 59, 59, 999);\n break;\n case '1W':\n // this week:\n start = new Date;\n end = new Date(start.getTime());\n // start of week\n let diff = start.getDate() - start.getDay() + (start.getDay() === 0 ? -6 : 1);\n start.setDate(diff);\n start.setHours(0, 0, 0, 0);\n\n // end of week\n let lastday = end.getDate() - (end.getDay() - 1) + 6;\n end.setDate(lastday);\n end.setHours(23, 59, 59, 999);\n break;\n case '1M':\n // this month:\n start = new Date;\n start = new Date(start.getFullYear(), start.getMonth(), 1);\n start.setHours(0, 0, 0, 0);\n end = new Date(start.getFullYear(), start.getMonth() + 1, 0);\n end.setHours(23, 59, 59, 999);\n break;\n case '3M':\n // this quarter\n start = new Date;\n end = new Date;\n let quarter = Math.floor((start.getMonth() + 3) / 3) - 1;\n // start and end months? I'm sure this could be better:\n let startMonths = [0, 3, 6, 9];\n let endMonths = [2, 5, 8, 11];\n // set start to the correct month, day one:\n start = new Date(start.getFullYear(), startMonths[quarter], 1);\n start.setHours(0, 0, 0, 0);\n\n // set end to the correct month, day one\n end = new Date(end.getFullYear(), endMonths[quarter], 1);\n // then to the last day of the month:\n end = new Date(end.getFullYear(), end.getMonth() + 1, 0);\n end.setHours(23, 59, 59, 999);\n break;\n case '6M':\n // this half-year\n start = new Date;\n end = new Date;\n let half = start.getMonth() <= 5 ? 0 : 1;\n\n let startHalf = [0, 6];\n let endHalf = [5, 11];\n // set start to the correct month, day one:\n start = new Date(start.getFullYear(), startHalf[half], 1);\n start.setHours(0, 0, 0, 0);\n\n // set end to the correct month, day one\n end = new Date(end.getFullYear(), endHalf[half], 1);\n // then to the last day of the month:\n end = new Date(end.getFullYear(), end.getMonth() + 1, 0);\n end.setHours(23, 59, 59, 999);\n break;\n case '1Y':\n // this year\n start = new Date;\n end = new Date;\n start = new Date(start.getFullYear(), 0, 1);\n\n end = new Date(end.getFullYear(), 11, 31);\n start.setHours(0, 0, 0, 0);\n end.setHours(23, 59, 59, 999);\n break;\n }\n // console.log('Range is ' + viewRange);\n // console.log('Start is ' + start);\n // console.log('End is ' + end);\n context.commit('setStart', start);\n context.commit('setEnd', end);\n context.commit('setDefaultStart', start);\n context.commit('setDefaultEnd', end);\n }\n}\n\n// mutations\nconst mutations = {\n setStart(state, value) {\n state.start = value;\n window.localStorage.setItem('viewRangeStart', value);\n },\n setEnd(state, value) {\n state.end = value;\n window.localStorage.setItem('viewRangeEnd', value);\n },\n setDefaultStart(state, value) {\n state.defaultStart = value;\n window.localStorage.setItem('viewRangeDefaultStart', value);\n },\n setDefaultEnd(state, value) {\n state.defaultEnd = value;\n window.localStorage.setItem('viewRangeDefaultEnd', value);\n },\n setViewRange(state, range) {\n state.viewRange = range;\n }\n}\n\nexport default {\n namespaced: true,\n state,\n getters,\n actions,\n mutations\n}\n","/*\n * index.js\n * Copyright (c) 2020 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\nimport Vue from 'vue'\nimport Vuex, {createLogger} from 'vuex'\nimport transactions_create from './modules/transactions/create';\nimport transactions_edit from './modules/transactions/edit';\nimport dashboard_index from './modules/dashboard/index';\n\nVue.use(Vuex)\nconst debug = process.env.NODE_ENV !== 'production'\n\nexport default new Vuex.Store(\n {\n modules: {\n transactions: {\n namespaced: true,\n modules: {\n create: transactions_create,\n edit: transactions_edit\n }\n },\n dashboard: {\n namespaced: true,\n modules: {\n index: dashboard_index\n }\n }\n },\n strict: debug,\n plugins: debug ? [createLogger()] : [],\n state: {\n currencyPreference: {},\n locale: 'en-US'\n },\n mutations: {\n setCurrencyPreference(state, payload) {\n //console.log('setCurrencyPreference', payload);\n state.currencyPreference = payload.payload;\n },\n initialiseStore(state) {\n // if locale in local storage:\n if (localStorage.locale) {\n state.locale = localStorage.locale;\n return;\n }\n // set locale from HTML:\n let localeToken = document.head.querySelector('meta[name=\"locale\"]');\n if (localeToken) {\n state.locale = localeToken.content;\n localStorage.locale = localeToken.content;\n }\n }\n },\n getters: {\n currencyCode: state => {\n return state.currencyPreference.code;\n },\n currencyPreference: state => {\n return state.currencyPreference;\n },\n currencyId: state => {\n return state.currencyPreference.id;\n },\n locale: state => {\n return state.locale;\n }\n },\n actions: {\n updateCurrencyPreference(context) {\n if (localStorage.currencyPreference) {\n //console.log('set from local storage.');\n //console.log(localStorage.currencyPreference);\n //console.log({payload: JSON.parse(localStorage.currencyPreference)});\n context.commit('setCurrencyPreference', {payload: JSON.parse(localStorage.currencyPreference)});\n return;\n }\n axios.get('./api/v1/currencies/default')\n .then(response => {\n let currencyResponse = {\n id: parseInt(response.data.data.id),\n name: response.data.data.attributes.name,\n symbol: response.data.data.attributes.symbol,\n code: response.data.data.attributes.code,\n decimal_places: parseInt(response.data.data.attributes.decimal_places),\n };\n localStorage.currencyPreference = JSON.stringify(currencyResponse);\n //console.log('getCurrencyPreference from server')\n //console.log(JSON.stringify(currencyResponse));\n context.commit('setCurrencyPreference', {payload: currencyResponse});\n }).catch(err => {\n // console.log('Got error response.');\n console.error(err);\n context.commit('setCurrencyPreference', {\n payload: {\n id: 1,\n name: 'Euro',\n symbol: '€',\n code: 'EUR',\n decimal_places: 2\n }\n });\n });\n\n }\n }\n }\n);","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","/*\n * i18n.js\n * Copyright (c) 2020 james@firefly-iii.org\n *\n * This file is part of Firefly III (https://github.com/firefly-iii).\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see .\n */\n\n// Create VueI18n instance with options\nmodule.exports = new vuei18n({\n locale: document.documentElement.lang, // set locale\n fallbackLocale: 'en',\n messages: {\n 'bg': require('./locales/bg.json'),\n 'cs': require('./locales/cs.json'),\n 'de': require('./locales/de.json'),\n 'en': require('./locales/en.json'),\n 'en-us': require('./locales/en.json'),\n 'en-gb': require('./locales/en-gb.json'),\n 'es': require('./locales/es.json'),\n 'el': require('./locales/el.json'),\n 'fr': require('./locales/fr.json'),\n 'hu': require('./locales/hu.json'),\n //'id': require('./locales/id.json'),\n 'it': require('./locales/it.json'),\n 'nl': require('./locales/nl.json'),\n 'nb': require('./locales/nb.json'),\n 'pl': require('./locales/pl.json'),\n 'fi': require('./locales/fi.json'),\n 'pt-br': require('./locales/pt-br.json'),\n 'pt-pt': require('./locales/pt.json'),\n 'ro': require('./locales/ro.json'),\n 'ru': require('./locales/ru.json'),\n //'zh': require('./locales/zh.json'),\n 'zh-tw': require('./locales/zh-tw.json'),\n 'zh-cn': require('./locales/zh-cn.json'),\n 'sk': require('./locales/sk.json'),\n 'sv': require('./locales/sv.json'),\n 'vi': require('./locales/vi.json'),\n }\n});\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.transactions.length > 1)?_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col\"},[_c('ul',{staticClass:\"nav nav-pills ml-auto p-2\"},_vm._l((this.transactions),function(transaction,index){return _c('li',{staticClass:\"nav-item\"},[_c('a',{class:'nav-link' + (0===index ? ' active' : ''),attrs:{\"href\":'#split_' + index,\"data-toggle\":\"tab\"}},[('' !== transaction.description)?_c('span',[_vm._v(_vm._s(transaction.description))]):_vm._e(),_vm._v(\" \"),('' === transaction.description)?_c('span',[_vm._v(\"Split \"+_vm._s(index + 1))]):_vm._e()])])}),0)])]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SplitPills.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SplitPills.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n\n","import { render, staticRenderFns } from \"./SplitPills.vue?vue&type=template&id=0e910ecf&\"\nimport script from \"./SplitPills.vue?vue&type=script&lang=js&\"\nexport * from \"./SplitPills.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n\nvar stylesInDom = {};\n\nvar\tmemoize = function (fn) {\n\tvar memo;\n\n\treturn function () {\n\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\treturn memo;\n\t};\n};\n\nvar isOldIE = memoize(function () {\n\t// Test for IE <= 9 as proposed by Browserhacks\n\t// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n\t// Tests for existence of standard globals is to allow style-loader\n\t// to operate correctly into non-standard environments\n\t// @see https://github.com/webpack-contrib/style-loader/issues/177\n\treturn window && document && document.all && !window.atob;\n});\n\nvar getTarget = function (target, parent) {\n if (parent){\n return parent.querySelector(target);\n }\n return document.querySelector(target);\n};\n\nvar getElement = (function (fn) {\n\tvar memo = {};\n\n\treturn function(target, parent) {\n // If passing function in options, then use it for resolve \"head\" element.\n // Useful for Shadow Root style i.e\n // {\n // insertInto: function () { return document.querySelector(\"#foo\").shadowRoot }\n // }\n if (typeof target === 'function') {\n return target();\n }\n if (typeof memo[target] === \"undefined\") {\n\t\t\tvar styleTarget = getTarget.call(this, target, parent);\n\t\t\t// Special case to return head of iframe instead of iframe itself\n\t\t\tif (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n\t\t\t\ttry {\n\t\t\t\t\t// This will throw an exception if access to iframe is blocked\n\t\t\t\t\t// due to cross-origin restrictions\n\t\t\t\t\tstyleTarget = styleTarget.contentDocument.head;\n\t\t\t\t} catch(e) {\n\t\t\t\t\tstyleTarget = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmemo[target] = styleTarget;\n\t\t}\n\t\treturn memo[target]\n\t};\n})();\n\nvar singleton = null;\nvar\tsingletonCounter = 0;\nvar\tstylesInsertedAtTop = [];\n\nvar\tfixUrls = require(\"./urls\");\n\nmodule.exports = function(list, options) {\n\tif (typeof DEBUG !== \"undefined\" && DEBUG) {\n\t\tif (typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\n\t}\n\n\toptions = options || {};\n\n\toptions.attrs = typeof options.attrs === \"object\" ? options.attrs : {};\n\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of ","import { render, staticRenderFns } from \"./SwitchAccount.vue?vue&type=template&id=376bca8c&scoped=true&\"\nimport script from \"./SwitchAccount.vue?vue&type=script&lang=js&\"\nexport * from \"./SwitchAccount.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"376bca8c\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[('any' !== this.transactionType)?_c('span',{staticClass:\"text-muted\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.' + this.transactionType))+\"\\n \")]):_vm._e(),_vm._v(\" \"),('any' === this.transactionType)?_c('span',{staticClass:\"text-muted\"},[_vm._v(\" \")]):_vm._e()]),_vm._v(\" \"),_c('div',{staticClass:\"btn-group d-flex\"},[_c('button',{staticClass:\"btn btn-light\",on:{\"click\":_vm.switchAccounts}},[_vm._v(\"↔\")])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionAmount.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionAmount.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n\n\n","import { render, staticRenderFns } from \"./TransactionAmount.vue?vue&type=template&id=fadf3e90&scoped=true&\"\nimport script from \"./TransactionAmount.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionAmount.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"fadf3e90\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs\"},[_vm._v(_vm._s(_vm.$t('firefly.amount')))]),_vm._v(\" \"),_c('div',{staticClass:\"input-group\"},[(_vm.currencySymbol)?_c('div',{staticClass:\"input-group-prepend\"},[_c('div',{staticClass:\"input-group-text\"},[_vm._v(_vm._s(_vm.currencySymbol))])]):_vm._e(),_vm._v(\" \"),_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.transactionAmount),expression:\"transactionAmount\"}],class:_vm.errors.length > 0 ? 'form-control is-invalid' : 'form-control',attrs:{\"placeholder\":_vm.$t('firefly.amount'),\"title\":_vm.$t('firefly.amount'),\"autocomplete\":\"off\",\"name\":\"amount[]\",\"type\":\"number\"},domProps:{\"value\":(_vm.transactionAmount)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.transactionAmount=$event.target.value}}})]),_vm._v(\" \"),(_vm.errors.length > 0)?_c('span',_vm._l((_vm.errors),function(error){return _c('span',{staticClass:\"text-danger small\"},[_vm._v(_vm._s(error)),_c('br')])}),0):_vm._e()])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionForeignAmount.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionForeignAmount.vue?vue&type=script&lang=js&\"","\n\n\n \n \n \n\n\n\n","import { render, staticRenderFns } from \"./TransactionForeignAmount.vue?vue&type=template&id=d13f8bea&scoped=true&\"\nimport script from \"./TransactionForeignAmount.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionForeignAmount.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"d13f8bea\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.isVisible)?_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs\"},[_vm._v(_vm._s(_vm.$t('form.foreign_amount')))]),_vm._v(\" \"),_c('div',{staticClass:\"input-group\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.amount),expression:\"amount\"}],class:_vm.errors.length > 0 ? 'form-control is-invalid' : 'form-control',attrs:{\"placeholder\":_vm.$t('form.foreign_amount'),\"title\":_vm.$t('form.foreign_amount'),\"autocomplete\":\"off\",\"name\":\"foreign_amount[]\",\"type\":\"number\"},domProps:{\"value\":(_vm.amount)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.amount=$event.target.value}}})]),_vm._v(\" \"),(_vm.errors.length > 0)?_c('span',_vm._l((_vm.errors),function(error){return _c('span',{staticClass:\"text-danger small\"},[_vm._v(_vm._s(error)),_c('br')])}),0):_vm._e()]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionForeignCurrency.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionForeignCurrency.vue?vue&type=script&lang=js&\"","\n\n\n \n \n \n\n\n","import { render, staticRenderFns } from \"./TransactionForeignCurrency.vue?vue&type=template&id=3ee4efa5&scoped=true&\"\nimport script from \"./TransactionForeignCurrency.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionForeignCurrency.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"3ee4efa5\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.isVisible)?_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs\"},[_vm._v(\" \")]),_vm._v(\" \"),_c('div',{staticClass:\"input-group\"},[_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.selectedCurrency),expression:\"selectedCurrency\"}],staticClass:\"form-control\",attrs:{\"name\":\"foreign_currency_id[]\"},on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.selectedCurrency=$event.target.multiple ? $$selectedVal : $$selectedVal[0]}}},_vm._l((_vm.selectableCurrencies),function(currency){return _c('option',{attrs:{\"label\":currency.name},domProps:{\"value\":currency.id}},[_vm._v(_vm._s(currency.name))])}),0)])]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionCustomDates.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionCustomDates.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n\n","import { render, staticRenderFns } from \"./TransactionCustomDates.vue?vue&type=template&id=7c0f4f0c&\"\nimport script from \"./TransactionCustomDates.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionCustomDates.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',_vm._l((_vm.availableFields),function(enabled,name){return _c('div',{staticClass:\"form-group\"},[(enabled && _vm.isDateField(name))?_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('form.' + name))+\"\\n \")]):_vm._e(),_vm._v(\" \"),(enabled && _vm.isDateField(name))?_c('div',{staticClass:\"input-group\"},[_c('input',{ref:name,refInFor:true,staticClass:\"form-control\",attrs:{\"name\":name + '[]',\"placeholder\":_vm.$t('form.' + name),\"title\":_vm.$t('form.' + name),\"autocomplete\":\"off\",\"type\":\"date\"},domProps:{\"value\":_vm.getFieldValue(name)},on:{\"change\":function($event){return _vm.setFieldValue($event, name)},\"submit\":function($event){$event.preventDefault();}}})]):_vm._e()])}),0)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionCategory.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionCategory.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n","import { render, staticRenderFns } from \"./TransactionCategory.vue?vue&type=template&id=332d1095&\"\nimport script from \"./TransactionCategory.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionCategory.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.category'))+\"\\n \")]),_vm._v(\" \"),_c('vue-typeahead-bootstrap',{attrs:{\"data\":_vm.categories,\"inputClass\":_vm.errors.length > 0 ? 'is-invalid' : '',\"minMatchingChars\":3,\"placeholder\":_vm.$t('firefly.category'),\"serializer\":function (item) { return item.name; },\"showOnFocus\":true,\"inputName\":\"category[]\"},on:{\"hit\":function($event){_vm.selectedCategory = $event},\"input\":_vm.lookupCategory},model:{value:(_vm.category),callback:function ($$v) {_vm.category=$$v},expression:\"category\"}},[_c('template',{slot:\"append\"},[_c('div',{staticClass:\"input-group-append\"},[_c('button',{staticClass:\"btn btn-outline-secondary\",attrs:{\"tabindex\":\"-1\",\"type\":\"button\"},on:{\"click\":_vm.clearCategory}},[_c('i',{staticClass:\"far fa-trash-alt\"})])])])],2),_vm._v(\" \"),(_vm.errors.length > 0)?_c('span',_vm._l((_vm.errors),function(error){return _c('span',{staticClass:\"text-danger small\"},[_vm._v(_vm._s(error)),_c('br')])}),0):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionBill.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionBill.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n\n\n","import { render, staticRenderFns } from \"./TransactionBill.vue?vue&type=template&id=7c81d840&\"\nimport script from \"./TransactionBill.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionBill.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.bill'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"input-group\"},[_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.bill),expression:\"bill\"}],ref:\"bill\",class:_vm.errors.length > 0 ? 'form-control is-invalid' : 'form-control',attrs:{\"title\":_vm.$t('firefly.bill'),\"autocomplete\":\"off\",\"name\":\"bill_id[]\"},on:{\"submit\":function($event){$event.preventDefault();},\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.bill=$event.target.multiple ? $$selectedVal : $$selectedVal[0]}}},_vm._l((this.billList),function(bill){return _c('option',{attrs:{\"label\":bill.name},domProps:{\"value\":bill.id}},[_vm._v(_vm._s(bill.name))])}),0)]),_vm._v(\" \"),(_vm.errors.length > 0)?_c('span',_vm._l((_vm.errors),function(error){return _c('span',{staticClass:\"text-danger small\"},[_vm._v(_vm._s(error)),_c('br')])}),0):_vm._e()])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionTags.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionTags.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n\n\n","import { render, staticRenderFns } from \"./TransactionTags.vue?vue&type=template&id=834226ea&\"\nimport script from \"./TransactionTags.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionTags.vue?vue&type=script&lang=js&\"\nimport style0 from \"./TransactionTags.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {\nvar this$1 = this;\nvar _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.tags'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"input-group\"},[_c('vue-tags-input',{attrs:{\"add-only-from-autocomplete\":false,\"autocomplete-items\":_vm.autocompleteItems,\"tags\":_vm.tags,\"title\":_vm.$t('firefly.tags'),\"placeholder\":_vm.$t('firefly.tags')},on:{\"tags-changed\":function (newTags) { return this$1.tags = newTags; }},model:{value:(_vm.currentTag),callback:function ($$v) {_vm.currentTag=$$v},expression:\"currentTag\"}})],1),_vm._v(\" \"),(_vm.errors.length > 0)?_c('span',_vm._l((_vm.errors),function(error){return _c('span',{staticClass:\"text-danger small\"},[_vm._v(_vm._s(error)),_c('br')])}),0):_vm._e()])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionPiggyBank.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionPiggyBank.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n\n","import { render, staticRenderFns } from \"./TransactionPiggyBank.vue?vue&type=template&id=f88cfd4e&\"\nimport script from \"./TransactionPiggyBank.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionPiggyBank.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.piggy_bank'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"input-group\"},[_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.piggy_bank_id),expression:\"piggy_bank_id\"}],ref:\"piggy_bank_id\",class:_vm.errors.length > 0 ? 'form-control is-invalid' : 'form-control',attrs:{\"title\":_vm.$t('firefly.piggy_bank'),\"autocomplete\":\"off\",\"name\":\"piggy_bank_id[]\"},on:{\"submit\":function($event){$event.preventDefault();},\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.piggy_bank_id=$event.target.multiple ? $$selectedVal : $$selectedVal[0]}}},_vm._l((this.piggyList),function(piggy){return _c('option',{attrs:{\"label\":piggy.name_with_balance},domProps:{\"value\":piggy.id}},[_vm._v(_vm._s(piggy.name_with_balance))])}),0)]),_vm._v(\" \"),(_vm.errors.length > 0)?_c('span',_vm._l((_vm.errors),function(error){return _c('span',{staticClass:\"text-danger small\"},[_vm._v(_vm._s(error)),_c('br')])}),0):_vm._e()])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionInternalReference.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionInternalReference.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n\n","import { render, staticRenderFns } from \"./TransactionInternalReference.vue?vue&type=template&id=7f1b8c1d&\"\nimport script from \"./TransactionInternalReference.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionInternalReference.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.showField)?_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.internal_reference'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"input-group\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.reference),expression:\"reference\"}],class:_vm.errors.length > 0 ? 'form-control is-invalid' : 'form-control',attrs:{\"placeholder\":_vm.$t('firefly.internal_reference'),\"name\":\"internal_reference[]\",\"type\":\"text\"},domProps:{\"value\":(_vm.reference)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.reference=$event.target.value}}}),_vm._v(\" \"),_vm._m(0)])]):_vm._e()}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-append\"},[_c('button',{staticClass:\"btn btn-outline-secondary\",attrs:{\"tabindex\":\"-1\",\"type\":\"button\"}},[_c('i',{staticClass:\"far fa-trash-alt\"})])])}]\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionExternalUrl.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionExternalUrl.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n\n\n","import { render, staticRenderFns } from \"./TransactionExternalUrl.vue?vue&type=template&id=7f6746e6&scoped=true&\"\nimport script from \"./TransactionExternalUrl.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionExternalUrl.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"7f6746e6\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.showField)?_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.external_url'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"input-group\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.url),expression:\"url\"}],class:_vm.errors.length > 0 ? 'form-control is-invalid' : 'form-control',attrs:{\"placeholder\":_vm.$t('firefly.external_url'),\"name\":\"external_url[]\",\"type\":\"url\"},domProps:{\"value\":(_vm.url)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.url=$event.target.value}}}),_vm._v(\" \"),_vm._m(0)])]):_vm._e()}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-append\"},[_c('button',{staticClass:\"btn btn-outline-secondary\",attrs:{\"tabindex\":\"-1\",\"type\":\"button\"}},[_c('i',{staticClass:\"far fa-trash-alt\"})])])}]\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionNotes.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionNotes.vue?vue&type=script&lang=js&\"","\n\n\n\n \n\n \n\n\n\n","import { render, staticRenderFns } from \"./TransactionNotes.vue?vue&type=template&id=10b3ae7a&scoped=true&\"\nimport script from \"./TransactionNotes.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionNotes.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"10b3ae7a\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.showField)?_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.notes'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"input-group\"},[_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.notes),expression:\"notes\"}],class:_vm.errors.length > 0 ? 'form-control is-invalid' : 'form-control',attrs:{\"placeholder\":_vm.$t('firefly.notes')},domProps:{\"value\":(_vm.notes)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.notes=$event.target.value}}})])]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n \n
\n \n
\n
\n
\n \n
\n
\n
\n
\n
\n Use this form to search for transactions you wish to link to this one. When in doubt, use id:*
where the ID is the number from\n the URL.\n
\n
\n
\n
\n
\n
\n
\n
0\">Search results \n
\n
\n
\n
\n
\n \n
\n
\n
\n
\n \n\n\n","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionLinks.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionLinks.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./TransactionLinks.vue?vue&type=template&id=24d1cc58&\"\nimport script from \"./TransactionLinks.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionLinks.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.showField)?_c('div',[_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.journal_links'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col\"},[(_vm.links.length === 0)?_c('p',[_c('button',{staticClass:\"btn btn-default btn-xs\",attrs:{\"data-target\":\"#linkModal\",\"data-toggle\":\"modal\"},on:{\"click\":_vm.resetModal}},[_c('i',{staticClass:\"fas fa-plus\"}),_vm._v(\" Add transaction link\")])]):_vm._e(),_vm._v(\" \"),(_vm.links.length > 0)?_c('ul',{staticClass:\"list-group\"},_vm._l((_vm.links),function(transaction,index){return _c('li',{key:index,staticClass:\"list-group-item\"},[_c('em',[_vm._v(_vm._s(_vm.getTextForLinkType(transaction.link_type_id)))]),_vm._v(\" \"),_c('a',{attrs:{\"href\":\"./transaction/show/\" + transaction.transaction_group_id}},[_vm._v(_vm._s(transaction.description))]),_vm._v(\" \"),(transaction.type === 'withdrawal')?_c('span',[_vm._v(\"\\n (\"),_c('span',{staticClass:\"text-danger\"},[_vm._v(_vm._s(Intl.NumberFormat(_vm.locale, {\n style: 'currency',\n currency: transaction.currency_code\n }).format(parseFloat(transaction.amount) * -1)))]),_vm._v(\")\\n \")]):_vm._e(),_vm._v(\" \"),(transaction.type === 'deposit')?_c('span',[_vm._v(\"\\n (\"),_c('span',{staticClass:\"text-success\"},[_vm._v(_vm._s(Intl.NumberFormat(_vm.locale, {\n style: 'currency',\n currency: transaction.currency_code\n }).format(parseFloat(transaction.amount))))]),_vm._v(\")\\n \")]):_vm._e(),_vm._v(\" \"),(transaction.type === 'transfer')?_c('span',[_vm._v(\"\\n (\"),_c('span',{staticClass:\"text-info\"},[_vm._v(_vm._s(Intl.NumberFormat(_vm.locale, {\n style: 'currency',\n currency: transaction.currency_code\n }).format(parseFloat(transaction.amount))))]),_vm._v(\")\\n \")]):_vm._e(),_vm._v(\" \"),_c('div',{staticClass:\"btn-group btn-group-xs float-right\"},[_c('button',{staticClass:\"btn btn-xs btn-danger\",attrs:{\"tabindex\":\"-1\"},on:{\"click\":function($event){return _vm.removeLink(index)}}},[_c('i',{staticClass:\"far fa-trash-alt\"})])])])}),0):_vm._e(),_vm._v(\" \"),(_vm.links.length > 0)?_c('div',{staticClass:\"form-text\"},[_c('button',{staticClass:\"btn btn-default\",attrs:{\"data-target\":\"#linkModal\",\"data-toggle\":\"modal\"},on:{\"click\":_vm.resetModal}},[_c('i',{staticClass:\"fas fa-plus\"})])]):_vm._e()])])]),_vm._v(\" \"),_c('div',{ref:\"linkModal\",staticClass:\"modal\",attrs:{\"id\":\"linkModal\",\"tabindex\":\"-1\"}},[_c('div',{staticClass:\"modal-dialog modal-lg\"},[_c('div',{staticClass:\"modal-content\"},[_vm._m(0),_vm._v(\" \"),_c('div',{staticClass:\"modal-body\"},[_c('div',{staticClass:\"container-fluid\"},[_vm._m(1),_vm._v(\" \"),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col\"},[_c('form',{on:{\"submit\":function($event){$event.preventDefault();return _vm.search($event)}}},[_c('div',{staticClass:\"input-group\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.query),expression:\"query\"}],staticClass:\"form-control\",attrs:{\"id\":\"query\",\"autocomplete\":\"off\",\"maxlength\":\"255\",\"name\":\"search\",\"placeholder\":\"Search query\",\"type\":\"text\"},domProps:{\"value\":(_vm.query)},on:{\"input\":function($event){if($event.target.composing){ return; }_vm.query=$event.target.value}}}),_vm._v(\" \"),_vm._m(2)])])])]),_vm._v(\" \"),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col\"},[(_vm.searching)?_c('span',[_c('i',{staticClass:\"fas fa-spinner fa-spin\"})]):_vm._e(),_vm._v(\" \"),(_vm.searchResults.length > 0)?_c('h4',[_vm._v(\"Search results\")]):_vm._e(),_vm._v(\" \"),(_vm.searchResults.length > 0)?_c('table',{staticClass:\"table table-sm\"},[_vm._m(3),_vm._v(\" \"),_c('tbody',_vm._l((_vm.searchResults),function(result){return _c('tr',[_c('td',[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(result.selected),expression:\"result.selected\"}],staticClass:\"form-control\",attrs:{\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(result.selected)?_vm._i(result.selected,null)>-1:(result.selected)},on:{\"change\":[function($event){var $$a=result.selected,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(result, \"selected\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(result, \"selected\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(result, \"selected\", $$c)}},function($event){return _vm.selectTransaction($event)}]}})]),_vm._v(\" \"),_c('td',[_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(result.link_type_id),expression:\"result.link_type_id\"}],staticClass:\"form-control\",on:{\"change\":[function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.$set(result, \"link_type_id\", $event.target.multiple ? $$selectedVal : $$selectedVal[0])},function($event){return _vm.selectLinkType($event)}]}},_vm._l((_vm.linkTypes),function(linkType){return _c('option',{attrs:{\"label\":linkType.type},domProps:{\"value\":linkType.id + '-' + linkType.direction}},[_vm._v(_vm._s(linkType.type)+\"\\n \")])}),0)]),_vm._v(\" \"),_c('td',[_c('a',{attrs:{\"href\":'./transactions/show/' + result.transaction_group_id}},[_vm._v(_vm._s(result.description))]),_vm._v(\" \"),(result.type === 'withdrawal')?_c('span',[_vm._v(\"\\n (\"),_c('span',{staticClass:\"text-danger\"},[_vm._v(_vm._s(Intl.NumberFormat(_vm.locale, {\n style: 'currency',\n currency: result.currency_code\n }).format(parseFloat(result.amount) * -1)))]),_vm._v(\")\\n \")]):_vm._e(),_vm._v(\" \"),(result.type === 'deposit')?_c('span',[_vm._v(\"\\n (\"),_c('span',{staticClass:\"text-success\"},[_vm._v(_vm._s(Intl.NumberFormat(_vm.locale, {\n style: 'currency',\n currency: result.currency_code\n }).format(parseFloat(result.amount))))]),_vm._v(\")\\n \")]):_vm._e(),_vm._v(\" \"),(result.type === 'transfer')?_c('span',[_vm._v(\"\\n (\"),_c('span',{staticClass:\"text-info\"},[_vm._v(_vm._s(Intl.NumberFormat(_vm.locale, {\n style: 'currency',\n currency: result.currency_code\n }).format(parseFloat(result.amount))))]),_vm._v(\")\\n \")]):_vm._e(),_vm._v(\" \"),_c('br'),_vm._v(\" \"),_c('em',[_c('a',{attrs:{\"href\":'./accounts/show/' + result.source_id}},[_vm._v(_vm._s(result.source_name))]),_vm._v(\"\\n →\\n \"),_c('a',{attrs:{\"href\":'./accounts/show/' + result.destination_id}},[_vm._v(_vm._s(result.destination_name))])])])])}),0)]):_vm._e()])])])]),_vm._v(\" \"),_vm._m(4)])])])]):_vm._e()}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"modal-header\"},[_c('h5',{staticClass:\"modal-title\"},[_vm._v(\"Transaction thing dialog.\")]),_vm._v(\" \"),_c('button',{staticClass:\"close\",attrs:{\"aria-label\":\"Close\",\"data-dismiss\":\"modal\",\"type\":\"button\"}},[_c('span',{attrs:{\"aria-hidden\":\"true\"}},[_vm._v(\"×\")])])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col\"},[_c('p',[_vm._v(\"\\n Use this form to search for transactions you wish to link to this one. When in doubt, use \"),_c('code',[_vm._v(\"id:*\")]),_vm._v(\" where the ID is the number from\\n the URL.\\n \")])])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"input-group-append\"},[_c('button',{staticClass:\"btn btn-default\",attrs:{\"type\":\"submit\"}},[_c('i',{staticClass:\"fas fa-search\"}),_vm._v(\" Search\")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('thead',[_c('tr',[_c('th',{staticStyle:{\"width\":\"33%\"},attrs:{\"colspan\":\"2\"}},[_vm._v(\"Include?\")]),_vm._v(\" \"),_c('th',[_vm._v(\"Transaction\")])])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"modal-footer\"},[_c('button',{staticClass:\"btn btn-secondary\",attrs:{\"data-dismiss\":\"modal\",\"type\":\"button\"}},[_vm._v(\"Close\")])])}]\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionAttachments.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionAttachments.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n\n\n","import { render, staticRenderFns } from \"./TransactionAttachments.vue?vue&type=template&id=c0a65b6c&scoped=true&\"\nimport script from \"./TransactionAttachments.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionAttachments.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"c0a65b6c\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.showField)?_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.attachments'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticClass:\"input-group\"},[_c('input',{ref:\"att\",staticClass:\"form-control\",attrs:{\"multiple\":\"\",\"name\":\"attachments[]\",\"type\":\"file\"},on:{\"change\":_vm.selectedFile}})])]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import { setOptions, CRS, latLng, latLngBounds, map, DomEvent } from 'leaflet';\n\nvar debounce = function (fn, time) {\n var timeout;\n\n var debouncedFunction = function() {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var context = this;\n if (timeout) {\n clearTimeout(timeout);\n }\n timeout = setTimeout(function () {\n fn.apply(context, args);\n timeout = null;\n }, time);\n };\n\n debouncedFunction.cancel = function() {\n if (timeout) {\n clearTimeout(timeout);\n }\n };\n\n return debouncedFunction;\n};\n\nvar capitalizeFirstLetter = function (string) {\n if (!string || typeof string.charAt !== 'function') {\n return string;\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n};\n\nvar propsBinder = function (vueElement, leafletElement, props, options) {\n var loop = function ( key ) {\n var setMethodName = 'set' + capitalizeFirstLetter(key);\n var deepValue =\n props[key].type === Object ||\n props[key].type === Array ||\n Array.isArray(props[key].type);\n if (props[key].custom && vueElement[setMethodName]) {\n vueElement.$watch(\n key,\n function (newVal, oldVal) {\n vueElement[setMethodName](newVal, oldVal);\n },\n {\n deep: deepValue,\n }\n );\n } else if (setMethodName === 'setOptions') {\n vueElement.$watch(\n key,\n function (newVal, oldVal) {\n setOptions(leafletElement, newVal);\n },\n {\n deep: deepValue,\n }\n );\n } else if (leafletElement[setMethodName]) {\n vueElement.$watch(\n key,\n function (newVal, oldVal) {\n leafletElement[setMethodName](newVal);\n },\n {\n deep: deepValue,\n }\n );\n }\n };\n\n for (var key in props) loop( key );\n};\n\nvar collectionCleaner = function (options) {\n var result = {};\n for (var key in options) {\n var value = options[key];\n if (value !== null && value !== undefined) {\n result[key] = value;\n }\n }\n return result;\n};\n\nvar optionsMerger = function (props, instance) {\n var options =\n instance.options && instance.options.constructor === Object\n ? instance.options\n : {};\n props = props && props.constructor === Object ? props : {};\n var result = collectionCleaner(options);\n props = collectionCleaner(props);\n var defaultProps = instance.$options.props;\n for (var key in props) {\n var def = defaultProps[key]\n ? defaultProps[key].default &&\n typeof defaultProps[key].default === 'function'\n ? defaultProps[key].default.call()\n : defaultProps[key].default\n : Symbol('unique');\n var isEqual = false;\n if (Array.isArray(def)) {\n isEqual = JSON.stringify(def) === JSON.stringify(props[key]);\n } else {\n isEqual = def === props[key];\n }\n if (result[key] && !isEqual) {\n console.warn(\n (key + \" props is overriding the value passed in the options props\")\n );\n result[key] = props[key];\n } else if (!result[key]) {\n result[key] = props[key];\n }\n }\n return result;\n};\n\nvar Options = {\n props: {\n /**\n * Leaflet options to pass to the component constructor\n */\n options: {\n type: Object,\n default: function () { return ({}); }\n }\n }\n};\n\n//\n\n/**\n * Base component, contains and wrap all the other components.\n */\nvar script = {\n name: 'LMap',\n mixins: [Options],\n props: {\n /**\n * The center of the map, supports .sync modifier\n */\n center: {\n type: [Object, Array],\n custom: true,\n default: function () { return [0, 0]; },\n },\n /**\n * The bounds of the map, supports .sync modifier\n */\n bounds: {\n type: [Array, Object],\n custom: true,\n default: null,\n },\n /**\n * The max bounds of the map\n */\n maxBounds: {\n type: [Array, Object],\n default: null,\n },\n /**\n * The zoom of the map, supports .sync modifier\n */\n zoom: {\n type: Number,\n custom: true,\n default: 0,\n },\n /**\n * The minZoom of the map\n */\n minZoom: {\n type: Number,\n default: null,\n },\n /**\n * The maxZoom of the map\n */\n maxZoom: {\n type: Number,\n default: null,\n },\n /**\n * The paddingBottomRight of the map\n */\n paddingBottomRight: {\n type: Array,\n custom: true,\n default: null,\n },\n /**\n * The paddingTopLeft of the map\n */\n paddingTopLeft: {\n type: Array,\n custom: true,\n default: null,\n },\n /**\n * The padding of the map\n */\n padding: {\n type: Array,\n custom: true,\n default: null,\n },\n /**\n * The worldCopyJump option for the map\n */\n worldCopyJump: {\n type: Boolean,\n default: false,\n },\n /**\n * The crs option for the map\n * @values CRS.EPSG3857\n */\n crs: {\n type: Object,\n custom: true,\n default: function () { return CRS.EPSG3857; },\n },\n maxBoundsViscosity: {\n type: Number,\n default: null,\n },\n inertia: {\n type: Boolean,\n default: null,\n },\n inertiaDeceleration: {\n type: Number,\n default: null,\n },\n inertiaMaxSpeed: {\n type: Number,\n default: null,\n },\n easeLinearity: {\n type: Number,\n default: null,\n },\n zoomAnimation: {\n type: Boolean,\n default: null,\n },\n zoomAnimationThreshold: {\n type: Number,\n default: null,\n },\n fadeAnimation: {\n type: Boolean,\n default: null,\n },\n markerZoomAnimation: {\n type: Boolean,\n default: null,\n },\n noBlockingAnimations: {\n type: Boolean,\n default: false,\n },\n },\n data: function data() {\n return {\n ready: false,\n lastSetCenter: this.center ? latLng(this.center) : null,\n lastSetBounds: this.bounds ? latLngBounds(this.bounds) : null,\n layerControl: undefined,\n layersToAdd: [],\n layersInControl: [],\n };\n },\n computed: {\n fitBoundsOptions: function fitBoundsOptions() {\n var options = {\n animate: this.noBlockingAnimations ? false : null,\n };\n if (this.padding) {\n options.padding = this.padding;\n } else {\n if (this.paddingBottomRight) {\n options.paddingBottomRight = this.paddingBottomRight;\n }\n if (this.paddingTopLeft) {\n options.paddingTopLeft = this.paddingTopLeft;\n }\n }\n return options;\n },\n },\n beforeDestroy: function beforeDestroy() {\n if (this.debouncedMoveEndHandler) {\n this.debouncedMoveEndHandler.cancel();\n }\n\n if (this.mapObject) {\n this.mapObject.remove();\n }\n },\n mounted: function mounted() {\n var this$1 = this;\n\n var options = optionsMerger(\n {\n minZoom: this.minZoom,\n maxZoom: this.maxZoom,\n maxBounds: this.maxBounds,\n maxBoundsViscosity: this.maxBoundsViscosity,\n worldCopyJump: this.worldCopyJump,\n crs: this.crs,\n center: this.center,\n zoom: this.zoom,\n inertia: this.inertia,\n inertiaDeceleration: this.inertiaDeceleration,\n inertiaMaxSpeed: this.inertiaMaxSpeed,\n easeLinearity: this.easeLinearity,\n zoomAnimation: this.zoomAnimation,\n zoomAnimationThreshold: this.zoomAnimationThreshold,\n fadeAnimation: this.fadeAnimation,\n markerZoomAnimation: this.markerZoomAnimation,\n },\n this\n );\n this.mapObject = map(this.$el, options);\n if (this.bounds) {\n this.mapObject.fitBounds(this.bounds);\n }\n this.debouncedMoveEndHandler = debounce(this.moveEndHandler, 100);\n this.mapObject.on('moveend', this.debouncedMoveEndHandler);\n this.mapObject.on('overlayadd', this.overlayAddHandler);\n this.mapObject.on('overlayremove', this.overlayRemoveHandler);\n DomEvent.on(this.mapObject, this.$listeners);\n propsBinder(this, this.mapObject, this.$options.props);\n this.ready = true;\n /**\n * DEPRECATED event\n * @deprecated\n */\n this.$emit('leaflet:load');\n this.$nextTick(function () {\n /**\n * Triggers when the component is ready\n * @type {object}\n * @property {object} mapObject - reference to leaflet map object\n */\n this$1.$emit('ready', this$1.mapObject);\n });\n },\n methods: {\n registerLayerControl: function registerLayerControl(lControlLayers) {\n var this$1 = this;\n\n this.layerControl = lControlLayers;\n this.mapObject.addControl(lControlLayers.mapObject);\n this.layersToAdd.forEach(function (layer) {\n this$1.layerControl.addLayer(layer);\n });\n this.layersToAdd = [];\n },\n addLayer: function addLayer(layer, alreadyAdded) {\n if (layer.layerType !== undefined) {\n if (this.layerControl === undefined) {\n this.layersToAdd.push(layer);\n } else {\n var exist = this.layersInControl.find(\n function (l) { return l.mapObject._leaflet_id === layer.mapObject._leaflet_id; }\n );\n if (!exist) {\n this.layerControl.addLayer(layer);\n this.layersInControl.push(layer);\n }\n }\n }\n if (!alreadyAdded && layer.visible !== false) {\n this.mapObject.addLayer(layer.mapObject);\n }\n },\n hideLayer: function hideLayer(layer) {\n this.mapObject.removeLayer(layer.mapObject);\n },\n removeLayer: function removeLayer(layer, alreadyRemoved) {\n if (layer.layerType !== undefined) {\n if (this.layerControl === undefined) {\n this.layersToAdd = this.layersToAdd.filter(\n function (l) { return l.name !== layer.name; }\n );\n } else {\n this.layerControl.removeLayer(layer);\n this.layersInControl = this.layersInControl.filter(\n function (l) { return l.mapObject._leaflet_id !== layer.mapObject._leaflet_id; }\n );\n }\n }\n if (!alreadyRemoved) {\n this.mapObject.removeLayer(layer.mapObject);\n }\n },\n setZoom: function setZoom(newVal, oldVal) {\n if (newVal === undefined || newVal === null) { return; }\n this.mapObject.setZoom(newVal, {\n animate: this.noBlockingAnimations ? false : null,\n });\n this.cacheMapView();\n },\n setCenter: function setCenter(newVal, oldVal) {\n if (newVal == null) {\n return;\n }\n var newCenter = latLng(newVal);\n var oldCenter = this.lastSetCenter || this.mapObject.getCenter();\n if (oldCenter.lat !== newCenter.lat || oldCenter.lng !== newCenter.lng) {\n this.lastSetCenter = newCenter;\n this.mapObject.panTo(newCenter, {\n animate: this.noBlockingAnimations ? false : null,\n });\n this.cacheMapView(undefined, newCenter);\n }\n },\n setBounds: function setBounds(newVal, oldVal) {\n if (!newVal) {\n return;\n }\n var newBounds = latLngBounds(newVal);\n if (!newBounds.isValid()) {\n return;\n }\n var oldBounds = this.lastSetBounds || this.mapObject.getBounds();\n var boundsChanged = !oldBounds.equals(newBounds, 0); // set maxMargin to 0 - check exact equals\n if (boundsChanged) {\n this.mapObject.fitBounds(newBounds, this.fitBoundsOptions);\n this.cacheMapView(newBounds);\n }\n },\n setPaddingBottomRight: function setPaddingBottomRight(newVal, oldVal) {\n this.paddingBottomRight = newVal;\n },\n setPaddingTopLeft: function setPaddingTopLeft(newVal, oldVal) {\n this.paddingTopLeft = newVal;\n },\n setPadding: function setPadding(newVal, oldVal) {\n this.padding = newVal;\n },\n setCrs: function setCrs(newVal, oldVal) {\n var mapObject = this.mapObject,\n prevBounds = mapObject.getBounds();\n mapObject.options.crs = newVal;\n mapObject.fitBounds(prevBounds, { animate: false, padding: [0, 0] });\n },\n fitBounds: function fitBounds(bounds) {\n this.mapObject.fitBounds(bounds, {\n animate: this.noBlockingAnimations ? false : null,\n });\n },\n moveEndHandler: function moveEndHandler() {\n /**\n * Triggers when zoom is updated\n * @type {number,string}\n */\n this.$emit('update:zoom', this.mapObject.getZoom());\n var center = this.mapObject.getCenter();\n /**\n * Triggers when center is updated\n * @type {object,array}\n */\n this.$emit('update:center', center);\n var bounds = this.mapObject.getBounds();\n /**\n * Triggers when bounds are updated\n * @type {object}\n */\n this.$emit('update:bounds', bounds);\n },\n overlayAddHandler: function overlayAddHandler(e) {\n var layer = this.layersInControl.find(function (l) { return l.name === e.name; });\n if (layer) {\n layer.updateVisibleProp(true);\n }\n },\n overlayRemoveHandler: function overlayRemoveHandler(e) {\n var layer = this.layersInControl.find(function (l) { return l.name === e.name; });\n if (layer) {\n layer.updateVisibleProp(false);\n }\n },\n cacheMapView: function cacheMapView(bounds, center) {\n // Cache the last values used to define the map view by mutating props.\n this.lastSetBounds = bounds || this.mapObject.getBounds();\n this.lastSetCenter = center || this.lastSetBounds.getCenter();\n },\n },\n};\n\nfunction normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {\r\n if (typeof shadowMode !== 'boolean') {\r\n createInjectorSSR = createInjector;\r\n createInjector = shadowMode;\r\n shadowMode = false;\r\n }\r\n // Vue.extend constructor export interop.\r\n var options = typeof script === 'function' ? script.options : script;\r\n // render functions\r\n if (template && template.render) {\r\n options.render = template.render;\r\n options.staticRenderFns = template.staticRenderFns;\r\n options._compiled = true;\r\n // functional template\r\n if (isFunctionalTemplate) {\r\n options.functional = true;\r\n }\r\n }\r\n // scopedId\r\n if (scopeId) {\r\n options._scopeId = scopeId;\r\n }\r\n var hook;\r\n if (moduleIdentifier) {\r\n // server build\r\n hook = function (context) {\r\n // 2.3 injection\r\n context =\r\n context || // cached call\r\n (this.$vnode && this.$vnode.ssrContext) || // stateful\r\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional\r\n // 2.2 with runInNewContext: true\r\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\r\n context = __VUE_SSR_CONTEXT__;\r\n }\r\n // inject component styles\r\n if (style) {\r\n style.call(this, createInjectorSSR(context));\r\n }\r\n // register component module identifier for async chunk inference\r\n if (context && context._registeredComponents) {\r\n context._registeredComponents.add(moduleIdentifier);\r\n }\r\n };\r\n // used by ssr in case component is cached and beforeCreate\r\n // never gets called\r\n options._ssrRegister = hook;\r\n }\r\n else if (style) {\r\n hook = shadowMode\r\n ? function (context) {\r\n style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));\r\n }\r\n : function (context) {\r\n style.call(this, createInjector(context));\r\n };\r\n }\r\n if (hook) {\r\n if (options.functional) {\r\n // register for functional component in vue file\r\n var originalRender = options.render;\r\n options.render = function renderWithStyleInjection(h, context) {\r\n hook.call(context);\r\n return originalRender(h, context);\r\n };\r\n }\r\n else {\r\n // inject component registration as beforeCreate hook\r\n var existing = options.beforeCreate;\r\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook];\r\n }\r\n }\r\n return script;\r\n}\n\nvar isOldIE = typeof navigator !== 'undefined' &&\r\n /msie [6-9]\\\\b/.test(navigator.userAgent.toLowerCase());\r\nfunction createInjector(context) {\r\n return function (id, style) { return addStyle(id, style); };\r\n}\r\nvar HEAD;\r\nvar styles = {};\r\nfunction addStyle(id, css) {\r\n var group = isOldIE ? css.media || 'default' : id;\r\n var style = styles[group] || (styles[group] = { ids: new Set(), styles: [] });\r\n if (!style.ids.has(id)) {\r\n style.ids.add(id);\r\n var code = css.source;\r\n if (css.map) {\r\n // https://developer.chrome.com/devtools/docs/javascript-debugging\r\n // this makes source maps inside style tags work properly in Chrome\r\n code += '\\n/*# sourceURL=' + css.map.sources[0] + ' */';\r\n // http://stackoverflow.com/a/26603875\r\n code +=\r\n '\\n/*# sourceMappingURL=data:application/json;base64,' +\r\n btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) +\r\n ' */';\r\n }\r\n if (!style.element) {\r\n style.element = document.createElement('style');\r\n style.element.type = 'text/css';\r\n if (css.media)\r\n { style.element.setAttribute('media', css.media); }\r\n if (HEAD === undefined) {\r\n HEAD = document.head || document.getElementsByTagName('head')[0];\r\n }\r\n HEAD.appendChild(style.element);\r\n }\r\n if ('styleSheet' in style.element) {\r\n style.styles.push(code);\r\n style.element.styleSheet.cssText = style.styles\r\n .filter(Boolean)\r\n .join('\\n');\r\n }\r\n else {\r\n var index = style.ids.size - 1;\r\n var textNode = document.createTextNode(code);\r\n var nodes = style.element.childNodes;\r\n if (nodes[index])\r\n { style.element.removeChild(nodes[index]); }\r\n if (nodes.length)\r\n { style.element.insertBefore(textNode, nodes[index]); }\r\n else\r\n { style.element.appendChild(textNode); }\r\n }\r\n }\r\n}\n\n/* script */\nvar __vue_script__ = script;\n\n/* template */\nvar __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"vue2leaflet-map\"},[(_vm.ready)?_vm._t(\"default\"):_vm._e()],2)};\nvar __vue_staticRenderFns__ = [];\n\n /* style */\n var __vue_inject_styles__ = function (inject) {\n if (!inject) { return }\n inject(\"data-v-64f90fd7_0\", { source: \".vue2leaflet-map{height:100%;width:100%}\", map: undefined, media: undefined });\n\n };\n /* scoped */\n var __vue_scope_id__ = undefined;\n /* module identifier */\n var __vue_module_identifier__ = undefined;\n /* functional template */\n var __vue_is_functional_template__ = false;\n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__ = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },\n __vue_inject_styles__,\n __vue_script__,\n __vue_scope_id__,\n __vue_is_functional_template__,\n __vue_module_identifier__,\n false,\n createInjector,\n undefined,\n undefined\n );\n\nexport default __vue_component__;\n","import { setOptions, tileLayer, DomEvent } from 'leaflet';\n\nvar capitalizeFirstLetter = function (string) {\n if (!string || typeof string.charAt !== 'function') {\n return string;\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n};\n\nvar propsBinder = function (vueElement, leafletElement, props, options) {\n var loop = function ( key ) {\n var setMethodName = 'set' + capitalizeFirstLetter(key);\n var deepValue =\n props[key].type === Object ||\n props[key].type === Array ||\n Array.isArray(props[key].type);\n if (props[key].custom && vueElement[setMethodName]) {\n vueElement.$watch(\n key,\n function (newVal, oldVal) {\n vueElement[setMethodName](newVal, oldVal);\n },\n {\n deep: deepValue,\n }\n );\n } else if (setMethodName === 'setOptions') {\n vueElement.$watch(\n key,\n function (newVal, oldVal) {\n setOptions(leafletElement, newVal);\n },\n {\n deep: deepValue,\n }\n );\n } else if (leafletElement[setMethodName]) {\n vueElement.$watch(\n key,\n function (newVal, oldVal) {\n leafletElement[setMethodName](newVal);\n },\n {\n deep: deepValue,\n }\n );\n }\n };\n\n for (var key in props) loop( key );\n};\n\nvar collectionCleaner = function (options) {\n var result = {};\n for (var key in options) {\n var value = options[key];\n if (value !== null && value !== undefined) {\n result[key] = value;\n }\n }\n return result;\n};\n\nvar optionsMerger = function (props, instance) {\n var options =\n instance.options && instance.options.constructor === Object\n ? instance.options\n : {};\n props = props && props.constructor === Object ? props : {};\n var result = collectionCleaner(options);\n props = collectionCleaner(props);\n var defaultProps = instance.$options.props;\n for (var key in props) {\n var def = defaultProps[key]\n ? defaultProps[key].default &&\n typeof defaultProps[key].default === 'function'\n ? defaultProps[key].default.call()\n : defaultProps[key].default\n : Symbol('unique');\n var isEqual = false;\n if (Array.isArray(def)) {\n isEqual = JSON.stringify(def) === JSON.stringify(props[key]);\n } else {\n isEqual = def === props[key];\n }\n if (result[key] && !isEqual) {\n console.warn(\n (key + \" props is overriding the value passed in the options props\")\n );\n result[key] = props[key];\n } else if (!result[key]) {\n result[key] = props[key];\n }\n }\n return result;\n};\n\nvar findRealParent = function (firstVueParent) {\n var found = false;\n while (firstVueParent && !found) {\n if (firstVueParent.mapObject === undefined) {\n firstVueParent = firstVueParent.$parent;\n } else {\n found = true;\n }\n }\n return firstVueParent;\n};\n\nvar Layer = {\n props: {\n pane: {\n type: String,\n default: 'overlayPane',\n },\n attribution: {\n type: String,\n default: null,\n custom: true,\n },\n name: {\n type: String,\n custom: true,\n default: undefined,\n },\n layerType: {\n type: String,\n custom: true,\n default: undefined,\n },\n visible: {\n type: Boolean,\n custom: true,\n default: true,\n },\n },\n mounted: function mounted() {\n this.layerOptions = {\n attribution: this.attribution,\n pane: this.pane,\n };\n },\n beforeDestroy: function beforeDestroy() {\n this.unbindPopup();\n this.unbindTooltip();\n this.parentContainer.removeLayer(this);\n },\n methods: {\n setAttribution: function setAttribution(val, old) {\n var attributionControl = this.$parent.mapObject.attributionControl;\n attributionControl.removeAttribution(old).addAttribution(val);\n },\n setName: function setName() {\n this.parentContainer.removeLayer(this);\n if (this.visible) {\n this.parentContainer.addLayer(this);\n }\n },\n setLayerType: function setLayerType() {\n this.parentContainer.removeLayer(this);\n if (this.visible) {\n this.parentContainer.addLayer(this);\n }\n },\n setVisible: function setVisible(isVisible) {\n if (this.mapObject) {\n if (isVisible) {\n this.parentContainer.addLayer(this);\n } else {\n if (this.parentContainer.hideLayer) {\n this.parentContainer.hideLayer(this);\n } else {\n this.parentContainer.removeLayer(this);\n }\n }\n }\n },\n unbindTooltip: function unbindTooltip() {\n var tooltip = this.mapObject ? this.mapObject.getTooltip() : null;\n if (tooltip) {\n tooltip.unbindTooltip();\n }\n },\n unbindPopup: function unbindPopup() {\n var popup = this.mapObject ? this.mapObject.getPopup() : null;\n if (popup) {\n popup.unbindPopup();\n }\n },\n updateVisibleProp: function updateVisibleProp(value) {\n /**\n * Triggers when the visible prop needs to be updated\n * @type {boolean}\n * @property {boolean} value - value of the visible property\n */\n this.$emit('update:visible', value);\n },\n },\n};\n\nvar GridLayer = {\n mixins: [Layer],\n props: {\n pane: {\n type: String,\n default: 'tilePane'\n },\n opacity: {\n type: Number,\n custom: false,\n default: 1.0\n },\n zIndex: {\n type: Number,\n default: 1\n },\n tileSize: {\n type: Number,\n default: 256\n },\n noWrap: {\n type: Boolean,\n default: false\n }\n },\n mounted: function mounted () {\n this.gridLayerOptions = Object.assign({}, this.layerOptions,\n {pane: this.pane,\n opacity: this.opacity,\n zIndex: this.zIndex,\n tileSize: this.tileSize,\n noWrap: this.noWrap});\n }\n};\n\nvar TileLayerMixin = {\n mixins: [GridLayer],\n props: {\n tms: {\n type: Boolean,\n default: false,\n },\n subdomains: {\n type: [String, Array],\n default: 'abc',\n validator: function (prop) {\n if (typeof prop === 'string') { return true; }\n // Validates array that array only contains only strings\n if (Array.isArray(prop)) {\n return prop.every(function (subdomain) { return typeof subdomain === 'string'; });\n }\n return false;\n },\n },\n detectRetina: {\n type: Boolean,\n default: false,\n },\n },\n mounted: function mounted() {\n this.tileLayerOptions = Object.assign({}, this.gridLayerOptions,\n {tms: this.tms,\n subdomains: this.subdomains,\n detectRetina: this.detectRetina});\n },\n render: function render() {\n return null;\n },\n};\n\nvar Options = {\n props: {\n /**\n * Leaflet options to pass to the component constructor\n */\n options: {\n type: Object,\n default: function () { return ({}); }\n }\n }\n};\n\n//\n\n/**\n * Load tiles from a map server and display them accordingly to map zoom, center and size\n */\nvar script = {\n name: 'LTileLayer',\n mixins: [TileLayerMixin, Options],\n props: {\n url: {\n type: String,\n default: null,\n },\n tileLayerClass: {\n type: Function,\n default: tileLayer,\n },\n },\n mounted: function mounted() {\n var this$1 = this;\n\n var options = optionsMerger(this.tileLayerOptions, this);\n this.mapObject = this.tileLayerClass(this.url, options);\n DomEvent.on(this.mapObject, this.$listeners);\n propsBinder(this, this.mapObject, this.$options.props);\n this.parentContainer = findRealParent(this.$parent);\n this.parentContainer.addLayer(this, !this.visible);\n this.$nextTick(function () {\n /**\n * Triggers when the component is ready\n * @type {object}\n * @property {object} mapObject - reference to leaflet map object\n */\n this$1.$emit('ready', this$1.mapObject);\n });\n },\n};\n\nfunction normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {\r\n if (typeof shadowMode !== 'boolean') {\r\n createInjectorSSR = createInjector;\r\n createInjector = shadowMode;\r\n shadowMode = false;\r\n }\r\n // Vue.extend constructor export interop.\r\n var options = typeof script === 'function' ? script.options : script;\r\n // render functions\r\n if (template && template.render) {\r\n options.render = template.render;\r\n options.staticRenderFns = template.staticRenderFns;\r\n options._compiled = true;\r\n // functional template\r\n if (isFunctionalTemplate) {\r\n options.functional = true;\r\n }\r\n }\r\n // scopedId\r\n if (scopeId) {\r\n options._scopeId = scopeId;\r\n }\r\n var hook;\r\n if (moduleIdentifier) {\r\n // server build\r\n hook = function (context) {\r\n // 2.3 injection\r\n context =\r\n context || // cached call\r\n (this.$vnode && this.$vnode.ssrContext) || // stateful\r\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional\r\n // 2.2 with runInNewContext: true\r\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\r\n context = __VUE_SSR_CONTEXT__;\r\n }\r\n // inject component styles\r\n if (style) {\r\n style.call(this, createInjectorSSR(context));\r\n }\r\n // register component module identifier for async chunk inference\r\n if (context && context._registeredComponents) {\r\n context._registeredComponents.add(moduleIdentifier);\r\n }\r\n };\r\n // used by ssr in case component is cached and beforeCreate\r\n // never gets called\r\n options._ssrRegister = hook;\r\n }\r\n else if (style) {\r\n hook = shadowMode\r\n ? function (context) {\r\n style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));\r\n }\r\n : function (context) {\r\n style.call(this, createInjector(context));\r\n };\r\n }\r\n if (hook) {\r\n if (options.functional) {\r\n // register for functional component in vue file\r\n var originalRender = options.render;\r\n options.render = function renderWithStyleInjection(h, context) {\r\n hook.call(context);\r\n return originalRender(h, context);\r\n };\r\n }\r\n else {\r\n // inject component registration as beforeCreate hook\r\n var existing = options.beforeCreate;\r\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook];\r\n }\r\n }\r\n return script;\r\n}\n\n/* script */\nvar __vue_script__ = script;\n\n/* template */\nvar __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div')};\nvar __vue_staticRenderFns__ = [];\n\n /* style */\n var __vue_inject_styles__ = undefined;\n /* scoped */\n var __vue_scope_id__ = undefined;\n /* module identifier */\n var __vue_module_identifier__ = undefined;\n /* functional template */\n var __vue_is_functional_template__ = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__ = /*#__PURE__*/normalizeComponent(\n { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },\n __vue_inject_styles__,\n __vue_script__,\n __vue_scope_id__,\n __vue_is_functional_template__,\n __vue_module_identifier__,\n false,\n undefined,\n undefined,\n undefined\n );\n\nexport default __vue_component__;\n","import { setOptions, Icon, marker, DomEvent, latLng } from 'leaflet';\n\nvar debounce = function (fn, time) {\n var timeout;\n\n var debouncedFunction = function() {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n var context = this;\n if (timeout) {\n clearTimeout(timeout);\n }\n timeout = setTimeout(function () {\n fn.apply(context, args);\n timeout = null;\n }, time);\n };\n\n debouncedFunction.cancel = function() {\n if (timeout) {\n clearTimeout(timeout);\n }\n };\n\n return debouncedFunction;\n};\n\nvar capitalizeFirstLetter = function (string) {\n if (!string || typeof string.charAt !== 'function') {\n return string;\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n};\n\nvar propsBinder = function (vueElement, leafletElement, props, options) {\n var loop = function ( key ) {\n var setMethodName = 'set' + capitalizeFirstLetter(key);\n var deepValue =\n props[key].type === Object ||\n props[key].type === Array ||\n Array.isArray(props[key].type);\n if (props[key].custom && vueElement[setMethodName]) {\n vueElement.$watch(\n key,\n function (newVal, oldVal) {\n vueElement[setMethodName](newVal, oldVal);\n },\n {\n deep: deepValue,\n }\n );\n } else if (setMethodName === 'setOptions') {\n vueElement.$watch(\n key,\n function (newVal, oldVal) {\n setOptions(leafletElement, newVal);\n },\n {\n deep: deepValue,\n }\n );\n } else if (leafletElement[setMethodName]) {\n vueElement.$watch(\n key,\n function (newVal, oldVal) {\n leafletElement[setMethodName](newVal);\n },\n {\n deep: deepValue,\n }\n );\n }\n };\n\n for (var key in props) loop( key );\n};\n\nvar collectionCleaner = function (options) {\n var result = {};\n for (var key in options) {\n var value = options[key];\n if (value !== null && value !== undefined) {\n result[key] = value;\n }\n }\n return result;\n};\n\nvar optionsMerger = function (props, instance) {\n var options =\n instance.options && instance.options.constructor === Object\n ? instance.options\n : {};\n props = props && props.constructor === Object ? props : {};\n var result = collectionCleaner(options);\n props = collectionCleaner(props);\n var defaultProps = instance.$options.props;\n for (var key in props) {\n var def = defaultProps[key]\n ? defaultProps[key].default &&\n typeof defaultProps[key].default === 'function'\n ? defaultProps[key].default.call()\n : defaultProps[key].default\n : Symbol('unique');\n var isEqual = false;\n if (Array.isArray(def)) {\n isEqual = JSON.stringify(def) === JSON.stringify(props[key]);\n } else {\n isEqual = def === props[key];\n }\n if (result[key] && !isEqual) {\n console.warn(\n (key + \" props is overriding the value passed in the options props\")\n );\n result[key] = props[key];\n } else if (!result[key]) {\n result[key] = props[key];\n }\n }\n return result;\n};\n\nvar findRealParent = function (firstVueParent) {\n var found = false;\n while (firstVueParent && !found) {\n if (firstVueParent.mapObject === undefined) {\n firstVueParent = firstVueParent.$parent;\n } else {\n found = true;\n }\n }\n return firstVueParent;\n};\n\nvar Layer = {\n props: {\n pane: {\n type: String,\n default: 'overlayPane',\n },\n attribution: {\n type: String,\n default: null,\n custom: true,\n },\n name: {\n type: String,\n custom: true,\n default: undefined,\n },\n layerType: {\n type: String,\n custom: true,\n default: undefined,\n },\n visible: {\n type: Boolean,\n custom: true,\n default: true,\n },\n },\n mounted: function mounted() {\n this.layerOptions = {\n attribution: this.attribution,\n pane: this.pane,\n };\n },\n beforeDestroy: function beforeDestroy() {\n this.unbindPopup();\n this.unbindTooltip();\n this.parentContainer.removeLayer(this);\n },\n methods: {\n setAttribution: function setAttribution(val, old) {\n var attributionControl = this.$parent.mapObject.attributionControl;\n attributionControl.removeAttribution(old).addAttribution(val);\n },\n setName: function setName() {\n this.parentContainer.removeLayer(this);\n if (this.visible) {\n this.parentContainer.addLayer(this);\n }\n },\n setLayerType: function setLayerType() {\n this.parentContainer.removeLayer(this);\n if (this.visible) {\n this.parentContainer.addLayer(this);\n }\n },\n setVisible: function setVisible(isVisible) {\n if (this.mapObject) {\n if (isVisible) {\n this.parentContainer.addLayer(this);\n } else {\n if (this.parentContainer.hideLayer) {\n this.parentContainer.hideLayer(this);\n } else {\n this.parentContainer.removeLayer(this);\n }\n }\n }\n },\n unbindTooltip: function unbindTooltip() {\n var tooltip = this.mapObject ? this.mapObject.getTooltip() : null;\n if (tooltip) {\n tooltip.unbindTooltip();\n }\n },\n unbindPopup: function unbindPopup() {\n var popup = this.mapObject ? this.mapObject.getPopup() : null;\n if (popup) {\n popup.unbindPopup();\n }\n },\n updateVisibleProp: function updateVisibleProp(value) {\n /**\n * Triggers when the visible prop needs to be updated\n * @type {boolean}\n * @property {boolean} value - value of the visible property\n */\n this.$emit('update:visible', value);\n },\n },\n};\n\nvar Options = {\n props: {\n /**\n * Leaflet options to pass to the component constructor\n */\n options: {\n type: Object,\n default: function () { return ({}); }\n }\n }\n};\n\n/**\n * Marker component, lets you add and personalize markers on the map\n */\nvar script = {\n name: 'LMarker',\n mixins: [Layer, Options],\n props: {\n pane: {\n type: String,\n default: 'markerPane',\n },\n draggable: {\n type: Boolean,\n custom: true,\n default: false,\n },\n latLng: {\n type: [Object, Array],\n custom: true,\n default: null,\n },\n icon: {\n type: [Object],\n custom: false,\n default: function () { return new Icon.Default(); },\n },\n zIndexOffset: {\n type: Number,\n custom: false,\n default: null,\n },\n },\n data: function data() {\n return {\n ready: false,\n };\n },\n beforeDestroy: function beforeDestroy() {\n if (this.debouncedLatLngSync) {\n this.debouncedLatLngSync.cancel();\n }\n },\n mounted: function mounted() {\n var this$1 = this;\n\n var options = optionsMerger(\n Object.assign({}, this.layerOptions,\n {icon: this.icon,\n zIndexOffset: this.zIndexOffset,\n draggable: this.draggable}),\n this\n );\n this.mapObject = marker(this.latLng, options);\n DomEvent.on(this.mapObject, this.$listeners);\n this.debouncedLatLngSync = debounce(this.latLngSync, 100);\n this.mapObject.on('move', this.debouncedLatLngSync);\n propsBinder(this, this.mapObject, this.$options.props);\n this.parentContainer = findRealParent(this.$parent);\n this.parentContainer.addLayer(this, !this.visible);\n this.ready = true;\n this.$nextTick(function () {\n /**\n * Triggers when the component is ready\n * @type {object}\n * @property {object} mapObject - reference to leaflet map object\n */\n this$1.$emit('ready', this$1.mapObject);\n });\n },\n methods: {\n setDraggable: function setDraggable(newVal, oldVal) {\n if (this.mapObject.dragging) {\n newVal\n ? this.mapObject.dragging.enable()\n : this.mapObject.dragging.disable();\n }\n },\n setLatLng: function setLatLng(newVal) {\n if (newVal == null) {\n return;\n }\n\n if (this.mapObject) {\n var oldLatLng = this.mapObject.getLatLng();\n var newLatLng = latLng(newVal);\n if (\n newLatLng.lat !== oldLatLng.lat ||\n newLatLng.lng !== oldLatLng.lng\n ) {\n this.mapObject.setLatLng(newLatLng);\n }\n }\n },\n latLngSync: function latLngSync(event) {\n this.$emit('update:latLng', event.latlng);\n this.$emit('update:lat-lng', event.latlng);\n },\n },\n render: function(h) {\n if (this.ready && this.$slots.default) {\n return h('div', { style: { display: 'none' } }, this.$slots.default);\n }\n return null;\n },\n};\n\nfunction normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {\r\n if (typeof shadowMode !== 'boolean') {\r\n createInjectorSSR = createInjector;\r\n createInjector = shadowMode;\r\n shadowMode = false;\r\n }\r\n // Vue.extend constructor export interop.\r\n var options = typeof script === 'function' ? script.options : script;\r\n // render functions\r\n if (template && template.render) {\r\n options.render = template.render;\r\n options.staticRenderFns = template.staticRenderFns;\r\n options._compiled = true;\r\n // functional template\r\n if (isFunctionalTemplate) {\r\n options.functional = true;\r\n }\r\n }\r\n // scopedId\r\n if (scopeId) {\r\n options._scopeId = scopeId;\r\n }\r\n var hook;\r\n if (moduleIdentifier) {\r\n // server build\r\n hook = function (context) {\r\n // 2.3 injection\r\n context =\r\n context || // cached call\r\n (this.$vnode && this.$vnode.ssrContext) || // stateful\r\n (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional\r\n // 2.2 with runInNewContext: true\r\n if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\r\n context = __VUE_SSR_CONTEXT__;\r\n }\r\n // inject component styles\r\n if (style) {\r\n style.call(this, createInjectorSSR(context));\r\n }\r\n // register component module identifier for async chunk inference\r\n if (context && context._registeredComponents) {\r\n context._registeredComponents.add(moduleIdentifier);\r\n }\r\n };\r\n // used by ssr in case component is cached and beforeCreate\r\n // never gets called\r\n options._ssrRegister = hook;\r\n }\r\n else if (style) {\r\n hook = shadowMode\r\n ? function (context) {\r\n style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));\r\n }\r\n : function (context) {\r\n style.call(this, createInjector(context));\r\n };\r\n }\r\n if (hook) {\r\n if (options.functional) {\r\n // register for functional component in vue file\r\n var originalRender = options.render;\r\n options.render = function renderWithStyleInjection(h, context) {\r\n hook.call(context);\r\n return originalRender(h, context);\r\n };\r\n }\r\n else {\r\n // inject component registration as beforeCreate hook\r\n var existing = options.beforeCreate;\r\n options.beforeCreate = existing ? [].concat(existing, hook) : [hook];\r\n }\r\n }\r\n return script;\r\n}\n\n/* script */\nvar __vue_script__ = script;\n\n/* template */\n\n /* style */\n var __vue_inject_styles__ = undefined;\n /* scoped */\n var __vue_scope_id__ = undefined;\n /* module identifier */\n var __vue_module_identifier__ = undefined;\n /* functional template */\n var __vue_is_functional_template__ = undefined;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n var __vue_component__ = /*#__PURE__*/normalizeComponent(\n {},\n __vue_inject_styles__,\n __vue_script__,\n __vue_scope_id__,\n __vue_is_functional_template__,\n __vue_module_identifier__,\n false,\n undefined,\n undefined,\n undefined\n );\n\nexport default __vue_component__;\n","\n\n\n \n \n\n\n\n","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionLocation.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionLocation.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./TransactionLocation.vue?vue&type=template&id=3bafa3c9&scoped=true&\"\nimport script from \"./TransactionLocation.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionLocation.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"3bafa3c9\",\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.showField)?_c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.location'))+\"\\n \")]),_vm._v(\" \"),_c('div',{staticStyle:{\"width\":\"100%\",\"height\":\"300px\"}},[_c('l-map',{ref:\"myMap\",staticStyle:{\"width\":\"100%\",\"height\":\"300px\"},attrs:{\"center\":_vm.center,\"zoom\":_vm.zoom},on:{\"ready\":function($event){return _vm.prepMap()},\"update:zoom\":_vm.zoomUpdated,\"update:center\":_vm.centerUpdated,\"update:bounds\":_vm.boundsUpdated}},[_c('l-tile-layer',{attrs:{\"url\":_vm.url}}),_vm._v(\" \"),_c('l-marker',{attrs:{\"lat-lng\":_vm.marker,\"visible\":_vm.hasMarker}})],1),_vm._v(\" \"),_c('span',[_c('button',{staticClass:\"btn btn-default btn-xs\",on:{\"click\":_vm.clearLocation}},[_vm._v(_vm._s(_vm.$t('firefly.clear_location')))])])],1),_vm._v(\" \"),_c('p',[_vm._v(\" \")])]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SplitForm.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SplitForm.vue?vue&type=script&lang=js&\"","\n\n\n \n
\n
\n
\n \n
\n \n
\n \n
\n
\n \n \n
\n \n
\n \n
\n\n \n
\n \n \n
\n
\n\n\n \n
\n
\n \n \n
\n
\n \n
\n
\n \n \n
\n
\n\n \n
\n\n \n
\n
\n
\n
\n\n \n
\n
\n
\n \n
\n \n \n
\n
\n \n \n
\n
\n \n \n \n
\n
\n
\n
\n
\n
\n \n \n
\n
\n
\n \n
\n \n
\n
\n\n \n\n \n \n
\n
\n\n \n \n\n \n
\n\n
\n \n
\n
\n
\n
\n \n \n
\n \n\n\n","import { render, staticRenderFns } from \"./SplitForm.vue?vue&type=template&id=26939696&\"\nimport script from \"./SplitForm.vue?vue&type=script&lang=js&\"\nexport * from \"./SplitForm.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.message.length > 0)?_c('div',{class:'alert alert-' + _vm.type + ' alert-dismissible'},[_c('button',{staticClass:\"close\",attrs:{\"aria-hidden\":\"true\",\"data-dismiss\":\"alert\",\"type\":\"button\"}},[_vm._v(\"×\")]),_vm._v(\" \"),_c('h5',[('danger' === _vm.type)?_c('i',{staticClass:\"icon fas fa-ban\"}):_vm._e(),_vm._v(\" \"),('success' === _vm.type)?_c('i',{staticClass:\"icon fas fa-thumbs-up\"}):_vm._e(),_vm._v(\" \"),('danger' === _vm.type)?_c('span',[_vm._v(_vm._s(_vm.$t(\"firefly.flash_error\")))]):_vm._e(),_vm._v(\" \"),('success' === _vm.type)?_c('span',[_vm._v(_vm._s(_vm.$t(\"firefly.flash_success\")))]):_vm._e()]),_vm._v(\" \"),_c('span',{domProps:{\"innerHTML\":_vm._s(_vm.message)}})]):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Alert.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Alert.vue?vue&type=script&lang=js&\"","\n\n 0\" :class=\"'alert alert-' + type + ' alert-dismissible'\">\n × \n
\n \n \n {{ $t(\"firefly.flash_error\") }} \n {{ $t(\"firefly.flash_success\") }} \n \n \n \n \n","import { render, staticRenderFns } from \"./Alert.vue?vue&type=template&id=df266c68&\"\nimport script from \"./Alert.vue?vue&type=script&lang=js&\"\nexport * from \"./Alert.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"form-group\"},[_c('div',{staticClass:\"text-xs d-none d-lg-block d-xl-block\"},[_vm._v(\"\\n \"+_vm._s(_vm.$t('firefly.split_transaction_title'))+\"\\n \")]),_vm._v(\" \"),_c('vue-typeahead-bootstrap',{attrs:{\"data\":_vm.descriptions,\"inputClass\":_vm.errors.length > 0 ? 'is-invalid' : '',\"minMatchingChars\":3,\"placeholder\":_vm.$t('firefly.split_transaction_title'),\"serializer\":function (item) { return item.description; },\"showOnFocus\":true,\"inputName\":\"group_title\"},on:{\"input\":_vm.lookupDescription},model:{value:(_vm.title),callback:function ($$v) {_vm.title=$$v},expression:\"title\"}},[_c('template',{slot:\"append\"},[_c('div',{staticClass:\"input-group-append\"},[_c('button',{staticClass:\"btn btn-outline-secondary\",attrs:{\"tabindex\":\"-1\",\"type\":\"button\"},on:{\"click\":_vm.clearDescription}},[_c('i',{staticClass:\"far fa-trash-alt\"})])])])],2),_vm._v(\" \"),(_vm.errors.length > 0)?_c('span',_vm._l((_vm.errors),function(error){return _c('span',{staticClass:\"text-danger small\"},[_vm._v(_vm._s(error)),_c('br')])}),0):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionGroupTitle.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js??ref--4-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./TransactionGroupTitle.vue?vue&type=script&lang=js&\"","\n\n\n \n \n\n\n\n","import { render, staticRenderFns } from \"./TransactionGroupTitle.vue?vue&type=template&id=273271bf&scoped=true&\"\nimport script from \"./TransactionGroupTitle.vue?vue&type=script&lang=js&\"\nexport * from \"./TransactionGroupTitle.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"273271bf\",\n null\n \n)\n\nexport default component.exports","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/**\n * Adds the key-value `pair` to `map`.\n *\n * @private\n * @param {Object} map The map to modify.\n * @param {Array} pair The key-value pair to add.\n * @returns {Object} Returns `map`.\n */\nfunction addMapEntry(map, pair) {\n // Don't return `map.set` because it's not chainable in IE 11.\n map.set(pair[0], pair[1]);\n return map;\n}\n\n/**\n * Adds `value` to `set`.\n *\n * @private\n * @param {Object} set The set to modify.\n * @param {*} value The value to add.\n * @returns {Object} Returns `set`.\n */\nfunction addSetEntry(set, value) {\n // Don't return `set.add` because it's not chainable in IE 11.\n set.add(value);\n return set;\n}\n\n/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array ? array.length : 0;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * A specialized version of `_.reduce` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {*} [accumulator] The initial value.\n * @param {boolean} [initAccum] Specify using the first element of `array` as\n * the initial value.\n * @returns {*} Returns the accumulated value.\n */\nfunction arrayReduce(array, iteratee, accumulator, initAccum) {\n var index = -1,\n length = array ? array.length : 0;\n\n if (initAccum && length) {\n accumulator = array[++index];\n }\n while (++index < length) {\n accumulator = iteratee(accumulator, array[index], index, array);\n }\n return accumulator;\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols,\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeKeys = overArg(Object.keys, Object);\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView'),\n Map = getNative(root, 'Map'),\n Promise = getNative(root, 'Promise'),\n Set = getNative(root, 'Set'),\n WeakMap = getNative(root, 'WeakMap'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n this.__data__ = new ListCache(entries);\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n return this.__data__['delete'](key);\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var cache = this.__data__;\n if (cache instanceof ListCache) {\n var pairs = cache.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n return this;\n }\n cache = this.__data__ = new MapCache(pairs);\n }\n cache.set(key, value);\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n // Safari 9 makes `arguments.length` enumerable in strict mode.\n var result = (isArray(value) || isArguments(value))\n ? baseTimes(value.length, String)\n : [];\n\n var length = result.length,\n skipIndexes = !!length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (key == 'length' || isIndex(key, length)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n object[key] = value;\n }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @param {boolean} [isFull] Specify a clone including symbols.\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, isDeep, isFull, customizer, key, object, stack) {\n var result;\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n if (isHostObject(value)) {\n return object ? value : {};\n }\n result = initCloneObject(isFunc ? {} : value);\n if (!isDeep) {\n return copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, baseClone, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (!isArr) {\n var props = isFull ? getAllKeys(value) : keys(value);\n }\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));\n });\n return result;\n}\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} prototype The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nfunction baseCreate(proto) {\n return isObject(proto) ? objectCreate(proto) : {};\n}\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\n/**\n * The base implementation of `getTag`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n return objectToString.call(value);\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var result = new buffer.constructor(buffer.length);\n buffer.copy(result);\n return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\n/**\n * Creates a clone of `map`.\n *\n * @private\n * @param {Object} map The map to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned map.\n */\nfunction cloneMap(map, isDeep, cloneFunc) {\n var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);\n return arrayReduce(array, addMapEntry, new map.constructor);\n}\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\n/**\n * Creates a clone of `set`.\n *\n * @private\n * @param {Object} set The set to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned set.\n */\nfunction cloneSet(set, isDeep, cloneFunc) {\n var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);\n return arrayReduce(array, addSetEntry, new set.constructor);\n}\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n assignValue(object, key, newValue === undefined ? source[key] : newValue);\n }\n return object;\n}\n\n/**\n * Copies own symbol properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Creates an array of the own enumerable symbol properties of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11,\n// for data views in Edge < 14, and promises in Node.js.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = objectToString.call(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : undefined;\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {Function} cloneFunc The function to clone values.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, cloneFunc, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return cloneMap(object, isDeep, cloneFunc);\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return cloneSet(object, isDeep, cloneFunc);\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n length = length == null ? MAX_SAFE_INTEGER : length;\n return !!length &&\n (typeof value == 'number' || reIsUint.test(value)) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, true, true);\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\n/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = cloneDeep;\n","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","/*!\n * Chart.js v2.9.4\n * https://www.chartjs.org\n * (c) 2020 Chart.js Contributors\n * Released under the MIT License\n */\n(function (global, factory) {\ntypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(function() { try { return require('moment'); } catch(e) { } }()) :\ntypeof define === 'function' && define.amd ? define(['require'], function(require) { return factory(function() { try { return require('moment'); } catch(e) { } }()); }) :\n(global = global || self, global.Chart = factory(global.moment));\n}(this, (function (moment) { 'use strict';\n\nmoment = moment && moment.hasOwnProperty('default') ? moment['default'] : moment;\n\nfunction createCommonjsModule(fn, module) {\n\treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n}\n\nfunction getCjsExportFromNamespace (n) {\n\treturn n && n['default'] || n;\n}\n\nvar colorName = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\n\nvar conversions = createCommonjsModule(function (module) {\n/* MIT license */\n\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nvar reverseKeywords = {};\nfor (var key in colorName) {\n\tif (colorName.hasOwnProperty(key)) {\n\t\treverseKeywords[colorName[key]] = key;\n\t}\n}\n\nvar convert = module.exports = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\n// hide .channels and .labels properties\nfor (var model in convert) {\n\tif (convert.hasOwnProperty(model)) {\n\t\tif (!('channels' in convert[model])) {\n\t\t\tthrow new Error('missing channels property: ' + model);\n\t\t}\n\n\t\tif (!('labels' in convert[model])) {\n\t\t\tthrow new Error('missing channel labels property: ' + model);\n\t\t}\n\n\t\tif (convert[model].labels.length !== convert[model].channels) {\n\t\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t\t}\n\n\t\tvar channels = convert[model].channels;\n\t\tvar labels = convert[model].labels;\n\t\tdelete convert[model].channels;\n\t\tdelete convert[model].labels;\n\t\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\t\tObject.defineProperty(convert[model], 'labels', {value: labels});\n\t}\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar min = Math.min(r, g, b);\n\tvar max = Math.max(r, g, b);\n\tvar delta = max - min;\n\tvar h;\n\tvar s;\n\tvar l;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tl = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tvar rdif;\n\tvar gdif;\n\tvar bdif;\n\tvar h;\n\tvar s;\n\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar v = Math.max(r, g, b);\n\tvar diff = v - Math.min(r, g, b);\n\tvar diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = s = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tvar r = rgb[0];\n\tvar g = rgb[1];\n\tvar b = rgb[2];\n\tvar h = convert.rgb.hsl(rgb)[0];\n\tvar w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar c;\n\tvar m;\n\tvar y;\n\tvar k;\n\n\tk = Math.min(1 - r, 1 - g, 1 - b);\n\tc = (1 - r - k) / (1 - k) || 0;\n\tm = (1 - g - k) / (1 - k) || 0;\n\ty = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\n/**\n * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n * */\nfunction comparativeDistance(x, y) {\n\treturn (\n\t\tMath.pow(x[0] - y[0], 2) +\n\t\tMath.pow(x[1] - y[1], 2) +\n\t\tMath.pow(x[2] - y[2], 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tvar reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tvar currentClosestDistance = Infinity;\n\tvar currentClosestKeyword;\n\n\tfor (var keyword in colorName) {\n\t\tif (colorName.hasOwnProperty(keyword)) {\n\t\t\tvar value = colorName[keyword];\n\n\t\t\t// Compute comparative distance\n\t\t\tvar distance = comparativeDistance(rgb, value);\n\n\t\t\t// Check if its less, if so set as closest\n\t\t\tif (distance < currentClosestDistance) {\n\t\t\t\tcurrentClosestDistance = distance;\n\t\t\t\tcurrentClosestKeyword = keyword;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn colorName[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\n\t// assume sRGB\n\tr = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92);\n\n\tvar x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tvar y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tvar z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tvar xyz = convert.rgb.xyz(rgb);\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tvar h = hsl[0] / 360;\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar t1;\n\tvar t2;\n\tvar t3;\n\tvar rgb;\n\tvar val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tt1 = 2 * l - t2;\n\n\trgb = [0, 0, 0];\n\tfor (var i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tvar h = hsl[0];\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar smin = s;\n\tvar lmin = Math.max(l, 0.01);\n\tvar sv;\n\tvar v;\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tv = (l + s) / 2;\n\tsv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tvar h = hsv[0] / 60;\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar hi = Math.floor(h) % 6;\n\n\tvar f = h - Math.floor(h);\n\tvar p = 255 * v * (1 - s);\n\tvar q = 255 * v * (1 - (s * f));\n\tvar t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tvar h = hsv[0];\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\tvar vmin = Math.max(v, 0.01);\n\tvar lmin;\n\tvar sl;\n\tvar l;\n\n\tl = (2 - s) * v;\n\tlmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tvar h = hwb[0] / 360;\n\tvar wh = hwb[1] / 100;\n\tvar bl = hwb[2] / 100;\n\tvar ratio = wh + bl;\n\tvar i;\n\tvar v;\n\tvar f;\n\tvar n;\n\n\t// wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\ti = Math.floor(6 * h);\n\tv = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tn = wh + f * (v - wh); // linear interpolation\n\n\tvar r;\n\tvar g;\n\tvar b;\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tvar c = cmyk[0] / 100;\n\tvar m = cmyk[1] / 100;\n\tvar y = cmyk[2] / 100;\n\tvar k = cmyk[3] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = 1 - Math.min(1, c * (1 - k) + k);\n\tg = 1 - Math.min(1, m * (1 - k) + k);\n\tb = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tvar x = xyz[0] / 100;\n\tvar y = xyz[1] / 100;\n\tvar z = xyz[2] / 100;\n\tvar r;\n\tvar g;\n\tvar b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tvar x = xyz[0];\n\tvar y = xyz[1];\n\tvar z = xyz[2];\n\tvar l;\n\tvar a;\n\tvar b;\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116);\n\n\tl = (116 * y) - 16;\n\ta = 500 * (x - y);\n\tb = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar x;\n\tvar y;\n\tvar z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tvar y2 = Math.pow(y, 3);\n\tvar x2 = Math.pow(x, 3);\n\tvar z2 = Math.pow(z, 3);\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tvar l = lab[0];\n\tvar a = lab[1];\n\tvar b = lab[2];\n\tvar hr;\n\tvar h;\n\tvar c;\n\n\thr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tc = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tvar l = lch[0];\n\tvar c = lch[1];\n\tvar h = lch[2];\n\tvar a;\n\tvar b;\n\tvar hr;\n\n\thr = h / 360 * 2 * Math.PI;\n\ta = c * Math.cos(hr);\n\tb = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\tvar value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tvar ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tvar r = args[0];\n\tvar g = args[1];\n\tvar b = args[2];\n\n\t// we use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tvar ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tvar color = args % 10;\n\n\t// handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tvar mult = (~~(args > 50) + 1) * 0.5;\n\tvar r = ((color & 1) * mult) * 255;\n\tvar g = (((color >> 1) & 1) * mult) * 255;\n\tvar b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// handle greyscale\n\tif (args >= 232) {\n\t\tvar c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tvar rem;\n\tvar r = Math.floor(args / 36) / 5 * 255;\n\tvar g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tvar b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tvar integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tvar match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tvar colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(function (char) {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tvar integer = parseInt(colorString, 16);\n\tvar r = (integer >> 16) & 0xFF;\n\tvar g = (integer >> 8) & 0xFF;\n\tvar b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tvar r = rgb[0] / 255;\n\tvar g = rgb[1] / 255;\n\tvar b = rgb[2] / 255;\n\tvar max = Math.max(Math.max(r, g), b);\n\tvar min = Math.min(Math.min(r, g), b);\n\tvar chroma = (max - min);\n\tvar grayscale;\n\tvar hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma + 4;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tvar s = hsl[1] / 100;\n\tvar l = hsl[2] / 100;\n\tvar c = 1;\n\tvar f = 0;\n\n\tif (l < 0.5) {\n\t\tc = 2.0 * s * l;\n\t} else {\n\t\tc = 2.0 * s * (1.0 - l);\n\t}\n\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tvar s = hsv[1] / 100;\n\tvar v = hsv[2] / 100;\n\n\tvar c = s * v;\n\tvar f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tvar h = hcg[0] / 360;\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tvar pure = [0, 0, 0];\n\tvar hi = (h % 1) * 6;\n\tvar v = hi % 1;\n\tvar w = 1 - v;\n\tvar mg = 0;\n\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar v = c + g * (1.0 - c);\n\tvar f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\n\tvar l = g * (1.0 - c) + 0.5 * c;\n\tvar s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tvar c = hcg[1] / 100;\n\tvar g = hcg[2] / 100;\n\tvar v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tvar w = hwb[1] / 100;\n\tvar b = hwb[2] / 100;\n\tvar v = 1 - b;\n\tvar c = v - w;\n\tvar g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = convert.gray.hsv = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tvar val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tvar integer = (val << 16) + (val << 8) + val;\n\n\tvar string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tvar val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n});\nvar conversions_1 = conversions.rgb;\nvar conversions_2 = conversions.hsl;\nvar conversions_3 = conversions.hsv;\nvar conversions_4 = conversions.hwb;\nvar conversions_5 = conversions.cmyk;\nvar conversions_6 = conversions.xyz;\nvar conversions_7 = conversions.lab;\nvar conversions_8 = conversions.lch;\nvar conversions_9 = conversions.hex;\nvar conversions_10 = conversions.keyword;\nvar conversions_11 = conversions.ansi16;\nvar conversions_12 = conversions.ansi256;\nvar conversions_13 = conversions.hcg;\nvar conversions_14 = conversions.apple;\nvar conversions_15 = conversions.gray;\n\n/*\n\tthis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tvar graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tvar models = Object.keys(conversions);\n\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tvar graph = buildGraph();\n\tvar queue = [fromModel]; // unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tvar current = queue.pop();\n\t\tvar adjacents = Object.keys(conversions[current]);\n\n\t\tfor (var len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tvar adjacent = adjacents[i];\n\t\t\tvar node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tvar path = [graph[toModel].parent, toModel];\n\tvar fn = conversions[graph[toModel].parent][toModel];\n\n\tvar cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nvar route = function (fromModel) {\n\tvar graph = deriveBFS(fromModel);\n\tvar conversion = {};\n\n\tvar models = Object.keys(graph);\n\tfor (var len = models.length, i = 0; i < len; i++) {\n\t\tvar toModel = models[i];\n\t\tvar node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// no possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\nvar convert = {};\n\nvar models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tvar wrappedFn = function (args) {\n\t\tif (args === undefined || args === null) {\n\t\t\treturn args;\n\t\t}\n\n\t\tif (arguments.length > 1) {\n\t\t\targs = Array.prototype.slice.call(arguments);\n\t\t}\n\n\t\tvar result = fn(args);\n\n\t\t// we're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (var len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(function (fromModel) {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tvar routes = route(fromModel);\n\tvar routeModels = Object.keys(routes);\n\n\trouteModels.forEach(function (toModel) {\n\t\tvar fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nvar colorConvert = convert;\n\nvar colorName$1 = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\n\n/* MIT license */\n\n\nvar colorString = {\n getRgba: getRgba,\n getHsla: getHsla,\n getRgb: getRgb,\n getHsl: getHsl,\n getHwb: getHwb,\n getAlpha: getAlpha,\n\n hexString: hexString,\n rgbString: rgbString,\n rgbaString: rgbaString,\n percentString: percentString,\n percentaString: percentaString,\n hslString: hslString,\n hslaString: hslaString,\n hwbString: hwbString,\n keyword: keyword\n};\n\nfunction getRgba(string) {\n if (!string) {\n return;\n }\n var abbr = /^#([a-fA-F0-9]{3,4})$/i,\n hex = /^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i,\n rgba = /^rgba?\\(\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*,\\s*([+-]?\\d+)\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/i,\n per = /^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*,\\s*([+-]?[\\d\\.]+)\\%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)$/i,\n keyword = /(\\w+)/;\n\n var rgb = [0, 0, 0],\n a = 1,\n match = string.match(abbr),\n hexAlpha = \"\";\n if (match) {\n match = match[1];\n hexAlpha = match[3];\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = parseInt(match[i] + match[i], 16);\n }\n if (hexAlpha) {\n a = Math.round((parseInt(hexAlpha + hexAlpha, 16) / 255) * 100) / 100;\n }\n }\n else if (match = string.match(hex)) {\n hexAlpha = match[2];\n match = match[1];\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = parseInt(match.slice(i * 2, i * 2 + 2), 16);\n }\n if (hexAlpha) {\n a = Math.round((parseInt(hexAlpha, 16) / 255) * 100) / 100;\n }\n }\n else if (match = string.match(rgba)) {\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = parseInt(match[i + 1]);\n }\n a = parseFloat(match[4]);\n }\n else if (match = string.match(per)) {\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);\n }\n a = parseFloat(match[4]);\n }\n else if (match = string.match(keyword)) {\n if (match[1] == \"transparent\") {\n return [0, 0, 0, 0];\n }\n rgb = colorName$1[match[1]];\n if (!rgb) {\n return;\n }\n }\n\n for (var i = 0; i < rgb.length; i++) {\n rgb[i] = scale(rgb[i], 0, 255);\n }\n if (!a && a != 0) {\n a = 1;\n }\n else {\n a = scale(a, 0, 1);\n }\n rgb[3] = a;\n return rgb;\n}\n\nfunction getHsla(string) {\n if (!string) {\n return;\n }\n var hsl = /^hsla?\\(\\s*([+-]?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)/;\n var match = string.match(hsl);\n if (match) {\n var alpha = parseFloat(match[4]);\n var h = scale(parseInt(match[1]), 0, 360),\n s = scale(parseFloat(match[2]), 0, 100),\n l = scale(parseFloat(match[3]), 0, 100),\n a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);\n return [h, s, l, a];\n }\n}\n\nfunction getHwb(string) {\n if (!string) {\n return;\n }\n var hwb = /^hwb\\(\\s*([+-]?\\d+)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?[\\d\\.]+)\\s*)?\\)/;\n var match = string.match(hwb);\n if (match) {\n var alpha = parseFloat(match[4]);\n var h = scale(parseInt(match[1]), 0, 360),\n w = scale(parseFloat(match[2]), 0, 100),\n b = scale(parseFloat(match[3]), 0, 100),\n a = scale(isNaN(alpha) ? 1 : alpha, 0, 1);\n return [h, w, b, a];\n }\n}\n\nfunction getRgb(string) {\n var rgba = getRgba(string);\n return rgba && rgba.slice(0, 3);\n}\n\nfunction getHsl(string) {\n var hsla = getHsla(string);\n return hsla && hsla.slice(0, 3);\n}\n\nfunction getAlpha(string) {\n var vals = getRgba(string);\n if (vals) {\n return vals[3];\n }\n else if (vals = getHsla(string)) {\n return vals[3];\n }\n else if (vals = getHwb(string)) {\n return vals[3];\n }\n}\n\n// generators\nfunction hexString(rgba, a) {\n var a = (a !== undefined && rgba.length === 3) ? a : rgba[3];\n return \"#\" + hexDouble(rgba[0]) \n + hexDouble(rgba[1])\n + hexDouble(rgba[2])\n + (\n (a >= 0 && a < 1)\n ? hexDouble(Math.round(a * 255))\n : \"\"\n );\n}\n\nfunction rgbString(rgba, alpha) {\n if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {\n return rgbaString(rgba, alpha);\n }\n return \"rgb(\" + rgba[0] + \", \" + rgba[1] + \", \" + rgba[2] + \")\";\n}\n\nfunction rgbaString(rgba, alpha) {\n if (alpha === undefined) {\n alpha = (rgba[3] !== undefined ? rgba[3] : 1);\n }\n return \"rgba(\" + rgba[0] + \", \" + rgba[1] + \", \" + rgba[2]\n + \", \" + alpha + \")\";\n}\n\nfunction percentString(rgba, alpha) {\n if (alpha < 1 || (rgba[3] && rgba[3] < 1)) {\n return percentaString(rgba, alpha);\n }\n var r = Math.round(rgba[0]/255 * 100),\n g = Math.round(rgba[1]/255 * 100),\n b = Math.round(rgba[2]/255 * 100);\n\n return \"rgb(\" + r + \"%, \" + g + \"%, \" + b + \"%)\";\n}\n\nfunction percentaString(rgba, alpha) {\n var r = Math.round(rgba[0]/255 * 100),\n g = Math.round(rgba[1]/255 * 100),\n b = Math.round(rgba[2]/255 * 100);\n return \"rgba(\" + r + \"%, \" + g + \"%, \" + b + \"%, \" + (alpha || rgba[3] || 1) + \")\";\n}\n\nfunction hslString(hsla, alpha) {\n if (alpha < 1 || (hsla[3] && hsla[3] < 1)) {\n return hslaString(hsla, alpha);\n }\n return \"hsl(\" + hsla[0] + \", \" + hsla[1] + \"%, \" + hsla[2] + \"%)\";\n}\n\nfunction hslaString(hsla, alpha) {\n if (alpha === undefined) {\n alpha = (hsla[3] !== undefined ? hsla[3] : 1);\n }\n return \"hsla(\" + hsla[0] + \", \" + hsla[1] + \"%, \" + hsla[2] + \"%, \"\n + alpha + \")\";\n}\n\n// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\n// (hwb have alpha optional & 1 is default value)\nfunction hwbString(hwb, alpha) {\n if (alpha === undefined) {\n alpha = (hwb[3] !== undefined ? hwb[3] : 1);\n }\n return \"hwb(\" + hwb[0] + \", \" + hwb[1] + \"%, \" + hwb[2] + \"%\"\n + (alpha !== undefined && alpha !== 1 ? \", \" + alpha : \"\") + \")\";\n}\n\nfunction keyword(rgb) {\n return reverseNames[rgb.slice(0, 3)];\n}\n\n// helpers\nfunction scale(num, min, max) {\n return Math.min(Math.max(min, num), max);\n}\n\nfunction hexDouble(num) {\n var str = num.toString(16).toUpperCase();\n return (str.length < 2) ? \"0\" + str : str;\n}\n\n\n//create a list of reverse color names\nvar reverseNames = {};\nfor (var name in colorName$1) {\n reverseNames[colorName$1[name]] = name;\n}\n\n/* MIT license */\n\n\n\nvar Color = function (obj) {\n\tif (obj instanceof Color) {\n\t\treturn obj;\n\t}\n\tif (!(this instanceof Color)) {\n\t\treturn new Color(obj);\n\t}\n\n\tthis.valid = false;\n\tthis.values = {\n\t\trgb: [0, 0, 0],\n\t\thsl: [0, 0, 0],\n\t\thsv: [0, 0, 0],\n\t\thwb: [0, 0, 0],\n\t\tcmyk: [0, 0, 0, 0],\n\t\talpha: 1\n\t};\n\n\t// parse Color() argument\n\tvar vals;\n\tif (typeof obj === 'string') {\n\t\tvals = colorString.getRgba(obj);\n\t\tif (vals) {\n\t\t\tthis.setValues('rgb', vals);\n\t\t} else if (vals = colorString.getHsla(obj)) {\n\t\t\tthis.setValues('hsl', vals);\n\t\t} else if (vals = colorString.getHwb(obj)) {\n\t\t\tthis.setValues('hwb', vals);\n\t\t}\n\t} else if (typeof obj === 'object') {\n\t\tvals = obj;\n\t\tif (vals.r !== undefined || vals.red !== undefined) {\n\t\t\tthis.setValues('rgb', vals);\n\t\t} else if (vals.l !== undefined || vals.lightness !== undefined) {\n\t\t\tthis.setValues('hsl', vals);\n\t\t} else if (vals.v !== undefined || vals.value !== undefined) {\n\t\t\tthis.setValues('hsv', vals);\n\t\t} else if (vals.w !== undefined || vals.whiteness !== undefined) {\n\t\t\tthis.setValues('hwb', vals);\n\t\t} else if (vals.c !== undefined || vals.cyan !== undefined) {\n\t\t\tthis.setValues('cmyk', vals);\n\t\t}\n\t}\n};\n\nColor.prototype = {\n\tisValid: function () {\n\t\treturn this.valid;\n\t},\n\trgb: function () {\n\t\treturn this.setSpace('rgb', arguments);\n\t},\n\thsl: function () {\n\t\treturn this.setSpace('hsl', arguments);\n\t},\n\thsv: function () {\n\t\treturn this.setSpace('hsv', arguments);\n\t},\n\thwb: function () {\n\t\treturn this.setSpace('hwb', arguments);\n\t},\n\tcmyk: function () {\n\t\treturn this.setSpace('cmyk', arguments);\n\t},\n\n\trgbArray: function () {\n\t\treturn this.values.rgb;\n\t},\n\thslArray: function () {\n\t\treturn this.values.hsl;\n\t},\n\thsvArray: function () {\n\t\treturn this.values.hsv;\n\t},\n\thwbArray: function () {\n\t\tvar values = this.values;\n\t\tif (values.alpha !== 1) {\n\t\t\treturn values.hwb.concat([values.alpha]);\n\t\t}\n\t\treturn values.hwb;\n\t},\n\tcmykArray: function () {\n\t\treturn this.values.cmyk;\n\t},\n\trgbaArray: function () {\n\t\tvar values = this.values;\n\t\treturn values.rgb.concat([values.alpha]);\n\t},\n\thslaArray: function () {\n\t\tvar values = this.values;\n\t\treturn values.hsl.concat([values.alpha]);\n\t},\n\talpha: function (val) {\n\t\tif (val === undefined) {\n\t\t\treturn this.values.alpha;\n\t\t}\n\t\tthis.setValues('alpha', val);\n\t\treturn this;\n\t},\n\n\tred: function (val) {\n\t\treturn this.setChannel('rgb', 0, val);\n\t},\n\tgreen: function (val) {\n\t\treturn this.setChannel('rgb', 1, val);\n\t},\n\tblue: function (val) {\n\t\treturn this.setChannel('rgb', 2, val);\n\t},\n\thue: function (val) {\n\t\tif (val) {\n\t\t\tval %= 360;\n\t\t\tval = val < 0 ? 360 + val : val;\n\t\t}\n\t\treturn this.setChannel('hsl', 0, val);\n\t},\n\tsaturation: function (val) {\n\t\treturn this.setChannel('hsl', 1, val);\n\t},\n\tlightness: function (val) {\n\t\treturn this.setChannel('hsl', 2, val);\n\t},\n\tsaturationv: function (val) {\n\t\treturn this.setChannel('hsv', 1, val);\n\t},\n\twhiteness: function (val) {\n\t\treturn this.setChannel('hwb', 1, val);\n\t},\n\tblackness: function (val) {\n\t\treturn this.setChannel('hwb', 2, val);\n\t},\n\tvalue: function (val) {\n\t\treturn this.setChannel('hsv', 2, val);\n\t},\n\tcyan: function (val) {\n\t\treturn this.setChannel('cmyk', 0, val);\n\t},\n\tmagenta: function (val) {\n\t\treturn this.setChannel('cmyk', 1, val);\n\t},\n\tyellow: function (val) {\n\t\treturn this.setChannel('cmyk', 2, val);\n\t},\n\tblack: function (val) {\n\t\treturn this.setChannel('cmyk', 3, val);\n\t},\n\n\thexString: function () {\n\t\treturn colorString.hexString(this.values.rgb);\n\t},\n\trgbString: function () {\n\t\treturn colorString.rgbString(this.values.rgb, this.values.alpha);\n\t},\n\trgbaString: function () {\n\t\treturn colorString.rgbaString(this.values.rgb, this.values.alpha);\n\t},\n\tpercentString: function () {\n\t\treturn colorString.percentString(this.values.rgb, this.values.alpha);\n\t},\n\thslString: function () {\n\t\treturn colorString.hslString(this.values.hsl, this.values.alpha);\n\t},\n\thslaString: function () {\n\t\treturn colorString.hslaString(this.values.hsl, this.values.alpha);\n\t},\n\thwbString: function () {\n\t\treturn colorString.hwbString(this.values.hwb, this.values.alpha);\n\t},\n\tkeyword: function () {\n\t\treturn colorString.keyword(this.values.rgb, this.values.alpha);\n\t},\n\n\trgbNumber: function () {\n\t\tvar rgb = this.values.rgb;\n\t\treturn (rgb[0] << 16) | (rgb[1] << 8) | rgb[2];\n\t},\n\n\tluminosity: function () {\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\tvar rgb = this.values.rgb;\n\t\tvar lum = [];\n\t\tfor (var i = 0; i < rgb.length; i++) {\n\t\t\tvar chan = rgb[i] / 255;\n\t\t\tlum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4);\n\t\t}\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t},\n\n\tcontrast: function (color2) {\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\t\tvar lum1 = this.luminosity();\n\t\tvar lum2 = color2.luminosity();\n\t\tif (lum1 > lum2) {\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\n\t\t}\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\n\t},\n\n\tlevel: function (color2) {\n\t\tvar contrastRatio = this.contrast(color2);\n\t\tif (contrastRatio >= 7.1) {\n\t\t\treturn 'AAA';\n\t\t}\n\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\n\t},\n\n\tdark: function () {\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\n\t\tvar rgb = this.values.rgb;\n\t\tvar yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000;\n\t\treturn yiq < 128;\n\t},\n\n\tlight: function () {\n\t\treturn !this.dark();\n\t},\n\n\tnegate: function () {\n\t\tvar rgb = [];\n\t\tfor (var i = 0; i < 3; i++) {\n\t\t\trgb[i] = 255 - this.values.rgb[i];\n\t\t}\n\t\tthis.setValues('rgb', rgb);\n\t\treturn this;\n\t},\n\n\tlighten: function (ratio) {\n\t\tvar hsl = this.values.hsl;\n\t\thsl[2] += hsl[2] * ratio;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\tdarken: function (ratio) {\n\t\tvar hsl = this.values.hsl;\n\t\thsl[2] -= hsl[2] * ratio;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\tsaturate: function (ratio) {\n\t\tvar hsl = this.values.hsl;\n\t\thsl[1] += hsl[1] * ratio;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\tdesaturate: function (ratio) {\n\t\tvar hsl = this.values.hsl;\n\t\thsl[1] -= hsl[1] * ratio;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\twhiten: function (ratio) {\n\t\tvar hwb = this.values.hwb;\n\t\thwb[1] += hwb[1] * ratio;\n\t\tthis.setValues('hwb', hwb);\n\t\treturn this;\n\t},\n\n\tblacken: function (ratio) {\n\t\tvar hwb = this.values.hwb;\n\t\thwb[2] += hwb[2] * ratio;\n\t\tthis.setValues('hwb', hwb);\n\t\treturn this;\n\t},\n\n\tgreyscale: function () {\n\t\tvar rgb = this.values.rgb;\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\n\t\tvar val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n\t\tthis.setValues('rgb', [val, val, val]);\n\t\treturn this;\n\t},\n\n\tclearer: function (ratio) {\n\t\tvar alpha = this.values.alpha;\n\t\tthis.setValues('alpha', alpha - (alpha * ratio));\n\t\treturn this;\n\t},\n\n\topaquer: function (ratio) {\n\t\tvar alpha = this.values.alpha;\n\t\tthis.setValues('alpha', alpha + (alpha * ratio));\n\t\treturn this;\n\t},\n\n\trotate: function (degrees) {\n\t\tvar hsl = this.values.hsl;\n\t\tvar hue = (hsl[0] + degrees) % 360;\n\t\thsl[0] = hue < 0 ? 360 + hue : hue;\n\t\tthis.setValues('hsl', hsl);\n\t\treturn this;\n\t},\n\n\t/**\n\t * Ported from sass implementation in C\n\t * https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n\t */\n\tmix: function (mixinColor, weight) {\n\t\tvar color1 = this;\n\t\tvar color2 = mixinColor;\n\t\tvar p = weight === undefined ? 0.5 : weight;\n\n\t\tvar w = 2 * p - 1;\n\t\tvar a = color1.alpha() - color2.alpha();\n\n\t\tvar w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\n\t\tvar w2 = 1 - w1;\n\n\t\treturn this\n\t\t\t.rgb(\n\t\t\t\tw1 * color1.red() + w2 * color2.red(),\n\t\t\t\tw1 * color1.green() + w2 * color2.green(),\n\t\t\t\tw1 * color1.blue() + w2 * color2.blue()\n\t\t\t)\n\t\t\t.alpha(color1.alpha() * p + color2.alpha() * (1 - p));\n\t},\n\n\ttoJSON: function () {\n\t\treturn this.rgb();\n\t},\n\n\tclone: function () {\n\t\t// NOTE(SB): using node-clone creates a dependency to Buffer when using browserify,\n\t\t// making the final build way to big to embed in Chart.js. So let's do it manually,\n\t\t// assuming that values to clone are 1 dimension arrays containing only numbers,\n\t\t// except 'alpha' which is a number.\n\t\tvar result = new Color();\n\t\tvar source = this.values;\n\t\tvar target = result.values;\n\t\tvar value, type;\n\n\t\tfor (var prop in source) {\n\t\t\tif (source.hasOwnProperty(prop)) {\n\t\t\t\tvalue = source[prop];\n\t\t\t\ttype = ({}).toString.call(value);\n\t\t\t\tif (type === '[object Array]') {\n\t\t\t\t\ttarget[prop] = value.slice(0);\n\t\t\t\t} else if (type === '[object Number]') {\n\t\t\t\t\ttarget[prop] = value;\n\t\t\t\t} else {\n\t\t\t\t\tconsole.error('unexpected color value:', value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n};\n\nColor.prototype.spaces = {\n\trgb: ['red', 'green', 'blue'],\n\thsl: ['hue', 'saturation', 'lightness'],\n\thsv: ['hue', 'saturation', 'value'],\n\thwb: ['hue', 'whiteness', 'blackness'],\n\tcmyk: ['cyan', 'magenta', 'yellow', 'black']\n};\n\nColor.prototype.maxes = {\n\trgb: [255, 255, 255],\n\thsl: [360, 100, 100],\n\thsv: [360, 100, 100],\n\thwb: [360, 100, 100],\n\tcmyk: [100, 100, 100, 100]\n};\n\nColor.prototype.getValues = function (space) {\n\tvar values = this.values;\n\tvar vals = {};\n\n\tfor (var i = 0; i < space.length; i++) {\n\t\tvals[space.charAt(i)] = values[space][i];\n\t}\n\n\tif (values.alpha !== 1) {\n\t\tvals.a = values.alpha;\n\t}\n\n\t// {r: 255, g: 255, b: 255, a: 0.4}\n\treturn vals;\n};\n\nColor.prototype.setValues = function (space, vals) {\n\tvar values = this.values;\n\tvar spaces = this.spaces;\n\tvar maxes = this.maxes;\n\tvar alpha = 1;\n\tvar i;\n\n\tthis.valid = true;\n\n\tif (space === 'alpha') {\n\t\talpha = vals;\n\t} else if (vals.length) {\n\t\t// [10, 10, 10]\n\t\tvalues[space] = vals.slice(0, space.length);\n\t\talpha = vals[space.length];\n\t} else if (vals[space.charAt(0)] !== undefined) {\n\t\t// {r: 10, g: 10, b: 10}\n\t\tfor (i = 0; i < space.length; i++) {\n\t\t\tvalues[space][i] = vals[space.charAt(i)];\n\t\t}\n\n\t\talpha = vals.a;\n\t} else if (vals[spaces[space][0]] !== undefined) {\n\t\t// {red: 10, green: 10, blue: 10}\n\t\tvar chans = spaces[space];\n\n\t\tfor (i = 0; i < space.length; i++) {\n\t\t\tvalues[space][i] = vals[chans[i]];\n\t\t}\n\n\t\talpha = vals.alpha;\n\t}\n\n\tvalues.alpha = Math.max(0, Math.min(1, (alpha === undefined ? values.alpha : alpha)));\n\n\tif (space === 'alpha') {\n\t\treturn false;\n\t}\n\n\tvar capped;\n\n\t// cap values of the space prior converting all values\n\tfor (i = 0; i < space.length; i++) {\n\t\tcapped = Math.max(0, Math.min(maxes[space][i], values[space][i]));\n\t\tvalues[space][i] = Math.round(capped);\n\t}\n\n\t// convert to all the other color spaces\n\tfor (var sname in spaces) {\n\t\tif (sname !== space) {\n\t\t\tvalues[sname] = colorConvert[space][sname](values[space]);\n\t\t}\n\t}\n\n\treturn true;\n};\n\nColor.prototype.setSpace = function (space, args) {\n\tvar vals = args[0];\n\n\tif (vals === undefined) {\n\t\t// color.rgb()\n\t\treturn this.getValues(space);\n\t}\n\n\t// color.rgb(10, 10, 10)\n\tif (typeof vals === 'number') {\n\t\tvals = Array.prototype.slice.call(args);\n\t}\n\n\tthis.setValues(space, vals);\n\treturn this;\n};\n\nColor.prototype.setChannel = function (space, index, val) {\n\tvar svalues = this.values[space];\n\tif (val === undefined) {\n\t\t// color.red()\n\t\treturn svalues[index];\n\t} else if (val === svalues[index]) {\n\t\t// color.red(color.red())\n\t\treturn this;\n\t}\n\n\t// color.red(100)\n\tsvalues[index] = val;\n\tthis.setValues(space, svalues);\n\n\treturn this;\n};\n\nif (typeof window !== 'undefined') {\n\twindow.Color = Color;\n}\n\nvar chartjsColor = Color;\n\nfunction isValidKey(key) {\r\n\treturn ['__proto__', 'prototype', 'constructor'].indexOf(key) === -1;\r\n}\r\n\r\n/**\r\n * @namespace Chart.helpers\r\n */\r\nvar helpers = {\r\n\t/**\r\n\t * An empty function that can be used, for example, for optional callback.\r\n\t */\r\n\tnoop: function() {},\r\n\r\n\t/**\r\n\t * Returns a unique id, sequentially generated from a global variable.\r\n\t * @returns {number}\r\n\t * @function\r\n\t */\r\n\tuid: (function() {\r\n\t\tvar id = 0;\r\n\t\treturn function() {\r\n\t\t\treturn id++;\r\n\t\t};\r\n\t}()),\r\n\r\n\t/**\r\n\t * Returns true if `value` is neither null nor undefined, else returns false.\r\n\t * @param {*} value - The value to test.\r\n\t * @returns {boolean}\r\n\t * @since 2.7.0\r\n\t */\r\n\tisNullOrUndef: function(value) {\r\n\t\treturn value === null || typeof value === 'undefined';\r\n\t},\r\n\r\n\t/**\r\n\t * Returns true if `value` is an array (including typed arrays), else returns false.\r\n\t * @param {*} value - The value to test.\r\n\t * @returns {boolean}\r\n\t * @function\r\n\t */\r\n\tisArray: function(value) {\r\n\t\tif (Array.isArray && Array.isArray(value)) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\tvar type = Object.prototype.toString.call(value);\r\n\t\tif (type.substr(0, 7) === '[object' && type.substr(-6) === 'Array]') {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns true if `value` is an object (excluding null), else returns false.\r\n\t * @param {*} value - The value to test.\r\n\t * @returns {boolean}\r\n\t * @since 2.7.0\r\n\t */\r\n\tisObject: function(value) {\r\n\t\treturn value !== null && Object.prototype.toString.call(value) === '[object Object]';\r\n\t},\r\n\r\n\t/**\r\n\t * Returns true if `value` is a finite number, else returns false\r\n\t * @param {*} value - The value to test.\r\n\t * @returns {boolean}\r\n\t */\r\n\tisFinite: function(value) {\r\n\t\treturn (typeof value === 'number' || value instanceof Number) && isFinite(value);\r\n\t},\r\n\r\n\t/**\r\n\t * Returns `value` if defined, else returns `defaultValue`.\r\n\t * @param {*} value - The value to return if defined.\r\n\t * @param {*} defaultValue - The value to return if `value` is undefined.\r\n\t * @returns {*}\r\n\t */\r\n\tvalueOrDefault: function(value, defaultValue) {\r\n\t\treturn typeof value === 'undefined' ? defaultValue : value;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns value at the given `index` in array if defined, else returns `defaultValue`.\r\n\t * @param {Array} value - The array to lookup for value at `index`.\r\n\t * @param {number} index - The index in `value` to lookup for value.\r\n\t * @param {*} defaultValue - The value to return if `value[index]` is undefined.\r\n\t * @returns {*}\r\n\t */\r\n\tvalueAtIndexOrDefault: function(value, index, defaultValue) {\r\n\t\treturn helpers.valueOrDefault(helpers.isArray(value) ? value[index] : value, defaultValue);\r\n\t},\r\n\r\n\t/**\r\n\t * Calls `fn` with the given `args` in the scope defined by `thisArg` and returns the\r\n\t * value returned by `fn`. If `fn` is not a function, this method returns undefined.\r\n\t * @param {function} fn - The function to call.\r\n\t * @param {Array|undefined|null} args - The arguments with which `fn` should be called.\r\n\t * @param {object} [thisArg] - The value of `this` provided for the call to `fn`.\r\n\t * @returns {*}\r\n\t */\r\n\tcallback: function(fn, args, thisArg) {\r\n\t\tif (fn && typeof fn.call === 'function') {\r\n\t\t\treturn fn.apply(thisArg, args);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Note(SB) for performance sake, this method should only be used when loopable type\r\n\t * is unknown or in none intensive code (not called often and small loopable). Else\r\n\t * it's preferable to use a regular for() loop and save extra function calls.\r\n\t * @param {object|Array} loopable - The object or array to be iterated.\r\n\t * @param {function} fn - The function to call for each item.\r\n\t * @param {object} [thisArg] - The value of `this` provided for the call to `fn`.\r\n\t * @param {boolean} [reverse] - If true, iterates backward on the loopable.\r\n\t */\r\n\teach: function(loopable, fn, thisArg, reverse) {\r\n\t\tvar i, len, keys;\r\n\t\tif (helpers.isArray(loopable)) {\r\n\t\t\tlen = loopable.length;\r\n\t\t\tif (reverse) {\r\n\t\t\t\tfor (i = len - 1; i >= 0; i--) {\r\n\t\t\t\t\tfn.call(thisArg, loopable[i], i);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (i = 0; i < len; i++) {\r\n\t\t\t\t\tfn.call(thisArg, loopable[i], i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (helpers.isObject(loopable)) {\r\n\t\t\tkeys = Object.keys(loopable);\r\n\t\t\tlen = keys.length;\r\n\t\t\tfor (i = 0; i < len; i++) {\r\n\t\t\t\tfn.call(thisArg, loopable[keys[i]], keys[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Returns true if the `a0` and `a1` arrays have the same content, else returns false.\r\n\t * @see https://stackoverflow.com/a/14853974\r\n\t * @param {Array} a0 - The array to compare\r\n\t * @param {Array} a1 - The array to compare\r\n\t * @returns {boolean}\r\n\t */\r\n\tarrayEquals: function(a0, a1) {\r\n\t\tvar i, ilen, v0, v1;\r\n\r\n\t\tif (!a0 || !a1 || a0.length !== a1.length) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = a0.length; i < ilen; ++i) {\r\n\t\t\tv0 = a0[i];\r\n\t\t\tv1 = a1[i];\r\n\r\n\t\t\tif (v0 instanceof Array && v1 instanceof Array) {\r\n\t\t\t\tif (!helpers.arrayEquals(v0, v1)) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t} else if (v0 !== v1) {\r\n\t\t\t\t// NOTE: two different object instances will never be equal: {x:20} != {x:20}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns a deep copy of `source` without keeping references on objects and arrays.\r\n\t * @param {*} source - The value to clone.\r\n\t * @returns {*}\r\n\t */\r\n\tclone: function(source) {\r\n\t\tif (helpers.isArray(source)) {\r\n\t\t\treturn source.map(helpers.clone);\r\n\t\t}\r\n\r\n\t\tif (helpers.isObject(source)) {\r\n\t\t\tvar target = Object.create(source);\r\n\t\t\tvar keys = Object.keys(source);\r\n\t\t\tvar klen = keys.length;\r\n\t\t\tvar k = 0;\r\n\r\n\t\t\tfor (; k < klen; ++k) {\r\n\t\t\t\ttarget[keys[k]] = helpers.clone(source[keys[k]]);\r\n\t\t\t}\r\n\r\n\t\t\treturn target;\r\n\t\t}\r\n\r\n\t\treturn source;\r\n\t},\r\n\r\n\t/**\r\n\t * The default merger when Chart.helpers.merge is called without merger option.\r\n\t * Note(SB): also used by mergeConfig and mergeScaleConfig as fallback.\r\n\t * @private\r\n\t */\r\n\t_merger: function(key, target, source, options) {\r\n\t\tif (!isValidKey(key)) {\r\n\t\t\t// We want to ensure we do not copy prototypes over\r\n\t\t\t// as this can pollute global namespaces\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar tval = target[key];\r\n\t\tvar sval = source[key];\r\n\r\n\t\tif (helpers.isObject(tval) && helpers.isObject(sval)) {\r\n\t\t\thelpers.merge(tval, sval, options);\r\n\t\t} else {\r\n\t\t\ttarget[key] = helpers.clone(sval);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Merges source[key] in target[key] only if target[key] is undefined.\r\n\t * @private\r\n\t */\r\n\t_mergerIf: function(key, target, source) {\r\n\t\tif (!isValidKey(key)) {\r\n\t\t\t// We want to ensure we do not copy prototypes over\r\n\t\t\t// as this can pollute global namespaces\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar tval = target[key];\r\n\t\tvar sval = source[key];\r\n\r\n\t\tif (helpers.isObject(tval) && helpers.isObject(sval)) {\r\n\t\t\thelpers.mergeIf(tval, sval);\r\n\t\t} else if (!target.hasOwnProperty(key)) {\r\n\t\t\ttarget[key] = helpers.clone(sval);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Recursively deep copies `source` properties into `target` with the given `options`.\r\n\t * IMPORTANT: `target` is not cloned and will be updated with `source` properties.\r\n\t * @param {object} target - The target object in which all sources are merged into.\r\n\t * @param {object|object[]} source - Object(s) to merge into `target`.\r\n\t * @param {object} [options] - Merging options:\r\n\t * @param {function} [options.merger] - The merge method (key, target, source, options)\r\n\t * @returns {object} The `target` object.\r\n\t */\r\n\tmerge: function(target, source, options) {\r\n\t\tvar sources = helpers.isArray(source) ? source : [source];\r\n\t\tvar ilen = sources.length;\r\n\t\tvar merge, i, keys, klen, k;\r\n\r\n\t\tif (!helpers.isObject(target)) {\r\n\t\t\treturn target;\r\n\t\t}\r\n\r\n\t\toptions = options || {};\r\n\t\tmerge = options.merger || helpers._merger;\r\n\r\n\t\tfor (i = 0; i < ilen; ++i) {\r\n\t\t\tsource = sources[i];\r\n\t\t\tif (!helpers.isObject(source)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tkeys = Object.keys(source);\r\n\t\t\tfor (k = 0, klen = keys.length; k < klen; ++k) {\r\n\t\t\t\tmerge(keys[k], target, source, options);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn target;\r\n\t},\r\n\r\n\t/**\r\n\t * Recursively deep copies `source` properties into `target` *only* if not defined in target.\r\n\t * IMPORTANT: `target` is not cloned and will be updated with `source` properties.\r\n\t * @param {object} target - The target object in which all sources are merged into.\r\n\t * @param {object|object[]} source - Object(s) to merge into `target`.\r\n\t * @returns {object} The `target` object.\r\n\t */\r\n\tmergeIf: function(target, source) {\r\n\t\treturn helpers.merge(target, source, {merger: helpers._mergerIf});\r\n\t},\r\n\r\n\t/**\r\n\t * Applies the contents of two or more objects together into the first object.\r\n\t * @param {object} target - The target object in which all objects are merged into.\r\n\t * @param {object} arg1 - Object containing additional properties to merge in target.\r\n\t * @param {object} argN - Additional objects containing properties to merge in target.\r\n\t * @returns {object} The `target` object.\r\n\t */\r\n\textend: Object.assign || function(target) {\r\n\t\treturn helpers.merge(target, [].slice.call(arguments, 1), {\r\n\t\t\tmerger: function(key, dst, src) {\r\n\t\t\t\tdst[key] = src[key];\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\t/**\r\n\t * Basic javascript inheritance based on the model created in Backbone.js\r\n\t */\r\n\tinherits: function(extensions) {\r\n\t\tvar me = this;\r\n\t\tvar ChartElement = (extensions && extensions.hasOwnProperty('constructor')) ? extensions.constructor : function() {\r\n\t\t\treturn me.apply(this, arguments);\r\n\t\t};\r\n\r\n\t\tvar Surrogate = function() {\r\n\t\t\tthis.constructor = ChartElement;\r\n\t\t};\r\n\r\n\t\tSurrogate.prototype = me.prototype;\r\n\t\tChartElement.prototype = new Surrogate();\r\n\t\tChartElement.extend = helpers.inherits;\r\n\r\n\t\tif (extensions) {\r\n\t\t\thelpers.extend(ChartElement.prototype, extensions);\r\n\t\t}\r\n\r\n\t\tChartElement.__super__ = me.prototype;\r\n\t\treturn ChartElement;\r\n\t},\r\n\r\n\t_deprecated: function(scope, value, previous, current) {\r\n\t\tif (value !== undefined) {\r\n\t\t\tconsole.warn(scope + ': \"' + previous +\r\n\t\t\t\t'\" is deprecated. Please use \"' + current + '\" instead');\r\n\t\t}\r\n\t}\r\n};\r\n\r\nvar helpers_core = helpers;\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.callback instead.\r\n * @function Chart.helpers.callCallback\r\n * @deprecated since version 2.6.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers.callCallback = helpers.callback;\r\n\r\n/**\r\n * Provided for backward compatibility, use Array.prototype.indexOf instead.\r\n * Array.prototype.indexOf compatibility: Chrome, Opera, Safari, FF1.5+, IE9+\r\n * @function Chart.helpers.indexOf\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers.indexOf = function(array, item, fromIndex) {\r\n\treturn Array.prototype.indexOf.call(array, item, fromIndex);\r\n};\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.valueOrDefault instead.\r\n * @function Chart.helpers.getValueOrDefault\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers.getValueOrDefault = helpers.valueOrDefault;\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.valueAtIndexOrDefault instead.\r\n * @function Chart.helpers.getValueAtIndexOrDefault\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers.getValueAtIndexOrDefault = helpers.valueAtIndexOrDefault;\n\n/**\r\n * Easing functions adapted from Robert Penner's easing equations.\r\n * @namespace Chart.helpers.easingEffects\r\n * @see http://www.robertpenner.com/easing/\r\n */\r\nvar effects = {\r\n\tlinear: function(t) {\r\n\t\treturn t;\r\n\t},\r\n\r\n\teaseInQuad: function(t) {\r\n\t\treturn t * t;\r\n\t},\r\n\r\n\teaseOutQuad: function(t) {\r\n\t\treturn -t * (t - 2);\r\n\t},\r\n\r\n\teaseInOutQuad: function(t) {\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * t * t;\r\n\t\t}\r\n\t\treturn -0.5 * ((--t) * (t - 2) - 1);\r\n\t},\r\n\r\n\teaseInCubic: function(t) {\r\n\t\treturn t * t * t;\r\n\t},\r\n\r\n\teaseOutCubic: function(t) {\r\n\t\treturn (t = t - 1) * t * t + 1;\r\n\t},\r\n\r\n\teaseInOutCubic: function(t) {\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * t * t * t;\r\n\t\t}\r\n\t\treturn 0.5 * ((t -= 2) * t * t + 2);\r\n\t},\r\n\r\n\teaseInQuart: function(t) {\r\n\t\treturn t * t * t * t;\r\n\t},\r\n\r\n\teaseOutQuart: function(t) {\r\n\t\treturn -((t = t - 1) * t * t * t - 1);\r\n\t},\r\n\r\n\teaseInOutQuart: function(t) {\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * t * t * t * t;\r\n\t\t}\r\n\t\treturn -0.5 * ((t -= 2) * t * t * t - 2);\r\n\t},\r\n\r\n\teaseInQuint: function(t) {\r\n\t\treturn t * t * t * t * t;\r\n\t},\r\n\r\n\teaseOutQuint: function(t) {\r\n\t\treturn (t = t - 1) * t * t * t * t + 1;\r\n\t},\r\n\r\n\teaseInOutQuint: function(t) {\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * t * t * t * t * t;\r\n\t\t}\r\n\t\treturn 0.5 * ((t -= 2) * t * t * t * t + 2);\r\n\t},\r\n\r\n\teaseInSine: function(t) {\r\n\t\treturn -Math.cos(t * (Math.PI / 2)) + 1;\r\n\t},\r\n\r\n\teaseOutSine: function(t) {\r\n\t\treturn Math.sin(t * (Math.PI / 2));\r\n\t},\r\n\r\n\teaseInOutSine: function(t) {\r\n\t\treturn -0.5 * (Math.cos(Math.PI * t) - 1);\r\n\t},\r\n\r\n\teaseInExpo: function(t) {\r\n\t\treturn (t === 0) ? 0 : Math.pow(2, 10 * (t - 1));\r\n\t},\r\n\r\n\teaseOutExpo: function(t) {\r\n\t\treturn (t === 1) ? 1 : -Math.pow(2, -10 * t) + 1;\r\n\t},\r\n\r\n\teaseInOutExpo: function(t) {\r\n\t\tif (t === 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tif (t === 1) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * Math.pow(2, 10 * (t - 1));\r\n\t\t}\r\n\t\treturn 0.5 * (-Math.pow(2, -10 * --t) + 2);\r\n\t},\r\n\r\n\teaseInCirc: function(t) {\r\n\t\tif (t >= 1) {\r\n\t\t\treturn t;\r\n\t\t}\r\n\t\treturn -(Math.sqrt(1 - t * t) - 1);\r\n\t},\r\n\r\n\teaseOutCirc: function(t) {\r\n\t\treturn Math.sqrt(1 - (t = t - 1) * t);\r\n\t},\r\n\r\n\teaseInOutCirc: function(t) {\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn -0.5 * (Math.sqrt(1 - t * t) - 1);\r\n\t\t}\r\n\t\treturn 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1);\r\n\t},\r\n\r\n\teaseInElastic: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\tvar p = 0;\r\n\t\tvar a = 1;\r\n\t\tif (t === 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tif (t === 1) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif (!p) {\r\n\t\t\tp = 0.3;\r\n\t\t}\r\n\t\tif (a < 1) {\r\n\t\t\ta = 1;\r\n\t\t\ts = p / 4;\r\n\t\t} else {\r\n\t\t\ts = p / (2 * Math.PI) * Math.asin(1 / a);\r\n\t\t}\r\n\t\treturn -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p));\r\n\t},\r\n\r\n\teaseOutElastic: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\tvar p = 0;\r\n\t\tvar a = 1;\r\n\t\tif (t === 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tif (t === 1) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif (!p) {\r\n\t\t\tp = 0.3;\r\n\t\t}\r\n\t\tif (a < 1) {\r\n\t\t\ta = 1;\r\n\t\t\ts = p / 4;\r\n\t\t} else {\r\n\t\t\ts = p / (2 * Math.PI) * Math.asin(1 / a);\r\n\t\t}\r\n\t\treturn a * Math.pow(2, -10 * t) * Math.sin((t - s) * (2 * Math.PI) / p) + 1;\r\n\t},\r\n\r\n\teaseInOutElastic: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\tvar p = 0;\r\n\t\tvar a = 1;\r\n\t\tif (t === 0) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tif ((t /= 0.5) === 2) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\tif (!p) {\r\n\t\t\tp = 0.45;\r\n\t\t}\r\n\t\tif (a < 1) {\r\n\t\t\ta = 1;\r\n\t\t\ts = p / 4;\r\n\t\t} else {\r\n\t\t\ts = p / (2 * Math.PI) * Math.asin(1 / a);\r\n\t\t}\r\n\t\tif (t < 1) {\r\n\t\t\treturn -0.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p));\r\n\t\t}\r\n\t\treturn a * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - s) * (2 * Math.PI) / p) * 0.5 + 1;\r\n\t},\r\n\teaseInBack: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\treturn t * t * ((s + 1) * t - s);\r\n\t},\r\n\r\n\teaseOutBack: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\treturn (t = t - 1) * t * ((s + 1) * t + s) + 1;\r\n\t},\r\n\r\n\teaseInOutBack: function(t) {\r\n\t\tvar s = 1.70158;\r\n\t\tif ((t /= 0.5) < 1) {\r\n\t\t\treturn 0.5 * (t * t * (((s *= (1.525)) + 1) * t - s));\r\n\t\t}\r\n\t\treturn 0.5 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2);\r\n\t},\r\n\r\n\teaseInBounce: function(t) {\r\n\t\treturn 1 - effects.easeOutBounce(1 - t);\r\n\t},\r\n\r\n\teaseOutBounce: function(t) {\r\n\t\tif (t < (1 / 2.75)) {\r\n\t\t\treturn 7.5625 * t * t;\r\n\t\t}\r\n\t\tif (t < (2 / 2.75)) {\r\n\t\t\treturn 7.5625 * (t -= (1.5 / 2.75)) * t + 0.75;\r\n\t\t}\r\n\t\tif (t < (2.5 / 2.75)) {\r\n\t\t\treturn 7.5625 * (t -= (2.25 / 2.75)) * t + 0.9375;\r\n\t\t}\r\n\t\treturn 7.5625 * (t -= (2.625 / 2.75)) * t + 0.984375;\r\n\t},\r\n\r\n\teaseInOutBounce: function(t) {\r\n\t\tif (t < 0.5) {\r\n\t\t\treturn effects.easeInBounce(t * 2) * 0.5;\r\n\t\t}\r\n\t\treturn effects.easeOutBounce(t * 2 - 1) * 0.5 + 0.5;\r\n\t}\r\n};\r\n\r\nvar helpers_easing = {\r\n\teffects: effects\r\n};\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.easing.effects instead.\r\n * @function Chart.helpers.easingEffects\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers_core.easingEffects = effects;\n\nvar PI = Math.PI;\r\nvar RAD_PER_DEG = PI / 180;\r\nvar DOUBLE_PI = PI * 2;\r\nvar HALF_PI = PI / 2;\r\nvar QUARTER_PI = PI / 4;\r\nvar TWO_THIRDS_PI = PI * 2 / 3;\r\n\r\n/**\r\n * @namespace Chart.helpers.canvas\r\n */\r\nvar exports$1 = {\r\n\t/**\r\n\t * Clears the entire canvas associated to the given `chart`.\r\n\t * @param {Chart} chart - The chart for which to clear the canvas.\r\n\t */\r\n\tclear: function(chart) {\r\n\t\tchart.ctx.clearRect(0, 0, chart.width, chart.height);\r\n\t},\r\n\r\n\t/**\r\n\t * Creates a \"path\" for a rectangle with rounded corners at position (x, y) with a\r\n\t * given size (width, height) and the same `radius` for all corners.\r\n\t * @param {CanvasRenderingContext2D} ctx - The canvas 2D Context.\r\n\t * @param {number} x - The x axis of the coordinate for the rectangle starting point.\r\n\t * @param {number} y - The y axis of the coordinate for the rectangle starting point.\r\n\t * @param {number} width - The rectangle's width.\r\n\t * @param {number} height - The rectangle's height.\r\n\t * @param {number} radius - The rounded amount (in pixels) for the four corners.\r\n\t * @todo handle `radius` as top-left, top-right, bottom-right, bottom-left array/object?\r\n\t */\r\n\troundedRect: function(ctx, x, y, width, height, radius) {\r\n\t\tif (radius) {\r\n\t\t\tvar r = Math.min(radius, height / 2, width / 2);\r\n\t\t\tvar left = x + r;\r\n\t\t\tvar top = y + r;\r\n\t\t\tvar right = x + width - r;\r\n\t\t\tvar bottom = y + height - r;\r\n\r\n\t\t\tctx.moveTo(x, top);\r\n\t\t\tif (left < right && top < bottom) {\r\n\t\t\t\tctx.arc(left, top, r, -PI, -HALF_PI);\r\n\t\t\t\tctx.arc(right, top, r, -HALF_PI, 0);\r\n\t\t\t\tctx.arc(right, bottom, r, 0, HALF_PI);\r\n\t\t\t\tctx.arc(left, bottom, r, HALF_PI, PI);\r\n\t\t\t} else if (left < right) {\r\n\t\t\t\tctx.moveTo(left, y);\r\n\t\t\t\tctx.arc(right, top, r, -HALF_PI, HALF_PI);\r\n\t\t\t\tctx.arc(left, top, r, HALF_PI, PI + HALF_PI);\r\n\t\t\t} else if (top < bottom) {\r\n\t\t\t\tctx.arc(left, top, r, -PI, 0);\r\n\t\t\t\tctx.arc(left, bottom, r, 0, PI);\r\n\t\t\t} else {\r\n\t\t\t\tctx.arc(left, top, r, -PI, PI);\r\n\t\t\t}\r\n\t\t\tctx.closePath();\r\n\t\t\tctx.moveTo(x, y);\r\n\t\t} else {\r\n\t\t\tctx.rect(x, y, width, height);\r\n\t\t}\r\n\t},\r\n\r\n\tdrawPoint: function(ctx, style, radius, x, y, rotation) {\r\n\t\tvar type, xOffset, yOffset, size, cornerRadius;\r\n\t\tvar rad = (rotation || 0) * RAD_PER_DEG;\r\n\r\n\t\tif (style && typeof style === 'object') {\r\n\t\t\ttype = style.toString();\r\n\t\t\tif (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') {\r\n\t\t\t\tctx.save();\r\n\t\t\t\tctx.translate(x, y);\r\n\t\t\t\tctx.rotate(rad);\r\n\t\t\t\tctx.drawImage(style, -style.width / 2, -style.height / 2, style.width, style.height);\r\n\t\t\t\tctx.restore();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (isNaN(radius) || radius <= 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tctx.beginPath();\r\n\r\n\t\tswitch (style) {\r\n\t\t// Default includes circle\r\n\t\tdefault:\r\n\t\t\tctx.arc(x, y, radius, 0, DOUBLE_PI);\r\n\t\t\tctx.closePath();\r\n\t\t\tbreak;\r\n\t\tcase 'triangle':\r\n\t\t\tctx.moveTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\r\n\t\t\trad += TWO_THIRDS_PI;\r\n\t\t\tctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\r\n\t\t\trad += TWO_THIRDS_PI;\r\n\t\t\tctx.lineTo(x + Math.sin(rad) * radius, y - Math.cos(rad) * radius);\r\n\t\t\tctx.closePath();\r\n\t\t\tbreak;\r\n\t\tcase 'rectRounded':\r\n\t\t\t// NOTE: the rounded rect implementation changed to use `arc` instead of\r\n\t\t\t// `quadraticCurveTo` since it generates better results when rect is\r\n\t\t\t// almost a circle. 0.516 (instead of 0.5) produces results with visually\r\n\t\t\t// closer proportion to the previous impl and it is inscribed in the\r\n\t\t\t// circle with `radius`. For more details, see the following PRs:\r\n\t\t\t// https://github.com/chartjs/Chart.js/issues/5597\r\n\t\t\t// https://github.com/chartjs/Chart.js/issues/5858\r\n\t\t\tcornerRadius = radius * 0.516;\r\n\t\t\tsize = radius - cornerRadius;\r\n\t\t\txOffset = Math.cos(rad + QUARTER_PI) * size;\r\n\t\t\tyOffset = Math.sin(rad + QUARTER_PI) * size;\r\n\t\t\tctx.arc(x - xOffset, y - yOffset, cornerRadius, rad - PI, rad - HALF_PI);\r\n\t\t\tctx.arc(x + yOffset, y - xOffset, cornerRadius, rad - HALF_PI, rad);\r\n\t\t\tctx.arc(x + xOffset, y + yOffset, cornerRadius, rad, rad + HALF_PI);\r\n\t\t\tctx.arc(x - yOffset, y + xOffset, cornerRadius, rad + HALF_PI, rad + PI);\r\n\t\t\tctx.closePath();\r\n\t\t\tbreak;\r\n\t\tcase 'rect':\r\n\t\t\tif (!rotation) {\r\n\t\t\t\tsize = Math.SQRT1_2 * radius;\r\n\t\t\t\tctx.rect(x - size, y - size, 2 * size, 2 * size);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\trad += QUARTER_PI;\r\n\t\t\t/* falls through */\r\n\t\tcase 'rectRot':\r\n\t\t\txOffset = Math.cos(rad) * radius;\r\n\t\t\tyOffset = Math.sin(rad) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + yOffset, y - xOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tctx.lineTo(x - yOffset, y + xOffset);\r\n\t\t\tctx.closePath();\r\n\t\t\tbreak;\r\n\t\tcase 'crossRot':\r\n\t\t\trad += QUARTER_PI;\r\n\t\t\t/* falls through */\r\n\t\tcase 'cross':\r\n\t\t\txOffset = Math.cos(rad) * radius;\r\n\t\t\tyOffset = Math.sin(rad) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tctx.moveTo(x + yOffset, y - xOffset);\r\n\t\t\tctx.lineTo(x - yOffset, y + xOffset);\r\n\t\t\tbreak;\r\n\t\tcase 'star':\r\n\t\t\txOffset = Math.cos(rad) * radius;\r\n\t\t\tyOffset = Math.sin(rad) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tctx.moveTo(x + yOffset, y - xOffset);\r\n\t\t\tctx.lineTo(x - yOffset, y + xOffset);\r\n\t\t\trad += QUARTER_PI;\r\n\t\t\txOffset = Math.cos(rad) * radius;\r\n\t\t\tyOffset = Math.sin(rad) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tctx.moveTo(x + yOffset, y - xOffset);\r\n\t\t\tctx.lineTo(x - yOffset, y + xOffset);\r\n\t\t\tbreak;\r\n\t\tcase 'line':\r\n\t\t\txOffset = Math.cos(rad) * radius;\r\n\t\t\tyOffset = Math.sin(rad) * radius;\r\n\t\t\tctx.moveTo(x - xOffset, y - yOffset);\r\n\t\t\tctx.lineTo(x + xOffset, y + yOffset);\r\n\t\t\tbreak;\r\n\t\tcase 'dash':\r\n\t\t\tctx.moveTo(x, y);\r\n\t\t\tctx.lineTo(x + Math.cos(rad) * radius, y + Math.sin(rad) * radius);\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tctx.fill();\r\n\t\tctx.stroke();\r\n\t},\r\n\r\n\t/**\r\n\t * Returns true if the point is inside the rectangle\r\n\t * @param {object} point - The point to test\r\n\t * @param {object} area - The rectangle\r\n\t * @returns {boolean}\r\n\t * @private\r\n\t */\r\n\t_isPointInArea: function(point, area) {\r\n\t\tvar epsilon = 1e-6; // 1e-6 is margin in pixels for accumulated error.\r\n\r\n\t\treturn point.x > area.left - epsilon && point.x < area.right + epsilon &&\r\n\t\t\tpoint.y > area.top - epsilon && point.y < area.bottom + epsilon;\r\n\t},\r\n\r\n\tclipArea: function(ctx, area) {\r\n\t\tctx.save();\r\n\t\tctx.beginPath();\r\n\t\tctx.rect(area.left, area.top, area.right - area.left, area.bottom - area.top);\r\n\t\tctx.clip();\r\n\t},\r\n\r\n\tunclipArea: function(ctx) {\r\n\t\tctx.restore();\r\n\t},\r\n\r\n\tlineTo: function(ctx, previous, target, flip) {\r\n\t\tvar stepped = target.steppedLine;\r\n\t\tif (stepped) {\r\n\t\t\tif (stepped === 'middle') {\r\n\t\t\t\tvar midpoint = (previous.x + target.x) / 2.0;\r\n\t\t\t\tctx.lineTo(midpoint, flip ? target.y : previous.y);\r\n\t\t\t\tctx.lineTo(midpoint, flip ? previous.y : target.y);\r\n\t\t\t} else if ((stepped === 'after' && !flip) || (stepped !== 'after' && flip)) {\r\n\t\t\t\tctx.lineTo(previous.x, target.y);\r\n\t\t\t} else {\r\n\t\t\t\tctx.lineTo(target.x, previous.y);\r\n\t\t\t}\r\n\t\t\tctx.lineTo(target.x, target.y);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!target.tension) {\r\n\t\t\tctx.lineTo(target.x, target.y);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tctx.bezierCurveTo(\r\n\t\t\tflip ? previous.controlPointPreviousX : previous.controlPointNextX,\r\n\t\t\tflip ? previous.controlPointPreviousY : previous.controlPointNextY,\r\n\t\t\tflip ? target.controlPointNextX : target.controlPointPreviousX,\r\n\t\t\tflip ? target.controlPointNextY : target.controlPointPreviousY,\r\n\t\t\ttarget.x,\r\n\t\t\ttarget.y);\r\n\t}\r\n};\r\n\r\nvar helpers_canvas = exports$1;\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.canvas.clear instead.\r\n * @namespace Chart.helpers.clear\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers_core.clear = exports$1.clear;\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.canvas.roundedRect instead.\r\n * @namespace Chart.helpers.drawRoundedRectangle\r\n * @deprecated since version 2.7.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers_core.drawRoundedRectangle = function(ctx) {\r\n\tctx.beginPath();\r\n\texports$1.roundedRect.apply(exports$1, arguments);\r\n};\n\nvar defaults = {\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_set: function(scope, values) {\r\n\t\treturn helpers_core.merge(this[scope] || (this[scope] = {}), values);\r\n\t}\r\n};\r\n\r\n// TODO(v3): remove 'global' from namespace. all default are global and\r\n// there's inconsistency around which options are under 'global'\r\ndefaults._set('global', {\r\n\tdefaultColor: 'rgba(0,0,0,0.1)',\r\n\tdefaultFontColor: '#666',\r\n\tdefaultFontFamily: \"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif\",\r\n\tdefaultFontSize: 12,\r\n\tdefaultFontStyle: 'normal',\r\n\tdefaultLineHeight: 1.2,\r\n\tshowLines: true\r\n});\r\n\r\nvar core_defaults = defaults;\n\nvar valueOrDefault = helpers_core.valueOrDefault;\r\n\r\n/**\r\n * Converts the given font object into a CSS font string.\r\n * @param {object} font - A font object.\r\n * @return {string} The CSS font string. See https://developer.mozilla.org/en-US/docs/Web/CSS/font\r\n * @private\r\n */\r\nfunction toFontString(font) {\r\n\tif (!font || helpers_core.isNullOrUndef(font.size) || helpers_core.isNullOrUndef(font.family)) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\treturn (font.style ? font.style + ' ' : '')\r\n\t\t+ (font.weight ? font.weight + ' ' : '')\r\n\t\t+ font.size + 'px '\r\n\t\t+ font.family;\r\n}\r\n\r\n/**\r\n * @alias Chart.helpers.options\r\n * @namespace\r\n */\r\nvar helpers_options = {\r\n\t/**\r\n\t * Converts the given line height `value` in pixels for a specific font `size`.\r\n\t * @param {number|string} value - The lineHeight to parse (eg. 1.6, '14px', '75%', '1.6em').\r\n\t * @param {number} size - The font size (in pixels) used to resolve relative `value`.\r\n\t * @returns {number} The effective line height in pixels (size * 1.2 if value is invalid).\r\n\t * @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height\r\n\t * @since 2.7.0\r\n\t */\r\n\ttoLineHeight: function(value, size) {\r\n\t\tvar matches = ('' + value).match(/^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/);\r\n\t\tif (!matches || matches[1] === 'normal') {\r\n\t\t\treturn size * 1.2;\r\n\t\t}\r\n\r\n\t\tvalue = +matches[2];\r\n\r\n\t\tswitch (matches[3]) {\r\n\t\tcase 'px':\r\n\t\t\treturn value;\r\n\t\tcase '%':\r\n\t\t\tvalue /= 100;\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\treturn size * value;\r\n\t},\r\n\r\n\t/**\r\n\t * Converts the given value into a padding object with pre-computed width/height.\r\n\t * @param {number|object} value - If a number, set the value to all TRBL component,\r\n\t * else, if and object, use defined properties and sets undefined ones to 0.\r\n\t * @returns {object} The padding values (top, right, bottom, left, width, height)\r\n\t * @since 2.7.0\r\n\t */\r\n\ttoPadding: function(value) {\r\n\t\tvar t, r, b, l;\r\n\r\n\t\tif (helpers_core.isObject(value)) {\r\n\t\t\tt = +value.top || 0;\r\n\t\t\tr = +value.right || 0;\r\n\t\t\tb = +value.bottom || 0;\r\n\t\t\tl = +value.left || 0;\r\n\t\t} else {\r\n\t\t\tt = r = b = l = +value || 0;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\ttop: t,\r\n\t\t\tright: r,\r\n\t\t\tbottom: b,\r\n\t\t\tleft: l,\r\n\t\t\theight: t + b,\r\n\t\t\twidth: l + r\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * Parses font options and returns the font object.\r\n\t * @param {object} options - A object that contains font options to be parsed.\r\n\t * @return {object} The font object.\r\n\t * @todo Support font.* options and renamed to toFont().\r\n\t * @private\r\n\t */\r\n\t_parseFont: function(options) {\r\n\t\tvar globalDefaults = core_defaults.global;\r\n\t\tvar size = valueOrDefault(options.fontSize, globalDefaults.defaultFontSize);\r\n\t\tvar font = {\r\n\t\t\tfamily: valueOrDefault(options.fontFamily, globalDefaults.defaultFontFamily),\r\n\t\t\tlineHeight: helpers_core.options.toLineHeight(valueOrDefault(options.lineHeight, globalDefaults.defaultLineHeight), size),\r\n\t\t\tsize: size,\r\n\t\t\tstyle: valueOrDefault(options.fontStyle, globalDefaults.defaultFontStyle),\r\n\t\t\tweight: null,\r\n\t\t\tstring: ''\r\n\t\t};\r\n\r\n\t\tfont.string = toFontString(font);\r\n\t\treturn font;\r\n\t},\r\n\r\n\t/**\r\n\t * Evaluates the given `inputs` sequentially and returns the first defined value.\r\n\t * @param {Array} inputs - An array of values, falling back to the last value.\r\n\t * @param {object} [context] - If defined and the current value is a function, the value\r\n\t * is called with `context` as first argument and the result becomes the new input.\r\n\t * @param {number} [index] - If defined and the current value is an array, the value\r\n\t * at `index` become the new input.\r\n\t * @param {object} [info] - object to return information about resolution in\r\n\t * @param {boolean} [info.cacheable] - Will be set to `false` if option is not cacheable.\r\n\t * @since 2.7.0\r\n\t */\r\n\tresolve: function(inputs, context, index, info) {\r\n\t\tvar cacheable = true;\r\n\t\tvar i, ilen, value;\r\n\r\n\t\tfor (i = 0, ilen = inputs.length; i < ilen; ++i) {\r\n\t\t\tvalue = inputs[i];\r\n\t\t\tif (value === undefined) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (context !== undefined && typeof value === 'function') {\r\n\t\t\t\tvalue = value(context);\r\n\t\t\t\tcacheable = false;\r\n\t\t\t}\r\n\t\t\tif (index !== undefined && helpers_core.isArray(value)) {\r\n\t\t\t\tvalue = value[index];\r\n\t\t\t\tcacheable = false;\r\n\t\t\t}\r\n\t\t\tif (value !== undefined) {\r\n\t\t\t\tif (info && !cacheable) {\r\n\t\t\t\t\tinfo.cacheable = false;\r\n\t\t\t\t}\r\n\t\t\t\treturn value;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\n\n/**\r\n * @alias Chart.helpers.math\r\n * @namespace\r\n */\r\nvar exports$2 = {\r\n\t/**\r\n\t * Returns an array of factors sorted from 1 to sqrt(value)\r\n\t * @private\r\n\t */\r\n\t_factorize: function(value) {\r\n\t\tvar result = [];\r\n\t\tvar sqrt = Math.sqrt(value);\r\n\t\tvar i;\r\n\r\n\t\tfor (i = 1; i < sqrt; i++) {\r\n\t\t\tif (value % i === 0) {\r\n\t\t\t\tresult.push(i);\r\n\t\t\t\tresult.push(value / i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (sqrt === (sqrt | 0)) { // if value is a square number\r\n\t\t\tresult.push(sqrt);\r\n\t\t}\r\n\r\n\t\tresult.sort(function(a, b) {\r\n\t\t\treturn a - b;\r\n\t\t}).pop();\r\n\t\treturn result;\r\n\t},\r\n\r\n\tlog10: Math.log10 || function(x) {\r\n\t\tvar exponent = Math.log(x) * Math.LOG10E; // Math.LOG10E = 1 / Math.LN10.\r\n\t\t// Check for whole powers of 10,\r\n\t\t// which due to floating point rounding error should be corrected.\r\n\t\tvar powerOf10 = Math.round(exponent);\r\n\t\tvar isPowerOf10 = x === Math.pow(10, powerOf10);\r\n\r\n\t\treturn isPowerOf10 ? powerOf10 : exponent;\r\n\t}\r\n};\r\n\r\nvar helpers_math = exports$2;\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.helpers.math.log10 instead.\r\n * @namespace Chart.helpers.log10\r\n * @deprecated since version 2.9.0\r\n * @todo remove at version 3\r\n * @private\r\n */\r\nhelpers_core.log10 = exports$2.log10;\n\nvar getRtlAdapter = function(rectX, width) {\r\n\treturn {\r\n\t\tx: function(x) {\r\n\t\t\treturn rectX + rectX + width - x;\r\n\t\t},\r\n\t\tsetWidth: function(w) {\r\n\t\t\twidth = w;\r\n\t\t},\r\n\t\ttextAlign: function(align) {\r\n\t\t\tif (align === 'center') {\r\n\t\t\t\treturn align;\r\n\t\t\t}\r\n\t\t\treturn align === 'right' ? 'left' : 'right';\r\n\t\t},\r\n\t\txPlus: function(x, value) {\r\n\t\t\treturn x - value;\r\n\t\t},\r\n\t\tleftForLtr: function(x, itemWidth) {\r\n\t\t\treturn x - itemWidth;\r\n\t\t},\r\n\t};\r\n};\r\n\r\nvar getLtrAdapter = function() {\r\n\treturn {\r\n\t\tx: function(x) {\r\n\t\t\treturn x;\r\n\t\t},\r\n\t\tsetWidth: function(w) { // eslint-disable-line no-unused-vars\r\n\t\t},\r\n\t\ttextAlign: function(align) {\r\n\t\t\treturn align;\r\n\t\t},\r\n\t\txPlus: function(x, value) {\r\n\t\t\treturn x + value;\r\n\t\t},\r\n\t\tleftForLtr: function(x, _itemWidth) { // eslint-disable-line no-unused-vars\r\n\t\t\treturn x;\r\n\t\t},\r\n\t};\r\n};\r\n\r\nvar getAdapter = function(rtl, rectX, width) {\r\n\treturn rtl ? getRtlAdapter(rectX, width) : getLtrAdapter();\r\n};\r\n\r\nvar overrideTextDirection = function(ctx, direction) {\r\n\tvar style, original;\r\n\tif (direction === 'ltr' || direction === 'rtl') {\r\n\t\tstyle = ctx.canvas.style;\r\n\t\toriginal = [\r\n\t\t\tstyle.getPropertyValue('direction'),\r\n\t\t\tstyle.getPropertyPriority('direction'),\r\n\t\t];\r\n\r\n\t\tstyle.setProperty('direction', direction, 'important');\r\n\t\tctx.prevTextDirection = original;\r\n\t}\r\n};\r\n\r\nvar restoreTextDirection = function(ctx) {\r\n\tvar original = ctx.prevTextDirection;\r\n\tif (original !== undefined) {\r\n\t\tdelete ctx.prevTextDirection;\r\n\t\tctx.canvas.style.setProperty('direction', original[0], original[1]);\r\n\t}\r\n};\r\n\r\nvar helpers_rtl = {\r\n\tgetRtlAdapter: getAdapter,\r\n\toverrideTextDirection: overrideTextDirection,\r\n\trestoreTextDirection: restoreTextDirection,\r\n};\n\nvar helpers$1 = helpers_core;\r\nvar easing = helpers_easing;\r\nvar canvas = helpers_canvas;\r\nvar options = helpers_options;\r\nvar math = helpers_math;\r\nvar rtl = helpers_rtl;\nhelpers$1.easing = easing;\nhelpers$1.canvas = canvas;\nhelpers$1.options = options;\nhelpers$1.math = math;\nhelpers$1.rtl = rtl;\n\nfunction interpolate(start, view, model, ease) {\r\n\tvar keys = Object.keys(model);\r\n\tvar i, ilen, key, actual, origin, target, type, c0, c1;\r\n\r\n\tfor (i = 0, ilen = keys.length; i < ilen; ++i) {\r\n\t\tkey = keys[i];\r\n\r\n\t\ttarget = model[key];\r\n\r\n\t\t// if a value is added to the model after pivot() has been called, the view\r\n\t\t// doesn't contain it, so let's initialize the view to the target value.\r\n\t\tif (!view.hasOwnProperty(key)) {\r\n\t\t\tview[key] = target;\r\n\t\t}\r\n\r\n\t\tactual = view[key];\r\n\r\n\t\tif (actual === target || key[0] === '_') {\r\n\t\t\tcontinue;\r\n\t\t}\r\n\r\n\t\tif (!start.hasOwnProperty(key)) {\r\n\t\t\tstart[key] = actual;\r\n\t\t}\r\n\r\n\t\torigin = start[key];\r\n\r\n\t\ttype = typeof target;\r\n\r\n\t\tif (type === typeof origin) {\r\n\t\t\tif (type === 'string') {\r\n\t\t\t\tc0 = chartjsColor(origin);\r\n\t\t\t\tif (c0.valid) {\r\n\t\t\t\t\tc1 = chartjsColor(target);\r\n\t\t\t\t\tif (c1.valid) {\r\n\t\t\t\t\t\tview[key] = c1.mix(c0, ease).rgbString();\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else if (helpers$1.isFinite(origin) && helpers$1.isFinite(target)) {\r\n\t\t\t\tview[key] = origin + (target - origin) * ease;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tview[key] = target;\r\n\t}\r\n}\r\n\r\nvar Element = function(configuration) {\r\n\thelpers$1.extend(this, configuration);\r\n\tthis.initialize.apply(this, arguments);\r\n};\r\n\r\nhelpers$1.extend(Element.prototype, {\r\n\t_type: undefined,\r\n\r\n\tinitialize: function() {\r\n\t\tthis.hidden = false;\r\n\t},\r\n\r\n\tpivot: function() {\r\n\t\tvar me = this;\r\n\t\tif (!me._view) {\r\n\t\t\tme._view = helpers$1.extend({}, me._model);\r\n\t\t}\r\n\t\tme._start = {};\r\n\t\treturn me;\r\n\t},\r\n\r\n\ttransition: function(ease) {\r\n\t\tvar me = this;\r\n\t\tvar model = me._model;\r\n\t\tvar start = me._start;\r\n\t\tvar view = me._view;\r\n\r\n\t\t// No animation -> No Transition\r\n\t\tif (!model || ease === 1) {\r\n\t\t\tme._view = helpers$1.extend({}, model);\r\n\t\t\tme._start = null;\r\n\t\t\treturn me;\r\n\t\t}\r\n\r\n\t\tif (!view) {\r\n\t\t\tview = me._view = {};\r\n\t\t}\r\n\r\n\t\tif (!start) {\r\n\t\t\tstart = me._start = {};\r\n\t\t}\r\n\r\n\t\tinterpolate(start, view, model, ease);\r\n\r\n\t\treturn me;\r\n\t},\r\n\r\n\ttooltipPosition: function() {\r\n\t\treturn {\r\n\t\t\tx: this._model.x,\r\n\t\t\ty: this._model.y\r\n\t\t};\r\n\t},\r\n\r\n\thasValue: function() {\r\n\t\treturn helpers$1.isNumber(this._model.x) && helpers$1.isNumber(this._model.y);\r\n\t}\r\n});\r\n\r\nElement.extend = helpers$1.inherits;\r\n\r\nvar core_element = Element;\n\nvar exports$3 = core_element.extend({\r\n\tchart: null, // the animation associated chart instance\r\n\tcurrentStep: 0, // the current animation step\r\n\tnumSteps: 60, // default number of steps\r\n\teasing: '', // the easing to use for this animation\r\n\trender: null, // render function used by the animation service\r\n\r\n\tonAnimationProgress: null, // user specified callback to fire on each step of the animation\r\n\tonAnimationComplete: null, // user specified callback to fire when the animation finishes\r\n});\r\n\r\nvar core_animation = exports$3;\r\n\r\n// DEPRECATIONS\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.Animation instead\r\n * @prop Chart.Animation#animationObject\r\n * @deprecated since version 2.6.0\r\n * @todo remove at version 3\r\n */\r\nObject.defineProperty(exports$3.prototype, 'animationObject', {\r\n\tget: function() {\r\n\t\treturn this;\r\n\t}\r\n});\r\n\r\n/**\r\n * Provided for backward compatibility, use Chart.Animation#chart instead\r\n * @prop Chart.Animation#chartInstance\r\n * @deprecated since version 2.6.0\r\n * @todo remove at version 3\r\n */\r\nObject.defineProperty(exports$3.prototype, 'chartInstance', {\r\n\tget: function() {\r\n\t\treturn this.chart;\r\n\t},\r\n\tset: function(value) {\r\n\t\tthis.chart = value;\r\n\t}\r\n});\n\ncore_defaults._set('global', {\r\n\tanimation: {\r\n\t\tduration: 1000,\r\n\t\teasing: 'easeOutQuart',\r\n\t\tonProgress: helpers$1.noop,\r\n\t\tonComplete: helpers$1.noop\r\n\t}\r\n});\r\n\r\nvar core_animations = {\r\n\tanimations: [],\r\n\trequest: null,\r\n\r\n\t/**\r\n\t * @param {Chart} chart - The chart to animate.\r\n\t * @param {Chart.Animation} animation - The animation that we will animate.\r\n\t * @param {number} duration - The animation duration in ms.\r\n\t * @param {boolean} lazy - if true, the chart is not marked as animating to enable more responsive interactions\r\n\t */\r\n\taddAnimation: function(chart, animation, duration, lazy) {\r\n\t\tvar animations = this.animations;\r\n\t\tvar i, ilen;\r\n\r\n\t\tanimation.chart = chart;\r\n\t\tanimation.startTime = Date.now();\r\n\t\tanimation.duration = duration;\r\n\r\n\t\tif (!lazy) {\r\n\t\t\tchart.animating = true;\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = animations.length; i < ilen; ++i) {\r\n\t\t\tif (animations[i].chart === chart) {\r\n\t\t\t\tanimations[i] = animation;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tanimations.push(animation);\r\n\r\n\t\t// If there are no animations queued, manually kickstart a digest, for lack of a better word\r\n\t\tif (animations.length === 1) {\r\n\t\t\tthis.requestAnimationFrame();\r\n\t\t}\r\n\t},\r\n\r\n\tcancelAnimation: function(chart) {\r\n\t\tvar index = helpers$1.findIndex(this.animations, function(animation) {\r\n\t\t\treturn animation.chart === chart;\r\n\t\t});\r\n\r\n\t\tif (index !== -1) {\r\n\t\t\tthis.animations.splice(index, 1);\r\n\t\t\tchart.animating = false;\r\n\t\t}\r\n\t},\r\n\r\n\trequestAnimationFrame: function() {\r\n\t\tvar me = this;\r\n\t\tif (me.request === null) {\r\n\t\t\t// Skip animation frame requests until the active one is executed.\r\n\t\t\t// This can happen when processing mouse events, e.g. 'mousemove'\r\n\t\t\t// and 'mouseout' events will trigger multiple renders.\r\n\t\t\tme.request = helpers$1.requestAnimFrame.call(window, function() {\r\n\t\t\t\tme.request = null;\r\n\t\t\t\tme.startDigest();\r\n\t\t\t});\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tstartDigest: function() {\r\n\t\tvar me = this;\r\n\r\n\t\tme.advance();\r\n\r\n\t\t// Do we have more stuff to animate?\r\n\t\tif (me.animations.length > 0) {\r\n\t\t\tme.requestAnimationFrame();\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tadvance: function() {\r\n\t\tvar animations = this.animations;\r\n\t\tvar animation, chart, numSteps, nextStep;\r\n\t\tvar i = 0;\r\n\r\n\t\t// 1 animation per chart, so we are looping charts here\r\n\t\twhile (i < animations.length) {\r\n\t\t\tanimation = animations[i];\r\n\t\t\tchart = animation.chart;\r\n\t\t\tnumSteps = animation.numSteps;\r\n\r\n\t\t\t// Make sure that currentStep starts at 1\r\n\t\t\t// https://github.com/chartjs/Chart.js/issues/6104\r\n\t\t\tnextStep = Math.floor((Date.now() - animation.startTime) / animation.duration * numSteps) + 1;\r\n\t\t\tanimation.currentStep = Math.min(nextStep, numSteps);\r\n\r\n\t\t\thelpers$1.callback(animation.render, [chart, animation], chart);\r\n\t\t\thelpers$1.callback(animation.onAnimationProgress, [animation], chart);\r\n\r\n\t\t\tif (animation.currentStep >= numSteps) {\r\n\t\t\t\thelpers$1.callback(animation.onAnimationComplete, [animation], chart);\r\n\t\t\t\tchart.animating = false;\r\n\t\t\t\tanimations.splice(i, 1);\r\n\t\t\t} else {\r\n\t\t\t\t++i;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\n\nvar resolve = helpers$1.options.resolve;\r\n\r\nvar arrayEvents = ['push', 'pop', 'shift', 'splice', 'unshift'];\r\n\r\n/**\r\n * Hooks the array methods that add or remove values ('push', pop', 'shift', 'splice',\r\n * 'unshift') and notify the listener AFTER the array has been altered. Listeners are\r\n * called on the 'onData*' callbacks (e.g. onDataPush, etc.) with same arguments.\r\n */\r\nfunction listenArrayEvents(array, listener) {\r\n\tif (array._chartjs) {\r\n\t\tarray._chartjs.listeners.push(listener);\r\n\t\treturn;\r\n\t}\r\n\r\n\tObject.defineProperty(array, '_chartjs', {\r\n\t\tconfigurable: true,\r\n\t\tenumerable: false,\r\n\t\tvalue: {\r\n\t\t\tlisteners: [listener]\r\n\t\t}\r\n\t});\r\n\r\n\tarrayEvents.forEach(function(key) {\r\n\t\tvar method = 'onData' + key.charAt(0).toUpperCase() + key.slice(1);\r\n\t\tvar base = array[key];\r\n\r\n\t\tObject.defineProperty(array, key, {\r\n\t\t\tconfigurable: true,\r\n\t\t\tenumerable: false,\r\n\t\t\tvalue: function() {\r\n\t\t\t\tvar args = Array.prototype.slice.call(arguments);\r\n\t\t\t\tvar res = base.apply(this, args);\r\n\r\n\t\t\t\thelpers$1.each(array._chartjs.listeners, function(object) {\r\n\t\t\t\t\tif (typeof object[method] === 'function') {\r\n\t\t\t\t\t\tobject[method].apply(object, args);\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn res;\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n}\r\n\r\n/**\r\n * Removes the given array event listener and cleanup extra attached properties (such as\r\n * the _chartjs stub and overridden methods) if array doesn't have any more listeners.\r\n */\r\nfunction unlistenArrayEvents(array, listener) {\r\n\tvar stub = array._chartjs;\r\n\tif (!stub) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tvar listeners = stub.listeners;\r\n\tvar index = listeners.indexOf(listener);\r\n\tif (index !== -1) {\r\n\t\tlisteners.splice(index, 1);\r\n\t}\r\n\r\n\tif (listeners.length > 0) {\r\n\t\treturn;\r\n\t}\r\n\r\n\tarrayEvents.forEach(function(key) {\r\n\t\tdelete array[key];\r\n\t});\r\n\r\n\tdelete array._chartjs;\r\n}\r\n\r\n// Base class for all dataset controllers (line, bar, etc)\r\nvar DatasetController = function(chart, datasetIndex) {\r\n\tthis.initialize(chart, datasetIndex);\r\n};\r\n\r\nhelpers$1.extend(DatasetController.prototype, {\r\n\r\n\t/**\r\n\t * Element type used to generate a meta dataset (e.g. Chart.element.Line).\r\n\t * @type {Chart.core.element}\r\n\t */\r\n\tdatasetElementType: null,\r\n\r\n\t/**\r\n\t * Element type used to generate a meta data (e.g. Chart.element.Point).\r\n\t * @type {Chart.core.element}\r\n\t */\r\n\tdataElementType: null,\r\n\r\n\t/**\r\n\t * Dataset element option keys to be resolved in _resolveDatasetElementOptions.\r\n\t * A derived controller may override this to resolve controller-specific options.\r\n\t * The keys defined here are for backward compatibility for legend styles.\r\n\t * @private\r\n\t */\r\n\t_datasetElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderCapStyle',\r\n\t\t'borderColor',\r\n\t\t'borderDash',\r\n\t\t'borderDashOffset',\r\n\t\t'borderJoinStyle',\r\n\t\t'borderWidth'\r\n\t],\r\n\r\n\t/**\r\n\t * Data element option keys to be resolved in _resolveDataElementOptions.\r\n\t * A derived controller may override this to resolve controller-specific options.\r\n\t * The keys defined here are for backward compatibility for legend styles.\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderColor',\r\n\t\t'borderWidth',\r\n\t\t'pointStyle'\r\n\t],\r\n\r\n\tinitialize: function(chart, datasetIndex) {\r\n\t\tvar me = this;\r\n\t\tme.chart = chart;\r\n\t\tme.index = datasetIndex;\r\n\t\tme.linkScales();\r\n\t\tme.addElements();\r\n\t\tme._type = me.getMeta().type;\r\n\t},\r\n\r\n\tupdateIndex: function(datasetIndex) {\r\n\t\tthis.index = datasetIndex;\r\n\t},\r\n\r\n\tlinkScales: function() {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar chart = me.chart;\r\n\t\tvar scales = chart.scales;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar scalesOpts = chart.options.scales;\r\n\r\n\t\tif (meta.xAxisID === null || !(meta.xAxisID in scales) || dataset.xAxisID) {\r\n\t\t\tmeta.xAxisID = dataset.xAxisID || scalesOpts.xAxes[0].id;\r\n\t\t}\r\n\t\tif (meta.yAxisID === null || !(meta.yAxisID in scales) || dataset.yAxisID) {\r\n\t\t\tmeta.yAxisID = dataset.yAxisID || scalesOpts.yAxes[0].id;\r\n\t\t}\r\n\t},\r\n\r\n\tgetDataset: function() {\r\n\t\treturn this.chart.data.datasets[this.index];\r\n\t},\r\n\r\n\tgetMeta: function() {\r\n\t\treturn this.chart.getDatasetMeta(this.index);\r\n\t},\r\n\r\n\tgetScaleForId: function(scaleID) {\r\n\t\treturn this.chart.scales[scaleID];\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getValueScaleId: function() {\r\n\t\treturn this.getMeta().yAxisID;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getIndexScaleId: function() {\r\n\t\treturn this.getMeta().xAxisID;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getValueScale: function() {\r\n\t\treturn this.getScaleForId(this._getValueScaleId());\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getIndexScale: function() {\r\n\t\treturn this.getScaleForId(this._getIndexScaleId());\r\n\t},\r\n\r\n\treset: function() {\r\n\t\tthis._update(true);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tdestroy: function() {\r\n\t\tif (this._data) {\r\n\t\t\tunlistenArrayEvents(this._data, this);\r\n\t\t}\r\n\t},\r\n\r\n\tcreateMetaDataset: function() {\r\n\t\tvar me = this;\r\n\t\tvar type = me.datasetElementType;\r\n\t\treturn type && new type({\r\n\t\t\t_chart: me.chart,\r\n\t\t\t_datasetIndex: me.index\r\n\t\t});\r\n\t},\r\n\r\n\tcreateMetaData: function(index) {\r\n\t\tvar me = this;\r\n\t\tvar type = me.dataElementType;\r\n\t\treturn type && new type({\r\n\t\t\t_chart: me.chart,\r\n\t\t\t_datasetIndex: me.index,\r\n\t\t\t_index: index\r\n\t\t});\r\n\t},\r\n\r\n\taddElements: function() {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar data = me.getDataset().data || [];\r\n\t\tvar metaData = meta.data;\r\n\t\tvar i, ilen;\r\n\r\n\t\tfor (i = 0, ilen = data.length; i < ilen; ++i) {\r\n\t\t\tmetaData[i] = metaData[i] || me.createMetaData(i);\r\n\t\t}\r\n\r\n\t\tmeta.dataset = meta.dataset || me.createMetaDataset();\r\n\t},\r\n\r\n\taddElementAndReset: function(index) {\r\n\t\tvar element = this.createMetaData(index);\r\n\t\tthis.getMeta().data.splice(index, 0, element);\r\n\t\tthis.updateElement(element, index, true);\r\n\t},\r\n\r\n\tbuildOrUpdateElements: function() {\r\n\t\tvar me = this;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar data = dataset.data || (dataset.data = []);\r\n\r\n\t\t// In order to correctly handle data addition/deletion animation (an thus simulate\r\n\t\t// real-time charts), we need to monitor these data modifications and synchronize\r\n\t\t// the internal meta data accordingly.\r\n\t\tif (me._data !== data) {\r\n\t\t\tif (me._data) {\r\n\t\t\t\t// This case happens when the user replaced the data array instance.\r\n\t\t\t\tunlistenArrayEvents(me._data, me);\r\n\t\t\t}\r\n\r\n\t\t\tif (data && Object.isExtensible(data)) {\r\n\t\t\t\tlistenArrayEvents(data, me);\r\n\t\t\t}\r\n\t\t\tme._data = data;\r\n\t\t}\r\n\r\n\t\t// Re-sync meta data in case the user replaced the data array or if we missed\r\n\t\t// any updates and so make sure that we handle number of datapoints changing.\r\n\t\tme.resyncElements();\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the merged user-supplied and default dataset-level options\r\n\t * @private\r\n\t */\r\n\t_configure: function() {\r\n\t\tvar me = this;\r\n\t\tme._config = helpers$1.merge(Object.create(null), [\r\n\t\t\tme.chart.options.datasets[me._type],\r\n\t\t\tme.getDataset(),\r\n\t\t], {\r\n\t\t\tmerger: function(key, target, source) {\r\n\t\t\t\tif (key !== '_meta' && key !== 'data') {\r\n\t\t\t\t\thelpers$1._merger(key, target, source);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t},\r\n\r\n\t_update: function(reset) {\r\n\t\tvar me = this;\r\n\t\tme._configure();\r\n\t\tme._cachedDataOpts = null;\r\n\t\tme.update(reset);\r\n\t},\r\n\r\n\tupdate: helpers$1.noop,\r\n\r\n\ttransition: function(easingValue) {\r\n\t\tvar meta = this.getMeta();\r\n\t\tvar elements = meta.data || [];\r\n\t\tvar ilen = elements.length;\r\n\t\tvar i = 0;\r\n\r\n\t\tfor (; i < ilen; ++i) {\r\n\t\t\telements[i].transition(easingValue);\r\n\t\t}\r\n\r\n\t\tif (meta.dataset) {\r\n\t\t\tmeta.dataset.transition(easingValue);\r\n\t\t}\r\n\t},\r\n\r\n\tdraw: function() {\r\n\t\tvar meta = this.getMeta();\r\n\t\tvar elements = meta.data || [];\r\n\t\tvar ilen = elements.length;\r\n\t\tvar i = 0;\r\n\r\n\t\tif (meta.dataset) {\r\n\t\t\tmeta.dataset.draw();\r\n\t\t}\r\n\r\n\t\tfor (; i < ilen; ++i) {\r\n\t\t\telements[i].draw();\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Returns a set of predefined style properties that should be used to represent the dataset\r\n\t * or the data if the index is specified\r\n\t * @param {number} index - data index\r\n\t * @return {IStyleInterface} style object\r\n\t */\r\n\tgetStyle: function(index) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar dataset = meta.dataset;\r\n\t\tvar style;\r\n\r\n\t\tme._configure();\r\n\t\tif (dataset && index === undefined) {\r\n\t\t\tstyle = me._resolveDatasetElementOptions(dataset || {});\r\n\t\t} else {\r\n\t\t\tindex = index || 0;\r\n\t\t\tstyle = me._resolveDataElementOptions(meta.data[index] || {}, index);\r\n\t\t}\r\n\r\n\t\tif (style.fill === false || style.fill === null) {\r\n\t\t\tstyle.backgroundColor = style.borderColor;\r\n\t\t}\r\n\r\n\t\treturn style;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDatasetElementOptions: function(element, hover) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar datasetOpts = me._config;\r\n\t\tvar custom = element.custom || {};\r\n\t\tvar options = chart.options.elements[me.datasetElementType.prototype._type] || {};\r\n\t\tvar elementOptions = me._datasetElementOptions;\r\n\t\tvar values = {};\r\n\t\tvar i, ilen, key, readKey;\r\n\r\n\t\t// Scriptable options\r\n\t\tvar context = {\r\n\t\t\tchart: chart,\r\n\t\t\tdataset: me.getDataset(),\r\n\t\t\tdatasetIndex: me.index,\r\n\t\t\thover: hover\r\n\t\t};\r\n\r\n\t\tfor (i = 0, ilen = elementOptions.length; i < ilen; ++i) {\r\n\t\t\tkey = elementOptions[i];\r\n\t\t\treadKey = hover ? 'hover' + key.charAt(0).toUpperCase() + key.slice(1) : key;\r\n\t\t\tvalues[key] = resolve([\r\n\t\t\t\tcustom[readKey],\r\n\t\t\t\tdatasetOpts[readKey],\r\n\t\t\t\toptions[readKey]\r\n\t\t\t], context);\r\n\t\t}\r\n\r\n\t\treturn values;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDataElementOptions: function(element, index) {\r\n\t\tvar me = this;\r\n\t\tvar custom = element && element.custom;\r\n\t\tvar cached = me._cachedDataOpts;\r\n\t\tif (cached && !custom) {\r\n\t\t\treturn cached;\r\n\t\t}\r\n\t\tvar chart = me.chart;\r\n\t\tvar datasetOpts = me._config;\r\n\t\tvar options = chart.options.elements[me.dataElementType.prototype._type] || {};\r\n\t\tvar elementOptions = me._dataElementOptions;\r\n\t\tvar values = {};\r\n\r\n\t\t// Scriptable options\r\n\t\tvar context = {\r\n\t\t\tchart: chart,\r\n\t\t\tdataIndex: index,\r\n\t\t\tdataset: me.getDataset(),\r\n\t\t\tdatasetIndex: me.index\r\n\t\t};\r\n\r\n\t\t// `resolve` sets cacheable to `false` if any option is indexed or scripted\r\n\t\tvar info = {cacheable: !custom};\r\n\r\n\t\tvar keys, i, ilen, key;\r\n\r\n\t\tcustom = custom || {};\r\n\r\n\t\tif (helpers$1.isArray(elementOptions)) {\r\n\t\t\tfor (i = 0, ilen = elementOptions.length; i < ilen; ++i) {\r\n\t\t\t\tkey = elementOptions[i];\r\n\t\t\t\tvalues[key] = resolve([\r\n\t\t\t\t\tcustom[key],\r\n\t\t\t\t\tdatasetOpts[key],\r\n\t\t\t\t\toptions[key]\r\n\t\t\t\t], context, index, info);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tkeys = Object.keys(elementOptions);\r\n\t\t\tfor (i = 0, ilen = keys.length; i < ilen; ++i) {\r\n\t\t\t\tkey = keys[i];\r\n\t\t\t\tvalues[key] = resolve([\r\n\t\t\t\t\tcustom[key],\r\n\t\t\t\t\tdatasetOpts[elementOptions[key]],\r\n\t\t\t\t\tdatasetOpts[key],\r\n\t\t\t\t\toptions[key]\r\n\t\t\t\t], context, index, info);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (info.cacheable) {\r\n\t\t\tme._cachedDataOpts = Object.freeze(values);\r\n\t\t}\r\n\r\n\t\treturn values;\r\n\t},\r\n\r\n\tremoveHoverStyle: function(element) {\r\n\t\thelpers$1.merge(element._model, element.$previousStyle || {});\r\n\t\tdelete element.$previousStyle;\r\n\t},\r\n\r\n\tsetHoverStyle: function(element) {\r\n\t\tvar dataset = this.chart.data.datasets[element._datasetIndex];\r\n\t\tvar index = element._index;\r\n\t\tvar custom = element.custom || {};\r\n\t\tvar model = element._model;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\r\n\t\telement.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = resolve([custom.hoverBackgroundColor, dataset.hoverBackgroundColor, getHoverColor(model.backgroundColor)], undefined, index);\r\n\t\tmodel.borderColor = resolve([custom.hoverBorderColor, dataset.hoverBorderColor, getHoverColor(model.borderColor)], undefined, index);\r\n\t\tmodel.borderWidth = resolve([custom.hoverBorderWidth, dataset.hoverBorderWidth, model.borderWidth], undefined, index);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_removeDatasetHoverStyle: function() {\r\n\t\tvar element = this.getMeta().dataset;\r\n\r\n\t\tif (element) {\r\n\t\t\tthis.removeHoverStyle(element);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_setDatasetHoverStyle: function() {\r\n\t\tvar element = this.getMeta().dataset;\r\n\t\tvar prev = {};\r\n\t\tvar i, ilen, key, keys, hoverOptions, model;\r\n\r\n\t\tif (!element) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tmodel = element._model;\r\n\t\thoverOptions = this._resolveDatasetElementOptions(element, true);\r\n\r\n\t\tkeys = Object.keys(hoverOptions);\r\n\t\tfor (i = 0, ilen = keys.length; i < ilen; ++i) {\r\n\t\t\tkey = keys[i];\r\n\t\t\tprev[key] = model[key];\r\n\t\t\tmodel[key] = hoverOptions[key];\r\n\t\t}\r\n\r\n\t\telement.$previousStyle = prev;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tresyncElements: function() {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar data = me.getDataset().data;\r\n\t\tvar numMeta = meta.data.length;\r\n\t\tvar numData = data.length;\r\n\r\n\t\tif (numData < numMeta) {\r\n\t\t\tmeta.data.splice(numData, numMeta - numData);\r\n\t\t} else if (numData > numMeta) {\r\n\t\t\tme.insertElements(numMeta, numData - numMeta);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tinsertElements: function(start, count) {\r\n\t\tfor (var i = 0; i < count; ++i) {\r\n\t\t\tthis.addElementAndReset(start + i);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tonDataPush: function() {\r\n\t\tvar count = arguments.length;\r\n\t\tthis.insertElements(this.getDataset().data.length - count, count);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tonDataPop: function() {\r\n\t\tthis.getMeta().data.pop();\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tonDataShift: function() {\r\n\t\tthis.getMeta().data.shift();\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tonDataSplice: function(start, count) {\r\n\t\tthis.getMeta().data.splice(start, count);\r\n\t\tthis.insertElements(start, arguments.length - 2);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tonDataUnshift: function() {\r\n\t\tthis.insertElements(0, arguments.length);\r\n\t}\r\n});\r\n\r\nDatasetController.extend = helpers$1.inherits;\r\n\r\nvar core_datasetController = DatasetController;\n\nvar TAU = Math.PI * 2;\r\n\r\ncore_defaults._set('global', {\r\n\telements: {\r\n\t\tarc: {\r\n\t\t\tbackgroundColor: core_defaults.global.defaultColor,\r\n\t\t\tborderColor: '#fff',\r\n\t\t\tborderWidth: 2,\r\n\t\t\tborderAlign: 'center'\r\n\t\t}\r\n\t}\r\n});\r\n\r\nfunction clipArc(ctx, arc) {\r\n\tvar startAngle = arc.startAngle;\r\n\tvar endAngle = arc.endAngle;\r\n\tvar pixelMargin = arc.pixelMargin;\r\n\tvar angleMargin = pixelMargin / arc.outerRadius;\r\n\tvar x = arc.x;\r\n\tvar y = arc.y;\r\n\r\n\t// Draw an inner border by cliping the arc and drawing a double-width border\r\n\t// Enlarge the clipping arc by 0.33 pixels to eliminate glitches between borders\r\n\tctx.beginPath();\r\n\tctx.arc(x, y, arc.outerRadius, startAngle - angleMargin, endAngle + angleMargin);\r\n\tif (arc.innerRadius > pixelMargin) {\r\n\t\tangleMargin = pixelMargin / arc.innerRadius;\r\n\t\tctx.arc(x, y, arc.innerRadius - pixelMargin, endAngle + angleMargin, startAngle - angleMargin, true);\r\n\t} else {\r\n\t\tctx.arc(x, y, pixelMargin, endAngle + Math.PI / 2, startAngle - Math.PI / 2);\r\n\t}\r\n\tctx.closePath();\r\n\tctx.clip();\r\n}\r\n\r\nfunction drawFullCircleBorders(ctx, vm, arc, inner) {\r\n\tvar endAngle = arc.endAngle;\r\n\tvar i;\r\n\r\n\tif (inner) {\r\n\t\tarc.endAngle = arc.startAngle + TAU;\r\n\t\tclipArc(ctx, arc);\r\n\t\tarc.endAngle = endAngle;\r\n\t\tif (arc.endAngle === arc.startAngle && arc.fullCircles) {\r\n\t\t\tarc.endAngle += TAU;\r\n\t\t\tarc.fullCircles--;\r\n\t\t}\r\n\t}\r\n\r\n\tctx.beginPath();\r\n\tctx.arc(arc.x, arc.y, arc.innerRadius, arc.startAngle + TAU, arc.startAngle, true);\r\n\tfor (i = 0; i < arc.fullCircles; ++i) {\r\n\t\tctx.stroke();\r\n\t}\r\n\r\n\tctx.beginPath();\r\n\tctx.arc(arc.x, arc.y, vm.outerRadius, arc.startAngle, arc.startAngle + TAU);\r\n\tfor (i = 0; i < arc.fullCircles; ++i) {\r\n\t\tctx.stroke();\r\n\t}\r\n}\r\n\r\nfunction drawBorder(ctx, vm, arc) {\r\n\tvar inner = vm.borderAlign === 'inner';\r\n\r\n\tif (inner) {\r\n\t\tctx.lineWidth = vm.borderWidth * 2;\r\n\t\tctx.lineJoin = 'round';\r\n\t} else {\r\n\t\tctx.lineWidth = vm.borderWidth;\r\n\t\tctx.lineJoin = 'bevel';\r\n\t}\r\n\r\n\tif (arc.fullCircles) {\r\n\t\tdrawFullCircleBorders(ctx, vm, arc, inner);\r\n\t}\r\n\r\n\tif (inner) {\r\n\t\tclipArc(ctx, arc);\r\n\t}\r\n\r\n\tctx.beginPath();\r\n\tctx.arc(arc.x, arc.y, vm.outerRadius, arc.startAngle, arc.endAngle);\r\n\tctx.arc(arc.x, arc.y, arc.innerRadius, arc.endAngle, arc.startAngle, true);\r\n\tctx.closePath();\r\n\tctx.stroke();\r\n}\r\n\r\nvar element_arc = core_element.extend({\r\n\t_type: 'arc',\r\n\r\n\tinLabelRange: function(mouseX) {\r\n\t\tvar vm = this._view;\r\n\r\n\t\tif (vm) {\r\n\t\t\treturn (Math.pow(mouseX - vm.x, 2) < Math.pow(vm.radius + vm.hoverRadius, 2));\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\tinRange: function(chartX, chartY) {\r\n\t\tvar vm = this._view;\r\n\r\n\t\tif (vm) {\r\n\t\t\tvar pointRelativePosition = helpers$1.getAngleFromPoint(vm, {x: chartX, y: chartY});\r\n\t\t\tvar angle = pointRelativePosition.angle;\r\n\t\t\tvar distance = pointRelativePosition.distance;\r\n\r\n\t\t\t// Sanitise angle range\r\n\t\t\tvar startAngle = vm.startAngle;\r\n\t\t\tvar endAngle = vm.endAngle;\r\n\t\t\twhile (endAngle < startAngle) {\r\n\t\t\t\tendAngle += TAU;\r\n\t\t\t}\r\n\t\t\twhile (angle > endAngle) {\r\n\t\t\t\tangle -= TAU;\r\n\t\t\t}\r\n\t\t\twhile (angle < startAngle) {\r\n\t\t\t\tangle += TAU;\r\n\t\t\t}\r\n\r\n\t\t\t// Check if within the range of the open/close angle\r\n\t\t\tvar betweenAngles = (angle >= startAngle && angle <= endAngle);\r\n\t\t\tvar withinRadius = (distance >= vm.innerRadius && distance <= vm.outerRadius);\r\n\r\n\t\t\treturn (betweenAngles && withinRadius);\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\tgetCenterPoint: function() {\r\n\t\tvar vm = this._view;\r\n\t\tvar halfAngle = (vm.startAngle + vm.endAngle) / 2;\r\n\t\tvar halfRadius = (vm.innerRadius + vm.outerRadius) / 2;\r\n\t\treturn {\r\n\t\t\tx: vm.x + Math.cos(halfAngle) * halfRadius,\r\n\t\t\ty: vm.y + Math.sin(halfAngle) * halfRadius\r\n\t\t};\r\n\t},\r\n\r\n\tgetArea: function() {\r\n\t\tvar vm = this._view;\r\n\t\treturn Math.PI * ((vm.endAngle - vm.startAngle) / (2 * Math.PI)) * (Math.pow(vm.outerRadius, 2) - Math.pow(vm.innerRadius, 2));\r\n\t},\r\n\r\n\ttooltipPosition: function() {\r\n\t\tvar vm = this._view;\r\n\t\tvar centreAngle = vm.startAngle + ((vm.endAngle - vm.startAngle) / 2);\r\n\t\tvar rangeFromCentre = (vm.outerRadius - vm.innerRadius) / 2 + vm.innerRadius;\r\n\r\n\t\treturn {\r\n\t\t\tx: vm.x + (Math.cos(centreAngle) * rangeFromCentre),\r\n\t\t\ty: vm.y + (Math.sin(centreAngle) * rangeFromCentre)\r\n\t\t};\r\n\t},\r\n\r\n\tdraw: function() {\r\n\t\tvar ctx = this._chart.ctx;\r\n\t\tvar vm = this._view;\r\n\t\tvar pixelMargin = (vm.borderAlign === 'inner') ? 0.33 : 0;\r\n\t\tvar arc = {\r\n\t\t\tx: vm.x,\r\n\t\t\ty: vm.y,\r\n\t\t\tinnerRadius: vm.innerRadius,\r\n\t\t\touterRadius: Math.max(vm.outerRadius - pixelMargin, 0),\r\n\t\t\tpixelMargin: pixelMargin,\r\n\t\t\tstartAngle: vm.startAngle,\r\n\t\t\tendAngle: vm.endAngle,\r\n\t\t\tfullCircles: Math.floor(vm.circumference / TAU)\r\n\t\t};\r\n\t\tvar i;\r\n\r\n\t\tctx.save();\r\n\r\n\t\tctx.fillStyle = vm.backgroundColor;\r\n\t\tctx.strokeStyle = vm.borderColor;\r\n\r\n\t\tif (arc.fullCircles) {\r\n\t\t\tarc.endAngle = arc.startAngle + TAU;\r\n\t\t\tctx.beginPath();\r\n\t\t\tctx.arc(arc.x, arc.y, arc.outerRadius, arc.startAngle, arc.endAngle);\r\n\t\t\tctx.arc(arc.x, arc.y, arc.innerRadius, arc.endAngle, arc.startAngle, true);\r\n\t\t\tctx.closePath();\r\n\t\t\tfor (i = 0; i < arc.fullCircles; ++i) {\r\n\t\t\t\tctx.fill();\r\n\t\t\t}\r\n\t\t\tarc.endAngle = arc.startAngle + vm.circumference % TAU;\r\n\t\t}\r\n\r\n\t\tctx.beginPath();\r\n\t\tctx.arc(arc.x, arc.y, arc.outerRadius, arc.startAngle, arc.endAngle);\r\n\t\tctx.arc(arc.x, arc.y, arc.innerRadius, arc.endAngle, arc.startAngle, true);\r\n\t\tctx.closePath();\r\n\t\tctx.fill();\r\n\r\n\t\tif (vm.borderWidth) {\r\n\t\t\tdrawBorder(ctx, vm, arc);\r\n\t\t}\r\n\r\n\t\tctx.restore();\r\n\t}\r\n});\n\nvar valueOrDefault$1 = helpers$1.valueOrDefault;\r\n\r\nvar defaultColor = core_defaults.global.defaultColor;\r\n\r\ncore_defaults._set('global', {\r\n\telements: {\r\n\t\tline: {\r\n\t\t\ttension: 0.4,\r\n\t\t\tbackgroundColor: defaultColor,\r\n\t\t\tborderWidth: 3,\r\n\t\t\tborderColor: defaultColor,\r\n\t\t\tborderCapStyle: 'butt',\r\n\t\t\tborderDash: [],\r\n\t\t\tborderDashOffset: 0.0,\r\n\t\t\tborderJoinStyle: 'miter',\r\n\t\t\tcapBezierPoints: true,\r\n\t\t\tfill: true, // do we fill in the area between the line and its base axis\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar element_line = core_element.extend({\r\n\t_type: 'line',\r\n\r\n\tdraw: function() {\r\n\t\tvar me = this;\r\n\t\tvar vm = me._view;\r\n\t\tvar ctx = me._chart.ctx;\r\n\t\tvar spanGaps = vm.spanGaps;\r\n\t\tvar points = me._children.slice(); // clone array\r\n\t\tvar globalDefaults = core_defaults.global;\r\n\t\tvar globalOptionLineElements = globalDefaults.elements.line;\r\n\t\tvar lastDrawnIndex = -1;\r\n\t\tvar closePath = me._loop;\r\n\t\tvar index, previous, currentVM;\r\n\r\n\t\tif (!points.length) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (me._loop) {\r\n\t\t\tfor (index = 0; index < points.length; ++index) {\r\n\t\t\t\tprevious = helpers$1.previousItem(points, index);\r\n\t\t\t\t// If the line has an open path, shift the point array\r\n\t\t\t\tif (!points[index]._view.skip && previous._view.skip) {\r\n\t\t\t\t\tpoints = points.slice(index).concat(points.slice(0, index));\r\n\t\t\t\t\tclosePath = spanGaps;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// If the line has a close path, add the first point again\r\n\t\t\tif (closePath) {\r\n\t\t\t\tpoints.push(points[0]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tctx.save();\r\n\r\n\t\t// Stroke Line Options\r\n\t\tctx.lineCap = vm.borderCapStyle || globalOptionLineElements.borderCapStyle;\r\n\r\n\t\t// IE 9 and 10 do not support line dash\r\n\t\tif (ctx.setLineDash) {\r\n\t\t\tctx.setLineDash(vm.borderDash || globalOptionLineElements.borderDash);\r\n\t\t}\r\n\r\n\t\tctx.lineDashOffset = valueOrDefault$1(vm.borderDashOffset, globalOptionLineElements.borderDashOffset);\r\n\t\tctx.lineJoin = vm.borderJoinStyle || globalOptionLineElements.borderJoinStyle;\r\n\t\tctx.lineWidth = valueOrDefault$1(vm.borderWidth, globalOptionLineElements.borderWidth);\r\n\t\tctx.strokeStyle = vm.borderColor || globalDefaults.defaultColor;\r\n\r\n\t\t// Stroke Line\r\n\t\tctx.beginPath();\r\n\r\n\t\t// First point moves to it's starting position no matter what\r\n\t\tcurrentVM = points[0]._view;\r\n\t\tif (!currentVM.skip) {\r\n\t\t\tctx.moveTo(currentVM.x, currentVM.y);\r\n\t\t\tlastDrawnIndex = 0;\r\n\t\t}\r\n\r\n\t\tfor (index = 1; index < points.length; ++index) {\r\n\t\t\tcurrentVM = points[index]._view;\r\n\t\t\tprevious = lastDrawnIndex === -1 ? helpers$1.previousItem(points, index) : points[lastDrawnIndex];\r\n\r\n\t\t\tif (!currentVM.skip) {\r\n\t\t\t\tif ((lastDrawnIndex !== (index - 1) && !spanGaps) || lastDrawnIndex === -1) {\r\n\t\t\t\t\t// There was a gap and this is the first point after the gap\r\n\t\t\t\t\tctx.moveTo(currentVM.x, currentVM.y);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Line to next point\r\n\t\t\t\t\thelpers$1.canvas.lineTo(ctx, previous._view, currentVM);\r\n\t\t\t\t}\r\n\t\t\t\tlastDrawnIndex = index;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (closePath) {\r\n\t\t\tctx.closePath();\r\n\t\t}\r\n\r\n\t\tctx.stroke();\r\n\t\tctx.restore();\r\n\t}\r\n});\n\nvar valueOrDefault$2 = helpers$1.valueOrDefault;\r\n\r\nvar defaultColor$1 = core_defaults.global.defaultColor;\r\n\r\ncore_defaults._set('global', {\r\n\telements: {\r\n\t\tpoint: {\r\n\t\t\tradius: 3,\r\n\t\t\tpointStyle: 'circle',\r\n\t\t\tbackgroundColor: defaultColor$1,\r\n\t\t\tborderColor: defaultColor$1,\r\n\t\t\tborderWidth: 1,\r\n\t\t\t// Hover\r\n\t\t\thitRadius: 1,\r\n\t\t\thoverRadius: 4,\r\n\t\t\thoverBorderWidth: 1\r\n\t\t}\r\n\t}\r\n});\r\n\r\nfunction xRange(mouseX) {\r\n\tvar vm = this._view;\r\n\treturn vm ? (Math.abs(mouseX - vm.x) < vm.radius + vm.hitRadius) : false;\r\n}\r\n\r\nfunction yRange(mouseY) {\r\n\tvar vm = this._view;\r\n\treturn vm ? (Math.abs(mouseY - vm.y) < vm.radius + vm.hitRadius) : false;\r\n}\r\n\r\nvar element_point = core_element.extend({\r\n\t_type: 'point',\r\n\r\n\tinRange: function(mouseX, mouseY) {\r\n\t\tvar vm = this._view;\r\n\t\treturn vm ? ((Math.pow(mouseX - vm.x, 2) + Math.pow(mouseY - vm.y, 2)) < Math.pow(vm.hitRadius + vm.radius, 2)) : false;\r\n\t},\r\n\r\n\tinLabelRange: xRange,\r\n\tinXRange: xRange,\r\n\tinYRange: yRange,\r\n\r\n\tgetCenterPoint: function() {\r\n\t\tvar vm = this._view;\r\n\t\treturn {\r\n\t\t\tx: vm.x,\r\n\t\t\ty: vm.y\r\n\t\t};\r\n\t},\r\n\r\n\tgetArea: function() {\r\n\t\treturn Math.PI * Math.pow(this._view.radius, 2);\r\n\t},\r\n\r\n\ttooltipPosition: function() {\r\n\t\tvar vm = this._view;\r\n\t\treturn {\r\n\t\t\tx: vm.x,\r\n\t\t\ty: vm.y,\r\n\t\t\tpadding: vm.radius + vm.borderWidth\r\n\t\t};\r\n\t},\r\n\r\n\tdraw: function(chartArea) {\r\n\t\tvar vm = this._view;\r\n\t\tvar ctx = this._chart.ctx;\r\n\t\tvar pointStyle = vm.pointStyle;\r\n\t\tvar rotation = vm.rotation;\r\n\t\tvar radius = vm.radius;\r\n\t\tvar x = vm.x;\r\n\t\tvar y = vm.y;\r\n\t\tvar globalDefaults = core_defaults.global;\r\n\t\tvar defaultColor = globalDefaults.defaultColor; // eslint-disable-line no-shadow\r\n\r\n\t\tif (vm.skip) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Clipping for Points.\r\n\t\tif (chartArea === undefined || helpers$1.canvas._isPointInArea(vm, chartArea)) {\r\n\t\t\tctx.strokeStyle = vm.borderColor || defaultColor;\r\n\t\t\tctx.lineWidth = valueOrDefault$2(vm.borderWidth, globalDefaults.elements.point.borderWidth);\r\n\t\t\tctx.fillStyle = vm.backgroundColor || defaultColor;\r\n\t\t\thelpers$1.canvas.drawPoint(ctx, pointStyle, radius, x, y, rotation);\r\n\t\t}\r\n\t}\r\n});\n\nvar defaultColor$2 = core_defaults.global.defaultColor;\r\n\r\ncore_defaults._set('global', {\r\n\telements: {\r\n\t\trectangle: {\r\n\t\t\tbackgroundColor: defaultColor$2,\r\n\t\t\tborderColor: defaultColor$2,\r\n\t\t\tborderSkipped: 'bottom',\r\n\t\t\tborderWidth: 0\r\n\t\t}\r\n\t}\r\n});\r\n\r\nfunction isVertical(vm) {\r\n\treturn vm && vm.width !== undefined;\r\n}\r\n\r\n/**\r\n * Helper function to get the bounds of the bar regardless of the orientation\r\n * @param bar {Chart.Element.Rectangle} the bar\r\n * @return {Bounds} bounds of the bar\r\n * @private\r\n */\r\nfunction getBarBounds(vm) {\r\n\tvar x1, x2, y1, y2, half;\r\n\r\n\tif (isVertical(vm)) {\r\n\t\thalf = vm.width / 2;\r\n\t\tx1 = vm.x - half;\r\n\t\tx2 = vm.x + half;\r\n\t\ty1 = Math.min(vm.y, vm.base);\r\n\t\ty2 = Math.max(vm.y, vm.base);\r\n\t} else {\r\n\t\thalf = vm.height / 2;\r\n\t\tx1 = Math.min(vm.x, vm.base);\r\n\t\tx2 = Math.max(vm.x, vm.base);\r\n\t\ty1 = vm.y - half;\r\n\t\ty2 = vm.y + half;\r\n\t}\r\n\r\n\treturn {\r\n\t\tleft: x1,\r\n\t\ttop: y1,\r\n\t\tright: x2,\r\n\t\tbottom: y2\r\n\t};\r\n}\r\n\r\nfunction swap(orig, v1, v2) {\r\n\treturn orig === v1 ? v2 : orig === v2 ? v1 : orig;\r\n}\r\n\r\nfunction parseBorderSkipped(vm) {\r\n\tvar edge = vm.borderSkipped;\r\n\tvar res = {};\r\n\r\n\tif (!edge) {\r\n\t\treturn res;\r\n\t}\r\n\r\n\tif (vm.horizontal) {\r\n\t\tif (vm.base > vm.x) {\r\n\t\t\tedge = swap(edge, 'left', 'right');\r\n\t\t}\r\n\t} else if (vm.base < vm.y) {\r\n\t\tedge = swap(edge, 'bottom', 'top');\r\n\t}\r\n\r\n\tres[edge] = true;\r\n\treturn res;\r\n}\r\n\r\nfunction parseBorderWidth(vm, maxW, maxH) {\r\n\tvar value = vm.borderWidth;\r\n\tvar skip = parseBorderSkipped(vm);\r\n\tvar t, r, b, l;\r\n\r\n\tif (helpers$1.isObject(value)) {\r\n\t\tt = +value.top || 0;\r\n\t\tr = +value.right || 0;\r\n\t\tb = +value.bottom || 0;\r\n\t\tl = +value.left || 0;\r\n\t} else {\r\n\t\tt = r = b = l = +value || 0;\r\n\t}\r\n\r\n\treturn {\r\n\t\tt: skip.top || (t < 0) ? 0 : t > maxH ? maxH : t,\r\n\t\tr: skip.right || (r < 0) ? 0 : r > maxW ? maxW : r,\r\n\t\tb: skip.bottom || (b < 0) ? 0 : b > maxH ? maxH : b,\r\n\t\tl: skip.left || (l < 0) ? 0 : l > maxW ? maxW : l\r\n\t};\r\n}\r\n\r\nfunction boundingRects(vm) {\r\n\tvar bounds = getBarBounds(vm);\r\n\tvar width = bounds.right - bounds.left;\r\n\tvar height = bounds.bottom - bounds.top;\r\n\tvar border = parseBorderWidth(vm, width / 2, height / 2);\r\n\r\n\treturn {\r\n\t\touter: {\r\n\t\t\tx: bounds.left,\r\n\t\t\ty: bounds.top,\r\n\t\t\tw: width,\r\n\t\t\th: height\r\n\t\t},\r\n\t\tinner: {\r\n\t\t\tx: bounds.left + border.l,\r\n\t\t\ty: bounds.top + border.t,\r\n\t\t\tw: width - border.l - border.r,\r\n\t\t\th: height - border.t - border.b\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction inRange(vm, x, y) {\r\n\tvar skipX = x === null;\r\n\tvar skipY = y === null;\r\n\tvar bounds = !vm || (skipX && skipY) ? false : getBarBounds(vm);\r\n\r\n\treturn bounds\r\n\t\t&& (skipX || x >= bounds.left && x <= bounds.right)\r\n\t\t&& (skipY || y >= bounds.top && y <= bounds.bottom);\r\n}\r\n\r\nvar element_rectangle = core_element.extend({\r\n\t_type: 'rectangle',\r\n\r\n\tdraw: function() {\r\n\t\tvar ctx = this._chart.ctx;\r\n\t\tvar vm = this._view;\r\n\t\tvar rects = boundingRects(vm);\r\n\t\tvar outer = rects.outer;\r\n\t\tvar inner = rects.inner;\r\n\r\n\t\tctx.fillStyle = vm.backgroundColor;\r\n\t\tctx.fillRect(outer.x, outer.y, outer.w, outer.h);\r\n\r\n\t\tif (outer.w === inner.w && outer.h === inner.h) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tctx.save();\r\n\t\tctx.beginPath();\r\n\t\tctx.rect(outer.x, outer.y, outer.w, outer.h);\r\n\t\tctx.clip();\r\n\t\tctx.fillStyle = vm.borderColor;\r\n\t\tctx.rect(inner.x, inner.y, inner.w, inner.h);\r\n\t\tctx.fill('evenodd');\r\n\t\tctx.restore();\r\n\t},\r\n\r\n\theight: function() {\r\n\t\tvar vm = this._view;\r\n\t\treturn vm.base - vm.y;\r\n\t},\r\n\r\n\tinRange: function(mouseX, mouseY) {\r\n\t\treturn inRange(this._view, mouseX, mouseY);\r\n\t},\r\n\r\n\tinLabelRange: function(mouseX, mouseY) {\r\n\t\tvar vm = this._view;\r\n\t\treturn isVertical(vm)\r\n\t\t\t? inRange(vm, mouseX, null)\r\n\t\t\t: inRange(vm, null, mouseY);\r\n\t},\r\n\r\n\tinXRange: function(mouseX) {\r\n\t\treturn inRange(this._view, mouseX, null);\r\n\t},\r\n\r\n\tinYRange: function(mouseY) {\r\n\t\treturn inRange(this._view, null, mouseY);\r\n\t},\r\n\r\n\tgetCenterPoint: function() {\r\n\t\tvar vm = this._view;\r\n\t\tvar x, y;\r\n\t\tif (isVertical(vm)) {\r\n\t\t\tx = vm.x;\r\n\t\t\ty = (vm.y + vm.base) / 2;\r\n\t\t} else {\r\n\t\t\tx = (vm.x + vm.base) / 2;\r\n\t\t\ty = vm.y;\r\n\t\t}\r\n\r\n\t\treturn {x: x, y: y};\r\n\t},\r\n\r\n\tgetArea: function() {\r\n\t\tvar vm = this._view;\r\n\r\n\t\treturn isVertical(vm)\r\n\t\t\t? vm.width * Math.abs(vm.y - vm.base)\r\n\t\t\t: vm.height * Math.abs(vm.x - vm.base);\r\n\t},\r\n\r\n\ttooltipPosition: function() {\r\n\t\tvar vm = this._view;\r\n\t\treturn {\r\n\t\t\tx: vm.x,\r\n\t\t\ty: vm.y\r\n\t\t};\r\n\t}\r\n});\n\nvar elements = {};\r\nvar Arc = element_arc;\r\nvar Line = element_line;\r\nvar Point = element_point;\r\nvar Rectangle = element_rectangle;\nelements.Arc = Arc;\nelements.Line = Line;\nelements.Point = Point;\nelements.Rectangle = Rectangle;\n\nvar deprecated = helpers$1._deprecated;\r\nvar valueOrDefault$3 = helpers$1.valueOrDefault;\r\n\r\ncore_defaults._set('bar', {\r\n\thover: {\r\n\t\tmode: 'label'\r\n\t},\r\n\r\n\tscales: {\r\n\t\txAxes: [{\r\n\t\t\ttype: 'category',\r\n\t\t\toffset: true,\r\n\t\t\tgridLines: {\r\n\t\t\t\toffsetGridLines: true\r\n\t\t\t}\r\n\t\t}],\r\n\r\n\t\tyAxes: [{\r\n\t\t\ttype: 'linear'\r\n\t\t}]\r\n\t}\r\n});\r\n\r\ncore_defaults._set('global', {\r\n\tdatasets: {\r\n\t\tbar: {\r\n\t\t\tcategoryPercentage: 0.8,\r\n\t\t\tbarPercentage: 0.9\r\n\t\t}\r\n\t}\r\n});\r\n\r\n/**\r\n * Computes the \"optimal\" sample size to maintain bars equally sized while preventing overlap.\r\n * @private\r\n */\r\nfunction computeMinSampleSize(scale, pixels) {\r\n\tvar min = scale._length;\r\n\tvar prev, curr, i, ilen;\r\n\r\n\tfor (i = 1, ilen = pixels.length; i < ilen; ++i) {\r\n\t\tmin = Math.min(min, Math.abs(pixels[i] - pixels[i - 1]));\r\n\t}\r\n\r\n\tfor (i = 0, ilen = scale.getTicks().length; i < ilen; ++i) {\r\n\t\tcurr = scale.getPixelForTick(i);\r\n\t\tmin = i > 0 ? Math.min(min, Math.abs(curr - prev)) : min;\r\n\t\tprev = curr;\r\n\t}\r\n\r\n\treturn min;\r\n}\r\n\r\n/**\r\n * Computes an \"ideal\" category based on the absolute bar thickness or, if undefined or null,\r\n * uses the smallest interval (see computeMinSampleSize) that prevents bar overlapping. This\r\n * mode currently always generates bars equally sized (until we introduce scriptable options?).\r\n * @private\r\n */\r\nfunction computeFitCategoryTraits(index, ruler, options) {\r\n\tvar thickness = options.barThickness;\r\n\tvar count = ruler.stackCount;\r\n\tvar curr = ruler.pixels[index];\r\n\tvar min = helpers$1.isNullOrUndef(thickness)\r\n\t\t? computeMinSampleSize(ruler.scale, ruler.pixels)\r\n\t\t: -1;\r\n\tvar size, ratio;\r\n\r\n\tif (helpers$1.isNullOrUndef(thickness)) {\r\n\t\tsize = min * options.categoryPercentage;\r\n\t\tratio = options.barPercentage;\r\n\t} else {\r\n\t\t// When bar thickness is enforced, category and bar percentages are ignored.\r\n\t\t// Note(SB): we could add support for relative bar thickness (e.g. barThickness: '50%')\r\n\t\t// and deprecate barPercentage since this value is ignored when thickness is absolute.\r\n\t\tsize = thickness * count;\r\n\t\tratio = 1;\r\n\t}\r\n\r\n\treturn {\r\n\t\tchunk: size / count,\r\n\t\tratio: ratio,\r\n\t\tstart: curr - (size / 2)\r\n\t};\r\n}\r\n\r\n/**\r\n * Computes an \"optimal\" category that globally arranges bars side by side (no gap when\r\n * percentage options are 1), based on the previous and following categories. This mode\r\n * generates bars with different widths when data are not evenly spaced.\r\n * @private\r\n */\r\nfunction computeFlexCategoryTraits(index, ruler, options) {\r\n\tvar pixels = ruler.pixels;\r\n\tvar curr = pixels[index];\r\n\tvar prev = index > 0 ? pixels[index - 1] : null;\r\n\tvar next = index < pixels.length - 1 ? pixels[index + 1] : null;\r\n\tvar percent = options.categoryPercentage;\r\n\tvar start, size;\r\n\r\n\tif (prev === null) {\r\n\t\t// first data: its size is double based on the next point or,\r\n\t\t// if it's also the last data, we use the scale size.\r\n\t\tprev = curr - (next === null ? ruler.end - ruler.start : next - curr);\r\n\t}\r\n\r\n\tif (next === null) {\r\n\t\t// last data: its size is also double based on the previous point.\r\n\t\tnext = curr + curr - prev;\r\n\t}\r\n\r\n\tstart = curr - (curr - Math.min(prev, next)) / 2 * percent;\r\n\tsize = Math.abs(next - prev) / 2 * percent;\r\n\r\n\treturn {\r\n\t\tchunk: size / ruler.stackCount,\r\n\t\tratio: options.barPercentage,\r\n\t\tstart: start\r\n\t};\r\n}\r\n\r\nvar controller_bar = core_datasetController.extend({\r\n\r\n\tdataElementType: elements.Rectangle,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderColor',\r\n\t\t'borderSkipped',\r\n\t\t'borderWidth',\r\n\t\t'barPercentage',\r\n\t\t'barThickness',\r\n\t\t'categoryPercentage',\r\n\t\t'maxBarThickness',\r\n\t\t'minBarLength'\r\n\t],\r\n\r\n\tinitialize: function() {\r\n\t\tvar me = this;\r\n\t\tvar meta, scaleOpts;\r\n\r\n\t\tcore_datasetController.prototype.initialize.apply(me, arguments);\r\n\r\n\t\tmeta = me.getMeta();\r\n\t\tmeta.stack = me.getDataset().stack;\r\n\t\tmeta.bar = true;\r\n\r\n\t\tscaleOpts = me._getIndexScale().options;\r\n\t\tdeprecated('bar chart', scaleOpts.barPercentage, 'scales.[x/y]Axes.barPercentage', 'dataset.barPercentage');\r\n\t\tdeprecated('bar chart', scaleOpts.barThickness, 'scales.[x/y]Axes.barThickness', 'dataset.barThickness');\r\n\t\tdeprecated('bar chart', scaleOpts.categoryPercentage, 'scales.[x/y]Axes.categoryPercentage', 'dataset.categoryPercentage');\r\n\t\tdeprecated('bar chart', me._getValueScale().options.minBarLength, 'scales.[x/y]Axes.minBarLength', 'dataset.minBarLength');\r\n\t\tdeprecated('bar chart', scaleOpts.maxBarThickness, 'scales.[x/y]Axes.maxBarThickness', 'dataset.maxBarThickness');\r\n\t},\r\n\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar rects = me.getMeta().data;\r\n\t\tvar i, ilen;\r\n\r\n\t\tme._ruler = me.getRuler();\r\n\r\n\t\tfor (i = 0, ilen = rects.length; i < ilen; ++i) {\r\n\t\t\tme.updateElement(rects[i], i, reset);\r\n\t\t}\r\n\t},\r\n\r\n\tupdateElement: function(rectangle, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar options = me._resolveDataElementOptions(rectangle, index);\r\n\r\n\t\trectangle._xScale = me.getScaleForId(meta.xAxisID);\r\n\t\trectangle._yScale = me.getScaleForId(meta.yAxisID);\r\n\t\trectangle._datasetIndex = me.index;\r\n\t\trectangle._index = index;\r\n\t\trectangle._model = {\r\n\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\tborderColor: options.borderColor,\r\n\t\t\tborderSkipped: options.borderSkipped,\r\n\t\t\tborderWidth: options.borderWidth,\r\n\t\t\tdatasetLabel: dataset.label,\r\n\t\t\tlabel: me.chart.data.labels[index]\r\n\t\t};\r\n\r\n\t\tif (helpers$1.isArray(dataset.data[index])) {\r\n\t\t\trectangle._model.borderSkipped = null;\r\n\t\t}\r\n\r\n\t\tme._updateElementGeometry(rectangle, index, reset, options);\r\n\r\n\t\trectangle.pivot();\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_updateElementGeometry: function(rectangle, index, reset, options) {\r\n\t\tvar me = this;\r\n\t\tvar model = rectangle._model;\r\n\t\tvar vscale = me._getValueScale();\r\n\t\tvar base = vscale.getBasePixel();\r\n\t\tvar horizontal = vscale.isHorizontal();\r\n\t\tvar ruler = me._ruler || me.getRuler();\r\n\t\tvar vpixels = me.calculateBarValuePixels(me.index, index, options);\r\n\t\tvar ipixels = me.calculateBarIndexPixels(me.index, index, ruler, options);\r\n\r\n\t\tmodel.horizontal = horizontal;\r\n\t\tmodel.base = reset ? base : vpixels.base;\r\n\t\tmodel.x = horizontal ? reset ? base : vpixels.head : ipixels.center;\r\n\t\tmodel.y = horizontal ? ipixels.center : reset ? base : vpixels.head;\r\n\t\tmodel.height = horizontal ? ipixels.size : undefined;\r\n\t\tmodel.width = horizontal ? undefined : ipixels.size;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the stacks based on groups and bar visibility.\r\n\t * @param {number} [last] - The dataset index\r\n\t * @returns {string[]} The list of stack IDs\r\n\t * @private\r\n\t */\r\n\t_getStacks: function(last) {\r\n\t\tvar me = this;\r\n\t\tvar scale = me._getIndexScale();\r\n\t\tvar metasets = scale._getMatchingVisibleMetas(me._type);\r\n\t\tvar stacked = scale.options.stacked;\r\n\t\tvar ilen = metasets.length;\r\n\t\tvar stacks = [];\r\n\t\tvar i, meta;\r\n\r\n\t\tfor (i = 0; i < ilen; ++i) {\r\n\t\t\tmeta = metasets[i];\r\n\t\t\t// stacked | meta.stack\r\n\t\t\t// | found | not found | undefined\r\n\t\t\t// false | x | x | x\r\n\t\t\t// true | | x |\r\n\t\t\t// undefined | | x | x\r\n\t\t\tif (stacked === false || stacks.indexOf(meta.stack) === -1 ||\r\n\t\t\t\t(stacked === undefined && meta.stack === undefined)) {\r\n\t\t\t\tstacks.push(meta.stack);\r\n\t\t\t}\r\n\t\t\tif (meta.index === last) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn stacks;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the effective number of stacks based on groups and bar visibility.\r\n\t * @private\r\n\t */\r\n\tgetStackCount: function() {\r\n\t\treturn this._getStacks().length;\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the stack index for the given dataset based on groups and bar visibility.\r\n\t * @param {number} [datasetIndex] - The dataset index\r\n\t * @param {string} [name] - The stack name to find\r\n\t * @returns {number} The stack index\r\n\t * @private\r\n\t */\r\n\tgetStackIndex: function(datasetIndex, name) {\r\n\t\tvar stacks = this._getStacks(datasetIndex);\r\n\t\tvar index = (name !== undefined)\r\n\t\t\t? stacks.indexOf(name)\r\n\t\t\t: -1; // indexOf returns -1 if element is not present\r\n\r\n\t\treturn (index === -1)\r\n\t\t\t? stacks.length - 1\r\n\t\t\t: index;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tgetRuler: function() {\r\n\t\tvar me = this;\r\n\t\tvar scale = me._getIndexScale();\r\n\t\tvar pixels = [];\r\n\t\tvar i, ilen;\r\n\r\n\t\tfor (i = 0, ilen = me.getMeta().data.length; i < ilen; ++i) {\r\n\t\t\tpixels.push(scale.getPixelForValue(null, i, me.index));\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tpixels: pixels,\r\n\t\t\tstart: scale._startPixel,\r\n\t\t\tend: scale._endPixel,\r\n\t\t\tstackCount: me.getStackCount(),\r\n\t\t\tscale: scale\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * Note: pixel values are not clamped to the scale area.\r\n\t * @private\r\n\t */\r\n\tcalculateBarValuePixels: function(datasetIndex, index, options) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar scale = me._getValueScale();\r\n\t\tvar isHorizontal = scale.isHorizontal();\r\n\t\tvar datasets = chart.data.datasets;\r\n\t\tvar metasets = scale._getMatchingVisibleMetas(me._type);\r\n\t\tvar value = scale._parseValue(datasets[datasetIndex].data[index]);\r\n\t\tvar minBarLength = options.minBarLength;\r\n\t\tvar stacked = scale.options.stacked;\r\n\t\tvar stack = me.getMeta().stack;\r\n\t\tvar start = value.start === undefined ? 0 : value.max >= 0 && value.min >= 0 ? value.min : value.max;\r\n\t\tvar length = value.start === undefined ? value.end : value.max >= 0 && value.min >= 0 ? value.max - value.min : value.min - value.max;\r\n\t\tvar ilen = metasets.length;\r\n\t\tvar i, imeta, ivalue, base, head, size, stackLength;\r\n\r\n\t\tif (stacked || (stacked === undefined && stack !== undefined)) {\r\n\t\t\tfor (i = 0; i < ilen; ++i) {\r\n\t\t\t\timeta = metasets[i];\r\n\r\n\t\t\t\tif (imeta.index === datasetIndex) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (imeta.stack === stack) {\r\n\t\t\t\t\tstackLength = scale._parseValue(datasets[imeta.index].data[index]);\r\n\t\t\t\t\tivalue = stackLength.start === undefined ? stackLength.end : stackLength.min >= 0 && stackLength.max >= 0 ? stackLength.max : stackLength.min;\r\n\r\n\t\t\t\t\tif ((value.min < 0 && ivalue < 0) || (value.max >= 0 && ivalue > 0)) {\r\n\t\t\t\t\t\tstart += ivalue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tbase = scale.getPixelForValue(start);\r\n\t\thead = scale.getPixelForValue(start + length);\r\n\t\tsize = head - base;\r\n\r\n\t\tif (minBarLength !== undefined && Math.abs(size) < minBarLength) {\r\n\t\t\tsize = minBarLength;\r\n\t\t\tif (length >= 0 && !isHorizontal || length < 0 && isHorizontal) {\r\n\t\t\t\thead = base - minBarLength;\r\n\t\t\t} else {\r\n\t\t\t\thead = base + minBarLength;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\tsize: size,\r\n\t\t\tbase: base,\r\n\t\t\thead: head,\r\n\t\t\tcenter: head + size / 2\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\tcalculateBarIndexPixels: function(datasetIndex, index, ruler, options) {\r\n\t\tvar me = this;\r\n\t\tvar range = options.barThickness === 'flex'\r\n\t\t\t? computeFlexCategoryTraits(index, ruler, options)\r\n\t\t\t: computeFitCategoryTraits(index, ruler, options);\r\n\r\n\t\tvar stackIndex = me.getStackIndex(datasetIndex, me.getMeta().stack);\r\n\t\tvar center = range.start + (range.chunk * stackIndex) + (range.chunk / 2);\r\n\t\tvar size = Math.min(\r\n\t\t\tvalueOrDefault$3(options.maxBarThickness, Infinity),\r\n\t\t\trange.chunk * range.ratio);\r\n\r\n\t\treturn {\r\n\t\t\tbase: center - size / 2,\r\n\t\t\thead: center + size / 2,\r\n\t\t\tcenter: center,\r\n\t\t\tsize: size\r\n\t\t};\r\n\t},\r\n\r\n\tdraw: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar scale = me._getValueScale();\r\n\t\tvar rects = me.getMeta().data;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar ilen = rects.length;\r\n\t\tvar i = 0;\r\n\r\n\t\thelpers$1.canvas.clipArea(chart.ctx, chart.chartArea);\r\n\r\n\t\tfor (; i < ilen; ++i) {\r\n\t\t\tvar val = scale._parseValue(dataset.data[i]);\r\n\t\t\tif (!isNaN(val.min) && !isNaN(val.max)) {\r\n\t\t\t\trects[i].draw();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\thelpers$1.canvas.unclipArea(chart.ctx);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDataElementOptions: function() {\r\n\t\tvar me = this;\r\n\t\tvar values = helpers$1.extend({}, core_datasetController.prototype._resolveDataElementOptions.apply(me, arguments));\r\n\t\tvar indexOpts = me._getIndexScale().options;\r\n\t\tvar valueOpts = me._getValueScale().options;\r\n\r\n\t\tvalues.barPercentage = valueOrDefault$3(indexOpts.barPercentage, values.barPercentage);\r\n\t\tvalues.barThickness = valueOrDefault$3(indexOpts.barThickness, values.barThickness);\r\n\t\tvalues.categoryPercentage = valueOrDefault$3(indexOpts.categoryPercentage, values.categoryPercentage);\r\n\t\tvalues.maxBarThickness = valueOrDefault$3(indexOpts.maxBarThickness, values.maxBarThickness);\r\n\t\tvalues.minBarLength = valueOrDefault$3(valueOpts.minBarLength, values.minBarLength);\r\n\r\n\t\treturn values;\r\n\t}\r\n\r\n});\n\nvar valueOrDefault$4 = helpers$1.valueOrDefault;\r\nvar resolve$1 = helpers$1.options.resolve;\r\n\r\ncore_defaults._set('bubble', {\r\n\thover: {\r\n\t\tmode: 'single'\r\n\t},\r\n\r\n\tscales: {\r\n\t\txAxes: [{\r\n\t\t\ttype: 'linear', // bubble should probably use a linear scale by default\r\n\t\t\tposition: 'bottom',\r\n\t\t\tid: 'x-axis-0' // need an ID so datasets can reference the scale\r\n\t\t}],\r\n\t\tyAxes: [{\r\n\t\t\ttype: 'linear',\r\n\t\t\tposition: 'left',\r\n\t\t\tid: 'y-axis-0'\r\n\t\t}]\r\n\t},\r\n\r\n\ttooltips: {\r\n\t\tcallbacks: {\r\n\t\t\ttitle: function() {\r\n\t\t\t\t// Title doesn't make sense for scatter since we format the data as a point\r\n\t\t\t\treturn '';\r\n\t\t\t},\r\n\t\t\tlabel: function(item, data) {\r\n\t\t\t\tvar datasetLabel = data.datasets[item.datasetIndex].label || '';\r\n\t\t\t\tvar dataPoint = data.datasets[item.datasetIndex].data[item.index];\r\n\t\t\t\treturn datasetLabel + ': (' + item.xLabel + ', ' + item.yLabel + ', ' + dataPoint.r + ')';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar controller_bubble = core_datasetController.extend({\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tdataElementType: elements.Point,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderColor',\r\n\t\t'borderWidth',\r\n\t\t'hoverBackgroundColor',\r\n\t\t'hoverBorderColor',\r\n\t\t'hoverBorderWidth',\r\n\t\t'hoverRadius',\r\n\t\t'hitRadius',\r\n\t\t'pointStyle',\r\n\t\t'rotation'\r\n\t],\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar points = meta.data;\r\n\r\n\t\t// Update Points\r\n\t\thelpers$1.each(points, function(point, index) {\r\n\t\t\tme.updateElement(point, index, reset);\r\n\t\t});\r\n\t},\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tupdateElement: function(point, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar custom = point.custom || {};\r\n\t\tvar xScale = me.getScaleForId(meta.xAxisID);\r\n\t\tvar yScale = me.getScaleForId(meta.yAxisID);\r\n\t\tvar options = me._resolveDataElementOptions(point, index);\r\n\t\tvar data = me.getDataset().data[index];\r\n\t\tvar dsIndex = me.index;\r\n\r\n\t\tvar x = reset ? xScale.getPixelForDecimal(0.5) : xScale.getPixelForValue(typeof data === 'object' ? data : NaN, index, dsIndex);\r\n\t\tvar y = reset ? yScale.getBasePixel() : yScale.getPixelForValue(data, index, dsIndex);\r\n\r\n\t\tpoint._xScale = xScale;\r\n\t\tpoint._yScale = yScale;\r\n\t\tpoint._options = options;\r\n\t\tpoint._datasetIndex = dsIndex;\r\n\t\tpoint._index = index;\r\n\t\tpoint._model = {\r\n\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\tborderColor: options.borderColor,\r\n\t\t\tborderWidth: options.borderWidth,\r\n\t\t\thitRadius: options.hitRadius,\r\n\t\t\tpointStyle: options.pointStyle,\r\n\t\t\trotation: options.rotation,\r\n\t\t\tradius: reset ? 0 : options.radius,\r\n\t\t\tskip: custom.skip || isNaN(x) || isNaN(y),\r\n\t\t\tx: x,\r\n\t\t\ty: y,\r\n\t\t};\r\n\r\n\t\tpoint.pivot();\r\n\t},\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tsetHoverStyle: function(point) {\r\n\t\tvar model = point._model;\r\n\t\tvar options = point._options;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\r\n\t\tpoint.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth,\r\n\t\t\tradius: model.radius\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = valueOrDefault$4(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\r\n\t\tmodel.borderColor = valueOrDefault$4(options.hoverBorderColor, getHoverColor(options.borderColor));\r\n\t\tmodel.borderWidth = valueOrDefault$4(options.hoverBorderWidth, options.borderWidth);\r\n\t\tmodel.radius = options.radius + options.hoverRadius;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDataElementOptions: function(point, index) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar custom = point.custom || {};\r\n\t\tvar data = dataset.data[index] || {};\r\n\t\tvar values = core_datasetController.prototype._resolveDataElementOptions.apply(me, arguments);\r\n\r\n\t\t// Scriptable options\r\n\t\tvar context = {\r\n\t\t\tchart: chart,\r\n\t\t\tdataIndex: index,\r\n\t\t\tdataset: dataset,\r\n\t\t\tdatasetIndex: me.index\r\n\t\t};\r\n\r\n\t\t// In case values were cached (and thus frozen), we need to clone the values\r\n\t\tif (me._cachedDataOpts === values) {\r\n\t\t\tvalues = helpers$1.extend({}, values);\r\n\t\t}\r\n\r\n\t\t// Custom radius resolution\r\n\t\tvalues.radius = resolve$1([\r\n\t\t\tcustom.radius,\r\n\t\t\tdata.r,\r\n\t\t\tme._config.radius,\r\n\t\t\tchart.options.elements.point.radius\r\n\t\t], context, index);\r\n\r\n\t\treturn values;\r\n\t}\r\n});\n\nvar valueOrDefault$5 = helpers$1.valueOrDefault;\r\n\r\nvar PI$1 = Math.PI;\r\nvar DOUBLE_PI$1 = PI$1 * 2;\r\nvar HALF_PI$1 = PI$1 / 2;\r\n\r\ncore_defaults._set('doughnut', {\r\n\tanimation: {\r\n\t\t// Boolean - Whether we animate the rotation of the Doughnut\r\n\t\tanimateRotate: true,\r\n\t\t// Boolean - Whether we animate scaling the Doughnut from the centre\r\n\t\tanimateScale: false\r\n\t},\r\n\thover: {\r\n\t\tmode: 'single'\r\n\t},\r\n\tlegendCallback: function(chart) {\r\n\t\tvar list = document.createElement('ul');\r\n\t\tvar data = chart.data;\r\n\t\tvar datasets = data.datasets;\r\n\t\tvar labels = data.labels;\r\n\t\tvar i, ilen, listItem, listItemSpan;\r\n\r\n\t\tlist.setAttribute('class', chart.id + '-legend');\r\n\t\tif (datasets.length) {\r\n\t\t\tfor (i = 0, ilen = datasets[0].data.length; i < ilen; ++i) {\r\n\t\t\t\tlistItem = list.appendChild(document.createElement('li'));\r\n\t\t\t\tlistItemSpan = listItem.appendChild(document.createElement('span'));\r\n\t\t\t\tlistItemSpan.style.backgroundColor = datasets[0].backgroundColor[i];\r\n\t\t\t\tif (labels[i]) {\r\n\t\t\t\t\tlistItem.appendChild(document.createTextNode(labels[i]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn list.outerHTML;\r\n\t},\r\n\tlegend: {\r\n\t\tlabels: {\r\n\t\t\tgenerateLabels: function(chart) {\r\n\t\t\t\tvar data = chart.data;\r\n\t\t\t\tif (data.labels.length && data.datasets.length) {\r\n\t\t\t\t\treturn data.labels.map(function(label, i) {\r\n\t\t\t\t\t\tvar meta = chart.getDatasetMeta(0);\r\n\t\t\t\t\t\tvar style = meta.controller.getStyle(i);\r\n\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\ttext: label,\r\n\t\t\t\t\t\t\tfillStyle: style.backgroundColor,\r\n\t\t\t\t\t\t\tstrokeStyle: style.borderColor,\r\n\t\t\t\t\t\t\tlineWidth: style.borderWidth,\r\n\t\t\t\t\t\t\thidden: isNaN(data.datasets[0].data[i]) || meta.data[i].hidden,\r\n\r\n\t\t\t\t\t\t\t// Extra data used for toggling the correct item\r\n\t\t\t\t\t\t\tindex: i\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn [];\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tonClick: function(e, legendItem) {\r\n\t\t\tvar index = legendItem.index;\r\n\t\t\tvar chart = this.chart;\r\n\t\t\tvar i, ilen, meta;\r\n\r\n\t\t\tfor (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {\r\n\t\t\t\tmeta = chart.getDatasetMeta(i);\r\n\t\t\t\t// toggle visibility of index if exists\r\n\t\t\t\tif (meta.data[index]) {\r\n\t\t\t\t\tmeta.data[index].hidden = !meta.data[index].hidden;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tchart.update();\r\n\t\t}\r\n\t},\r\n\r\n\t// The percentage of the chart that we cut out of the middle.\r\n\tcutoutPercentage: 50,\r\n\r\n\t// The rotation of the chart, where the first data arc begins.\r\n\trotation: -HALF_PI$1,\r\n\r\n\t// The total circumference of the chart.\r\n\tcircumference: DOUBLE_PI$1,\r\n\r\n\t// Need to override these to give a nice default\r\n\ttooltips: {\r\n\t\tcallbacks: {\r\n\t\t\ttitle: function() {\r\n\t\t\t\treturn '';\r\n\t\t\t},\r\n\t\t\tlabel: function(tooltipItem, data) {\r\n\t\t\t\tvar dataLabel = data.labels[tooltipItem.index];\r\n\t\t\t\tvar value = ': ' + data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];\r\n\r\n\t\t\t\tif (helpers$1.isArray(dataLabel)) {\r\n\t\t\t\t\t// show value on first line of multiline label\r\n\t\t\t\t\t// need to clone because we are changing the value\r\n\t\t\t\t\tdataLabel = dataLabel.slice();\r\n\t\t\t\t\tdataLabel[0] += value;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdataLabel += value;\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn dataLabel;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar controller_doughnut = core_datasetController.extend({\r\n\r\n\tdataElementType: elements.Arc,\r\n\r\n\tlinkScales: helpers$1.noop,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderColor',\r\n\t\t'borderWidth',\r\n\t\t'borderAlign',\r\n\t\t'hoverBackgroundColor',\r\n\t\t'hoverBorderColor',\r\n\t\t'hoverBorderWidth',\r\n\t],\r\n\r\n\t// Get index of the dataset in relation to the visible datasets. This allows determining the inner and outer radius correctly\r\n\tgetRingIndex: function(datasetIndex) {\r\n\t\tvar ringIndex = 0;\r\n\r\n\t\tfor (var j = 0; j < datasetIndex; ++j) {\r\n\t\t\tif (this.chart.isDatasetVisible(j)) {\r\n\t\t\t\t++ringIndex;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ringIndex;\r\n\t},\r\n\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar chartArea = chart.chartArea;\r\n\t\tvar opts = chart.options;\r\n\t\tvar ratioX = 1;\r\n\t\tvar ratioY = 1;\r\n\t\tvar offsetX = 0;\r\n\t\tvar offsetY = 0;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar arcs = meta.data;\r\n\t\tvar cutout = opts.cutoutPercentage / 100 || 0;\r\n\t\tvar circumference = opts.circumference;\r\n\t\tvar chartWeight = me._getRingWeight(me.index);\r\n\t\tvar maxWidth, maxHeight, i, ilen;\r\n\r\n\t\t// If the chart's circumference isn't a full circle, calculate size as a ratio of the width/height of the arc\r\n\t\tif (circumference < DOUBLE_PI$1) {\r\n\t\t\tvar startAngle = opts.rotation % DOUBLE_PI$1;\r\n\t\t\tstartAngle += startAngle >= PI$1 ? -DOUBLE_PI$1 : startAngle < -PI$1 ? DOUBLE_PI$1 : 0;\r\n\t\t\tvar endAngle = startAngle + circumference;\r\n\t\t\tvar startX = Math.cos(startAngle);\r\n\t\t\tvar startY = Math.sin(startAngle);\r\n\t\t\tvar endX = Math.cos(endAngle);\r\n\t\t\tvar endY = Math.sin(endAngle);\r\n\t\t\tvar contains0 = (startAngle <= 0 && endAngle >= 0) || endAngle >= DOUBLE_PI$1;\r\n\t\t\tvar contains90 = (startAngle <= HALF_PI$1 && endAngle >= HALF_PI$1) || endAngle >= DOUBLE_PI$1 + HALF_PI$1;\r\n\t\t\tvar contains180 = startAngle === -PI$1 || endAngle >= PI$1;\r\n\t\t\tvar contains270 = (startAngle <= -HALF_PI$1 && endAngle >= -HALF_PI$1) || endAngle >= PI$1 + HALF_PI$1;\r\n\t\t\tvar minX = contains180 ? -1 : Math.min(startX, startX * cutout, endX, endX * cutout);\r\n\t\t\tvar minY = contains270 ? -1 : Math.min(startY, startY * cutout, endY, endY * cutout);\r\n\t\t\tvar maxX = contains0 ? 1 : Math.max(startX, startX * cutout, endX, endX * cutout);\r\n\t\t\tvar maxY = contains90 ? 1 : Math.max(startY, startY * cutout, endY, endY * cutout);\r\n\t\t\tratioX = (maxX - minX) / 2;\r\n\t\t\tratioY = (maxY - minY) / 2;\r\n\t\t\toffsetX = -(maxX + minX) / 2;\r\n\t\t\toffsetY = -(maxY + minY) / 2;\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = arcs.length; i < ilen; ++i) {\r\n\t\t\tarcs[i]._options = me._resolveDataElementOptions(arcs[i], i);\r\n\t\t}\r\n\r\n\t\tchart.borderWidth = me.getMaxBorderWidth();\r\n\t\tmaxWidth = (chartArea.right - chartArea.left - chart.borderWidth) / ratioX;\r\n\t\tmaxHeight = (chartArea.bottom - chartArea.top - chart.borderWidth) / ratioY;\r\n\t\tchart.outerRadius = Math.max(Math.min(maxWidth, maxHeight) / 2, 0);\r\n\t\tchart.innerRadius = Math.max(chart.outerRadius * cutout, 0);\r\n\t\tchart.radiusLength = (chart.outerRadius - chart.innerRadius) / (me._getVisibleDatasetWeightTotal() || 1);\r\n\t\tchart.offsetX = offsetX * chart.outerRadius;\r\n\t\tchart.offsetY = offsetY * chart.outerRadius;\r\n\r\n\t\tmeta.total = me.calculateTotal();\r\n\r\n\t\tme.outerRadius = chart.outerRadius - chart.radiusLength * me._getRingWeightOffset(me.index);\r\n\t\tme.innerRadius = Math.max(me.outerRadius - chart.radiusLength * chartWeight, 0);\r\n\r\n\t\tfor (i = 0, ilen = arcs.length; i < ilen; ++i) {\r\n\t\t\tme.updateElement(arcs[i], i, reset);\r\n\t\t}\r\n\t},\r\n\r\n\tupdateElement: function(arc, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar chartArea = chart.chartArea;\r\n\t\tvar opts = chart.options;\r\n\t\tvar animationOpts = opts.animation;\r\n\t\tvar centerX = (chartArea.left + chartArea.right) / 2;\r\n\t\tvar centerY = (chartArea.top + chartArea.bottom) / 2;\r\n\t\tvar startAngle = opts.rotation; // non reset case handled later\r\n\t\tvar endAngle = opts.rotation; // non reset case handled later\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar circumference = reset && animationOpts.animateRotate ? 0 : arc.hidden ? 0 : me.calculateCircumference(dataset.data[index]) * (opts.circumference / DOUBLE_PI$1);\r\n\t\tvar innerRadius = reset && animationOpts.animateScale ? 0 : me.innerRadius;\r\n\t\tvar outerRadius = reset && animationOpts.animateScale ? 0 : me.outerRadius;\r\n\t\tvar options = arc._options || {};\r\n\r\n\t\thelpers$1.extend(arc, {\r\n\t\t\t// Utility\r\n\t\t\t_datasetIndex: me.index,\r\n\t\t\t_index: index,\r\n\r\n\t\t\t// Desired view properties\r\n\t\t\t_model: {\r\n\t\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\t\tborderColor: options.borderColor,\r\n\t\t\t\tborderWidth: options.borderWidth,\r\n\t\t\t\tborderAlign: options.borderAlign,\r\n\t\t\t\tx: centerX + chart.offsetX,\r\n\t\t\t\ty: centerY + chart.offsetY,\r\n\t\t\t\tstartAngle: startAngle,\r\n\t\t\t\tendAngle: endAngle,\r\n\t\t\t\tcircumference: circumference,\r\n\t\t\t\touterRadius: outerRadius,\r\n\t\t\t\tinnerRadius: innerRadius,\r\n\t\t\t\tlabel: helpers$1.valueAtIndexOrDefault(dataset.label, index, chart.data.labels[index])\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tvar model = arc._model;\r\n\r\n\t\t// Set correct angles if not resetting\r\n\t\tif (!reset || !animationOpts.animateRotate) {\r\n\t\t\tif (index === 0) {\r\n\t\t\t\tmodel.startAngle = opts.rotation;\r\n\t\t\t} else {\r\n\t\t\t\tmodel.startAngle = me.getMeta().data[index - 1]._model.endAngle;\r\n\t\t\t}\r\n\r\n\t\t\tmodel.endAngle = model.startAngle + model.circumference;\r\n\t\t}\r\n\r\n\t\tarc.pivot();\r\n\t},\r\n\r\n\tcalculateTotal: function() {\r\n\t\tvar dataset = this.getDataset();\r\n\t\tvar meta = this.getMeta();\r\n\t\tvar total = 0;\r\n\t\tvar value;\r\n\r\n\t\thelpers$1.each(meta.data, function(element, index) {\r\n\t\t\tvalue = dataset.data[index];\r\n\t\t\tif (!isNaN(value) && !element.hidden) {\r\n\t\t\t\ttotal += Math.abs(value);\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t/* if (total === 0) {\r\n\t\t\ttotal = NaN;\r\n\t\t}*/\r\n\r\n\t\treturn total;\r\n\t},\r\n\r\n\tcalculateCircumference: function(value) {\r\n\t\tvar total = this.getMeta().total;\r\n\t\tif (total > 0 && !isNaN(value)) {\r\n\t\t\treturn DOUBLE_PI$1 * (Math.abs(value) / total);\r\n\t\t}\r\n\t\treturn 0;\r\n\t},\r\n\r\n\t// gets the max border or hover width to properly scale pie charts\r\n\tgetMaxBorderWidth: function(arcs) {\r\n\t\tvar me = this;\r\n\t\tvar max = 0;\r\n\t\tvar chart = me.chart;\r\n\t\tvar i, ilen, meta, arc, controller, options, borderWidth, hoverWidth;\r\n\r\n\t\tif (!arcs) {\r\n\t\t\t// Find the outmost visible dataset\r\n\t\t\tfor (i = 0, ilen = chart.data.datasets.length; i < ilen; ++i) {\r\n\t\t\t\tif (chart.isDatasetVisible(i)) {\r\n\t\t\t\t\tmeta = chart.getDatasetMeta(i);\r\n\t\t\t\t\tarcs = meta.data;\r\n\t\t\t\t\tif (i !== me.index) {\r\n\t\t\t\t\t\tcontroller = meta.controller;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!arcs) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = arcs.length; i < ilen; ++i) {\r\n\t\t\tarc = arcs[i];\r\n\t\t\tif (controller) {\r\n\t\t\t\tcontroller._configure();\r\n\t\t\t\toptions = controller._resolveDataElementOptions(arc, i);\r\n\t\t\t} else {\r\n\t\t\t\toptions = arc._options;\r\n\t\t\t}\r\n\t\t\tif (options.borderAlign !== 'inner') {\r\n\t\t\t\tborderWidth = options.borderWidth;\r\n\t\t\t\thoverWidth = options.hoverBorderWidth;\r\n\r\n\t\t\t\tmax = borderWidth > max ? borderWidth : max;\r\n\t\t\t\tmax = hoverWidth > max ? hoverWidth : max;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn max;\r\n\t},\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tsetHoverStyle: function(arc) {\r\n\t\tvar model = arc._model;\r\n\t\tvar options = arc._options;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\r\n\t\tarc.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth,\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = valueOrDefault$5(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\r\n\t\tmodel.borderColor = valueOrDefault$5(options.hoverBorderColor, getHoverColor(options.borderColor));\r\n\t\tmodel.borderWidth = valueOrDefault$5(options.hoverBorderWidth, options.borderWidth);\r\n\t},\r\n\r\n\t/**\r\n\t * Get radius length offset of the dataset in relation to the visible datasets weights. This allows determining the inner and outer radius correctly\r\n\t * @private\r\n\t */\r\n\t_getRingWeightOffset: function(datasetIndex) {\r\n\t\tvar ringWeightOffset = 0;\r\n\r\n\t\tfor (var i = 0; i < datasetIndex; ++i) {\r\n\t\t\tif (this.chart.isDatasetVisible(i)) {\r\n\t\t\t\tringWeightOffset += this._getRingWeight(i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn ringWeightOffset;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getRingWeight: function(dataSetIndex) {\r\n\t\treturn Math.max(valueOrDefault$5(this.chart.data.datasets[dataSetIndex].weight, 1), 0);\r\n\t},\r\n\r\n\t/**\r\n\t * Returns the sum of all visibile data set weights. This value can be 0.\r\n\t * @private\r\n\t */\r\n\t_getVisibleDatasetWeightTotal: function() {\r\n\t\treturn this._getRingWeightOffset(this.chart.data.datasets.length);\r\n\t}\r\n});\n\ncore_defaults._set('horizontalBar', {\r\n\thover: {\r\n\t\tmode: 'index',\r\n\t\taxis: 'y'\r\n\t},\r\n\r\n\tscales: {\r\n\t\txAxes: [{\r\n\t\t\ttype: 'linear',\r\n\t\t\tposition: 'bottom'\r\n\t\t}],\r\n\r\n\t\tyAxes: [{\r\n\t\t\ttype: 'category',\r\n\t\t\tposition: 'left',\r\n\t\t\toffset: true,\r\n\t\t\tgridLines: {\r\n\t\t\t\toffsetGridLines: true\r\n\t\t\t}\r\n\t\t}]\r\n\t},\r\n\r\n\telements: {\r\n\t\trectangle: {\r\n\t\t\tborderSkipped: 'left'\r\n\t\t}\r\n\t},\r\n\r\n\ttooltips: {\r\n\t\tmode: 'index',\r\n\t\taxis: 'y'\r\n\t}\r\n});\r\n\r\ncore_defaults._set('global', {\r\n\tdatasets: {\r\n\t\thorizontalBar: {\r\n\t\t\tcategoryPercentage: 0.8,\r\n\t\t\tbarPercentage: 0.9\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar controller_horizontalBar = controller_bar.extend({\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getValueScaleId: function() {\r\n\t\treturn this.getMeta().xAxisID;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getIndexScaleId: function() {\r\n\t\treturn this.getMeta().yAxisID;\r\n\t}\r\n});\n\nvar valueOrDefault$6 = helpers$1.valueOrDefault;\r\nvar resolve$2 = helpers$1.options.resolve;\r\nvar isPointInArea = helpers$1.canvas._isPointInArea;\r\n\r\ncore_defaults._set('line', {\r\n\tshowLines: true,\r\n\tspanGaps: false,\r\n\r\n\thover: {\r\n\t\tmode: 'label'\r\n\t},\r\n\r\n\tscales: {\r\n\t\txAxes: [{\r\n\t\t\ttype: 'category',\r\n\t\t\tid: 'x-axis-0'\r\n\t\t}],\r\n\t\tyAxes: [{\r\n\t\t\ttype: 'linear',\r\n\t\t\tid: 'y-axis-0'\r\n\t\t}]\r\n\t}\r\n});\r\n\r\nfunction scaleClip(scale, halfBorderWidth) {\r\n\tvar tickOpts = scale && scale.options.ticks || {};\r\n\tvar reverse = tickOpts.reverse;\r\n\tvar min = tickOpts.min === undefined ? halfBorderWidth : 0;\r\n\tvar max = tickOpts.max === undefined ? halfBorderWidth : 0;\r\n\treturn {\r\n\t\tstart: reverse ? max : min,\r\n\t\tend: reverse ? min : max\r\n\t};\r\n}\r\n\r\nfunction defaultClip(xScale, yScale, borderWidth) {\r\n\tvar halfBorderWidth = borderWidth / 2;\r\n\tvar x = scaleClip(xScale, halfBorderWidth);\r\n\tvar y = scaleClip(yScale, halfBorderWidth);\r\n\r\n\treturn {\r\n\t\ttop: y.end,\r\n\t\tright: x.end,\r\n\t\tbottom: y.start,\r\n\t\tleft: x.start\r\n\t};\r\n}\r\n\r\nfunction toClip(value) {\r\n\tvar t, r, b, l;\r\n\r\n\tif (helpers$1.isObject(value)) {\r\n\t\tt = value.top;\r\n\t\tr = value.right;\r\n\t\tb = value.bottom;\r\n\t\tl = value.left;\r\n\t} else {\r\n\t\tt = r = b = l = value;\r\n\t}\r\n\r\n\treturn {\r\n\t\ttop: t,\r\n\t\tright: r,\r\n\t\tbottom: b,\r\n\t\tleft: l\r\n\t};\r\n}\r\n\r\n\r\nvar controller_line = core_datasetController.extend({\r\n\r\n\tdatasetElementType: elements.Line,\r\n\r\n\tdataElementType: elements.Point,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_datasetElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderCapStyle',\r\n\t\t'borderColor',\r\n\t\t'borderDash',\r\n\t\t'borderDashOffset',\r\n\t\t'borderJoinStyle',\r\n\t\t'borderWidth',\r\n\t\t'cubicInterpolationMode',\r\n\t\t'fill'\r\n\t],\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: {\r\n\t\tbackgroundColor: 'pointBackgroundColor',\r\n\t\tborderColor: 'pointBorderColor',\r\n\t\tborderWidth: 'pointBorderWidth',\r\n\t\thitRadius: 'pointHitRadius',\r\n\t\thoverBackgroundColor: 'pointHoverBackgroundColor',\r\n\t\thoverBorderColor: 'pointHoverBorderColor',\r\n\t\thoverBorderWidth: 'pointHoverBorderWidth',\r\n\t\thoverRadius: 'pointHoverRadius',\r\n\t\tpointStyle: 'pointStyle',\r\n\t\tradius: 'pointRadius',\r\n\t\trotation: 'pointRotation'\r\n\t},\r\n\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar line = meta.dataset;\r\n\t\tvar points = meta.data || [];\r\n\t\tvar options = me.chart.options;\r\n\t\tvar config = me._config;\r\n\t\tvar showLine = me._showLine = valueOrDefault$6(config.showLine, options.showLines);\r\n\t\tvar i, ilen;\r\n\r\n\t\tme._xScale = me.getScaleForId(meta.xAxisID);\r\n\t\tme._yScale = me.getScaleForId(meta.yAxisID);\r\n\r\n\t\t// Update Line\r\n\t\tif (showLine) {\r\n\t\t\t// Compatibility: If the properties are defined with only the old name, use those values\r\n\t\t\tif (config.tension !== undefined && config.lineTension === undefined) {\r\n\t\t\t\tconfig.lineTension = config.tension;\r\n\t\t\t}\r\n\r\n\t\t\t// Utility\r\n\t\t\tline._scale = me._yScale;\r\n\t\t\tline._datasetIndex = me.index;\r\n\t\t\t// Data\r\n\t\t\tline._children = points;\r\n\t\t\t// Model\r\n\t\t\tline._model = me._resolveDatasetElementOptions(line);\r\n\r\n\t\t\tline.pivot();\r\n\t\t}\r\n\r\n\t\t// Update Points\r\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\tme.updateElement(points[i], i, reset);\r\n\t\t}\r\n\r\n\t\tif (showLine && line._model.tension !== 0) {\r\n\t\t\tme.updateBezierControlPoints();\r\n\t\t}\r\n\r\n\t\t// Now pivot the point for animation\r\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\tpoints[i].pivot();\r\n\t\t}\r\n\t},\r\n\r\n\tupdateElement: function(point, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar custom = point.custom || {};\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar datasetIndex = me.index;\r\n\t\tvar value = dataset.data[index];\r\n\t\tvar xScale = me._xScale;\r\n\t\tvar yScale = me._yScale;\r\n\t\tvar lineModel = meta.dataset._model;\r\n\t\tvar x, y;\r\n\r\n\t\tvar options = me._resolveDataElementOptions(point, index);\r\n\r\n\t\tx = xScale.getPixelForValue(typeof value === 'object' ? value : NaN, index, datasetIndex);\r\n\t\ty = reset ? yScale.getBasePixel() : me.calculatePointY(value, index, datasetIndex);\r\n\r\n\t\t// Utility\r\n\t\tpoint._xScale = xScale;\r\n\t\tpoint._yScale = yScale;\r\n\t\tpoint._options = options;\r\n\t\tpoint._datasetIndex = datasetIndex;\r\n\t\tpoint._index = index;\r\n\r\n\t\t// Desired view properties\r\n\t\tpoint._model = {\r\n\t\t\tx: x,\r\n\t\t\ty: y,\r\n\t\t\tskip: custom.skip || isNaN(x) || isNaN(y),\r\n\t\t\t// Appearance\r\n\t\t\tradius: options.radius,\r\n\t\t\tpointStyle: options.pointStyle,\r\n\t\t\trotation: options.rotation,\r\n\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\tborderColor: options.borderColor,\r\n\t\t\tborderWidth: options.borderWidth,\r\n\t\t\ttension: valueOrDefault$6(custom.tension, lineModel ? lineModel.tension : 0),\r\n\t\t\tsteppedLine: lineModel ? lineModel.steppedLine : false,\r\n\t\t\t// Tooltip\r\n\t\t\thitRadius: options.hitRadius\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDatasetElementOptions: function(element) {\r\n\t\tvar me = this;\r\n\t\tvar config = me._config;\r\n\t\tvar custom = element.custom || {};\r\n\t\tvar options = me.chart.options;\r\n\t\tvar lineOptions = options.elements.line;\r\n\t\tvar values = core_datasetController.prototype._resolveDatasetElementOptions.apply(me, arguments);\r\n\r\n\t\t// The default behavior of lines is to break at null values, according\r\n\t\t// to https://github.com/chartjs/Chart.js/issues/2435#issuecomment-216718158\r\n\t\t// This option gives lines the ability to span gaps\r\n\t\tvalues.spanGaps = valueOrDefault$6(config.spanGaps, options.spanGaps);\r\n\t\tvalues.tension = valueOrDefault$6(config.lineTension, lineOptions.tension);\r\n\t\tvalues.steppedLine = resolve$2([custom.steppedLine, config.steppedLine, lineOptions.stepped]);\r\n\t\tvalues.clip = toClip(valueOrDefault$6(config.clip, defaultClip(me._xScale, me._yScale, values.borderWidth)));\r\n\r\n\t\treturn values;\r\n\t},\r\n\r\n\tcalculatePointY: function(value, index, datasetIndex) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar yScale = me._yScale;\r\n\t\tvar sumPos = 0;\r\n\t\tvar sumNeg = 0;\r\n\t\tvar i, ds, dsMeta, stackedRightValue, rightValue, metasets, ilen;\r\n\r\n\t\tif (yScale.options.stacked) {\r\n\t\t\trightValue = +yScale.getRightValue(value);\r\n\t\t\tmetasets = chart._getSortedVisibleDatasetMetas();\r\n\t\t\tilen = metasets.length;\r\n\r\n\t\t\tfor (i = 0; i < ilen; ++i) {\r\n\t\t\t\tdsMeta = metasets[i];\r\n\t\t\t\tif (dsMeta.index === datasetIndex) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tds = chart.data.datasets[dsMeta.index];\r\n\t\t\t\tif (dsMeta.type === 'line' && dsMeta.yAxisID === yScale.id) {\r\n\t\t\t\t\tstackedRightValue = +yScale.getRightValue(ds.data[index]);\r\n\t\t\t\t\tif (stackedRightValue < 0) {\r\n\t\t\t\t\t\tsumNeg += stackedRightValue || 0;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsumPos += stackedRightValue || 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (rightValue < 0) {\r\n\t\t\t\treturn yScale.getPixelForValue(sumNeg + rightValue);\r\n\t\t\t}\r\n\t\t\treturn yScale.getPixelForValue(sumPos + rightValue);\r\n\t\t}\r\n\t\treturn yScale.getPixelForValue(value);\r\n\t},\r\n\r\n\tupdateBezierControlPoints: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar lineModel = meta.dataset._model;\r\n\t\tvar area = chart.chartArea;\r\n\t\tvar points = meta.data || [];\r\n\t\tvar i, ilen, model, controlPoints;\r\n\r\n\t\t// Only consider points that are drawn in case the spanGaps option is used\r\n\t\tif (lineModel.spanGaps) {\r\n\t\t\tpoints = points.filter(function(pt) {\r\n\t\t\t\treturn !pt._model.skip;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tfunction capControlPoint(pt, min, max) {\r\n\t\t\treturn Math.max(Math.min(pt, max), min);\r\n\t\t}\r\n\r\n\t\tif (lineModel.cubicInterpolationMode === 'monotone') {\r\n\t\t\thelpers$1.splineCurveMonotone(points);\r\n\t\t} else {\r\n\t\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\t\tmodel = points[i]._model;\r\n\t\t\t\tcontrolPoints = helpers$1.splineCurve(\r\n\t\t\t\t\thelpers$1.previousItem(points, i)._model,\r\n\t\t\t\t\tmodel,\r\n\t\t\t\t\thelpers$1.nextItem(points, i)._model,\r\n\t\t\t\t\tlineModel.tension\r\n\t\t\t\t);\r\n\t\t\t\tmodel.controlPointPreviousX = controlPoints.previous.x;\r\n\t\t\t\tmodel.controlPointPreviousY = controlPoints.previous.y;\r\n\t\t\t\tmodel.controlPointNextX = controlPoints.next.x;\r\n\t\t\t\tmodel.controlPointNextY = controlPoints.next.y;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (chart.options.elements.line.capBezierPoints) {\r\n\t\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\t\tmodel = points[i]._model;\r\n\t\t\t\tif (isPointInArea(model, area)) {\r\n\t\t\t\t\tif (i > 0 && isPointInArea(points[i - 1]._model, area)) {\r\n\t\t\t\t\t\tmodel.controlPointPreviousX = capControlPoint(model.controlPointPreviousX, area.left, area.right);\r\n\t\t\t\t\t\tmodel.controlPointPreviousY = capControlPoint(model.controlPointPreviousY, area.top, area.bottom);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (i < points.length - 1 && isPointInArea(points[i + 1]._model, area)) {\r\n\t\t\t\t\t\tmodel.controlPointNextX = capControlPoint(model.controlPointNextX, area.left, area.right);\r\n\t\t\t\t\t\tmodel.controlPointNextY = capControlPoint(model.controlPointNextY, area.top, area.bottom);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tdraw: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar points = meta.data || [];\r\n\t\tvar area = chart.chartArea;\r\n\t\tvar canvas = chart.canvas;\r\n\t\tvar i = 0;\r\n\t\tvar ilen = points.length;\r\n\t\tvar clip;\r\n\r\n\t\tif (me._showLine) {\r\n\t\t\tclip = meta.dataset._model.clip;\r\n\r\n\t\t\thelpers$1.canvas.clipArea(chart.ctx, {\r\n\t\t\t\tleft: clip.left === false ? 0 : area.left - clip.left,\r\n\t\t\t\tright: clip.right === false ? canvas.width : area.right + clip.right,\r\n\t\t\t\ttop: clip.top === false ? 0 : area.top - clip.top,\r\n\t\t\t\tbottom: clip.bottom === false ? canvas.height : area.bottom + clip.bottom\r\n\t\t\t});\r\n\r\n\t\t\tmeta.dataset.draw();\r\n\r\n\t\t\thelpers$1.canvas.unclipArea(chart.ctx);\r\n\t\t}\r\n\r\n\t\t// Draw the points\r\n\t\tfor (; i < ilen; ++i) {\r\n\t\t\tpoints[i].draw(area);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tsetHoverStyle: function(point) {\r\n\t\tvar model = point._model;\r\n\t\tvar options = point._options;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\r\n\t\tpoint.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth,\r\n\t\t\tradius: model.radius\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = valueOrDefault$6(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\r\n\t\tmodel.borderColor = valueOrDefault$6(options.hoverBorderColor, getHoverColor(options.borderColor));\r\n\t\tmodel.borderWidth = valueOrDefault$6(options.hoverBorderWidth, options.borderWidth);\r\n\t\tmodel.radius = valueOrDefault$6(options.hoverRadius, options.radius);\r\n\t},\r\n});\n\nvar resolve$3 = helpers$1.options.resolve;\r\n\r\ncore_defaults._set('polarArea', {\r\n\tscale: {\r\n\t\ttype: 'radialLinear',\r\n\t\tangleLines: {\r\n\t\t\tdisplay: false\r\n\t\t},\r\n\t\tgridLines: {\r\n\t\t\tcircular: true\r\n\t\t},\r\n\t\tpointLabels: {\r\n\t\t\tdisplay: false\r\n\t\t},\r\n\t\tticks: {\r\n\t\t\tbeginAtZero: true\r\n\t\t}\r\n\t},\r\n\r\n\t// Boolean - Whether to animate the rotation of the chart\r\n\tanimation: {\r\n\t\tanimateRotate: true,\r\n\t\tanimateScale: true\r\n\t},\r\n\r\n\tstartAngle: -0.5 * Math.PI,\r\n\tlegendCallback: function(chart) {\r\n\t\tvar list = document.createElement('ul');\r\n\t\tvar data = chart.data;\r\n\t\tvar datasets = data.datasets;\r\n\t\tvar labels = data.labels;\r\n\t\tvar i, ilen, listItem, listItemSpan;\r\n\r\n\t\tlist.setAttribute('class', chart.id + '-legend');\r\n\t\tif (datasets.length) {\r\n\t\t\tfor (i = 0, ilen = datasets[0].data.length; i < ilen; ++i) {\r\n\t\t\t\tlistItem = list.appendChild(document.createElement('li'));\r\n\t\t\t\tlistItemSpan = listItem.appendChild(document.createElement('span'));\r\n\t\t\t\tlistItemSpan.style.backgroundColor = datasets[0].backgroundColor[i];\r\n\t\t\t\tif (labels[i]) {\r\n\t\t\t\t\tlistItem.appendChild(document.createTextNode(labels[i]));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn list.outerHTML;\r\n\t},\r\n\tlegend: {\r\n\t\tlabels: {\r\n\t\t\tgenerateLabels: function(chart) {\r\n\t\t\t\tvar data = chart.data;\r\n\t\t\t\tif (data.labels.length && data.datasets.length) {\r\n\t\t\t\t\treturn data.labels.map(function(label, i) {\r\n\t\t\t\t\t\tvar meta = chart.getDatasetMeta(0);\r\n\t\t\t\t\t\tvar style = meta.controller.getStyle(i);\r\n\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\ttext: label,\r\n\t\t\t\t\t\t\tfillStyle: style.backgroundColor,\r\n\t\t\t\t\t\t\tstrokeStyle: style.borderColor,\r\n\t\t\t\t\t\t\tlineWidth: style.borderWidth,\r\n\t\t\t\t\t\t\thidden: isNaN(data.datasets[0].data[i]) || meta.data[i].hidden,\r\n\r\n\t\t\t\t\t\t\t// Extra data used for toggling the correct item\r\n\t\t\t\t\t\t\tindex: i\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t\treturn [];\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tonClick: function(e, legendItem) {\r\n\t\t\tvar index = legendItem.index;\r\n\t\t\tvar chart = this.chart;\r\n\t\t\tvar i, ilen, meta;\r\n\r\n\t\t\tfor (i = 0, ilen = (chart.data.datasets || []).length; i < ilen; ++i) {\r\n\t\t\t\tmeta = chart.getDatasetMeta(i);\r\n\t\t\t\tmeta.data[index].hidden = !meta.data[index].hidden;\r\n\t\t\t}\r\n\r\n\t\t\tchart.update();\r\n\t\t}\r\n\t},\r\n\r\n\t// Need to override these to give a nice default\r\n\ttooltips: {\r\n\t\tcallbacks: {\r\n\t\t\ttitle: function() {\r\n\t\t\t\treturn '';\r\n\t\t\t},\r\n\t\t\tlabel: function(item, data) {\r\n\t\t\t\treturn data.labels[item.index] + ': ' + item.yLabel;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar controller_polarArea = core_datasetController.extend({\r\n\r\n\tdataElementType: elements.Arc,\r\n\r\n\tlinkScales: helpers$1.noop,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderColor',\r\n\t\t'borderWidth',\r\n\t\t'borderAlign',\r\n\t\t'hoverBackgroundColor',\r\n\t\t'hoverBorderColor',\r\n\t\t'hoverBorderWidth',\r\n\t],\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getIndexScaleId: function() {\r\n\t\treturn this.chart.scale.id;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getValueScaleId: function() {\r\n\t\treturn this.chart.scale.id;\r\n\t},\r\n\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar start = me.chart.options.startAngle || 0;\r\n\t\tvar starts = me._starts = [];\r\n\t\tvar angles = me._angles = [];\r\n\t\tvar arcs = meta.data;\r\n\t\tvar i, ilen, angle;\r\n\r\n\t\tme._updateRadius();\r\n\r\n\t\tmeta.count = me.countVisibleElements();\r\n\r\n\t\tfor (i = 0, ilen = dataset.data.length; i < ilen; i++) {\r\n\t\t\tstarts[i] = start;\r\n\t\t\tangle = me._computeAngle(i);\r\n\t\t\tangles[i] = angle;\r\n\t\t\tstart += angle;\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = arcs.length; i < ilen; ++i) {\r\n\t\t\tarcs[i]._options = me._resolveDataElementOptions(arcs[i], i);\r\n\t\t\tme.updateElement(arcs[i], i, reset);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_updateRadius: function() {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar chartArea = chart.chartArea;\r\n\t\tvar opts = chart.options;\r\n\t\tvar minSize = Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top);\r\n\r\n\t\tchart.outerRadius = Math.max(minSize / 2, 0);\r\n\t\tchart.innerRadius = Math.max(opts.cutoutPercentage ? (chart.outerRadius / 100) * (opts.cutoutPercentage) : 1, 0);\r\n\t\tchart.radiusLength = (chart.outerRadius - chart.innerRadius) / chart.getVisibleDatasetCount();\r\n\r\n\t\tme.outerRadius = chart.outerRadius - (chart.radiusLength * me.index);\r\n\t\tme.innerRadius = me.outerRadius - chart.radiusLength;\r\n\t},\r\n\r\n\tupdateElement: function(arc, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar chart = me.chart;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar opts = chart.options;\r\n\t\tvar animationOpts = opts.animation;\r\n\t\tvar scale = chart.scale;\r\n\t\tvar labels = chart.data.labels;\r\n\r\n\t\tvar centerX = scale.xCenter;\r\n\t\tvar centerY = scale.yCenter;\r\n\r\n\t\t// var negHalfPI = -0.5 * Math.PI;\r\n\t\tvar datasetStartAngle = opts.startAngle;\r\n\t\tvar distance = arc.hidden ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]);\r\n\t\tvar startAngle = me._starts[index];\r\n\t\tvar endAngle = startAngle + (arc.hidden ? 0 : me._angles[index]);\r\n\r\n\t\tvar resetRadius = animationOpts.animateScale ? 0 : scale.getDistanceFromCenterForValue(dataset.data[index]);\r\n\t\tvar options = arc._options || {};\r\n\r\n\t\thelpers$1.extend(arc, {\r\n\t\t\t// Utility\r\n\t\t\t_datasetIndex: me.index,\r\n\t\t\t_index: index,\r\n\t\t\t_scale: scale,\r\n\r\n\t\t\t// Desired view properties\r\n\t\t\t_model: {\r\n\t\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\t\tborderColor: options.borderColor,\r\n\t\t\t\tborderWidth: options.borderWidth,\r\n\t\t\t\tborderAlign: options.borderAlign,\r\n\t\t\t\tx: centerX,\r\n\t\t\t\ty: centerY,\r\n\t\t\t\tinnerRadius: 0,\r\n\t\t\t\touterRadius: reset ? resetRadius : distance,\r\n\t\t\t\tstartAngle: reset && animationOpts.animateRotate ? datasetStartAngle : startAngle,\r\n\t\t\t\tendAngle: reset && animationOpts.animateRotate ? datasetStartAngle : endAngle,\r\n\t\t\t\tlabel: helpers$1.valueAtIndexOrDefault(labels, index, labels[index])\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tarc.pivot();\r\n\t},\r\n\r\n\tcountVisibleElements: function() {\r\n\t\tvar dataset = this.getDataset();\r\n\t\tvar meta = this.getMeta();\r\n\t\tvar count = 0;\r\n\r\n\t\thelpers$1.each(meta.data, function(element, index) {\r\n\t\t\tif (!isNaN(dataset.data[index]) && !element.hidden) {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\treturn count;\r\n\t},\r\n\r\n\t/**\r\n\t * @protected\r\n\t */\r\n\tsetHoverStyle: function(arc) {\r\n\t\tvar model = arc._model;\r\n\t\tvar options = arc._options;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\t\tvar valueOrDefault = helpers$1.valueOrDefault;\r\n\r\n\t\tarc.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth,\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = valueOrDefault(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\r\n\t\tmodel.borderColor = valueOrDefault(options.hoverBorderColor, getHoverColor(options.borderColor));\r\n\t\tmodel.borderWidth = valueOrDefault(options.hoverBorderWidth, options.borderWidth);\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_computeAngle: function(index) {\r\n\t\tvar me = this;\r\n\t\tvar count = this.getMeta().count;\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar meta = me.getMeta();\r\n\r\n\t\tif (isNaN(dataset.data[index]) || meta.data[index].hidden) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\t// Scriptable options\r\n\t\tvar context = {\r\n\t\t\tchart: me.chart,\r\n\t\t\tdataIndex: index,\r\n\t\t\tdataset: dataset,\r\n\t\t\tdatasetIndex: me.index\r\n\t\t};\r\n\r\n\t\treturn resolve$3([\r\n\t\t\tme.chart.options.elements.arc.angle,\r\n\t\t\t(2 * Math.PI) / count\r\n\t\t], context, index);\r\n\t}\r\n});\n\ncore_defaults._set('pie', helpers$1.clone(core_defaults.doughnut));\r\ncore_defaults._set('pie', {\r\n\tcutoutPercentage: 0\r\n});\r\n\r\n// Pie charts are Doughnut chart with different defaults\r\nvar controller_pie = controller_doughnut;\n\nvar valueOrDefault$7 = helpers$1.valueOrDefault;\r\n\r\ncore_defaults._set('radar', {\r\n\tspanGaps: false,\r\n\tscale: {\r\n\t\ttype: 'radialLinear'\r\n\t},\r\n\telements: {\r\n\t\tline: {\r\n\t\t\tfill: 'start',\r\n\t\t\ttension: 0 // no bezier in radar\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar controller_radar = core_datasetController.extend({\r\n\tdatasetElementType: elements.Line,\r\n\r\n\tdataElementType: elements.Point,\r\n\r\n\tlinkScales: helpers$1.noop,\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_datasetElementOptions: [\r\n\t\t'backgroundColor',\r\n\t\t'borderWidth',\r\n\t\t'borderColor',\r\n\t\t'borderCapStyle',\r\n\t\t'borderDash',\r\n\t\t'borderDashOffset',\r\n\t\t'borderJoinStyle',\r\n\t\t'fill'\r\n\t],\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_dataElementOptions: {\r\n\t\tbackgroundColor: 'pointBackgroundColor',\r\n\t\tborderColor: 'pointBorderColor',\r\n\t\tborderWidth: 'pointBorderWidth',\r\n\t\thitRadius: 'pointHitRadius',\r\n\t\thoverBackgroundColor: 'pointHoverBackgroundColor',\r\n\t\thoverBorderColor: 'pointHoverBorderColor',\r\n\t\thoverBorderWidth: 'pointHoverBorderWidth',\r\n\t\thoverRadius: 'pointHoverRadius',\r\n\t\tpointStyle: 'pointStyle',\r\n\t\tradius: 'pointRadius',\r\n\t\trotation: 'pointRotation'\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getIndexScaleId: function() {\r\n\t\treturn this.chart.scale.id;\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_getValueScaleId: function() {\r\n\t\treturn this.chart.scale.id;\r\n\t},\r\n\r\n\tupdate: function(reset) {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar line = meta.dataset;\r\n\t\tvar points = meta.data || [];\r\n\t\tvar scale = me.chart.scale;\r\n\t\tvar config = me._config;\r\n\t\tvar i, ilen;\r\n\r\n\t\t// Compatibility: If the properties are defined with only the old name, use those values\r\n\t\tif (config.tension !== undefined && config.lineTension === undefined) {\r\n\t\t\tconfig.lineTension = config.tension;\r\n\t\t}\r\n\r\n\t\t// Utility\r\n\t\tline._scale = scale;\r\n\t\tline._datasetIndex = me.index;\r\n\t\t// Data\r\n\t\tline._children = points;\r\n\t\tline._loop = true;\r\n\t\t// Model\r\n\t\tline._model = me._resolveDatasetElementOptions(line);\r\n\r\n\t\tline.pivot();\r\n\r\n\t\t// Update Points\r\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\tme.updateElement(points[i], i, reset);\r\n\t\t}\r\n\r\n\t\t// Update bezier control points\r\n\t\tme.updateBezierControlPoints();\r\n\r\n\t\t// Now pivot the point for animation\r\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\tpoints[i].pivot();\r\n\t\t}\r\n\t},\r\n\r\n\tupdateElement: function(point, index, reset) {\r\n\t\tvar me = this;\r\n\t\tvar custom = point.custom || {};\r\n\t\tvar dataset = me.getDataset();\r\n\t\tvar scale = me.chart.scale;\r\n\t\tvar pointPosition = scale.getPointPositionForValue(index, dataset.data[index]);\r\n\t\tvar options = me._resolveDataElementOptions(point, index);\r\n\t\tvar lineModel = me.getMeta().dataset._model;\r\n\t\tvar x = reset ? scale.xCenter : pointPosition.x;\r\n\t\tvar y = reset ? scale.yCenter : pointPosition.y;\r\n\r\n\t\t// Utility\r\n\t\tpoint._scale = scale;\r\n\t\tpoint._options = options;\r\n\t\tpoint._datasetIndex = me.index;\r\n\t\tpoint._index = index;\r\n\r\n\t\t// Desired view properties\r\n\t\tpoint._model = {\r\n\t\t\tx: x, // value not used in dataset scale, but we want a consistent API between scales\r\n\t\t\ty: y,\r\n\t\t\tskip: custom.skip || isNaN(x) || isNaN(y),\r\n\t\t\t// Appearance\r\n\t\t\tradius: options.radius,\r\n\t\t\tpointStyle: options.pointStyle,\r\n\t\t\trotation: options.rotation,\r\n\t\t\tbackgroundColor: options.backgroundColor,\r\n\t\t\tborderColor: options.borderColor,\r\n\t\t\tborderWidth: options.borderWidth,\r\n\t\t\ttension: valueOrDefault$7(custom.tension, lineModel ? lineModel.tension : 0),\r\n\r\n\t\t\t// Tooltip\r\n\t\t\thitRadius: options.hitRadius\r\n\t\t};\r\n\t},\r\n\r\n\t/**\r\n\t * @private\r\n\t */\r\n\t_resolveDatasetElementOptions: function() {\r\n\t\tvar me = this;\r\n\t\tvar config = me._config;\r\n\t\tvar options = me.chart.options;\r\n\t\tvar values = core_datasetController.prototype._resolveDatasetElementOptions.apply(me, arguments);\r\n\r\n\t\tvalues.spanGaps = valueOrDefault$7(config.spanGaps, options.spanGaps);\r\n\t\tvalues.tension = valueOrDefault$7(config.lineTension, options.elements.line.tension);\r\n\r\n\t\treturn values;\r\n\t},\r\n\r\n\tupdateBezierControlPoints: function() {\r\n\t\tvar me = this;\r\n\t\tvar meta = me.getMeta();\r\n\t\tvar area = me.chart.chartArea;\r\n\t\tvar points = meta.data || [];\r\n\t\tvar i, ilen, model, controlPoints;\r\n\r\n\t\t// Only consider points that are drawn in case the spanGaps option is used\r\n\t\tif (meta.dataset._model.spanGaps) {\r\n\t\t\tpoints = points.filter(function(pt) {\r\n\t\t\t\treturn !pt._model.skip;\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tfunction capControlPoint(pt, min, max) {\r\n\t\t\treturn Math.max(Math.min(pt, max), min);\r\n\t\t}\r\n\r\n\t\tfor (i = 0, ilen = points.length; i < ilen; ++i) {\r\n\t\t\tmodel = points[i]._model;\r\n\t\t\tcontrolPoints = helpers$1.splineCurve(\r\n\t\t\t\thelpers$1.previousItem(points, i, true)._model,\r\n\t\t\t\tmodel,\r\n\t\t\t\thelpers$1.nextItem(points, i, true)._model,\r\n\t\t\t\tmodel.tension\r\n\t\t\t);\r\n\r\n\t\t\t// Prevent the bezier going outside of the bounds of the graph\r\n\t\t\tmodel.controlPointPreviousX = capControlPoint(controlPoints.previous.x, area.left, area.right);\r\n\t\t\tmodel.controlPointPreviousY = capControlPoint(controlPoints.previous.y, area.top, area.bottom);\r\n\t\t\tmodel.controlPointNextX = capControlPoint(controlPoints.next.x, area.left, area.right);\r\n\t\t\tmodel.controlPointNextY = capControlPoint(controlPoints.next.y, area.top, area.bottom);\r\n\t\t}\r\n\t},\r\n\r\n\tsetHoverStyle: function(point) {\r\n\t\tvar model = point._model;\r\n\t\tvar options = point._options;\r\n\t\tvar getHoverColor = helpers$1.getHoverColor;\r\n\r\n\t\tpoint.$previousStyle = {\r\n\t\t\tbackgroundColor: model.backgroundColor,\r\n\t\t\tborderColor: model.borderColor,\r\n\t\t\tborderWidth: model.borderWidth,\r\n\t\t\tradius: model.radius\r\n\t\t};\r\n\r\n\t\tmodel.backgroundColor = valueOrDefault$7(options.hoverBackgroundColor, getHoverColor(options.backgroundColor));\r\n\t\tmodel.borderColor = valueOrDefault$7(options.hoverBorderColor, getHoverColor(options.borderColor));\r\n\t\tmodel.borderWidth = valueOrDefault$7(options.hoverBorderWidth, options.borderWidth);\r\n\t\tmodel.radius = valueOrDefault$7(options.hoverRadius, options.radius);\r\n\t}\r\n});\n\ncore_defaults._set('scatter', {\r\n\thover: {\r\n\t\tmode: 'single'\r\n\t},\r\n\r\n\tscales: {\r\n\t\txAxes: [{\r\n\t\t\tid: 'x-axis-1', // need an ID so datasets can reference the scale\r\n\t\t\ttype: 'linear', // scatter should not use a category axis\r\n\t\t\tposition: 'bottom'\r\n\t\t}],\r\n\t\tyAxes: [{\r\n\t\t\tid: 'y-axis-1',\r\n\t\t\ttype: 'linear',\r\n\t\t\tposition: 'left'\r\n\t\t}]\r\n\t},\r\n\r\n\ttooltips: {\r\n\t\tcallbacks: {\r\n\t\t\ttitle: function() {\r\n\t\t\t\treturn ''; // doesn't make sense for scatter since data are formatted as a point\r\n\t\t\t},\r\n\t\t\tlabel: function(item) {\r\n\t\t\t\treturn '(' + item.xLabel + ', ' + item.yLabel + ')';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\ncore_defaults._set('global', {\r\n\tdatasets: {\r\n\t\tscatter: {\r\n\t\t\tshowLine: false\r\n\t\t}\r\n\t}\r\n});\r\n\r\n// Scatter charts use line controllers\r\nvar controller_scatter = controller_line;\n\n// NOTE export a map in which the key represents the controller type, not\r\n// the class, and so must be CamelCase in order to be correctly retrieved\r\n// by the controller in core.controller.js (`controllers[meta.type]`).\r\n\r\nvar controllers = {\r\n\tbar: controller_bar,\r\n\tbubble: controller_bubble,\r\n\tdoughnut: controller_doughnut,\r\n\thorizontalBar: controller_horizontalBar,\r\n\tline: controller_line,\r\n\tpolarArea: controller_polarArea,\r\n\tpie: controller_pie,\r\n\tradar: controller_radar,\r\n\tscatter: controller_scatter\r\n};\n\n/**\r\n * Helper function to get relative position for an event\r\n * @param {Event|IEvent} event - The event to get the position for\r\n * @param {Chart} chart - The chart\r\n * @returns {object} the event position\r\n */\r\nfunction getRelativePosition(e, chart) {\r\n\tif (e.native) {\r\n\t\treturn {\r\n\t\t\tx: e.x,\r\n\t\t\ty: e.y\r\n\t\t};\r\n\t}\r\n\r\n\treturn helpers$1.getRelativePosition(e, chart);\r\n}\r\n\r\n/**\r\n * Helper function to traverse all of the visible elements in the chart\r\n * @param {Chart} chart - the chart\r\n * @param {function} handler - the callback to execute for each visible item\r\n */\r\nfunction parseVisibleItems(chart, handler) {\r\n\tvar metasets = chart._getSortedVisibleDatasetMetas();\r\n\tvar metadata, i, j, ilen, jlen, element;\r\n\r\n\tfor (i = 0, ilen = metasets.length; i < ilen; ++i) {\r\n\t\tmetadata = metasets[i].data;\r\n\t\tfor (j = 0, jlen = metadata.length; j < jlen; ++j) {\r\n\t\t\telement = metadata[j];\r\n\t\t\tif (!element._view.skip) {\r\n\t\t\t\thandler(element);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/**\r\n * Helper function to get the items that intersect the event position\r\n * @param {ChartElement[]} items - elements to filter\r\n * @param {object} position - the point to be nearest to\r\n * @return {ChartElement[]} the nearest items\r\n */\r\nfunction getIntersectItems(chart, position) {\r\n\tvar elements = [];\r\n\r\n\tparseVisibleItems(chart, function(element) {\r\n\t\tif (element.inRange(position.x, position.y)) {\r\n\t\t\telements.push(element);\r\n\t\t}\r\n\t});\r\n\r\n\treturn elements;\r\n}\r\n\r\n/**\r\n * Helper function to get the items nearest to the event position considering all visible items in teh chart\r\n * @param {Chart} chart - the chart to look at elements from\r\n * @param {object} position - the point to be nearest to\r\n * @param {boolean} intersect - if true, only consider items that intersect the position\r\n * @param {function} distanceMetric - function to provide the distance between points\r\n * @return {ChartElement[]} the nearest items\r\n */\r\nfunction getNearestItems(chart, position, intersect, distanceMetric) {\r\n\tvar minDistance = Number.POSITIVE_INFINITY;\r\n\tvar nearestItems = [];\r\n\r\n\tparseVisibleItems(chart, function(element) {\r\n\t\tif (intersect && !element.inRange(position.x, position.y)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar center = element.getCenterPoint();\r\n\t\tvar distance = distanceMetric(position, center);\r\n\t\tif (distance < minDistance) {\r\n\t\t\tnearestItems = [element];\r\n\t\t\tminDistance = distance;\r\n\t\t} else if (distance === minDistance) {\r\n\t\t\t// Can have multiple items at the same distance in which case we sort by size\r\n\t\t\tnearestItems.push(element);\r\n\t\t}\r\n\t});\r\n\r\n\treturn nearestItems;\r\n}\r\n\r\n/**\r\n * Get a distance metric function for two points based on the\r\n * axis mode setting\r\n * @param {string} axis - the axis mode. x|y|xy\r\n */\r\nfunction getDistanceMetricForAxis(axis) {\r\n\tvar useX = axis.indexOf('x') !== -1;\r\n\tvar useY = axis.indexOf('y') !== -1;\r\n\r\n\treturn function(pt1, pt2) {\r\n\t\tvar deltaX = useX ? Math.abs(pt1.x - pt2.x) : 0;\r\n\t\tvar deltaY = useY ? Math.abs(pt1.y - pt2.y) : 0;\r\n\t\treturn Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));\r\n\t};\r\n}\r\n\r\nfunction indexMode(chart, e, options) {\r\n\tvar position = getRelativePosition(e, chart);\r\n\t// Default axis for index mode is 'x' to match old behaviour\r\n\toptions.axis = options.axis || 'x';\r\n\tvar distanceMetric = getDistanceMetricForAxis(options.axis);\r\n\tvar items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false, distanceMetric);\r\n\tvar elements = [];\r\n\r\n\tif (!items.length) {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tchart._getSortedVisibleDatasetMetas().forEach(function(meta) {\r\n\t\tvar element = meta.data[items[0]._index];\r\n\r\n\t\t// don't count items that are skipped (null data)\r\n\t\tif (element && !element._view.skip) {\r\n\t\t\telements.push(element);\r\n\t\t}\r\n\t});\r\n\r\n\treturn elements;\r\n}\r\n\r\n/**\r\n * @interface IInteractionOptions\r\n */\r\n/**\r\n * If true, only consider items that intersect the point\r\n * @name IInterfaceOptions#boolean\r\n * @type Boolean\r\n */\r\n\r\n/**\r\n * Contains interaction related functions\r\n * @namespace Chart.Interaction\r\n */\r\nvar core_interaction = {\r\n\t// Helper function for different modes\r\n\tmodes: {\r\n\t\tsingle: function(chart, e) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\tvar elements = [];\r\n\r\n\t\t\tparseVisibleItems(chart, function(element) {\r\n\t\t\t\tif (element.inRange(position.x, position.y)) {\r\n\t\t\t\t\telements.push(element);\r\n\t\t\t\t\treturn elements;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\treturn elements.slice(0, 1);\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * @function Chart.Interaction.modes.label\r\n\t\t * @deprecated since version 2.4.0\r\n\t\t * @todo remove at version 3\r\n\t\t * @private\r\n\t\t */\r\n\t\tlabel: indexMode,\r\n\r\n\t\t/**\r\n\t\t * Returns items at the same index. If the options.intersect parameter is true, we only return items if we intersect something\r\n\t\t * If the options.intersect mode is false, we find the nearest item and return the items at the same index as that item\r\n\t\t * @function Chart.Interaction.modes.index\r\n\t\t * @since v2.4.0\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @param {IInteractionOptions} options - options to use during interaction\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\tindex: indexMode,\r\n\r\n\t\t/**\r\n\t\t * Returns items in the same dataset. If the options.intersect parameter is true, we only return items if we intersect something\r\n\t\t * If the options.intersect is false, we find the nearest item and return the items in that dataset\r\n\t\t * @function Chart.Interaction.modes.dataset\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @param {IInteractionOptions} options - options to use during interaction\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\tdataset: function(chart, e, options) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\toptions.axis = options.axis || 'xy';\r\n\t\t\tvar distanceMetric = getDistanceMetricForAxis(options.axis);\r\n\t\t\tvar items = options.intersect ? getIntersectItems(chart, position) : getNearestItems(chart, position, false, distanceMetric);\r\n\r\n\t\t\tif (items.length > 0) {\r\n\t\t\t\titems = chart.getDatasetMeta(items[0]._datasetIndex).data;\r\n\t\t\t}\r\n\r\n\t\t\treturn items;\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * @function Chart.Interaction.modes.x-axis\r\n\t\t * @deprecated since version 2.4.0. Use index mode and intersect == true\r\n\t\t * @todo remove at version 3\r\n\t\t * @private\r\n\t\t */\r\n\t\t'x-axis': function(chart, e) {\r\n\t\t\treturn indexMode(chart, e, {intersect: false});\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Point mode returns all elements that hit test based on the event position\r\n\t\t * of the event\r\n\t\t * @function Chart.Interaction.modes.intersect\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\tpoint: function(chart, e) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\treturn getIntersectItems(chart, position);\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * nearest mode returns the element closest to the point\r\n\t\t * @function Chart.Interaction.modes.intersect\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @param {IInteractionOptions} options - options to use\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\tnearest: function(chart, e, options) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\toptions.axis = options.axis || 'xy';\r\n\t\t\tvar distanceMetric = getDistanceMetricForAxis(options.axis);\r\n\t\t\treturn getNearestItems(chart, position, options.intersect, distanceMetric);\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * x mode returns the elements that hit-test at the current x coordinate\r\n\t\t * @function Chart.Interaction.modes.x\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @param {IInteractionOptions} options - options to use\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\tx: function(chart, e, options) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\tvar items = [];\r\n\t\t\tvar intersectsItem = false;\r\n\r\n\t\t\tparseVisibleItems(chart, function(element) {\r\n\t\t\t\tif (element.inXRange(position.x)) {\r\n\t\t\t\t\titems.push(element);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (element.inRange(position.x, position.y)) {\r\n\t\t\t\t\tintersectsItem = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t// If we want to trigger on an intersect and we don't have any items\r\n\t\t\t// that intersect the position, return nothing\r\n\t\t\tif (options.intersect && !intersectsItem) {\r\n\t\t\t\titems = [];\r\n\t\t\t}\r\n\t\t\treturn items;\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * y mode returns the elements that hit-test at the current y coordinate\r\n\t\t * @function Chart.Interaction.modes.y\r\n\t\t * @param {Chart} chart - the chart we are returning items from\r\n\t\t * @param {Event} e - the event we are find things at\r\n\t\t * @param {IInteractionOptions} options - options to use\r\n\t\t * @return {Chart.Element[]} Array of elements that are under the point. If none are found, an empty array is returned\r\n\t\t */\r\n\t\ty: function(chart, e, options) {\r\n\t\t\tvar position = getRelativePosition(e, chart);\r\n\t\t\tvar items = [];\r\n\t\t\tvar intersectsItem = false;\r\n\r\n\t\t\tparseVisibleItems(chart, function(element) {\r\n\t\t\t\tif (element.inYRange(position.y)) {\r\n\t\t\t\t\titems.push(element);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (element.inRange(position.x, position.y)) {\r\n\t\t\t\t\tintersectsItem = true;\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t// If we want to trigger on an intersect and we don't have any items\r\n\t\t\t// that intersect the position, return nothing\r\n\t\t\tif (options.intersect && !intersectsItem) {\r\n\t\t\t\titems = [];\r\n\t\t\t}\r\n\t\t\treturn items;\r\n\t\t}\r\n\t}\r\n};\n\nvar extend = helpers$1.extend;\r\n\r\nfunction filterByPosition(array, position) {\r\n\treturn helpers$1.where(array, function(v) {\r\n\t\treturn v.pos === position;\r\n\t});\r\n}\r\n\r\nfunction sortByWeight(array, reverse) {\r\n\treturn array.sort(function(a, b) {\r\n\t\tvar v0 = reverse ? b : a;\r\n\t\tvar v1 = reverse ? a : b;\r\n\t\treturn v0.weight === v1.weight ?\r\n\t\t\tv0.index - v1.index :\r\n\t\t\tv0.weight - v1.weight;\r\n\t});\r\n}\r\n\r\nfunction wrapBoxes(boxes) {\r\n\tvar layoutBoxes = [];\r\n\tvar i, ilen, box;\r\n\r\n\tfor (i = 0, ilen = (boxes || []).length; i < ilen; ++i) {\r\n\t\tbox = boxes[i];\r\n\t\tlayoutBoxes.push({\r\n\t\t\tindex: i,\r\n\t\t\tbox: box,\r\n\t\t\tpos: box.position,\r\n\t\t\thorizontal: box.isHorizontal(),\r\n\t\t\tweight: box.weight\r\n\t\t});\r\n\t}\r\n\treturn layoutBoxes;\r\n}\r\n\r\nfunction setLayoutDims(layouts, params) {\r\n\tvar i, ilen, layout;\r\n\tfor (i = 0, ilen = layouts.length; i < ilen; ++i) {\r\n\t\tlayout = layouts[i];\r\n\t\t// store width used instead of chartArea.w in fitBoxes\r\n\t\tlayout.width = layout.horizontal\r\n\t\t\t? layout.box.fullWidth && params.availableWidth\r\n\t\t\t: params.vBoxMaxWidth;\r\n\t\t// store height used instead of chartArea.h in fitBoxes\r\n\t\tlayout.height = layout.horizontal && params.hBoxMaxHeight;\r\n\t}\r\n}\r\n\r\nfunction buildLayoutBoxes(boxes) {\r\n\tvar layoutBoxes = wrapBoxes(boxes);\r\n\tvar left = sortByWeight(filterByPosition(layoutBoxes, 'left'), true);\r\n\tvar right = sortByWeight(filterByPosition(layoutBoxes, 'right'));\r\n\tvar top = sortByWeight(filterByPosition(layoutBoxes, 'top'), true);\r\n\tvar bottom = sortByWeight(filterByPosition(layoutBoxes, 'bottom'));\r\n\r\n\treturn {\r\n\t\tleftAndTop: left.concat(top),\r\n\t\trightAndBottom: right.concat(bottom),\r\n\t\tchartArea: filterByPosition(layoutBoxes, 'chartArea'),\r\n\t\tvertical: left.concat(right),\r\n\t\thorizontal: top.concat(bottom)\r\n\t};\r\n}\r\n\r\nfunction getCombinedMax(maxPadding, chartArea, a, b) {\r\n\treturn Math.max(maxPadding[a], chartArea[a]) + Math.max(maxPadding[b], chartArea[b]);\r\n}\r\n\r\nfunction updateDims(chartArea, params, layout) {\r\n\tvar box = layout.box;\r\n\tvar maxPadding = chartArea.maxPadding;\r\n\tvar newWidth, newHeight;\r\n\r\n\tif (layout.size) {\r\n\t\t// this layout was already counted for, lets first reduce old size\r\n\t\tchartArea[layout.pos] -= layout.size;\r\n\t}\r\n\tlayout.size = layout.horizontal ? box.height : box.width;\r\n\tchartArea[layout.pos] += layout.size;\r\n\r\n\tif (box.getPadding) {\r\n\t\tvar boxPadding = box.getPadding();\r\n\t\tmaxPadding.top = Math.max(maxPadding.top, boxPadding.top);\r\n\t\tmaxPadding.left = Math.max(maxPadding.left, boxPadding.left);\r\n\t\tmaxPadding.bottom = Math.max(maxPadding.bottom, boxPadding.bottom);\r\n\t\tmaxPadding.right = Math.max(maxPadding.right, boxPadding.right);\r\n\t}\r\n\r\n\tnewWidth = params.outerWidth - getCombinedMax(maxPadding, chartArea, 'left', 'right');\r\n\tnewHeight = params.outerHeight - getCombinedMax(maxPadding, chartArea, 'top', 'bottom');\r\n\r\n\tif (newWidth !== chartArea.w || newHeight !== chartArea.h) {\r\n\t\tchartArea.w = newWidth;\r\n\t\tchartArea.h = newHeight;\r\n\r\n\t\t// return true if chart area changed in layout's direction\r\n\t\tvar sizes = layout.horizontal ? [newWidth, chartArea.w] : [newHeight, chartArea.h];\r\n\t\treturn sizes[0] !== sizes[1] && (!isNaN(sizes[0]) || !isNaN(sizes[1]));\r\n\t}\r\n}\r\n\r\nfunction handleMaxPadding(chartArea) {\r\n\tvar maxPadding = chartArea.maxPadding;\r\n\r\n\tfunction updatePos(pos) {\r\n\t\tvar change = Math.max(maxPadding[pos] - chartArea[pos], 0);\r\n\t\tchartArea[pos] += change;\r\n\t\treturn change;\r\n\t}\r\n\tchartArea.y += updatePos('top');\r\n\tchartArea.x += updatePos('left');\r\n\tupdatePos('right');\r\n\tupdatePos('bottom');\r\n}\r\n\r\nfunction getMargins(horizontal, chartArea) {\r\n\tvar maxPadding = chartArea.maxPadding;\r\n\r\n\tfunction marginForPositions(positions) {\r\n\t\tvar margin = {left: 0, top: 0, right: 0, bottom: 0};\r\n\t\tpositions.forEach(function(pos) {\r\n\t\t\tmargin[pos] = Math.max(chartArea[pos], maxPadding[pos]);\r\n\t\t});\r\n\t\treturn margin;\r\n\t}\r\n\r\n\treturn horizontal\r\n\t\t? marginForPositions(['left', 'right'])\r\n\t\t: marginForPositions(['top', 'bottom']);\r\n}\r\n\r\nfunction fitBoxes(boxes, chartArea, params) {\r\n\tvar refitBoxes = [];\r\n\tvar i, ilen, layout, box, refit, changed;\r\n\r\n\tfor (i = 0, ilen = boxes.length; i < ilen; ++i) {\r\n\t\tlayout = boxes[i];\r\n\t\tbox = layout.box;\r\n\r\n\t\tbox.update(\r\n\t\t\tlayout.width || chartArea.w,\r\n\t\t\tlayout.height || chartArea.h,\r\n\t\t\tgetMargins(layout.horizontal, chartArea)\r\n\t\t);\r\n\t\tif (updateDims(chartArea, params, layout)) {\r\n\t\t\tchanged = true;\r\n\t\t\tif (refitBoxes.length) {\r\n\t\t\t\t// Dimensions changed and there were non full width boxes before this\r\n\t\t\t\t// -> we have to refit those\r\n\t\t\t\trefit = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!box.fullWidth) { // fullWidth boxes don't need to be re-fitted in any case\r\n\t\t\trefitBoxes.push(layout);\r\n\t\t}\r\n\t}\r\n\r\n\treturn refit ? fitBoxes(refitBoxes, chartArea, params) || changed : changed;\r\n}\r\n\r\nfunction placeBoxes(boxes, chartArea, params) {\r\n\tvar userPadding = params.padding;\r\n\tvar x = chartArea.x;\r\n\tvar y = chartArea.y;\r\n\tvar i, ilen, layout, box;\r\n\r\n\tfor (i = 0, ilen = boxes.length; i < ilen; ++i) {\r\n\t\tlayout = boxes[i];\r\n\t\tbox = layout.box;\r\n\t\tif (layout.horizontal) {\r\n\t\t\tbox.left = box.fullWidth ? userPadding.left : chartArea.left;\r\n\t\t\tbox.right = box.fullWidth ? params.outerWidth - userPadding.right : chartArea.left + chartArea.w;\r\n\t\t\tbox.top = y;\r\n\t\t\tbox.bottom = y + box.height;\r\n\t\t\tbox.width = box.right - box.left;\r\n\t\t\ty = box.bottom;\r\n\t\t} else {\r\n\t\t\tbox.left = x;\r\n\t\t\tbox.right = x + box.width;\r\n\t\t\tbox.top = chartArea.top;\r\n\t\t\tbox.bottom = chartArea.top + chartArea.h;\r\n\t\t\tbox.height = box.bottom - box.top;\r\n\t\t\tx = box.right;\r\n\t\t}\r\n\t}\r\n\r\n\tchartArea.x = x;\r\n\tchartArea.y = y;\r\n}\r\n\r\ncore_defaults._set('global', {\r\n\tlayout: {\r\n\t\tpadding: {\r\n\t\t\ttop: 0,\r\n\t\t\tright: 0,\r\n\t\t\tbottom: 0,\r\n\t\t\tleft: 0\r\n\t\t}\r\n\t}\r\n});\r\n\r\n/**\r\n * @interface ILayoutItem\r\n * @prop {string} position - The position of the item in the chart layout. Possible values are\r\n * 'left', 'top', 'right', 'bottom', and 'chartArea'\r\n * @prop {number} weight - The weight used to sort the item. Higher weights are further away from the chart area\r\n * @prop {boolean} fullWidth - if true, and the item is horizontal, then push vertical boxes down\r\n * @prop {function} isHorizontal - returns true if the layout item is horizontal (ie. top or bottom)\r\n * @prop {function} update - Takes two parameters: width and height. Returns size of item\r\n * @prop {function} getPadding - Returns an object with padding on the edges\r\n * @prop {number} width - Width of item. Must be valid after update()\r\n * @prop {number} height - Height of item. Must be valid after update()\r\n * @prop {number} left - Left edge of the item. Set by layout system and cannot be used in update\r\n * @prop {number} top - Top edge of the item. Set by layout system and cannot be used in update\r\n * @prop {number} right - Right edge of the item. Set by layout system and cannot be used in update\r\n * @prop {number} bottom - Bottom edge of the item. Set by layout system and cannot be used in update\r\n */\r\n\r\n// The layout service is very self explanatory. It's responsible for the layout within a chart.\r\n// Scales, Legends and Plugins all rely on the layout service and can easily register to be placed anywhere they need\r\n// It is this service's responsibility of carrying out that layout.\r\nvar core_layouts = {\r\n\tdefaults: {},\r\n\r\n\t/**\r\n\t * Register a box to a chart.\r\n\t * A box is simply a reference to an object that requires layout. eg. Scales, Legend, Title.\r\n\t * @param {Chart} chart - the chart to use\r\n\t * @param {ILayoutItem} item - the item to add to be layed out\r\n\t */\r\n\taddBox: function(chart, item) {\r\n\t\tif (!chart.boxes) {\r\n\t\t\tchart.boxes = [];\r\n\t\t}\r\n\r\n\t\t// initialize item with default values\r\n\t\titem.fullWidth = item.fullWidth || false;\r\n\t\titem.position = item.position || 'top';\r\n\t\titem.weight = item.weight || 0;\r\n\t\titem._layers = item._layers || function() {\r\n\t\t\treturn [{\r\n\t\t\t\tz: 0,\r\n\t\t\t\tdraw: function() {\r\n\t\t\t\t\titem.draw.apply(item, arguments);\r\n\t\t\t\t}\r\n\t\t\t}];\r\n\t\t};\r\n\r\n\t\tchart.boxes.push(item);\r\n\t},\r\n\r\n\t/**\r\n\t * Remove a layoutItem from a chart\r\n\t * @param {Chart} chart - the chart to remove the box from\r\n\t * @param {ILayoutItem} layoutItem - the item to remove from the layout\r\n\t */\r\n\tremoveBox: function(chart, layoutItem) {\r\n\t\tvar index = chart.boxes ? chart.boxes.indexOf(layoutItem) : -1;\r\n\t\tif (index !== -1) {\r\n\t\t\tchart.boxes.splice(index, 1);\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Sets (or updates) options on the given `item`.\r\n\t * @param {Chart} chart - the chart in which the item lives (or will be added to)\r\n\t * @param {ILayoutItem} item - the item to configure with the given options\r\n\t * @param {object} options - the new item options.\r\n\t */\r\n\tconfigure: function(chart, item, options) {\r\n\t\tvar props = ['fullWidth', 'position', 'weight'];\r\n\t\tvar ilen = props.length;\r\n\t\tvar i = 0;\r\n\t\tvar prop;\r\n\r\n\t\tfor (; i < ilen; ++i) {\r\n\t\t\tprop = props[i];\r\n\t\t\tif (options.hasOwnProperty(prop)) {\r\n\t\t\t\titem[prop] = options[prop];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t/**\r\n\t * Fits boxes of the given chart into the given size by having each box measure itself\r\n\t * then running a fitting algorithm\r\n\t * @param {Chart} chart - the chart\r\n\t * @param {number} width - the width to fit into\r\n\t * @param {number} height - the height to fit into\r\n\t */\r\n\tupdate: function(chart, width, height) {\r\n\t\tif (!chart) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar layoutOptions = chart.options.layout || {};\r\n\t\tvar padding = helpers$1.options.toPadding(layoutOptions.padding);\r\n\r\n\t\tvar availableWidth = width - padding.width;\r\n\t\tvar availableHeight = height - padding.height;\r\n\t\tvar boxes = buildLayoutBoxes(chart.boxes);\r\n\t\tvar verticalBoxes = boxes.vertical;\r\n\t\tvar horizontalBoxes = boxes.horizontal;\r\n\r\n\t\t// Essentially we now have any number of boxes on each of the 4 sides.\r\n\t\t// Our canvas looks like the following.\r\n\t\t// The areas L1 and L2 are the left axes. R1 is the right axis, T1 is the top axis and\r\n\t\t// B1 is the bottom axis\r\n\t\t// There are also 4 quadrant-like locations (left to right instead of clockwise) reserved for chart overlays\r\n\t\t// These locations are single-box locations only, when trying to register a chartArea location that is already taken,\r\n\t\t// an error will be thrown.\r\n\t\t//\r\n\t\t// |----------------------------------------------------|\r\n\t\t// | T1 (Full Width) |\r\n\t\t// |----------------------------------------------------|\r\n\t\t// | | | T2 | |\r\n\t\t// | |----|-------------------------------------|----|\r\n\t\t// | | | C1 | | C2 | |\r\n\t\t// | | |----| |----| |\r\n\t\t// | | | | |\r\n\t\t// | L1 | L2 | ChartArea (C0) | R1 |\r\n\t\t// | | | | |\r\n\t\t// | | |----| |----| |\r\n\t\t// | | | C3 | | C4 | |\r\n\t\t// | |----|-------------------------------------|----|\r\n\t\t// | | | B1 | |\r\n\t\t// |----------------------------------------------------|\r\n\t\t// | B2 (Full Width) |\r\n\t\t// |----------------------------------------------------|\r\n\t\t//\r\n\r\n\t\tvar params = Object.freeze({\r\n\t\t\touterWidth: width,\r\n\t\t\touterHeight: height,\r\n\t\t\tpadding: padding,\r\n\t\t\tavailableWidth: availableWidth,\r\n\t\t\tvBoxMaxWidth: availableWidth / 2 / verticalBoxes.length,\r\n\t\t\thBoxMaxHeight: availableHeight / 2\r\n\t\t});\r\n\t\tvar chartArea = extend({\r\n\t\t\tmaxPadding: extend({}, padding),\r\n\t\t\tw: availableWidth,\r\n\t\t\th: availableHeight,\r\n\t\t\tx: padding.left,\r\n\t\t\ty: padding.top\r\n\t\t}, padding);\r\n\r\n\t\tsetLayoutDims(verticalBoxes.concat(horizontalBoxes), params);\r\n\r\n\t\t// First fit vertical boxes\r\n\t\tfitBoxes(verticalBoxes, chartArea, params);\r\n\r\n\t\t// Then fit horizontal boxes\r\n\t\tif (fitBoxes(horizontalBoxes, chartArea, params)) {\r\n\t\t\t// if the area changed, re-fit vertical boxes\r\n\t\t\tfitBoxes(verticalBoxes, chartArea, params);\r\n\t\t}\r\n\r\n\t\thandleMaxPadding(chartArea);\r\n\r\n\t\t// Finally place the boxes to correct coordinates\r\n\t\tplaceBoxes(boxes.leftAndTop, chartArea, params);\r\n\r\n\t\t// Move to opposite side of chart\r\n\t\tchartArea.x += chartArea.w;\r\n\t\tchartArea.y += chartArea.h;\r\n\r\n\t\tplaceBoxes(boxes.rightAndBottom, chartArea, params);\r\n\r\n\t\tchart.chartArea = {\r\n\t\t\tleft: chartArea.left,\r\n\t\t\ttop: chartArea.top,\r\n\t\t\tright: chartArea.left + chartArea.w,\r\n\t\t\tbottom: chartArea.top + chartArea.h\r\n\t\t};\r\n\r\n\t\t// Finally update boxes in chartArea (radial scale for example)\r\n\t\thelpers$1.each(boxes.chartArea, function(layout) {\r\n\t\t\tvar box = layout.box;\r\n\t\t\textend(box, chart.chartArea);\r\n\t\t\tbox.update(chartArea.w, chartArea.h);\r\n\t\t});\r\n\t}\r\n};\n\n/**\r\n * Platform fallback implementation (minimal).\r\n * @see https://github.com/chartjs/Chart.js/pull/4591#issuecomment-319575939\r\n */\r\n\r\nvar platform_basic = {\r\n\tacquireContext: function(item) {\r\n\t\tif (item && item.canvas) {\r\n\t\t\t// Support for any object associated to a canvas (including a context2d)\r\n\t\t\titem = item.canvas;\r\n\t\t}\r\n\r\n\t\treturn item && item.getContext('2d') || null;\r\n\t}\r\n};\n\nvar platform_dom = \"/*\\r\\n * DOM element rendering detection\\r\\n * https://davidwalsh.name/detect-node-insertion\\r\\n */\\r\\n@keyframes chartjs-render-animation {\\r\\n\\tfrom { opacity: 0.99; }\\r\\n\\tto { opacity: 1; }\\r\\n}\\r\\n\\r\\n.chartjs-render-monitor {\\r\\n\\tanimation: chartjs-render-animation 0.001s;\\r\\n}\\r\\n\\r\\n/*\\r\\n * DOM element resizing detection\\r\\n * https://github.com/marcj/css-element-queries\\r\\n */\\r\\n.chartjs-size-monitor,\\r\\n.chartjs-size-monitor-expand,\\r\\n.chartjs-size-monitor-shrink {\\r\\n\\tposition: absolute;\\r\\n\\tdirection: ltr;\\r\\n\\tleft: 0;\\r\\n\\ttop: 0;\\r\\n\\tright: 0;\\r\\n\\tbottom: 0;\\r\\n\\toverflow: hidden;\\r\\n\\tpointer-events: none;\\r\\n\\tvisibility: hidden;\\r\\n\\tz-index: -1;\\r\\n}\\r\\n\\r\\n.chartjs-size-monitor-expand > div {\\r\\n\\tposition: absolute;\\r\\n\\twidth: 1000000px;\\r\\n\\theight: 1000000px;\\r\\n\\tleft: 0;\\r\\n\\ttop: 0;\\r\\n}\\r\\n\\r\\n.chartjs-size-monitor-shrink > div {\\r\\n\\tposition: absolute;\\r\\n\\twidth: 200%;\\r\\n\\theight: 200%;\\r\\n\\tleft: 0;\\r\\n\\ttop: 0;\\r\\n}\\r\\n\";\n\nvar platform_dom$1 = /*#__PURE__*/Object.freeze({\n__proto__: null,\n'default': platform_dom\n});\n\nvar stylesheet = getCjsExportFromNamespace(platform_dom$1);\n\nvar EXPANDO_KEY = '$chartjs';\r\nvar CSS_PREFIX = 'chartjs-';\r\nvar CSS_SIZE_MONITOR = CSS_PREFIX + 'size-monitor';\r\nvar CSS_RENDER_MONITOR = CSS_PREFIX + 'render-monitor';\r\nvar CSS_RENDER_ANIMATION = CSS_PREFIX + 'render-animation';\r\nvar ANIMATION_START_EVENTS = ['animationstart', 'webkitAnimationStart'];\r\n\r\n/**\r\n * DOM event types -> Chart.js event types.\r\n * Note: only events with different types are mapped.\r\n * @see https://developer.mozilla.org/en-US/docs/Web/Events\r\n */\r\nvar EVENT_TYPES = {\r\n\ttouchstart: 'mousedown',\r\n\ttouchmove: 'mousemove',\r\n\ttouchend: 'mouseup',\r\n\tpointerenter: 'mouseenter',\r\n\tpointerdown: 'mousedown',\r\n\tpointermove: 'mousemove',\r\n\tpointerup: 'mouseup',\r\n\tpointerleave: 'mouseout',\r\n\tpointerout: 'mouseout'\r\n};\r\n\r\n/**\r\n * The \"used\" size is the final value of a dimension property after all calculations have\r\n * been performed. This method uses the computed style of `element` but returns undefined\r\n * if the computed style is not expressed in pixels. That can happen in some cases where\r\n * `element` has a size relative to its parent and this last one is not yet displayed,\r\n * for example because of `display: none` on a parent node.\r\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/used_value\r\n * @returns {number} Size in pixels or undefined if unknown.\r\n */\r\nfunction readUsedSize(element, property) {\r\n\tvar value = helpers$1.getStyle(element, property);\r\n\tvar matches = value && value.match(/^(\\d+)(\\.\\d+)?px$/);\r\n\treturn matches ? Number(matches[1]) : undefined;\r\n}\r\n\r\n/**\r\n * Initializes the canvas style and render size without modifying the canvas display size,\r\n * since responsiveness is handled by the controller.resize() method. The config is used\r\n * to determine the aspect ratio to apply in case no explicit height has been specified.\r\n */\r\nfunction initCanvas(canvas, config) {\r\n\tvar style = canvas.style;\r\n\r\n\t// NOTE(SB) canvas.getAttribute('width') !== canvas.width: in the first case it\r\n\t// returns null or '' if no explicit value has been set to the canvas attribute.\r\n\tvar renderHeight = canvas.getAttribute('height');\r\n\tvar renderWidth = canvas.getAttribute('width');\r\n\r\n\t// Chart.js modifies some canvas values that we want to restore on destroy\r\n\tcanvas[EXPANDO_KEY] = {\r\n\t\tinitial: {\r\n\t\t\theight: renderHeight,\r\n\t\t\twidth: renderWidth,\r\n\t\t\tstyle: {\r\n\t\t\t\tdisplay: style.display,\r\n\t\t\t\theight: style.height,\r\n\t\t\t\twidth: style.width\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t// Force canvas to display as block to avoid extra space caused by inline\r\n\t// elements, which would interfere with the responsive resize process.\r\n\t// https://github.com/chartjs/Chart.js/issues/2538\r\n\tstyle.display = style.display || 'block';\r\n\r\n\tif (renderWidth === null || renderWidth === '') {\r\n\t\tvar displayWidth = readUsedSize(canvas, 'width');\r\n\t\tif (displayWidth !== undefined) {\r\n\t\t\tcanvas.width = displayWidth;\r\n\t\t}\r\n\t}\r\n\r\n\tif (renderHeight === null || renderHeight === '') {\r\n\t\tif (canvas.style.height === '') {\r\n\t\t\t// If no explicit render height and style height, let's apply the aspect ratio,\r\n\t\t\t// which one can be specified by the user but also by charts as default option\r\n\t\t\t// (i.e. options.aspectRatio). If not specified, use canvas aspect ratio of 2.\r\n\t\t\tcanvas.height = canvas.width / (config.options.aspectRatio || 2);\r\n\t\t} else {\r\n\t\t\tvar displayHeight = readUsedSize(canvas, 'height');\r\n\t\t\tif (displayWidth !== undefined) {\r\n\t\t\t\tcanvas.height = displayHeight;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn canvas;\r\n}\r\n\r\n/**\r\n * Detects support for options object argument in addEventListener.\r\n * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\r\n * @private\r\n */\r\nvar supportsEventListenerOptions = (function() {\r\n\tvar supports = false;\r\n\ttry {\r\n\t\tvar options = Object.defineProperty({}, 'passive', {\r\n\t\t\t// eslint-disable-next-line getter-return\r\n\t\t\tget: function() {\r\n\t\t\t\tsupports = true;\r\n\t\t\t}\r\n\t\t});\r\n\t\twindow.addEventListener('e', null, options);\r\n\t} catch (e) {\r\n\t\t// continue regardless of error\r\n\t}\r\n\treturn supports;\r\n}());\r\n\r\n// Default passive to true as expected by Chrome for 'touchstart' and 'touchend' events.\r\n// https://github.com/chartjs/Chart.js/issues/4287\r\nvar eventListenerOptions = supportsEventListenerOptions ? {passive: true} : false;\r\n\r\nfunction addListener(node, type, listener) {\r\n\tnode.addEventListener(type, listener, eventListenerOptions);\r\n}\r\n\r\nfunction removeListener(node, type, listener) {\r\n\tnode.removeEventListener(type, listener, eventListenerOptions);\r\n}\r\n\r\nfunction createEvent(type, chart, x, y, nativeEvent) {\r\n\treturn {\r\n\t\ttype: type,\r\n\t\tchart: chart,\r\n\t\tnative: nativeEvent || null,\r\n\t\tx: x !== undefined ? x : null,\r\n\t\ty: y !== undefined ? y : null,\r\n\t};\r\n}\r\n\r\nfunction fromNativeEvent(event, chart) {\r\n\tvar type = EVENT_TYPES[event.type] || event.type;\r\n\tvar pos = helpers$1.getRelativePosition(event, chart);\r\n\treturn createEvent(type, chart, pos.x, pos.y, event);\r\n}\r\n\r\nfunction throttled(fn, thisArg) {\r\n\tvar ticking = false;\r\n\tvar args = [];\r\n\r\n\treturn function() {\r\n\t\targs = Array.prototype.slice.call(arguments);\r\n\t\tthisArg = thisArg || this;\r\n\r\n\t\tif (!ticking) {\r\n\t\t\tticking = true;\r\n\t\t\thelpers$1.requestAnimFrame.call(window, function() {\r\n\t\t\t\tticking = false;\r\n\t\t\t\tfn.apply(thisArg, args);\r\n\t\t\t});\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction createDiv(cls) {\r\n\tvar el = document.createElement('div');\r\n\tel.className = cls || '';\r\n\treturn el;\r\n}\r\n\r\n// Implementation based on https://github.com/marcj/css-element-queries\r\nfunction createResizer(handler) {\r\n\tvar maxSize = 1000000;\r\n\r\n\t// NOTE(SB) Don't use innerHTML because it could be considered unsafe.\r\n\t// https://github.com/chartjs/Chart.js/issues/5902\r\n\tvar resizer = createDiv(CSS_SIZE_MONITOR);\r\n\tvar expand = createDiv(CSS_SIZE_MONITOR + '-expand');\r\n\tvar shrink = createDiv(CSS_SIZE_MONITOR + '-shrink');\r\n\r\n\texpand.appendChild(createDiv());\r\n\tshrink.appendChild(createDiv());\r\n\r\n\tresizer.appendChild(expand);\r\n\tresizer.appendChild(shrink);\r\n\tresizer._reset = function() {\r\n\t\texpand.scrollLeft = maxSize;\r\n\t\texpand.scrollTop = maxSize;\r\n\t\tshrink.scrollLeft = maxSize;\r\n\t\tshrink.scrollTop = maxSize;\r\n\t};\r\n\r\n\tvar onScroll = function() {\r\n\t\tresizer._reset();\r\n\t\thandler();\r\n\t};\r\n\r\n\taddListener(expand, 'scroll', onScroll.bind(expand, 'expand'));\r\n\taddListener(shrink, 'scroll', onScroll.bind(shrink, 'shrink'));\r\n\r\n\treturn resizer;\r\n}\r\n\r\n// https://davidwalsh.name/detect-node-insertion\r\nfunction watchForRender(node, handler) {\r\n\tvar expando = node[EXPANDO_KEY] || (node[EXPANDO_KEY] = {});\r\n\tvar proxy = expando.renderProxy = function(e) {\r\n\t\tif (e.animationName === CSS_RENDER_ANIMATION) {\r\n\t\t\thandler();\r\n\t\t}\r\n\t};\r\n\r\n\thelpers$1.each(ANIMATION_START_EVENTS, function(type) {\r\n\t\taddListener(node, type, proxy);\r\n\t});\r\n\r\n\t// #4737: Chrome might skip the CSS animation when the CSS_RENDER_MONITOR class\r\n\t// is removed then added back immediately (same animation frame?). Accessing the\r\n\t// `offsetParent` property will force a reflow and re-evaluate the CSS animation.\r\n\t// https://gist.github.com/paulirish/5d52fb081b3570c81e3a#box-metrics\r\n\t// https://github.com/chartjs/Chart.js/issues/4737\r\n\texpando.reflow = !!node.offsetParent;\r\n\r\n\tnode.classList.add(CSS_RENDER_MONITOR);\r\n}\r\n\r\nfunction unwatchForRender(node) {\r\n\tvar expando = node[EXPANDO_KEY] || {};\r\n\tvar proxy = expando.renderProxy;\r\n\r\n\tif (proxy) {\r\n\t\thelpers$1.each(ANIMATION_START_EVENTS, function(type) {\r\n\t\t\tremoveListener(node, type, proxy);\r\n\t\t});\r\n\r\n\t\tdelete expando.renderProxy;\r\n\t}\r\n\r\n\tnode.classList.remove(CSS_RENDER_MONITOR);\r\n}\r\n\r\nfunction addResizeListener(node, listener, chart) {\r\n\tvar expando = node[EXPANDO_KEY] || (node[EXPANDO_KEY] = {});\r\n\r\n\t// Let's keep track of this added resizer and thus avoid DOM query when removing it.\r\n\tvar resizer = expando.resizer = createResizer(throttled(function() {\r\n\t\tif (expando.resizer) {\r\n\t\t\tvar container = chart.options.maintainAspectRatio && node.parentNode;\r\n\t\t\tvar w = container ? container.clientWidth : 0;\r\n\t\t\tlistener(createEvent('resize', chart));\r\n\t\t\tif (container && container.clientWidth < w && chart.canvas) {\r\n\t\t\t\t// If the container size shrank during chart resize, let's assume\r\n\t\t\t\t// scrollbar appeared. So we resize again with the scrollbar visible -\r\n\t\t\t\t// effectively making chart smaller and the scrollbar hidden again.\r\n\t\t\t\t// Because we are inside `throttled`, and currently `ticking`, scroll\r\n\t\t\t\t// events are ignored during this whole 2 resize process.\r\n\t\t\t\t// If we assumed wrong and something else happened, we are resizing\r\n\t\t\t\t// twice in a frame (potential performance issue)\r\n\t\t\t\tlistener(createEvent('resize', chart));\r\n\t\t\t}\r\n\t\t}\r\n\t}));\r\n\r\n\t// The resizer needs to be attached to the node parent, so we first need to be\r\n\t// sure that `node` is attached to the DOM before injecting the resizer element.\r\n\twatchForRender(node, function() {\r\n\t\tif (expando.resizer) {\r\n\t\t\tvar container = node.parentNode;\r\n\t\t\tif (container && container !== resizer.parentNode) {\r\n\t\t\t\tcontainer.insertBefore(resizer, container.firstChild);\r\n\t\t\t}\r\n\r\n\t\t\t// The container size might have changed, let's reset the resizer state.\r\n\t\t\tresizer._reset();\r\n\t\t}\r\n\t});\r\n}\r\n\r\nfunction removeResizeListener(node) {\r\n\tvar expando = node[EXPANDO_KEY] || {};\r\n\tvar resizer = expando.resizer;\r\n\r\n\tdelete expando.resizer;\r\n\tunwatchForRender(node);\r\n\r\n\tif (resizer && resizer.parentNode) {\r\n\t\tresizer.parentNode.removeChild(resizer);\r\n\t}\r\n}\r\n\r\n/**\r\n * Injects CSS styles inline if the styles are not already present.\r\n * @param {HTMLDocument|ShadowRoot} rootNode - the node to contain the