From 2a6fe729b82d1e4b94837e0a046025c579ffb7fc Mon Sep 17 00:00:00 2001 From: Krzysztof Kasowski Date: Thu, 21 Sep 2017 12:34:52 +0200 Subject: [PATCH] release 2.1.6.1 --- CHANGELOG.md | 4 +- assets/js/vendors/blueimp.js | 2 +- assets/js/vendors/flot.js | 6 +- jigoshop.php | 2 +- readme.txt | 6 +- src/Jigoshop/Admin.php | 2 +- src/Jigoshop/Core.php | 2 +- src/Jigoshop/Payment/PayPal.php | 2 +- templates/admin/settings/api_users.php | 2 +- vendor/autoload.php | 2 +- vendor/composer/autoload_real.php | 10 +-- vendor/composer/installed.json | 28 ++++---- vendor/pimple/pimple/README.rst | 2 +- vendor/spatie/array-to-xml/CHANGELOG.md | 9 +++ vendor/spatie/array-to-xml/LICENSE.md | 2 +- vendor/spatie/array-to-xml/README.md | 47 +++++++++++++ vendor/spatie/array-to-xml/composer.json | 4 +- vendor/spatie/array-to-xml/src/ArrayToXml.php | 69 ++++++++++++++----- vendor/tuupola/slim-basic-auth/CHANGELOG.md | 19 +++++ .../src/HttpBasicAuthentication.php | 6 +- .../tests/BasicAuthenticationTest.php | 11 ++- 21 files changed, 177 insertions(+), 60 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 783cb5f9..326ff0fa 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## Changelog -* 2.1.6 - 2017.09.29: +* 2.1.6.1 - 2017.09.21: + * Fix: Added BN code to paypal plugin. +* 2.1.6 - 2017.09.20: * New: Cron. * New: Ability to sort option in attributes. * New: Setup wizard. diff --git a/assets/js/vendors/blueimp.js b/assets/js/vendors/blueimp.js index 6996acc3..19a445bb 100644 --- a/assets/js/vendors/blueimp.js +++ b/assets/js/vendors/blueimp.js @@ -1,2 +1,2 @@ -!function(t){"use strict";"function"==typeof define&&define.amd?define(["./blueimp-helper"],t):(window.blueimp=window.blueimp||{},window.blueimp.Gallery=t(window.blueimp.helper||window.jQuery))}(function(t){"use strict";function i(t,s){return void 0===document.body.style.maxHeight?null:this&&this.options===i.prototype.options?t&&t.length?(this.list=t,this.num=t.length,this.initOptions(s),void this.initialize()):void this.console.log("blueimp Gallery: No or empty list provided as first argument.",t):new i(t,s)}return t.extend(i.prototype,{options:{container:"#blueimp-gallery",slidesContainer:"div",titleElement:"h3",displayClass:"blueimp-gallery-display",controlsClass:"blueimp-gallery-controls",singleClass:"blueimp-gallery-single",leftEdgeClass:"blueimp-gallery-left",rightEdgeClass:"blueimp-gallery-right",playingClass:"blueimp-gallery-playing",slideClass:"slide",slideLoadingClass:"slide-loading",slideErrorClass:"slide-error",slideContentClass:"slide-content",toggleClass:"toggle",prevClass:"prev",nextClass:"next",closeClass:"close",playPauseClass:"play-pause",typeProperty:"type",titleProperty:"title",urlProperty:"href",srcsetProperty:"urlset",displayTransition:!0,clearSlides:!0,stretchImages:!1,toggleControlsOnReturn:!0,toggleControlsOnSlideClick:!0,toggleSlideshowOnSpace:!0,enableKeyboardNavigation:!0,closeOnEscape:!0,closeOnSlideClick:!0,closeOnSwipeUpOrDown:!0,emulateTouchEvents:!0,stopTouchEventsPropagation:!1,hidePageScrollbars:!0,disableScroll:!0,carousel:!1,continuous:!0,unloadElements:!0,startSlideshow:!1,slideshowInterval:5e3,index:0,preloadRange:2,transitionSpeed:400,slideshowTransitionSpeed:void 0,event:void 0,onopen:void 0,onopened:void 0,onslide:void 0,onslideend:void 0,onslidecomplete:void 0,onclose:void 0,onclosed:void 0},carouselOptions:{hidePageScrollbars:!1,toggleControlsOnReturn:!1,toggleSlideshowOnSpace:!1,enableKeyboardNavigation:!1,closeOnEscape:!1,closeOnSlideClick:!1,closeOnSwipeUpOrDown:!1,disableScroll:!1,startSlideshow:!0},console:window.console&&"function"==typeof window.console.log?window.console:{log:function(){}},support:function(i){function s(){var t,s,e=o.transition;document.body.appendChild(i),e&&(t=e.name.slice(0,-9)+"ransform",void 0!==i.style[t]&&(i.style[t]="translateZ(0)",s=window.getComputedStyle(i).getPropertyValue(e.prefix+"transform"),o.transform={prefix:e.prefix,name:t,translate:!0,translateZ:!!s&&"none"!==s})),void 0!==i.style.backgroundSize&&(o.backgroundSize={},i.style.backgroundSize="contain",o.backgroundSize.contain="contain"===window.getComputedStyle(i).getPropertyValue("background-size"),i.style.backgroundSize="cover",o.backgroundSize.cover="cover"===window.getComputedStyle(i).getPropertyValue("background-size")),document.body.removeChild(i)}var e,o={touch:void 0!==window.ontouchstart||window.DocumentTouch&&document instanceof DocumentTouch},n={webkitTransition:{end:"webkitTransitionEnd",prefix:"-webkit-"},MozTransition:{end:"transitionend",prefix:"-moz-"},OTransition:{end:"otransitionend",prefix:"-o-"},transition:{end:"transitionend",prefix:""}};for(e in n)if(n.hasOwnProperty(e)&&void 0!==i.style[e]){o.transition=n[e],o.transition.name=e;break}return document.body?s():t(document).on("DOMContentLoaded",s),o}(document.createElement("div")),requestAnimationFrame:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame,initialize:function(){return this.initStartIndex(),this.initWidget()===!1?!1:(this.initEventListeners(),this.onslide(this.index),this.ontransitionend(),void(this.options.startSlideshow&&this.play()))},slide:function(t,i){window.clearTimeout(this.timeout);var s,e,o,n=this.index;if(n!==t&&1!==this.num){if(i||(i=this.options.transitionSpeed),this.support.transform){for(this.options.continuous||(t=this.circle(t)),s=Math.abs(n-t)/(n-t),this.options.continuous&&(e=s,s=-this.positions[this.circle(t)]/this.slideWidth,s!==e&&(t=-s*this.num+t)),o=Math.abs(n-t)-1;o;)o-=1,this.move(this.circle((t>n?t:n)-o-1),this.slideWidth*s,0);t=this.circle(t),this.move(n,this.slideWidth*s,i),this.move(t,0,i),this.options.continuous&&this.move(this.circle(t-s),-(this.slideWidth*s),0)}else t=this.circle(t),this.animate(n*-this.slideWidth,t*-this.slideWidth,i);this.onslide(t)}},getIndex:function(){return this.index},getNumber:function(){return this.num},prev:function(){(this.options.continuous||this.index)&&this.slide(this.index-1)},next:function(){(this.options.continuous||this.index1&&(this.timeout=this.setTimeout(!this.requestAnimationFrame&&this.slide||function(t,s){i.animationFrameId=i.requestAnimationFrame.call(window,function(){i.slide(t,s)})},[this.index+1,this.options.slideshowTransitionSpeed],this.interval)),this.container.addClass(this.options.playingClass)},pause:function(){window.clearTimeout(this.timeout),this.interval=null,this.container.removeClass(this.options.playingClass)},add:function(t){var i;for(t.concat||(t=Array.prototype.slice.call(t)),this.list.concat||(this.list=Array.prototype.slice.call(this.list)),this.list=this.list.concat(t),this.num=this.list.length,this.num>2&&null===this.options.continuous&&(this.options.continuous=!0,this.container.removeClass(this.options.leftEdgeClass)),this.container.removeClass(this.options.rightEdgeClass).removeClass(this.options.singleClass),i=this.num-t.length;is?(e.slidesContainer[0].style.left=i+"px",e.ontransitionend(),void window.clearInterval(n)):void(e.slidesContainer[0].style.left=(i-t)*(Math.floor(l/s*100)/100)+t+"px")},4)},preventDefault:function(t){t.preventDefault?t.preventDefault():t.returnValue=!1},stopPropagation:function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},onresize:function(){this.initSlides(!0)},onmousedown:function(t){t.which&&1===t.which&&"VIDEO"!==t.target.nodeName&&(t.preventDefault(),(t.originalEvent||t).touches=[{pageX:t.pageX,pageY:t.pageY}],this.ontouchstart(t))},onmousemove:function(t){this.touchStart&&((t.originalEvent||t).touches=[{pageX:t.pageX,pageY:t.pageY}],this.ontouchmove(t))},onmouseup:function(t){this.touchStart&&(this.ontouchend(t),delete this.touchStart)},onmouseout:function(i){if(this.touchStart){var s=i.target,e=i.relatedTarget;(!e||e!==s&&!t.contains(s,e))&&this.onmouseup(i)}},ontouchstart:function(t){this.options.stopTouchEventsPropagation&&this.stopPropagation(t);var i=(t.originalEvent||t).touches[0];this.touchStart={x:i.pageX,y:i.pageY,time:Date.now()},this.isScrolling=void 0,this.touchDelta={}},ontouchmove:function(t){this.options.stopTouchEventsPropagation&&this.stopPropagation(t);var i,s,e=(t.originalEvent||t).touches[0],o=(t.originalEvent||t).scale,n=this.index;if(!(e.length>1||o&&1!==o))if(this.options.disableScroll&&t.preventDefault(),this.touchDelta={x:e.pageX-this.touchStart.x,y:e.pageY-this.touchStart.y},i=this.touchDelta.x,void 0===this.isScrolling&&(this.isScrolling=this.isScrolling||Math.abs(i)0||n===this.num-1&&0>i?Math.abs(i)/this.slideWidth+1:1,s=[n],n&&s.push(n-1),n20||Math.abs(this.touchDelta.x)>h/2,c=!l&&this.touchDelta.x>0||l===this.num-1&&this.touchDelta.x<0,u=!d&&this.options.closeOnSwipeUpOrDown&&(r&&Math.abs(this.touchDelta.y)>20||Math.abs(this.touchDelta.y)>this.slideHeight/2);this.options.continuous&&(c=!1),i=this.touchDelta.x<0?-1:1,this.isScrolling?u?this.close():this.translateY(l,0,a):d&&!c?(s=l+i,e=l-i,o=h*i,n=-h*i,this.options.continuous?(this.move(this.circle(s),o,0),this.move(this.circle(l-2*i),n,0)):s>=0&&sthis.container[0].clientHeight&&(e.style.maxHeight=this.container[0].clientHeight),this.interval&&this.slides[this.index]===o&&this.play(),this.setTimeout(this.options.onslidecomplete,[s,o]))},onload:function(t){this.oncomplete(t)},onerror:function(t){this.oncomplete(t)},onkeydown:function(t){switch(t.which||t.keyCode){case 13:this.options.toggleControlsOnReturn&&(this.preventDefault(t),this.toggleControls());break;case 27:this.options.closeOnEscape&&(this.close(),t.stopImmediatePropagation());break;case 32:this.options.toggleSlideshowOnSpace&&(this.preventDefault(t),this.toggleSlideshow());break;case 37:this.options.enableKeyboardNavigation&&(this.preventDefault(t),this.prev());break;case 39:this.options.enableKeyboardNavigation&&(this.preventDefault(t),this.next())}},handleClick:function(i){function s(i){return t(o).hasClass(i)||t(n).hasClass(i)}var e=this.options,o=i.target||i.srcElement,n=o.parentNode;s(e.toggleClass)?(this.preventDefault(i),this.toggleControls()):s(e.prevClass)?(this.preventDefault(i),this.prev()):s(e.nextClass)?(this.preventDefault(i),this.next()):s(e.closeClass)?(this.preventDefault(i),this.close()):s(e.playPauseClass)?(this.preventDefault(i),this.toggleSlideshow()):n===this.slidesContainer[0]?e.closeOnSlideClick?(this.preventDefault(i),this.close()):e.toggleControlsOnSlideClick&&(this.preventDefault(i),this.toggleControls()):n.parentNode&&n.parentNode===this.slidesContainer[0]&&e.toggleControlsOnSlideClick&&(this.preventDefault(i),this.toggleControls())},onclick:function(t){return this.options.emulateTouchEvents&&this.touchDelta&&(Math.abs(this.touchDelta.x)>20||Math.abs(this.touchDelta.y)>20)?void delete this.touchDelta:this.handleClick(t)},updateEdgeClasses:function(t){t?this.container.removeClass(this.options.leftEdgeClass):this.container.addClass(this.options.leftEdgeClass),t===this.num-1?this.container.addClass(this.options.rightEdgeClass):this.container.removeClass(this.options.rightEdgeClass)},handleSlide:function(t){this.options.continuous||this.updateEdgeClasses(t),this.loadElements(t),this.options.unloadElements&&this.unloadElements(t),this.setTitle(t)},onslide:function(t){this.index=t,this.handleSlide(t),this.setTimeout(this.options.onslide,[t,this.slides[t]])},setTitle:function(t){var i=this.slides[t].firstChild.title,s=this.titleElement;s.length&&(this.titleElement.empty(),i&&s[0].appendChild(document.createTextNode(i)))},setTimeout:function(t,i,s){var e=this;return t&&window.setTimeout(function(){t.apply(e,i||[])},s||0)},imageFactory:function(i,s){function e(i){if(!o){if(i={type:i.type,target:n},!n.parentNode)return a.setTimeout(e,[i]);o=!0,t(h).off("load error",e),d&&"load"===i.type&&(n.style.background='url("'+r+'") center no-repeat',n.style.backgroundSize=d),s(i)}}var o,n,l,a=this,h=this.imagePrototype.cloneNode(!1),r=i,d=this.options.stretchImages;return"string"!=typeof r&&(r=this.getItemProperty(i,this.options.urlProperty),l=this.getItemProperty(i,this.options.titleProperty)),d===!0&&(d="contain"),d=this.support.backgroundSize&&this.support.backgroundSize[d]&&d,d?n=this.elementPrototype.cloneNode(!1):(n=h,h.draggable=!1),l&&(n.title=l),t(h).on("load error",e),h.src=r,n},createElement:function(i,s){var e=i&&this.getItemProperty(i,this.options.typeProperty),o=e&&this[e.split("/")[0]+"Factory"]||this.imageFactory,n=i&&o.call(this,i,s),l=this.getItemProperty(i,this.options.srcsetProperty);return n||(n=this.elementPrototype.cloneNode(!1),this.setTimeout(s,[{type:"error",target:n}])),l&&n.setAttribute("srcset",l),t(n).addClass(this.options.slideContentClass),n},loadElement:function(i){this.elements[i]||(this.slides[i].firstChild?this.elements[i]=t(this.slides[i]).hasClass(this.options.slideErrorClass)?3:2:(this.elements[i]=1,t(this.slides[i]).addClass(this.options.slideLoadingClass),this.slides[i].appendChild(this.createElement(this.list[i],this.proxyListener))))},loadElements:function(t){var i,s=Math.min(this.num,2*this.options.preloadRange+1),e=t;for(i=0;s>i;i+=1)e+=i*(i%2===0?-1:1),e=this.circle(e),this.loadElement(e)},unloadElements:function(t){var i,s;for(i in this.elements)this.elements.hasOwnProperty(i)&&(s=Math.abs(t-i),s>this.options.preloadRange&&s+this.options.preloadRanget?-this.slideWidth:this.indext;t++)this.unloadSlide(t)},toggleControls:function(){var t=this.options.controlsClass;this.container.hasClass(t)?this.container.removeClass(t):this.container.addClass(t)},toggleSlideshow:function(){this.interval?this.pause():this.play()},getNodeIndex:function(t){return parseInt(t.getAttribute("data-index"),10)},getNestedProperty:function(t,i){return i.replace(/\[(?:'([^']+)'|"([^"]+)"|(\d+))\]|(?:(?:^|\.)([^\.\[]+))/g,function(i,s,e,o,n){var l=n||s||e||o&&parseInt(o,10);i&&t&&(t=t[l])}),t},getDataProperty:function(i,s){var e;if(i.dataset?e=i.dataset[s]:i.getAttribute&&(e=i.getAttribute("data-"+s.replace(/([A-Z])/g,"-$1").toLowerCase())),"string"==typeof e){if(/^(true|false|null|-?\d+(\.\d+)?|\{[\s\S]*\}|\[[\s\S]*\])$/.test(e))try{return t.parseJSON(e)}catch(o){}return e}},getItemProperty:function(t,i){var s=this.getDataProperty(t,i);return void 0===s&&(s=t[i]),void 0===s&&(s=this.getNestedProperty(t,i)),s},initStartIndex:function(){var t,i=this.options.index,s=this.options.urlProperty;if(i&&"number"!=typeof i)for(t=0;tn?t:n)-o-1),this.slideWidth*s,0);t=this.circle(t),this.move(n,this.slideWidth*s,i),this.move(t,0,i),this.options.continuous&&this.move(this.circle(t-s),-(this.slideWidth*s),0)}else t=this.circle(t),this.animate(n*-this.slideWidth,t*-this.slideWidth,i);this.onslide(t)}},getIndex:function(){return this.index},getNumber:function(){return this.num},prev:function(){(this.options.continuous||this.index)&&this.slide(this.index-1)},next:function(){(this.options.continuous||this.index1&&(this.timeout=this.setTimeout(!this.requestAnimationFrame&&this.slide||function(t,s){i.animationFrameId=i.requestAnimationFrame.call(window,function(){i.slide(t,s)})},[this.index+1,this.options.slideshowTransitionSpeed],this.interval)),this.container.addClass(this.options.playingClass)},pause:function(){window.clearTimeout(this.timeout),this.interval=null,this.container.removeClass(this.options.playingClass)},add:function(t){var i;for(t.concat||(t=Array.prototype.slice.call(t)),this.list.concat||(this.list=Array.prototype.slice.call(this.list)),this.list=this.list.concat(t),this.num=this.list.length,this.num>2&&null===this.options.continuous&&(this.options.continuous=!0,this.container.removeClass(this.options.leftEdgeClass)),this.container.removeClass(this.options.rightEdgeClass).removeClass(this.options.singleClass),i=this.num-t.length;is?(e.slidesContainer[0].style.left=i+"px",e.ontransitionend(),void window.clearInterval(n)):void(e.slidesContainer[0].style.left=(i-t)*(Math.floor(l/s*100)/100)+t+"px")},4)},preventDefault:function(t){t.preventDefault?t.preventDefault():t.returnValue=!1},stopPropagation:function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},onresize:function(){this.initSlides(!0)},onmousedown:function(t){t.which&&1===t.which&&"VIDEO"!==t.target.nodeName&&(t.preventDefault(),(t.originalEvent||t).touches=[{pageX:t.pageX,pageY:t.pageY}],this.ontouchstart(t))},onmousemove:function(t){this.touchStart&&((t.originalEvent||t).touches=[{pageX:t.pageX,pageY:t.pageY}],this.ontouchmove(t))},onmouseup:function(t){this.touchStart&&(this.ontouchend(t),delete this.touchStart)},onmouseout:function(i){if(this.touchStart){var s=i.target,e=i.relatedTarget;(!e||e!==s&&!t.contains(s,e))&&this.onmouseup(i)}},ontouchstart:function(t){this.options.stopTouchEventsPropagation&&this.stopPropagation(t);var i=(t.originalEvent||t).touches[0];this.touchStart={x:i.pageX,y:i.pageY,time:Date.now()},this.isScrolling=void 0,this.touchDelta={}},ontouchmove:function(t){this.options.stopTouchEventsPropagation&&this.stopPropagation(t);var i,s,e=(t.originalEvent||t).touches[0],o=(t.originalEvent||t).scale,n=this.index;if(!(e.length>1||o&&1!==o))if(this.options.disableScroll&&t.preventDefault(),this.touchDelta={x:e.pageX-this.touchStart.x,y:e.pageY-this.touchStart.y},i=this.touchDelta.x,void 0===this.isScrolling&&(this.isScrolling=this.isScrolling||Math.abs(i)0||n===this.num-1&&0>i?Math.abs(i)/this.slideWidth+1:1,s=[n],n&&s.push(n-1),n20||Math.abs(this.touchDelta.x)>h/2,c=!l&&this.touchDelta.x>0||l===this.num-1&&this.touchDelta.x<0,u=!d&&this.options.closeOnSwipeUpOrDown&&(r&&Math.abs(this.touchDelta.y)>20||Math.abs(this.touchDelta.y)>this.slideHeight/2);this.options.continuous&&(c=!1),i=this.touchDelta.x<0?-1:1,this.isScrolling?u?this.close():this.translateY(l,0,a):d&&!c?(s=l+i,e=l-i,o=h*i,n=-h*i,this.options.continuous?(this.move(this.circle(s),o,0),this.move(this.circle(l-2*i),n,0)):s>=0&&sthis.container[0].clientHeight&&(e.style.maxHeight=this.container[0].clientHeight),this.interval&&this.slides[this.index]===o&&this.play(),this.setTimeout(this.options.onslidecomplete,[s,o]))},onload:function(t){this.oncomplete(t)},onerror:function(t){this.oncomplete(t)},onkeydown:function(t){switch(t.which||t.keyCode){case 13:this.options.toggleControlsOnReturn&&(this.preventDefault(t),this.toggleControls());break;case 27:this.options.closeOnEscape&&(this.close(),t.stopImmediatePropagation());break;case 32:this.options.toggleSlideshowOnSpace&&(this.preventDefault(t),this.toggleSlideshow());break;case 37:this.options.enableKeyboardNavigation&&(this.preventDefault(t),this.prev());break;case 39:this.options.enableKeyboardNavigation&&(this.preventDefault(t),this.next())}},handleClick:function(i){function s(i){return t(o).hasClass(i)||t(n).hasClass(i)}var e=this.options,o=i.target||i.srcElement,n=o.parentNode;s(e.toggleClass)?(this.preventDefault(i),this.toggleControls()):s(e.prevClass)?(this.preventDefault(i),this.prev()):s(e.nextClass)?(this.preventDefault(i),this.next()):s(e.closeClass)?(this.preventDefault(i),this.close()):s(e.playPauseClass)?(this.preventDefault(i),this.toggleSlideshow()):n===this.slidesContainer[0]?e.closeOnSlideClick?(this.preventDefault(i),this.close()):e.toggleControlsOnSlideClick&&(this.preventDefault(i),this.toggleControls()):n.parentNode&&n.parentNode===this.slidesContainer[0]&&e.toggleControlsOnSlideClick&&(this.preventDefault(i),this.toggleControls())},onclick:function(t){return this.options.emulateTouchEvents&&this.touchDelta&&(Math.abs(this.touchDelta.x)>20||Math.abs(this.touchDelta.y)>20)?void delete this.touchDelta:this.handleClick(t)},updateEdgeClasses:function(t){t?this.container.removeClass(this.options.leftEdgeClass):this.container.addClass(this.options.leftEdgeClass),t===this.num-1?this.container.addClass(this.options.rightEdgeClass):this.container.removeClass(this.options.rightEdgeClass)},handleSlide:function(t){this.options.continuous||this.updateEdgeClasses(t),this.loadElements(t),this.options.unloadElements&&this.unloadElements(t),this.setTitle(t)},onslide:function(t){this.index=t,this.handleSlide(t),this.setTimeout(this.options.onslide,[t,this.slides[t]])},setTitle:function(t){var i=this.slides[t].firstChild.title,s=this.titleElement;s.length&&(this.titleElement.empty(),i&&s[0].appendChild(document.createTextNode(i)))},setTimeout:function(t,i,s){var e=this;return t&&window.setTimeout(function(){t.apply(e,i||[])},s||0)},imageFactory:function(i,s){function e(i){if(!o){if(i={type:i.type,target:n},!n.parentNode)return a.setTimeout(e,[i]);o=!0,t(h).off("load error",e),d&&"load"===i.type&&(n.style.background='url("'+r+'") center no-repeat',n.style.backgroundSize=d),s(i)}}var o,n,l,a=this,h=this.imagePrototype.cloneNode(!1),r=i,d=this.options.stretchImages;return"string"!=typeof r&&(r=this.getItemProperty(i,this.options.urlProperty),l=this.getItemProperty(i,this.options.titleProperty)),d===!0&&(d="contain"),d=this.support.backgroundSize&&this.support.backgroundSize[d]&&d,d?n=this.elementPrototype.cloneNode(!1):(n=h,h.draggable=!1),l&&(n.title=l),t(h).on("load error",e),h.src=r,n},createElement:function(i,s){var e=i&&this.getItemProperty(i,this.options.typeProperty),o=e&&this[e.split("/")[0]+"Factory"]||this.imageFactory,n=i&&o.call(this,i,s),l=this.getItemProperty(i,this.options.srcsetProperty);return n||(n=this.elementPrototype.cloneNode(!1),this.setTimeout(s,[{type:"error",target:n}])),l&&n.setAttribute("srcset",l),t(n).addClass(this.options.slideContentClass),n},loadElement:function(i){this.elements[i]||(this.slides[i].firstChild?this.elements[i]=t(this.slides[i]).hasClass(this.options.slideErrorClass)?3:2:(this.elements[i]=1,t(this.slides[i]).addClass(this.options.slideLoadingClass),this.slides[i].appendChild(this.createElement(this.list[i],this.proxyListener))))},loadElements:function(t){var i,s=Math.min(this.num,2*this.options.preloadRange+1),e=t;for(i=0;s>i;i+=1)e+=i*(i%2===0?-1:1),e=this.circle(e),this.loadElement(e)},unloadElements:function(t){var i,s;for(i in this.elements)this.elements.hasOwnProperty(i)&&(s=Math.abs(t-i),s>this.options.preloadRange&&s+this.options.preloadRanget?-this.slideWidth:this.indext;t++)this.unloadSlide(t)},toggleControls:function(){var t=this.options.controlsClass;this.container.hasClass(t)?this.container.removeClass(t):this.container.addClass(t)},toggleSlideshow:function(){this.interval?this.pause():this.play()},getNodeIndex:function(t){return parseInt(t.getAttribute("data-index"),10)},getNestedProperty:function(t,i){return i.replace(/\[(?:'([^']+)'|"([^"]+)"|(\d+))\]|(?:(?:^|\.)([^\.\[]+))/g,function(i,s,e,o,n){var l=n||s||e||o&&parseInt(o,10);i&&t&&(t=t[l])}),t},getDataProperty:function(i,s){var e,o;if(i.dataset?(e=s.replace(/-([a-z])/g,function(t,i){return i.toUpperCase()}),o=i.dataset[e]):i.getAttribute&&(o=i.getAttribute("data-"+s.replace(/([A-Z])/g,"-$1").toLowerCase())),"string"==typeof o){if(/^(true|false|null|-?\d+(\.\d+)?|\{[\s\S]*\}|\[[\s\S]*\])$/.test(o))try{return t.parseJSON(o)}catch(n){}return o}},getItemProperty:function(t,i){var s=this.getDataProperty(t,i);return void 0===s&&(s=t[i]),void 0===s&&(s=this.getNestedProperty(t,i)),s},initStartIndex:function(){var t,i=this.options.index,s=this.options.urlProperty;if(i&&"number"!=typeof i)for(t=0;t=1?"rgb("+[a.r,a.g,a.b].join(",")+")":"rgba("+[a.r,a.g,a.b,a.a].join(",")+")"},a.normalize=function(){function t(t,i,e){return t>i?t:i>e?e:i}return a.r=t(0,parseInt(a.r),255),a.g=t(0,parseInt(a.g),255),a.b=t(0,parseInt(a.b),255),a.a=t(0,a.a,1),a},a.clone=function(){return t.color.make(a.r,a.b,a.g,a.a)},a.normalize()},t.color.extract=function(i,e){var o;do{if(o=i.css(e).toLowerCase(),""!=o&&"transparent"!=o)break;i=i.parent()}while(i.length&&!t.nodeName(i.get(0),"body"));return"rgba(0, 0, 0, 0)"==o&&(o="transparent"),t.color.parse(o)},t.color.parse=function(e){var o,n=t.color.make;if(o=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(e))return n(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10));if(o=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(e))return n(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10),parseFloat(o[4]));if(o=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(e))return n(2.55*parseFloat(o[1]),2.55*parseFloat(o[2]),2.55*parseFloat(o[3]));if(o=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(e))return n(2.55*parseFloat(o[1]),2.55*parseFloat(o[2]),2.55*parseFloat(o[3]),parseFloat(o[4]));if(o=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(e))return n(parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16));if(o=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(e))return n(parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16));var a=t.trim(e).toLowerCase();return"transparent"==a?n(255,255,255,0):(o=i[a]||[0,0,0],n(o[0],o[1],o[2]))};var i={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}}(jQuery),function(t){function i(i,e){var o=e.children("."+i)[0];if(null==o&&(o=document.createElement("canvas"),o.className=i,t(o).css({direction:"ltr",position:"absolute",left:0,top:0}).appendTo(e),!o.getContext)){if(!window.G_vmlCanvasManager)throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");o=window.G_vmlCanvasManager.initElement(o)}this.element=o;var n=this.context=o.getContext("2d"),a=window.devicePixelRatio||1,r=n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1;this.pixelRatio=a/r,this.resize(e.width(),e.height()),this.textContainer=null,this.text={},this._textCache={}}function e(e,n,a,r){function l(t,i){i=[xt].concat(i);for(var e=0;eo;++o)n=nt.xaxes[o],n&&!n.tickColor&&(n.tickColor=n.color),n=t.extend(!0,{},nt.xaxis,n),nt.xaxes[o]=n,n.font&&(n.font=t.extend({},c,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(a=nt.yaxes.length||1,o=0;a>o;++o)n=nt.yaxes[o],n&&!n.tickColor&&(n.tickColor=n.color),n=t.extend(!0,{},nt.yaxis,n),nt.yaxes[o]=n,n.font&&(n.font=t.extend({},c,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(nt.xaxis.noTicks&&null==nt.xaxis.ticks&&(nt.xaxis.ticks=nt.xaxis.noTicks),nt.yaxis.noTicks&&null==nt.yaxis.ticks&&(nt.yaxis.ticks=nt.yaxis.noTicks),nt.x2axis&&(nt.xaxes[1]=t.extend(!0,{},nt.xaxis,nt.x2axis),nt.xaxes[1].position="top",null==nt.x2axis.min&&(nt.xaxes[1].min=null),null==nt.x2axis.max&&(nt.xaxes[1].max=null)),nt.y2axis&&(nt.yaxes[1]=t.extend(!0,{},nt.yaxis,nt.y2axis),nt.yaxes[1].position="right",null==nt.y2axis.min&&(nt.yaxes[1].min=null),null==nt.y2axis.max&&(nt.yaxes[1].max=null)),nt.grid.coloredAreas&&(nt.grid.markings=nt.grid.coloredAreas),nt.grid.coloredAreasColor&&(nt.grid.markingsColor=nt.grid.coloredAreasColor),nt.lines&&t.extend(!0,nt.series.lines,nt.lines),nt.points&&t.extend(!0,nt.series.points,nt.points),nt.bars&&t.extend(!0,nt.series.bars,nt.bars),null!=nt.shadowSize&&(nt.series.shadowSize=nt.shadowSize),null!=nt.highlightColor&&(nt.series.highlightColor=nt.highlightColor),o=0;oo&&(o=n))}o>=e&&(e=o+1);var a,r=[],l=nt.colors,s=l.length,c=0;for(i=0;e>i;i++)a=t.color.parse(l[i%s]||"#666"),i%s==0&&i&&(c=c>=0?.5>c?-c-.2:0:-c),r[i]=a.scale("rgb",1+c);var h,f=0;for(i=0;it.datamax&&e!=b&&(t.datamax=e)}var e,o,n,a,r,s,c,h,f,u,p,m,x=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,b=Number.MAX_VALUE;for(t.each(d(),function(t,i){i.datamin=x,i.datamax=g,i.used=!1}),e=0;ea;++a)h=u[a],f=m[a],f&&(f.number&&null!=h&&(h=+h,isNaN(h)?h=null:h==1/0?h=b:h==-(1/0)&&(h=-b)),null==h&&(f.required&&(y=!0),null!=f.defaultValue&&(h=f.defaultValue))),s[n+a]=h;if(y)for(a=0;c>a;++a)h=s[n+a],null!=h&&(f=m[a],f.autoscale!==!1&&(f.x&&i(r.xaxis,h,h),f.y&&i(r.yaxis,h,h))),s[n+a]=null;else if(k&&n>0&&null!=s[n-c]&&s[n-c]!=s[n]&&s[n-c+1]!=s[n+1]){for(a=0;c>a;++a)s[n+c+a]=s[n+a];s[n+1]=s[n-c+1],n+=c}}}}for(e=0;ea;++a)h=s[o+a],f=m[a],f&&f.autoscale!==!1&&h!=b&&h!=-b&&(f.x&&(w>h&&(w=h),h>T&&(T=h)),f.y&&(M>h&&(M=h),h>C&&(C=h)));if(r.bars.show){var S;switch(r.bars.align){case"left":S=0;break;case"right":S=-r.bars.barWidth;break;default:S=-r.bars.barWidth/2}r.bars.horizontal?(M+=S,C+=S+r.bars.barWidth):(w+=S,T+=S+r.bars.barWidth)}i(r.xaxis,w,T),i(r.yaxis,M,C)}t.each(d(),function(t,i){i.datamin==x&&(i.datamin=null),i.datamax==g&&(i.datamax=null)})}function v(){e.css("padding",0).children().filter(function(){return!t(this).hasClass("flot-overlay")&&!t(this).hasClass("flot-base")}).remove(),"static"==e.css("position")&&e.css("position","relative"),at=new i("flot-base",e),rt=new i("flot-overlay",e),st=at.context,ct=rt.context,lt=t(rt.element).unbind();var o=e.data("plot");o&&(o.shutdown(),rt.clear()),e.data("plot",xt)}function k(){nt.grid.hoverable&&(lt.mousemove(X),lt.bind("mouseleave",Y)),nt.grid.clickable&<.click(q),l(mt.bindEvents,[lt])}function y(){bt&&clearTimeout(bt),lt.unbind("mousemove",X),lt.unbind("mouseleave",Y),lt.unbind("click",q),l(mt.shutdown,[lt])}function w(t){function i(t){return t}var e,o,n=t.options.transform||i,a=t.options.inverseTransform;"x"==t.direction?(e=t.scale=dt/Math.abs(n(t.max)-n(t.min)),o=Math.min(n(t.max),n(t.min))):(e=t.scale=pt/Math.abs(n(t.max)-n(t.min)),e=-e,o=Math.max(n(t.max),n(t.min))),n==i?t.p2c=function(t){return(t-o)*e}:t.p2c=function(t){return(n(t)-o)*e},a?t.c2p=function(t){return a(o+t/e)}:t.c2p=function(t){return o+t/e}}function M(t){for(var i=t.options,e=t.ticks||[],o=i.labelWidth||0,n=i.labelHeight||0,a=o||("x"==t.direction?Math.floor(at.width/(e.length||1)):null),r=t.direction+"Axis "+t.direction+t.n+"Axis",l="flot-"+t.direction+"-axis flot-"+t.direction+t.n+"-axis "+r,s=i.font||"flot-tick-label tickLabel",c=0;c=0;--i)T(r[i]);S(),t.each(r,function(t,i){C(i)})}dt=at.width-ut.left-ut.right,pt=at.height-ut.bottom-ut.top,t.each(e,function(t,i){w(i)}),o&&O(),_()}function z(t){var i=t.options,e=+(null!=i.min?i.min:t.datamin),o=+(null!=i.max?i.max:t.datamax),n=o-e;if(0==n){var a=0==o?1:.01;null==i.min&&(e-=a),(null==i.max||null!=i.min)&&(o+=a)}else{var r=i.autoscaleMargin;null!=r&&(null==i.min&&(e-=n*r,0>e&&null!=t.datamin&&t.datamin>=0&&(e=0)),null==i.max&&(o+=n*r,o>0&&null!=t.datamax&&t.datamax<=0&&(o=0)))}t.min=e,t.max=o}function I(i){var e,n=i.options;e="number"==typeof n.ticks&&n.ticks>0?n.ticks:.3*Math.sqrt("x"==i.direction?at.width:at.height);var a=(i.max-i.min)/e,r=-Math.floor(Math.log(a)/Math.LN10),l=n.tickDecimals;null!=l&&r>l&&(r=l);var s,c=Math.pow(10,-r),h=a/c;if(1.5>h?s=1:3>h?(s=2,h>2.25&&(null==l||l>=r+1)&&(s=2.5,++r)):s=7.5>h?5:10,s*=c,null!=n.minTickSize&&s0&&(null==n.min&&(i.min=Math.min(i.min,u[0])),null==n.max&&u.length>1&&(i.max=Math.max(i.max,u[u.length-1]))),i.tickGenerator=function(t){var i,e,o=[];for(e=0;e1&&/\..*0$/.test((p[1]-p[0]).toFixed(d))||(i.tickDecimals=d)}}}}function A(i){var e=i.options.ticks,o=[];null==e||"number"==typeof e&&e>0?o=i.tickGenerator(i):e&&(o=t.isFunction(e)?e(i):e);var n,a;for(i.ticks=[],n=0;n1&&(r=l[1])):a=+l,null==r&&(r=i.tickFormatter(a,i)),isNaN(a)||i.ticks.push({v:a,label:r})}}function F(t,i){t.options.autoscaleMargin&&i.length>0&&(null==t.options.min&&(t.min=Math.min(t.min,i[0].v)),null==t.options.max&&i.length>1&&(t.max=Math.max(t.max,i[i.length-1].v)))}function P(){at.clear(),l(mt.drawBackground,[st]);var t=nt.grid;t.show&&t.backgroundColor&&D(),t.show&&!t.aboveData&&L();for(var i=0;in){var s=o;o=n,n=s}return{from:o,to:n,axis:e}}function D(){st.save(),st.translate(ut.left,ut.top),st.fillStyle=et(nt.grid.backgroundColor,pt,0,"rgba(255, 255, 255, 0)"),st.fillRect(0,0,dt,pt),st.restore()}function L(){var i,e,o,n;st.save(),st.translate(ut.left,ut.top);var a=nt.grid.markings;if(a)for(t.isFunction(a)&&(e=xt.getAxes(),e.xmin=e.xaxis.min,e.xmax=e.xaxis.max,e.ymin=e.yaxis.min,e.ymax=e.yaxis.max,a=a(e)),i=0;il.axis.max||s.tos.axis.max)){l.from=Math.max(l.from,l.axis.min),l.to=Math.min(l.to,l.axis.max),s.from=Math.max(s.from,s.axis.min),s.to=Math.min(s.to,s.axis.max);var c=l.from===l.to,h=s.from===s.to;if(!c||!h)if(l.from=Math.floor(l.axis.p2c(l.from)),l.to=Math.floor(l.axis.p2c(l.to)),s.from=Math.floor(s.axis.p2c(s.from)),s.to=Math.floor(s.axis.p2c(s.to)),c||h){var f=r.lineWidth||nt.grid.markingsLineWidth,u=f%2?.5:0;st.beginPath(),st.strokeStyle=r.color||nt.grid.markingsColor,st.lineWidth=f,c?(st.moveTo(l.to+u,s.from),st.lineTo(l.to+u,s.to)):(st.moveTo(l.from,s.to+u),st.lineTo(l.to,s.to+u)),st.stroke()}else st.fillStyle=r.color||nt.grid.markingsColor,st.fillRect(l.from,s.to,l.to-l.from,s.from-s.to)}}e=d(),o=nt.grid.borderWidth;for(var p=0;pv.max||"full"==y&&("object"==typeof o&&o[v.position]>0||o>0)&&(w==v.min||w==v.max)||("x"==v.direction?(m=v.p2c(w),b="full"==y?-pt:y,"top"==v.position&&(b=-b)):(x=v.p2c(w),g="full"==y?-dt:y,"left"==v.position&&(g=-g)),1==st.lineWidth&&("x"==v.direction?m=Math.floor(m)+.5:x=Math.floor(x)+.5),st.moveTo(m,x),st.lineTo(m+g,x+b))}st.stroke()}}o&&(n=nt.grid.borderColor,"object"==typeof o||"object"==typeof n?("object"!=typeof o&&(o={top:o,right:o,bottom:o,left:o}),"object"!=typeof n&&(n={top:n,right:n,bottom:n,left:n}),o.top>0&&(st.strokeStyle=n.top,st.lineWidth=o.top,st.beginPath(),st.moveTo(0-o.left,0-o.top/2),st.lineTo(dt,0-o.top/2),st.stroke()),o.right>0&&(st.strokeStyle=n.right,st.lineWidth=o.right,st.beginPath(),st.moveTo(dt+o.right/2,0-o.top),st.lineTo(dt+o.right/2,pt),st.stroke()),o.bottom>0&&(st.strokeStyle=n.bottom,st.lineWidth=o.bottom,st.beginPath(),st.moveTo(dt+o.right,pt+o.bottom/2),st.lineTo(0,pt+o.bottom/2),st.stroke()),o.left>0&&(st.strokeStyle=n.left,st.lineWidth=o.left,st.beginPath(),st.moveTo(0-o.left/2,pt+o.bottom),st.lineTo(0-o.left/2,0),st.stroke())):(st.lineWidth=o,st.strokeStyle=nt.grid.borderColor,st.strokeRect(-o/2,-o/2,dt+o,pt+o))),st.restore()}function O(){t.each(d(),function(t,i){var e,o,n,a,r,l=i.box,s=i.direction+"Axis "+i.direction+i.n+"Axis",c="flot-"+i.direction+"-axis flot-"+i.direction+i.n+"-axis "+s,h=i.options.font||"flot-tick-label tickLabel";if(at.removeText(c),i.show&&0!=i.ticks.length)for(var f=0;fi.max||("x"==i.direction?(a="center",o=ut.left+i.p2c(e.v),"bottom"==i.position?n=l.top+l.padding:(n=l.top+l.height-l.padding,r="bottom")):(r="middle",n=ut.top+i.p2c(e.v),"left"==i.position?(o=l.left+l.width-l.padding,a="right"):o=l.left+l.padding),at.addText(c,o,n,e.label,h,null,null,a,r))})}function R(t){t.lines.show&&H(t),t.bars.show&&B(t),t.points.show&&j(t)}function H(t){function i(t,i,e,o,n){var a=t.points,r=t.pointsize,l=null,s=null;st.beginPath();for(var c=r;c=f&&f=d&&d=d&&f>n.max){if(d>n.max)continue;h=(n.max-f)/(d-f)*(u-h)+h,f=n.max}else if(d>=f&&d>n.max){if(f>n.max)continue;u=(n.max-f)/(d-f)*(u-h)+h,d=n.max}if(u>=h&&h=u&&u=u&&h>o.max){if(u>o.max)continue;f=(o.max-h)/(u-h)*(d-f)+f,h=o.max}else if(u>=h&&u>o.max){if(h>o.max)continue;d=(o.max-h)/(u-h)*(d-f)+f,u=o.max}(h!=l||f!=s)&&st.moveTo(o.p2c(h)+i,n.p2c(f)+e),l=u,s=d,st.lineTo(o.p2c(u)+i,n.p2c(d)+e)}}st.stroke()}function e(t,i,e){for(var o=t.points,n=t.pointsize,a=Math.min(Math.max(0,e.min),e.max),r=0,l=!1,s=1,c=0,h=0;;){if(n>0&&r>o.length+n)break;r+=n;var f=o[r-n],u=o[r-n+s],d=o[r],p=o[r+s];if(l){if(n>0&&null!=f&&null==d){h=r,n=-n,s=2;continue}if(0>n&&r==c+n){st.fill(),l=!1,n=-n,s=1,r=c=h+n;continue}}if(null!=f&&null!=d){if(d>=f&&f=d&&d=d&&f>i.max){if(d>i.max)continue;u=(i.max-f)/(d-f)*(p-u)+u,f=i.max}else if(d>=f&&d>i.max){if(f>i.max)continue;p=(i.max-f)/(d-f)*(p-u)+u,d=i.max}if(l||(st.beginPath(),st.moveTo(i.p2c(f),e.p2c(a)),l=!0),u>=e.max&&p>=e.max)st.lineTo(i.p2c(f),e.p2c(e.max)),st.lineTo(i.p2c(d),e.p2c(e.max));else if(u<=e.min&&p<=e.min)st.lineTo(i.p2c(f),e.p2c(e.min)),st.lineTo(i.p2c(d),e.p2c(e.min));else{var m=f,x=d;p>=u&&u=e.min?(f=(e.min-u)/(p-u)*(d-f)+f,u=e.min):u>=p&&p=e.min&&(d=(e.min-u)/(p-u)*(d-f)+f,p=e.min),u>=p&&u>e.max&&p<=e.max?(f=(e.max-u)/(p-u)*(d-f)+f,u=e.max):p>=u&&p>e.max&&u<=e.max&&(d=(e.max-u)/(p-u)*(d-f)+f,p=e.max),f!=m&&st.lineTo(i.p2c(m),e.p2c(u)),st.lineTo(i.p2c(f),e.p2c(u)),st.lineTo(i.p2c(d),e.p2c(p)),d!=x&&(st.lineTo(i.p2c(d),e.p2c(p)),st.lineTo(i.p2c(x),e.p2c(p)))}}}}st.save(),st.translate(ut.left,ut.top),st.lineJoin="round";var o=t.lines.lineWidth,n=t.shadowSize;if(o>0&&n>0){st.lineWidth=n,st.strokeStyle="rgba(0,0,0,0.1)";var a=Math.PI/18;i(t.datapoints,Math.sin(a)*(o/2+n/2),Math.cos(a)*(o/2+n/2),t.xaxis,t.yaxis),st.lineWidth=n/2,i(t.datapoints,Math.sin(a)*(o/2+n/4),Math.cos(a)*(o/2+n/4),t.xaxis,t.yaxis)}st.lineWidth=o,st.strokeStyle=t.color;var r=G(t.lines,t.color,0,pt);r&&(st.fillStyle=r,e(t.datapoints,t.xaxis,t.yaxis)),o>0&&i(t.datapoints,0,0,t.xaxis,t.yaxis),st.restore()}function j(t){function i(t,i,e,o,n,a,r,l){for(var s=t.points,c=t.pointsize,h=0;ha.max||ur.max||(st.beginPath(),f=a.p2c(f),u=r.p2c(u)+o,"circle"==l?st.arc(f,u,i,0,n?Math.PI:2*Math.PI,!1):l(st,f,u,i,n),st.closePath(),e&&(st.fillStyle=e,st.fill()),st.stroke())}}st.save(),st.translate(ut.left,ut.top);var e=t.points.lineWidth,o=t.shadowSize,n=t.points.radius,a=t.points.symbol;if(0==e&&(e=1e-4),e>0&&o>0){var r=o/2;st.lineWidth=r,st.strokeStyle="rgba(0,0,0,0.1)",i(t.datapoints,n,null,r+r/2,!0,t.xaxis,t.yaxis,a),st.strokeStyle="rgba(0,0,0,0.2)",i(t.datapoints,n,null,r/2,!0,t.xaxis,t.yaxis,a)}st.lineWidth=e,st.strokeStyle=t.color,i(t.datapoints,n,G(t.points,t.color),0,!1,t.xaxis,t.yaxis,a),st.restore()}function E(t,i,e,o,n,a,r,l,s,c,h){var f,u,d,p,m,x,g,b,v;c?(b=x=g=!0,m=!1,f=e,u=t,p=i+o,d=i+n,f>u&&(v=u,u=f,f=v,m=!0,x=!1)):(m=x=g=!0,b=!1,f=t+o,u=t+n,d=e,p=i,d>p&&(v=p,p=d,d=v,b=!0,g=!1)),ur.max||pl.max||(fr.max&&(u=r.max,x=!1),dl.max&&(p=l.max,g=!1),f=r.p2c(f),d=l.p2c(d),u=r.p2c(u),p=l.p2c(p),a&&(s.fillStyle=a(d,p),s.fillRect(f,p,u-f,d-p)),h>0&&(m||x||g||b)&&(s.beginPath(),s.moveTo(f,d),m?s.lineTo(f,p):s.moveTo(f,p),g?s.lineTo(u,p):s.moveTo(u,p),x?s.lineTo(u,d):s.moveTo(u,d),b?s.lineTo(f,d):s.moveTo(f,d),s.stroke()))}function B(t){function i(i,e,o,n,a,r){for(var l=i.points,s=i.pointsize,c=0;c"),n.push(""),r=!0),n.push('
'+h.label+"")}if(r&&n.push(""),0!=n.length){var f=''+n.join("")+"
";if(null!=nt.legend.container)t(nt.legend.container).html(f);else{var u="",d=nt.legend.position,p=nt.legend.margin;null==p[0]&&(p=[p,p]),"n"==d.charAt(0)?u+="top:"+(p[1]+ut.top)+"px;":"s"==d.charAt(0)&&(u+="bottom:"+(p[1]+ut.bottom)+"px;"),"e"==d.charAt(1)?u+="right:"+(p[0]+ut.right)+"px;":"w"==d.charAt(1)&&(u+="left:"+(p[0]+ut.left)+"px;");var m=t('
'+f.replace('style="','style="position:absolute;'+u+";")+"
").appendTo(e);if(0!=nt.legend.backgroundOpacity){var x=nt.legend.backgroundColor;null==x&&(x=nt.grid.backgroundColor,x=x&&"string"==typeof x?t.color.parse(x):t.color.extract(m,"background-color"),x.a=1,x=x.toString());var g=m.children();t('
').prependTo(m).css("opacity",nt.legend.backgroundOpacity)}}}}}function V(t,i,e){var o,n,a,r=nt.grid.mouseActiveRadius,l=r*r+1,s=null;for(o=ot.length-1;o>=0;--o)if(e(ot[o])){var c=ot[o],h=c.xaxis,f=c.yaxis,u=c.datapoints.points,d=h.c2p(t),p=f.c2p(i),m=r/h.scale,x=r/f.scale;if(a=c.datapoints.pointsize,h.options.inverseTransform&&(m=Number.MAX_VALUE),f.options.inverseTransform&&(x=Number.MAX_VALUE),c.lines.show||c.points.show)for(n=0;nm||-m>g-d||b-p>x||-x>b-p)){var v=Math.abs(h.p2c(g)-t),k=Math.abs(f.p2c(b)-i),y=v*v+k*k;l>y&&(l=y,s=[o,n/a])}}if(c.bars.show&&!s){var w,M;switch(c.bars.align){case"left":w=0;break;case"right":w=-c.bars.barWidth;break;default:w=-c.bars.barWidth/2}for(M=w+c.bars.barWidth,n=0;n=Math.min(T,g)&&p>=b+w&&b+M>=p:d>=g+w&&g+M>=d&&p>=Math.min(T,b)&&p<=Math.max(T,b))&&(s=[o,n/a])}}}return s?(o=s[0],n=s[1],a=ot[o].datapoints.pointsize,{datapoint:ot[o].datapoints.points.slice(n*a,(n+1)*a),dataIndex:n,series:ot[o],seriesIndex:o}):null}function X(t){nt.grid.hoverable&&Q("plothover",t,function(t){return 0!=t.hoverable})}function Y(t){nt.grid.hoverable&&Q("plothover",t,function(t){return!1})}function q(t){Q("plotclick",t,function(t){return 0!=t.clickable})}function Q(t,i,o){var n=lt.offset(),a=i.pageX-n.left-ut.left,r=i.pageY-n.top-ut.top,l=p({left:a,top:r});l.pageX=i.pageX,l.pageY=i.pageY;var s=V(a,r,o);if(s&&(s.pageX=parseInt(s.series.xaxis.p2c(s.datapoint[0])+n.left+ut.left,10),s.pageY=parseInt(s.series.yaxis.p2c(s.datapoint[1])+n.top+ut.top,10)),nt.grid.autoHighlight){for(var c=0;ca.max||nr.max)){var s=i.points.radius+i.points.lineWidth/2;ct.lineWidth=s,ct.strokeStyle=l;var c=1.5*s;o=a.p2c(o),n=r.p2c(n),ct.beginPath(),"circle"==i.points.symbol?ct.arc(o,n,c,0,2*Math.PI,!1):i.points.symbol(ct,o,n,c,!1),ct.closePath(),ct.stroke()}}function it(i,e){var o,n="string"==typeof i.highlightColor?i.highlightColor:t.color.parse(i.color).scale("a",.5).toString(),a=n;switch(i.bars.align){case"left":o=0;break;case"right":o=-i.bars.barWidth;break;default:o=-i.bars.barWidth/2}ct.lineWidth=i.bars.lineWidth,ct.strokeStyle=n,E(e[0],e[1],e[2]||0,o,o+i.bars.barWidth,function(){return a},i.xaxis,i.yaxis,ct,i.bars.horizontal,i.bars.lineWidth)}function et(i,e,o,n){if("string"==typeof i)return i;for(var a=st.createLinearGradient(0,o,0,e),r=0,l=i.colors.length;l>r;++r){var s=i.colors[r];if("string"!=typeof s){var c=t.color.parse(n);null!=s.brightness&&(c=c.scale("rgb",s.brightness)),null!=s.opacity&&(c.a*=s.opacity),s=c.toString()}a.addColorStop(r/(l-1),s)}return a}var ot=[],nt={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:!0,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:.85,sorted:null},xaxis:{show:null,position:"bottom",mode:null,font:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null},yaxis:{autoscaleMargin:.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:!1,radius:3,lineWidth:2,fill:!0,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:!1,fillColor:null,steps:!1},bars:{show:!1,lineWidth:2,barWidth:1,fill:!0, +fillColor:null,align:"left",horizontal:!1,zero:!0},shadowSize:3,highlightColor:null},grid:{show:!0,aboveData:!1,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,margin:0,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:!1,hoverable:!1,autoHighlight:!0,mouseActiveRadius:10},interaction:{redrawOverlayInterval:1e3/60},hooks:{}},at=null,rt=null,lt=null,st=null,ct=null,ht=[],ft=[],ut={left:0,right:0,top:0,bottom:0},dt=0,pt=0,mt={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],drawBackground:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},xt=this;xt.setData=h,xt.setupGrid=W,xt.draw=P,xt.getPlaceholder=function(){return e},xt.getCanvas=function(){return at.element},xt.getPlotOffset=function(){return ut},xt.width=function(){return dt},xt.height=function(){return pt},xt.offset=function(){var t=lt.offset();return t.left+=ut.left,t.top+=ut.top,t},xt.getData=function(){return ot},xt.getAxes=function(){var i={};return t.each(ht.concat(ft),function(t,e){e&&(i[e.direction+(1!=e.n?e.n:"")+"axis"]=e)}),i},xt.getXAxes=function(){return ht},xt.getYAxes=function(){return ft},xt.c2p=p,xt.p2c=m,xt.getOptions=function(){return nt},xt.highlight=$,xt.unhighlight=K,xt.triggerRedrawOverlay=U,xt.pointOffset=function(t){return{left:parseInt(ht[u(t,"x")-1].p2c(+t.x)+ut.left,10),top:parseInt(ft[u(t,"y")-1].p2c(+t.y)+ut.top,10)}},xt.shutdown=y,xt.destroy=function(){y(),e.removeData("plot").empty(),ot=[],nt=null,at=null,rt=null,lt=null,st=null,ct=null,ht=[],ft=[],mt=null,gt=[],xt=null},xt.resize=function(){var t=e.width(),i=e.height();at.resize(t,i),rt.resize(t,i)},xt.hooks=mt,s(xt),c(a),v(),h(n),W(),P(),k();var gt=[],bt=null}function o(t,i){return i*Math.floor(t/i)}var n=Object.prototype.hasOwnProperty;t.fn.detach||(t.fn.detach=function(){return this.each(function(){this.parentNode&&this.parentNode.removeChild(this)})}),i.prototype.resize=function(t,i){if(0>=t||0>=i)throw new Error("Invalid dimensions for plot, width = "+t+", height = "+i);var e=this.element,o=this.context,n=this.pixelRatio;this.width!=t&&(e.width=t*n,e.style.width=t+"px",this.width=t),this.height!=i&&(e.height=i*n,e.style.height=i+"px",this.height=i),o.restore(),o.save(),o.scale(n,n)},i.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},i.prototype.render=function(){var t=this._textCache;for(var i in t)if(n.call(t,i)){var e=this.getTextLayer(i),o=t[i];e.hide();for(var a in o)if(n.call(o,a)){var r=o[a];for(var l in r)if(n.call(r,l)){for(var s,c=r[l].positions,h=0;s=c[h];h++)s.active?s.rendered||(e.append(s.element),s.rendered=!0):(c.splice(h--,1),s.rendered&&s.element.detach());0==c.length&&delete r[l]}}e.show()}},i.prototype.getTextLayer=function(i){var e=this.text[i];return null==e&&(null==this.textContainer&&(this.textContainer=t("
").css({position:"absolute",top:0,left:0,bottom:0,right:0,"font-size":"smaller",color:"#545454"}).insertAfter(this.element)),e=this.text[i]=t("
").addClass(i).css({position:"absolute",top:0,left:0,bottom:0,right:0}).appendTo(this.textContainer)),e},i.prototype.getTextInfo=function(i,e,o,n,a){var r,l,s,c;if(e=""+e,r="object"==typeof o?o.style+" "+o.variant+" "+o.weight+" "+o.size+"px/"+o.lineHeight+"px "+o.family:o,l=this._textCache[i],null==l&&(l=this._textCache[i]={}),s=l[r],null==s&&(s=l[r]={}),c=s[e],null==c){var h=t("
").html(e).css({position:"absolute","max-width":a,top:-9999}).appendTo(this.getTextLayer(i));"object"==typeof o?h.css({font:r,color:o.color}):"string"==typeof o&&h.addClass(o),c=s[e]={width:h.outerWidth(!0),height:h.outerHeight(!0),element:h,positions:[]},h.detach()}return c},i.prototype.addText=function(t,i,e,o,n,a,r,l,s){var c=this.getTextInfo(t,o,n,a,r),h=c.positions;"center"==l?i-=c.width/2:"right"==l&&(i-=c.width),"middle"==s?e-=c.height/2:"bottom"==s&&(e-=c.height);for(var f,u=0;f=h[u];u++)if(f.x==i&&f.y==e)return void(f.active=!0);f={active:!0,rendered:!1,element:h.length?c.element.clone():c.element,x:i,y:e},h.push(f),f.element.css({top:Math.round(e),left:Math.round(i),"text-align":l})},i.prototype.removeText=function(t,i,e,o,a,r){if(null==o){var l=this._textCache[t];if(null!=l)for(var s in l)if(n.call(l,s)){var c=l[s];for(var h in c)if(n.call(c,h))for(var f,u=c[h].positions,d=0;f=u[d];d++)f.active=!1}}else for(var f,u=this.getTextInfo(t,o,a,r).positions,d=0;f=u[d];d++)f.x==i&&f.y==e&&(f.active=!1)},t.plot=function(i,o,n){var a=new e(t(i),o,n,t.plot.plugins);return a},t.plot.version="0.8.3",t.plot.plugins=[],t.fn.plot=function(i,e){return this.each(function(){t.plot(this,i,e)})}}(jQuery); !function(s){function n(s){function n(s,n){for(var t=null,i=0;i2&&(b?i.format[2].x:i.format[2].y),y=z&&t.lines.steps,D=!0,j=b?1:0,w=b?0:1,x=0,Q=0;;){if(x>=g.length)break;if(p=m.length,null==g[x]){for(h=0;c>h;++h)m.push(g[x+h]);x+=c}else if(Q>=v.length){if(!z)for(h=0;c>h;++h)m.push(g[x+h]);x+=c}else if(null==v[Q]){for(h=0;c>h;++h)m.push(null);D=!0,Q+=k}else{if(o=g[x+j],e=g[x+w],u=v[Q+j],a=v[Q+w],r=0,o==u){for(h=0;c>h;++h)m.push(g[x+h]);m[p+w]+=a,r=a,x+=c,Q+=k}else if(o>u){if(z&&x>0&&null!=g[x-c]){for(f=e+(g[x-c+w]-e)*(u-o)/(g[x-c+j]-o),m.push(u),m.push(f+a),h=2;c>h;++h)m.push(g[x+h]);r=a}Q+=k}else{if(D&&z){x+=c;continue}for(h=0;c>h;++h)m.push(g[x+h]);z&&Q>0&&null!=v[Q-k]&&(r=a+(v[Q-k+w]-a)*(o-u)/(v[Q-k+j]-u)),m[p+w]+=r,x+=c}D=!1,p!=m.length&&d&&(m[p+2]+=r)}if(y&&p!=m.length&&p>0&&null!=m[p]&&m[p]!=m[p-c]&&m[p+1]!=m[p-c+1]){for(h=0;c>h;++h)m[p+c+h]=m[p+h];m[p+1]=m[p-c+1]}}i.points=m}}}s.hooks.processDatapoints.push(t)}var t={series:{stack:null}};s.plot.plugins.push({init:n,options:t,name:"stack",version:"1.2"})}(jQuery); !function(e){function i(i){function r(i,s,t){y||(y=!0,b=i.getCanvas(),w=e(b).parent(),k=i.getOptions(),i.setData(a(i.getData())))}function a(i){for(var s=0,t=0,r=0,a=k.series.pie.combine.color,l=[],n=0;nr||o/s>k.series.pie.combine.threshold)&&l.push(e.extend(i[n],{data:[[1,o]],color:i[n].color,label:i[n].label,angle:o*Math.PI*2/s,percent:o/(s/100)}))}return r>1&&l.push({data:[[1,t]],color:a,label:k.series.pie.combine.label,angle:t*Math.PI*2/s,percent:t/(s/100)}),l}function l(i,r){function a(){m.clearRect(0,0,p,h),w.children().filter(".pieLabel, .pieLabelBackground").remove()}function l(){var e=k.series.pie.shadow.left,i=k.series.pie.shadow.top,s=10,t=k.series.pie.shadow.alpha,r=k.series.pie.radius>1?k.series.pie.radius:M*k.series.pie.radius;if(!(r>=p/2-e||r*k.series.pie.tilt>=h/2-i||s>=r)){m.save(),m.translate(e,i),m.globalAlpha=t,m.fillStyle="#000",m.translate(P,A),m.scale(1,k.series.pie.tilt);for(var a=1;s>=a;a++)m.beginPath(),m.arc(0,0,r,0,2*Math.PI,!1),m.fill(),r-=a;m.restore()}}function o(){function i(e,i,s){0>=e||isNaN(e)||(s?m.fillStyle=i:(m.strokeStyle=i,m.lineJoin="round"),m.beginPath(),Math.abs(e-2*Math.PI)>1e-9&&m.moveTo(0,0),m.arc(0,0,r,a,a+e/2,!1),m.arc(0,0,r,a+e/2,a+e,!1),m.closePath(),a+=e,s?m.fill():m.stroke())}function s(){function i(i,s,t){if(0==i.data[0][1])return!0;var a,l=k.legend.labelFormatter,n=k.series.pie.label.formatter;a=l?l(i.label,i):i.label,n&&(a=n(a,i));var o=(s+i.angle+s)/2,g=P+Math.round(Math.cos(o)*r),c=A+Math.round(Math.sin(o)*r)*k.series.pie.tilt,u=""+a+"";w.append(u);var d=w.children("#pieLabel"+t),f=c-d.height()/2,v=g-d.width()/2;if(d.css("top",f),d.css("left",v),0-f>0||0-v>0||h-(f+d.height())<0||p-(v+d.width())<0)return!1;if(0!=k.series.pie.label.background.opacity){var b=k.series.pie.label.background.color;null==b&&(b=i.color);var M="top:"+f+"px;left:"+v+"px;";e("
").css("opacity",k.series.pie.label.background.opacity).insertBefore(d)}return!0}for(var s=t,r=k.series.pie.label.radius>1?k.series.pie.label.radius:M*k.series.pie.label.radius,a=0;a=100*k.series.pie.label.threshold&&!i(c[a],s,a))return!1;s+=c[a].angle}return!0}var t=Math.PI*k.series.pie.startAngle,r=k.series.pie.radius>1?k.series.pie.radius:M*k.series.pie.radius;m.save(),m.translate(P,A),m.scale(1,k.series.pie.tilt),m.save();for(var a=t,l=0;l0){m.save(),m.lineWidth=k.series.pie.stroke.width,a=t;for(var l=0;lP?P=M:P>p-M&&(P=p-M)):P+=k.series.pie.offset.left;var c=i.getData(),u=0;do u>0&&(M*=t),u+=1,a(),k.series.pie.tilt<=.8&&l();while(!o()&&s>u);u>=s&&(a(),w.prepend("
Could not draw pie with labels contained inside canvas
")),i.setSeries&&i.insertLegend&&(i.setSeries(c),i.insertLegend())}}function n(e){if(k.series.pie.innerRadius>0){e.save();var i=k.series.pie.innerRadius>1?k.series.pie.innerRadius:M*k.series.pie.innerRadius;e.globalCompositeOperation="destination-out",e.beginPath(),e.fillStyle=k.series.pie.stroke.color,e.arc(0,0,i,0,2*Math.PI,!1),e.fill(),e.closePath(),e.restore(),e.save(),e.beginPath(),e.strokeStyle=k.series.pie.stroke.color,e.arc(0,0,i,0,2*Math.PI,!1),e.stroke(),e.closePath(),e.restore()}}function o(e,i){for(var s=!1,t=-1,r=e.length,a=r-1;++t1?l.series.pie.radius:M*l.series.pie.radius,p=0;p1e-9&&i.moveTo(0,0),i.arc(0,0,r,e.startAngle,e.startAngle+e.angle/2,!1),i.arc(0,0,r,e.startAngle+e.angle/2,e.startAngle+e.angle,!1),i.closePath(),i.fill())}var t=e.getOptions(),r=t.series.pie.radius>1?t.series.pie.radius:M*t.series.pie.radius;i.save(),i.translate(P,A),i.scale(1,t.series.pie.tilt);for(var a=0;a1?i.series.pie.tilt=1:i.series.pie.tilt<0&&(i.series.pie.tilt=0))}),i.hooks.bindEvents.push(function(e,i){var s=e.getOptions();s.series.pie.show&&(s.grid.hoverable&&i.unbind("mousemove").mousemove(h),s.grid.clickable&&i.unbind("click").click(g))}),i.hooks.processDatapoints.push(function(e,i,s,t){var a=e.getOptions();a.series.pie.show&&r(e,i,s,t)}),i.hooks.drawOverlay.push(function(e,i){var s=e.getOptions();s.series.pie.show&&v(e,i)}),i.hooks.draw.push(function(e,i){var s=e.getOptions();s.series.pie.show&&l(e,i)})}var s=10,t=.95,r={series:{pie:{show:!1,radius:"auto",innerRadius:0,startAngle:1.5,tilt:1,shadow:{left:5,top:15,alpha:.02},offset:{top:0,left:"auto"},stroke:{color:"#fff",width:1},label:{show:"auto",formatter:function(e,i){return"
"+e+"
"+Math.round(i.percent)+"%
"},radius:1,background:{color:null,opacity:0},threshold:0},combine:{threshold:-1,color:null,label:"Other"},highlight:{opacity:.5}}}};e.plot.plugins.push({init:i,options:r,name:"pie",version:"1.1"})}(jQuery); !function(e,t,n){"$:nomunge";function i(n){u===!0&&(u=n||1);for(var s=r.length-1;s>=0;s--){var c=e(r[s]);if(c[0]==t||c.is(":visible")){var d=c.width(),f=c.height(),g=c.data(m);!g||d===g.w&&f===g.h||(c.trigger(h,[g.w=d,g.h=f]),u=n||!0)}else g=c.data(m),g.w=0,g.h=0}null!==a&&(u&&(null==n||1e3>n-u)?a=t.requestAnimationFrame(i):(a=setTimeout(i,o[l]),u=!1))}var a,r=[],o=e.resize=e.extend(e.resize,{}),u=!1,s="setTimeout",h="resize",m=h+"-special-event",l="pendingDelay",c="activeDelay",d="throttleWindow";o[l]=200,o[c]=20,o[d]=!0,e.event.special[h]={setup:function(){if(!o[d]&&this[s])return!1;var t=e(this);r.push(this),t.data(m,{w:t.width(),h:t.height()}),1===r.length&&(a=n,i())},teardown:function(){if(!o[d]&&this[s])return!1;for(var t=e(this),n=r.length-1;n>=0;n--)if(r[n]==this){r.splice(n,1);break}t.removeData(m),r.length||(u?cancelAnimationFrame(a):clearTimeout(a),a=null)},add:function(t){function i(t,i,r){var o=e(this),u=o.data(m)||{};u.w=i!==n?i:o.width(),u.h=r!==n?r:o.height(),a.apply(this,arguments)}if(!o[d]&&this[s])return!1;var a;return e.isFunction(t)?(a=t,i):(a=t.handler,void(t.handler=i))}},t.requestAnimationFrame||(t.requestAnimationFrame=function(){return t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e,n){return t.setTimeout(function(){e((new Date).getTime())},o[c])}}()),t.cancelAnimationFrame||(t.cancelAnimationFrame=function(){return t.webkitCancelRequestAnimationFrame||t.mozCancelRequestAnimationFrame||t.oCancelRequestAnimationFrame||t.msCancelRequestAnimationFrame||clearTimeout}())}(jQuery,this),function(e){function t(e){function t(){var t=e.getPlaceholder();0!=t.width()&&0!=t.height()&&(e.resize(),e.setupGrid(),e.draw())}function n(e,n){e.getPlaceholder().resize(t)}function i(e,n){e.getPlaceholder().unbind("resize",t)}e.hooks.bindEvents.push(n),e.hooks.shutdown.push(i)}var n={};e.plot.plugins.push({init:t,options:n,name:"resize",version:"1.0"})}(jQuery); -!function(e){function t(e,t){return t*Math.floor(e/t)}function n(e,t,n,r){if("function"==typeof e.strftime)return e.strftime(t);var a=function(e,t){return e=""+e,t=""+(null==t?"0":t),1==e.length?t+e:e},i=[],o=!1,s=e.getHours(),u=12>s;null==n&&(n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),null==r&&(r=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]);var m;m=s>12?s-12:0==s?12:s;for(var c=0;c=o);++l);var h=u[l][0],f=u[l][1];if("year"==f){if(null!=i.minTickSize&&"year"==i.minTickSize[1])h=Math.floor(i.minTickSize[0]);else{var k=Math.pow(10,Math.floor(Math.log(e.delta/s.year)/Math.LN10)),d=e.delta/s.year/k;h=1.5>d?1:3>d?2:7.5>d?5:10,h*=k}1>h&&(h=1)}e.tickSize=i.tickSize||[h,f];var g=e.tickSize[0];f=e.tickSize[1];var M=g*s[f];"second"==f?r.setSeconds(t(r.getSeconds(),g)):"minute"==f?r.setMinutes(t(r.getMinutes(),g)):"hour"==f?r.setHours(t(r.getHours(),g)):"month"==f?r.setMonth(t(r.getMonth(),g)):"quarter"==f?r.setMonth(3*t(r.getMonth()/3,g)):"year"==f&&r.setFullYear(t(r.getFullYear(),g)),r.setMilliseconds(0),M>=s.minute&&r.setSeconds(0),M>=s.hour&&r.setMinutes(0),M>=s.day&&r.setHours(0),M>=4*s.day&&r.setDate(1),M>=2*s.month&&r.setMonth(t(r.getMonth(),3)),M>=2*s.quarter&&r.setMonth(t(r.getMonth(),6)),M>=s.year&&r.setMonth(0);var y,S=0,z=Number.NaN;do if(y=z,z=r.getTime(),n.push(z),"month"==f||"quarter"==f)if(1>g){r.setDate(1);var p=r.getTime();r.setMonth(r.getMonth()+("quarter"==f?3:1));var v=r.getTime();r.setTime(z+S*s.hour+(v-p)*g),S=r.getHours(),r.setHours(0)}else r.setMonth(r.getMonth()+g*("quarter"==f?3:1));else"year"==f?r.setFullYear(r.getFullYear()+g):r.setTime(z+M);while(z=1?"rgb("+[a.r,a.g,a.b].join(",")+")":"rgba("+[a.r,a.g,a.b,a.a].join(",")+")"},a.normalize=function(){function t(t,i,e){return t>i?t:i>e?e:i}return a.r=t(0,parseInt(a.r),255),a.g=t(0,parseInt(a.g),255),a.b=t(0,parseInt(a.b),255),a.a=t(0,a.a,1),a},a.clone=function(){return t.color.make(a.r,a.b,a.g,a.a)},a.normalize()},t.color.extract=function(i,e){var o;do{if(o=i.css(e).toLowerCase(),""!=o&&"transparent"!=o)break;i=i.parent()}while(i.length&&!t.nodeName(i.get(0),"body"));return"rgba(0, 0, 0, 0)"==o&&(o="transparent"),t.color.parse(o)},t.color.parse=function(e){var o,n=t.color.make;if(o=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(e))return n(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10));if(o=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(e))return n(parseInt(o[1],10),parseInt(o[2],10),parseInt(o[3],10),parseFloat(o[4]));if(o=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(e))return n(2.55*parseFloat(o[1]),2.55*parseFloat(o[2]),2.55*parseFloat(o[3]));if(o=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(e))return n(2.55*parseFloat(o[1]),2.55*parseFloat(o[2]),2.55*parseFloat(o[3]),parseFloat(o[4]));if(o=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(e))return n(parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16));if(o=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(e))return n(parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16));var a=t.trim(e).toLowerCase();return"transparent"==a?n(255,255,255,0):(o=i[a]||[0,0,0],n(o[0],o[1],o[2]))};var i={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}}(jQuery),function(t){function i(i,e){var o=e.children("."+i)[0];if(null==o&&(o=document.createElement("canvas"),o.className=i,t(o).css({direction:"ltr",position:"absolute",left:0,top:0}).appendTo(e),!o.getContext)){if(!window.G_vmlCanvasManager)throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");o=window.G_vmlCanvasManager.initElement(o)}this.element=o;var n=this.context=o.getContext("2d"),a=window.devicePixelRatio||1,r=n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1;this.pixelRatio=a/r,this.resize(e.width(),e.height()),this.textContainer=null,this.text={},this._textCache={}}function e(e,n,a,r){function l(t,i){i=[xt].concat(i);for(var e=0;eo;++o)n=nt.xaxes[o],n&&!n.tickColor&&(n.tickColor=n.color),n=t.extend(!0,{},nt.xaxis,n),nt.xaxes[o]=n,n.font&&(n.font=t.extend({},c,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(a=nt.yaxes.length||1,o=0;a>o;++o)n=nt.yaxes[o],n&&!n.tickColor&&(n.tickColor=n.color),n=t.extend(!0,{},nt.yaxis,n),nt.yaxes[o]=n,n.font&&(n.font=t.extend({},c,n.font),n.font.color||(n.font.color=n.color),n.font.lineHeight||(n.font.lineHeight=Math.round(1.15*n.font.size)));for(nt.xaxis.noTicks&&null==nt.xaxis.ticks&&(nt.xaxis.ticks=nt.xaxis.noTicks),nt.yaxis.noTicks&&null==nt.yaxis.ticks&&(nt.yaxis.ticks=nt.yaxis.noTicks),nt.x2axis&&(nt.xaxes[1]=t.extend(!0,{},nt.xaxis,nt.x2axis),nt.xaxes[1].position="top",null==nt.x2axis.min&&(nt.xaxes[1].min=null),null==nt.x2axis.max&&(nt.xaxes[1].max=null)),nt.y2axis&&(nt.yaxes[1]=t.extend(!0,{},nt.yaxis,nt.y2axis),nt.yaxes[1].position="right",null==nt.y2axis.min&&(nt.yaxes[1].min=null),null==nt.y2axis.max&&(nt.yaxes[1].max=null)),nt.grid.coloredAreas&&(nt.grid.markings=nt.grid.coloredAreas),nt.grid.coloredAreasColor&&(nt.grid.markingsColor=nt.grid.coloredAreasColor),nt.lines&&t.extend(!0,nt.series.lines,nt.lines),nt.points&&t.extend(!0,nt.series.points,nt.points),nt.bars&&t.extend(!0,nt.series.bars,nt.bars),null!=nt.shadowSize&&(nt.series.shadowSize=nt.shadowSize),null!=nt.highlightColor&&(nt.series.highlightColor=nt.highlightColor),o=0;oo&&(o=n))}o>=e&&(e=o+1);var a,r=[],l=nt.colors,s=l.length,c=0;for(i=0;e>i;i++)a=t.color.parse(l[i%s]||"#666"),i%s==0&&i&&(c=c>=0?.5>c?-c-.2:0:-c),r[i]=a.scale("rgb",1+c);var h,f=0;for(i=0;it.datamax&&e!=b&&(t.datamax=e)}var e,o,n,a,r,s,c,h,f,u,p,m,x=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY,b=Number.MAX_VALUE;for(t.each(d(),function(t,i){i.datamin=x,i.datamax=g,i.used=!1}),e=0;ea;++a)h=u[a],f=m[a],f&&(f.number&&null!=h&&(h=+h,isNaN(h)?h=null:h==1/0?h=b:h==-(1/0)&&(h=-b)),null==h&&(f.required&&(y=!0),null!=f.defaultValue&&(h=f.defaultValue))),s[n+a]=h;if(y)for(a=0;c>a;++a)h=s[n+a],null!=h&&(f=m[a],f.autoscale!==!1&&(f.x&&i(r.xaxis,h,h),f.y&&i(r.yaxis,h,h))),s[n+a]=null;else if(k&&n>0&&null!=s[n-c]&&s[n-c]!=s[n]&&s[n-c+1]!=s[n+1]){for(a=0;c>a;++a)s[n+c+a]=s[n+a];s[n+1]=s[n-c+1],n+=c}}}}for(e=0;ea;++a)h=s[o+a],f=m[a],f&&f.autoscale!==!1&&h!=b&&h!=-b&&(f.x&&(w>h&&(w=h),h>T&&(T=h)),f.y&&(M>h&&(M=h),h>C&&(C=h)));if(r.bars.show){var S;switch(r.bars.align){case"left":S=0;break;case"right":S=-r.bars.barWidth;break;default:S=-r.bars.barWidth/2}r.bars.horizontal?(M+=S,C+=S+r.bars.barWidth):(w+=S,T+=S+r.bars.barWidth)}i(r.xaxis,w,T),i(r.yaxis,M,C)}t.each(d(),function(t,i){i.datamin==x&&(i.datamin=null),i.datamax==g&&(i.datamax=null)})}function v(){e.css("padding",0).children().filter(function(){return!t(this).hasClass("flot-overlay")&&!t(this).hasClass("flot-base")}).remove(),"static"==e.css("position")&&e.css("position","relative"),at=new i("flot-base",e),rt=new i("flot-overlay",e),st=at.context,ct=rt.context,lt=t(rt.element).unbind();var o=e.data("plot");o&&(o.shutdown(),rt.clear()),e.data("plot",xt)}function k(){nt.grid.hoverable&&(lt.mousemove(X),lt.bind("mouseleave",Y)),nt.grid.clickable&<.click(q),l(mt.bindEvents,[lt])}function y(){bt&&clearTimeout(bt),lt.unbind("mousemove",X),lt.unbind("mouseleave",Y),lt.unbind("click",q),l(mt.shutdown,[lt])}function w(t){function i(t){return t}var e,o,n=t.options.transform||i,a=t.options.inverseTransform;"x"==t.direction?(e=t.scale=dt/Math.abs(n(t.max)-n(t.min)),o=Math.min(n(t.max),n(t.min))):(e=t.scale=pt/Math.abs(n(t.max)-n(t.min)),e=-e,o=Math.max(n(t.max),n(t.min))),n==i?t.p2c=function(t){return(t-o)*e}:t.p2c=function(t){return(n(t)-o)*e},a?t.c2p=function(t){return a(o+t/e)}:t.c2p=function(t){return o+t/e}}function M(t){for(var i=t.options,e=t.ticks||[],o=i.labelWidth||0,n=i.labelHeight||0,a=o||("x"==t.direction?Math.floor(at.width/(e.length||1)):null),r=t.direction+"Axis "+t.direction+t.n+"Axis",l="flot-"+t.direction+"-axis flot-"+t.direction+t.n+"-axis "+r,s=i.font||"flot-tick-label tickLabel",c=0;c=0;--i)T(r[i]);S(),t.each(r,function(t,i){C(i)})}dt=at.width-ut.left-ut.right,pt=at.height-ut.bottom-ut.top,t.each(e,function(t,i){w(i)}),o&&O(),_()}function z(t){var i=t.options,e=+(null!=i.min?i.min:t.datamin),o=+(null!=i.max?i.max:t.datamax),n=o-e;if(0==n){var a=0==o?1:.01;null==i.min&&(e-=a),(null==i.max||null!=i.min)&&(o+=a)}else{var r=i.autoscaleMargin;null!=r&&(null==i.min&&(e-=n*r,0>e&&null!=t.datamin&&t.datamin>=0&&(e=0)),null==i.max&&(o+=n*r,o>0&&null!=t.datamax&&t.datamax<=0&&(o=0)))}t.min=e,t.max=o}function I(i){var e,n=i.options;e="number"==typeof n.ticks&&n.ticks>0?n.ticks:.3*Math.sqrt("x"==i.direction?at.width:at.height);var a=(i.max-i.min)/e,r=-Math.floor(Math.log(a)/Math.LN10),l=n.tickDecimals;null!=l&&r>l&&(r=l);var s,c=Math.pow(10,-r),h=a/c;if(1.5>h?s=1:3>h?(s=2,h>2.25&&(null==l||l>=r+1)&&(s=2.5,++r)):s=7.5>h?5:10,s*=c,null!=n.minTickSize&&s0&&(null==n.min&&(i.min=Math.min(i.min,u[0])),null==n.max&&u.length>1&&(i.max=Math.max(i.max,u[u.length-1]))),i.tickGenerator=function(t){var i,e,o=[];for(e=0;e1&&/\..*0$/.test((p[1]-p[0]).toFixed(d))||(i.tickDecimals=d)}}}}function A(i){var e=i.options.ticks,o=[];null==e||"number"==typeof e&&e>0?o=i.tickGenerator(i):e&&(o=t.isFunction(e)?e(i):e);var n,a;for(i.ticks=[],n=0;n1&&(r=l[1])):a=+l,null==r&&(r=i.tickFormatter(a,i)),isNaN(a)||i.ticks.push({v:a,label:r})}}function F(t,i){t.options.autoscaleMargin&&i.length>0&&(null==t.options.min&&(t.min=Math.min(t.min,i[0].v)),null==t.options.max&&i.length>1&&(t.max=Math.max(t.max,i[i.length-1].v)))}function P(){at.clear(),l(mt.drawBackground,[st]);var t=nt.grid;t.show&&t.backgroundColor&&D(),t.show&&!t.aboveData&&L();for(var i=0;in){var s=o;o=n,n=s}return{from:o,to:n,axis:e}}function D(){st.save(),st.translate(ut.left,ut.top),st.fillStyle=et(nt.grid.backgroundColor,pt,0,"rgba(255, 255, 255, 0)"),st.fillRect(0,0,dt,pt),st.restore()}function L(){var i,e,o,n;st.save(),st.translate(ut.left,ut.top);var a=nt.grid.markings;if(a)for(t.isFunction(a)&&(e=xt.getAxes(),e.xmin=e.xaxis.min,e.xmax=e.xaxis.max,e.ymin=e.yaxis.min,e.ymax=e.yaxis.max,a=a(e)),i=0;il.axis.max||s.tos.axis.max)){l.from=Math.max(l.from,l.axis.min),l.to=Math.min(l.to,l.axis.max),s.from=Math.max(s.from,s.axis.min),s.to=Math.min(s.to,s.axis.max);var c=l.from===l.to,h=s.from===s.to;if(!c||!h)if(l.from=Math.floor(l.axis.p2c(l.from)),l.to=Math.floor(l.axis.p2c(l.to)),s.from=Math.floor(s.axis.p2c(s.from)),s.to=Math.floor(s.axis.p2c(s.to)),c||h){var f=r.lineWidth||nt.grid.markingsLineWidth,u=f%2?.5:0;st.beginPath(),st.strokeStyle=r.color||nt.grid.markingsColor,st.lineWidth=f,c?(st.moveTo(l.to+u,s.from),st.lineTo(l.to+u,s.to)):(st.moveTo(l.from,s.to+u),st.lineTo(l.to,s.to+u)),st.stroke()}else st.fillStyle=r.color||nt.grid.markingsColor,st.fillRect(l.from,s.to,l.to-l.from,s.from-s.to)}}e=d(),o=nt.grid.borderWidth;for(var p=0;pv.max||"full"==y&&("object"==typeof o&&o[v.position]>0||o>0)&&(w==v.min||w==v.max)||("x"==v.direction?(m=v.p2c(w),b="full"==y?-pt:y,"top"==v.position&&(b=-b)):(x=v.p2c(w),g="full"==y?-dt:y,"left"==v.position&&(g=-g)),1==st.lineWidth&&("x"==v.direction?m=Math.floor(m)+.5:x=Math.floor(x)+.5),st.moveTo(m,x),st.lineTo(m+g,x+b))}st.stroke()}}o&&(n=nt.grid.borderColor,"object"==typeof o||"object"==typeof n?("object"!=typeof o&&(o={top:o,right:o,bottom:o,left:o}),"object"!=typeof n&&(n={top:n,right:n,bottom:n,left:n}),o.top>0&&(st.strokeStyle=n.top,st.lineWidth=o.top,st.beginPath(),st.moveTo(0-o.left,0-o.top/2),st.lineTo(dt,0-o.top/2),st.stroke()),o.right>0&&(st.strokeStyle=n.right,st.lineWidth=o.right,st.beginPath(),st.moveTo(dt+o.right/2,0-o.top),st.lineTo(dt+o.right/2,pt),st.stroke()),o.bottom>0&&(st.strokeStyle=n.bottom,st.lineWidth=o.bottom,st.beginPath(),st.moveTo(dt+o.right,pt+o.bottom/2),st.lineTo(0,pt+o.bottom/2),st.stroke()),o.left>0&&(st.strokeStyle=n.left,st.lineWidth=o.left,st.beginPath(),st.moveTo(0-o.left/2,pt+o.bottom),st.lineTo(0-o.left/2,0),st.stroke())):(st.lineWidth=o,st.strokeStyle=nt.grid.borderColor,st.strokeRect(-o/2,-o/2,dt+o,pt+o))),st.restore()}function O(){t.each(d(),function(t,i){var e,o,n,a,r,l=i.box,s=i.direction+"Axis "+i.direction+i.n+"Axis",c="flot-"+i.direction+"-axis flot-"+i.direction+i.n+"-axis "+s,h=i.options.font||"flot-tick-label tickLabel";if(at.removeText(c),i.show&&0!=i.ticks.length)for(var f=0;fi.max||("x"==i.direction?(a="center",o=ut.left+i.p2c(e.v),"bottom"==i.position?n=l.top+l.padding:(n=l.top+l.height-l.padding,r="bottom")):(r="middle",n=ut.top+i.p2c(e.v),"left"==i.position?(o=l.left+l.width-l.padding,a="right"):o=l.left+l.padding),at.addText(c,o,n,e.label,h,null,null,a,r))})}function R(t){t.lines.show&&H(t),t.bars.show&&B(t),t.points.show&&j(t)}function H(t){function i(t,i,e,o,n){var a=t.points,r=t.pointsize,l=null,s=null;st.beginPath();for(var c=r;c=f&&f=d&&d=d&&f>n.max){if(d>n.max)continue;h=(n.max-f)/(d-f)*(u-h)+h,f=n.max}else if(d>=f&&d>n.max){if(f>n.max)continue;u=(n.max-f)/(d-f)*(u-h)+h,d=n.max}if(u>=h&&h=u&&u=u&&h>o.max){if(u>o.max)continue;f=(o.max-h)/(u-h)*(d-f)+f,h=o.max}else if(u>=h&&u>o.max){if(h>o.max)continue;d=(o.max-h)/(u-h)*(d-f)+f,u=o.max}(h!=l||f!=s)&&st.moveTo(o.p2c(h)+i,n.p2c(f)+e),l=u,s=d,st.lineTo(o.p2c(u)+i,n.p2c(d)+e)}}st.stroke()}function e(t,i,e){for(var o=t.points,n=t.pointsize,a=Math.min(Math.max(0,e.min),e.max),r=0,l=!1,s=1,c=0,h=0;;){if(n>0&&r>o.length+n)break;r+=n;var f=o[r-n],u=o[r-n+s],d=o[r],p=o[r+s];if(l){if(n>0&&null!=f&&null==d){h=r,n=-n,s=2;continue}if(0>n&&r==c+n){st.fill(),l=!1,n=-n,s=1,r=c=h+n;continue}}if(null!=f&&null!=d){if(d>=f&&f=d&&d=d&&f>i.max){if(d>i.max)continue;u=(i.max-f)/(d-f)*(p-u)+u,f=i.max}else if(d>=f&&d>i.max){if(f>i.max)continue;p=(i.max-f)/(d-f)*(p-u)+u,d=i.max}if(l||(st.beginPath(),st.moveTo(i.p2c(f),e.p2c(a)),l=!0),u>=e.max&&p>=e.max)st.lineTo(i.p2c(f),e.p2c(e.max)),st.lineTo(i.p2c(d),e.p2c(e.max));else if(u<=e.min&&p<=e.min)st.lineTo(i.p2c(f),e.p2c(e.min)),st.lineTo(i.p2c(d),e.p2c(e.min));else{var m=f,x=d;p>=u&&u=e.min?(f=(e.min-u)/(p-u)*(d-f)+f,u=e.min):u>=p&&p=e.min&&(d=(e.min-u)/(p-u)*(d-f)+f,p=e.min),u>=p&&u>e.max&&p<=e.max?(f=(e.max-u)/(p-u)*(d-f)+f,u=e.max):p>=u&&p>e.max&&u<=e.max&&(d=(e.max-u)/(p-u)*(d-f)+f,p=e.max),f!=m&&st.lineTo(i.p2c(m),e.p2c(u)),st.lineTo(i.p2c(f),e.p2c(u)),st.lineTo(i.p2c(d),e.p2c(p)),d!=x&&(st.lineTo(i.p2c(d),e.p2c(p)),st.lineTo(i.p2c(x),e.p2c(p)))}}}}st.save(),st.translate(ut.left,ut.top),st.lineJoin="round";var o=t.lines.lineWidth,n=t.shadowSize;if(o>0&&n>0){st.lineWidth=n,st.strokeStyle="rgba(0,0,0,0.1)";var a=Math.PI/18;i(t.datapoints,Math.sin(a)*(o/2+n/2),Math.cos(a)*(o/2+n/2),t.xaxis,t.yaxis),st.lineWidth=n/2,i(t.datapoints,Math.sin(a)*(o/2+n/4),Math.cos(a)*(o/2+n/4),t.xaxis,t.yaxis)}st.lineWidth=o,st.strokeStyle=t.color;var r=G(t.lines,t.color,0,pt);r&&(st.fillStyle=r,e(t.datapoints,t.xaxis,t.yaxis)),o>0&&i(t.datapoints,0,0,t.xaxis,t.yaxis),st.restore()}function j(t){function i(t,i,e,o,n,a,r,l){for(var s=t.points,c=t.pointsize,h=0;ha.max||ur.max||(st.beginPath(),f=a.p2c(f),u=r.p2c(u)+o,"circle"==l?st.arc(f,u,i,0,n?Math.PI:2*Math.PI,!1):l(st,f,u,i,n),st.closePath(),e&&(st.fillStyle=e,st.fill()),st.stroke())}}st.save(),st.translate(ut.left,ut.top);var e=t.points.lineWidth,o=t.shadowSize,n=t.points.radius,a=t.points.symbol;if(0==e&&(e=1e-4),e>0&&o>0){var r=o/2;st.lineWidth=r,st.strokeStyle="rgba(0,0,0,0.1)",i(t.datapoints,n,null,r+r/2,!0,t.xaxis,t.yaxis,a),st.strokeStyle="rgba(0,0,0,0.2)",i(t.datapoints,n,null,r/2,!0,t.xaxis,t.yaxis,a)}st.lineWidth=e,st.strokeStyle=t.color,i(t.datapoints,n,G(t.points,t.color),0,!1,t.xaxis,t.yaxis,a),st.restore()}function E(t,i,e,o,n,a,r,l,s,c,h){var f,u,d,p,m,x,g,b,v;c?(b=x=g=!0,m=!1,f=e,u=t,p=i+o,d=i+n,f>u&&(v=u,u=f,f=v,m=!0,x=!1)):(m=x=g=!0,b=!1,f=t+o,u=t+n,d=e,p=i,d>p&&(v=p,p=d,d=v,b=!0,g=!1)),ur.max||pl.max||(fr.max&&(u=r.max,x=!1),dl.max&&(p=l.max,g=!1),f=r.p2c(f),d=l.p2c(d),u=r.p2c(u),p=l.p2c(p),a&&(s.fillStyle=a(d,p),s.fillRect(f,p,u-f,d-p)),h>0&&(m||x||g||b)&&(s.beginPath(),s.moveTo(f,d),m?s.lineTo(f,p):s.moveTo(f,p),g?s.lineTo(u,p):s.moveTo(u,p),x?s.lineTo(u,d):s.moveTo(u,d),b?s.lineTo(f,d):s.moveTo(f,d),s.stroke()))}function B(t){function i(i,e,o,n,a,r){for(var l=i.points,s=i.pointsize,c=0;c"),n.push(""),r=!0),n.push('
'+h.label+"")}if(r&&n.push(""),0!=n.length){var f=''+n.join("")+"
";if(null!=nt.legend.container)t(nt.legend.container).html(f);else{var u="",d=nt.legend.position,p=nt.legend.margin;null==p[0]&&(p=[p,p]),"n"==d.charAt(0)?u+="top:"+(p[1]+ut.top)+"px;":"s"==d.charAt(0)&&(u+="bottom:"+(p[1]+ut.bottom)+"px;"),"e"==d.charAt(1)?u+="right:"+(p[0]+ut.right)+"px;":"w"==d.charAt(1)&&(u+="left:"+(p[0]+ut.left)+"px;");var m=t('
'+f.replace('style="','style="position:absolute;'+u+";")+"
").appendTo(e);if(0!=nt.legend.backgroundOpacity){var x=nt.legend.backgroundColor;null==x&&(x=nt.grid.backgroundColor,x=x&&"string"==typeof x?t.color.parse(x):t.color.extract(m,"background-color"),x.a=1,x=x.toString());var g=m.children();t('
').prependTo(m).css("opacity",nt.legend.backgroundOpacity)}}}}}function V(t,i,e){var o,n,a,r=nt.grid.mouseActiveRadius,l=r*r+1,s=null;for(o=ot.length-1;o>=0;--o)if(e(ot[o])){var c=ot[o],h=c.xaxis,f=c.yaxis,u=c.datapoints.points,d=h.c2p(t),p=f.c2p(i),m=r/h.scale,x=r/f.scale;if(a=c.datapoints.pointsize,h.options.inverseTransform&&(m=Number.MAX_VALUE),f.options.inverseTransform&&(x=Number.MAX_VALUE),c.lines.show||c.points.show)for(n=0;nm||-m>g-d||b-p>x||-x>b-p)){var v=Math.abs(h.p2c(g)-t),k=Math.abs(f.p2c(b)-i),y=v*v+k*k;l>y&&(l=y,s=[o,n/a])}}if(c.bars.show&&!s){var w,M;switch(c.bars.align){case"left":w=0;break;case"right":w=-c.bars.barWidth;break;default:w=-c.bars.barWidth/2}for(M=w+c.bars.barWidth,n=0;n=Math.min(T,g)&&p>=b+w&&b+M>=p:d>=g+w&&g+M>=d&&p>=Math.min(T,b)&&p<=Math.max(T,b))&&(s=[o,n/a])}}}return s?(o=s[0],n=s[1],a=ot[o].datapoints.pointsize,{datapoint:ot[o].datapoints.points.slice(n*a,(n+1)*a),dataIndex:n,series:ot[o],seriesIndex:o}):null}function X(t){nt.grid.hoverable&&Q("plothover",t,function(t){return 0!=t.hoverable})}function Y(t){nt.grid.hoverable&&Q("plothover",t,function(t){return!1})}function q(t){Q("plotclick",t,function(t){return 0!=t.clickable})}function Q(t,i,o){var n=lt.offset(),a=i.pageX-n.left-ut.left,r=i.pageY-n.top-ut.top,l=p({left:a,top:r});l.pageX=i.pageX,l.pageY=i.pageY;var s=V(a,r,o);if(s&&(s.pageX=parseInt(s.series.xaxis.p2c(s.datapoint[0])+n.left+ut.left,10),s.pageY=parseInt(s.series.yaxis.p2c(s.datapoint[1])+n.top+ut.top,10)),nt.grid.autoHighlight){for(var c=0;ca.max||nr.max)){var s=i.points.radius+i.points.lineWidth/2;ct.lineWidth=s,ct.strokeStyle=l;var c=1.5*s;o=a.p2c(o),n=r.p2c(n),ct.beginPath(),"circle"==i.points.symbol?ct.arc(o,n,c,0,2*Math.PI,!1):i.points.symbol(ct,o,n,c,!1),ct.closePath(),ct.stroke()}}function it(i,e){var o,n="string"==typeof i.highlightColor?i.highlightColor:t.color.parse(i.color).scale("a",.5).toString(),a=n;switch(i.bars.align){case"left":o=0;break;case"right":o=-i.bars.barWidth;break;default:o=-i.bars.barWidth/2}ct.lineWidth=i.bars.lineWidth,ct.strokeStyle=n,E(e[0],e[1],e[2]||0,o,o+i.bars.barWidth,function(){return a},i.xaxis,i.yaxis,ct,i.bars.horizontal,i.bars.lineWidth)}function et(i,e,o,n){if("string"==typeof i)return i;for(var a=st.createLinearGradient(0,o,0,e),r=0,l=i.colors.length;l>r;++r){var s=i.colors[r];if("string"!=typeof s){var c=t.color.parse(n);null!=s.brightness&&(c=c.scale("rgb",s.brightness)),null!=s.opacity&&(c.a*=s.opacity),s=c.toString()}a.addColorStop(r/(l-1),s)}return a}var ot=[],nt={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:!0,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:.85,sorted:null},xaxis:{show:null,position:"bottom",mode:null,font:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null},yaxis:{autoscaleMargin:.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:!1,radius:3,lineWidth:2,fill:!0,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:!1,fillColor:null,steps:!1},bars:{show:!1,lineWidth:2,barWidth:1,fill:!0, -fillColor:null,align:"left",horizontal:!1,zero:!0},shadowSize:3,highlightColor:null},grid:{show:!0,aboveData:!1,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,margin:0,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:!1,hoverable:!1,autoHighlight:!0,mouseActiveRadius:10},interaction:{redrawOverlayInterval:1e3/60},hooks:{}},at=null,rt=null,lt=null,st=null,ct=null,ht=[],ft=[],ut={left:0,right:0,top:0,bottom:0},dt=0,pt=0,mt={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],drawBackground:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},xt=this;xt.setData=h,xt.setupGrid=W,xt.draw=P,xt.getPlaceholder=function(){return e},xt.getCanvas=function(){return at.element},xt.getPlotOffset=function(){return ut},xt.width=function(){return dt},xt.height=function(){return pt},xt.offset=function(){var t=lt.offset();return t.left+=ut.left,t.top+=ut.top,t},xt.getData=function(){return ot},xt.getAxes=function(){var i={};return t.each(ht.concat(ft),function(t,e){e&&(i[e.direction+(1!=e.n?e.n:"")+"axis"]=e)}),i},xt.getXAxes=function(){return ht},xt.getYAxes=function(){return ft},xt.c2p=p,xt.p2c=m,xt.getOptions=function(){return nt},xt.highlight=$,xt.unhighlight=K,xt.triggerRedrawOverlay=U,xt.pointOffset=function(t){return{left:parseInt(ht[u(t,"x")-1].p2c(+t.x)+ut.left,10),top:parseInt(ft[u(t,"y")-1].p2c(+t.y)+ut.top,10)}},xt.shutdown=y,xt.destroy=function(){y(),e.removeData("plot").empty(),ot=[],nt=null,at=null,rt=null,lt=null,st=null,ct=null,ht=[],ft=[],mt=null,gt=[],xt=null},xt.resize=function(){var t=e.width(),i=e.height();at.resize(t,i),rt.resize(t,i)},xt.hooks=mt,s(xt),c(a),v(),h(n),W(),P(),k();var gt=[],bt=null}function o(t,i){return i*Math.floor(t/i)}var n=Object.prototype.hasOwnProperty;t.fn.detach||(t.fn.detach=function(){return this.each(function(){this.parentNode&&this.parentNode.removeChild(this)})}),i.prototype.resize=function(t,i){if(0>=t||0>=i)throw new Error("Invalid dimensions for plot, width = "+t+", height = "+i);var e=this.element,o=this.context,n=this.pixelRatio;this.width!=t&&(e.width=t*n,e.style.width=t+"px",this.width=t),this.height!=i&&(e.height=i*n,e.style.height=i+"px",this.height=i),o.restore(),o.save(),o.scale(n,n)},i.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},i.prototype.render=function(){var t=this._textCache;for(var i in t)if(n.call(t,i)){var e=this.getTextLayer(i),o=t[i];e.hide();for(var a in o)if(n.call(o,a)){var r=o[a];for(var l in r)if(n.call(r,l)){for(var s,c=r[l].positions,h=0;s=c[h];h++)s.active?s.rendered||(e.append(s.element),s.rendered=!0):(c.splice(h--,1),s.rendered&&s.element.detach());0==c.length&&delete r[l]}}e.show()}},i.prototype.getTextLayer=function(i){var e=this.text[i];return null==e&&(null==this.textContainer&&(this.textContainer=t("
").css({position:"absolute",top:0,left:0,bottom:0,right:0,"font-size":"smaller",color:"#545454"}).insertAfter(this.element)),e=this.text[i]=t("
").addClass(i).css({position:"absolute",top:0,left:0,bottom:0,right:0}).appendTo(this.textContainer)),e},i.prototype.getTextInfo=function(i,e,o,n,a){var r,l,s,c;if(e=""+e,r="object"==typeof o?o.style+" "+o.variant+" "+o.weight+" "+o.size+"px/"+o.lineHeight+"px "+o.family:o,l=this._textCache[i],null==l&&(l=this._textCache[i]={}),s=l[r],null==s&&(s=l[r]={}),c=s[e],null==c){var h=t("
").html(e).css({position:"absolute","max-width":a,top:-9999}).appendTo(this.getTextLayer(i));"object"==typeof o?h.css({font:r,color:o.color}):"string"==typeof o&&h.addClass(o),c=s[e]={width:h.outerWidth(!0),height:h.outerHeight(!0),element:h,positions:[]},h.detach()}return c},i.prototype.addText=function(t,i,e,o,n,a,r,l,s){var c=this.getTextInfo(t,o,n,a,r),h=c.positions;"center"==l?i-=c.width/2:"right"==l&&(i-=c.width),"middle"==s?e-=c.height/2:"bottom"==s&&(e-=c.height);for(var f,u=0;f=h[u];u++)if(f.x==i&&f.y==e)return void(f.active=!0);f={active:!0,rendered:!1,element:h.length?c.element.clone():c.element,x:i,y:e},h.push(f),f.element.css({top:Math.round(e),left:Math.round(i),"text-align":l})},i.prototype.removeText=function(t,i,e,o,a,r){if(null==o){var l=this._textCache[t];if(null!=l)for(var s in l)if(n.call(l,s)){var c=l[s];for(var h in c)if(n.call(c,h))for(var f,u=c[h].positions,d=0;f=u[d];d++)f.active=!1}}else for(var f,u=this.getTextInfo(t,o,a,r).positions,d=0;f=u[d];d++)f.x==i&&f.y==e&&(f.active=!1)},t.plot=function(i,o,n){var a=new e(t(i),o,n,t.plot.plugins);return a},t.plot.version="0.8.3",t.plot.plugins=[],t.fn.plot=function(i,e){return this.each(function(){t.plot(this,i,e)})}}(jQuery); \ No newline at end of file +!function(e){function t(e,t){return t*Math.floor(e/t)}function n(e,t,n,r){if("function"==typeof e.strftime)return e.strftime(t);var a=function(e,t){return e=""+e,t=""+(null==t?"0":t),1==e.length?t+e:e},i=[],o=!1,s=e.getHours(),u=12>s;null==n&&(n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),null==r&&(r=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]);var m;m=s>12?s-12:0==s?12:s;for(var c=0;c=o);++l);var h=u[l][0],f=u[l][1];if("year"==f){if(null!=i.minTickSize&&"year"==i.minTickSize[1])h=Math.floor(i.minTickSize[0]);else{var k=Math.pow(10,Math.floor(Math.log(e.delta/s.year)/Math.LN10)),d=e.delta/s.year/k;h=1.5>d?1:3>d?2:7.5>d?5:10,h*=k}1>h&&(h=1)}e.tickSize=i.tickSize||[h,f];var g=e.tickSize[0];f=e.tickSize[1];var M=g*s[f];"second"==f?r.setSeconds(t(r.getSeconds(),g)):"minute"==f?r.setMinutes(t(r.getMinutes(),g)):"hour"==f?r.setHours(t(r.getHours(),g)):"month"==f?r.setMonth(t(r.getMonth(),g)):"quarter"==f?r.setMonth(3*t(r.getMonth()/3,g)):"year"==f&&r.setFullYear(t(r.getFullYear(),g)),r.setMilliseconds(0),M>=s.minute&&r.setSeconds(0),M>=s.hour&&r.setMinutes(0),M>=s.day&&r.setHours(0),M>=4*s.day&&r.setDate(1),M>=2*s.month&&r.setMonth(t(r.getMonth(),3)),M>=2*s.quarter&&r.setMonth(t(r.getMonth(),6)),M>=s.year&&r.setMonth(0);var y,S=0,z=Number.NaN;do if(y=z,z=r.getTime(),n.push(z),"month"==f||"quarter"==f)if(1>g){r.setDate(1);var p=r.getTime();r.setMonth(r.getMonth()+("quarter"==f?3:1));var v=r.getTime();r.setTime(z+S*s.hour+(v-p)*g),S=r.getHours(),r.setHours(0)}else r.setMonth(r.getMonth()+g*("quarter"==f?3:1));else"year"==f?r.setFullYear(r.getFullYear()+g):r.setTime(z+M);while(ztags->get('jigoshop.admin.dashboard'); foreach ($dashboards as $dashboard) { $class = $di->getServices()->getClassName($dashboard); - if($class::SLUG == $_GET['page']) { + if(isset($_GET['page']) && $class::SLUG == $_GET['page']) { $dashboard = $di->get($dashboard); add_dashboard_page($dashboard->getTitle(), $dashboard->getTitle(), $dashboard->getCapability(), $dashboard->getMenuSlug()); } diff --git a/src/Jigoshop/Core.php b/src/Jigoshop/Core.php index 056db2e1..e1a3b4b3 100755 --- a/src/Jigoshop/Core.php +++ b/src/Jigoshop/Core.php @@ -13,7 +13,7 @@ class Core { - const VERSION = '2.1.6'; + const VERSION = '2.1.6.1'; const WIDGET_CACHE = 'jigoshop_widget_cache'; const TERMS = 'jigoshop_term'; diff --git a/src/Jigoshop/Payment/PayPal.php b/src/Jigoshop/Payment/PayPal.php index 1f38bfb7..fb1ae92c 100755 --- a/src/Jigoshop/Payment/PayPal.php +++ b/src/Jigoshop/Payment/PayPal.php @@ -292,7 +292,7 @@ public function process($order) 'invoice' => $order->getNumber(), 'amount' => number_format($order->getTotal(), $this->options->get('general.currency_decimals'), '.', ''), //BN code - //'bn' => 'Jigoshop_SP' + 'bn' => 'JigoLtd_SP' ], $phone ); diff --git a/templates/admin/settings/api_users.php b/templates/admin/settings/api_users.php index d9e6c340..0632dd65 100755 --- a/templates/admin/settings/api_users.php +++ b/templates/admin/settings/api_users.php @@ -15,7 +15,7 @@ 'name' => $name, 'login' => $keyData['login'], 'password' => $keyData['password'], - 'permissions' => $keyData['permissions'], + 'permissions' => isset($keyData['permissions'])?$keyData['permissions']:[], 'availablePermissions' => $availablePermissions, 'active' => false ]); ?> diff --git a/vendor/autoload.php b/vendor/autoload.php index 10abe3a5..938c7d60 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer' . '/autoload_real.php'; -return ComposerAutoloaderInit9b2ec68055a1d0baa1bf211932c619d4::getLoader(); +return ComposerAutoloaderInitdb47ed9076a8f6aaab5b8e23d72cb895::getLoader(); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index 2e3dd69f..4bdb605b 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit9b2ec68055a1d0baa1bf211932c619d4 +class ComposerAutoloaderInitdb47ed9076a8f6aaab5b8e23d72cb895 { private static $loader; @@ -19,9 +19,9 @@ public static function getLoader() return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit9b2ec68055a1d0baa1bf211932c619d4', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitdb47ed9076a8f6aaab5b8e23d72cb895', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInit9b2ec68055a1d0baa1bf211932c619d4', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitdb47ed9076a8f6aaab5b8e23d72cb895', 'loadClassLoader')); $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -42,14 +42,14 @@ public static function getLoader() $includeFiles = require __DIR__ . '/autoload_files.php'; foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire9b2ec68055a1d0baa1bf211932c619d4($fileIdentifier, $file); + composerRequiredb47ed9076a8f6aaab5b8e23d72cb895($fileIdentifier, $file); } return $loader; } } -function composerRequire9b2ec68055a1d0baa1bf211932c619d4($fileIdentifier, $file) +function composerRequiredb47ed9076a8f6aaab5b8e23d72cb895($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 94248833..0fa11477 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -512,12 +512,12 @@ "source": { "type": "git", "url": "https://github.com/spatie/array-to-xml.git", - "reference": "ceff2641c6f700926bee759647811877f626e994" + "reference": "abea6694036ab2d818ceb5c80485a24833a0f9cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/ceff2641c6f700926bee759647811877f626e994", - "reference": "ceff2641c6f700926bee759647811877f626e994", + "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/abea6694036ab2d818ceb5c80485a24833a0f9cc", + "reference": "abea6694036ab2d818ceb5c80485a24833a0f9cc", "shasum": "" }, "require": { @@ -525,10 +525,10 @@ }, "require-dev": { "mockery/mockery": "0.9.*", - "phpunit/phpunit": "^5.7", - "spatie/phpunit-snapshot-assertions": "^0.4.1" + "phpunit/phpunit": "^6.3", + "spatie/phpunit-snapshot-assertions": "^1.0" }, - "time": "2017-08-03 09:23:45", + "time": "2017-09-07 17:44:43", "type": "library", "installation-source": "source", "autoload": { @@ -744,12 +744,12 @@ "source": { "type": "git", "url": "https://github.com/silexphp/Pimple.git", - "reference": "b734609e7928349247a1217c5461c8d41e898d2c" + "reference": "b5e5c1809fc323428715aa6a66ddca180e0adc0f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/b734609e7928349247a1217c5461c8d41e898d2c", - "reference": "b734609e7928349247a1217c5461c8d41e898d2c", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/b5e5c1809fc323428715aa6a66ddca180e0adc0f", + "reference": "b5e5c1809fc323428715aa6a66ddca180e0adc0f", "shasum": "" }, "require": { @@ -759,7 +759,7 @@ "require-dev": { "symfony/phpunit-bridge": "^3.2" }, - "time": "2017-07-23 07:32:49", + "time": "2017-08-23 11:42:00", "type": "library", "extra": { "branch-alias": { @@ -974,12 +974,12 @@ "source": { "type": "git", "url": "https://github.com/tuupola/slim-basic-auth.git", - "reference": "bf24cc029d21d7dc7277a2fad2adf7fd3c91d9da" + "reference": "c019be31beadd3b0bd2a2c7d4069e205e1883bd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tuupola/slim-basic-auth/zipball/bf24cc029d21d7dc7277a2fad2adf7fd3c91d9da", - "reference": "bf24cc029d21d7dc7277a2fad2adf7fd3c91d9da", + "url": "https://api.github.com/repos/tuupola/slim-basic-auth/zipball/c019be31beadd3b0bd2a2c7d4069e205e1883bd1", + "reference": "c019be31beadd3b0bd2a2c7d4069e205e1883bd1", "shasum": "" }, "require": { @@ -992,7 +992,7 @@ "squizlabs/php_codesniffer": "^2.3", "zendframework/zend-diactoros": "^1.3" }, - "time": "2017-08-20 18:40:25", + "time": "2017-09-19 12:50:35", "type": "library", "installation-source": "source", "autoload": { diff --git a/vendor/pimple/pimple/README.rst b/vendor/pimple/pimple/README.rst index d27d8aa3..a03b6d3a 100644 --- a/vendor/pimple/pimple/README.rst +++ b/vendor/pimple/pimple/README.rst @@ -108,7 +108,7 @@ If you change the ``session_storage`` service definition like below: }; You can now easily change the cookie name by overriding the -``session_storage_class`` parameter instead of redefining the service +``cookie_name`` parameter instead of redefining the service definition. Protecting Parameters diff --git a/vendor/spatie/array-to-xml/CHANGELOG.md b/vendor/spatie/array-to-xml/CHANGELOG.md index 6b31ada6..9e99adce 100755 --- a/vendor/spatie/array-to-xml/CHANGELOG.md +++ b/vendor/spatie/array-to-xml/CHANGELOG.md @@ -2,6 +2,15 @@ All notable changes to `array-to-xml` will be documented in this file +## 2.7.0 - 2017-09-07 +- allow wrapping data in a CDATA section + +## 2.6.1- 2017-08-29 +- add fix for multiple empty/self-closing child elements + +## 2.6.0 - 2017-08-25 +- add support for naming a root element and adding properties to it + ## 2.5.2 - 2017-08-03 - avoid pulling in the snapshot package on install diff --git a/vendor/spatie/array-to-xml/LICENSE.md b/vendor/spatie/array-to-xml/LICENSE.md index da40f367..0b32f5f9 100755 --- a/vendor/spatie/array-to-xml/LICENSE.md +++ b/vendor/spatie/array-to-xml/LICENSE.md @@ -1,6 +1,6 @@ # The MIT License (MIT) -Copyright (c) 2017 Spatie bvba +Copyright (c) Spatie bvba > Permission is hereby granted, free of charge, to any person obtaining a copy > of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/spatie/array-to-xml/README.md b/vendor/spatie/array-to-xml/README.md index da530e82..1cd00e6c 100755 --- a/vendor/spatie/array-to-xml/README.md +++ b/vendor/spatie/array-to-xml/README.md @@ -105,8 +105,55 @@ This code will result in: ``` +It is also possible to wrap the value of a node into a CDATA section. This allows you to use reserved characters. + +```php +$array = [ + 'Good guy' => [ + 'name' => [ + '_cdata' => '

Luke Skywalker

' + ], + 'weapon' => 'Lightsaber' + ], + 'Bad guy' => [ + 'name' => '

Sauron

', + 'weapon' => 'Evil Eye' + ] +]; + +$result = ArrayToXml::convert($array); +``` + +This code will result in: + +```xml + + + + Luke Skywalker]]> + Lightsaber + + + <h1>Sauron</h1> + Evil Eye + + +``` + If your input contains something that cannot be parsed a `DOMException` will be thrown. +To add attributes to the root element provide an array with an `_attributes` key as the second argument. +The root element name can then be set using the `rootElementName` key. + +```php +$result = ArrayToXml::convert($array, [ + 'rootElementName' => 'helloyouluckpeople', + '_attributes' => [ + 'xmlns' => 'https://github.com/spatie/array-to-xml', + ], +]); +``` + ## Testing ```bash diff --git a/vendor/spatie/array-to-xml/composer.json b/vendor/spatie/array-to-xml/composer.json index e5049e38..a58193b9 100755 --- a/vendor/spatie/array-to-xml/composer.json +++ b/vendor/spatie/array-to-xml/composer.json @@ -20,9 +20,9 @@ "php" : "^7.0" }, "require-dev": { - "phpunit/phpunit" : "^5.7", + "phpunit/phpunit" : "^6.3", "mockery/mockery": "0.9.*", - "spatie/phpunit-snapshot-assertions": "^0.4.1" + "spatie/phpunit-snapshot-assertions": "^1.0" }, "autoload": { "psr-4": { diff --git a/vendor/spatie/array-to-xml/src/ArrayToXml.php b/vendor/spatie/array-to-xml/src/ArrayToXml.php index 8f79e81b..2f3b4a57 100644 --- a/vendor/spatie/array-to-xml/src/ArrayToXml.php +++ b/vendor/spatie/array-to-xml/src/ArrayToXml.php @@ -11,7 +11,7 @@ class ArrayToXml /** * The root DOM Document. * - * @var \DOMDocument + * @var DOMDocument */ protected $document; @@ -26,14 +26,14 @@ class ArrayToXml * Construct a new instance. * * @param string[] $array - * @param string $rootElementName - * @param bool $replaceSpacesByUnderScoresInKeyNames - * @param string $xmlEncoding - * @param string $xmlVersion + * @param string|array $rootElement + * @param bool $replaceSpacesByUnderScoresInKeyNames + * @param string $xmlEncoding + * @param string $xmlVersion * * @throws DOMException */ - public function __construct(array $array, $rootElementName = '', $replaceSpacesByUnderScoresInKeyNames = true, $xmlEncoding = null, $xmlVersion = '1.0') + public function __construct(array $array, $rootElement = '', $replaceSpacesByUnderScoresInKeyNames = true, $xmlEncoding = null, $xmlVersion = '1.0') { $this->document = new DOMDocument($xmlVersion, $xmlEncoding); $this->replaceSpacesByUnderScoresInKeyNames = $replaceSpacesByUnderScoresInKeyNames; @@ -42,7 +42,7 @@ public function __construct(array $array, $rootElementName = '', $replaceSpacesB throw new DOMException('Invalid Character Error'); } - $root = $this->document->createElement($rootElementName == '' ? 'root' : $rootElementName); + $root = $this->createRootElement($rootElement); $this->document->appendChild($root); @@ -53,10 +53,10 @@ public function __construct(array $array, $rootElementName = '', $replaceSpacesB * Convert the given array to an xml string. * * @param string[] $array - * @param string $rootElementName - * @param bool $replaceSpacesByUnderScoresInKeyNames - * @param string $xmlEncoding - * @param string $xmlVersion + * @param string $rootElementName + * @param bool $replaceSpacesByUnderScoresInKeyNames + * @param string $xmlEncoding + * @param string $xmlVersion * * @return string */ @@ -90,7 +90,7 @@ public function toDom() /** * Parse individual element. * - * @param \DOMElement $element + * @param DOMElement $element * @param string|string[] $value */ private function convertElement(DOMElement $element, $value) @@ -109,6 +109,8 @@ private function convertElement(DOMElement $element, $value) $this->addAttributes($element, $data); } elseif ((($key === '_value') || ($key === '@value')) && is_string($data)) { $element->nodeValue = htmlspecialchars($data); + } elseif ((($key === '_cdata') || ($key === '@cdata')) && is_string($data)) { + $element->appendChild($this->document->createCDATASection($data)); } else { $this->addNode($element, $key, $data); } @@ -123,8 +125,8 @@ private function convertElement(DOMElement $element, $value) /** * Add node. * - * @param \DOMElement $element - * @param string $key + * @param DOMElement $element + * @param string $key * @param string|string[] $value */ protected function addNode(DOMElement $element, $key, $value) @@ -141,14 +143,14 @@ protected function addNode(DOMElement $element, $key, $value) /** * Add collection node. * - * @param \DOMElement $element + * @param DOMElement $element * @param string|string[] $value * * @internal param string $key */ protected function addCollectionNode(DOMElement $element, $value) { - if ($element->childNodes->length == 0) { + if ($element->childNodes->length === 0 && $element->attributes->length === 0) { $this->convertElement($element, $value); return; @@ -162,7 +164,7 @@ protected function addCollectionNode(DOMElement $element, $value) /** * Add sequential node. * - * @param \DOMElement $element + * @param DOMElement $element * @param string|string[] $value * * @internal param string $key @@ -203,8 +205,8 @@ protected function isArrayAllKeySequential($value) /** * Add attributes. * - * @param \DOMElement $element - * @param string[] $data + * @param DOMElement $element + * @param string[] $data */ protected function addAttributes($element, $data) { @@ -212,4 +214,33 @@ protected function addAttributes($element, $data) $element->setAttribute($attrKey, $attrVal); } } + + /** + * Create the root element. + * + * @param string|array $rootElement + * @return DOMElement + */ + protected function createRootElement($rootElement) + { + if (is_string($rootElement)) { + $rootElementName = $rootElement ?: 'root'; + + return $this->document->createElement($rootElementName); + } + + $rootElementName = $rootElement['rootElementName'] ?? 'root'; + + $element = $this->document->createElement($rootElementName); + + foreach ($rootElement as $key => $value) { + if ($key !== '_attributes' && $key !== '@attributes') { + continue; + } + + $this->addAttributes($element, $rootElement[$key]); + } + + return $element; + } } diff --git a/vendor/tuupola/slim-basic-auth/CHANGELOG.md b/vendor/tuupola/slim-basic-auth/CHANGELOG.md index 2dbf46f1..d47fccd9 100644 --- a/vendor/tuupola/slim-basic-auth/CHANGELOG.md +++ b/vendor/tuupola/slim-basic-auth/CHANGELOG.md @@ -2,6 +2,25 @@ All notable changes to this project will be documented in this file, in reverse chronological order by release. +## 2.3.0 - 2017-09-19 + +### Added + +- Username is now passed to `error` callback when authentication fails. + +```php +$app->add(new \Slim\Middleware\HttpBasicAuthentication([ + "users" => [ + "root" => "t00r", + "somebody" => "passw0rd" + ], + "error" => function ($request, $response, $arguments) { + var_dump($arguments["user"]); + var_dump($arguments["message"]); + } +])); +``` + ## 2.2.2 - 2017-02-27 This is a security release. diff --git a/vendor/tuupola/slim-basic-auth/src/HttpBasicAuthentication.php b/vendor/tuupola/slim-basic-auth/src/HttpBasicAuthentication.php index ab4d26ff..a7cf12d9 100644 --- a/vendor/tuupola/slim-basic-auth/src/HttpBasicAuthentication.php +++ b/vendor/tuupola/slim-basic-auth/src/HttpBasicAuthentication.php @@ -126,7 +126,8 @@ public function __invoke(RequestInterface $request, ResponseInterface $response, ->withHeader("WWW-Authenticate", sprintf('Basic realm="%s"', $this->options["realm"])); return $this->error($request, $response, [ - "message" => "Authentication failed" + "message" => "Authentication failed", + "user" => $user, ]); } @@ -139,7 +140,8 @@ public function __invoke(RequestInterface $request, ResponseInterface $response, ->withHeader("WWW-Authenticate", sprintf('Basic realm="%s"', $this->options["realm"])); return $this->error($request, $response, [ - "message" => "Callback returned false" + "message" => "Callback returned false", + "user" => $user ]); } } diff --git a/vendor/tuupola/slim-basic-auth/tests/BasicAuthenticationTest.php b/vendor/tuupola/slim-basic-auth/tests/BasicAuthenticationTest.php index 4127a4cc..282475ba 100644 --- a/vendor/tuupola/slim-basic-auth/tests/BasicAuthenticationTest.php +++ b/vendor/tuupola/slim-basic-auth/tests/BasicAuthenticationTest.php @@ -315,7 +315,11 @@ public function testShouldReturn401WithFalseFromCallback() public function testShouldCallErrorHandlerWith401() { - $request = (new Request()) + $request = ServerRequestFactory::fromGlobals( + ["PHP_AUTH_USER" => "root", "PHP_AUTH_PW" => "wrong"] + ); + + $request = $request ->withUri(new Uri("https://example.com/admin/item")) ->withMethod("GET"); @@ -329,7 +333,8 @@ public function testShouldCallErrorHandlerWith401() "user" => "passw0rd" ], "error" => function ($request, $response, $arguments) { - $response->getBody()->write("ERROR: " . $arguments["message"]); + $message = "ERROR: {$arguments["message"]} for {$arguments["user"]}"; + $response->getBody()->write($message); return $response; } ]); @@ -342,7 +347,7 @@ public function testShouldCallErrorHandlerWith401() $response = $auth($request, $response, $next); $this->assertEquals(401, $response->getStatusCode()); - $this->assertEquals("ERROR: Authentication failed", $response->getBody()); + $this->assertEquals("ERROR: Authentication failed for root", (string) $response->getBody()); } public function testErrorHandlerShouldAlterHeaders()