/*! For license information please see 3495.7af81a22f9d135da8cbe.js.LICENSE.txt */ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="73124e5b-fcbd-4f9b-8131-d99a9e78faf6",e._sentryDebugIdIdentifier="sentry-dbid-73124e5b-fcbd-4f9b-8131-d99a9e78faf6")}catch(e){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"6845f9ce010d5a446e5d4a40f17204cb8341a07a"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[3495],{33877:function(e,t,n){"use strict";const r=n(67294).createContext(null);t.Z=r},6890:function(e,t,n){"use strict";n.d(t,{Z:function(){return de}});var r={};n.r(r),n.d(r,{a11yNotify:function(){return te},addFilter:function(){return j},clearFilters:function(){return U},removeFilter:function(){return G},reset:function(){return V},setCurrent:function(){return X},setFilter:function(){return z},setResultsPerPage:function(){return Z},setSearchTerm:function(){return B},setSort:function(){return W},trackAutocompleteClickThrough:function(){return Y},trackAutocompleteSuggestionClickThrough:function(){return ne},trackClickThrough:function(){return $}});var i=n(67294),a=n(87462),o=n(78273),s=n(38776);function l(e){return"/"===e.charAt(0)?e:"/"+e}function c(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function u(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function h(e){var t=e.pathname,n=e.search,r=e.hash,i=t||"/";return n&&"?"!==n&&(i+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(i+="#"===r.charAt(0)?r:"#"+r),i}function d(e,t,n,r){var i;"string"===typeof e?(i=function(e){var t=e||"/",n="",r="",i=t.indexOf("#");-1!==i&&(r=t.substr(i),t=t.substr(0,i));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),i.state=t):(void 0===(i=(0,a.Z)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(i.key=n),r?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=(0,o.Z)(i.pathname,r.pathname)):i.pathname=r.pathname:i.pathname||(i.pathname="/"),i}function p(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,i){if(null!=e){var a="function"===typeof e?e(t,n):e;"string"===typeof a?"function"===typeof r?r(a,i):i(!0):i(!1!==a)}else i(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,i):n.push(i),f({action:r,location:i,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",i=d(e,t,g(),b.location);u.confirmTransitionTo(i,r,n,(function(e){e&&(b.entries[b.index]=i,f({action:r,location:i}))}))},go:_,goBack:function(){_(-1)},goForward:function(){_(1)},canGo:function(e){var t=b.index+e;return t>=0&&t{const r=t[n];return r&&(e[n]=r),e}),{})}(A.parse(e))}stateToUrl(e){return`${function(e){return A.stringify(function({searchTerm:e,current:t,filters:n,resultsPerPage:r,sortDirection:i,sortField:a,sortList:o}){const s={};return t>1&&(s.current=t),e&&(s.q=e),r&&(s.size=r),n&&n.length>0&&(s.filters=n),o&&o.length>0?s.sort=o:a&&(s["sort-field"]=a,s["sort-direction"]=i),s}(e))}(e)}`}getStateFromURL(){return this.routingOptions.urlToState(this.routingOptions.readUrl())}pushStateToURL(e,{replaceUrl:t=!1}={}){const n=this.routingOptions.stateToUrl(e);this.lastPushSearchString=n,this.routingOptions.writeUrl(n,{replaceUrl:t})}onURLStateChange(e){this.unlisten=this.routingOptions.routeChangeHandler((t=>{`?${this.lastPushSearchString}`!==t&&(this.lastPushSearchString="",e(this.routingOptions.urlToState(t)))}).bind(this))}routeChangeHandler(e){return this.history.listen((t=>{e(t.search)}))}tearDown(){this.unlisten()}}class N{constructor(){this.requestSequence=0,this.lastCompleted=0}next(){return++this.requestSequence}isOldRequest(e){return e{e.apply(null,r)}),t)};return r.cancel=()=>{n&&(clearTimeout(n),n=null)},r}class F{constructor(){this.debounceCache={}}runWithDebounce(e,t,n,...r){if(!e)return n(...r);const i=`${t}|${e.toString()}`;let a=this.debounceCache[i];a||(this.debounceCache[i]=M(n,e),a=this.debounceCache[i]),a(...r)}cancelByName(e){Object.entries(this.debounceCache).filter((([t])=>t.startsWith(`${e}|`))).forEach((([e,t])=>t.cancel()))}}F.debounce=(e,t)=>M(t,e);var I=F,H=n(70008);function j(e,t,n="all"){this.debug&&console.log("Search UI: Action","addFilter",...arguments);const{filters:r}=this.state,i=r.find((t=>t.field===e&&t.type===n))||null,a=r.filter((t=>t.field!==e||t.type!==n))||[],o=(null===i||void 0===i?void 0:i.values)||[],s=o.find((e=>(0,H.doFilterValuesMatch)(e,t)))?o:o.concat(t);this._updateSearchResults({current:1,filters:[...a,{field:e,values:s,type:n}]});this.events.emit({type:"FacetFilterSelected",field:e,value:(0,H.serialiseFilter)(s),query:this.state.searchTerm})}function Y(e,t=[]){this.debug&&console.log("Search UI: Action","trackAutocompleteClickThrough",...arguments);const{autocompletedResultsRequestId:n,searchTerm:r,autocompletedResults:i,current:a,resultsPerPage:o,totalResults:s,filters:l}=this.state,c=i.findIndex((t=>t._meta.id===e)),u=i[c],h=this.events;h.autocompleteResultClick({query:r,documentId:e,requestId:n,tags:t,result:u,resultIndex:c}),h.emit({type:"ResultSelected",documentId:e,query:r,position:c,origin:"autocomplete",tags:t,totalResults:s,filters:l,currentPage:a,resultsPerPage:o})}function U(e=[]){this.debug&&console.log("Search UI: Action","clearFilters",...arguments);const{filters:t}=this.state,n=t.filter((t=>{const n=t.field;return e.includes(n)}));this._updateSearchResults({current:1,filters:n})}function G(e,t,n){this.debug&&console.log("Search UI: Action","removeFilter",...arguments);const{filters:r}=this.state;let i=r;i=!t&&n?r.filter((t=>!(t.field===e&&t.type===n))):t?(0,H.removeSingleFilterValue)(r,e,t,n):r.filter((t=>t.field!==e)),this._updateSearchResults({current:1,filters:i});this.events.emit({type:"FacetFilterRemoved",field:e,value:t&&(0,H.serialiseFilter)([t]),query:this.state.searchTerm})}function V(){this.debug&&console.log("Search UI: Action","reset",...arguments),this._setState(this.startingState),this.trackUrlState&&this.URLManager.pushStateToURL(this.state)}function X(e){this.debug&&console.log("Search UI: Action","setCurrent",...arguments),this._updateSearchResults({current:e})}function z(e,t,n="all"){this.debug&&console.log("Search UI: Action","setFilter",...arguments);let{filters:r}=this.state;r=r.filter((t=>t.field!==e||t.type!==n)),this._updateSearchResults({current:1,filters:[...r,{field:e,values:[t],type:n}]});this.events.emit({type:"FacetFilterSelected",field:e,value:t&&(0,H.serialiseFilter)([t]),query:this.state.searchTerm})}function Z(e){this.debug&&console.log("Search UI: Action","setResultsPerPage",...arguments),this._updateSearchResults({current:1,resultsPerPage:e})}function B(e,{autocompleteMinimumCharacters:t=0,autocompleteResults:n=!1,autocompleteSuggestions:r=!1,shouldClearFilters:i=!0,refresh:a=!0,debounce:o=0}={}){this.debug&&console.log("Search UI: Action","setSearchTerm",...arguments),this._setState({searchTerm:e}),a&&this.debounceManager.runWithDebounce(o,"_updateSearchResults",this._updateSearchResults,Object.assign({current:1},i&&{filters:[]})),(n||r)&&e.length>=t&&this.debounceManager.runWithDebounce(o,"_updateAutocomplete",this._updateAutocomplete,e,{autocompleteResults:n,autocompleteSuggestions:r})}function W(e,t){this.debug&&console.log("Search UI: Action","setSort",...arguments);const n={current:1,sortList:null,sortField:null,sortDirection:null};Array.isArray(e)?n.sortList=e:(n.sortField=e,n.sortDirection=t),this._updateSearchResults(n)}function $(e,t=[]){this.debug&&console.log("Search UI: Action","trackClickThrough",...arguments);const{requestId:n,searchTerm:r,results:i,current:a,resultsPerPage:o,totalResults:s,filters:l}=this.state,c=i.findIndex((t=>t._meta.id===e)),u=i[c],h=this.events;this.events.resultClick({query:r,documentId:e,requestId:n,tags:t,result:u,page:a,resultsPerPage:o,resultIndexOnPage:c}),h.emit({type:"ResultSelected",documentId:e,query:r,origin:"results",position:c,tags:t,totalResults:s,filters:l,currentPage:a,resultsPerPage:o})}const q="search-ui-screen-reader-notifications",Q="undefined"!==typeof document,K=()=>{if(!Q)return null;let e=document.getElementById(q);return e||(e=document.createElement("div"),e.id=q,e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.style.position="absolute",e.style.width="1px",e.style.height="1px",e.style.margin="-1px",e.style.padding="0",e.style.border="0",e.style.overflow="hidden",e.style.clip="rect(0 0 0 0)",document.body.appendChild(e),e)},J=e=>{const t=K();t&&(t.textContent=e)},ee={searchResults:({start:e,end:t,totalResults:n,searchTerm:r})=>{let i=`Showing ${e} to ${t} results out of ${n}`;return r&&(i+=`, searching for "${r}".`),i}};function te(e,t){if(!this.hasA11yNotifications)return;const n=this.a11yNotificationMessages[e];if(!n){const t=`Could not find corresponding message function in a11yNotificationMessages: "${e}"`;return void console.warn("Action","a11yNotify",t)}const r=n(t);J(r),this.debug&&console.log("Search UI: Action","a11yNotify",{messageFunc:e,messageArgs:t,message:r})}function ne(e,t,n=[]){this.debug&&console.log("Search UI: Action","trackAutocompleteSuggestionClickThrough",...arguments);const{searchTerm:r}=this.state;this.events.emit({type:"AutocompleteSuggestionSelected",position:t,query:r,tags:n,suggestion:e})}function re(e,t,n){if(n){if(t){const r=t[e].bind(t);return(...e)=>n(...e,r)}return n}return t&&t[e]?t[e].bind(t):()=>{throw`No ${e} handler provided and no Connector provided. You must configure one or the other.`}}var ie=class{constructor({apiConnector:e,onSearch:t,onAutocomplete:n,onResultClick:r,onAutocompleteResultClick:i,plugins:a=[]}={}){this.search=re("onSearch",e,t),this.autocomplete=re("onAutocomplete",e,n),this.resultClick=re("onResultClick",e,r),this.autocompleteResultClick=re("onAutocompleteResultClick",e,i),this.plugins=a}emit(e){this.plugins.forEach((t=>{t.subscribe(e)}))}};var ae=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i(t[r]&&"function"===typeof t[r]&&!t[r]({filters:n})||(e[r]=i),e)),{})}var ce=class{constructor({apiConnector:e,autocompleteQuery:t={},plugins:n=[],debug:i,initialState:a,onSearch:o,onAutocomplete:s,onResultClick:l,onAutocompleteResultClick:c,searchQuery:u={},trackUrlState:h=!0,routingOptions:d={},urlPushDebounceLength:p=500,hasA11yNotifications:f=!1,a11yNotificationMessages:g={},alwaysSearchOnInitialLoad:v=!1}){let y;this.state=se,this._updateAutocomplete=(e,{autocompleteResults:t,autocompleteSuggestions:n}={})=>{const r=this.autocompleteRequestSequencer.next(),i=Object.assign(Object.assign({},t&&{results:this.autocompleteQuery.results||{}}),n&&{suggestions:this.autocompleteQuery.suggestions||{}});return this.events.autocomplete({searchTerm:e},i).then((e=>{this.autocompleteRequestSequencer.isOldRequest(r)||(this.autocompleteRequestSequencer.completed(r),this._setState(e))}))},this._updateSearchResults=(e,{skipPushToUrl:t=!1,replaceUrl:n=!1}={})=>{const{current:r,filters:i,resultsPerPage:a,searchTerm:o,sortDirection:s,sortField:l,sortList:c}=Object.assign(Object.assign({},this.state),e);this.debounceManager.cancelByName("_updateSearchResults"),this._setState({current:r,error:"",filters:i,resultsPerPage:a,searchTerm:o,sortDirection:s,sortField:l,sortList:c}),this._makeSearchRequest({skipPushToUrl:t,replaceUrl:n})},this._makeSearchRequest=I.debounce(0,(({skipPushToUrl:e,replaceUrl:t})=>{const{current:n,filters:r,resultsPerPage:i,searchTerm:a,sortDirection:o,sortField:s,sortList:l}=this.state;this._setState({isLoading:!0});const c=this.searchRequestSequencer.next(),u=this.searchQuery,{conditionalFacets:h}=u,d=ae(u,["conditionalFacets"]),p=Object.assign(Object.assign({},d),{facets:le(this.searchQuery.facets,h,r)}),f=Object.assign(Object.assign({},oe(this.state)),{filters:(0,H.mergeFilters)(r,this.searchQuery.filters)});return this.events.search(f,p).then((u=>{if(this.searchRequestSequencer.isOldRequest(c))return;this.searchRequestSequencer.completed(c);const{totalResults:h}=u;this.events.emit({type:"SearchQuery",filters:this.state.filters,query:this.state.searchTerm,currentPage:f.current,resultsPerPage:f.resultsPerPage,totalResults:h});const d=0===h?0:(n-1)*i+1,p=h{var t;"Invalid credentials"!==e.message?this._setState({error:`An unexpected error occurred: ${e.message}`}):this._setState(Object.assign({},(null===(t=this.apiConnector)||void 0===t?void 0:t.state)&&Object.assign({},this.apiConnector.state)))}))})),this.actions=Object.entries(r).reduce(((e,[t,n])=>Object.assign(Object.assign({},e),{[t]:n.bind(this)})),{}),this.actions=Object.assign(Object.assign({},this.actions),(null===e||void 0===e?void 0:e.actions)&&Object.assign({},e.actions)),Object.assign(this,this.actions),this.events=new ie({apiConnector:e,onSearch:o,onAutocomplete:s,onResultClick:l,onAutocompleteResultClick:c,plugins:n}),this.debug=i,this.debug&&(console.warn("Search UI Debugging is enabled. This should be turned off in production deployments."),"undefined"!==typeof window&&(window.searchUI=this)),this.autocompleteRequestSequencer=new N,this.searchRequestSequencer=new N,this.debounceManager=new I,this.autocompleteQuery=t,this.searchQuery=u,this.subscriptions=[],this.trackUrlState=h,this.urlPushDebounceLength=p,this.alwaysSearchOnInitialLoad=v,this.apiConnector=e,h?(this.URLManager=new D(d),y=this.URLManager.getStateFromURL(),this.URLManager.onURLStateChange((e=>{this._updateSearchResults(Object.assign(Object.assign({},se),e),{skipPushToUrl:!0})}))):y={},this.hasA11yNotifications=f,this.hasA11yNotifications&&K(),this.a11yNotificationMessages=Object.assign(Object.assign({},ee),g),this.startingState=Object.assign(Object.assign({},this.state),a);const m=oe(Object.assign(Object.assign({},this.startingState),y));this.state=Object.assign(Object.assign(Object.assign({},this.state),(null===e||void 0===e?void 0:e.state)&&Object.assign({},e.state)),m),(m.searchTerm||m.filters.length>0||this.alwaysSearchOnInitialLoad)&&this._updateSearchResults(m,{replaceUrl:!0})}_setState(e){const t=Object.assign(Object.assign({},this.state),e);this.debug&&console.log("Search UI: State Update",e,t),this.state=t,this.subscriptions.forEach((e=>e(t)))}setSearchQuery(e){this.searchQuery=e,this._updateSearchResults({})}setAutocompleteQuery(e){this.autocompleteQuery=e}subscribeToStateChanges(e){this.subscriptions.push(e)}unsubscribeToStateChanges(e){this.subscriptions=this.subscriptions.filter((t=>t!==e))}tearDown(){this.subscriptions=[],this.URLManager&&this.URLManager.tearDown(),this.debounceManager.cancelByName("pushStateToURL")}getActions(){return this.actions}getState(){return Object.assign({},this.state)}},ue=n(33877);var he={moreFilters:({visibleOptionsCount:e,showingAll:t})=>{let n=t?"All ":"";return n+=`${e} options shown.`,n}};var de=({children:e,config:t,driver:n})=>{const[r,a]=(0,i.useState)(null);if((0,i.useEffect)((()=>{const e=n||new ce(Object.assign(Object.assign({},t),{a11yNotificationMessages:Object.assign(Object.assign({},he),t.a11yNotificationMessages)}));return a(e),()=>{e.tearDown()}}),[]),(0,i.useEffect)((()=>{r&&r.setSearchQuery(t.searchQuery)}),[t.searchQuery]),(0,i.useEffect)((()=>{r&&r.setAutocompleteQuery(t.autocompleteQuery)}),[t.autocompleteQuery]),!r)return null;const o={driver:r};return i.createElement(ue.Z.Provider,{value:o},e)}},50483:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var r=n(67294),i=n(33877),a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i{this.mounted&&this.setState((n=>o(Object.assign(Object.assign({},n),t),e,this.props)))},this.mounted=!1,this.state=Object.assign({},o(function(e){return Object.assign(Object.assign({},e.driver.getState()),e.driver.getActions())}(n),e,t))}componentDidMount(){this.mounted=!0,this.context.driver.subscribeToStateChanges(this.subscription)}componentWillUnmount(){this.mounted=!1,this.context.driver.unsubscribeToStateChanges(this.subscription)}render(){const e=a(this.props,[]);return r.createElement(t,Object.assign({},this.state,e))}}return n.contextType=i.Z,n}},l=n(45697),c=n.n(l);function u({mapContextToProps:e,children:t}){const n=s(e)((e=>t(e)));return r.createElement(n,null)}u.propTypes={mapContextToProps:c().func,children:c().func.isRequired};var h=u},64787:function(e,t,n){"use strict";n.d(t,{Z:function(){return f}});var r=n(70008);const i=Object.assign({},r);var a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i{if("value"==t.type)return t.sort&&console.warn("search-ui-site-search-connector: Site Search does not support 'sort' on facets"),t.size&&console.warn("search-ui-site-search-connector: Site Search does not support 'size' on facets"),[e,t];console.warn(`search-ui-site-search-connector: Dropping ${e} facet, only value facets are supported in Site Search`)})).filter((e=>e)).map((([e])=>e));return t.length?t:void 0}(t.facets),l=function(e){if(e&&0!==Object.keys(e).length)return e.reduce(((e,t)=>{const n=t.field,r=t.values;if(e[n])return console.warn("search-ui-site-search-connector: More than one filter found for a single field"),e;if(t.type&&"all"!==t.type&&"any"!==t.type)return console.warn(`search-ui-site-search-connector: Unsupported filter type "${t.type}" found, only "all" and "any" are currently supported`),e;if(void 0!==r.find((e=>"object"===typeof e))){if(r.length>1)return console.warn("search-ui-site-search-connector: Cannot apply more than 1 none-value filters to a single field"),e;const t=r[0];if(i.isFilterValueRange(t)){const{name:r}=t,i=a(t,["name"]);return e[n]=Object.assign({type:"range"},i),e}return e}return e[n]=Object.assign(Object.assign({},"any"===t.type?{}:{type:"and"}),{values:r}),e}),{})}(void 0!==t.filters?t.filters:e.filters),c=void 0!==t.current?t.current:e.current,u=void 0!==t.resultsPerPage?t.resultsPerPage:e.resultsPerPage,h=void 0!==t.sortDirection?t.sortDirection:e.sortDirection,d=void 0!==t.sortField?t.sortField:e.sortField,p=void 0!==t.sortList?t.sortList:e.sortList,[f,g]=(v=t.result_fields)?[Object.keys(v),Object.entries(v).reduce(((e,[t,n])=>n.snippet?Object.assign(Object.assign({},e),{[t]:n.snippet}):e),{})]:[];var v;const y=(m=t.search_fields)?Object.keys(m):[];var m;const _=e.searchTerm;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},u&&{per_page:u}),c&&{page:c}),h&&{sort_direction:{[n]:h}}),d&&{sort_field:{[n]:d}}),p&&{sort_list:{[n]:p}}),l&&{filters:{[n]:l}}),s&&{facets:{[n]:s}}),f&&{fetch_fields:{[n]:f}}),g&&{highlight_fields:{[n]:g}}),y&&!!y.length&&{search_fields:{[n]:y}}),{q:_})}var s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);iObject.assign(Object.assign({},e),{[t]:n});function c(e,t){const n=function(e,t){return e[t].map((e=>{const{highlight:t,sort:n}=e,r=s(e,["highlight","sort"]),i=Object.entries(r).filter((([e])=>!e.startsWith("_"))).map((([e,t])=>{return[e,(n=t,{raw:n})];var n})).reduce(l,{});return Object.entries(t).forEach((([e,t])=>{i[e].snippet=t})),i}))}(e.records,t),r=e.info[t].num_pages,i=e.info[t].total_result_count,a=(o=e.info[t]).facets?Object.entries(o.facets).map((([e,t])=>[e,[{field:e,data:Object.entries(t).map((([e,t])=>({value:e,count:t}))),type:"value"}]])).reduce(l,{}):{};var o;return Object.assign({rawResponse:e,results:n,totalPages:r,totalResults:i,requestId:""},Object.keys(a).length>0&&{facets:a})}var u=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(t){a(t)}}function s(e){try{l(r.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};function h(e,t,n,r){return u(this,void 0,void 0,(function*(){const i=new Headers({"Content-Type":"application/json"}),a=yield fetch(`https://search-api.swiftype.com/api/v1/public/${n}`,{method:t,headers:i,body:JSON.stringify(Object.assign({engine_key:e},r)),credentials:"include"});let o;try{o=yield a.json()}catch(s){}if(a.status>=200&&a.status<300)return o;{const e=o&&o.errors&&Object.entries(o.errors).length>0?JSON.stringify(o.errors):a.status;throw new Error(`${e}`)}}))}var d=function(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(t){a(t)}}function s(e){try{l(r.throw(e))}catch(t){a(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))};function p(e,t,n){const r=Object.entries(Object.assign({engine_key:e},n)).map((([e,t])=>`${e}=${encodeURIComponent(t)}`)).join("&");return fetch(`https://search-api.swiftype.com/api/v1/public/${t}?${r}`,{method:"GET",credentials:"include"})}var f=class{constructor({documentType:e,engineKey:t,beforeSearchCall:n=((e,t)=>t(e)),beforeAutocompleteResultsCall:r=((e,t)=>t(e))}){this.documentType=e,this.engineKey=t,this.beforeSearchCall=n,this.beforeAutocompleteResultsCall=r,this.request=h.bind(this,t),this._get=p.bind(this,t)}onResultClick({query:e,documentId:t,tags:n}){n&&n.length>0&&console.warn("search-ui-site-search-connector: Site Search does not support tags on click"),this._get("analytics/pc",{t:(new Date).getTime(),q:e,doc_id:t})}onAutocompleteResultClick({query:e,documentId:t,tags:n}){n&&console.warn("search-ui-site-search-connector: Site Search does not support tags on autocompleteClick"),this._get("analytics/pas",{t:(new Date).getTime(),q:e,doc_id:t})}onSearch(e,t){const n=o(e,t,this.documentType);return this.beforeSearchCall(n,(e=>this.request("POST","engines/search.json",e).then((e=>c(e,this.documentType)))))}onAutocomplete({searchTerm:e},t){return d(this,void 0,void 0,(function*(){if(t.results){const n=o({searchTerm:e},t.results,this.documentType);return this.beforeAutocompleteResultsCall(n,(e=>this.request("POST","engines/suggest.json",e).then((e=>({autocompletedResults:c(e,this.documentType).results})))))}t.suggestions&&console.warn("search-ui-site-search-connector: Site Search does support query suggestions on autocomplete")}))}}},70008:function(e,t,n){"use strict";n.r(t),n.d(t,{doFilterValuesMatch:function(){return c},findFilterValues:function(){return o},isFilterValueRange:function(){return h},markSelectedFacetValuesFromFilters:function(){return l},mergeFilters:function(){return u},removeSingleFilterValue:function(){return s},serialiseFilter:function(){return d}});var r=n(78081),i=n.n(r),a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);ie.field===t&&e.type===n));return r?r.values:[]}function s(e,t,n,r){return e.reduce(((e,i)=>{const{field:o,values:s,type:l}=i,u=a(i,["field","values","type"]);if(o===t&&(!r||l===r)){const t=s.filter((e=>!c(e,n)));return t.length>0?e.concat(Object.assign({field:o,values:t,type:l},u)):e}return e.concat(i)}),[])}function l(e,t,n,r){const i=e.data,a=o(t,n,r)||[];return Object.assign(Object.assign({},e),{data:i.map((e=>Object.assign(Object.assign({},e),{selected:a.some((t=>c(t,e.value)))})))})}function c(e,t){return!!(e&&e.name&&t&&t.name&&e.name===t.name)||i()(e,t,{strict:!0})}function u(e,t){return t?t.reduce(((e,t)=>e.find((e=>e.type===t.type&&e.field===t.field))?e:[...e,t]),e):e}function h(e){return"object"===typeof e&&void 0!==e.name}const d=e=>e.reduce(((e,t)=>(h(t)?e.push(t.name):e.push(t.toString()),e)),[]).join(",")},78081:function(e,t,n){var r=n(82215),i=n(82584),a=n(20609),o=n(98420),s=n(20738),l=n(18923),c=Date.prototype.getTime;function u(e,t,n){var p=n||{};return!!(p.strict?a(e,t):e===t)||(!e||!t||"object"!==typeof e&&"object"!==typeof t?p.strict?a(e,t):e==t:function(e,t,n){var a,p;if(typeof e!==typeof t)return!1;if(h(e)||h(t))return!1;if(e.prototype!==t.prototype)return!1;if(i(e)!==i(t))return!1;var f=o(e),g=o(t);if(f!==g)return!1;if(f||g)return e.source===t.source&&s(e)===s(t);if(l(e)&&l(t))return c.call(e)===c.call(t);var v=d(e),y=d(t);if(v!==y)return!1;if(v||y){if(e.length!==t.length)return!1;for(a=0;a=0;a--)if(m[a]!=_[a])return!1;for(a=m.length-1;a>=0;a--)if(!u(e[p=m[a]],t[p],n))return!1;return!0}(e,t,p))}function h(e){return null===e||void 0===e}function d(e){return!(!e||"object"!==typeof e||"number"!==typeof e.length)&&("function"===typeof e.copy&&"function"===typeof e.slice&&!(e.length>0&&"number"!==typeof e[0]))}e.exports=u},21782:function(e,t,n){"use strict";var r=n(82215),i="function"===typeof Symbol&&"symbol"===typeof Symbol("foo"),a=Object.prototype.toString,o=Array.prototype.concat,s=Object.defineProperty,l=n(31044)(),c=s&&l,u=function(e,t,n,r){if(t in e)if(!0===r){if(e[t]===n)return}else if("function"!==typeof(i=r)||"[object Function]"!==a.call(i)||!r())return;var i;c?s(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n},h=function(e,t){var n=arguments.length>2?arguments[2]:{},a=r(t);i&&(a=o.call(a,Object.getOwnPropertySymbols(t)));for(var s=0;s-1?e.split(","):e},c=function(e,t,n,r){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(a),c=s?a.slice(0,s.index):a,u=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}for(var h=0;n.depth>0&&null!==(s=o.exec(a))&&h=0;--a){var o,s=e[a];if("[]"===s&&n.parseArrays)o=[].concat(i);else{o=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(c,10);n.parseArrays||""!==c?!isNaN(u)&&s!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(o=[])[u]=i:"__proto__"!==c&&(o[c]=i):o={0:i}}i=o}return i}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return o;if(null!==e.decoder&&void 0!==e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?o.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?o.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,allowSparse:"boolean"===typeof e.allowSparse?e.allowSparse:o.allowSparse,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:o.comma,decoder:"function"===typeof e.decoder?e.decoder:o.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:o.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:o.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var u="string"===typeof e?function(e,t){var n,c={__proto__:null},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,h=t.parameterLimit===1/0?void 0:t.parameterLimit,d=u.split(t.delimiter,h),p=-1,f=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(v=a(v)?[v]:v),i.call(c,g)?c[g]=r.combine(c[g],v):c[g]=v}return c}(e,n):e,h=n.plainObjects?Object.create(null):{},d=Object.keys(u),p=0;p0?A.join(",")||null:void 0}];else if(l(d))T=d;else{var R=Object.keys(A);T=g?R.sort(g):R}for(var E=o&&l(A)&&1===A.length?n+"[]":n,D=0;D0?b+x:""}},74872:function(e,t,n){"use strict";var r=n(34474),i=Object.prototype.hasOwnProperty,a=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(a(n)){for(var r=[],i=0;i=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||a===r.RFC1738&&(40===u||41===u)?l+=s.charAt(c):u<128?l+=o[u]:u<2048?l+=o[192|u>>6]+o[128|63&u]:u<55296||u>=57344?l+=o[224|u>>12]+o[128|u>>6&63]+o[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(c)),l+=o[240|u>>18]+o[128|u>>12&63]+o[128|u>>6&63]+o[128|63&u])}return l},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(a(e)){for(var n=[],r=0;r6)switch((0,a.uO)(e,t+1)){case 109:if(45!==(0,a.uO)(e,t+4))break;case 102:return(0,a.gx)(e,/(.+:)(.+)-([^]+)/,"$1"+o.G$+"$2-$3$1"+o.uj+(108==(0,a.uO)(e,t+3)?"$3":"$2-$3"))+e;case 115:return~(0,a.Cw)(e,"stretch")?g((0,a.gx)(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==(0,a.uO)(e,t+1))break;case 6444:switch((0,a.uO)(e,(0,a.to)(e)-3-(~(0,a.Cw)(e,"!important")&&10))){case 107:return(0,a.gx)(e,":",":"+o.G$)+e;case 101:return(0,a.gx)(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+o.G$+(45===(0,a.uO)(e,14)?"inline-":"")+"box$3$1"+o.G$+"$2$3$1"+o.MS+"$2box$3")+e}break;case 5936:switch((0,a.uO)(e,t+11)){case 114:return o.G$+e+o.MS+(0,a.gx)(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return o.G$+e+o.MS+(0,a.gx)(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return o.G$+e+o.MS+(0,a.gx)(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return o.G$+e+o.MS+e+e}return e}var v=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case o.h5:e.return=g(e.value,e.length);break;case o.lK:return(0,s.q)([(0,i.JG)(e,{value:(0,a.gx)(e.value,"@","@"+o.G$)})],r);case o.Fr:if(e.length)return(0,a.$e)(e.props,(function(t){switch((0,a.EQ)(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return(0,s.q)([(0,i.JG)(e,{props:[(0,a.gx)(t,/:(read-\w+)/,":"+o.uj+"$1")]})],r);case"::placeholder":return(0,s.q)([(0,i.JG)(e,{props:[(0,a.gx)(t,/:(plac\w+)/,":"+o.G$+"input-$1")]}),(0,i.JG)(e,{props:[(0,a.gx)(t,/:(plac\w+)/,":"+o.uj+"$1")]}),(0,i.JG)(e,{props:[(0,a.gx)(t,/:(plac\w+)/,o.MS+"input-$1")]})],r)}return""}))}}],y=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var i=e.stylisPlugins||v;var a,o,u={},h=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n=4;++r,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(i){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(i)+l;return{name:c,styles:i,next:v}},_=!!i.useInsertionEffect&&i.useInsertionEffect,x=_||function(e){return e()},b=(_||r.useLayoutEffect,{}.hasOwnProperty),w=r.createContext("undefined"!==typeof HTMLElement?(0,a.Z)({key:"css"}):null);w.Provider;var O=function(e){return(0,r.forwardRef)((function(t,n){var i=(0,r.useContext)(w);return e(t,i,n)}))};var A=r.createContext({});var S="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",C=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return o(t,n,r),x((function(){return function(e,t,n){o(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}(t,n,r)})),null};var k=O((function(e,t,n){var i=e.css;"string"===typeof i&&void 0!==t.registered[i]&&(i=t.registered[i]);var a=e[S],o=[i],s="";"string"===typeof e.className?s=function(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}(t.registered,o,e.className):null!=e.className&&(s=e.className+" ");var l=m(o,void 0,r.useContext(A));s+=t.key+"-"+l.name;var c={};for(var u in e)b.call(e,u)&&"css"!==u&&u!==S&&(c[u]=e[u]);return c.ref=n,c.className=s,r.createElement(r.Fragment,null,r.createElement(C,{cache:t,serialized:l,isStringTag:"string"===typeof a}),r.createElement(a,c))})),P=(n(8679),function(e,t){var n=arguments;if(null==t||!b.call(t,"css"))return r.createElement.apply(void 0,n);var i=n.length,a=new Array(i);a[0]=k,a[1]=function(e,t){var n={};for(var r in t)b.call(t,r)&&(n[r]=t[r]);return n[S]=e,n}(e,t);for(var o=2;op)&&(j=(G=G.replace(" ",":")).length),0r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(v,"$1"+e.trim());case 58:return e.trim()+t.replace(v,"$1"+e.trim());default:if(0<1*n&&0l.charCodeAt(8))break;case 115:o=o.replace(l,"-webkit-"+l)+";"+o;break;case 207:case 102:o=o.replace(l,"-webkit-"+(102r.charCodeAt(0)&&(r=r.trim()),r=[r],0=u/4){for(var v=f;v>=p;v--){var m=y[v],_=Math.log(m/e)/Math.log(t/e)*n,x={v:m};null===g||Math.abs(_-g.pixel_coord)>=h?g={tickValue:m,pixel_coord:_}:x.label="",d.push(x)}d.reverse()}}if(0===d.length){var b,w;i("labelsKMG2")?(b=[1,2,4,8,16,32,64,128,256],w=16):(b=[1,2,5,10,20,50,100],w=10);var O,A,S,C=Math.ceil(n/h),k=Math.abs(t-e)/C,P=Math.floor(Math.log(k)/Math.log(w)),T=Math.pow(w,P);for(l=0;lh));l++);for(A>S&&(O*=-1),s=0;s<=u;s++)c=A+s*O,d.push({v:c})}}var L=i("axisLabelFormatter");for(s=0;s=0?x(e,t,o,r,i):[]},s={MILLISECONDLY:0,TWO_MILLISECONDLY:1,FIVE_MILLISECONDLY:2,TEN_MILLISECONDLY:3,FIFTY_MILLISECONDLY:4,HUNDRED_MILLISECONDLY:5,FIVE_HUNDRED_MILLISECONDLY:6,SECONDLY:7,TWO_SECONDLY:8,FIVE_SECONDLY:9,TEN_SECONDLY:10,THIRTY_SECONDLY:11,MINUTELY:12,TWO_MINUTELY:13,FIVE_MINUTELY:14,TEN_MINUTELY:15,THIRTY_MINUTELY:16,HOURLY:17,TWO_HOURLY:18,SIX_HOURLY:19,DAILY:20,TWO_DAILY:21,WEEKLY:22,MONTHLY:23,QUARTERLY:24,BIANNUAL:25,ANNUAL:26,DECADAL:27,CENTENNIAL:28,NUM_GRANULARITIES:29},l=0,c=1,u=2,h=3,d=4,p=5,f=6,g=7,v=[];v[s.MILLISECONDLY]={datefield:f,step:1,spacing:1},v[s.TWO_MILLISECONDLY]={datefield:f,step:2,spacing:2},v[s.FIVE_MILLISECONDLY]={datefield:f,step:5,spacing:5},v[s.TEN_MILLISECONDLY]={datefield:f,step:10,spacing:10},v[s.FIFTY_MILLISECONDLY]={datefield:f,step:50,spacing:50},v[s.HUNDRED_MILLISECONDLY]={datefield:f,step:100,spacing:100},v[s.FIVE_HUNDRED_MILLISECONDLY]={datefield:f,step:500,spacing:500},v[s.SECONDLY]={datefield:p,step:1,spacing:1e3},v[s.TWO_SECONDLY]={datefield:p,step:2,spacing:2e3},v[s.FIVE_SECONDLY]={datefield:p,step:5,spacing:5e3},v[s.TEN_SECONDLY]={datefield:p,step:10,spacing:1e4},v[s.THIRTY_SECONDLY]={datefield:p,step:30,spacing:3e4},v[s.MINUTELY]={datefield:d,step:1,spacing:6e4},v[s.TWO_MINUTELY]={datefield:d,step:2,spacing:12e4},v[s.FIVE_MINUTELY]={datefield:d,step:5,spacing:3e5},v[s.TEN_MINUTELY]={datefield:d,step:10,spacing:6e5},v[s.THIRTY_MINUTELY]={datefield:d,step:30,spacing:18e5},v[s.HOURLY]={datefield:h,step:1,spacing:36e5},v[s.TWO_HOURLY]={datefield:h,step:2,spacing:72e5},v[s.SIX_HOURLY]={datefield:h,step:6,spacing:216e5},v[s.DAILY]={datefield:u,step:1,spacing:864e5},v[s.TWO_DAILY]={datefield:u,step:2,spacing:1728e5},v[s.WEEKLY]={datefield:u,step:7,spacing:6048e5},v[s.MONTHLY]={datefield:c,step:1,spacing:2629746e3},v[s.QUARTERLY]={datefield:c,step:3,spacing:7889238e3},v[s.BIANNUAL]={datefield:c,step:6,spacing:15778476e3},v[s.ANNUAL]={datefield:l,step:1,spacing:31556952e3},v[s.DECADAL]={datefield:l,step:10,spacing:31556952e4},v[s.CENTENNIAL]={datefield:l,step:100,spacing:31556952e5};var y=function(){for(var e=[],t=-39;t<=39;t++)for(var n=Math.pow(10,t),r=1;r<=9;r++){var i=n*r;e.push(i)}return e}(),m=function(e,t,n,r){for(var i=r("pixelsPerLabel"),a=0;a=i)return a}return-1},_=function(e,t,n){var r=v[n].spacing;return Math.round(1*(t-e)/r)},x=function(e,t,n,i,a){var o=i("axisLabelFormatter"),y=i("labelsUTC")?r.DateAccessorsUTC:r.DateAccessorsLocal,m=v[n].datefield,_=v[n].step,x=v[n].spacing,b=new Date(e),w=[];w[l]=y.getFullYear(b),w[c]=y.getMonth(b),w[u]=y.getDate(b),w[h]=y.getHours(b),w[d]=y.getMinutes(b),w[p]=y.getSeconds(b),w[f]=y.getMilliseconds(b);var O=w[m]%_;n==s.WEEKLY&&(O=y.getDay(b)),w[m]-=O;for(var A=m+1;A=s.DAILY||y.getHours(C)%_===0)&&S.push({v:k,label:o.call(a,C,n,i,a)}),w[m]+=_,k=(C=y.makeDate.apply(null,w)).getTime();return S}},72247:function(e,t,n){"use strict";n.r(t),n.d(t,{Circles:function(){return Q},DASHED_LINE:function(){return u},DOTTED_LINE:function(){return c},DOT_DASH_LINE:function(){return h},DateAccessorsLocal:function(){return P},DateAccessorsUTC:function(){return T},HORIZONTAL:function(){return d},Iterator:function(){return z},LN_TEN:function(){return o},LOG_SCALE:function(){return a},VERTICAL:function(){return p},addEvent:function(){return g},binarySearch:function(){return D},cancelEvent:function(){return y},clone:function(){return G},createCanvas:function(){return V},createIterator:function(){return Z},dateAxisLabelFormatter:function(){return ve},dateParser:function(){return N},dateStrToMillis:function(){return M},dateString_:function(){return R},dateValueFormatter:function(){return ye},detectLineDelimiter:function(){return K},dragGetX_:function(){return w},dragGetY_:function(){return O},findPos:function(){return _},floatFormat:function(){return C},getContext:function(){return f},getContextPixelRatio:function(){return X},hmsString_:function(){return L},hsvToRGB:function(){return m},isArrayLike:function(){return Y},isCanvasSupported:function(){return ae},isDateLike:function(){return U},isNodeContainedBy:function(){return J},isOK:function(){return A},isPixelChangingOptionList:function(){return q},isValidPoint:function(){return S},log10:function(){return s},logRangeFraction:function(){return l},numberAxisLabelFormatter:function(){return fe},numberValueFormatter:function(){return pe},pageX:function(){return x},pageY:function(){return b},parseFloat_:function(){return oe},pow:function(){return ee},removeEvent:function(){return v},repeatAndCleanup:function(){return W},requestAnimFrame:function(){return B},round_:function(){return E},setupDOMready_:function(){return be},toRGB_:function(){return ie},type:function(){return i},typeArrayLike:function(){return j},update:function(){return F},updateDeep:function(){return H},zeropad:function(){return k}});var r=n(74321);function i(e){return null===e?"null":typeof e}var a=10,o=Math.log(a),s=function(e){return Math.log(e)/o},l=function(e,t,n){var r=s(e),i=r+n*(s(t)-r);return Math.pow(a,i)},c=[2,2],u=[7,3],h=[7,2,2,2],d=1,p=2,f=function(e){return e.getContext("2d")},g=function(e,t,n){e.addEventListener(t,n,!1)};function v(e,t,n){e.removeEventListener(t,n,!1)}function y(e){return(e=e||window.event).stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.cancel=!0,e.returnValue=!1,!1}function m(e,t,n){var r,i,a;if(0===t)r=n,i=n,a=n;else{var o=Math.floor(6*e),s=6*e-o,l=n*(1-t),c=n*(1-t*s),u=n*(1-t*(1-s));switch(o){case 1:r=c,i=n,a=l;break;case 2:r=l,i=n,a=u;break;case 3:r=l,i=c,a=n;break;case 4:r=u,i=l,a=n;break;case 5:r=n,i=l,a=c;break;case 6:case 0:r=n,i=u,a=l}}return"rgb("+(r=Math.floor(255*r+.5))+","+(i=Math.floor(255*i+.5))+","+(a=Math.floor(255*a+.5))+")"}function _(e){var t=e.getBoundingClientRect(),n=window,r=document.documentElement;return{x:t.left+(n.pageXOffset||r.scrollLeft),y:t.top+(n.pageYOffset||r.scrollTop)}}function x(e){return!e.pageX||e.pageX<0?0:e.pageX}function b(e){return!e.pageY||e.pageY<0?0:e.pageY}function w(e,t){return x(e)-t.px}function O(e,t){return b(e)-t.py}function A(e){return!!e&&!isNaN(e)}function S(e,t){return!!e&&(null!==e.yval&&(null!==e.x&&void 0!==e.x&&(null!==e.y&&void 0!==e.y&&!(isNaN(e.x)||!t&&isNaN(e.y)))))}function C(e,t){var n=Math.min(Math.max(1,t||2),21);return Math.abs(e)<.001&&0!==e?e.toExponential(n-1):e.toPrecision(n)}function k(e){return e<10?"0"+e:""+e}var P={getFullYear:e=>e.getFullYear(),getMonth:e=>e.getMonth(),getDate:e=>e.getDate(),getHours:e=>e.getHours(),getMinutes:e=>e.getMinutes(),getSeconds:e=>e.getSeconds(),getMilliseconds:e=>e.getMilliseconds(),getDay:e=>e.getDay(),makeDate:function(e,t,n,r,i,a,o){return new Date(e,t,n,r,i,a,o)}},T={getFullYear:e=>e.getUTCFullYear(),getMonth:e=>e.getUTCMonth(),getDate:e=>e.getUTCDate(),getHours:e=>e.getUTCHours(),getMinutes:e=>e.getUTCMinutes(),getSeconds:e=>e.getUTCSeconds(),getMilliseconds:e=>e.getUTCMilliseconds(),getDay:e=>e.getUTCDay(),makeDate:function(e,t,n,r,i,a,o){return new Date(Date.UTC(e,t,n,r,i,a,o))}};function L(e,t,n,r){var i=k(e)+":"+k(t);if(n&&(i+=":"+k(n),r)){var a=""+r;i+="."+("000"+a).substring(a.length)}return i}function R(e,t){var n=t?T:P,r=new Date(e),i=n.getFullYear(r),a=n.getMonth(r),o=n.getDate(r),s=n.getHours(r),l=n.getMinutes(r),c=n.getSeconds(r),u=n.getMilliseconds(r),h=""+i+"/"+k(a+1)+"/"+k(o);return 3600*s+60*l+c+.001*u&&(h+=" "+L(s,l,c,u)),h}function E(e,t){var n=Math.pow(10,t);return Math.round(e*n)/n}function D(e,t,n,r,i){if(null!==r&&void 0!==r&&null!==i&&void 0!==i||(r=0,i=t.length-1),r>i)return-1;null!==n&&void 0!==n||(n=0);var a,o=function(e){return e>=0&&ee?n>0&&o(a=s-1)&&t[a]e?s:D(e,t,n,s+1,i):-1}function N(e){var t,n;if((-1==e.search("-")||-1!=e.search("T")||-1!=e.search("Z"))&&(n=M(e))&&!isNaN(n))return n;if(-1!=e.search("-")){for(t=e.replace("-","/","g");-1!=t.search("-");)t=t.replace("-","/");n=M(t)}else n=M(e);return n&&!isNaN(n)||console.error("Couldn't parse "+e+" as a date"),n}function M(e){return new Date(e).getTime()}function F(e,t){if("undefined"!=typeof t&&null!==t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}var I="undefined"!==typeof Node&&null!==Node&&"object"===typeof Node?function(e){return e instanceof Node}:function(e){return"object"===typeof e&&"number"===typeof e.nodeType&&"string"===typeof e.nodeName};function H(e,t){if("undefined"!=typeof t&&null!==t)for(var n in t)if(t.hasOwnProperty(n)){const r=t[n];null===r?e[n]=null:Y(r)?e[n]=r.slice():I(r)?e[n]=r:"object"==typeof r?("object"==typeof e[n]&&null!==e[n]||(e[n]={}),H(e[n],r)):e[n]=r}return e}function j(e){if(null===e)return"null";const t=typeof e;return("object"===t||"function"===t&&"function"===typeof e.item)&&"number"===typeof e.length&&3!==e.nodeType&&4!==e.nodeType?"array":t}function Y(e){const t=typeof e;return null!==e&&("object"===t||"function"===t&&"function"===typeof e.item)&&"number"===typeof e.length&&3!==e.nodeType&&4!==e.nodeType}function U(e){return null!==e&&"object"===typeof e&&"function"===typeof e.getTime}function G(e){for(var t=[],n=0;n=t||B.call(window,(function(){var t=(new Date).getTime()-o;i=a;var c=(a=Math.floor(t/n))-i;a+c>s||a>=s?(e(s),r()):(0!==c&&e(a),l())}))}()}else r()}var $={annotationClickHandler:!0,annotationDblClickHandler:!0,annotationMouseOutHandler:!0,annotationMouseOverHandler:!0,axisLineColor:!0,axisLineWidth:!0,clickCallback:!0,drawCallback:!0,drawHighlightPointCallback:!0,drawPoints:!0,drawPointCallback:!0,drawGrid:!0,fillAlpha:!0,gridLineColor:!0,gridLineWidth:!0,hideOverlayOnMouseOut:!0,highlightCallback:!0,highlightCircleSize:!0,interactionModel:!0,labelsDiv:!0,labelsKMB:!0,labelsKMG2:!0,labelsSeparateLines:!0,labelsShowZeroValues:!0,legend:!0,panEdgeFraction:!0,pixelsPerYLabel:!0,pointClickCallback:!0,pointSize:!0,rangeSelectorPlotFillColor:!0,rangeSelectorPlotFillGradientColor:!0,rangeSelectorPlotStrokeColor:!0,rangeSelectorBackgroundStrokeColor:!0,rangeSelectorBackgroundLineWidth:!0,rangeSelectorPlotLineWidth:!0,rangeSelectorForegroundStrokeColor:!0,rangeSelectorForegroundLineWidth:!0,rangeSelectorAlpha:!0,showLabelsOnHighlight:!0,showRoller:!0,strokeWidth:!0,underlayCallback:!0,unhighlightCallback:!0,zoomCallback:!0};function q(e,t){var n={};if(e)for(var r=1;r=l){for(u=h.length;u>0;)if(c=ee(l,u),--u,s>=c)return s/c>=Math.pow(10,i)?e.toExponential(r):E(e/c,r)+h[u]}else if(s<1){for(u=0;u=1););return s*c=Math.pow(10,i)||s=r.He.DECADAL)return""+a;if(t>=r.He.MONTHLY)return ge[o]+" "+a;if(0===3600*l+60*c+u+.001*h||t>=r.He.DAILY)return k(s)+" "+ge[o];if(tr.He.MINUTELY?L(l,c,u,0):L(l,c,u,h)}function ye(e,t){return R(e,t("labelsUTC"))}var me=[],_e=!1;function xe(e){return"function"===typeof e&&e(),!0}function be(e){if("undefined"!==typeof document){const t=function(){if(!_e){_e=!0,e.onDOMready=xe,document.removeEventListener("DOMContentLoaded",t,!1),window.removeEventListener("load",t,!1);for(let e=0;e=0&&r<1&&this.xticks.push({pos:r,label:n,has_tick:a});for(this.yticks=[],e=0;e0&&r<=1&&this.yticks.push({axis:e,pos:r,label:n,has_tick:a})},i.prototype._evaluateAnnotations=function(){var e,t={};for(e=0;e=2,v=e.drawingContext;v.save(),g&&v.setLineDash&&v.setLineDash(i);var y=o._drawSeries(e,f,n,l,a,h,u,t);o._drawPointsOnLine(e,y,s,t,l),g&&v.setLineDash&&v.setLineDash([]),v.restore()},o._drawSeries=function(e,t,n,r,i,a,o,s){var l,c,u=null,h=null,d=null,p=[],f=!0,g=e.drawingContext;g.beginPath(),g.strokeStyle=s,g.lineWidth=n;for(var v=t.array_,y=t.end_,m=t.predicate_,_=t.start_;_0;n--)if(2==(s=t[n])[0]){var r=t[n-1];r[1]==s[1]&&r[2]==s[2]&&t.splice(n,1)}for(n=0;n2&&!e){var i=0;2==t[0][0]&&i++;var a=null,o=null;for(n=i;nt[o][2]&&(o=n)}}var c=t[a],u=t[o];t.splice(i,t.length-i),ao?(t.push(u),t.push(c)):t.push(c)}}}(n);for(var a=0,o=t.length;a1||s-n>1),n=s);t.push([e,i,o])};return{moveTo:function(e,t){o(2,e,t)},lineTo:function(e,t){o(1,e,t)},stroke:function(){a(!0),e.stroke()},fill:function(){a(!0),e.fill()},beginPath:function(){a(!0),e.beginPath()},closePath:function(){a(!0),e.closePath()},_count:function(){return i}}},o._fillPlotter=function(e){if(!e.singleSeriesName&&0===e.seriesIndex){for(var t=e.dygraph,n=t.getLabels().slice(1),i=n.length;i>=0;i--)t.visibility()[i]||n.splice(i,1);var a=function(){for(var e=0;e=0;i--){var a=r[i];e.lineTo(a[0],a[1])}},v=h-1;v>=0;v--){var y=e.drawingContext,m=n[v];if(t.getBooleanOption("fillGraph",m)){var _=t.getNumericOption("fillAlpha",m),x=t.getBooleanOption("stepPlot",m),b=p[v],w=t.axisPropertiesForSeries(m),O=1+w.minyval*w.yscale;O<0?O=0:O>1&&(O=1),O=c.h*O+c.y;var A,S=u[v],C=r.createIterator(S,0,S.length,o._getIteratorPredicate(t.getBooleanOption("connectSeparatedPoints",m))),k=NaN,P=[-1,-1],T=r.toRGB_(b),L="rgba("+T.r+","+T.g+","+T.b+","+_+")";y.fillStyle=L,y.beginPath();var R,E=!0;(S.length>2*t.width_||Q.FORCE_FAST_PROXY)&&(y=o._fastCanvasProxy(y));for(var D,N=[];C.hasNext;)if(D=C.next(),r.isOK(D.y)||x){if(d){if(!E&&R==D.xval)continue;var M;E=!1,R=D.xval,M=void 0===(s=f[D.canvasx])?O:l?s[0]:s,A=[D.canvasy,M],x?-1===P[0]?f[D.canvasx]=[D.canvasy,O]:f[D.canvasx]=[D.canvasy,P[0]]:f[D.canvasx]=D.canvasy}else A=isNaN(D.canvasy)&&x?[c.y+c.h,O]:[D.canvasy,O];isNaN(k)?(y.moveTo(D.canvasx,A[1]),y.lineTo(D.canvasx,A[0])):(x?(y.lineTo(D.canvasx,P[0]),y.lineTo(D.canvasx,A[0])):y.lineTo(D.canvasx,A[0]),d&&(N.push([k,P[1]]),l&&s?N.push([D.canvasx,s[1]]):N.push([D.canvasx,A[1]]))),P=A,k=D.canvasx}else g(y,k,P[1],N),N=[],k=NaN,null===D.y_stacked||isNaN(D.y_stacked)||(f[D.canvasx]=c.h*D.y_stacked+c.y);l=x,A&&D&&(g(y,D.canvasx,A[1],N),N=[]),y.fill()}}}};var s=o,l=n(74321),c={maybeTreatMouseOpAsClick:function(e,t,n){n.dragEndX=r.dragGetX_(e,n),n.dragEndY=r.dragGetY_(e,n);var i=Math.abs(n.dragEndX-n.dragStartX),a=Math.abs(n.dragEndY-n.dragStartY);i<2&&a<2&&void 0!==t.lastx_&&null!==t.lastx_&&c.treatMouseOpAsClick(t,e,n),n.regionWidth=i,n.regionHeight=a},startPan:function(e,t,n){var i,a;n.isPanning=!0;var o=t.xAxisRange();if(t.getOptionForAxis("logscale","x")?(n.initialLeftmostDate=r.log10(o[0]),n.dateRange=r.log10(o[1])-r.log10(o[0])):(n.initialLeftmostDate=o[0],n.dateRange=o[1]-o[0]),n.xUnitsPerPixel=n.dateRange/(t.plotter_.area.w-1),t.getNumericOption("panEdgeFraction")){var s=t.width_*t.getNumericOption("panEdgeFraction"),l=t.xAxisExtremes(),c=t.toDomXCoord(l[0])-s,u=t.toDomXCoord(l[1])+s,h=t.toDataXCoord(c),d=t.toDataXCoord(u);n.boundedDates=[h,d];var p=[],f=t.height_*t.getNumericOption("panEdgeFraction");for(i=0;in.boundedDates[1]&&(a=(i-=a-n.boundedDates[1])+n.dateRange),t.getOptionForAxis("logscale","x")?t.dateWindow_=[Math.pow(r.LOG_SCALE,i),Math.pow(r.LOG_SCALE,a)]:t.dateWindow_=[i,a],n.is2DPan)for(var o=n.dragEndY-n.dragStartY,s=0;s=10&&n.dragDirection==r.HORIZONTAL){var a=Math.min(n.dragStartX,n.dragEndX),o=Math.max(n.dragStartX,n.dragEndX);(a=Math.max(a,i.x))<(o=Math.min(o,i.x+i.w))&&t.doZoomX_(a,o),n.cancelNextDblclick=!0}else if(n.regionHeight>=10&&n.dragDirection==r.VERTICAL){var s=Math.min(n.dragStartY,n.dragEndY),l=Math.max(n.dragStartY,n.dragEndY);(s=Math.max(s,i.y))<(l=Math.min(l,i.y+i.h))&&t.doZoomY_(s,l),n.cancelNextDblclick=!0}n.dragStartX=null,n.dragStartY=null},c.startTouch=function(e,t,n){e.preventDefault(),e.touches.length>1&&(n.startTimeForDoubleTapMs=null);for(var r=[],i=0;i=2){n.initialPinchCenter={pageX:.5*(r[0].pageX+r[1].pageX),pageY:.5*(r[0].pageY+r[1].pageY),dataX:.5*(r[0].dataX+r[1].dataX),dataY:.5*(r[0].dataY+r[1].dataY)};var s=180/Math.PI*Math.atan2(n.initialPinchCenter.pageY-r[0].pageY,r[0].pageX-n.initialPinchCenter.pageX);(s=Math.abs(s))>90&&(s=90-s),n.touchDirections={x:s<67.5,y:s>22.5}}n.initialRange={x:t.xAxisRange(),y:t.yAxisRange()}},c.moveTouch=function(e,t,n){n.startTimeForDoubleTapMs=null;var r,i=[];for(r=0;r=2){var f=c[1].pageX-u.pageX;s=(i[1].pageX-o.pageX)/f;var g=c[1].pageY-u.pageY;l=(i[1].pageY-o.pageY)/g}s=Math.min(8,Math.max(.125,s)),l=Math.min(8,Math.max(.125,l));var v=!1;if(n.touchDirections.x){var y=u.dataX-h.dataX/s;t.dateWindow_=[y+(n.initialRange.x[0]-u.dataX)/s,y+(n.initialRange.x[1]-u.dataX)/s],v=!0}if(n.touchDirections.y)for(r=0;r<1;r++){var m=t.axes_[r];if(t.attributes_.getForAxis("logscale",r));else{y=u.dataY-h.dataY/l;m.valueRange=[y+(n.initialRange.y[0]-u.dataY)/l,y+(n.initialRange.y[1]-u.dataY)/l],v=!0}}if(t.drawGraph_(!1),v&&i.length>1&&t.getFunctionOption("zoomCallback")){var _=t.xAxisRange();t.getFunctionOption("zoomCallback").call(t,_[0],_[1],t.yAxisRanges())}},c.endTouch=function(e,t,n){if(0!==e.touches.length)c.startTouch(e,t,n);else if(1==e.changedTouches.length){var r=(new Date).getTime(),i=e.changedTouches[0];n.startTimeForDoubleTapMs&&r-n.startTimeForDoubleTapMs<500&&n.doubleTapX&&Math.abs(n.doubleTapX-i.screenX)<50&&n.doubleTapY&&Math.abs(n.doubleTapY-i.screenY)<50?t.resetZoom():(n.startTimeForDoubleTapMs=r,n.doubleTapX=i.screenX,n.doubleTapY=i.screenY)}};var u=function(e,t,n){return en?e-n:0};c.defaultModel={mousedown:function(e,t,n){if(!e.button||2!=e.button){n.initializeMouseDown(e,t,n),e.altKey||e.shiftKey?c.startPan(e,t,n):c.startZoom(e,t,n);var i=function(e){if(n.isZooming){var i=function(e,t){var n=r.findPos(t.canvas_),i={left:n.x,right:n.x+t.canvas_.offsetWidth,top:n.y,bottom:n.y+t.canvas_.offsetHeight},a={x:r.pageX(e),y:r.pageY(e)},o=u(a.x,i.left,i.right),s=u(a.y,i.top,i.bottom);return Math.max(o,s)}(e,t);i<100?c.moveZoom(e,t,n):null!==n.dragEndX&&(n.dragEndX=null,n.dragEndY=null,t.clearZoomRect_())}else n.isPanning&&c.movePan(e,t,n)},a=function(e){n.isZooming?null!==n.dragEndX?c.endZoom(e,t,n):c.maybeTreatMouseOpAsClick(e,t,n):n.isPanning&&c.endPan(e,t,n),r.removeEvent(document,"mousemove",i),r.removeEvent(document,"mouseup",a),n.destroy()};t.addAndTrackEvent(document,"mousemove",i),t.addAndTrackEvent(document,"mouseup",a)}},willDestroyContextMyself:!0,touchstart:function(e,t,n){c.startTouch(e,t,n)},touchmove:function(e,t,n){c.moveTouch(e,t,n)},touchend:function(e,t,n){c.endTouch(e,t,n)},dblclick:function(e,t,n){if(n.cancelNextDblclick)n.cancelNextDblclick=!1;else{var r={canvasx:n.dragEndX,canvasy:n.dragEndY,cancelable:!0};t.cascadeEvents_("dblclick",r)||e.altKey||e.shiftKey||t.resetZoom()}}},c.nonInteractiveModel_={mousedown:function(e,t,n){n.initializeMouseDown(e,t,n)},mouseup:c.maybeTreatMouseOpAsClick},c.dragIsPanInteractionModel={mousedown:function(e,t,n){n.initializeMouseDown(e,t,n),c.startPan(e,t,n)},mousemove:function(e,t,n){n.isPanning&&c.movePan(e,t,n)},mouseup:function(e,t,n){n.isPanning&&c.endPan(e,t,n)}};var h=c,d={highlightCircleSize:3,highlightSeriesOpts:null,highlightSeriesBackgroundAlpha:.5,highlightSeriesBackgroundColor:"rgb(255, 255, 255)",labelsSeparateLines:!1,labelsShowZeroValues:!0,labelsKMB:!1,labelsKMG2:!1,showLabelsOnHighlight:!0,digitsAfterDecimal:2,maxNumberWidth:6,sigFigs:null,strokeWidth:1,strokeBorderWidth:0,strokeBorderColor:"white",axisTickSize:3,axisLabelFontSize:14,rightGap:5,showRoller:!1,xValueParser:void 0,delimiter:",",sigma:2,errorBars:!1,fractions:!1,wilsonInterval:!0,customBars:!1,fillGraph:!1,fillAlpha:.15,connectSeparatedPoints:!1,stackedGraph:!1,stackedGraphNaNFill:"all",hideOverlayOnMouseOut:!0,resizable:"no",legend:"onmouseover",legendFollowOffsetX:50,legendFollowOffsetY:-50,stepPlot:!1,xRangePad:0,yRangePad:null,drawAxesAtZero:!1,titleHeight:28,xLabelHeight:18,yLabelWidth:18,axisLineColor:"black",axisLineWidth:.3,gridLineWidth:.3,axisLabelWidth:50,gridLineColor:"rgb(128,128,128)",interactionModel:h.defaultModel,animatedZooms:!1,animateBackgroundFade:!0,showRangeSelector:!1,rangeSelectorHeight:40,rangeSelectorPlotStrokeColor:"#808FAB",rangeSelectorPlotFillGradientColor:"white",rangeSelectorPlotFillColor:"#A7B1C4",rangeSelectorBackgroundStrokeColor:"gray",rangeSelectorBackgroundLineWidth:1,rangeSelectorPlotLineWidth:1.5,rangeSelectorForegroundStrokeColor:"black",rangeSelectorForegroundLineWidth:1,rangeSelectorAlpha:.6,showInRangeSelector:null,plotter:[s._fillPlotter,s._errorPlotter,s._linePlotter],plugins:[],axes:{x:{pixelsPerLabel:70,axisLabelWidth:60,axisLabelFormatter:r.dateAxisLabelFormatter,valueFormatter:r.dateValueFormatter,drawGrid:!0,drawAxis:!0,independentTicks:!0,ticker:l.cc},y:{axisLabelWidth:50,pixelsPerLabel:30,valueFormatter:r.numberValueFormatter,axisLabelFormatter:r.numberAxisLabelFormatter,drawGrid:!0,drawAxis:!0,independentTicks:!0,ticker:l.Dv},y2:{axisLabelWidth:50,pixelsPerLabel:30,valueFormatter:r.numberValueFormatter,axisLabelFormatter:r.numberAxisLabelFormatter,drawAxis:!0,drawGrid:!1,independentTicks:!1,ticker:l.Dv}}},p=function(e){this.dygraph_=e,this.yAxes_=[],this.xAxis_={},this.series_={},this.global_=this.dygraph_.attrs_,this.user_=this.dygraph_.user_attrs_||{},this.labels_=[],this.highlightSeries_=this.get("highlightSeriesOpts")||{},this.reparseSeries()};p.AXIS_STRING_MAPPINGS_={y:0,Y:0,y1:0,Y1:0,y2:1,Y2:1},p.axisToIndex_=function(e){if("string"==typeof e){if(p.AXIS_STRING_MAPPINGS_.hasOwnProperty(e))return p.AXIS_STRING_MAPPINGS_[e];throw"Unknown axis : "+e}if("number"==typeof e){if(0===e||1===e)return e;throw"Dygraphs only supports two y-axes, indexed from 0-1."}if(e)throw"Unknown axis : "+e;return 0},p.prototype.reparseSeries=function(){var e=this.get("labels");if(e){this.labels_=e.slice(1),this.yAxes_=[{series:[],options:{}}],this.xAxis_={options:{}},this.series_={};for(var t=this.user_.series||{},n=0;n1&&r.update(this.yAxes_[1].options,s.y2||{}),r.update(this.xAxis_.options,s.x||{})}},p.prototype.get=function(e){var t=this.getGlobalUser_(e);return null!==t?t:this.getGlobalDefault_(e)},p.prototype.getGlobalUser_=function(e){return this.user_.hasOwnProperty(e)?this.user_[e]:null},p.prototype.getGlobalDefault_=function(e){return this.global_.hasOwnProperty(e)?this.global_[e]:d.hasOwnProperty(e)?d[e]:null},p.prototype.getForAxis=function(e,t){var n,r;if("number"==typeof t)r=0===(n=t)?"y":"y2";else{if("y1"==t&&(t="y"),"y"==t)n=0;else if("y2"==t)n=1;else{if("x"!=t)throw"Unknown axis "+t;n=-1}r=t}var i=-1==n?this.xAxis_:this.yAxes_[n];if(i){var a=i.options;if(a.hasOwnProperty(e))return a[e]}if("x"!==t||"logscale"!==e){var o=this.getGlobalUser_(e);if(null!==o)return o}var s=d.axes[r];return s.hasOwnProperty(e)?s[e]:this.getGlobalDefault_(e)},p.prototype.getForSeries=function(e,t){if(t===this.dygraph_.getHighlightSeries()&&this.highlightSeries_.hasOwnProperty(e))return this.highlightSeries_[e];if(!this.series_.hasOwnProperty(t))throw"Unknown series: "+t;var n=this.series_[t],r=n.options;return r.hasOwnProperty(e)?r[e]:this.getForAxis(e,n.yAxis)},p.prototype.numAxes=function(){return this.yAxes_.length},p.prototype.axisForSeries=function(e){return this.series_[e].yAxis},p.prototype.axisOptions=function(e){return this.yAxes_[e].options},p.prototype.seriesForAxis=function(e){return this.yAxes_[e].series},p.prototype.seriesNames=function(){return this.labels_};var f=p;function g(){this.tarps=[]}g.prototype.cover=function(){for(var e=document.getElementsByTagName("iframe"),t=0;ta)&&(a=r),(null===i||rr&&(l=r),ca)&&(a=c),(null===i||l=0){var h=e[r-t];null===h[1]||isNaN(h[1])||(a-=h[2][0],s-=h[1],o-=h[2][1],l-=1)}u[r]=l?[e[r][0],1*s/l,[1*a/l,1*o/l]]:[e[r][0],null,[null,null]]}return u};var k=C,P=function(){};(P.prototype=new b).extractSeries=function(e,t,n){var r,i,a,o,s,l=[];const c=n.get("labels")[t],u=n.getForSeries("logscale",c);for(var h=0;h=0&&(a-=e[r-t][2][0],o-=e[r-t][2][1]);var s=e[r][0],l=o?a/o:0;i[r]=[s,100*l]}return i};var T=P,L=function(){};(L.prototype=new O).extractSeries=function(e,t,n){var r,i,a,o,s,l,c,u=[];const h=n.get("labels")[t],d=n.getForSeries("logscale",h),p=n.getForSeries("sigma",h);for(var f=0;f=0&&(h-=e[r-t][2][2],d-=e[r-t][2][3]);var f=e[r][0],g=d?h/d:0;if(s)if(d){var v=g<0?0:g,y=d,m=o*Math.sqrt(v*(1-v)/y+o*o/(4*y*y)),_=1+o*o/d;l=(v+o*o/(2*d)-m)/_,c=(v+o*o/(2*d)+m)/_,i[r]=[f,v*p,[l*p,c*p]]}else i[r]=[f,0,[0,0]];else u=d?o*Math.sqrt(g*(1-g)/d):1,i[r]=[f,p*g,[p*(g-u),p*(g+u)]]}return i};var R=L,E=function(){this.annotations_=[]};E.prototype.toString=function(){return"Annotations Plugin"},E.prototype.activate=function(e){return{clearChart:this.clearChart,didDrawChart:this.didDrawChart}},E.prototype.detachLabels=function(){for(var e=0;ea.x+a.w||l.canvasya.y+a.h)){var c=l.annotation,u=6;c.hasOwnProperty("tickHeight")&&(u=c.tickHeight);var h=document.createElement("div");h.style.fontSize=t.getOption("axisLabelFontSize")+"px";var d="dygraph-annotation";c.hasOwnProperty("icon")||(d+=" dygraphDefaultAnnotation dygraph-default-annotation"),c.hasOwnProperty("cssClass")&&(d+=" "+c.cssClass),h.className=d;var p=c.hasOwnProperty("width")?c.width:16,f=c.hasOwnProperty("height")?c.height:16;if(c.hasOwnProperty("icon")){var g=document.createElement("img");g.src=c.icon,g.width=p,g.height=f,h.appendChild(g)}else l.annotation.hasOwnProperty("shortText")&&h.appendChild(document.createTextNode(l.annotation.shortText));var v=l.canvasx-p/2;h.style.left=v+"px";var y=0;if(c.attachAtBottom){var m=a.y+a.h-f-u;o[v]?m-=o[v]:o[v]=0,o[v]+=u+f,y=m}else y=l.canvasy-f-u;h.style.top=y+"px",h.style.width=p+"px",h.style.height=f+"px",h.title=l.annotation.text,h.style.color=t.colorsMap_[l.name],h.style.borderColor=t.colorsMap_[l.name],c.div=h,t.addAndTrackEvent(h,"click",i("clickHandler","annotationClickHandler",l)),t.addAndTrackEvent(h,"mouseover",i("mouseOverHandler","annotationMouseOverHandler",l)),t.addAndTrackEvent(h,"mouseout",i("mouseOutHandler","annotationMouseOutHandler",l)),t.addAndTrackEvent(h,"dblclick",i("dblClickHandler","annotationDblClickHandler",l)),r.appendChild(h),this.annotations_.push(h);var _=e.drawingContext;if(_.save(),_.strokeStyle=c.hasOwnProperty("tickColor")?c.tickColor:t.colorsMap_[l.name],_.lineWidth=c.hasOwnProperty("tickWidth")?c.tickWidth:t.getOption("strokeWidth"),_.beginPath(),c.attachAtBottom){m=y+f;_.moveTo(l.canvasx,m),_.lineTo(l.canvasx,m+u)}else _.moveTo(l.canvasx,l.canvasy),_.lineTo(l.canvasx,l.canvasy-2-u);_.closePath(),_.stroke(),_.restore()}}},E.prototype.destroy=function(){this.detachLabels()};var D=E,N=function(){this.xlabels_=[],this.ylabels_=[]};N.prototype.toString=function(){return"Axes Plugin"},N.prototype.activate=function(e){return{layout:this.layout,clearChart:this.clearChart,willDrawChart:this.willDrawChart}},N.prototype.layout=function(e){var t,n=e.dygraph;if(n.getOptionForAxis("drawAxis","y")){var r=n.getOptionForAxis("axisLabelWidth","y")+2*n.getOptionForAxis("axisTickSize","y");e.reserveSpaceLeft(r)}n.getOptionForAxis("drawAxis","x")&&(t=n.getOption("xAxisHeight")?n.getOption("xAxisHeight"):n.getOptionForAxis("axisLabelFontSize","x")+2*n.getOptionForAxis("axisTickSize","x"),e.reserveSpaceBottom(t));if(2==n.numAxes()){if(n.getOptionForAxis("drawAxis","y2")){r=n.getOptionForAxis("axisLabelWidth","y2")+2*n.getOptionForAxis("axisTickSize","y2");e.reserveSpaceRight(r)}}else n.numAxes()>2&&n.error("Only two y-axes are supported at this time. (Trying to use "+n.numAxes()+")")},N.prototype.detachLabels=function(){function e(e){for(var t=0;t0){var _=t.numAxes(),x=[y("y"),y("y2")];g.yticks.forEach((function(e){if(void 0!==e.label){o=v.x;var t="y1",n=x[0];if(1==e.axis&&(o=v.x+v.w,-1,t="y2",n=x[1]),n("drawAxis")){var r=n("axisLabelFontSize");s=v.y+e.pos*v.h,a=f(e.label,"y",2==_?t:null);var i=s-r/2;i<0&&(i=0),i+r+3>h?a.style.bottom="0":a.style.top=Math.min(i,h-2*r)+"px",0===e.axis?(a.style.left=v.x-n("axisLabelWidth")-n("axisTickSize")+"px",a.style.textAlign="right"):1==e.axis&&(a.style.left=v.x+v.w+n("axisTickSize")+"px",a.style.textAlign="left"),a.style.width=n("axisLabelWidth")+"px",c.appendChild(a),m.ylabels_.push(a)}}}))}var b;if(t.getOption("drawAxesAtZero"))((A=t.toPercentXCoord(0))>1||A<0||isNaN(A))&&(A=0),b=n(v.x+A*v.w);else b=n(v.x);l.strokeStyle=t.getOptionForAxis("axisLineColor","y"),l.lineWidth=t.getOptionForAxis("axisLineWidth","y"),l.beginPath(),l.moveTo(b,i(v.y)),l.lineTo(b,i(v.y+v.h)),l.closePath(),l.stroke(),2==t.numAxes()&&t.getOptionForAxis("drawAxis","y2")&&(l.strokeStyle=t.getOptionForAxis("axisLineColor","y2"),l.lineWidth=t.getOptionForAxis("axisLineWidth","y2"),l.beginPath(),l.moveTo(i(v.x+v.w),i(v.y)),l.lineTo(i(v.x+v.w),i(v.y+v.h)),l.closePath(),l.stroke())}if(t.getOptionForAxis("drawAxis","x")){if(g.xticks){var w=y("x");g.xticks.forEach((function(e){if(void 0!==e.label){o=v.x+e.pos*v.w,s=v.y+v.h,(a=f(e.label,"x")).style.textAlign="center",a.style.top=s+w("axisTickSize")+"px";var t=o-w("axisLabelWidth")/2;t+w("axisLabelWidth")>u&&(t=u-w("axisLabelWidth"),a.style.textAlign="right"),t<0&&(t=0,a.style.textAlign="left"),a.style.left=t+"px",a.style.width=w("axisLabelWidth")+"px",c.appendChild(a),m.xlabels_.push(a)}}))}var O,A;if(l.strokeStyle=t.getOptionForAxis("axisLineColor","x"),l.lineWidth=t.getOptionForAxis("axisLineWidth","x"),l.beginPath(),t.getOption("drawAxesAtZero"))((A=t.toPercentYCoord(0,0))>1||A<0)&&(A=1),O=i(v.y+A*v.h);else O=i(v.y+v.h);l.moveTo(n(v.x),O),l.lineTo(n(v.x+v.w),O),l.closePath(),l.stroke()}l.restore()};var M=N,F=function(){this.title_div_=null,this.xlabel_div_=null,this.ylabel_div_=null,this.y2label_div_=null};F.prototype.toString=function(){return"ChartLabels Plugin"},F.prototype.activate=function(e){return{layout:this.layout,didDrawChart:this.didDrawChart}};var I=function(e){var t=document.createElement("div");return t.style.position="absolute",t.style.left=e.x+"px",t.style.top=e.y+"px",t.style.width=e.w+"px",t.style.height=e.h+"px",t};F.prototype.detachLabels_=function(){for(var e=[this.title_div_,this.xlabel_div_,this.ylabel_div_,this.y2label_div_],t=0;t=2);r=o.yticks,a.save(),r.forEach((e=>{if(e.has_tick){var r=e.axis;p[r]&&(a.save(),f[r]&&a.setLineDash&&a.setLineDash(g[r]),a.strokeStyle=h[r],a.lineWidth=d[r],t=l(s.x),n=c(s.y+e.pos*s.h),a.beginPath(),a.moveTo(t,n),a.lineTo(t+s.w,n),a.stroke(),a.restore())}})),a.restore()}if(i.getOptionForAxis("drawGrid","x")){r=o.xticks,a.save();g=i.getOptionForAxis("gridLinePattern","x");(f=g&&g.length>=2)&&a.setLineDash&&a.setLineDash(g),a.strokeStyle=i.getOptionForAxis("gridLineColor","x"),a.lineWidth=i.getOptionForAxis("gridLineWidth","x"),r.forEach((e=>{e.has_tick&&(t=l(s.x+e.pos*s.w),n=c(s.y+s.h),a.beginPath(),a.moveTo(t,n),a.lineTo(t,s.y),a.stroke())})),f&&a.setLineDash&&a.setLineDash([]),a.restore()}},Y.prototype.destroy=function(){};var U=Y,G=function(){this.legend_div_=null,this.is_generated_div_=!1};G.prototype.toString=function(){return"Legend Plugin"},G.prototype.activate=function(e){var t,n=e.getOption("labelsDiv");return n&&null!==n?t="string"==typeof n||n instanceof String?document.getElementById(n):n:((t=document.createElement("div")).className="dygraph-legend",e.graphDiv.appendChild(t),this.is_generated_div_=!0),this.legend_div_=t,this.one_em_width_=10,{select:this.select,deselect:this.deselect,predraw:this.predraw,didDrawChart:this.didDrawChart}};function V(e,t,n){if(!e||e.length<=1)return`
`;var r,i,a,o,s=0,l=0,c=[];for(r=0;r<=e.length;r++)s+=e[r%e.length];if((o=Math.floor(n/(s-e[0])))>1){for(r=0;r`;return u}G.prototype.select=function(e){var t=e.selectedX,n=e.selectedPoints,r=e.selectedRow,i=e.dygraph.getOption("legend");if("never"!==i){var a=G.generateLegendHTML(e.dygraph,t,n,this.one_em_width_,r);if(a instanceof Node&&a.nodeType===Node.DOCUMENT_FRAGMENT_NODE?(this.legend_div_.innerHTML="",this.legend_div_.appendChild(a)):this.legend_div_.innerHTML=a,this.legend_div_.style.display="","follow"===i){var o,s=e.dygraph.plotter_.area,l=this.legend_div_.offsetWidth,c=e.dygraph.getOptionForAxis("axisLabelWidth","y"),u=e.dygraph.getHighlightSeries();u&&(o=n.find((e=>e.name===u)))||(o=n[0]);const t=e.dygraph.getNumericOption("legendFollowOffsetX"),r=e.dygraph.getNumericOption("legendFollowOffsetY");var h=o.x*s.w+t,d=o.y*s.h+r;h+l+1>s.w&&(h=h-2*t-l-(c-s.x)),this.legend_div_.style.left=c+h+"px",this.legend_div_.style.top=d+"px"}else if("onmouseover"===i&&this.is_generated_div_){s=e.dygraph.plotter_.area,l=this.legend_div_.offsetWidth;this.legend_div_.style.left=s.x+s.w-l-1+"px",this.legend_div_.style.top=s.y+"px"}}else this.legend_div_.style.display="none"},G.prototype.deselect=function(e){"always"!==e.dygraph.getOption("legend")&&(this.legend_div_.style.display="none");var t=function(e){var t=document.createElement("span");t.setAttribute("style","margin: 0; padding: 0 0 0 1em; border: 0;"),e.appendChild(t);var n=t.offsetWidth;return e.removeChild(t),n}(this.legend_div_);this.one_em_width_=t;var n=G.generateLegendHTML(e.dygraph,void 0,void 0,t,null);n instanceof Node&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE?(this.legend_div_.innerHTML="",this.legend_div_.appendChild(n)):this.legend_div_.innerHTML=n},G.prototype.didDrawChart=function(e){this.deselect(e)},G.prototype.predraw=function(e){if(this.is_generated_div_){e.dygraph.graphDiv.appendChild(this.legend_div_);var t=e.dygraph.plotter_.area,n=this.legend_div_.offsetWidth;this.legend_div_.style.left=t.x+t.w-n-1+"px",this.legend_div_.style.top=t.y+"px"}},G.prototype.destroy=function(){this.legend_div_=null},G.generateLegendHTML=function(e,t,n,i,a){var o,s={dygraph:e,x:t,i:a,series:[]},l={},c=e.getLabels();if(c)for(var u=1;u/g,">")),isVisible:h.visible,color:h.color};s.series.push(d),l[c[u]]=d}if("undefined"!==typeof t){var p=e.optionsViewForAxis_("x"),f=p("valueFormatter");s.xHTML=f.call(e,t,p,c[0],e,a,0);var g=[],v=e.numAxes();for(u=0;u":" "),n+=`${a.dashHTML} ${a.labelHTML}`)}return n}n=e.xHTML+":";for(i=0;i"),n+=` ${a.labelHTML}: ${a.yHTML}`}return n};var X=G,z=function(){this.hasTouchInterface_="undefined"!=typeof TouchEvent,this.isMobileDevice_=/mobile|android/gi.test(navigator.appVersion),this.interfaceCreated_=!1};z.prototype.toString=function(){return"RangeSelector Plugin"},z.prototype.activate=function(e){return this.dygraph_=e,this.getOption_("showRangeSelector")&&this.createInterface_(),{layout:this.reserveSpace_,predraw:this.renderStaticLayer_,didDrawChart:this.renderInteractiveLayer_}},z.prototype.destroy=function(){this.bgcanvas_=null,this.fgcanvas_=null,this.leftZoomHandle_=null,this.rightZoomHandle_=null},z.prototype.getOption_=function(e,t){return this.dygraph_.getOption(e,t)},z.prototype.setDefaultOption_=function(e,t){this.dygraph_.attrs_[e]=t},z.prototype.createInterface_=function(){this.createCanvases_(),this.createZoomHandles_(),this.initInteraction_(),this.getOption_("animatedZooms")&&(console.warn("Animated zooms and range selector are not compatible; disabling animatedZooms."),this.dygraph_.updateOptions({animatedZooms:!1},!0)),this.interfaceCreated_=!0,this.addToGraph_()},z.prototype.addToGraph_=function(){var e=this.graphDiv_=this.dygraph_.graphDiv;e.appendChild(this.bgcanvas_),e.appendChild(this.fgcanvas_),e.appendChild(this.leftZoomHandle_),e.appendChild(this.rightZoomHandle_)},z.prototype.removeFromGraph_=function(){var e=this.graphDiv_;e.removeChild(this.bgcanvas_),e.removeChild(this.fgcanvas_),e.removeChild(this.leftZoomHandle_),e.removeChild(this.rightZoomHandle_),this.graphDiv_=null},z.prototype.reserveSpace_=function(e){this.getOption_("showRangeSelector")&&e.reserveSpaceBottom(this.getOption_("rangeSelectorHeight")+4)},z.prototype.renderStaticLayer_=function(){this.updateVisibility_()&&(this.resize_(),this.drawStaticLayer_())},z.prototype.renderInteractiveLayer_=function(){this.updateVisibility_()&&!this.isChangingRange_&&(this.placeZoomHandles_(),this.drawInteractiveLayer_())},z.prototype.updateVisibility_=function(){var e=this.getOption_("showRangeSelector");if(e)this.interfaceCreated_?this.graphDiv_&&this.graphDiv_.parentNode||this.addToGraph_():this.createInterface_();else if(this.graphDiv_){this.removeFromGraph_();var t=this.dygraph_;setTimeout((function(){t.width_=0,t.resize()}),1)}return e},z.prototype.resize_=function(){function e(e,t,n,i){var a=i||r.getContextPixelRatio(t);e.style.top=n.y+"px",e.style.left=n.x+"px",e.width=n.w*a,e.height=n.h*a,e.style.width=n.w+"px",e.style.height=n.h+"px",1!=a&&t.scale(a,a)}var t=this.dygraph_.layout_.getPlotArea(),n=0;this.dygraph_.getOptionForAxis("drawAxis","x")&&(n=this.getOption_("xAxisHeight")||this.getOption_("axisLabelFontSize")+2*this.getOption_("axisTickSize")),this.canvasRect_={x:t.x,y:t.y+t.h+n+4,w:t.w,h:this.getOption_("rangeSelectorHeight")};var i=this.dygraph_.getNumericOption("pixelRatio");e(this.bgcanvas_,this.bgcanvas_ctx_,this.canvasRect_,i),e(this.fgcanvas_,this.fgcanvas_ctx_,this.canvasRect_,i)},z.prototype.createCanvases_=function(){this.bgcanvas_=r.createCanvas(),this.bgcanvas_.className="dygraph-rangesel-bgcanvas",this.bgcanvas_.style.position="absolute",this.bgcanvas_.style.zIndex=9,this.bgcanvas_ctx_=r.getContext(this.bgcanvas_),this.fgcanvas_=r.createCanvas(),this.fgcanvas_.className="dygraph-rangesel-fgcanvas",this.fgcanvas_.style.position="absolute",this.fgcanvas_.style.zIndex=9,this.fgcanvas_.style.cursor="default",this.fgcanvas_ctx_=r.getContext(this.fgcanvas_)},z.prototype.createZoomHandles_=function(){var e=new Image;e.className="dygraph-rangesel-zoomhandle",e.style.position="absolute",e.style.zIndex=10,e.style.visibility="hidden",e.style.cursor="col-resize",e.width=9,e.height=16,e.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAQCAYAAADESFVDAAAAAXNSR0IArs4c6QAAAAZiS0dEANAAzwDP4Z7KegAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAd0SU1FB9sHGw0cMqdt1UwAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAaElEQVQoz+3SsRFAQBCF4Z9WJM8KCDVwownl6YXsTmCUsyKGkZzcl7zkz3YLkypgAnreFmDEpHkIwVOMfpdi9CEEN2nGpFdwD03yEqDtOgCaun7sqSTDH32I1pQA2Pb9sZecAxc5r3IAb21d6878xsAAAAAASUVORK5CYII=",this.isMobileDevice_&&(e.width*=2,e.height*=2),this.leftZoomHandle_=e,this.rightZoomHandle_=e.cloneNode(!1)},z.prototype.initInteraction_=function(){var e,t,n,i,a,o,s,l,c,u,d,p,f,g,y=this,m=document,_=0,x=null,b=!1,w=!1,O=!this.isMobileDevice_,A=new v;e=function(e){var t=y.dygraph_.xAxisExtremes(),n=(t[1]-t[0])/y.canvasRect_.w;return[t[0]+(e.leftHandlePos-y.canvasRect_.x)*n,t[0]+(e.rightHandlePos-y.canvasRect_.x)*n]},t=function(e){return r.cancelEvent(e),b=!0,_=e.clientX,x=e.target?e.target:e.srcElement,"mousedown"!==e.type&&"dragstart"!==e.type||(r.addEvent(m,"mousemove",n),r.addEvent(m,"mouseup",i)),y.fgcanvas_.style.cursor="col-resize",A.cover(),!0},n=function(e){if(!b)return!1;r.cancelEvent(e);var t=e.clientX-_;if(Math.abs(t)<4)return!0;_=e.clientX;var n,i=y.getZoomHandleStatus_();x==y.leftZoomHandle_?(n=i.leftHandlePos+t,n=Math.min(n,i.rightHandlePos-x.width-3),n=Math.max(n,y.canvasRect_.x)):(n=i.rightHandlePos+t,n=Math.min(n,y.canvasRect_.x+y.canvasRect_.w),n=Math.max(n,i.leftHandlePos+x.width+3));var o=x.width/2;return x.style.left=n-o+"px",y.drawInteractiveLayer_(),O&&a(),!0},i=function(e){return!!b&&(b=!1,A.uncover(),r.removeEvent(m,"mousemove",n),r.removeEvent(m,"mouseup",i),y.fgcanvas_.style.cursor="default",O||a(),!0)},a=function(){try{var t=y.getZoomHandleStatus_();if(y.isChangingRange_=!0,t.isZoomed){var n=e(t);y.dygraph_.doZoomXDates_(n[0],n[1])}else y.dygraph_.resetZoom()}finally{y.isChangingRange_=!1}},o=function(e){var t=y.leftZoomHandle_.getBoundingClientRect(),n=t.left+t.width/2,r=(t=y.rightZoomHandle_.getBoundingClientRect()).left+t.width/2;return e.clientX>n&&e.clientX=y.canvasRect_.x+y.canvasRect_.w?i=(a=y.canvasRect_.x+y.canvasRect_.w)-o:(i+=t,a+=t);var s=y.leftZoomHandle_.width/2;return y.leftZoomHandle_.style.left=i-s+"px",y.rightZoomHandle_.style.left=a-s+"px",y.drawInteractiveLayer_(),O&&u(),!0},c=function(e){return!!w&&(w=!1,r.removeEvent(m,"mousemove",l),r.removeEvent(m,"mouseup",c),O||u(),!0)},u=function(){try{y.isChangingRange_=!0,y.dygraph_.dateWindow_=e(y.getZoomHandleStatus_()),y.dygraph_.drawGraph_(!1)}finally{y.isChangingRange_=!1}},d=function(e){if(!b&&!w){var t=o(e)?"move":"default";t!=y.fgcanvas_.style.cursor&&(y.fgcanvas_.style.cursor=t)}},p=function(e){"touchstart"==e.type&&1==e.targetTouches.length?t(e.targetTouches[0])&&r.cancelEvent(e):"touchmove"==e.type&&1==e.targetTouches.length?n(e.targetTouches[0])&&r.cancelEvent(e):i(e)},f=function(e){"touchstart"==e.type&&1==e.targetTouches.length?s(e.targetTouches[0])&&r.cancelEvent(e):"touchmove"==e.type&&1==e.targetTouches.length?l(e.targetTouches[0])&&r.cancelEvent(e):c(e)},g=function(e,t){for(var n=["touchstart","touchend","touchmove","touchcancel"],r=0;r1&&(f=d.rollingAverage(f,t.rollPeriod(),p,e)),h.push(f)}var g=[];for(e=0;e0)&&(x=Math.min(x,w),b=Math.max(b,w))}var O=.25;if(n)for(b=r.log10(b),b+=b*O,x=r.log10(x),e=0;ethis.canvasRect_.x||n+1=0;a--){var o=i[a][0];if(i[a][1].call(o,n),n.propagationStopped)break}return n.defaultPrevented},$.prototype.getPluginInstance_=function(e){for(var t=0;t!!e.valueRange)).indexOf(!0)>=0;if(null===e||void 0===e)return t||n;if("y"===e)return n;throw new Error(`axis parameter is [${e}] must be null, 'x' or 'y'.`)},$.prototype.toString=function(){var e=this.maindiv_;return"[Dygraph "+(e&&e.id?e.id:e)+"]"},$.prototype.attr_=function(e,t){return t?this.attributes_.getForSeries(e,t):this.attributes_.get(e)},$.prototype.getOption=function(e,t){return this.attr_(e,t)},$.prototype.getNumericOption=function(e,t){return this.getOption(e,t)},$.prototype.getStringOption=function(e,t){return this.getOption(e,t)},$.prototype.getBooleanOption=function(e,t){return this.getOption(e,t)},$.prototype.getFunctionOption=function(e,t){return this.getOption(e,t)},$.prototype.getOptionForAxis=function(e,t){return this.attributes_.getForAxis(e,t)},$.prototype.optionsViewForAxis_=function(e){var t=this;return function(n){var r=t.user_attrs_.axes;return r&&r[e]&&r[e].hasOwnProperty(n)?r[e][n]:("x"!==e||"logscale"!==n)&&("undefined"!=typeof t.user_attrs_[n]?t.user_attrs_[n]:(r=t.attrs_.axes)&&r[e]&&r[e].hasOwnProperty(n)?r[e][n]:"y"==e&&t.axes_[0].hasOwnProperty(n)?t.axes_[0][n]:"y2"==e&&t.axes_[1].hasOwnProperty(n)?t.axes_[1][n]:t.attr_(n))}},$.prototype.rollPeriod=function(){return this.rollPeriod_},$.prototype.xAxisRange=function(){return this.dateWindow_?this.dateWindow_:this.xAxisExtremes()},$.prototype.xAxisExtremes=function(){var e=this.getNumericOption("xRangePad")/this.plotter_.area.w;if(0===this.numRows())return[0-e,1+e];var t=this.rawData_[0][0],n=this.rawData_[this.rawData_.length-1][0];if(e){var r=n-t;t-=r*e,n+=r*e}return[t,n]},$.prototype.yAxisExtremes=function(){const e=this.gatherDatasets_(this.rolledSeries_,null),{extremes:t}=e,n=this.axes_;this.computeYAxisRanges_(t);const r=this.axes_;return this.axes_=n,r.map((e=>e.extremeRange))},$.prototype.yAxisRange=function(e){if("undefined"==typeof e&&(e=0),e<0||e>=this.axes_.length)return null;var t=this.axes_[e];return[t.computedValueRange[0],t.computedValueRange[1]]},$.prototype.yAxisRanges=function(){for(var e=[],t=0;t=this.rawData_.length||t<0||t>=this.rawData_[e].length?null:this.rawData_[e][t]},$.prototype.createInterface_=function(){var e=this.maindiv_;this.graphDiv=document.createElement("div"),this.graphDiv.style.textAlign="left",this.graphDiv.style.position="relative",e.appendChild(this.graphDiv),this.canvas_=r.createCanvas(),this.canvas_.style.position="absolute",this.canvas_.style.top=0,this.canvas_.style.left=0,this.hidden_=this.createPlotKitCanvas_(this.canvas_),this.canvas_ctx_=r.getContext(this.canvas_),this.hidden_ctx_=r.getContext(this.hidden_),this.resizeElements_(),this.graphDiv.appendChild(this.hidden_),this.graphDiv.appendChild(this.canvas_),this.mouseEventElement_=this.createMouseEventElement_(),this.layout_=new a(this);var t=this;if(this.mouseMoveHandler_=function(e){t.mouseMove_(e)},this.mouseOutHandler_=function(e){var n=e.target||e.fromElement,i=e.relatedTarget||e.toElement;r.isNodeContainedBy(n,t.graphDiv)&&!r.isNodeContainedBy(i,t.graphDiv)&&t.mouseOut_(e)},this.addAndTrackEvent(window,"mouseout",this.mouseOutHandler_),this.addAndTrackEvent(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_),!this.resizeHandler_){this.resizeHandler_=function(e){t.resize()},this.addAndTrackEvent(window,"resize",this.resizeHandler_),this.resizeObserver_=null;var n=this.getStringOption("resizable");if("undefined"===typeof ResizeObserver&&"no"!==n&&(console.error("ResizeObserver unavailable; ignoring resizable property"),n="no"),"horizontal"===n||"vertical"===n||"both"===n?e.style.resize=n:"passive"!==n&&(n="no"),"no"!==n){window.getComputedStyle(e).overflow;"visible"===window.getComputedStyle(e).overflow&&(e.style.overflow="hidden"),this.resizeObserver_=new ResizeObserver(this.resizeHandler_),this.resizeObserver_.observe(e)}}},$.prototype.resizeElements_=function(){this.graphDiv.style.width=this.width_+"px",this.graphDiv.style.height=this.height_+"px";var e=this.getNumericOption("pixelRatio"),t=e||r.getContextPixelRatio(this.canvas_ctx_);this.canvas_.width=this.width_*t,this.canvas_.height=this.height_*t,this.canvas_.style.width=this.width_+"px",this.canvas_.style.height=this.height_+"px",1!==t&&this.canvas_ctx_.scale(t,t);var n=e||r.getContextPixelRatio(this.hidden_ctx_);this.hidden_.width=this.width_*n,this.hidden_.height=this.height_*n,this.hidden_.style.width=this.width_+"px",this.hidden_.style.height=this.height_+"px",1!==n&&this.hidden_ctx_.scale(n,n)},$.prototype.destroy=function(){this.canvas_ctx_.restore(),this.hidden_ctx_.restore();for(var e=this.plugins_.length-1;e>=0;e--){var t=this.plugins_.pop();t.plugin.destroy&&t.plugin.destroy()}var n=function(e){for(;e.hasChildNodes();)n(e.firstChild),e.removeChild(e.firstChild)};this.removeTrackedEvents_(),r.removeEvent(window,"mouseout",this.mouseOutHandler_),r.removeEvent(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_),this.resizeObserver_&&(this.resizeObserver_.disconnect(),this.resizeObserver_=null),r.removeEvent(window,"resize",this.resizeHandler_),this.resizeHandler_=null,n(this.maindiv_);var i=function(e){for(var t in e)"object"===typeof e[t]&&(e[t]=null)};i(this.layout_),i(this.plotter_),i(this)},$.prototype.createPlotKitCanvas_=function(e){var t=r.createCanvas();return t.style.position="absolute",t.style.top=e.style.top,t.style.left=e.style.left,t.width=this.width_,t.height=this.height_,t.style.width=this.width_+"px",t.style.height=this.height_+"px",t},$.prototype.createMouseEventElement_=function(){return this.canvas_},$.prototype.setColors_=function(){var e=this.getLabels(),t=e.length-1;this.colors_=[],this.colorsMap_={};for(var n=this.getNumericOption("colorSaturation")||1,i=this.getNumericOption("colorValue")||.5,a=Math.ceil(t/2),o=this.getOption("colors"),s=this.visibility(),l=0;l{e.valueRange&&delete e.valueRange})),this.drawGraph_(),void(o&&o.call(this,r,i,this.yAxisRanges()));var s=null,l=null,c=null,u=null;e&&(s=this.xAxisRange(),l=[r,i]),t&&(c=this.yAxisRanges(),u=this.yAxisExtremes());const h=this;this.doAnimatedZoom(s,l,c,u,(function(){h.dateWindow_=null,h.axes_.forEach((e=>{e.valueRange&&delete e.valueRange})),o&&o.call(h,r,i,h.yAxisRanges())}))},$.prototype.doAnimatedZoom=function(e,t,n,i,a){var o,s,l=this.getBooleanOption("animatedZooms")?$.ANIMATION_STEPS:1,c=[],u=[];if(null!==e&&null!==t)for(o=1;o<=l;o++)s=$.zoomAnimationFunction(o,l),c[o-1]=[e[0]*(1-s)+s*t[0],e[1]*(1-s)+s*t[1]];if(null!==n&&null!==i)for(o=1;o<=l;o++){s=$.zoomAnimationFunction(o,l);for(var h=[],d=0;d=0;--h)for(var d=this.layout_.points[h],p=0;p=l.length)){var c=l[s];if(r.isValidPoint(c)){var u=c.canvasy;if(e>c.canvasx&&s+10)u+=(e-c.canvasx)/d*(h.canvasy-c.canvasy)}else if(e0){var d,p=l[s-1];if(r.isValidPoint(p))if((d=c.canvasx-p.canvasx)>0)u+=(c.canvasx-e)/d*(p.canvasy-c.canvasy)}(0===o||u=0){var o=0,s=this.attr_("labels");for(t=1;to&&(o=l)}var c=this.previousVerticalX_;n.clearRect(c-o-1,0,2*o+2,this.height_)}if(this.selPoints_.length>0){var u=this.selPoints_[0].canvasx;for(n.save(),t=0;t=0){e!=this.lastRow_&&(i=!0),this.lastRow_=e;for(var a=0;a=0&&s=0&&(i=!0),this.lastRow_=-1;if(this.selPoints_.length?this.lastx_=this.selPoints_[0].xval:this.lastx_=null,void 0!==t&&(this.highlightSet_!==t&&(i=!0),this.highlightSet_=t),void 0!==n&&(this.lockedSet_=n),i&&(this.updateSelection_(void 0),r)){var u=this.getFunctionOption("highlightCallback");if(u){u.call(this,{},this.lastx_,this.selPoints_,this.lastRow_,this.highlightSet_)}}return i},$.prototype.mouseOut_=function(e){this.getFunctionOption("unhighlightCallback")&&this.getFunctionOption("unhighlightCallback").call(this,e),this.getBooleanOption("hideOverlayOnMouseOut")&&!this.lockedSet_&&this.clearSelection()},$.prototype.clearSelection=function(){this.cascadeEvents_("deselect",{}),this.lockedSet_=!1,this.fadeLevel?this.animateSelection_(-1):(this.canvas_ctx_.clearRect(0,0,this.width_,this.height_),this.fadeLevel=0,this.selPoints_=[],this.lastx_=null,this.lastRow_=-1,this.highlightSet_=null)},$.prototype.getSelection=function(){if(!this.selPoints_||this.selPoints_.length<1)return-1;for(var e=0;e1&&(n=this.dataHandler_.rollingAverage(n,this.rollPeriod_,this.attributes_,t)),this.rolledSeries_.push(n)}this.drawGraph_();var r=new Date;this.drawingTimeMs_=r-e},$.PointType=void 0,$.stackPoints_=function(e,t,n,r){for(var i=null,a=null,o=null,s=-1,l=function(t){if(!(s>=t))for(var n=t;nn[1]&&(n[1]=p),p=1;n--)if(this.visibility()[n-1]){if(t){s=e[n];var d=t[0],p=t[1];for(i=null,a=null,r=0;r=d&&null===i&&(i=r),s[r][0]<=p&&(a=r);null===i&&(i=0);for(var f=i,g=!0;g&&f>0;)g=null===s[--f][1];null===a&&(a=s.length-1);var v=a;for(g=!0;g&&v0;){this.readyFns_.pop()(this)}},$.prototype.computeYAxes_=function(){var e,t,n;for(this.axes_=[],e=0;e0&&(v=0),y<0&&(y=0)),v==1/0&&(v=0),y==-1/0&&(y=1),0===(n=y-v)&&(0!==y?n=Math.abs(y):(y=1,n=1));var _=y,x=v;t&&(h?(_=y+a*n,x=v):((x=v-a*n)<0&&v>=0&&(x=0),(_=y+a*n)>0&&y<=0&&(_=0))),u.extremeRange=[x,_]}if(u.valueRange){var b=s(u.valueRange[0])?u.extremeRange[0]:u.valueRange[0],w=s(u.valueRange[1])?u.extremeRange[1]:u.valueRange[1];u.computedValueRange=[b,w]}else u.computedValueRange=u.extremeRange;if(!t){if((b=u.computedValueRange[0])===(w=u.computedValueRange[1]))if(0===b)w=1;else{var O=Math.abs(b/10);b-=O,w+=O}if(h){var A=a/(2*a-1),S=(a-1)/(2*a-1);u.computedValueRange[0]=r.logRangeFraction(b,w,A),u.computedValueRange[1]=r.logRangeFraction(b,w,S)}else n=w-b,u.computedValueRange[0]=b-n*a,u.computedValueRange[1]=w+n*a}if(p){u.independentTicks=p;var C=(k=this.optionsViewForAxis_("y"+(c?"2":"")))("ticker");u.ticks=C(u.computedValueRange[0],u.computedValueRange[1],this.plotter_.area.h,k,this),o||(o=u)}}if(void 0===o)throw'Configuration Error: At least one axis has to have the "independentTicks" option activated.';for(c=0;c0&&"e"!=e[n-1]&&"E"!=e[n-1]||e.indexOf("/")>=0||isNaN(parseFloat(e)))&&(t=!0),this.setXAxisOptions_(t)},$.prototype.setXAxisOptions_=function(e){e?(this.attrs_.xValueParser=r.dateParser,this.attrs_.axes.x.valueFormatter=r.dateValueFormatter,this.attrs_.axes.x.ticker=l.cc,this.attrs_.axes.x.axisLabelFormatter=r.dateAxisLabelFormatter):(this.attrs_.xValueParser=function(e){return parseFloat(e)},this.attrs_.axes.x.valueFormatter=function(e){return e},this.attrs_.axes.x.ticker=l.Dv,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter)},$.prototype.parseCSV_=function(e){var t,n,i=[],a=r.detectLineDelimiter(e),o=e.split(a||"\n"),s=this.getStringOption("delimiter");-1==o[0].indexOf(s)&&o[0].indexOf("\t")>=0&&(s="\t");var l=0;"labels"in this.user_attrs_||(l=1,this.attrs_.labels=o[0].split(s),this.attributes_.reparseSeries());for(var c,u=!1,h=this.attr_("labels").length,d=!1,p=l;p0&&v[0]0;)t=String.fromCharCode(65+(e-1)%26)+t.toLowerCase(),e=Math.floor((e-1)/26);return t},n=e.getNumberOfColumns(),i=e.getNumberOfRows(),a=e.getColumnType(0);if("date"==a||"datetime"==a)this.attrs_.xValueParser=r.dateParser,this.attrs_.axes.x.valueFormatter=r.dateValueFormatter,this.attrs_.axes.x.ticker=l.cc,this.attrs_.axes.x.axisLabelFormatter=r.dateAxisLabelFormatter;else{if("number"!=a)throw new Error("only 'date', 'datetime' and 'number' types are supported for column 1 of DataTable input (Got '"+a+"')");this.attrs_.xValueParser=function(e){return parseFloat(e)},this.attrs_.axes.x.valueFormatter=function(e){return e},this.attrs_.axes.x.ticker=l.Dv,this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter}var o,s,c=[],u={},h=!1;for(o=1;o0&&m[0]0&&this.setAnnotations(y,!0),this.attributes_.reparseSeries()},$.prototype.cascadeDataDidUpdateEvent_=function(){this.cascadeEvents_("dataDidUpdate",{})},$.prototype.start_=function(){var e=this.file_;"function"==typeof e&&(e=e());const t=r.typeArrayLike(e);if("array"==t)this.rawData_=this.parseArray_(e),this.cascadeDataDidUpdateEvent_(),this.predraw_();else if("object"==t&&"function"==typeof e.getColumnRange)this.parseDataTable_(e),this.cascadeDataDidUpdateEvent_(),this.predraw_();else if("string"==t){if(r.detectLineDelimiter(e))this.loadedEvent_(e);else{var n;n=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");var i=this;n.onreadystatechange=function(){4==n.readyState&&(200!==n.status&&0!==n.status||i.loadedEvent_(n.responseText))},n.open("GET",e,!0),n.send(null)}}else console.error("Unknown data format: "+t)},$.prototype.updateOptions=function(e,t){"undefined"==typeof t&&(t=!1);var n=e.file,i=$.copyUserAttrs_(e),a=this.attributes_.numAxes();"rollPeriod"in i&&(this.rollPeriod_=i.rollPeriod),"dateWindow"in i&&(this.dateWindow_=i.dateWindow);var o=r.isPixelChangingOptionList(this.attr_("labels"),i);r.updateDeep(this.user_attrs_,i),this.attributes_.reparseSeries(),a=n.length?console.warn("Invalid series number in setVisibility: "+i):n[i]=e[i]);else for(i=0;i=n.length?console.warn("Invalid series number in setVisibility: "+i):n[i]=e[i]:e[i]<0||e[i]>=n.length?console.warn("Invalid series number in setVisibility: "+e[i]):n[e[i]]=t;this.predraw_()},$.prototype.size=function(){return{width:this.width_,height:this.height_}},$.prototype.setAnnotations=function(e,t){this.annotations_=e,this.layout_?(this.layout_.setAnnotations(this.annotations_),t||this.predraw_()):console.warn("Tried to setAnnotations before dygraph was ready. Try setting them in a ready() block. See dygraphs.com/tests/annotation.html")},$.prototype.annotations=function(){return this.annotations_},$.prototype.getLabels=function(){var e=this.attr_("labels");return e?e.slice():null},$.prototype.indexFromSetName=function(e){return this.setIndexByName_[e]},$.prototype.getRowForX=function(e){for(var t=0,n=this.numRows()-1;t<=n;){var r=n+t>>1,i=this.getValue(r,0);if(ie)n=r-1;else{if(t==r)return r;n=r}}return null},$.prototype.ready=function(e){this.is_initial_draw_?this.readyFns_.push(e):e.call(this,this)},$.prototype.addAndTrackEvent=function(e,t,n){r.addEvent(e,t,n),this.registeredEvents_.push({elem:e,type:t,fn:n})},$.prototype.removeTrackedEvents_=function(){if(this.registeredEvents_)for(var e=0;ee.y&&l>t.y?(l=Math.max(e.y,t.y),u=2*t.y-l):lt.y&&u>n.y?(u=Math.max(t.y,n.y),l=2*t.y-u):u1&&(a=window.devicePixelRatio,r.style.width=r.style.height=[t.size,"px"].join(""),r.width=r.height=t.size*a,i.scale(a,a)),i.translate(t.size/2,t.size/2),i.rotate((t.rotate/180-.5)*Math.PI);var o=(t.size-t.lineWidth)/2;t.scaleColor&&t.scaleLength&&(o-=t.scaleLength+2),Date.now=Date.now||function(){return+new Date};var s=function(e,t,n){var r=(n=Math.min(Math.max(-1,n||0),1))<=0;i.beginPath(),i.arc(0,0,o,0,2*Math.PI*n,r),i.strokeStyle=e,i.lineWidth=t,i.stroke()},l=function(){var e,n;i.lineWidth=1,i.fillStyle=t.scaleColor,i.save();for(var r=24;r>0;--r)r%6===0?(n=t.scaleLength,e=0):(n=.6*t.scaleLength,e=t.scaleLength-n),i.fillRect(-t.size/2+e,0,n,1),i.rotate(Math.PI/12);i.restore()},c=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)},u=function(){t.scaleColor&&l(),t.trackColor&&s(t.trackColor,t.trackWidth||t.lineWidth,1)};this.getCanvas=function(){return r},this.getCtx=function(){return i},this.clear=function(){i.clearRect(t.size/-2,t.size/-2,t.size,t.size)},this.draw=function(e){var r;t.scaleColor||t.trackColor?i.getImageData&&i.putImageData?n?i.putImageData(n,0,0):(u(),n=i.getImageData(0,0,t.size*a,t.size*a)):(this.clear(),u()):this.clear(),i.lineCap=t.lineCap,r="function"===typeof t.barColor?t.barColor(e):t.barColor,s(r,t.lineWidth,e/100)}.bind(this),this.animate=function(e,n){var r=Date.now();t.onStart(e,n);var i=function(){var a=Math.min(Date.now()-r,t.animate.duration),o=t.easing(this,a,e,n-e,t.animate.duration);this.draw(o),t.onStep(e,n,o),a>=t.animate.duration?t.onStop(e,n):c(i)}.bind(this);c(i)}.bind(this)};return function(t,n){var r={barColor:"#ef1e25",trackColor:"#f9f9f9",scaleColor:"#dfe0e0",scaleLength:5,lineCap:"round",lineWidth:3,trackWidth:void 0,size:110,rotate:0,animate:{duration:1e3,enabled:!0},easing:function(e,t,n,r,i){return(t/=i/2)<1?r/2*t*t+n:-r/2*(--t*(t-2)-1)+n},onStart:function(e,t){},onStep:function(e,t,n){},onStop:function(e,t){}};if("undefined"!==typeof e)r.renderer=e;else{if("undefined"===typeof SVGRenderer)throw new Error("Please load either the SVG- or the CanvasRenderer");r.renderer=SVGRenderer}var i={},a=0,o=function(){for(var e in this.el=t,this.options=i,r)r.hasOwnProperty(e)&&(i[e]=n&&"undefined"!==typeof n[e]?n[e]:r[e],"function"===typeof i[e]&&(i[e]=i[e].bind(this)));"string"===typeof i.easing&&"undefined"!==typeof jQuery&&jQuery.isFunction(jQuery.easing[i.easing])?i.easing=jQuery.easing[i.easing]:i.easing=r.easing,"number"===typeof i.animate&&(i.animate={duration:i.animate,enabled:!0}),"boolean"!==typeof i.animate||i.animate||(i.animate={duration:1e3,enabled:i.animate}),this.renderer=new i.renderer(t,i),this.renderer.draw(a),t.dataset&&t.dataset.percent?this.update(parseFloat(t.dataset.percent)):t.getAttribute&&t.getAttribute("data-percent")&&this.update(parseFloat(t.getAttribute("data-percent")))}.bind(this);this.update=function(e){return e=parseFloat(e),i.animate.enabled?this.renderer.animate(a,e):this.renderer.draw(e),a=e,this}.bind(this),this.disableAnimation=function(){return i.animate.enabled=!1,this},this.enableAnimation=function(){return i.animate.enabled=!0,this},o()}}()}.apply(t,[]))||(e.exports=n)},92806:function(e){"use strict";e.exports=function(e,t){for(var n={},r=Object.keys(e),i=Array.isArray(t),a=0;a