-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathcloudinary.js
More file actions
1 lines (1 loc) · 340 KB
/
cloudinary.js
File metadata and controls
1 lines (1 loc) · 340 KB
1
!function(){var t={172:function(t){t.exports=function(t,e){this.v=t,this.k=e},t.exports.__esModule=!0,t.exports.default=t.exports},373:function(t){t.exports=function(t){var e=Object(t),i=[];for(var n in e)i.unshift(n);return function t(){for(;i.length;)if((n=i.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},t.exports.__esModule=!0,t.exports.default=t.exports},544:function(){!function(){const t=function(){const t=jQuery("#field-video_player").val(),e=jQuery("#field-video_controls").prop("checked"),i=jQuery('#field-video_autoplay_mode option[value="off"]');"cld"!==t||e?i.prop("disabled",!1):(i.prop("disabled",!0),i.prop("selected")&&i.next().prop("selected",!0))};t(),jQuery(document).on("change","#field-video_player",t),jQuery(document).on("change","#field-video_controls",t),jQuery(document).ready(function(t){t.isFunction(t.fn.wpColorPicker)&&t(".regular-color").wpColorPicker(),t(document).on("tabs.init",function(){const e=t(".settings-tab-trigger"),i=t(".settings-tab-section");t(this).on("click",".settings-tab-trigger",function(n){const r=t(this),o=t(r.attr("href"));n.preventDefault(),e.removeClass("active"),i.removeClass("active"),r.addClass("active"),o.addClass("active"),t(document).trigger("settings.tabbed",r)}),t(".cld-field").not('[data-condition="false"]').each(function(){const e=t(this),i=e.data("condition");for(const n in i){let r=t("#field-"+n);const o=i[n],s=e.closest("tr");r.length||(r=t(`[id^=field-${n}-]`));let a=!1;r.on("change init",function(t,e=!1){if(a&&e)return;let i=this.value===o||this.checked;if(Array.isArray(o)&&2===o.length)switch(o[1]){case"neq":i=this.value!==o[0];break;case"gt":i=this.value>o[0];break;case"lt":i=this.value<o[0]}i?s.show():s.hide(),a=!0}),r.trigger("init",!0)}}),t("#field-cloudinary_url").on("input change",function(){const e=t(this),i=e.val();new RegExp(/^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d)*[:]{1}[^:@]*[@]{1}[^@]*$/g).test(i)?(e.addClass("settings-valid-field"),e.removeClass("settings-invalid-field")):(e.removeClass("settings-valid-field"),e.addClass("settings-invalid-field"))}).trigger("change"),t('[name="cloudinary_sync_media[auto_sync]"]').change(function(){"on"===t(this).val()&&t("#auto-sync-alert-btn").click()})}),t(".render-trigger[data-event]").each(function(){const e=t(this),i=e.data("event");e.trigger(i,this)})})}(window,jQuery)},546:function(t){function e(i,n,r,o){var s=Object.defineProperty;try{s({},"",{})}catch(i){s=0}t.exports=e=function(t,i,n,r){function o(i,n){e(t,i,function(t){return this._invoke(i,n,t)})}i?s?s(t,i,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[i]=n:(o("next",0),o("throw",1),o("return",2))},t.exports.__esModule=!0,t.exports.default=t.exports,e(i,n,r,o)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},579:function(t,e,i){var n=i(738).default;t.exports=function(t){if(null!=t){var e=t["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],i=0;if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}}}throw new TypeError(n(t)+" is not iterable")},t.exports.__esModule=!0,t.exports.default=t.exports},604:function(t,e,i){var n;!function(){"use strict";var r={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(t){return function(t,e){var i,n,s,a,l,c,h,u,d,f=1,p=t.length,g="";for(n=0;n<p;n++)if("string"==typeof t[n])g+=t[n];else if("object"==typeof t[n]){if((a=t[n]).keys)for(i=e[f],s=0;s<a.keys.length;s++){if(null==i)throw new Error(o('[sprintf] Cannot access property "%s" of undefined value "%s"',a.keys[s],a.keys[s-1]));i=i[a.keys[s]]}else i=a.param_no?e[a.param_no]:e[f++];if(r.not_type.test(a.type)&&r.not_primitive.test(a.type)&&i instanceof Function&&(i=i()),r.numeric_arg.test(a.type)&&"number"!=typeof i&&isNaN(i))throw new TypeError(o("[sprintf] expecting number but found %T",i));switch(r.number.test(a.type)&&(u=i>=0),a.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,a.width?parseInt(a.width):0);break;case"e":i=a.precision?parseFloat(i).toExponential(a.precision):parseFloat(i).toExponential();break;case"f":i=a.precision?parseFloat(i).toFixed(a.precision):parseFloat(i);break;case"g":i=a.precision?String(Number(i.toPrecision(a.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=a.precision?i.substring(0,a.precision):i;break;case"t":i=String(!!i),i=a.precision?i.substring(0,a.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=a.precision?i.substring(0,a.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=a.precision?i.substring(0,a.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}r.json.test(a.type)?g+=i:(!r.number.test(a.type)||u&&!a.sign?d="":(d=u?"+":"-",i=i.toString().replace(r.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",h=a.width-(d+i).length,l=a.width&&h>0?c.repeat(h):"",g+=a.align?d+i+l:"0"===c?d+l+i:l+d+i)}return g}(function(t){if(a[t])return a[t];var e,i=t,n=[],o=0;for(;i;){if(null!==(e=r.text.exec(i)))n.push(e[0]);else if(null!==(e=r.modulo.exec(i)))n.push("%");else{if(null===(e=r.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){o|=1;var s=[],l=e[2],c=[];if(null===(c=r.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=r.key_access.exec(l)))s.push(c[1]);else{if(null===(c=r.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}e[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}i=i.substring(e[0].length)}return a[t]=n}(t),arguments)}function s(t,e){return o.apply(null,[t].concat(e||[]))}var a=Object.create(null);"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(n=function(){return{sprintf:o,vsprintf:s}}.call(e,i,e,t))||(t.exports=n))}()},616:function(t){t.exports=function(t,e){var i,n,r=0;function o(){var o,s,a=i,l=arguments.length;t:for(;a;){if(a.args.length===arguments.length){for(s=0;s<l;s++)if(a.args[s]!==arguments[s]){a=a.next;continue t}return a!==i&&(a===n&&(n=a.prev),a.prev.next=a.next,a.next&&(a.next.prev=a.prev),a.next=i,a.prev=null,i.prev=a,i=a),a.val}a=a.next}for(o=new Array(l),s=0;s<l;s++)o[s]=arguments[s];return a={args:o,val:t.apply(null,o)},i?(i.prev=a,a.next=i):n=a,r===e.maxSize?(n=n.prev).next=null:r++,i=a,a.val}return e=e||{},o.clear=function(){i=null,n=null,r=0},o}},617:function(){!function(){"use strict";var t,e,i={rootMargin:"256px 0px",threshold:.01,lazyImage:'img[loading="lazy"]',lazyIframe:'iframe[loading="lazy"]'},n="loading"in HTMLImageElement.prototype&&"loading"in HTMLIFrameElement.prototype,r="onscroll"in window;function o(t){var e,i,n=[];"picture"===t.parentNode.tagName.toLowerCase()&&((i=(e=t.parentNode).querySelector("source[data-lazy-remove]"))&&e.removeChild(i),n=Array.prototype.slice.call(t.parentNode.querySelectorAll("source"))),n.push(t),n.forEach(function(t){t.hasAttribute("data-lazy-srcset")&&(t.setAttribute("srcset",t.getAttribute("data-lazy-srcset")),t.removeAttribute("data-lazy-srcset"))}),t.setAttribute("src",t.getAttribute("data-lazy-src")),t.removeAttribute("data-lazy-src")}function s(e){var i=document.createElement("div");for(i.innerHTML=function(e){var i=e.textContent||e.innerHTML,o="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 "+((i.match(/width=['"](\d+)['"]/)||!1)[1]||1)+" "+((i.match(/height=['"](\d+)['"]/)||!1)[1]||1)+"%27%3E%3C/svg%3E";return!n&&r&&(void 0===t?i=i.replace(/(?:\r\n|\r|\n|\t| )src=/g,' lazyload="1" src='):("picture"===e.parentNode.tagName.toLowerCase()&&(i='<source srcset="'+o+'" data-lazy-remove="true"></source>'+i),i=i.replace(/(?:\r\n|\r|\n|\t| )srcset=/g," data-lazy-srcset=").replace(/(?:\r\n|\r|\n|\t| )src=/g,' src="'+o+'" data-lazy-src='))),i}(e);i.firstChild;)n||!r||void 0===t||!i.firstChild.tagName||"img"!==i.firstChild.tagName.toLowerCase()&&"iframe"!==i.firstChild.tagName.toLowerCase()||t.observe(i.firstChild),e.parentNode.insertBefore(i.firstChild,e);e.parentNode.removeChild(e)}function a(){document.querySelectorAll("noscript.loading-lazy").forEach(s),void 0!==window.matchMedia&&window.matchMedia("print").addListener(function(t){t.matches&&document.querySelectorAll(i.lazyImage+"[data-lazy-src],"+i.lazyIframe+"[data-lazy-src]").forEach(function(t){o(t)})})}"undefined"!=typeof NodeList&&NodeList.prototype&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach),"IntersectionObserver"in window&&(t=new IntersectionObserver(function(t,e){t.forEach(function(t){if(0!==t.intersectionRatio){var i=t.target;e.unobserve(i),o(i)}})},i)),e="requestAnimationFrame"in window?window.requestAnimationFrame:function(t){t()},/comp|inter/.test(document.readyState)?e(a):"addEventListener"in document?document.addEventListener("DOMContentLoaded",function(){e(a)}):document.attachEvent("onreadystatechange",function(){"complete"===document.readyState&&a()})}()},633:function(t,e,i){var n=i(172),r=i(993),o=i(869),s=i(887),a=i(791),l=i(373),c=i(579);function h(){"use strict";var e=r(),i=e.m(h),u=(Object.getPrototypeOf?Object.getPrototypeOf(i):i.__proto__).constructor;function d(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===u||"GeneratorFunction"===(e.displayName||e.name))}var f={throw:1,return:2,break:3,continue:3};function p(t){var e,i;return function(n){e||(e={stop:function(){return i(n.a,2)},catch:function(){return n.v},abrupt:function(t,e){return i(n.a,f[t],e)},delegateYield:function(t,r,o){return e.resultName=r,i(n.d,c(t),o)},finish:function(t){return i(n.f,t)}},i=function(t,i,r){n.p=e.prev,n.n=e.next;try{return t(i,r)}finally{e.next=n.n}}),e.resultName&&(e[e.resultName]=n.v,e.resultName=void 0),e.sent=n.v,e.next=n.n;try{return t.call(this,e)}finally{n.p=e.prev,n.n=e.next}}}return(t.exports=h=function(){return{wrap:function(t,i,n,r){return e.w(p(t),i,n,r&&r.reverse())},isGeneratorFunction:d,mark:e.m,awrap:function(t,e){return new n(t,e)},AsyncIterator:a,async:function(t,e,i,n,r){return(d(e)?s:o)(p(t),e,i,n,r)},keys:l,values:c}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=h,t.exports.__esModule=!0,t.exports.default=t.exports},712:function(){const t=document.querySelector(".cloudinary-collapsible__toggle");t&&t.addEventListener("click",function(){const t=document.querySelector(".cloudinary-collapsible__content"),e="none"===window.getComputedStyle(t,null).getPropertyValue("display"),i=document.querySelector(".cloudinary-collapsible__toggle button i");t.style.display=e?"block":"none";const n="dashicons-arrow-down-alt2",r="dashicons-arrow-up-alt2";i.classList.contains(n)?(i.classList.remove(n),i.classList.add(r)):(i.classList.remove(r),i.classList.add(n))})},738:function(t){function e(i){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(i)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},756:function(t,e,i){var n=i(633)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},791:function(t,e,i){var n=i(172),r=i(546);t.exports=function t(e,i){function o(t,r,s,a){try{var l=e[t](r),c=l.value;return c instanceof n?i.resolve(c.v).then(function(t){o("next",t,s,a)},function(t){o("throw",t,s,a)}):i.resolve(c).then(function(t){l.value=t,s(l)},function(t){return o("throw",t,s,a)})}catch(t){a(t)}}var s;this.next||(r(t.prototype),r(t.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),r(this,"_invoke",function(t,e,n){function r(){return new i(function(e,i){o(t,n,e,i)})}return s=s?s.then(r,r):r()},!0)},t.exports.__esModule=!0,t.exports.default=t.exports},869:function(t,e,i){var n=i(887);t.exports=function(t,e,i,r,o){var s=n(t,e,i,r,o);return s.next().then(function(t){return t.done?t.value:s.next()})},t.exports.__esModule=!0,t.exports.default=t.exports},887:function(t,e,i){var n=i(993),r=i(791);t.exports=function(t,e,i,o,s){return new r(n().w(t,e,i,o),s||Promise)},t.exports.__esModule=!0,t.exports.default=t.exports},941:function(t,e,i){var n;t.exports=function(){function t(e,i,n){function r(s,a){if(!i[s]){if(!e[s]){if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[s]={exports:{}};e[s][0].call(c.exports,function(t){return r(e[s][1][t]||t)},c,c.exports,t,e,i,n)}return i[s].exports}for(var o=void 0,s=0;s<n.length;s++)r(n[s]);return r}return t}()({1:[function(t,e,n){(function(t){(function(){var i=200,r="__lodash_hash_undefined__",o=800,s=16,a=9007199254740991,l="[object Arguments]",c="[object Array]",h="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",g="[object GeneratorFunction]",m="[object Map]",b="[object Number]",v="[object Null]",y="[object Object]",x="[object Proxy]",_="[object RegExp]",w="[object Set]",k="[object String]",O="[object Undefined]",S="[object WeakMap]",M="[object ArrayBuffer]",E="[object DataView]",P="[object Float64Array]",T="[object Int8Array]",A="[object Int16Array]",C="[object Int32Array]",L="[object Uint8Array]",D="[object Uint8ClampedArray]",j="[object Uint16Array]",I="[object Uint32Array]",R=/[\\^$.*+?()[\]{}|]/g,F=/^\[object .+?Constructor\]$/,z=/^(?:0|[1-9]\d*)$/,N={};N["[object Float32Array]"]=N[P]=N[T]=N[A]=N[C]=N[L]=N[D]=N[j]=N[I]=!0,N[l]=N[c]=N[M]=N[u]=N[E]=N[d]=N[f]=N[p]=N[m]=N[b]=N[y]=N[_]=N[w]=N[k]=N[S]=!1;var B="object"==typeof t&&t&&t.Object===Object&&t,W="object"==typeof self&&self&&self.Object===Object&&self,V=B||W||Function("return this")(),H="object"==typeof n&&n&&!n.nodeType&&n,$=H&&"object"==typeof e&&e&&!e.nodeType&&e,U=$&&$.exports===H,q=U&&B.process,Y=function(){try{var t=$&&$.require&&$.require("util").types;return t||q&&q.binding&&q.binding("util")}catch(t){}}(),X=Y&&Y.isTypedArray;function G(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)}function K(t,e){for(var i=-1,n=Array(t);++i<t;)n[i]=e(i);return n}function J(t){return function(e){return t(e)}}function Q(t,e){return null==t?void 0:t[e]}function Z(t,e){return function(i){return t(e(i))}}var tt,et=Array.prototype,it=Function.prototype,nt=Object.prototype,rt=V["__core-js_shared__"],ot=it.toString,st=nt.hasOwnProperty,at=(tt=/[^.]+$/.exec(rt&&rt.keys&&rt.keys.IE_PROTO||""))?"Symbol(src)_1."+tt:"",lt=nt.toString,ct=ot.call(Object),ht=RegExp("^"+ot.call(st).replace(R,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ut=U?V.Buffer:void 0,dt=V.Symbol,ft=V.Uint8Array,pt=ut?ut.allocUnsafe:void 0,gt=Z(Object.getPrototypeOf,Object),mt=Object.create,bt=nt.propertyIsEnumerable,vt=et.splice,yt=dt?dt.toStringTag:void 0,xt=function(){try{var t=ye(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),_t=ut?ut.isBuffer:void 0,wt=Math.max,kt=Date.now,Ot=ye(V,"Map"),St=ye(Object,"create"),Mt=function(){function t(){}return function(e){if(!Ve(e))return{};if(mt)return mt(e);t.prototype=e;var i=new t;return t.prototype=void 0,i}}();function Et(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}function Pt(){this.__data__=St?St(null):{},this.size=0}function Tt(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function At(t){var e=this.__data__;if(St){var i=e[t];return i===r?void 0:i}return st.call(e,t)?e[t]:void 0}function Ct(t){var e=this.__data__;return St?void 0!==e[t]:st.call(e,t)}function Lt(t,e){var i=this.__data__;return this.size+=this.has(t)?0:1,i[t]=St&&void 0===e?r:e,this}function Dt(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}function jt(){this.__data__=[],this.size=0}function It(t){var e=this.__data__,i=te(e,t);return!(i<0||(i==e.length-1?e.pop():vt.call(e,i,1),--this.size,0))}function Rt(t){var e=this.__data__,i=te(e,t);return i<0?void 0:e[i][1]}function Ft(t){return te(this.__data__,t)>-1}function zt(t,e){var i=this.__data__,n=te(i,t);return n<0?(++this.size,i.push([t,e])):i[n][1]=e,this}function Nt(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e<i;){var n=t[e];this.set(n[0],n[1])}}function Bt(){this.size=0,this.__data__={hash:new Et,map:new(Ot||Dt),string:new Et}}function Wt(t){var e=ve(this,t).delete(t);return this.size-=e?1:0,e}function Vt(t){return ve(this,t).get(t)}function Ht(t){return ve(this,t).has(t)}function $t(t,e){var i=ve(this,t),n=i.size;return i.set(t,e),this.size+=i.size==n?0:1,this}function Ut(t){var e=this.__data__=new Dt(t);this.size=e.size}function qt(){this.__data__=new Dt,this.size=0}function Yt(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i}function Xt(t){return this.__data__.get(t)}function Gt(t){return this.__data__.has(t)}function Kt(t,e){var n=this.__data__;if(n instanceof Dt){var r=n.__data__;if(!Ot||r.length<i-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Nt(r)}return n.set(t,e),this.size=n.size,this}function Jt(t,e){var i=Re(t),n=!i&&Ie(t),r=!i&&!n&&Ne(t),o=!i&&!n&&!r&&Ue(t),s=i||n||r||o,a=s?K(t.length,String):[],l=a.length;for(var c in t)!e&&!st.call(t,c)||s&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||we(c,l))||a.push(c);return a}function Qt(t,e,i){(void 0!==i&&!je(t[e],i)||void 0===i&&!(e in t))&&ee(t,e,i)}function Zt(t,e,i){var n=t[e];st.call(t,e)&&je(n,i)&&(void 0!==i||e in t)||ee(t,e,i)}function te(t,e){for(var i=t.length;i--;)if(je(t[i][0],e))return i;return-1}function ee(t,e,i){"__proto__"==e&&xt?xt(t,e,{configurable:!0,enumerable:!0,value:i,writable:!0}):t[e]=i}Et.prototype.clear=Pt,Et.prototype.delete=Tt,Et.prototype.get=At,Et.prototype.has=Ct,Et.prototype.set=Lt,Dt.prototype.clear=jt,Dt.prototype.delete=It,Dt.prototype.get=Rt,Dt.prototype.has=Ft,Dt.prototype.set=zt,Nt.prototype.clear=Bt,Nt.prototype.delete=Wt,Nt.prototype.get=Vt,Nt.prototype.has=Ht,Nt.prototype.set=$t,Ut.prototype.clear=qt,Ut.prototype.delete=Yt,Ut.prototype.get=Xt,Ut.prototype.has=Gt,Ut.prototype.set=Kt;var ie=be();function ne(t){return null==t?void 0===t?O:v:yt&&yt in Object(t)?xe(t):Pe(t)}function re(t){return He(t)&&ne(t)==l}function oe(t){return!(!Ve(t)||Se(t))&&(Be(t)?ht:F).test(De(t))}function se(t){return He(t)&&We(t.length)&&!!N[ne(t)]}function ae(t){if(!Ve(t))return Ee(t);var e=Me(t),i=[];for(var n in t)("constructor"!=n||!e&&st.call(t,n))&&i.push(n);return i}function le(t,e,i,n,r){t!==e&&ie(e,function(o,s){if(r||(r=new Ut),Ve(o))ce(t,e,s,i,le,n,r);else{var a=n?n(Ae(t,s),o,s+"",t,e,r):void 0;void 0===a&&(a=o),Qt(t,s,a)}},Ye)}function ce(t,e,i,n,r,o,s){var a=Ae(t,i),l=Ae(e,i),c=s.get(l);if(c)Qt(t,i,c);else{var h=o?o(a,l,i+"",t,e,s):void 0,u=void 0===h;if(u){var d=Re(l),f=!d&&Ne(l),p=!d&&!f&&Ue(l);h=l,d||f||p?Re(a)?h=a:ze(a)?h=pe(a):f?(u=!1,h=ue(l,!0)):p?(u=!1,h=fe(l,!0)):h=[]:$e(l)||Ie(l)?(h=a,Ie(a)?h=qe(a):Ve(a)&&!Be(a)||(h=_e(l))):u=!1}u&&(s.set(l,h),r(h,l,n,o,s),s.delete(l)),Qt(t,i,h)}}function he(t,e){return Ce(Te(t,e,Ke),t+"")}function ue(t,e){if(e)return t.slice();var i=t.length,n=pt?pt(i):new t.constructor(i);return t.copy(n),n}function de(t){var e=new t.constructor(t.byteLength);return new ft(e).set(new ft(t)),e}function fe(t,e){var i=e?de(t.buffer):t.buffer;return new t.constructor(i,t.byteOffset,t.length)}function pe(t,e){var i=-1,n=t.length;for(e||(e=Array(n));++i<n;)e[i]=t[i];return e}function ge(t,e,i,n){var r=!i;i||(i={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=n?n(i[a],t[a],a,i,t):void 0;void 0===l&&(l=t[a]),r?ee(i,a,l):Zt(i,a,l)}return i}function me(t){return he(function(e,i){var n=-1,r=i.length,o=r>1?i[r-1]:void 0,s=r>2?i[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,s&&ke(i[0],i[1],s)&&(o=r<3?void 0:o,r=1),e=Object(e);++n<r;){var a=i[n];a&&t(e,a,n,o)}return e})}function be(t){return function(e,i,n){for(var r=-1,o=Object(e),s=n(e),a=s.length;a--;){var l=s[t?a:++r];if(!1===i(o[l],l,o))break}return e}}function ve(t,e){var i=t.__data__;return Oe(e)?i["string"==typeof e?"string":"hash"]:i.map}function ye(t,e){var i=Q(t,e);return oe(i)?i:void 0}function xe(t){var e=st.call(t,yt),i=t[yt];try{t[yt]=void 0;var n=!0}catch(t){}var r=lt.call(t);return n&&(e?t[yt]=i:delete t[yt]),r}function _e(t){return"function"!=typeof t.constructor||Me(t)?{}:Mt(gt(t))}function we(t,e){var i=typeof t;return!!(e=null==e?a:e)&&("number"==i||"symbol"!=i&&z.test(t))&&t>-1&&t%1==0&&t<e}function ke(t,e,i){if(!Ve(i))return!1;var n=typeof e;return!!("number"==n?Fe(i)&&we(e,i.length):"string"==n&&e in i)&&je(i[e],t)}function Oe(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}function Se(t){return!!at&&at in t}function Me(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||nt)}function Ee(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e}function Pe(t){return lt.call(t)}function Te(t,e,i){return e=wt(void 0===e?t.length-1:e,0),function(){for(var n=arguments,r=-1,o=wt(n.length-e,0),s=Array(o);++r<o;)s[r]=n[e+r];r=-1;for(var a=Array(e+1);++r<e;)a[r]=n[r];return a[e]=i(s),G(t,this,a)}}function Ae(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ce=Le(xt?function(t,e){return xt(t,"toString",{configurable:!0,enumerable:!1,value:Ge(e),writable:!0})}:Ke);function Le(t){var e=0,i=0;return function(){var n=kt(),r=s-(n-i);if(i=n,r>0){if(++e>=o)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function De(t){if(null!=t){try{return ot.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function je(t,e){return t===e||t!=t&&e!=e}var Ie=re(function(){return arguments}())?re:function(t){return He(t)&&st.call(t,"callee")&&!bt.call(t,"callee")},Re=Array.isArray;function Fe(t){return null!=t&&We(t.length)&&!Be(t)}function ze(t){return He(t)&&Fe(t)}var Ne=_t||Je;function Be(t){if(!Ve(t))return!1;var e=ne(t);return e==p||e==g||e==h||e==x}function We(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=a}function Ve(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function He(t){return null!=t&&"object"==typeof t}function $e(t){if(!He(t)||ne(t)!=y)return!1;var e=gt(t);if(null===e)return!0;var i=st.call(e,"constructor")&&e.constructor;return"function"==typeof i&&i instanceof i&&ot.call(i)==ct}var Ue=X?J(X):se;function qe(t){return ge(t,Ye(t))}function Ye(t){return Fe(t)?Jt(t,!0):ae(t)}var Xe=me(function(t,e,i){le(t,e,i)});function Ge(t){return function(){return t}}function Ke(t){return t}function Je(){return!1}e.exports=Xe}).call(this)}).call(this,void 0!==i.g?i.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,i){var r,o;r=self,o=function(){return function(){"use strict";var t={720:function(t,e,i){i.r(e),i.d(e,{Scene:function(){return ae},Tweenable:function(){return St},interpolate:function(){return ee},processTweens:function(){return bt},setBezierFunction:function(){return H},shouldScheduleUpdate:function(){return xt},tween:function(){return Mt},unsetBezierFunction:function(){return $}});var n={};i.r(n),i.d(n,{bounce:function(){return I},bouncePast:function(){return R},easeFrom:function(){return z},easeFromTo:function(){return F},easeInBack:function(){return P},easeInCirc:function(){return O},easeInCubic:function(){return c},easeInExpo:function(){return _},easeInOutBack:function(){return A},easeInOutCirc:function(){return M},easeInOutCubic:function(){return u},easeInOutExpo:function(){return k},easeInOutQuad:function(){return l},easeInOutQuart:function(){return p},easeInOutQuint:function(){return b},easeInOutSine:function(){return x},easeInQuad:function(){return s},easeInQuart:function(){return d},easeInQuint:function(){return g},easeInSine:function(){return v},easeOutBack:function(){return T},easeOutBounce:function(){return E},easeOutCirc:function(){return S},easeOutCubic:function(){return h},easeOutExpo:function(){return w},easeOutQuad:function(){return a},easeOutQuart:function(){return f},easeOutQuint:function(){return m},easeOutSine:function(){return y},easeTo:function(){return N},elastic:function(){return C},linear:function(){return o},swingFrom:function(){return D},swingFromTo:function(){return L},swingTo:function(){return j}});var r={};i.r(r),i.d(r,{afterTween:function(){return Gt},beforeTween:function(){return Xt},doesApply:function(){return qt},tweenCreated:function(){return Yt}});var o=function(t){return t},s=function(t){return Math.pow(t,2)},a=function(t){return-(Math.pow(t-1,2)-1)},l=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},c=function(t){return Math.pow(t,3)},h=function(t){return Math.pow(t-1,3)+1},u=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},d=function(t){return Math.pow(t,4)},f=function(t){return-(Math.pow(t-1,4)-1)},p=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},g=function(t){return Math.pow(t,5)},m=function(t){return Math.pow(t-1,5)+1},b=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},v=function(t){return 1-Math.cos(t*(Math.PI/2))},y=function(t){return Math.sin(t*(Math.PI/2))},x=function(t){return-.5*(Math.cos(Math.PI*t)-1)},_=function(t){return 0===t?0:Math.pow(2,10*(t-1))},w=function(t){return 1===t?1:1-Math.pow(2,-10*t)},k=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},O=function(t){return-(Math.sqrt(1-t*t)-1)},S=function(t){return Math.sqrt(1-Math.pow(t-1,2))},M=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},E=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},P=function(t){var e=1.70158;return t*t*((e+1)*t-e)},T=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},A=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},C=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},L=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},D=function(t){var e=1.70158;return t*t*((e+1)*t-e)},j=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},I=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},R=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},F=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},z=function(t){return Math.pow(t,4)},N=function(t){return Math.pow(t,.25)};function B(t,e,i,n,r,o){var s,a,l,c,h,u=0,d=0,f=0,p=function(t){return((u*t+d)*t+f)*t},g=function(t){return(3*u*t+2*d)*t+f},m=function(t){return t>=0?t:0-t};return u=1-(f=3*e)-(d=3*(n-e)-f),l=1-(h=3*i)-(c=3*(r-i)-h),s=t,a=function(t){return 1/(200*t)}(o),function(t){return((l*t+c)*t+h)*t}(function(t,e){var i,n,r,o,s,a;for(r=t,a=0;a<8;a++){if(o=p(r)-t,m(o)<e)return r;if(s=g(r),m(s)<1e-6)break;r-=o/s}if((r=t)<(i=0))return i;if(r>(n=1))return n;for(;i<n;){if(o=p(r),m(o-t)<e)return r;t>o?i=r:n=r,r=.5*(n-i)+i}return r}(s,a))}var W,V=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.25,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.25,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.75,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.75;return function(r){return B(r,t,e,i,n,1)}},H=function(t,e,i,n,r){var o=V(e,i,n,r);return o.displayName=t,o.x1=e,o.y1=i,o.x2=n,o.y2=r,St.formulas[t]=o},$=function(t){return delete St.formulas[t]};function U(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function q(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Y(t){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Y(t)}function X(t){return function(t){if(Array.isArray(t))return G(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return G(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?G(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function K(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function J(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?K(Object(i),!0).forEach(function(e){Q(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):K(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function Q(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Z,tt,et,it="linear",nt="undefined"!=typeof window?window:i.g,rt="afterTween",ot="afterTweenEnd",st="beforeTween",at="tweenCreated",lt="function",ct="string",ht=nt.requestAnimationFrame||nt.webkitRequestAnimationFrame||nt.oRequestAnimationFrame||nt.msRequestAnimationFrame||nt.mozCancelRequestAnimationFrame&&nt.mozRequestAnimationFrame||setTimeout,ut=function(){},dt=null,ft=null,pt=J({},n),gt=function(t,e,i,n,r,o,s){var a,l,c,h=t<o?0:(t-o)/r,u=!1;for(var d in s&&s.call&&(u=!0,a=s(h)),e)u||(a=((l=s[d]).call?l:pt[l])(h)),c=i[d],e[d]=c+(n[d]-c)*a;return e},mt=function(t,e){var i=t._timestamp,n=t._currentState,r=t._delay;if(!(e<i+r)){var o=t._duration,s=t._targetState,a=i+r+o,l=e>a?a:e;t._hasEnded=l>=a;var c=o-(a-l),h=t._filters.length>0;if(t._hasEnded)return t._render(s,t._data,c),t.stop(!0);h&&t._applyFilter(st),l<i+r?i=o=l=1:i+=r,gt(l,n,t._originalState,s,o,i,t._easing),h&&t._applyFilter(rt),t._render(n,t._data,c)}},bt=function(){for(var t,e=St.now(),i=dt;i;)t=i._next,mt(i,e),i=t},vt=Date.now||function(){return+new Date},yt=!1,xt=function(t){t&&yt||(yt=t,t&&_t())},_t=function t(){Z=vt(),yt&&ht.call(nt,t,16.666666666666668),bt()},wt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:it,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Array.isArray(e))return V.apply(void 0,X(e));var n=Y(e);if(pt[e])return pt[e];if(n===ct||n===lt)for(var r in t)i[r]=e;else for(var o in t)i[o]=e[o]||it;return i},kt=function(t){t===dt?(dt=t._next)?dt._previous=null:ft=null:t===ft?(ft=t._previous)?ft._next=null:dt=null:(tt=t._previous,et=t._next,tt._next=et,et._previous=tt),t._previous=t._next=null},Ot="function"==typeof Promise?Promise:null;W=Symbol.toStringTag;var St=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;U(this,t),Q(this,W,"Promise"),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._hasEnded=!1,this._resolve=null,this._reject=null,this._currentState=e||{},this._originalState={},this._targetState={},this._start=ut,this._render=ut,this._promiseCtor=Ot,i&&this.setConfig(i)}var e;return e=[{key:"_applyFilter",value:function(t){for(var e=this._filters.length;e>0;e--){var i=this._filters[e-e][t];i&&i(this)}}},{key:"tween",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=this._config;for(var n in e)i[n]=e[n];var r=i.promise,o=void 0===r?this._promiseCtor:r,s=i.start,a=void 0===s?ut:s,l=i.finish,c=i.render,h=void 0===c?this._config.step||ut:c,u=i.step,d=void 0===u?ut:u;this._data=i.data||i.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=e.delay||0,this._start=a,this._render=h||d,this._duration=i.duration||500,this._promiseCtor=o,l&&(this._resolve=l);var f=e.from,p=e.to,g=void 0===p?{}:p,m=this._currentState,b=this._originalState,v=this._targetState;for(var y in f)m[y]=f[y];var x=!1;for(var _ in m){var w=m[_];x||Y(w)!==ct||(x=!0),b[_]=w,v[_]=g.hasOwnProperty(_)?g[_]:w}if(this._easing=wt(this._currentState,i.easing,this._easing),this._filters.length=0,x){for(var k in t.filters)t.filters[k].doesApply(this)&&this._filters.push(t.filters[k]);this._applyFilter(at)}return this}},{key:"then",value:function(t,e){var i=this;return this._promise=new this._promiseCtor(function(t,e){i._resolve=t,i._reject=e}),this._promise.then(t,e)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"finally",value:function(t){return this.then().finally(t)}},{key:"get",value:function(){return J({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,kt(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===dt?(dt=this,ft=this):(this._previous=ft,ft._next=this,ft=this),this)}},{key:"seek",value:function(e){e=Math.max(e,0);var i=t.now();return this._timestamp+e===0||(this._timestamp=i-e,mt(this,i)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,kt(this);var e=this._filters.length>0;return t&&(e&&this._applyFilter(st),gt(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),e&&(this._applyFilter(rt),this._applyFilter(ot))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._currentState,i=this._data;return this._isPlaying?(this._reject&&this._reject({data:i,state:e,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"hasEnded",value:function(){return this._hasEnded}},{key:"setScheduleFunction",value:function(e){t.setScheduleFunction(e)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=J({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}],e&&q(t.prototype,e),t}();function Mt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new St;return e.tween(t),e.tweenable=e,e}Q(St,"now",function(){return Z}),Q(St,"setScheduleFunction",function(t){return ht=t}),Q(St,"filters",{}),Q(St,"formulas",pt),xt(!0);var Et,Pt,Tt=/(\d|-|\.)/,At=/([^\-0-9.]+)/g,Ct=/[0-9.-]+/g,Lt=(Et=Ct.source,Pt=/,\s*/.source,new RegExp("rgba?\\(".concat(Et).concat(Pt).concat(Et).concat(Pt).concat(Et,"(").concat(Pt).concat(Et,")?\\)"),"g")),Dt=/^.*\(/,jt=/#([0-9]|[a-f]){3,6}/gi,It="VAL",Rt=function(t,e){return t.map(function(t,i){return"_".concat(e,"_").concat(i)})};function Ft(t){return parseInt(t,16)}var zt=function(t){return"rgb(".concat((e=t,3===(e=e.replace(/#/,"")).length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[Ft(e.substr(0,2)),Ft(e.substr(2,2)),Ft(e.substr(4,2))]).join(","),")");var e},Nt=function(t,e,i){var n=e.match(t),r=e.replace(t,It);return n&&n.forEach(function(t){return r=r.replace(It,i(t))}),r},Bt=function(t){for(var e in t){var i=t[e];"string"==typeof i&&i.match(jt)&&(t[e]=Nt(jt,i,zt))}},Wt=function(t){var e=t.match(Ct),i=e.slice(0,3).map(Math.floor),n=t.match(Dt)[0];if(3===e.length)return"".concat(n).concat(i.join(","),")");if(4===e.length)return"".concat(n).concat(i.join(","),",").concat(e[3],")");throw new Error("Invalid rgbChunk: ".concat(t))},Vt=function(t){return t.match(Ct)},Ht=function(t,e){var i={};return e.forEach(function(e){i[e]=t[e],delete t[e]}),i},$t=function(t,e){return e.map(function(e){return t[e]})},Ut=function(t,e){return e.forEach(function(e){return t=t.replace(It,+e.toFixed(4))}),t},qt=function(t){for(var e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1};function Yt(t){var e=t._currentState;[e,t._originalState,t._targetState].forEach(Bt),t._tokenData=function(t){var e,i,n={};for(var r in t){var o=t[r];"string"==typeof o&&(n[r]={formatString:(e=o,i=void 0,i=e.match(At),i?(1===i.length||e.charAt(0).match(Tt))&&i.unshift(""):i=["",""],i.join(It)),chunkNames:Rt(Vt(o),r)})}return n}(e)}function Xt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;!function(t,e){var i=function(i){var n=e[i].chunkNames,r=t[i];if("string"==typeof r){var o=r.split(" "),s=o[o.length-1];n.forEach(function(e,i){return t[e]=o[i]||s})}else n.forEach(function(e){return t[e]=r});delete t[i]};for(var n in e)i(n)}(r,o),[e,i,n].forEach(function(t){return function(t,e){var i=function(i){Vt(t[i]).forEach(function(n,r){return t[e[i].chunkNames[r]]=+n}),delete t[i]};for(var n in e)i(n)}(t,o)})}function Gt(t){var e=t._currentState,i=t._originalState,n=t._targetState,r=t._easing,o=t._tokenData;[e,i,n].forEach(function(t){return function(t,e){for(var i in e){var n=e[i],r=n.chunkNames,o=n.formatString,s=Ut(o,$t(Ht(t,r),r));t[i]=Nt(Lt,s,Wt)}}(t,o)}),function(t,e){for(var i in e){var n=e[i].chunkNames,r=t[n[0]];t[i]="string"==typeof r?n.map(function(e){var i=t[e];return delete t[e],i}).join(" "):r}}(r,o)}function Kt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function Jt(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Kt(Object(i),!0).forEach(function(e){Qt(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Kt(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function Qt(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Zt=new St,te=St.filters,ee=function(t,e,i,n){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=Jt({},t),s=wt(t,n);for(var a in Zt._filters.length=0,Zt.set({}),Zt._currentState=o,Zt._originalState=t,Zt._targetState=e,Zt._easing=s,te)te[a].doesApply(Zt)&&Zt._filters.push(te[a]);Zt._applyFilter("tweenCreated"),Zt._applyFilter("beforeTween");var l=gt(i,o,t,e,1,r,s);return Zt._applyFilter("afterTween"),l};function ie(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function ne(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function re(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function oe(t,e){var i=e.get(t);if(!i)throw new TypeError("attempted to get private field on non-instance");return i.get?i.get.call(t):i.value}var se=new WeakMap,ae=function(){function t(){ne(this,t),se.set(this,{writable:!0,value:[]});for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];i.forEach(this.add.bind(this))}var e;return(e=[{key:"add",value:function(t){return oe(this,se).push(t),t}},{key:"remove",value:function(t){var e=oe(this,se).indexOf(t);return~e&&oe(this,se).splice(e,1),t}},{key:"empty",value:function(){return this.tweenables.map(this.remove.bind(this))}},{key:"isPlaying",value:function(){return oe(this,se).some(function(t){return t.isPlaying()})}},{key:"play",value:function(){return oe(this,se).forEach(function(t){return t.tween()}),this}},{key:"pause",value:function(){return oe(this,se).forEach(function(t){return t.pause()}),this}},{key:"resume",value:function(){return this.playingTweenables.forEach(function(t){return t.resume()}),this}},{key:"stop",value:function(t){return oe(this,se).forEach(function(e){return e.stop(t)}),this}},{key:"tweenables",get:function(){return function(t){if(Array.isArray(t))return ie(t)}(t=oe(this,se))||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ie(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?ie(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var t}},{key:"playingTweenables",get:function(){return oe(this,se).filter(function(t){return!t.hasEnded()})}},{key:"promises",get:function(){return oe(this,se).map(function(t){return t.then()})}}])&&re(t.prototype,e),t}();St.filters.token=r}},e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={exports:{}};return t[n](r,r.exports,i),r.exports}return i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i(720)}()},"object"==typeof i&&"object"==typeof e?e.exports=o():"function"==typeof n&&n.amd?n("shifty",[],o):"object"==typeof i?i.shifty=o():r.shifty=o()},{}],3:[function(t,e,i){var n=t("./shape"),r=t("./utils"),o=function(t,e){this._pathTemplate="M 50,50 m 0,-{radius} a {radius},{radius} 0 1 1 0,{2radius} a {radius},{radius} 0 1 1 0,-{2radius}",this.containerAspectRatio=1,n.apply(this,arguments)};o.prototype=new n,o.prototype.constructor=o,o.prototype._pathString=function(t){var e=t.strokeWidth;t.trailWidth&&t.trailWidth>t.strokeWidth&&(e=t.trailWidth);var i=50-e/2;return r.render(this._pathTemplate,{radius:i,"2radius":2*i})},o.prototype._trailString=function(t){return this._pathString(t)},e.exports=o},{"./shape":8,"./utils":10}],4:[function(t,e,i){var n=t("./shape"),r=t("./utils"),o=function(t,e){this._pathTemplate=e.vertical?"M {center},100 L {center},0":"M 0,{center} L 100,{center}",n.apply(this,arguments)};o.prototype=new n,o.prototype.constructor=o,o.prototype._initializeSvg=function(t,e){var i=e.vertical?"0 0 "+e.strokeWidth+" 100":"0 0 100 "+e.strokeWidth;t.setAttribute("viewBox",i),t.setAttribute("preserveAspectRatio","none")},o.prototype._pathString=function(t){return r.render(this._pathTemplate,{center:t.strokeWidth/2})},o.prototype._trailString=function(t){return this._pathString(t)},e.exports=o},{"./shape":8,"./utils":10}],5:[function(t,e,i){e.exports={Line:t("./line"),Circle:t("./circle"),SemiCircle:t("./semicircle"),Square:t("./square"),Path:t("./path"),Shape:t("./shape"),utils:t("./utils")}},{"./circle":3,"./line":4,"./path":6,"./semicircle":7,"./shape":8,"./square":9,"./utils":10}],6:[function(t,e,i){var n=t("shifty"),r=t("./utils"),o=n.Tweenable,s={easeIn:"easeInCubic",easeOut:"easeOutCubic",easeInOut:"easeInOutCubic"},a=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");var n;i=r.extend({delay:0,duration:800,easing:"linear",from:{},to:{},step:function(){}},i),n=r.isString(e)?document.querySelector(e):e,this.path=n,this._opts=i,this._tweenable=null;var o=this.path.getTotalLength();this.path.style.strokeDasharray=o+" "+o,this.set(0)};a.prototype.value=function(){var t=this._getComputedDashOffset(),e=this.path.getTotalLength();return parseFloat((1-t/e).toFixed(6),10)},a.prototype.set=function(t){this.stop(),this.path.style.strokeDashoffset=this._progressToOffset(t);var e=this._opts.step;if(r.isFunction(e)){var i=this._easing(this._opts.easing);e(this._calculateTo(t,i),this._opts.shape||this,this._opts.attachment)}},a.prototype.stop=function(){this._stopTween(),this.path.style.strokeDashoffset=this._getComputedDashOffset()},a.prototype.animate=function(t,e,i){e=e||{},r.isFunction(e)&&(i=e,e={});var n=r.extend({},e),s=r.extend({},this._opts);e=r.extend(s,e);var a=this._easing(e.easing),l=this._resolveFromAndTo(t,a,n);this.stop(),this.path.getBoundingClientRect();var c=this._getComputedDashOffset(),h=this._progressToOffset(t),u=this;this._tweenable=new o,this._tweenable.tween({from:r.extend({offset:c},l.from),to:r.extend({offset:h},l.to),duration:e.duration,delay:e.delay,easing:a,step:function(t){u.path.style.strokeDashoffset=t.offset;var i=e.shape||u;e.step(t,i,e.attachment)}}).then(function(t){r.isFunction(i)&&i()}).catch(function(t){throw console.error("Error in tweening:",t),t})},a.prototype._getComputedDashOffset=function(){var t=window.getComputedStyle(this.path,null);return parseFloat(t.getPropertyValue("stroke-dashoffset"),10)},a.prototype._progressToOffset=function(t){var e=this.path.getTotalLength();return e-t*e},a.prototype._resolveFromAndTo=function(t,e,i){return i.from&&i.to?{from:i.from,to:i.to}:{from:this._calculateFrom(e),to:this._calculateTo(t,e)}},a.prototype._calculateFrom=function(t){return n.interpolate(this._opts.from,this._opts.to,this.value(),t)},a.prototype._calculateTo=function(t,e){return n.interpolate(this._opts.from,this._opts.to,t,e)},a.prototype._stopTween=function(){null!==this._tweenable&&(this._tweenable.stop(!0),this._tweenable=null)},a.prototype._easing=function(t){return s.hasOwnProperty(t)?s[t]:t},e.exports=a},{"./utils":10,shifty:2}],7:[function(t,e,i){var n=t("./shape"),r=t("./circle"),o=t("./utils"),s=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,n.apply(this,arguments)};s.prototype=new n,s.prototype.constructor=s,s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},s.prototype._initializeTextContainer=function(t,e,i){t.text.style&&(i.style.top="auto",i.style.bottom="0",t.text.alignToBottom?o.setStyle(i,"transform","translate(-50%, 0)"):o.setStyle(i,"transform","translate(-50%, 50%)"))},s.prototype._pathString=r.prototype._pathString,s.prototype._trailString=r.prototype._trailString,e.exports=s},{"./circle":3,"./shape":8,"./utils":10}],8:[function(t,e,i){var n=t("./path"),r=t("./utils"),o="Object is destroyed",s=function t(e,i){if(!(this instanceof t))throw new Error("Constructor was called without new keyword");if(0!==arguments.length){this._opts=r.extend({color:"#555",strokeWidth:1,trailColor:null,trailWidth:null,fill:null,text:{style:{color:null,position:"absolute",left:"50%",top:"50%",padding:0,margin:0,transform:{prefix:!0,value:"translate(-50%, -50%)"}},autoStyleContainer:!0,alignToBottom:!0,value:null,className:"progressbar-text"},svgStyle:{display:"block",width:"100%"},warnings:!1},i,!0),r.isObject(i)&&void 0!==i.svgStyle&&(this._opts.svgStyle=i.svgStyle),r.isObject(i)&&r.isObject(i.text)&&void 0!==i.text.style&&(this._opts.text.style=i.text.style);var o,s=this._createSvgView(this._opts);if(!(o=r.isString(e)?document.querySelector(e):e))throw new Error("Container does not exist: "+e);this._container=o,this._container.appendChild(s.svg),this._opts.warnings&&this._warnContainerAspectRatio(this._container),this._opts.svgStyle&&r.setStyles(s.svg,this._opts.svgStyle),this.svg=s.svg,this.path=s.path,this.trail=s.trail,this.text=null;var a=r.extend({attachment:void 0,shape:this},this._opts);this._progressPath=new n(s.path,a),r.isObject(this._opts.text)&&null!==this._opts.text.value&&this.setText(this._opts.text.value)}};s.prototype.animate=function(t,e,i){if(null===this._progressPath)throw new Error(o);this._progressPath.animate(t,e,i)},s.prototype.stop=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath.stop()},s.prototype.pause=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.pause()},s.prototype.resume=function(){if(null===this._progressPath)throw new Error(o);void 0!==this._progressPath&&this._progressPath._tweenable&&this._progressPath._tweenable.resume()},s.prototype.destroy=function(){if(null===this._progressPath)throw new Error(o);this.stop(),this.svg.parentNode.removeChild(this.svg),this.svg=null,this.path=null,this.trail=null,this._progressPath=null,null!==this.text&&(this.text.parentNode.removeChild(this.text),this.text=null)},s.prototype.set=function(t){if(null===this._progressPath)throw new Error(o);this._progressPath.set(t)},s.prototype.value=function(){if(null===this._progressPath)throw new Error(o);return void 0===this._progressPath?0:this._progressPath.value()},s.prototype.setText=function(t){if(null===this._progressPath)throw new Error(o);null===this.text&&(this.text=this._createTextContainer(this._opts,this._container),this._container.appendChild(this.text)),r.isObject(t)?(r.removeChildren(this.text),this.text.appendChild(t)):this.text.innerHTML=t},s.prototype._createSvgView=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");this._initializeSvg(e,t);var i=null;(t.trailColor||t.trailWidth)&&(i=this._createTrail(t),e.appendChild(i));var n=this._createPath(t);return e.appendChild(n),{svg:e,path:n,trail:i}},s.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 100")},s.prototype._createPath=function(t){var e=this._pathString(t);return this._createPathElement(e,t)},s.prototype._createTrail=function(t){var e=this._trailString(t),i=r.extend({},t);return i.trailColor||(i.trailColor="#eee"),i.trailWidth||(i.trailWidth=i.strokeWidth),i.color=i.trailColor,i.strokeWidth=i.trailWidth,i.fill=null,this._createPathElement(e,i)},s.prototype._createPathElement=function(t,e){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),i.setAttribute("stroke",e.color),i.setAttribute("stroke-width",e.strokeWidth),e.fill?i.setAttribute("fill",e.fill):i.setAttribute("fill-opacity","0"),i},s.prototype._createTextContainer=function(t,e){var i=document.createElement("div");i.className=t.text.className;var n=t.text.style;return n&&(t.text.autoStyleContainer&&(e.style.position="relative"),r.setStyles(i,n),n.color||(i.style.color=t.color)),this._initializeTextContainer(t,e,i),i},s.prototype._initializeTextContainer=function(t,e,i){},s.prototype._pathString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._trailString=function(t){throw new Error("Override this function for each progress bar")},s.prototype._warnContainerAspectRatio=function(t){if(this.containerAspectRatio){var e=window.getComputedStyle(t,null),i=parseFloat(e.getPropertyValue("width"),10),n=parseFloat(e.getPropertyValue("height"),10);r.floatEquals(this.containerAspectRatio,i/n)||(console.warn("Incorrect aspect ratio of container","#"+t.id,"detected:",e.getPropertyValue("width")+"(width)","/",e.getPropertyValue("height")+"(height)","=",i/n),console.warn("Aspect ratio of should be",this.containerAspectRatio))}},e.exports=s},{"./path":6,"./utils":10}],9:[function(t,e,i){var n=t("./shape"),r=t("./utils"),o=function(t,e){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",n.apply(this,arguments)};o.prototype=new n,o.prototype.constructor=o,o.prototype._pathString=function(t){var e=100-t.strokeWidth/2;return r.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},o.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return r.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})},e.exports=o},{"./shape":8,"./utils":10}],10:[function(t,e,i){var n=t("lodash.merge"),r="Webkit Moz O ms".split(" "),o=.001;function s(t,e){var i=t;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n],o=new RegExp("\\{"+n+"\\}","g");i=i.replace(o,r)}return i}function a(t,e,i){for(var n=t.style,o=0;o<r.length;++o)n[r[o]+c(e)]=i;n[e]=i}function l(t,e){p(e,function(e,i){null!=e&&(f(e)&&!0===e.prefix?a(t,i,e.value):t.style[i]=e)})}function c(t){return t.charAt(0).toUpperCase()+t.slice(1)}function h(t){return"string"==typeof t||t instanceof String}function u(t){return"function"==typeof t}function d(t){return"[object Array]"===Object.prototype.toString.call(t)}function f(t){return!d(t)&&"object"==typeof t&&!!t}function p(t,e){for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)}function g(t,e){return Math.abs(t-e)<o}function m(t){for(;t.firstChild;)t.removeChild(t.firstChild)}e.exports={extend:n,render:s,setStyle:a,setStyles:l,capitalize:c,isString:h,isFunction:u,isObject:f,forEachObject:p,floatEquals:g,removeChildren:m}},{"lodash.merge":1}]},{},[5])(5)},951:function(t,e){var i,n,r,o;o=function(){var t="BKMGTPEZY".split("");function e(t,e){return t&&t.toLowerCase()===e.toLowerCase()}return function(i,n){return i="number"==typeof i?i:0,(n=n||{}).fixed="number"==typeof n.fixed?n.fixed:2,n.spacer="string"==typeof n.spacer?n.spacer:" ",n.calculate=function(t){var r=e(t,"si")?["k","B"]:["K","iB"],o=e(t,"si")?1e3:1024,s=Math.log(i)/Math.log(o)|0,a=i/Math.pow(o,s),l=a.toFixed(n.fixed);return s-1<3&&!e(t,"si")&&e(t,"jedec")&&(r[1]="B"),{suffix:s?(r[0]+"MGTPEZY")[s-1]+r[1]:1==(0|l)?"Byte":"Bytes",magnitude:s,result:a,fixed:l,bits:{result:a/8,fixed:(a/8).toFixed(n.fixed)}}},n.to=function(n,r){var o=e(r,"si")?1e3:1024,s=t.indexOf("string"==typeof n?n[0].toUpperCase():"B"),a=i;if(-1===s||0===s)return a.toFixed(2);for(;s>0;s--)a/=o;return a.toFixed(2)},n.human=function(t){var e=n.calculate(t);return e.fixed+n.spacer+e.suffix},n}},t.exports?t.exports=o():(n=[],void 0===(r="function"==typeof(i=o)?i.apply(e,n):i)||(t.exports=r))},993:function(t,e,i){var n=i(546);function r(){var e,i,o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.toStringTag||"@@toStringTag";function l(t,r,o,s){var a=r&&r.prototype instanceof h?r:h,l=Object.create(a.prototype);return n(l,"_invoke",function(t,n,r){var o,s,a,l=0,h=r||[],u=!1,d={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,i){return o=t,s=0,a=e,d.n=i,c}};function f(t,n){for(s=t,a=n,i=0;!u&&l&&!r&&i<h.length;i++){var r,o=h[i],f=d.p,p=o[2];t>3?(r=p===n)&&(a=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=f&&((r=t<2&&f<o[1])?(s=0,d.v=n,d.n=o[1]):f<p&&(r=t<3||o[0]>n||n>p)&&(o[4]=t,o[5]=n,d.n=p,s=0))}if(r||t>1)return c;throw u=!0,n}return function(r,h,p){if(l>1)throw TypeError("Generator is already running");for(u&&1===h&&f(h,p),s=h,a=p;(i=s<2?e:a)||!u;){o||(s?s<3?(s>1&&(d.n=-1),f(s,a)):d.n=a:d.v=a);try{if(l=2,o){if(s||(r="next"),i=o[r]){if(!(i=i.call(o,a)))throw TypeError("iterator result is not an object");if(!i.done)return i;a=i.value,s<2&&(s=0)}else 1===s&&(i=o.return)&&i.call(o),s<2&&(a=TypeError("The iterator does not provide a '"+r+"' method"),s=1);o=e}else if((i=(u=d.n<0)?a:t.call(n,d))!==c)break}catch(t){o=e,s=1,a=t}finally{l=1}}return{value:i,done:u}}}(t,o,s),!0),l}var c={};function h(){}function u(){}function d(){}i=Object.getPrototypeOf;var f=[][s]?i(i([][s]())):(n(i={},s,function(){return this}),i),p=d.prototype=h.prototype=Object.create(f);function g(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,n(t,a,"GeneratorFunction")),t.prototype=Object.create(p),t}return u.prototype=d,n(p,"constructor",d),n(d,"constructor",u),u.displayName="GeneratorFunction",n(d,a,"GeneratorFunction"),n(p),n(p,a,"Generator"),n(p,s,function(){return this}),n(p,"toString",function(){return"[object Generator]"}),(t.exports=r=function(){return{w:l,m:g}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},998:function(t,e){var i,n,r;n=[],i=function(){"use strict";function t(t,e){var i,n,r;for(i=1,n=arguments.length;i<n;++i)if(null!=(e=arguments[i]))for(r in e)a(e,r)&&(t[r]=e[r]);return t}function e(t,e){return e.length-t.length}function i(t,e){return t.factor-e.factor}function n(t){return t.replace(/([.*+?=^!:${}()|[\]/\\])/g,"\\$1")}function r(t,e){var i,n;for(i=0,n=t.length;i<n;++i)e(t[i],i)}function o(t,e){var i;for(i in t)a(t,i)&&e(t[i],i)}var s,a=(s=Object.prototype.hasOwnProperty,function(t,e){return null!=t&&s.call(t,e)});function l(t,e){for(;"string"==typeof e;)e=t[e];return e}function c(t){this._prefixes=t;var r=[],s=[];o(t,function(t,e){r.push(n(e)),s.push({factor:t,prefix:e})});var l=this._lcPrefixes={};o(t,function(e,i){var n=i.toLowerCase();a(t,n)||(l[n]=i)}),s.sort(i),this._list=s,r.sort(e),this._regexp=new RegExp("^\\s*(-)?\\s*(\\d+(?:\\.\\d+)?)\\s*("+r.join("|")+")\\s*(.*)\\s*?$","i")}c.create=function(t,e,i){var n={};return void 0===i&&(i=0),r(t,function(t,r){n[t]=Math.pow(e,r+i)}),new c(n)},c.prototype.findPrefix=function(t){for(var e,i=this._list,n=0,r=i.length-1;n!==r;)i[e=n+r+1>>1].factor>t?r=e-1:n=e;return i[n]},c.prototype.parse=function(t,e){var i=t.match(this._regexp);if(null!==i){var n,r=i[3];if(a(this._prefixes,r))n=this._prefixes[r];else{if(e||(r=r.toLowerCase(),!a(this._lcPrefixes,r)))return;r=this._lcPrefixes[r],n=this._prefixes[r]}var o=+i[2];return void 0!==i[1]&&(o=-o),{factor:n,prefix:r,unit:i[4],value:o}}};var h={binary:c.create(",Ki,Mi,Gi,Ti,Pi,Ei,Zi,Yi".split(","),1024),SI:c.create("y,z,a,f,p,n,µ,m,,k,M,G,T,P,E,Z,Y".split(","),1e3,-8)},u={decimals:2,separator:" ",unit:""},d={scale:"SI",strict:!1};function f(e,i){var n=v(e,i=t({},u,i));e=String(n.value);var r=n.prefix+i.unit;return""===r?e:e+i.separator+r}var p={scale:"binary",unit:"B"};function g(e,i){return f(e,void 0===i?p:t({},p,i))}function m(t,e){var i=b(t,e);return i.value*i.factor}function b(e,i){if("string"!=typeof e)throw new TypeError("str must be a string");i=t({},d,i);var n=l(h,i.scale);if(void 0===n)throw new Error("missing scale");var r=n.parse(e,i.strict);if(void 0===r)throw new Error("cannot parse str");return r}function v(e,i){if(0===e)return{value:0,prefix:""};if(e<0){var n=v(-e,i);return n.value=-n.value,n}if("number"!=typeof e||Number.isNaN(e))throw new TypeError("value must be a number");i=t({},d,i);var r,o=l(h,i.scale);if(void 0===o)throw new Error("missing scale");var s=i.decimals;void 0!==s&&(r=Math.pow(10,s));var c,u=i.prefix;if(void 0!==u){if(!a(o._prefixes,u))throw new Error("invalid prefix");c=o._prefixes[u]}else{var f=o.findPrefix(e);if(void 0!==r)do{var p=(c=f.factor)/r;e=Math.round(e/p)*p}while((f=o.findPrefix(e)).factor!==c);else c=f.factor;u=f.prefix}return{prefix:u,value:void 0===r?e/c:Math.round(e*r/c)/r}}return f.bytes=g,f.parse=m,m.raw=b,f.raw=v,f.Scale=c,f},void 0===(r="function"==typeof i?i.apply(e,n):i)||(t.exports=r)}},e={};function i(n){var r=e[n];if(void 0!==r)return r.exports;var o=e[n]={exports:{}};return t[n].call(o.exports,o,o.exports,i),o.exports}i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,{a:e}),e},i.d=function(t,e){for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){var t;i.g.importScripts&&(t=i.g.location+"");var e=i.g.document;if(!t&&e&&(e.currentScript&&"SCRIPT"===e.currentScript.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){var n=e.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!t||!/^http(s?):/.test(t));)t=n[r--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=t}(),function(){"use strict";i(617),i(712);var t=i(544),e=i.n(t);const n={sample:{image:document.getElementById("transformation-sample-image"),video:document.getElementById("transformation-sample-video")},preview:{image:document.getElementById("sample-image"),video:document.getElementById("sample-video")},fields:document.getElementsByClassName("cld-ui-input"),button:{image:document.getElementById("refresh-image-preview"),video:document.getElementById("refresh-video-preview")},spinner:{image:document.getElementById("image-loader"),video:document.getElementById("video-loader")},optimization:{image:document.getElementById("image_settings.image_optimization"),video:document.getElementById("video_settings.video_optimization")},error_container:document.getElementById("cld-preview-error"),activeItem:null,elements:{image:[],video:[]},_placeItem(t){null!==t&&(t.style.display="block",t.style.visibility="visible",t.style.position="absolute",t.style.top=t.parentElement.clientHeight/2-t.clientHeight/2+"px",t.style.left=t.parentElement.clientWidth/2-t.clientWidth/2+"px")},_setLoading(t){this.sample[t]&&(this.button[t].style.display="block",this._placeItem(this.button[t]),this.preview[t].style.opacity="0.1")},_build(t){if(!this.sample[t])return;this.sample[t].innerHTML="",this.elements[t]=[];for(const e of this.fields){if(t!==e.dataset.context||e.dataset.disabled&&"true"===e.dataset.disabled)continue;let i=e.value.trim();if(i.length){if("select-one"===e.type){if("none"===i||!1===this.optimization[t].checked)continue;i=e.dataset.meta+"_"+i}else t=e.dataset.context,e.dataset.meta&&(i=e.dataset.meta+"_"+i),e.dataset.suffix&&(i+=e.dataset.suffix),i=this._transformations(i,t,!0);i&&this.elements[t].push(i)}}let e="";this.elements[t].length&&(e="/"+this._getGlobalTransformationElements(t).replace(/ /g,"%20")),this.sample[t].textContent=e,this.sample[t].parentElement.href="https://res.cloudinary.com/demo/"+this.sample[t].parentElement.innerText.trim().replace("../","").replace(/ /g,"%20")},_clearLoading(t){this.spinner[t].style.visibility="hidden",this.activeItem=null,this.preview[t].style.opacity=1},_refresh(t,e){if(t&&t.preventDefault(),!this.sample[e])return;const i=this,n=CLD_GLOBAL_TRANSFORMATIONS[e].preview_url+this._getGlobalTransformationElements(e)+CLD_GLOBAL_TRANSFORMATIONS[e].file;if(this.button[e].style.display="none",this._placeItem(this.spinner[e]),"image"===e){const t=new Image;t.onload=function(){i.preview[e].src=this.src,i._clearLoading(e),i.error_container&&(i.error_container.style.display="none"),t.remove()},t.onerror=function(){const t=i.elements[e].includes("f_mp4");i.error_container&&(i.error_container.style.display="block",t?(i.error_container.innerHTML=CLD_GLOBAL_TRANSFORMATIONS[e].warning.replace("%s","f_mp4"),i.error_container.classList.replace("settings-alert-error","settings-alert-warning")):(i.error_container.innerHTML=CLD_GLOBAL_TRANSFORMATIONS[e].error,i.error_container.classList.replace("settings-alert-warning","settings-alert-error"))),i._clearLoading(e)},t.src=n}else{const t=i._transformations(i._getGlobalTransformationElements(e),e);samplePlayer.source({publicId:"sailing_boat",transformation:t}),i._clearLoading(e)}},_getGlobalTransformationElements(t){let e=[];return e.push(this.elements[t].slice(0,2).join(",")),e.push(this.elements[t].slice(2).join(",")),e=e.filter(t=>t).join("/"),e},_transformations(t,e,i=!1){const n=CLD_GLOBAL_TRANSFORMATIONS[e].valid_types;let r=null;const o=t.split("/"),s=[];for(let t=0;t<o.length;t++){const r=o[t].split(",");let a;a=!0===i?[]:{};for(let t=0;t<r.length;t++){const o=r[t].trim().split("_");if(o.length<=1||void 0===n[o[0]])continue;const s=o.shift(),l=o.join("_");if(!0===i){if("f"===s||"q"===s)for(const t in this.elements[e])s+"_"===this.elements[e][t].substr(0,2)&&this.elements[e].splice(t,1);a.push(r[t])}else a[n[s]]=l.trim()}let l=0;l=!0===i?a.length:Object.keys(a).length,l&&(!0===i&&(a=a.join(",")),s.push(a))}return s.length&&(r=!0===i?s.join("/").trim():s),r},_reset(){for(const t of this.fields)t.value=null;for(const t in this.button)this._build(t),this._refresh(null,t)},_input(t){if(void 0!==t.dataset.context&&t.dataset.context.length){const e=t.dataset.context;this._setLoading(e),this._build(e)}},_init(){if("undefined"!=typeof CLD_GLOBAL_TRANSFORMATIONS){const t=this;document.addEventListener("DOMContentLoaded",function(){for(const e in t.button)t.button[e]&&t.button[e].addEventListener("click",function(i){t._refresh(i,e)});for(const e of t.fields)e.addEventListener("input",function(){t._input(this)}),e.addEventListener("change",function(){t._input(this)});for(const e in CLD_GLOBAL_TRANSFORMATIONS)t._build(e),t._refresh(null,e)}),jQuery(document).ajaxComplete(function(e,i,n){-1!==n.data.indexOf("action=add-tag")&&-1===i.responseText.indexOf("wp_error")&&t._reset()})}}};n._init();function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e||"default");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}function s(t,e,i){return(e=o(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function a(t,e){if(null==t)return{};var i,n,r=function(t,e){if(null==t)return{};var i={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;i[n]=t[n]}return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)i=o[n],-1===e.indexOf(i)&&{}.propertyIsEnumerable.call(t,i)&&(r[i]=t[i])}return r}var l,c,h,u,d=i(616),f=i.n(d);i(604),f()(console.error);l={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},c=["(","?"],h={")":["("],":":["?","?:"]},u=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var p={"!":function(t){return!t},"*":function(t,e){return t*e},"/":function(t,e){return t/e},"%":function(t,e){return t%e},"+":function(t,e){return t+e},"-":function(t,e){return t-e},"<":function(t,e){return t<e},"<=":function(t,e){return t<=e},">":function(t,e){return t>e},">=":function(t,e){return t>=e},"==":function(t,e){return t===e},"!=":function(t,e){return t!==e},"&&":function(t,e){return t&&e},"||":function(t,e){return t||e},"?:":function(t,e,i){if(t)throw e;return i}};function g(t){var e=function(t){for(var e,i,n,r,o=[],s=[];e=t.match(u);){for(i=e[0],(n=t.substr(0,e.index).trim())&&o.push(n);r=s.pop();){if(h[i]){if(h[i][0]===r){i=h[i][1]||i;break}}else if(c.indexOf(r)>=0||l[r]<l[i]){s.push(r);break}o.push(r)}h[i]||s.push(i),t=t.substr(e.index+i.length)}return(t=t.trim())&&o.push(t),o.concat(s.reverse())}(t);return function(t){return function(t,e){var i,n,r,o,s,a,l=[];for(i=0;i<t.length;i++){if(s=t[i],o=p[s]){for(n=o.length,r=Array(n);n--;)r[n]=l.pop();try{a=o.apply(null,r)}catch(t){return t}}else a=e.hasOwnProperty(s)?e[s]:+s;l.push(a)}return l[0]}(e,t)}}var m={contextDelimiter:"",onMissingKey:null};function b(t,e){var i;for(i in this.data=t,this.pluralForms={},this.options={},m)this.options[i]=void 0!==e&&i in e?e[i]:m[i]}function v(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function y(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?v(Object(i),!0).forEach(function(e){s(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):v(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}b.prototype.getPluralForm=function(t,e){var i,n,r,o=this.pluralForms[t];return o||("function"!=typeof(r=(i=this.data[t][""])["Plural-Forms"]||i["plural-forms"]||i.plural_forms)&&(n=function(t){var e,i,n;for(e=t.split(";"),i=0;i<e.length;i++)if(0===(n=e[i].trim()).indexOf("plural="))return n.substr(7)}(i["Plural-Forms"]||i["plural-forms"]||i.plural_forms),r=function(t){var e=g(t);return function(t){return+e({n:t})}}(n)),o=this.pluralForms[t]=r),o(e)},b.prototype.dcnpgettext=function(t,e,i,n,r){var o,s,a;return o=void 0===r?0:this.getPluralForm(t,r),s=i,e&&(s=e+this.options.contextDelimiter+i),(a=this.data[t][s])&&a[o]?a[o]:(this.options.onMissingKey&&this.options.onMissingKey(i,t),0===o?i:n)};var x={"":{plural_forms:function(t){return 1===t?0:1}}},_=/^i18n\.(n?gettext|has_translation)(_|$)/;var w=function(t){return"string"!=typeof t||""===t?(console.error("The namespace must be a non-empty string."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(t)||(console.error("The namespace can only contain numbers, letters, dashes, periods, underscores and slashes."),!1)};var k=function(t){return"string"!=typeof t||""===t?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(t)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(t)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)};var O=function(t,e){return function(i,n,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10,s=t[e];if(k(i)&&w(n))if("function"==typeof r)if("number"==typeof o){var a={callback:r,priority:o,namespace:n};if(s[i]){var l,c=s[i].handlers;for(l=c.length;l>0&&!(o>=c[l-1].priority);l--);l===c.length?c[l]=a:c.splice(l,0,a),s.__current.forEach(function(t){t.name===i&&t.currentIndex>=l&&t.currentIndex++})}else s[i]={handlers:[a],runs:0};"hookAdded"!==i&&t.doAction("hookAdded",i,n,r,o)}else console.error("If specified, the hook priority must be a number.");else console.error("The hook callback must be a function.")}};var S=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n,r){var o=t[e];if(k(n)&&(i||w(r))){if(!o[n])return 0;var s=0;if(i)s=o[n].handlers.length,o[n]={runs:o[n].runs,handlers:[]};else for(var a=o[n].handlers,l=function(t){a[t].namespace===r&&(a.splice(t,1),s++,o.__current.forEach(function(e){e.name===n&&e.currentIndex>=t&&e.currentIndex--}))},c=a.length-1;c>=0;c--)l(c);return"hookRemoved"!==n&&t.doAction("hookRemoved",n,r),s}}};var M=function(t,e){return function(i,n){var r=t[e];return void 0!==n?i in r&&r[i].handlers.some(function(t){return t.namespace===n}):i in r}};var E=function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return function(n){var r=t[e];r[n]||(r[n]={handlers:[],runs:0}),r[n].runs++;var o=r[n].handlers;for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l<s;l++)a[l-1]=arguments[l];if(!o||!o.length)return i?a[0]:void 0;var c={name:n,currentIndex:0};for(r.__current.push(c);c.currentIndex<o.length;){var h=o[c.currentIndex].callback.apply(null,a);i&&(a[0]=h),c.currentIndex++}return r.__current.pop(),i?a[0]:void 0}};var P=function(t,e){return function(){var i,n,r=t[e];return null!==(i=null===(n=r.__current[r.__current.length-1])||void 0===n?void 0:n.name)&&void 0!==i?i:null}};var T=function(t,e){return function(i){var n=t[e];return void 0===i?void 0!==n.__current[0]:!!n.__current[0]&&i===n.__current[0].name}};var A=function(t,e){return function(i){var n=t[e];if(k(i))return n[i]&&n[i].runs?n[i].runs:0}},C=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.actions=Object.create(null),this.actions.__current=[],this.filters=Object.create(null),this.filters.__current=[],this.addAction=O(this,"actions"),this.addFilter=O(this,"filters"),this.removeAction=S(this,"actions"),this.removeFilter=S(this,"filters"),this.hasAction=M(this,"actions"),this.hasFilter=M(this,"filters"),this.removeAllActions=S(this,"actions",!0),this.removeAllFilters=S(this,"filters",!0),this.doAction=E(this,"actions"),this.applyFilters=E(this,"filters",!0),this.currentAction=P(this,"actions"),this.currentFilter=P(this,"filters"),this.doingAction=T(this,"actions"),this.doingFilter=T(this,"filters"),this.didAction=A(this,"actions"),this.didFilter=A(this,"filters")};var L=function(){return new C}(),D=(L.addAction,L.addFilter,L.removeAction,L.removeFilter,L.hasAction,L.hasFilter,L.removeAllActions,L.removeAllFilters,L.doAction,L.applyFilters,L.currentAction,L.currentFilter,L.doingAction,L.doingFilter,L.didAction,L.didFilter,L.actions,L.filters,function(t,e,i){var n=new b({}),r=new Set,o=function(){r.forEach(function(t){return t()})},s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";n.data[e]=y(y(y({},x),n.data[e]),t),n.data[e][""]=y(y({},x[""]),n.data[e][""])},a=function(t,e){s(t,e),o()},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",e=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return n.data[t]||s(void 0,t),n.dcnpgettext(t,e,i,r,o)},c=function(){return arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default"},h=function(t,e,n){var r=l(n,e,t);return i?(r=i.applyFilters("i18n.gettext_with_context",r,t,e,n),i.applyFilters("i18n.gettext_with_context_"+c(n),r,t,e,n)):r};if(t&&a(t,e),i){var u=function(t){_.test(t)&&o()};i.addAction("hookAdded","core/i18n",u),i.addAction("hookRemoved","core/i18n",u)}return{getLocaleData:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return n.data[t]},setLocaleData:a,resetLocaleData:function(t,e){n.data={},n.pluralForms={},a(t,e)},subscribe:function(t){return r.add(t),function(){return r.delete(t)}},__:function(t,e){var n=l(e,void 0,t);return i?(n=i.applyFilters("i18n.gettext",n,t,e),i.applyFilters("i18n.gettext_"+c(e),n,t,e)):n},_x:h,_n:function(t,e,n,r){var o=l(r,void 0,t,e,n);return i?(o=i.applyFilters("i18n.ngettext",o,t,e,n,r),i.applyFilters("i18n.ngettext_"+c(r),o,t,e,n,r)):o},_nx:function(t,e,n,r,o){var s=l(o,r,t,e,n);return i?(s=i.applyFilters("i18n.ngettext_with_context",s,t,e,n,r,o),i.applyFilters("i18n.ngettext_with_context_"+c(o),s,t,e,n,r,o)):s},isRTL:function(){return"rtl"===h("ltr","text direction")},hasTranslation:function(t,e,r){var o,s,a=e?e+""+t:t,l=!(null===(o=n.data)||void 0===o||null===(s=o[null!=r?r:"default"])||void 0===s||!s[a]);return i&&(l=i.applyFilters("i18n.has_translation",l,t,e,r),l=i.applyFilters("i18n.has_translation_"+c(r),l,t,e,r)),l}}}(void 0,void 0,L)),j=(D.getLocaleData.bind(D),D.setLocaleData.bind(D),D.resetLocaleData.bind(D),D.subscribe.bind(D),D.__.bind(D));D._x.bind(D),D._n.bind(D),D._nx.bind(D),D.isRTL.bind(D),D.hasTranslation.bind(D);function I(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function R(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?I(Object(i),!0).forEach(function(e){s(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):I(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var F=function(t){var e=function t(e,i){var n=e.headers,r=void 0===n?{}:n;for(var o in r)if("x-wp-nonce"===o.toLowerCase()&&r[o]===t.nonce)return i(e);return i(R(R({},e),{},{headers:R(R({},r),{},{"X-WP-Nonce":t.nonce})}))};return e.nonce=t,e};function z(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function N(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?z(Object(i),!0).forEach(function(e){s(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):z(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var B=function(t,e){var i,n,r=t.path;return"string"==typeof t.namespace&&"string"==typeof t.endpoint&&(i=t.namespace.replace(/^\/|\/$/g,""),r=(n=t.endpoint.replace(/^\//,""))?i+"/"+n:i),delete t.namespace,delete t.endpoint,e(N(N({},t),{},{path:r}))};function W(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function V(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?W(Object(i),!0).forEach(function(e){s(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):W(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var H=function(t){return function(e,i){return B(e,function(e){var n,r=e.url,o=e.path;return"string"==typeof o&&(n=t,-1!==t.indexOf("?")&&(o=o.replace("?","&")),o=o.replace(/^\//,""),"string"==typeof n&&-1!==n.indexOf("?")&&(o=o.replace("?","&")),r=n+o),i(V(V({},e),{},{url:r}))})}};function $(t){var e=t.split("?"),i=e[1],n=e[0];return i?n+"?"+i.split("&").map(function(t){return t.split("=")}).sort(function(t,e){return t[0].localeCompare(e[0])}).map(function(t){return t.join("=")}).join("&"):n}var U=function(t){var e=Object.keys(t).reduce(function(e,i){return e[$(i)]=t[i],e},{});return function(t,i){var n=t.parse,r=void 0===n||n;if("string"==typeof t.path){var o=t.method||"GET",s=$(t.path);if("GET"===o&&e[s]){var a=e[s];return delete e[s],Promise.resolve(r?a.body:new window.Response(JSON.stringify(a.body),{status:200,statusText:"OK",headers:a.headers}))}if("OPTIONS"===o&&e[o]&&e[o][s])return Promise.resolve(e[o][s])}return i(t)}};function q(t,e,i,n,r,o,s){try{var a=t[o](s),l=a.value}catch(t){return void i(t)}a.done?e(l):Promise.resolve(l).then(n,r)}var Y=i(756),X=i.n(Y);function G(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function K(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var n,r,o,s,a=[],l=!0,c=!1;try{if(o=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=o.call(i)).done)&&(a.push(n.value),a.length!==e);l=!0);}catch(t){c=!0,r=t}finally{try{if(!l&&null!=i.return&&(s=i.return(),Object(s)!==s))return}finally{if(c)throw r}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return G(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?G(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function Q(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?J(Object(i),!0).forEach(function(e){s(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):J(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function Z(t){return(function(t){var e;try{e=new URL(t,"http://example.com").search.substring(1)}catch(t){}if(e)return e}(t)||"").replace(/\+/g,"%20").split("&").reduce(function(t,e){var i=K(e.split("=").filter(Boolean).map(decodeURIComponent),2),n=i[0],r=i[1],o=void 0===r?"":r;n&&function(t,e,i){for(var n=e.length,r=n-1,o=0;o<n;o++){var s=e[o];!s&&Array.isArray(t)&&(s=t.length.toString());var a=!isNaN(Number(e[o+1]));t[s]=o===r?i:t[s]||(a?[]:{}),Array.isArray(t[s])&&!a&&(t[s]=Q({},t[s])),t=t[s]}}(t,n.replace(/\]/g,"").split("["),o);return t},{})}function tt(t,e){var i;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(i=function(t,e){if(!t)return;if("string"==typeof t)return et(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);"Object"===i&&t.constructor&&(i=t.constructor.name);if("Map"===i||"Set"===i)return Array.from(t);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return et(t,e)}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){i=t[Symbol.iterator]()},n:function(){var t=i.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw o}}}}function et(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function it(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!e||!Object.keys(e).length)return t;var i=t,n=t.indexOf("?");return-1!==n&&(e=Object.assign(Z(t),e),i=i.substr(0,n)),i+"?"+function(t){for(var e,i="",n=Object.entries(t);e=n.shift();){var r=K(e,2),o=r[0],s=r[1];if(Array.isArray(s)||s&&s.constructor===Object){var a,l=tt(Object.entries(s).reverse());try{for(l.s();!(a=l.n()).done;){var c=K(a.value,2),h=c[0],u=c[1];n.unshift(["".concat(o,"[").concat(h,"]"),u])}}catch(t){l.e(t)}finally{l.f()}}else void 0!==s&&(null===s&&(s=""),i+="&"+[o,s].map(encodeURIComponent).join("="))}return i.substr(1)}(e)}function nt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function rt(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?nt(Object(i),!0).forEach(function(e){s(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):nt(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var ot=function(t,e){var i=t.path,n=t.url;return rt(rt({},a(t,["path","url"])),{},{url:n&&it(n,e),path:i&&it(i,e)})},st=function(t){return t.json?t.json():Promise.reject(t)},at=function(t){return function(t){if(!t)return{};var e=t.match(/<([^>]+)>; rel="next"/);return e?{next:e[1]}:{}}(t.headers.get("link")).next},lt=function(t){var e=!!t.path&&-1!==t.path.indexOf("per_page=-1"),i=!!t.url&&-1!==t.url.indexOf("per_page=-1");return e||i},ct=function(){var t,e=(t=X().mark(function t(e,i){var n,r,o,s,a,l;return X().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e.parse){t.next=2;break}return t.abrupt("return",i(e));case 2:if(lt(e)){t.next=4;break}return t.abrupt("return",i(e));case 4:return t.next=6,Pt(rt(rt({},ot(e,{per_page:100})),{},{parse:!1}));case 6:return n=t.sent,t.next=9,st(n);case 9:if(r=t.sent,Array.isArray(r)){t.next=12;break}return t.abrupt("return",r);case 12:if(o=at(n)){t.next=15;break}return t.abrupt("return",r);case 15:s=[].concat(r);case 16:if(!o){t.next=27;break}return t.next=19,Pt(rt(rt({},e),{},{path:void 0,url:o,parse:!1}));case 19:return a=t.sent,t.next=22,st(a);case 22:l=t.sent,s=s.concat(l),o=at(a),t.next=16;break;case 27:return t.abrupt("return",s);case 28:case"end":return t.stop()}},t)}),function(){var e=this,i=arguments;return new Promise(function(n,r){var o=t.apply(e,i);function s(t){q(o,n,r,s,a,"next",t)}function a(t){q(o,n,r,s,a,"throw",t)}s(void 0)})});return function(t,i){return e.apply(this,arguments)}}(),ht=ct;function ut(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function dt(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ut(Object(i),!0).forEach(function(e){s(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ut(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var ft=new Set(["PATCH","PUT","DELETE"]);function pt(t,e){return void 0!==function(t,e){return Z(t)[e]}(t,e)}var gt=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Promise.resolve(function(t){return arguments.length>1&&void 0!==arguments[1]&&!arguments[1]?t:204===t.status?null:t.json?t.json():Promise.reject(t)}(t,e)).catch(function(t){return mt(t,e)})};function mt(t){if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1]))throw t;return function(t){var e={code:"invalid_json",message:j("The response is not a valid JSON response.")};if(!t||!t.json)throw e;return t.json().catch(function(){throw e})}(t).then(function(t){var e={code:"unknown_error",message:j("An unknown error occurred.")};throw t||e})}function bt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function vt(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?bt(Object(i),!0).forEach(function(e){s(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):bt(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var yt=function(t,e){if(!(t.path&&-1!==t.path.indexOf("/wp/v2/media")||t.url&&-1!==t.url.indexOf("/wp/v2/media")))return e(t);var i=0,n=function t(n){return i++,e({path:"/wp/v2/media/".concat(n,"/post-process"),method:"POST",data:{action:"create-image-subsizes"},parse:!1}).catch(function(){return i<5?t(n):(e({path:"/wp/v2/media/".concat(n,"?force=true"),method:"DELETE"}),Promise.reject())})};return e(vt(vt({},t),{},{parse:!1})).catch(function(e){var i=e.headers.get("x-wp-upload-attachment-id");return e.status>=500&&e.status<600&&i?n(i).catch(function(){return!1!==t.parse?Promise.reject({code:"post_process",message:j("Media upload failed. If this is a photo or a large image, please scale it down and try again.")}):Promise.reject(e)}):mt(e,t.parse)}).then(function(e){return gt(e,t.parse)})};function xt(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function _t(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?xt(Object(i),!0).forEach(function(e){s(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):xt(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var wt={Accept:"application/json, */*;q=0.1"},kt={credentials:"include"},Ot=[function(t,e){return"string"!=typeof t.url||pt(t.url,"_locale")||(t.url=it(t.url,{_locale:"user"})),"string"!=typeof t.path||pt(t.path,"_locale")||(t.path=it(t.path,{_locale:"user"})),e(t)},B,function(t,e){var i=t.method,n=void 0===i?"GET":i;return ft.has(n.toUpperCase())&&(t=dt(dt({},t),{},{headers:dt(dt({},t.headers),{},{"X-HTTP-Method-Override":n,"Content-Type":"application/json"}),method:"POST"})),e(t)},ht];var St=function(t){if(t.status>=200&&t.status<300)return t;throw t},Mt=function(t){var e=t.url,i=t.path,n=t.data,r=t.parse,o=void 0===r||r,s=a(t,["url","path","data","parse"]),l=t.body,c=t.headers;return c=_t(_t({},wt),c),n&&(l=JSON.stringify(n),c["Content-Type"]="application/json"),window.fetch(e||i||window.location.href,_t(_t(_t({},kt),s),{},{body:l,headers:c})).then(function(t){return Promise.resolve(t).then(St).catch(function(t){return mt(t,o)}).then(function(t){return gt(t,o)})},function(){throw{code:"fetch_error",message:j("You are probably offline.")}})};function Et(t){return Ot.reduceRight(function(t,e){return function(i){return e(i,t)}},Mt)(t).catch(function(e){return"rest_cookie_invalid_nonce"!==e.code?Promise.reject(e):window.fetch(Et.nonceEndpoint).then(St).then(function(t){return t.text()}).then(function(e){return Et.nonceMiddleware.nonce=e,Et(t)})})}Et.use=function(t){Ot.unshift(t)},Et.setFetchHandler=function(t){Mt=t},Et.createNonceMiddleware=F,Et.createPreloadingMiddleware=U,Et.createRootURLMiddleware=H,Et.fetchAllMiddleware=ht,Et.mediaUploadMiddleware=yt;var Pt=Et;const Tt={wpWrap:document.getElementById("wpwrap"),adminbar:document.getElementById("wpadminbar"),wpContent:document.getElementById("wpbody-content"),libraryWrap:document.getElementById("cloudinary-dam"),cloudinaryHeader:document.getElementById("cloudinary-header"),wpFooter:document.getElementById("wpfooter"),importStatus:document.getElementById("import-status"),downloading:{},_init(){const t=this,e=this.libraryWrap,i=this.importStatus;"undefined"!=typeof CLDN&&document.querySelector(CLDN.mloptions.inline_container)&&(Pt.use(Pt.createNonceMiddleware(CLDN.nonce)),cloudinary.openMediaLibrary(CLDN.mloptions,{insertHandler(n){const r=[];for(let o=0;o<n.assets.length;o++){const s=n.assets[o];wp.ajax.post("cloudinary-down-sync",{nonce:CLDN.nonce,asset:s}).done(function(n){e.style.marginRight="220px",i.style.display="block";const o=t.makeProgress(n),s="download-"+n.public_id;r[s]=o,i.appendChild(o),setTimeout(()=>{o.style.opacity=1},250),Pt({path:cldData.dam.fetch_url,data:{src:n.url,filename:n.filename,attachment_id:n.attachment_id,transformations:n.transformations},method:"POST"}).then(t=>{const n=r[s];delete r[s],n.removeChild(n.firstChild),setTimeout(()=>{n.style.opacity=0,setTimeout(()=>{n.parentNode.removeChild(n),Object.keys(r).length||(e.style.marginRight="0px",i.style.display="none")},1e3)},500)})})}}}),window.addEventListener("resize",function(){t._resize()}),t._resize())},_resize(){this.libraryWrap.style.height=this.wpFooter.offsetTop-this.libraryWrap.offsetTop-this.adminbar.offsetHeight+"px"},makeProgress(t){const e=document.createElement("div"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-import-item"),i.classList.add("spinner"),n.classList.add("cld-import-item-id"),n.innerText=t.public_id,e.appendChild(i),e.appendChild(n),e}};window.addEventListener("load",()=>Tt._init());const At={_init(){const t=this;if("undefined"!=typeof CLDIS){[...document.getElementsByClassName("cld-notice-box")].forEach(e=>{const i=e.getElementsByClassName("notice-dismiss");i.length&&i[0].addEventListener("click",i=>{e.style.height=e.offsetHeight+"px",i.preventDefault(),setTimeout(function(){t._dismiss(e)},5)})})}},_dismiss(t){const e=t.dataset.dismiss,i=parseInt(t.dataset.duration);t.classList.add("dismissed"),t.style.height="0px",setTimeout(function(){t.remove()},400),0<i&&wp.ajax.send({url:CLDIS.url,data:{token:e,duration:i,_wpnonce:CLDIS.nonce}})}};window.addEventListener("load",At._init());function Ct(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Lt(t){return t instanceof Ct(t).Element||t instanceof Element}function Dt(t){return t instanceof Ct(t).HTMLElement||t instanceof HTMLElement}function jt(t){return"undefined"!=typeof ShadowRoot&&(t instanceof Ct(t).ShadowRoot||t instanceof ShadowRoot)}var It=Math.max,Rt=Math.min,Ft=Math.round;function zt(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Nt(){return!/^((?!chrome|android).)*safari/i.test(zt())}function Bt(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),r=1,o=1;e&&Dt(t)&&(r=t.offsetWidth>0&&Ft(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Ft(n.height)/t.offsetHeight||1);var s=(Lt(t)?Ct(t):window).visualViewport,a=!Nt()&&i,l=(n.left+(a&&s?s.offsetLeft:0))/r,c=(n.top+(a&&s?s.offsetTop:0))/o,h=n.width/r,u=n.height/o;return{width:h,height:u,top:c,right:l+h,bottom:c+u,left:l,x:l,y:c}}function Wt(t){var e=Ct(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Vt(t){return t?(t.nodeName||"").toLowerCase():null}function Ht(t){return((Lt(t)?t.ownerDocument:t.document)||window.document).documentElement}function $t(t){return Bt(Ht(t)).left+Wt(t).scrollLeft}function Ut(t){return Ct(t).getComputedStyle(t)}function qt(t){var e=Ut(t),i=e.overflow,n=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+r+n)}function Yt(t,e,i){void 0===i&&(i=!1);var n,r,o=Dt(e),s=Dt(e)&&function(t){var e=t.getBoundingClientRect(),i=Ft(e.width)/t.offsetWidth||1,n=Ft(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=Ht(e),l=Bt(t,s,i),c={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(o||!o&&!i)&&(("body"!==Vt(e)||qt(a))&&(c=(n=e)!==Ct(n)&&Dt(n)?{scrollLeft:(r=n).scrollLeft,scrollTop:r.scrollTop}:Wt(n)),Dt(e)?((h=Bt(e,!0)).x+=e.clientLeft,h.y+=e.clientTop):a&&(h.x=$t(a))),{x:l.left+c.scrollLeft-h.x,y:l.top+c.scrollTop-h.y,width:l.width,height:l.height}}function Xt(t){var e=Bt(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function Gt(t){return"html"===Vt(t)?t:t.assignedSlot||t.parentNode||(jt(t)?t.host:null)||Ht(t)}function Kt(t){return["html","body","#document"].indexOf(Vt(t))>=0?t.ownerDocument.body:Dt(t)&&qt(t)?t:Kt(Gt(t))}function Jt(t,e){var i;void 0===e&&(e=[]);var n=Kt(t),r=n===(null==(i=t.ownerDocument)?void 0:i.body),o=Ct(n),s=r?[o].concat(o.visualViewport||[],qt(n)?n:[]):n,a=e.concat(s);return r?a:a.concat(Jt(Gt(s)))}function Qt(t){return["table","td","th"].indexOf(Vt(t))>=0}function Zt(t){return Dt(t)&&"fixed"!==Ut(t).position?t.offsetParent:null}function te(t){for(var e=Ct(t),i=Zt(t);i&&Qt(i)&&"static"===Ut(i).position;)i=Zt(i);return i&&("html"===Vt(i)||"body"===Vt(i)&&"static"===Ut(i).position)?e:i||function(t){var e=/firefox/i.test(zt());if(/Trident/i.test(zt())&&Dt(t)&&"fixed"===Ut(t).position)return null;var i=Gt(t);for(jt(i)&&(i=i.host);Dt(i)&&["html","body"].indexOf(Vt(i))<0;){var n=Ut(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}var ee="top",ie="bottom",ne="right",re="left",oe="auto",se=[ee,ie,ne,re],ae="start",le="end",ce="viewport",he="popper",ue=se.reduce(function(t,e){return t.concat([e+"-"+ae,e+"-"+le])},[]),de=[].concat(se,[oe]).reduce(function(t,e){return t.concat([e,e+"-"+ae,e+"-"+le])},[]),fe=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function pe(t){var e=new Map,i=new Set,n=[];function r(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!i.has(t)){var n=e.get(t);n&&r(n)}}),n.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){i.has(t.name)||r(t)}),n}var ge={placement:"bottom",modifiers:[],strategy:"absolute"};function me(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function be(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,r=e.defaultOptions,o=void 0===r?ge:r;return function(t,e,i){void 0===i&&(i=o);var r,s,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},ge,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,h={state:a,setOptions:function(i){var r="function"==typeof i?i(a.options):i;u(),a.options=Object.assign({},o,a.options,r),a.scrollParents={reference:Lt(t)?Jt(t):t.contextElement?Jt(t.contextElement):[],popper:Jt(e)};var s,c,d=function(t){var e=pe(t);return fe.reduce(function(t,i){return t.concat(e.filter(function(t){return t.phase===i}))},[])}((s=[].concat(n,a.options.modifiers),c=s.reduce(function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t},{}),Object.keys(c).map(function(t){return c[t]})));return a.orderedModifiers=d.filter(function(t){return t.enabled}),a.orderedModifiers.forEach(function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,r=t.effect;if("function"==typeof r){var o=r({state:a,name:e,instance:h,options:n}),s=function(){};l.push(o||s)}}),h.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,i=t.popper;if(me(e,i)){a.rects={reference:Yt(e,te(i),"fixed"===a.options.strategy),popper:Xt(i)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(t){return a.modifiersData[t.name]=Object.assign({},t.data)});for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var r=a.orderedModifiers[n],o=r.fn,s=r.options,l=void 0===s?{}:s,u=r.name;"function"==typeof o&&(a=o({state:a,options:l,name:u,instance:h})||a)}else a.reset=!1,n=-1}}},update:(r=function(){return new Promise(function(t){h.forceUpdate(),t(a)})},function(){return s||(s=new Promise(function(t){Promise.resolve().then(function(){s=void 0,t(r())})})),s}),destroy:function(){u(),c=!0}};if(!me(t,e))return h;function u(){l.forEach(function(t){return t()}),l=[]}return h.setOptions(i).then(function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)}),h}}var ve={passive:!0};function ye(t){return t.split("-")[0]}function xe(t){return t.split("-")[1]}function _e(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function we(t){var e,i=t.reference,n=t.element,r=t.placement,o=r?ye(r):null,s=r?xe(r):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case ee:e={x:a,y:i.y-n.height};break;case ie:e={x:a,y:i.y+i.height};break;case ne:e={x:i.x+i.width,y:l};break;case re:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?_e(o):null;if(null!=c){var h="y"===c?"height":"width";switch(s){case ae:e[c]=e[c]-(i[h]/2-n[h]/2);break;case le:e[c]=e[c]+(i[h]/2-n[h]/2)}}return e}var ke={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Oe(t){var e,i=t.popper,n=t.popperRect,r=t.placement,o=t.variation,s=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,u=t.isFixed,d=s.x,f=void 0===d?0:d,p=s.y,g=void 0===p?0:p,m="function"==typeof h?h({x:f,y:g}):{x:f,y:g};f=m.x,g=m.y;var b=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),y=re,x=ee,_=window;if(c){var w=te(i),k="clientHeight",O="clientWidth";if(w===Ct(i)&&"static"!==Ut(w=Ht(i)).position&&"absolute"===a&&(k="scrollHeight",O="scrollWidth"),r===ee||(r===re||r===ne)&&o===le)x=ie,g-=(u&&w===_&&_.visualViewport?_.visualViewport.height:w[k])-n.height,g*=l?1:-1;if(r===re||(r===ee||r===ie)&&o===le)y=ne,f-=(u&&w===_&&_.visualViewport?_.visualViewport.width:w[O])-n.width,f*=l?1:-1}var S,M=Object.assign({position:a},c&&ke),E=!0===h?function(t,e){var i=t.x,n=t.y,r=e.devicePixelRatio||1;return{x:Ft(i*r)/r||0,y:Ft(n*r)/r||0}}({x:f,y:g},Ct(i)):{x:f,y:g};return f=E.x,g=E.y,l?Object.assign({},M,((S={})[x]=v?"0":"",S[y]=b?"0":"",S.transform=(_.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",S)):Object.assign({},M,((e={})[x]=v?g+"px":"",e[y]=b?f+"px":"",e.transform="",e))}var Se={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];Dt(r)&&Vt(r)&&(Object.assign(r.style,i),Object.keys(n).forEach(function(t){var e=n[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach(function(t){var n=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce(function(t,e){return t[e]="",t},{});Dt(n)&&Vt(n)&&(Object.assign(n.style,o),Object.keys(r).forEach(function(t){n.removeAttribute(t)}))})}},requires:["computeStyles"]};var Me={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.offset,o=void 0===r?[0,0]:r,s=de.reduce(function(t,i){return t[i]=function(t,e,i){var n=ye(t),r=[re,ee].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[re,ne].indexOf(n)>=0?{x:a,y:s}:{x:s,y:a}}(i,e.rects,o),t},{}),a=s[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=s}},Ee={left:"right",right:"left",bottom:"top",top:"bottom"};function Pe(t){return t.replace(/left|right|bottom|top/g,function(t){return Ee[t]})}var Te={start:"end",end:"start"};function Ae(t){return t.replace(/start|end/g,function(t){return Te[t]})}function Ce(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&jt(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Le(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function De(t,e,i){return e===ce?Le(function(t,e){var i=Ct(t),n=Ht(t),r=i.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,l=0;if(r){o=r.width,s=r.height;var c=Nt();(c||!c&&"fixed"===e)&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:s,x:a+$t(t),y:l}}(t,i)):Lt(e)?function(t,e){var i=Bt(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):Le(function(t){var e,i=Ht(t),n=Wt(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=It(i.scrollWidth,i.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=It(i.scrollHeight,i.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-n.scrollLeft+$t(t),l=-n.scrollTop;return"rtl"===Ut(r||i).direction&&(a+=It(i.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:l}}(Ht(t)))}function je(t,e,i,n){var r="clippingParents"===e?function(t){var e=Jt(Gt(t)),i=["absolute","fixed"].indexOf(Ut(t).position)>=0&&Dt(t)?te(t):t;return Lt(i)?e.filter(function(t){return Lt(t)&&Ce(t,i)&&"body"!==Vt(t)}):[]}(t):[].concat(e),o=[].concat(r,[i]),s=o[0],a=o.reduce(function(e,i){var r=De(t,i,n);return e.top=It(r.top,e.top),e.right=Rt(r.right,e.right),e.bottom=Rt(r.bottom,e.bottom),e.left=It(r.left,e.left),e},De(t,s,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Ie(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Re(t,e){return e.reduce(function(e,i){return e[i]=t,e},{})}function Fe(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=void 0===n?t.placement:n,o=i.strategy,s=void 0===o?t.strategy:o,a=i.boundary,l=void 0===a?"clippingParents":a,c=i.rootBoundary,h=void 0===c?ce:c,u=i.elementContext,d=void 0===u?he:u,f=i.altBoundary,p=void 0!==f&&f,g=i.padding,m=void 0===g?0:g,b=Ie("number"!=typeof m?m:Re(m,se)),v=d===he?"reference":he,y=t.rects.popper,x=t.elements[p?v:d],_=je(Lt(x)?x:x.contextElement||Ht(t.elements.popper),l,h,s),w=Bt(t.elements.reference),k=we({reference:w,element:y,strategy:"absolute",placement:r}),O=Le(Object.assign({},y,k)),S=d===he?O:w,M={top:_.top-S.top+b.top,bottom:S.bottom-_.bottom+b.bottom,left:_.left-S.left+b.left,right:S.right-_.right+b.right},E=t.modifiersData.offset;if(d===he&&E){var P=E[r];Object.keys(M).forEach(function(t){var e=[ne,ie].indexOf(t)>=0?1:-1,i=[ee,ie].indexOf(t)>=0?"y":"x";M[t]+=P[i]*e})}return M}function ze(t,e,i){return It(t,Rt(e,i))}var Ne={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0!==s&&s,l=i.boundary,c=i.rootBoundary,h=i.altBoundary,u=i.padding,d=i.tether,f=void 0===d||d,p=i.tetherOffset,g=void 0===p?0:p,m=Fe(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),b=ye(e.placement),v=xe(e.placement),y=!v,x=_e(b),_="x"===x?"y":"x",w=e.modifiersData.popperOffsets,k=e.rects.reference,O=e.rects.popper,S="function"==typeof g?g(Object.assign({},e.rects,{placement:e.placement})):g,M="number"==typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),E=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,P={x:0,y:0};if(w){if(o){var T,A="y"===x?ee:re,C="y"===x?ie:ne,L="y"===x?"height":"width",D=w[x],j=D+m[A],I=D-m[C],R=f?-O[L]/2:0,F=v===ae?k[L]:O[L],z=v===ae?-O[L]:-k[L],N=e.elements.arrow,B=f&&N?Xt(N):{width:0,height:0},W=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=W[A],H=W[C],$=ze(0,k[L],B[L]),U=y?k[L]/2-R-$-V-M.mainAxis:F-$-V-M.mainAxis,q=y?-k[L]/2+R+$+H+M.mainAxis:z+$+H+M.mainAxis,Y=e.elements.arrow&&te(e.elements.arrow),X=Y?"y"===x?Y.clientTop||0:Y.clientLeft||0:0,G=null!=(T=null==E?void 0:E[x])?T:0,K=D+q-G,J=ze(f?Rt(j,D+U-G-X):j,D,f?It(I,K):I);w[x]=J,P[x]=J-D}if(a){var Q,Z="x"===x?ee:re,tt="x"===x?ie:ne,et=w[_],it="y"===_?"height":"width",nt=et+m[Z],rt=et-m[tt],ot=-1!==[ee,re].indexOf(b),st=null!=(Q=null==E?void 0:E[_])?Q:0,at=ot?nt:et-k[it]-O[it]-st+M.altAxis,lt=ot?et+k[it]+O[it]-st-M.altAxis:rt,ct=f&&ot?function(t,e,i){var n=ze(t,e,i);return n>i?i:n}(at,et,lt):ze(f?at:nt,et,f?lt:rt);w[_]=ct,P[_]=ct-et}e.modifiersData[n]=P}},requiresIfExists:["offset"]};var Be={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,r=t.options,o=i.elements.arrow,s=i.modifiersData.popperOffsets,a=ye(i.placement),l=_e(a),c=[re,ne].indexOf(a)>=0?"height":"width";if(o&&s){var h=function(t,e){return Ie("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Re(t,se))}(r.padding,i),u=Xt(o),d="y"===l?ee:re,f="y"===l?ie:ne,p=i.rects.reference[c]+i.rects.reference[l]-s[l]-i.rects.popper[c],g=s[l]-i.rects.reference[l],m=te(o),b=m?"y"===l?m.clientHeight||0:m.clientWidth||0:0,v=p/2-g/2,y=h[d],x=b-u[c]-h[f],_=b/2-u[c]/2+v,w=ze(y,_,x),k=l;i.modifiersData[n]=((e={})[k]=w,e.centerOffset=w-_,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&Ce(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function We(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function Ve(t){return[ee,ne,ie,re].some(function(e){return t[e]>=0})}var He=be({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,r=n.scroll,o=void 0===r||r,s=n.resize,a=void 0===s||s,l=Ct(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(t){t.addEventListener("scroll",i.update,ve)}),a&&l.addEventListener("resize",i.update,ve),function(){o&&c.forEach(function(t){t.removeEventListener("scroll",i.update,ve)}),a&&l.removeEventListener("resize",i.update,ve)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=we({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,r=void 0===n||n,o=i.adaptive,s=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:ye(e.placement),variation:xe(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,Oe(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,Oe(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},Se,Me,{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var r=i.mainAxis,o=void 0===r||r,s=i.altAxis,a=void 0===s||s,l=i.fallbackPlacements,c=i.padding,h=i.boundary,u=i.rootBoundary,d=i.altBoundary,f=i.flipVariations,p=void 0===f||f,g=i.allowedAutoPlacements,m=e.options.placement,b=ye(m),v=l||(b===m||!p?[Pe(m)]:function(t){if(ye(t)===oe)return[];var e=Pe(t);return[Ae(t),e,Ae(e)]}(m)),y=[m].concat(v).reduce(function(t,i){return t.concat(ye(i)===oe?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,r=i.boundary,o=i.rootBoundary,s=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?de:l,h=xe(n),u=h?a?ue:ue.filter(function(t){return xe(t)===h}):se,d=u.filter(function(t){return c.indexOf(t)>=0});0===d.length&&(d=u);var f=d.reduce(function(e,i){return e[i]=Fe(t,{placement:i,boundary:r,rootBoundary:o,padding:s})[ye(i)],e},{});return Object.keys(f).sort(function(t,e){return f[t]-f[e]})}(e,{placement:i,boundary:h,rootBoundary:u,padding:c,flipVariations:p,allowedAutoPlacements:g}):i)},[]),x=e.rects.reference,_=e.rects.popper,w=new Map,k=!0,O=y[0],S=0;S<y.length;S++){var M=y[S],E=ye(M),P=xe(M)===ae,T=[ee,ie].indexOf(E)>=0,A=T?"width":"height",C=Fe(e,{placement:M,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),L=T?P?ne:re:P?ie:ee;x[A]>_[A]&&(L=Pe(L));var D=Pe(L),j=[];if(o&&j.push(C[E]<=0),a&&j.push(C[L]<=0,C[D]<=0),j.every(function(t){return t})){O=M,k=!1;break}w.set(M,j)}if(k)for(var I=function(t){var e=y.find(function(e){var i=w.get(e);if(i)return i.slice(0,t).every(function(t){return t})});if(e)return O=e,"break"},R=p?3:1;R>0;R--){if("break"===I(R))break}e.placement!==O&&(e.modifiersData[n]._skip=!0,e.placement=O,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},Ne,Be,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=Fe(e,{elementContext:"reference"}),a=Fe(e,{altBoundary:!0}),l=We(s,n),c=We(a,r,o),h=Ve(l),u=Ve(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}}]}),$e="tippy-content",Ue="tippy-backdrop",qe="tippy-arrow",Ye="tippy-svg-arrow",Xe={passive:!0,capture:!0},Ge=function(){return document.body};function Ke(t,e,i){if(Array.isArray(t)){var n=t[e];return null==n?Array.isArray(i)?i[e]:i:n}return t}function Je(t,e){var i={}.toString.call(t);return 0===i.indexOf("[object")&&i.indexOf(e+"]")>-1}function Qe(t,e){return"function"==typeof t?t.apply(void 0,e):t}function Ze(t,e){return 0===e?t:function(n){clearTimeout(i),i=setTimeout(function(){t(n)},e)};var i}function ti(t){return[].concat(t)}function ei(t,e){-1===t.indexOf(e)&&t.push(e)}function ii(t){return t.split("-")[0]}function ni(t){return[].slice.call(t)}function ri(t){return Object.keys(t).reduce(function(e,i){return void 0!==t[i]&&(e[i]=t[i]),e},{})}function oi(){return document.createElement("div")}function si(t){return["Element","Fragment"].some(function(e){return Je(t,e)})}function ai(t){return Je(t,"MouseEvent")}function li(t){return!(!t||!t._tippy||t._tippy.reference!==t)}function ci(t){return si(t)?[t]:function(t){return Je(t,"NodeList")}(t)?ni(t):Array.isArray(t)?t:ni(document.querySelectorAll(t))}function hi(t,e){t.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function ui(t,e){t.forEach(function(t){t&&t.setAttribute("data-state",e)})}function di(t){var e,i=ti(t)[0];return null!=i&&null!=(e=i.ownerDocument)&&e.body?i.ownerDocument:document}function fi(t,e,i){var n=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(e){t[n](e,i)})}function pi(t,e){for(var i=e;i;){var n;if(t.contains(i))return!0;i=null==i.getRootNode||null==(n=i.getRootNode())?void 0:n.host}return!1}var gi={isTouch:!1},mi=0;function bi(){gi.isTouch||(gi.isTouch=!0,window.performance&&document.addEventListener("mousemove",vi))}function vi(){var t=performance.now();t-mi<20&&(gi.isTouch=!1,document.removeEventListener("mousemove",vi)),mi=t}function yi(){var t=document.activeElement;if(li(t)){var e=t._tippy;t.blur&&!e.state.isVisible&&t.blur()}}var xi=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;var _i={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},wi=Object.assign({appendTo:Ge,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},_i,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),ki=Object.keys(wi);function Oi(t){var e=(t.plugins||[]).reduce(function(e,i){var n,r=i.name,o=i.defaultValue;r&&(e[r]=void 0!==t[r]?t[r]:null!=(n=wi[r])?n:o);return e},{});return Object.assign({},t,e)}function Si(t,e){var i=Object.assign({},e,{content:Qe(e.content,[t])},e.ignoreAttributes?{}:function(t,e){return(e?Object.keys(Oi(Object.assign({},wi,{plugins:e}))):ki).reduce(function(e,i){var n=(t.getAttribute("data-tippy-"+i)||"").trim();if(!n)return e;if("content"===i)e[i]=n;else try{e[i]=JSON.parse(n)}catch(t){e[i]=n}return e},{})}(t,e.plugins));return i.aria=Object.assign({},wi.aria,i.aria),i.aria={expanded:"auto"===i.aria.expanded?e.interactive:i.aria.expanded,content:"auto"===i.aria.content?e.interactive?null:"describedby":i.aria.content},i}function Mi(t,e){t.innerHTML=e}function Ei(t){var e=oi();return!0===t?e.className=qe:(e.className=Ye,si(t)?e.appendChild(t):Mi(e,t)),e}function Pi(t,e){si(e.content)?(Mi(t,""),t.appendChild(e.content)):"function"!=typeof e.content&&(e.allowHTML?Mi(t,e.content):t.textContent=e.content)}function Ti(t){var e=t.firstElementChild,i=ni(e.children);return{box:e,content:i.find(function(t){return t.classList.contains($e)}),arrow:i.find(function(t){return t.classList.contains(qe)||t.classList.contains(Ye)}),backdrop:i.find(function(t){return t.classList.contains(Ue)})}}function Ai(t){var e=oi(),i=oi();i.className="tippy-box",i.setAttribute("data-state","hidden"),i.setAttribute("tabindex","-1");var n=oi();function r(i,n){var r=Ti(e),o=r.box,s=r.content,a=r.arrow;n.theme?o.setAttribute("data-theme",n.theme):o.removeAttribute("data-theme"),"string"==typeof n.animation?o.setAttribute("data-animation",n.animation):o.removeAttribute("data-animation"),n.inertia?o.setAttribute("data-inertia",""):o.removeAttribute("data-inertia"),o.style.maxWidth="number"==typeof n.maxWidth?n.maxWidth+"px":n.maxWidth,n.role?o.setAttribute("role",n.role):o.removeAttribute("role"),i.content===n.content&&i.allowHTML===n.allowHTML||Pi(s,t.props),n.arrow?a?i.arrow!==n.arrow&&(o.removeChild(a),o.appendChild(Ei(n.arrow))):o.appendChild(Ei(n.arrow)):a&&o.removeChild(a)}return n.className=$e,n.setAttribute("data-state","hidden"),Pi(n,t.props),e.appendChild(i),i.appendChild(n),r(t.props,t.props),{popper:e,onUpdate:r}}Ai.$$tippy=!0;var Ci=1,Li=[],Di=[];function ji(t,e){var i,n,r,o,s,a,l,c,h=Si(t,Object.assign({},wi,Oi(ri(e)))),u=!1,d=!1,f=!1,p=!1,g=[],m=Ze(Y,h.interactiveDebounce),b=Ci++,v=(c=h.plugins).filter(function(t,e){return c.indexOf(t)===e}),y={id:b,reference:t,popper:oi(),popperInstance:null,props:h,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:v,clearDelayTimeouts:function(){clearTimeout(i),clearTimeout(n),cancelAnimationFrame(r)},setProps:function(e){0;if(y.state.isDestroyed)return;D("onBeforeUpdate",[y,e]),U();var i=y.props,n=Si(t,Object.assign({},i,ri(e),{ignoreAttributes:!0}));y.props=n,$(),i.interactiveDebounce!==n.interactiveDebounce&&(R(),m=Ze(Y,n.interactiveDebounce));i.triggerTarget&&!n.triggerTarget?ti(i.triggerTarget).forEach(function(t){t.removeAttribute("aria-expanded")}):n.triggerTarget&&t.removeAttribute("aria-expanded");I(),L(),w&&w(i,n);y.popperInstance&&(J(),Z().forEach(function(t){requestAnimationFrame(t._tippy.popperInstance.forceUpdate)}));D("onAfterUpdate",[y,e])},setContent:function(t){y.setProps({content:t})},show:function(){0;var t=y.state.isVisible,e=y.state.isDestroyed,i=!y.state.isEnabled,n=gi.isTouch&&!y.props.touch,r=Ke(y.props.duration,0,wi.duration);if(t||e||i||n)return;if(P().hasAttribute("disabled"))return;if(D("onShow",[y],!1),!1===y.props.onShow(y))return;y.state.isVisible=!0,E()&&(_.style.visibility="visible");L(),B(),y.state.isMounted||(_.style.transition="none");if(E()){var o=A();hi([o.box,o.content],0)}a=function(){var t;if(y.state.isVisible&&!p){if(p=!0,_.offsetHeight,_.style.transition=y.props.moveTransition,E()&&y.props.animation){var e=A(),i=e.box,n=e.content;hi([i,n],r),ui([i,n],"visible")}j(),I(),ei(Di,y),null==(t=y.popperInstance)||t.forceUpdate(),D("onMount",[y]),y.props.animation&&E()&&function(t,e){V(t,e)}(r,function(){y.state.isShown=!0,D("onShown",[y])})}},function(){var t,e=y.props.appendTo,i=P();t=y.props.interactive&&e===Ge||"parent"===e?i.parentNode:Qe(e,[i]);t.contains(_)||t.appendChild(_);y.state.isMounted=!0,J(),!1}()},hide:function(){0;var t=!y.state.isVisible,e=y.state.isDestroyed,i=!y.state.isEnabled,n=Ke(y.props.duration,1,wi.duration);if(t||e||i)return;if(D("onHide",[y],!1),!1===y.props.onHide(y))return;y.state.isVisible=!1,y.state.isShown=!1,p=!1,u=!1,E()&&(_.style.visibility="hidden");if(R(),W(),L(!0),E()){var r=A(),o=r.box,s=r.content;y.props.animation&&(hi([o,s],n),ui([o,s],"hidden"))}j(),I(),y.props.animation?E()&&function(t,e){V(t,function(){!y.state.isVisible&&_.parentNode&&_.parentNode.contains(_)&&e()})}(n,y.unmount):y.unmount()},hideWithInteractivity:function(t){0;T().addEventListener("mousemove",m),ei(Li,m),m(t)},enable:function(){y.state.isEnabled=!0},disable:function(){y.hide(),y.state.isEnabled=!1},unmount:function(){0;y.state.isVisible&&y.hide();if(!y.state.isMounted)return;Q(),Z().forEach(function(t){t._tippy.unmount()}),_.parentNode&&_.parentNode.removeChild(_);Di=Di.filter(function(t){return t!==y}),y.state.isMounted=!1,D("onHidden",[y])},destroy:function(){0;if(y.state.isDestroyed)return;y.clearDelayTimeouts(),y.unmount(),U(),delete t._tippy,y.state.isDestroyed=!0,D("onDestroy",[y])}};if(!h.render)return y;var x=h.render(y),_=x.popper,w=x.onUpdate;_.setAttribute("data-tippy-root",""),_.id="tippy-"+y.id,y.popper=_,t._tippy=y,_._tippy=y;var k=v.map(function(t){return t.fn(y)}),O=t.hasAttribute("aria-expanded");return $(),I(),L(),D("onCreate",[y]),h.showOnCreate&&tt(),_.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),_.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&T().addEventListener("mousemove",m)}),y;function S(){var t=y.props.touch;return Array.isArray(t)?t:[t,0]}function M(){return"hold"===S()[0]}function E(){var t;return!(null==(t=y.props.render)||!t.$$tippy)}function P(){return l||t}function T(){var t=P().parentNode;return t?di(t):document}function A(){return Ti(_)}function C(t){return y.state.isMounted&&!y.state.isVisible||gi.isTouch||o&&"focus"===o.type?0:Ke(y.props.delay,t?0:1,wi.delay)}function L(t){void 0===t&&(t=!1),_.style.pointerEvents=y.props.interactive&&!t?"":"none",_.style.zIndex=""+y.props.zIndex}function D(t,e,i){var n;(void 0===i&&(i=!0),k.forEach(function(i){i[t]&&i[t].apply(i,e)}),i)&&(n=y.props)[t].apply(n,e)}function j(){var e=y.props.aria;if(e.content){var i="aria-"+e.content,n=_.id;ti(y.props.triggerTarget||t).forEach(function(t){var e=t.getAttribute(i);if(y.state.isVisible)t.setAttribute(i,e?e+" "+n:n);else{var r=e&&e.replace(n,"").trim();r?t.setAttribute(i,r):t.removeAttribute(i)}})}}function I(){!O&&y.props.aria.expanded&&ti(y.props.triggerTarget||t).forEach(function(t){y.props.interactive?t.setAttribute("aria-expanded",y.state.isVisible&&t===P()?"true":"false"):t.removeAttribute("aria-expanded")})}function R(){T().removeEventListener("mousemove",m),Li=Li.filter(function(t){return t!==m})}function F(e){if(!gi.isTouch||!f&&"mousedown"!==e.type){var i=e.composedPath&&e.composedPath()[0]||e.target;if(!y.props.interactive||!pi(_,i)){if(ti(y.props.triggerTarget||t).some(function(t){return pi(t,i)})){if(gi.isTouch)return;if(y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else D("onClickOutside",[y,e]);!0===y.props.hideOnClick&&(y.clearDelayTimeouts(),y.hide(),d=!0,setTimeout(function(){d=!1}),y.state.isMounted||W())}}}function z(){f=!0}function N(){f=!1}function B(){var t=T();t.addEventListener("mousedown",F,!0),t.addEventListener("touchend",F,Xe),t.addEventListener("touchstart",N,Xe),t.addEventListener("touchmove",z,Xe)}function W(){var t=T();t.removeEventListener("mousedown",F,!0),t.removeEventListener("touchend",F,Xe),t.removeEventListener("touchstart",N,Xe),t.removeEventListener("touchmove",z,Xe)}function V(t,e){var i=A().box;function n(t){t.target===i&&(fi(i,"remove",n),e())}if(0===t)return e();fi(i,"remove",s),fi(i,"add",n),s=n}function H(e,i,n){void 0===n&&(n=!1),ti(y.props.triggerTarget||t).forEach(function(t){t.addEventListener(e,i,n),g.push({node:t,eventType:e,handler:i,options:n})})}function $(){var t;M()&&(H("touchstart",q,{passive:!0}),H("touchend",X,{passive:!0})),(t=y.props.trigger,t.split(/\s+/).filter(Boolean)).forEach(function(t){if("manual"!==t)switch(H(t,q),t){case"mouseenter":H("mouseleave",X);break;case"focus":H(xi?"focusout":"blur",G);break;case"focusin":H("focusout",G)}})}function U(){g.forEach(function(t){var e=t.node,i=t.eventType,n=t.handler,r=t.options;e.removeEventListener(i,n,r)}),g=[]}function q(t){var e,i=!1;if(y.state.isEnabled&&!K(t)&&!d){var n="focus"===(null==(e=o)?void 0:e.type);o=t,l=t.currentTarget,I(),!y.state.isVisible&&ai(t)&&Li.forEach(function(e){return e(t)}),"click"===t.type&&(y.props.trigger.indexOf("mouseenter")<0||u)&&!1!==y.props.hideOnClick&&y.state.isVisible?i=!0:tt(t),"click"===t.type&&(u=!i),i&&!n&&et(t)}}function Y(t){var e=t.target,i=P().contains(e)||_.contains(e);if("mousemove"!==t.type||!i){var n=Z().concat(_).map(function(t){var e,i=null==(e=t._tippy.popperInstance)?void 0:e.state;return i?{popperRect:t.getBoundingClientRect(),popperState:i,props:h}:null}).filter(Boolean);(function(t,e){var i=e.clientX,n=e.clientY;return t.every(function(t){var e=t.popperRect,r=t.popperState,o=t.props.interactiveBorder,s=ii(r.placement),a=r.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,h="right"===s?a.left.x:0,u="left"===s?a.right.x:0,d=e.top-n+l>o,f=n-e.bottom-c>o,p=e.left-i+h>o,g=i-e.right-u>o;return d||f||p||g})})(n,t)&&(R(),et(t))}}function X(t){K(t)||y.props.trigger.indexOf("click")>=0&&u||(y.props.interactive?y.hideWithInteractivity(t):et(t))}function G(t){y.props.trigger.indexOf("focusin")<0&&t.target!==P()||y.props.interactive&&t.relatedTarget&&_.contains(t.relatedTarget)||et(t)}function K(t){return!!gi.isTouch&&M()!==t.type.indexOf("touch")>=0}function J(){Q();var e=y.props,i=e.popperOptions,n=e.placement,r=e.offset,o=e.getReferenceClientRect,s=e.moveTransition,l=E()?Ti(_).arrow:null,c=o?{getBoundingClientRect:o,contextElement:o.contextElement||P()}:t,h={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(t){var e=t.state;if(E()){var i=A().box;["placement","reference-hidden","escaped"].forEach(function(t){"placement"===t?i.setAttribute("data-placement",e.placement):e.attributes.popper["data-popper-"+t]?i.setAttribute("data-"+t,""):i.removeAttribute("data-"+t)}),e.attributes.popper={}}}},u=[{name:"offset",options:{offset:r}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},h];E()&&l&&u.push({name:"arrow",options:{element:l,padding:3}}),u.push.apply(u,(null==i?void 0:i.modifiers)||[]),y.popperInstance=He(c,_,Object.assign({},i,{placement:n,onFirstUpdate:a,modifiers:u}))}function Q(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Z(){return ni(_.querySelectorAll("[data-tippy-root]"))}function tt(t){y.clearDelayTimeouts(),t&&D("onTrigger",[y,t]),B();var e=C(!0),n=S(),r=n[0],o=n[1];gi.isTouch&&"hold"===r&&o&&(e=o),e?i=setTimeout(function(){y.show()},e):y.show()}function et(t){if(y.clearDelayTimeouts(),D("onUntrigger",[y,t]),y.state.isVisible){if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(t.type)>=0&&u)){var e=C(!1);e?n=setTimeout(function(){y.state.isVisible&&y.hide()},e):r=requestAnimationFrame(function(){y.hide()})}}else W()}}function Ii(t,e){void 0===e&&(e={});var i=wi.plugins.concat(e.plugins||[]);document.addEventListener("touchstart",bi,Xe),window.addEventListener("blur",yi);var n=Object.assign({},e,{plugins:i}),r=ci(t).reduce(function(t,e){var i=e&&ji(e,n);return i&&t.push(i),t},[]);return si(t)?r[0]:r}Ii.defaultProps=wi,Ii.setDefaultProps=function(t){Object.keys(t).forEach(function(e){wi[e]=t[e]})},Ii.currentInput=gi;Object.assign({},Se,{effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow)}});Ii.setDefaultProps({render:Ai});var Ri=Ii,Fi=i(951),zi=i.n(Fi);const Ni={controlled:null,bind(t){this.controlled=t,this.controlled.forEach(t=>{this._main(t)}),this._init()},_init(){this.controlled.forEach(t=>{this._checkUp(t)})},_main(t){const e=JSON.parse(t.dataset.main);t.dataset.size&&(t.filesize=parseInt(t.dataset.size,10)),t.mains=e.map(e=>{const i=document.getElementById(e),n=document.getElementById(e+"_size_wrapper");return n&&(i.filesize=0,i.sizespan=n),this._addChild(i,t),i}),this._bindEvents(t),t.mains.forEach(t=>{this._bindEvents(t)})},_bindEvents(t){t.eventBound||(t.addEventListener("click",e=>{const i=e.target;i.elements&&(this._checkDown(i),this._evaluateSize(i)),i.mains&&this._checkUp(t)}),t.eventBound=!0)},_addChild(t,e){const i=t.elements?t.elements:[];-1===i.indexOf(e)&&(i.push(e),t.elements=i)},_removeChild(t,e){const i=t.elements.indexOf(e);-1<i&&t.elements.splice(i,1)},_checkDown(t){t.elements&&(t.classList.remove("partial"),t.elements.forEach(e=>{e.checked!==t.checked&&(e.checked=t.checked,e.disabled&&(e.checked=!1),e.dispatchEvent(new Event("change")))}),t.elements.forEach(e=>{this._checkDown(e),e.elements||this._checkUp(e,t)}))},_checkUp(t,e){t.mains&&[...t.mains].forEach(t=>{t!==e&&this._evaluateCheckStatus(t),this._checkUp(t),this._evaluateSize(t)})},_evaluateCheckStatus(t){let e=0,i=t.classList.contains("partial");i&&(t.classList.remove("partial"),i=!1),t.elements.forEach(n=>{null!==n.parentNode?(e+=n.checked,n.classList.contains("partial")&&(i=!0)):this._removeChild(t,n)});let n="some";e===t.elements.length?n="on":0===e?n="off":i=!0,i&&t.classList.add("partial");const r="off"!==n;t.checked===r&&t.value===n||(t.value=n,t.checked=r,t.dispatchEvent(new Event("change")))},_evaluateSize(t){if(t.sizespan&&t.elements){t.filesize=0,t.elements.forEach(e=>{e.checked&&(t.filesize+=e.filesize)});let e=null;0<t.filesize&&(e=zi()(t.filesize,{spacer:" "}).human("jedec")),t.sizespan.innerText=e}}};var Bi=Ni,Wi=i(941),Vi=i.n(Wi);function Hi(){}const $i=function(){let t=0;return function(){return t++}}();function Ui(t){return null==t}function qi(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function Yi(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}const Xi=t=>("number"==typeof t||t instanceof Number)&&isFinite(+t);function Gi(t,e){return Xi(t)?t:e}function Ki(t,e){return void 0===t?e:t}const Ji=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Qi(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function Zi(t,e,i,n){let r,o,s;if(qi(t))if(o=t.length,n)for(r=o-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;r<o;r++)e.call(i,t[r],r);else if(Yi(t))for(s=Object.keys(t),o=s.length,r=0;r<o;r++)e.call(i,t[s[r]],s[r])}function tn(t,e){let i,n,r,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(r=t[i],o=e[i],r.datasetIndex!==o.datasetIndex||r.index!==o.index)return!1;return!0}function en(t){if(qi(t))return t.map(en);if(Yi(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let r=0;for(;r<n;++r)e[i[r]]=en(t[i[r]]);return e}return t}function nn(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function rn(t,e,i,n){if(!nn(t))return;const r=e[t],o=i[t];Yi(r)&&Yi(o)?on(r,o,n):e[t]=en(o)}function on(t,e,i){const n=qi(e)?e:[e],r=n.length;if(!Yi(t))return t;const o=(i=i||{}).merger||rn;for(let s=0;s<r;++s){if(!Yi(e=n[s]))continue;const r=Object.keys(e);for(let n=0,s=r.length;n<s;++n)o(r[n],t,e,i)}return t}function sn(t,e){return on(t,e,{merger:an})}function an(t,e,i){if(!nn(t))return;const n=e[t],r=i[t];Yi(n)&&Yi(r)?sn(n,r):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=en(r))}const ln={"":t=>t,x:t=>t.x,y:t=>t.y};function cn(t,e){const i=ln[e]||(ln[e]=function(t){const e=function(t){const e=t.split("."),i=[];let n="";for(const t of e)n+=t,n.endsWith("\\")?n=n.slice(0,-1)+".":(i.push(n),n="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function hn(t){return t.charAt(0).toUpperCase()+t.slice(1)}const un=t=>void 0!==t,dn=t=>"function"==typeof t,fn=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0};const pn=Math.PI,gn=2*pn,mn=gn+pn,bn=Number.POSITIVE_INFINITY,vn=pn/180,yn=pn/2,xn=pn/4,_n=2*pn/3,wn=Math.log10,kn=Math.sign;function On(t){const e=Math.round(t);t=Mn(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(wn(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function Sn(t){return!isNaN(parseFloat(t))&&isFinite(t)}function Mn(t,e,i){return Math.abs(t-e)<i}function En(t,e,i){let n,r,o;for(n=0,r=t.length;n<r;n++)o=t[n][i],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function Pn(t){return t*(pn/180)}function Tn(t){return t*(180/pn)}function An(t){if(!Xi(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Cn(t,e){const i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*pn&&(o+=gn),{angle:o,distance:r}}function Ln(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Dn(t,e){return(t-e+mn)%gn-pn}function jn(t){return(t%gn+gn)%gn}function In(t,e,i,n){const r=jn(t),o=jn(e),s=jn(i),a=jn(o-r),l=jn(s-r),c=jn(r-o),h=jn(r-s);return r===o||r===s||n&&o===s||a>l&&c<h}function Rn(t,e,i){return Math.max(e,Math.min(i,t))}function Fn(t,e,i,n=1e-6){return t>=Math.min(e,i)-n&&t<=Math.max(e,i)+n}function zn(t,e,i){i=i||(i=>t[i]<e);let n,r=t.length-1,o=0;for(;r-o>1;)n=o+r>>1,i(n)?o=n:r=n;return{lo:o,hi:r}}const Nn=(t,e,i,n)=>zn(t,i,n?n=>t[n][e]<=i:n=>t[n][e]<i),Bn=(t,e,i)=>zn(t,i,n=>t[n][e]>=i);const Wn=["push","pop","shift","splice","unshift"];function Vn(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(Wn.forEach(e=>{delete t[e]}),delete t._chartjs)}function Hn(t){const e=new Set;let i,n;for(i=0,n=t.length;i<n;++i)e.add(t[i]);return e.size===n?t:Array.from(e)}const $n="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function Un(t,e,i){const n=i||(t=>Array.prototype.slice.call(t));let r=!1,o=[];return function(...i){o=n(i),r||(r=!0,$n.call(window,()=>{r=!1,t.apply(e,o)}))}}const qn=t=>"start"===t?"left":"end"===t?"right":"center",Yn=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function Xn(t,e,i){const n=e.length;let r=0,o=n;if(t._sorted){const{iScale:s,_parsed:a}=t,l=s.axis,{min:c,max:h,minDefined:u,maxDefined:d}=s.getUserBounds();u&&(r=Rn(Math.min(Nn(a,s.axis,c).lo,i?n:Nn(e,l,s.getPixelForValue(c)).lo),0,n-1)),o=d?Rn(Math.max(Nn(a,s.axis,h,!0).hi+1,i?0:Nn(e,l,s.getPixelForValue(h),!0).hi+1),r,n)-r:n-r}return{start:r,count:o}}function Gn(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,r={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=r,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,r),o}const Kn=t=>0===t||1===t,Jn=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*gn/i),Qn=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*gn/i)+1,Zn={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*yn),easeOutSine:t=>Math.sin(t*yn),easeInOutSine:t=>-.5*(Math.cos(pn*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>Kn(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Kn(t)?t:Jn(t,.075,.3),easeOutElastic:t=>Kn(t)?t:Qn(t,.075,.3),easeInOutElastic(t){const e=.1125;return Kn(t)?t:t<.5?.5*Jn(2*t,e,.45):.5+.5*Qn(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Zn.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*Zn.easeInBounce(2*t):.5*Zn.easeOutBounce(2*t-1)+.5};function tr(t){return t+.5|0}const er=(t,e,i)=>Math.max(Math.min(t,i),e);function ir(t){return er(tr(2.55*t),0,255)}function nr(t){return er(tr(255*t),0,255)}function rr(t){return er(tr(t/2.55)/100,0,1)}function or(t){return er(tr(100*t),0,100)}const sr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},ar=[..."0123456789ABCDEF"],lr=t=>ar[15&t],cr=t=>ar[(240&t)>>4]+ar[15&t],hr=t=>(240&t)>>4==(15&t);function ur(t){var e=(t=>hr(t.r)&&hr(t.g)&&hr(t.b)&&hr(t.a))(t)?lr:cr;return t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0}const dr=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function fr(t,e,i){const n=e*Math.min(i,1-i),r=(e,r=(e+t/30)%12)=>i-n*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function pr(t,e,i){const n=(n,r=(n+t/60)%6)=>i-i*e*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function gr(t,e,i){const n=fr(t,1,.5);let r;for(e+i>1&&(r=1/(e+i),e*=r,i*=r),r=0;r<3;r++)n[r]*=1-e-i,n[r]+=e;return n}function mr(t){const e=t.r/255,i=t.g/255,n=t.b/255,r=Math.max(e,i,n),o=Math.min(e,i,n),s=(r+o)/2;let a,l,c;return r!==o&&(c=r-o,l=s>.5?c/(2-r-o):c/(r+o),a=function(t,e,i,n,r){return t===r?(e-i)/n+(e<i?6:0):e===r?(i-t)/n+2:(t-e)/n+4}(e,i,n,c,r),a=60*a+.5),[0|a,l||0,s]}function br(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(nr)}function vr(t,e,i){return br(fr,t,e,i)}function yr(t){return(t%360+360)%360}function xr(t){const e=dr.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?ir(+e[5]):nr(+e[5]));const r=yr(+e[2]),o=+e[3]/100,s=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return br(gr,t,e,i)}(r,o,s):"hsv"===e[1]?function(t,e,i){return br(pr,t,e,i)}(r,o,s):vr(r,o,s),{r:i[0],g:i[1],b:i[2],a:n}}const _r={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},wr={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let kr;function Or(t){kr||(kr=function(){const t={},e=Object.keys(wr),i=Object.keys(_r);let n,r,o,s,a;for(n=0;n<e.length;n++){for(s=a=e[n],r=0;r<i.length;r++)o=i[r],a=a.replace(o,_r[o]);o=parseInt(wr[s],16),t[a]=[o>>16&255,o>>8&255,255&o]}return t}(),kr.transparent=[0,0,0,0]);const e=kr[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}const Sr=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;const Mr=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,Er=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function Pr(t,e,i){if(t){let n=mr(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=vr(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function Tr(t,e){return t?Object.assign(e||{},t):t}function Ar(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=nr(t[3]))):(e=Tr(t,{r:0,g:0,b:0,a:1})).a=nr(e.a),e}function Cr(t){return"r"===t.charAt(0)?function(t){const e=Sr.exec(t);let i,n,r,o=255;if(e){if(e[7]!==i){const t=+e[7];o=e[8]?ir(t):er(255*t,0,255)}return i=+e[1],n=+e[3],r=+e[5],i=255&(e[2]?ir(i):er(i,0,255)),n=255&(e[4]?ir(n):er(n,0,255)),r=255&(e[6]?ir(r):er(r,0,255)),{r:i,g:n,b:r,a:o}}}(t):xr(t)}class Lr{constructor(t){if(t instanceof Lr)return t;const e=typeof t;let i;var n,r,o;"object"===e?i=Ar(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?r={r:255&17*sr[n[1]],g:255&17*sr[n[2]],b:255&17*sr[n[3]],a:5===o?17*sr[n[4]]:255}:7!==o&&9!==o||(r={r:sr[n[1]]<<4|sr[n[2]],g:sr[n[3]]<<4|sr[n[4]],b:sr[n[5]]<<4|sr[n[6]],a:9===o?sr[n[7]]<<4|sr[n[8]]:255})),i=r||Or(t)||Cr(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Tr(this._rgb);return t&&(t.a=rr(t.a)),t}set rgb(t){this._rgb=Ar(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${rr(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?ur(this._rgb):void 0}hslString(){return this._valid?function(t){if(!t)return;const e=mr(t),i=e[0],n=or(e[1]),r=or(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${r}%, ${rr(t.a)})`:`hsl(${i}, ${n}%, ${r}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let r;const o=e===r?.5:e,s=2*o-1,a=i.a-n.a,l=((s*a===-1?s:(s+a)/(1+s*a))+1)/2;r=1-l,i.r=255&l*i.r+r*n.r+.5,i.g=255&l*i.g+r*n.g+.5,i.b=255&l*i.b+r*n.b+.5,i.a=o*i.a+(1-o)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const n=Er(rr(t.r)),r=Er(rr(t.g)),o=Er(rr(t.b));return{r:nr(Mr(n+i*(Er(rr(e.r))-n))),g:nr(Mr(r+i*(Er(rr(e.g))-r))),b:nr(Mr(o+i*(Er(rr(e.b))-o))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new Lr(this.rgb)}alpha(t){return this._rgb.a=nr(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=tr(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Pr(this._rgb,2,t),this}darken(t){return Pr(this._rgb,2,-t),this}saturate(t){return Pr(this._rgb,1,t),this}desaturate(t){return Pr(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=mr(t);i[0]=yr(i[0]+e),i=vr(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function Dr(t){return new Lr(t)}function jr(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Ir(t){return jr(t)?t:Dr(t)}function Rr(t){return jr(t)?t:Dr(t).saturate(.5).darken(.1).hexString()}const Fr=Object.create(null),zr=Object.create(null);function Nr(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;e<n;++e){const n=i[e];t=t[n]||(t[n]=Object.create(null))}return t}function Br(t,e,i){return"string"==typeof e?on(Nr(t,e),i):on(Nr(t,""),e)}var Wr=new class{constructor(t){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Rr(e.backgroundColor),this.hoverBorderColor=(t,e)=>Rr(e.borderColor),this.hoverColor=(t,e)=>Rr(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t)}set(t,e){return Br(this,t,e)}get(t){return Nr(this,t)}describe(t,e){return Br(zr,t,e)}override(t,e){return Br(Fr,t,e)}route(t,e,i,n){const r=Nr(this,t),o=Nr(this,i),s="_"+e;Object.defineProperties(r,{[s]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[s],e=o[n];return Yi(t)?Object.assign({},e,t):Ki(t,e)},set(t){this[s]=t}}})}}({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}});function Vr(t,e,i,n,r){let o=e[r];return o||(o=e[r]=t.measureText(r).width,i.push(r)),o>n&&(n=o),n}function Hr(t,e,i,n){let r=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(r=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let s=0;const a=i.length;let l,c,h,u,d;for(l=0;l<a;l++)if(u=i[l],null!=u&&!0!==qi(u))s=Vr(t,r,o,s,u);else if(qi(u))for(c=0,h=u.length;c<h;c++)d=u[c],null==d||qi(d)||(s=Vr(t,r,o,s,d));t.restore();const f=o.length/2;if(f>i.length){for(l=0;l<f;l++)delete r[o[l]];o.splice(0,f)}return s}function $r(t,e,i){const n=t.currentDevicePixelRatio,r=0!==i?Math.max(i/2,.5):0;return Math.round((e-r)*n)/n+r}function Ur(t,e){(e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore()}function qr(t,e,i,n){Yr(t,e,i,n,null)}function Yr(t,e,i,n,r){let o,s,a,l,c,h;const u=e.pointStyle,d=e.rotation,f=e.radius;let p=(d||0)*vn;if(u&&"object"==typeof u&&(o=u.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,n),t.rotate(p),t.drawImage(u,-u.width/2,-u.height/2,u.width,u.height),void t.restore();if(!(isNaN(f)||f<=0)){switch(t.beginPath(),u){default:r?t.ellipse(i,n,r/2,f,0,0,gn):t.arc(i,n,f,0,gn),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(p)*f,n-Math.cos(p)*f),p+=_n,t.lineTo(i+Math.sin(p)*f,n-Math.cos(p)*f),p+=_n,t.lineTo(i+Math.sin(p)*f,n-Math.cos(p)*f),t.closePath();break;case"rectRounded":c=.516*f,l=f-c,s=Math.cos(p+xn)*l,a=Math.sin(p+xn)*l,t.arc(i-s,n-a,c,p-pn,p-yn),t.arc(i+a,n-s,c,p-yn,p),t.arc(i+s,n+a,c,p,p+yn),t.arc(i-a,n+s,c,p+yn,p+pn),t.closePath();break;case"rect":if(!d){l=Math.SQRT1_2*f,h=r?r/2:l,t.rect(i-h,n-l,2*h,2*l);break}p+=xn;case"rectRot":s=Math.cos(p)*f,a=Math.sin(p)*f,t.moveTo(i-s,n-a),t.lineTo(i+a,n-s),t.lineTo(i+s,n+a),t.lineTo(i-a,n+s),t.closePath();break;case"crossRot":p+=xn;case"cross":s=Math.cos(p)*f,a=Math.sin(p)*f,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"star":s=Math.cos(p)*f,a=Math.sin(p)*f,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s),p+=xn,s=Math.cos(p)*f,a=Math.sin(p)*f,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a),t.moveTo(i+a,n-s),t.lineTo(i-a,n+s);break;case"line":s=r?r/2:Math.cos(p)*f,a=Math.sin(p)*f,t.moveTo(i-s,n-a),t.lineTo(i+s,n+a);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(p)*f,n+Math.sin(p)*f)}t.fill(),e.borderWidth>0&&t.stroke()}}function Xr(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function Gr(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Kr(t){t.restore()}function Jr(t,e,i,n,r){if(!e)return t.lineTo(i.x,i.y);if("middle"===r){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===r!=!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function Qr(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function Zr(t,e,i,n,r,o={}){const s=qi(e)?e:[e],a=o.strokeWidth>0&&""!==o.strokeColor;let l,c;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]);Ui(e.rotation)||t.rotate(e.rotation);e.color&&(t.fillStyle=e.color);e.textAlign&&(t.textAlign=e.textAlign);e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;l<s.length;++l)c=s[l],a&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),Ui(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(c,i,n,o.maxWidth)),t.fillText(c,i,n,o.maxWidth),to(t,i,n,c,o),n+=r.lineHeight;t.restore()}function to(t,e,i,n,r){if(r.strikethrough||r.underline){const o=t.measureText(n),s=e-o.actualBoundingBoxLeft,a=e+o.actualBoundingBoxRight,l=i-o.actualBoundingBoxAscent,c=i+o.actualBoundingBoxDescent,h=r.strikethrough?(l+c)/2:c;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=r.decorationWidth||2,t.moveTo(s,h),t.lineTo(a,h),t.stroke()}}function eo(t,e){const{x:i,y:n,w:r,h:o,radius:s}=e;t.arc(i+s.topLeft,n+s.topLeft,s.topLeft,-yn,pn,!0),t.lineTo(i,n+o-s.bottomLeft),t.arc(i+s.bottomLeft,n+o-s.bottomLeft,s.bottomLeft,pn,yn,!0),t.lineTo(i+r-s.bottomRight,n+o),t.arc(i+r-s.bottomRight,n+o-s.bottomRight,s.bottomRight,yn,0,!0),t.lineTo(i+r,n+s.topRight),t.arc(i+r-s.topRight,n+s.topRight,s.topRight,0,-yn,!0),t.lineTo(i+s.topLeft,n)}const io=new RegExp(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/),no=new RegExp(/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/);function ro(t,e){const i=(""+t).match(io);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}const oo=t=>+t||0;function so(t,e){const i={},n=Yi(e),r=n?Object.keys(e):e,o=Yi(t)?n?i=>Ki(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of r)i[t]=oo(o(t));return i}function ao(t){return so(t,{top:"y",right:"x",bottom:"y",left:"x"})}function lo(t){return so(t,["topLeft","topRight","bottomLeft","bottomRight"])}function co(t){const e=ao(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function ho(t,e){t=t||{},e=e||Wr.font;let i=Ki(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=Ki(t.style,e.style);n&&!(""+n).match(no)&&(console.warn('Invalid font style specified: "'+n+'"'),n="");const r={family:Ki(t.family,e.family),lineHeight:ro(Ki(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:Ki(t.weight,e.weight),string:""};return r.string=function(t){return!t||Ui(t.size)||Ui(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function uo(t,e,i,n){let r,o,s,a=!0;for(r=0,o=t.length;r<o;++r)if(s=t[r],void 0!==s&&(void 0!==e&&"function"==typeof s&&(s=s(e),a=!1),void 0!==i&&qi(s)&&(s=s[i%s.length],a=!1),void 0!==s))return n&&!a&&(n.cacheable=!1),s}function fo(t,e){return Object.assign(Object.create(t),e)}function po(t,e=[""],i=t,n,r=()=>t[0]){un(n)||(n=So("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:i,_fallback:n,_getTarget:r,override:r=>po([r,...t],e,i,n)};return new Proxy(o,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>yo(i,n,()=>function(t,e,i,n){let r;for(const o of e)if(r=So(bo(o,t),i),un(r))return vo(t,r)?ko(i,n,t,r):r}(n,e,t,i)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>Mo(t).includes(e),ownKeys:t=>Mo(t),set(t,e,i){const n=t._storage||(t._storage=r());return t[e]=n[e]=i,delete t._keys,!0}})}function go(t,e,i,n){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:mo(t,n),setContext:e=>go(t,e,i,n),override:r=>go(t.override(r),e,i,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>yo(t,e,()=>function(t,e,i){const{_proxy:n,_context:r,_subProxy:o,_descriptors:s}=t;let a=n[e];dn(a)&&s.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t),e=e(o,s||n),a.delete(t),vo(t,e)&&(e=ko(r._scopes,r,t,e));return e}(e,a,t,i));qi(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:r,_context:o,_subProxy:s,_descriptors:a}=i;if(un(o.index)&&n(t))e=e[o.index%e.length];else if(Yi(e[0])){const i=e,n=r._scopes.filter(t=>t!==i);e=[];for(const l of i){const i=ko(n,r,t,l);e.push(go(i,o,s&&s[t],a))}}return e}(e,a,t,s.isIndexable));vo(e,a)&&(a=go(a,r,o&&o[e],s));return a}(t,e,i)),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function mo(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:i,indexable:n,isScriptable:dn(i)?i:()=>i,isIndexable:dn(n)?n:()=>n}}const bo=(t,e)=>t?t+hn(e):e,vo=(t,e)=>Yi(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function yo(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e))return t[e];const n=i();return t[e]=n,n}function xo(t,e,i){return dn(t)?t(e,i):t}const _o=(t,e)=>!0===t?e:"string"==typeof t?cn(e,t):void 0;function wo(t,e,i,n,r){for(const o of e){const e=_o(i,o);if(e){t.add(e);const o=xo(e._fallback,i,r);if(un(o)&&o!==i&&o!==n)return o}else if(!1===e&&un(n)&&i!==n)return null}return!1}function ko(t,e,i,n){const r=e._rootScopes,o=xo(e._fallback,i,n),s=[...t,...r],a=new Set;a.add(n);let l=Oo(a,s,i,o||i,n);return null!==l&&((!un(o)||o===i||(l=Oo(a,s,o,l,n),null!==l))&&po(Array.from(a),[""],r,o,()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const r=n[e];if(qi(r)&&Yi(i))return i;return r}(e,i,n)))}function Oo(t,e,i,n,r){for(;i;)i=wo(t,e,i,n,r);return i}function So(t,e){for(const i of e){if(!i)continue;const e=i[t];if(un(e))return e}}function Mo(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}function Eo(t,e,i,n){const{iScale:r}=t,{key:o="r"}=this._parsing,s=new Array(n);let a,l,c,h;for(a=0,l=n;a<l;++a)c=a+i,h=e[c],s[a]={r:r.parse(cn(h,o),c)};return s}const Po=Number.EPSILON||1e-14,To=(t,e)=>e<t.length&&!t[e].skip&&t[e],Ao=t=>"x"===t?"y":"x";function Co(t,e,i,n){const r=t.skip?e:t,o=e,s=i.skip?e:i,a=Ln(o,r),l=Ln(s,o);let c=a/(a+l),h=l/(a+l);c=isNaN(c)?0:c,h=isNaN(h)?0:h;const u=n*c,d=n*h;return{previous:{x:o.x-u*(s.x-r.x),y:o.y-u*(s.y-r.y)},next:{x:o.x+d*(s.x-r.x),y:o.y+d*(s.y-r.y)}}}function Lo(t,e="x"){const i=Ao(e),n=t.length,r=Array(n).fill(0),o=Array(n);let s,a,l,c=To(t,0);for(s=0;s<n;++s)if(a=l,l=c,c=To(t,s+1),l){if(c){const t=c[e]-l[e];r[s]=0!==t?(c[i]-l[i])/t:0}o[s]=a?c?kn(r[s-1])!==kn(r[s])?0:(r[s-1]+r[s])/2:r[s-1]:r[s]}!function(t,e,i){const n=t.length;let r,o,s,a,l,c=To(t,0);for(let h=0;h<n-1;++h)l=c,c=To(t,h+1),l&&c&&(Mn(e[h],0,Po)?i[h]=i[h+1]=0:(r=i[h]/e[h],o=i[h+1]/e[h],a=Math.pow(r,2)+Math.pow(o,2),a<=9||(s=3/Math.sqrt(a),i[h]=r*s*e[h],i[h+1]=o*s*e[h])))}(t,r,o),function(t,e,i="x"){const n=Ao(i),r=t.length;let o,s,a,l=To(t,0);for(let c=0;c<r;++c){if(s=a,a=l,l=To(t,c+1),!a)continue;const r=a[i],h=a[n];s&&(o=(r-s[i])/3,a[`cp1${i}`]=r-o,a[`cp1${n}`]=h-o*e[c]),l&&(o=(l[i]-r)/3,a[`cp2${i}`]=r+o,a[`cp2${n}`]=h+o*e[c])}}(t,o,e)}function Do(t,e,i){return Math.max(Math.min(t,i),e)}function jo(t,e,i,n,r){let o,s,a,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)Lo(t,r);else{let i=n?t[t.length-1]:t[0];for(o=0,s=t.length;o<s;++o)a=t[o],l=Co(i,a,t[Math.min(o+1,s-(n?0:1))%s],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,i=a}e.capBezierPoints&&function(t,e){let i,n,r,o,s,a=Xr(t[0],e);for(i=0,n=t.length;i<n;++i)s=o,o=a,a=i<n-1&&Xr(t[i+1],e),o&&(r=t[i],s&&(r.cp1x=Do(r.cp1x,e.left,e.right),r.cp1y=Do(r.cp1y,e.top,e.bottom)),a&&(r.cp2x=Do(r.cp2x,e.left,e.right),r.cp2y=Do(r.cp2y,e.top,e.bottom)))}(t,i)}function Io(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Ro(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function Fo(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const zo=t=>window.getComputedStyle(t,null);const No=["top","right","bottom","left"];function Bo(t,e,i){const n={};i=i?"-"+i:"";for(let r=0;r<4;r++){const o=No[r];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function Wo(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:n}=e,r=zo(i),o="border-box"===r.boxSizing,s=Bo(r,"padding"),a=Bo(r,"border","width"),{x:l,y:c,box:h}=function(t,e){const i=t.touches,n=i&&i.length?i[0]:t,{offsetX:r,offsetY:o}=n;let s,a,l=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(r,o,t.target))s=r,a=o;else{const t=e.getBoundingClientRect();s=n.clientX-t.left,a=n.clientY-t.top,l=!0}return{x:s,y:a,box:l}}(t,i),u=s.left+(h&&a.left),d=s.top+(h&&a.top);let{width:f,height:p}=e;return o&&(f-=s.width+a.width,p-=s.height+a.height),{x:Math.round((l-u)/f*i.width/n),y:Math.round((c-d)/p*i.height/n)}}const Vo=t=>Math.round(10*t)/10;function Ho(t,e,i,n){const r=zo(t),o=Bo(r,"margin"),s=Fo(r.maxWidth,t,"clientWidth")||bn,a=Fo(r.maxHeight,t,"clientHeight")||bn,l=function(t,e,i){let n,r;if(void 0===e||void 0===i){const o=Ro(t);if(o){const t=o.getBoundingClientRect(),s=zo(o),a=Bo(s,"border","width"),l=Bo(s,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=Fo(s.maxWidth,o,"clientWidth"),r=Fo(s.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||bn,maxHeight:r||bn}}(t,e,i);let{width:c,height:h}=l;if("content-box"===r.boxSizing){const t=Bo(r,"border","width"),e=Bo(r,"padding");c-=e.width+t.width,h-=e.height+t.height}return c=Math.max(0,c-o.width),h=Math.max(0,n?Math.floor(c/n):h-o.height),c=Vo(Math.min(c,s,l.maxWidth)),h=Vo(Math.min(h,a,l.maxHeight)),c&&!h&&(h=Vo(c/2)),{width:c,height:h}}function $o(t,e,i){const n=e||1,r=Math.floor(t.height*n),o=Math.floor(t.width*n);t.height=r/n,t.width=o/n;const s=t.canvas;return s.style&&(i||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||s.height!==r||s.width!==o)&&(t.currentDevicePixelRatio=n,s.height=r,s.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const Uo=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t}();function qo(t,e){const i=function(t,e){return zo(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Yo(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Xo(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function Go(t,e,i,n){const r={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},s=Yo(t,r,i),a=Yo(r,o,i),l=Yo(o,e,i),c=Yo(s,a,i),h=Yo(a,l,i);return Yo(c,h,i)}const Ko=new Map;function Jo(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=Ko.get(i);return n||(n=new Intl.NumberFormat(t,e),Ko.set(i,n)),n}(e,i).format(t)}function Qo(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function Zo(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function ts(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function es(t){return"angle"===t?{between:In,compare:Dn,normalize:jn}:{between:Fn,compare:(t,e)=>t-e,normalize:t=>t}}function is({start:t,end:e,count:i,loop:n,style:r}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:r}}function ns(t,e,i){if(!i)return[t];const{property:n,start:r,end:o}=i,s=e.length,{compare:a,between:l,normalize:c}=es(n),{start:h,end:u,loop:d,style:f}=function(t,e,i){const{property:n,start:r,end:o}=i,{between:s,normalize:a}=es(n),l=e.length;let c,h,{start:u,end:d,loop:f}=t;if(f){for(u+=l,d+=l,c=0,h=l;c<h&&s(a(e[u%l][n]),r,o);++c)u--,d--;u%=l,d%=l}return d<u&&(d+=l),{start:u,end:d,loop:f,style:t.style}}(t,e,i),p=[];let g,m,b,v=!1,y=null;const x=()=>v||l(r,b,g)&&0!==a(r,b),_=()=>!v||0===a(o,g)||l(o,b,g);for(let t=h,i=h;t<=u;++t)m=e[t%s],m.skip||(g=c(m[n]),g!==b&&(v=l(g,r,o),null===y&&x()&&(y=0===a(g,r)?t:i),null!==y&&_()&&(p.push(is({start:y,end:t,loop:d,count:s,style:f})),y=null),i=t,b=g));return null!==y&&p.push(is({start:y,end:u,loop:d,count:s,style:f})),p}function rs(t,e){const i=[],n=t.segments;for(let r=0;r<n.length;r++){const o=ns(n[r],t.points,e);o.length&&i.push(...o)}return i}function os(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const r=t._chart.getContext(),o=ss(t.options),{_datasetIndex:s,options:{spanGaps:a}}=t,l=i.length,c=[];let h=o,u=e[0].start,d=u;function f(t,e,n,r){const o=a?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=o;for(;i[e%l].skip;)e+=o;t%l!==e%l&&(c.push({start:t%l,end:e%l,loop:n,style:r}),h=r,u=e%l)}}for(const t of e){u=a?u:t.start;let e,o=i[u%l];for(d=u+1;d<=t.end;d++){const a=i[d%l];e=ss(n.setContext(fo(r,{type:"segment",p0:o,p1:a,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:s}))),as(e,h)&&f(u,d-1,t.loop,h),o=a,h=e}u<d-1&&f(u,d-1,t.loop,h)}return c}(t,e,i,n):e}function ss(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function as(t,e){return e&&JSON.stringify(t)!==JSON.stringify(e)}var ls=new class{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const r=e.listeners[n],o=e.duration;r.forEach(n=>n({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=$n.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let o,s=r.length-1,a=!1;for(;s>=0;--s)o=r[s],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),a=!0):(r[s]=r[r.length-1],r.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),r.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=r.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}};const cs="transparent",hs={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Ir(t||cs),r=n.valid&&Ir(e||cs);return r&&r.valid?r.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class us{constructor(t,e,i,n){const r=e[i];n=uo([t.to,n,r,t.from]);const o=uo([t.from,r,n]);this._active=!0,this._fn=t.fn||hs[t.type||typeof o],this._easing=Zn[t.easing]||Zn.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,o=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=uo([t.to,e,n,t.from]),this._from=uo([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,r=this._from,o=this._loop,s=this._to;let a;if(this._active=r!==s&&(o||e<i),!this._active)return this._target[n]=s,void this._notify(!0);e<0?this._target[n]=r:(a=e/i%2,a=o&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(r,s,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}Wr.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0});const ds=Object.keys(Wr.animation);Wr.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),Wr.set("animations",{colors:{type:"color",properties:["color","borderColor","backgroundColor"]},numbers:{type:"number",properties:["x","y","borderWidth","radius","tension"]}}),Wr.describe("animations",{_fallback:"animation"}),Wr.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}});class fs{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!Yi(t))return;const e=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const n=t[i];if(!Yi(n))return;const r={};for(const t of ds)r[t]=n[t];(qi(n.properties)&&n.properties||[i]).forEach(t=>{t!==i&&e.has(t)||e.set(t,r)})})}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(!i)return void(t.options=e);i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}}));return i}(t,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e<n.length;e++){const r=t[n[e]];r&&r.active()&&i.push(r.wait())}return Promise.all(i)}(t.options.$animations,i).then(()=>{t.options=i},()=>{}),r}_createAnimations(t,e){const i=this._properties,n=[],r=t.$animations||(t.$animations={}),o=Object.keys(e),s=Date.now();let a;for(a=o.length-1;a>=0;--a){const l=o[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const c=e[l];let h=r[l];const u=i.get(l);if(h){if(u&&h.active()){h.update(u,c,s);continue}h.cancel()}u&&u.duration?(r[l]=h=new us(u,t,l,c),n.push(h)):t[l]=c}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(ls.add(this._chart,i),!0):void 0}}function ps(t,e){const i=t&&t.options||{},n=i.reverse,r=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:r,end:n?r:o}}function gs(t,e){const i=[],n=t._getSortedDatasetMetas(e);let r,o;for(r=0,o=n.length;r<o;++r)i.push(n[r].index);return i}function ms(t,e,i,n={}){const r=t.keys,o="single"===n.mode;let s,a,l,c;if(null!==e){for(s=0,a=r.length;s<a;++s){if(l=+r[s],l===i){if(n.all)continue;break}c=t.values[l],Xi(c)&&(o||0===e||kn(e)===kn(c))&&(e+=c)}return e}}function bs(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function vs(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function ys(t,e,i,n){for(const r of e.getMatchingVisibleMetas(n).reverse()){const e=t[r.index];if(i&&e>0||!i&&e<0)return r.index}return null}function xs(t,e){const{chart:i,_cachedMeta:n}=t,r=i._stacks||(i._stacks={}),{iScale:o,vScale:s,index:a}=n,l=o.axis,c=s.axis,h=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,s,n),u=e.length;let d;for(let t=0;t<u;++t){const i=e[t],{[l]:o,[c]:u}=i;d=(i._stacks||(i._stacks={}))[c]=vs(r,h,o),d[a]=u,d._top=ys(d,s,!0,n.type),d._bottom=ys(d,s,!1,n.type)}}function _s(t,e){const i=t.scales;return Object.keys(i).filter(t=>i[t].axis===e).shift()}function ws(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i]}}}const ks=t=>"reset"===t||"none"===t,Os=(t,e)=>e?t:Object.assign({},t);class Ss{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=bs(t.vScale,t),this.addElements()}updateIndex(t){this.index!==t&&ws(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,r=e.xAxisID=Ki(i.xAxisID,_s(t,"x")),o=e.yAxisID=Ki(i.yAxisID,_s(t,"y")),s=e.rAxisID=Ki(i.rAxisID,_s(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,r,o,s),c=e.vAxisID=n(a,o,r,s);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(s),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Vn(this._data,this),t._stacked&&ws(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(Yi(e))this._data=function(t){const e=Object.keys(t),i=new Array(e.length);let n,r,o;for(n=0,r=e.length;n<r;++n)o=e[n],i[n]={x:o,y:t[o]};return i}(e);else if(i!==e){if(i){Vn(i,this);const t=this._cachedMeta;ws(t),t._parsed=[]}e&&Object.isExtensible(e)&&(r=this,(n=e)._chartjs?n._chartjs.listeners.push(r):(Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[r]}}),Wn.forEach(t=>{const e="_onData"+hn(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const r=i.apply(this,t);return n._chartjs.listeners.forEach(i=>{"function"==typeof i[e]&&i[e](...t)}),r}})}))),this._syncList=[],this._data=e}var n,r}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=e._stacked;e._stacked=bs(e.vScale,e),e.stack!==i.stack&&(n=!0,ws(e),e.stack=i.stack),this._resyncElements(t),(n||r!==e._stacked)&&xs(this,e._parsed)}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:o}=i,s=r.axis;let a,l,c,h=0===t&&e===n.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,c=n;else{c=qi(n[t])?this.parseArrayData(i,n,t,e):Yi(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const r=()=>null===l[s]||u&&l[s]<u[s];for(a=0;a<e;++a)i._parsed[a+t]=l=c[a],h&&(r()&&(h=!1),u=l);i._sorted=h}o&&xs(this,c)}parsePrimitiveData(t,e,i,n){const{iScale:r,vScale:o}=t,s=r.axis,a=o.axis,l=r.getLabels(),c=r===o,h=new Array(n);let u,d,f;for(u=0,d=n;u<d;++u)f=u+i,h[u]={[s]:c||r.parse(l[f],f),[a]:o.parse(e[f],f)};return h}parseArrayData(t,e,i,n){const{xScale:r,yScale:o}=t,s=new Array(n);let a,l,c,h;for(a=0,l=n;a<l;++a)c=a+i,h=e[c],s[a]={x:r.parse(h[0],c),y:o.parse(h[1],c)};return s}parseObjectData(t,e,i,n){const{xScale:r,yScale:o}=t,{xAxisKey:s="x",yAxisKey:a="y"}=this._parsing,l=new Array(n);let c,h,u,d;for(c=0,h=n;c<h;++c)u=c+i,d=e[u],l[c]={x:r.parse(cn(d,s),u),y:o.parse(cn(d,a),u)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,r=this._cachedMeta,o=e[t.axis];return ms({keys:gs(n,!0),values:e._stacks[t.axis]},o,r.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const r=i[e.axis];let o=null===r?NaN:r;const s=n&&i._stacks[e.axis];n&&s&&(n.values=s,o=ms(n,r,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const i=this._cachedMeta,n=i._parsed,r=i._sorted&&t===i.iScale,o=n.length,s=this._getOtherScale(t),a=((t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:gs(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:h}=function(t){const{min:e,max:i,minDefined:n,maxDefined:r}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}(s);let u,d;function f(){d=n[u];const e=d[s.axis];return!Xi(d[t.axis])||c>e||h<e}for(u=0;u<o&&(f()||(this.updateRangeFromParsed(l,t,d,a),!r));++u);if(r)for(u=o-1;u>=0;--u)if(!f()){this.updateRangeFromParsed(l,t,d,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,r,o;for(n=0,r=e.length;n<r;++n)o=e[n][t.axis],Xi(o)&&i.push(o);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,r=this.getParsed(t);return{label:i?""+i.getLabelForValue(r[i.axis]):"",value:n?""+n.getLabelForValue(r[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,i,n,r;return Yi(t)?(e=t.top,i=t.right,n=t.bottom,r=t.left):e=i=n=r=t,{top:e,right:i,bottom:n,left:r,disabled:!1===t}}(Ki(this.options.clip,function(t,e,i){if(!1===i)return!1;const n=ps(t,i),r=ps(e,i);return{top:r.end,right:n.end,bottom:r.start,left:n.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,n=i.data||[],r=e.chartArea,o=[],s=this._drawStart||0,a=this._drawCount||n.length-s,l=this.options.drawActiveElementsOnTop;let c;for(i.dataset&&i.dataset.draw(t,r,s,a),c=s;c<s+a;++c){const e=n[c];e.hidden||(e.active&&l?o.push(e):e.draw(t,r))}for(c=0;c<o.length;++c)o[c].draw(t,r)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this.getDataset();let r;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];r=e.$context||(e.$context=function(t,e,i){return fo(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),r.parsed=this.getParsed(t),r.raw=n.data[t],r.index=r.dataIndex=t}else r=this.$context||(this.$context=function(t,e){return fo(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),r.dataset=n,r.index=r.datasetIndex=this.index;return r.active=!!e,r.mode=i,r}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const n="active"===e,r=this._cachedDataOpts,o=t+"-"+e,s=r[o],a=this.enableOptionSharing&&un(i);if(s)return Os(s,a);const l=this.chart.config,c=l.datasetElementScopeKeys(this._type,t),h=n?[`${t}Hover`,"hover",t,""]:[t,""],u=l.getOptionScopes(this.getDataset(),c),d=Object.keys(Wr.elements[t]),f=l.resolveNamedOptions(u,d,()=>this.getContext(i,n),h);return f.$shared&&(f.$shared=a,r[o]=Object.freeze(Os(f,a))),f}_resolveAnimations(t,e,i){const n=this.chart,r=this._cachedDataOpts,o=`animation-${e}`,s=r[o];if(s)return s;let a;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),r);a=n.createResolver(o,this.getContext(t,i,e))}const l=new fs(n,a&&a.animations);return a&&a._cacheable&&(r[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ks(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,r=this.getSharedOptions(i),o=this.includeOptions(e,r)||r!==n;return this.updateSharedOptions(r,e,i),{sharedOptions:r,includeOptions:o}}updateElement(t,e,i,n){ks(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!ks(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const r=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,r=e.length,o=Math.min(r,n);o&&this.parse(0,o),r>n?this._insertElements(n,r-n,t):r<n&&this._removeElements(r,n-r)}_insertElements(t,e,i=!0){const n=this._cachedMeta,r=n.data,o=t+e;let s;const a=t=>{for(t.length+=e,s=t.length-1;s>=o;s--)t[s]=t[s-e]};for(a(r),s=t;s<o;++s)r[s]=new this.dataElementType;this._parsing&&a(n._parsed),this.parse(t,e),i&&this.updateElements(r,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&ws(i,n)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,n]=t;this[e](i,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Ms(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let n=[];for(let e=0,r=i.length;e<r;e++)n=n.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=Hn(n.sort((t,e)=>t-e))}return t._cache.$bar}(e,t.type);let n,r,o,s,a=e._length;const l=()=>{32767!==o&&-32768!==o&&(un(s)&&(a=Math.min(a,Math.abs(o-s)||a)),s=o)};for(n=0,r=i.length;n<r;++n)o=e.getPixelForValue(i[n]),l();for(s=void 0,n=0,r=e.ticks.length;n<r;++n)o=e.getPixelForTick(n),l();return a}function Es(t,e,i,n){return qi(t)?function(t,e,i,n){const r=i.parse(t[0],n),o=i.parse(t[1],n),s=Math.min(r,o),a=Math.max(r,o);let l=s,c=a;Math.abs(s)>Math.abs(a)&&(l=a,c=s),e[i.axis]=c,e._custom={barStart:l,barEnd:c,start:r,end:o,min:s,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Ps(t,e,i,n){const r=t.iScale,o=t.vScale,s=r.getLabels(),a=r===o,l=[];let c,h,u,d;for(c=i,h=i+n;c<h;++c)d=e[c],u={},u[r.axis]=a||r.parse(s[c],c),l.push(Es(d,u,o,c));return l}function Ts(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function As(t,e,i,n){let r=e.borderSkipped;const o={};if(!r)return void(t.borderSkipped=o);if(!0===r)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:s,end:a,reverse:l,top:c,bottom:h}=function(t){let e,i,n,r,o;return t.horizontal?(e=t.base>t.x,i="left",n="right"):(e=t.base<t.y,i="bottom",n="top"),e?(r="end",o="start"):(r="start",o="end"),{start:i,end:n,reverse:e,top:r,bottom:o}}(t);"middle"===r&&i&&(t.enableBorderRadius=!0,(i._top||0)===n?r=c:(i._bottom||0)===n?r=h:(o[Cs(h,s,a,l)]=!0,r=c)),o[Cs(r,s,a,l)]=!0,t.borderSkipped=o}function Cs(t,e,i,n){var r,o,s;return n?(s=i,t=Ls(t=(r=t)===(o=e)?s:r===s?o:r,i,e)):t=Ls(t,e,i),t}function Ls(t,e,i){return"start"===t?e:"end"===t?i:t}function Ds(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?1===i?.33:0:e}Ss.defaults={},Ss.prototype.datasetElementType=null,Ss.prototype.dataElementType=null;class js extends Ss{parsePrimitiveData(t,e,i,n){return Ps(t,e,i,n)}parseArrayData(t,e,i,n){return Ps(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:r,vScale:o}=t,{xAxisKey:s="x",yAxisKey:a="y"}=this._parsing,l="x"===r.axis?s:a,c="x"===o.axis?s:a,h=[];let u,d,f,p;for(u=i,d=i+n;u<d;++u)p=e[u],f={},f[r.axis]=r.parse(cn(p,l),u),h.push(Es(cn(p,c),f,o,u));return h}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const r=i._custom;r&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,r.min),t.max=Math.max(t.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:n}=e,r=this.getParsed(t),o=r._custom,s=Ts(o)?"["+o.start+", "+o.end+"]":""+n.getLabelForValue(r[n.axis]);return{label:""+i.getLabelForValue(r[i.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,n){const r="reset"===n,{index:o,_cachedMeta:{vScale:s}}=this,a=s.getBasePixel(),l=s.isHorizontal(),c=this._getRuler(),{sharedOptions:h,includeOptions:u}=this._getSharedOptions(e,n);for(let d=e;d<e+i;d++){const e=this.getParsed(d),i=r||Ui(e[s.axis])?{base:a,head:a}:this._calculateBarValuePixels(d),f=this._calculateBarIndexPixels(d,c),p=(e._stacks||{})[s.axis],g={horizontal:l,base:i.base,enableBorderRadius:!p||Ts(e._custom)||o===p._top||o===p._bottom,x:l?i.head:f.center,y:l?f.center:i.head,height:l?f.size:Math.abs(i.size),width:l?Math.abs(i.size):f.size};u&&(g.options=h||this.resolveDataElementOptions(d,t[d].active?"active":n));const m=g.options||t[d].options;As(g,m,p,o),Ds(g,m,c.ratio),this.updateElement(t[d],d,g,n)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,n=i.getMatchingVisibleMetas(this._type).filter(t=>t.controller.options.grouped),r=i.options.stacked,o=[],s=t=>{const i=t.controller.getParsed(e),n=i&&i[t.vScale.axis];if(Ui(n)||isNaN(n))return!0};for(const i of n)if((void 0===e||!s(i))&&((!1===r||-1===o.indexOf(i.stack)||void 0===r&&void 0===i.stack)&&o.push(i.stack),i.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const n=this._getStacks(t,i),r=void 0!==e?n.indexOf(e):-1;return-1===r?n.length-1:r}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let r,o;for(r=0,o=e.data.length;r<o;++r)n.push(i.getPixelForValue(this.getParsed(r)[i.axis],r));const s=t.barThickness;return{min:s||Ms(e),pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i},options:{base:n,minBarLength:r}}=this,o=n||0,s=this.getParsed(t),a=s._custom,l=Ts(a);let c,h,u=s[e.axis],d=0,f=i?this.applyStack(e,s,i):u;f!==u&&(d=f-u,f=u),l&&(u=a.barStart,f=a.barEnd-a.barStart,0!==u&&kn(u)!==kn(a.barEnd)&&(d=0),d+=u);const p=Ui(n)||l?d:n;let g=e.getPixelForValue(p);if(c=this.chart.getDataVisibility(t)?e.getPixelForValue(d+f):g,h=c-g,Math.abs(h)<r){h=function(t,e,i){return 0!==t?kn(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(h,e,o)*r,u===o&&(g-=h/2);const t=e.getPixelForDecimal(0),i=e.getPixelForDecimal(1),n=Math.min(t,i),s=Math.max(t,i);g=Math.max(Math.min(g,s),n),c=g+h}if(g===e.getPixelForValue(o)){const t=kn(h)*e.getLineWidthForValue(o)/2;g+=t,h-=t}return{size:h,base:g,head:c,center:c+h/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,r=n.skipNull,o=Ki(n.maxBarThickness,1/0);let s,a;if(e.grouped){const i=r?this._getStackCount(t):e.stackCount,l="flex"===n.barThickness?function(t,e,i,n){const r=e.pixels,o=r[t];let s=t>0?r[t-1]:null,a=t<r.length-1?r[t+1]:null;const l=i.categoryPercentage;null===s&&(s=o-(null===a?e.end-e.start:a-o)),null===a&&(a=o+o-s);const c=o-(o-Math.min(s,a))/2*l;return{chunk:Math.abs(a-s)/2*l/n,ratio:i.barPercentage,start:c}}(t,e,n,i):function(t,e,i,n){const r=i.barThickness;let o,s;return Ui(r)?(o=e.min*i.categoryPercentage,s=i.barPercentage):(o=r*n,s=1),{chunk:o/n,ratio:s,start:e.pixels[t]-o/2}}(t,e,n,i),c=this._getStackIndex(this.index,this._cachedMeta.stack,r?t:void 0);s=l.start+l.chunk*c+l.chunk/2,a=Math.min(o,l.chunk*l.ratio)}else s=i.getPixelForValue(this.getParsed(t)[i.axis],t),a=Math.min(o,e.min*e.ratio);return{base:s-a/2,head:s+a/2,center:s,size:a}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,n=i.length;let r=0;for(;r<n;++r)null!==this.getParsed(r)[e.axis]&&i[r].draw(this._ctx)}}js.id="bar",js.defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}},js.overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};class Is extends Ss{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,n){const r=super.parsePrimitiveData(t,e,i,n);for(let t=0;t<r.length;t++)r[t]._custom=this.resolveDataElementOptions(t+i).radius;return r}parseArrayData(t,e,i,n){const r=super.parseArrayData(t,e,i,n);for(let t=0;t<r.length;t++){const n=e[i+t];r[t]._custom=Ki(n[2],this.resolveDataElementOptions(t+i).radius)}return r}parseObjectData(t,e,i,n){const r=super.parseObjectData(t,e,i,n);for(let t=0;t<r.length;t++){const n=e[i+t];r[t]._custom=Ki(n&&n.r&&+n.r,this.resolveDataElementOptions(t+i).radius)}return r}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,{xScale:i,yScale:n}=e,r=this.getParsed(t),o=i.getLabelForValue(r.x),s=n.getLabelForValue(r.y),a=r._custom;return{label:e.label,value:"("+o+", "+s+(a?", "+a:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s}=this._cachedMeta,{sharedOptions:a,includeOptions:l}=this._getSharedOptions(e,n),c=o.axis,h=s.axis;for(let u=e;u<e+i;u++){const e=t[u],i=!r&&this.getParsed(u),d={},f=d[c]=r?o.getPixelForDecimal(.5):o.getPixelForValue(i[c]),p=d[h]=r?s.getBasePixel():s.getPixelForValue(i[h]);d.skip=isNaN(f)||isNaN(p),l&&(d.options=a||this.resolveDataElementOptions(u,e.active?"active":n),r&&(d.options.radius=0)),this.updateElement(e,u,d,n)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const r=n.radius;return"active"!==e&&(n.radius=0),n.radius+=Ki(i&&i._custom,r),n}}Is.id="bubble",Is.defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}},Is.overrides={scales:{x:{type:"linear"},y:{type:"linear"}},plugins:{tooltip:{callbacks:{title:()=>""}}}};class Rs extends Ss{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let r,o,s=t=>+i[t];if(Yi(i[t])){const{key:t="value"}=this._parsing;s=e=>+cn(i[e],t)}for(r=t,o=t+e;r<o;++r)n._parsed[r]=s(r)}}_getRotation(){return Pn(this.options.rotation-90)}_getCircumference(){return Pn(this.options.circumference)}_getRotationExtents(){let t=gn,e=-gn;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)){const n=this.chart.getDatasetMeta(i).controller,r=n._getRotation(),o=n._getCircumference();t=Math.min(t,r),e=Math.max(e,r+o)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,n=this._cachedMeta,r=n.data,o=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,s=Math.max((Math.min(i.width,i.height)-o)/2,0),a=Math.min((l=this.options.cutout,c=s,"string"==typeof l&&l.endsWith("%")?parseFloat(l)/100:l/c),1);var l,c;const h=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:g,offsetY:m}=function(t,e,i){let n=1,r=1,o=0,s=0;if(e<gn){const a=t,l=a+e,c=Math.cos(a),h=Math.sin(a),u=Math.cos(l),d=Math.sin(l),f=(t,e,n)=>In(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),p=(t,e,n)=>In(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),g=f(0,c,u),m=f(yn,h,d),b=p(pn,c,u),v=p(pn+yn,h,d);n=(g-b)/2,r=(m-v)/2,o=-(g+b)/2,s=-(m+v)/2}return{ratioX:n,ratioY:r,offsetX:o,offsetY:s}}(d,u,a),b=(i.width-o)/f,v=(i.height-o)/p,y=Math.max(Math.min(b,v)/2,0),x=Ji(this.options.radius,y),_=(x-Math.max(x*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=g*x,this.offsetY=m*x,n.total=this.calculateTotal(),this.outerRadius=x-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*h,0),this.updateElements(r,0,r.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,r=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*r/gn)}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=o.chartArea,a=o.options.animation,l=(s.left+s.right)/2,c=(s.top+s.bottom)/2,h=r&&a.animateScale,u=h?0:this.innerRadius,d=h?0:this.outerRadius,{sharedOptions:f,includeOptions:p}=this._getSharedOptions(e,n);let g,m=this._getRotation();for(g=0;g<e;++g)m+=this._circumference(g,r);for(g=e;g<e+i;++g){const e=this._circumference(g,r),i=t[g],o={x:l+this.offsetX,y:c+this.offsetY,startAngle:m,endAngle:m+e,circumference:e,outerRadius:d,innerRadius:u};p&&(o.options=f||this.resolveDataElementOptions(g,i.active?"active":n)),m+=e,this.updateElement(i,g,o,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,n=0;for(i=0;i<e.length;i++){const r=t._parsed[i];null===r||isNaN(r)||!this.chart.getDataVisibility(i)||e[i].hidden||(n+=Math.abs(r))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?gn*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=Jo(e._parsed[t],i.options.locale);return{label:n[t]||"",value:r}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,r,o,s,a;if(!t)for(n=0,r=i.data.datasets.length;n<r;++n)if(i.isDatasetVisible(n)){o=i.getDatasetMeta(n),t=o.data,s=o.controller;break}if(!t)return 0;for(n=0,r=t.length;n<r;++n)a=s.resolveDataElementOptions(n),"inner"!==a.borderAlign&&(e=Math.max(e,a.borderWidth||0,a.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(Ki(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}Rs.id="doughnut",Rs.defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"},Rs.descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t},Rs.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label(t){let e=t.label;const i=": "+t.formattedValue;return qi(e)?(e=e.slice(),e[0]+=i):e+=i,e}}}}};class Fs extends Ss{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:r}=e,o=this.chart._animationsDisabled;let{start:s,count:a}=Xn(e,n,o);this._drawStart=s,this._drawCount=a,Gn(e)&&(s=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(n,s,a,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s,_stacked:a,_dataset:l}=this._cachedMeta,{sharedOptions:c,includeOptions:h}=this._getSharedOptions(e,n),u=o.axis,d=s.axis,{spanGaps:f,segment:p}=this.options,g=Sn(f)?f:Number.POSITIVE_INFINITY,m=this.chart._animationsDisabled||r||"none"===n;let b=e>0&&this.getParsed(e-1);for(let f=e;f<e+i;++f){const e=t[f],i=this.getParsed(f),v=m?e:{},y=Ui(i[d]),x=v[u]=o.getPixelForValue(i[u],f),_=v[d]=r||y?s.getBasePixel():s.getPixelForValue(a?this.applyStack(s,i,a):i[d],f);v.skip=isNaN(x)||isNaN(_)||y,v.stop=f>0&&Math.abs(i[u]-b[u])>g,p&&(v.parsed=i,v.raw=l.data[f]),h&&(v.options=c||this.resolveDataElementOptions(f,e.active?"active":n)),m||this.updateElement(e,f,v,n),b=i}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}Fs.id="line",Fs.defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1},Fs.overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};class zs extends Ss{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=Jo(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:r}}parseObjectData(t,e,i,n){return Eo.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((t,i)=>{const n=this.getParsed(i).r;!isNaN(n)&&this.chart.getDataVisibility(i)&&(n<e.min&&(e.min=n),n>e.max&&(e.max=n))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),r=Math.max(n/2,0),o=(r-Math.max(i.cutoutPercentage?r/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=r-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,n){const r="reset"===n,o=this.chart,s=o.options.animation,a=this._cachedMeta.rScale,l=a.xCenter,c=a.yCenter,h=a.getIndexAngle(0)-.5*pn;let u,d=h;const f=360/this.countVisibleElements();for(u=0;u<e;++u)d+=this._computeAngle(u,n,f);for(u=e;u<e+i;u++){const e=t[u];let i=d,p=d+this._computeAngle(u,n,f),g=o.getDataVisibility(u)?a.getDistanceFromCenterForValue(this.getParsed(u).r):0;d=p,r&&(s.animateScale&&(g=0),s.animateRotate&&(i=p=h));const m={x:l,y:c,innerRadius:0,outerRadius:g,startAngle:i,endAngle:p,options:this.resolveDataElementOptions(u,e.active?"active":n)};this.updateElement(e,u,m,n)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((t,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?Pn(this.resolveDataElementOptions(t,e).angle||i):0}}zs.id="polarArea",zs.defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0},zs.overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i}}=t.legend.options;return e.labels.map((e,n)=>{const r=t.getDatasetMeta(0).controller.getStyle(n);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(n),index:n}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}},tooltip:{callbacks:{title:()=>"",label:t=>t.chart.data.labels[t.dataIndex]+": "+t.formattedValue}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};class Ns extends Rs{}Ns.id="pie",Ns.defaults={cutout:0,rotation:0,circumference:360,radius:"100%"};class Bs extends Ss{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,n){return Eo.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],r=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:r.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const r=this._cachedMeta.rScale,o="reset"===n;for(let s=e;s<e+i;s++){const e=t[s],i=this.resolveDataElementOptions(s,e.active?"active":n),a=r.getPointPositionForValue(s,this.getParsed(s).r),l=o?r.xCenter:a.x,c=o?r.yCenter:a.y,h={x:l,y:c,angle:a.angle,skip:isNaN(l)||isNaN(c),options:i};this.updateElement(e,s,h,n)}}}Bs.id="radar",Bs.defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}},Bs.overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};class Ws{constructor(){this.x=void 0,this.y=void 0,this.active=!1,this.options=void 0,this.$animations=void 0}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return Sn(this.x)&&Sn(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach(t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]}),n}}Ws.defaults={},Ws.defaultRoutes=void 0;const Vs={values:t=>qi(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let r,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t));return i}(t,i)}const s=wn(Math.abs(o)),a=Math.max(Math.min(-1*Math.floor(s),20),0),l={notation:r,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Jo(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=t/Math.pow(10,Math.floor(wn(t)));return 1===n||2===n||5===n?Vs.numeric.call(this,t,e,i):""}};var Hs={formatters:Vs};function $s(t,e){const i=t.options.ticks,n=i.maxTicksLimit||function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),r=t._maxLength/i;return Math.floor(Math.min(n,r))}(t),r=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;i<n;i++)t[i].major&&e.push(i);return e}(e):[],o=r.length,s=r[0],a=r[o-1],l=[];if(o>n)return function(t,e,i,n){let r,o=0,s=i[0];for(n=Math.ceil(n),r=0;r<t.length;r++)r===s&&(e.push(t[r]),o++,s=i[o*n])}(e,l,r,o/n),l;const c=function(t,e,i){const n=function(t){const e=t.length;let i,n;if(e<2)return!1;for(n=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==n)return!1;return n}(t),r=e.length/i;if(!n)return Math.max(r,1);const o=function(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n===0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort((t,e)=>t-e).pop(),e}(n);for(let t=0,e=o.length-1;t<e;t++){const e=o[t];if(e>r)return e}return Math.max(r,1)}(r,e,n);if(o>0){let t,i;const n=o>1?Math.round((a-s)/(o-1)):null;for(Us(e,l,c,Ui(n)?0:s-n,s),t=0,i=o-1;t<i;t++)Us(e,l,c,r[t],r[t+1]);return Us(e,l,c,a,Ui(n)?e.length:a+n),l}return Us(e,l,c),l}function Us(t,e,i,n,r){const o=Ki(n,0),s=Math.min(Ki(r,t.length),t.length);let a,l,c,h=0;for(i=Math.ceil(i),r&&(a=r-n,i=a/Math.floor(a/i)),c=o;c<0;)h++,c=Math.round(o+h*i);for(l=Math.max(o,0);l<s;l++)l===c&&(e.push(t[l]),h++,c=Math.round(o+h*i))}Wr.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",grace:0,grid:{display:!0,lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1,borderDash:[],borderDashOffset:0,borderWidth:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Hs.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),Wr.route("scale.ticks","color","","color"),Wr.route("scale.grid","color","","borderColor"),Wr.route("scale.grid","borderColor","","borderColor"),Wr.route("scale.title","color","","color"),Wr.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t}),Wr.describe("scales",{_fallback:"scale"}),Wr.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t});const qs=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i;function Ys(t,e){const i=[],n=t.length/e,r=t.length;let o=0;for(;o<r;o+=n)i.push(t[Math.floor(o)]);return i}function Xs(t,e,i){const n=t.ticks.length,r=Math.min(e,n-1),o=t._startPixel,s=t._endPixel,a=1e-6;let l,c=t.getPixelForTick(r);if(!(i&&(l=1===n?Math.max(c-o,s-c):0===e?(t.getPixelForTick(1)-c)/2:(c-t.getPixelForTick(r-1))/2,c+=r<e?l:-l,c<o-a||c>s+a)))return c}function Gs(t){return t.drawTicks?t.tickLength:0}function Ks(t,e){if(!t.display)return 0;const i=ho(t.font,e),n=co(t.padding);return(qi(t.text)?t.text.length:1)*i.lineHeight+n.height}function Js(t,e,i){let n=qn(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class Qs extends Ws{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=Gi(t,Number.POSITIVE_INFINITY),e=Gi(e,Number.NEGATIVE_INFINITY),i=Gi(i,Number.POSITIVE_INFINITY),n=Gi(n,Number.NEGATIVE_INFINITY),{min:Gi(t,i),max:Gi(e,n),minDefined:Xi(t),maxDefined:Xi(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:r,maxDefined:o}=this.getUserBounds();if(r&&o)return{min:i,max:n};const s=this.getMatchingVisibleMetas();for(let a=0,l=s.length;a<l;++a)e=s[a].controller.getMinMax(this,t),r||(i=Math.min(i,e.min)),o||(n=Math.max(n,e.max));return i=o&&i>n?n:i,n=r&&i>n?i:n,{min:Gi(i,Gi(n,i)),max:Gi(n,Gi(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Qi(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:r,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:r}=t,o=Ji(e,(r-n)/2),s=(t,e)=>i&&0===t?0:t+e;return{min:s(n,-Math.abs(o)),max:s(r,o)}}(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=s<this.ticks.length;this._convertTicksToLabels(a?Ys(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(this.ticks=$s(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),a&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Qi(this.options.afterUpdate,[this])}beforeSetDimensions(){Qi(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Qi(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Qi(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Qi(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,n,r;for(i=0,n=t.length;i<n;i++)r=t[i],r.label=Qi(e.callback,[r.value,i,t],this)}afterTickToLabelConversion(){Qi(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Qi(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=this.ticks.length,n=e.minRotation||0,r=e.maxRotation;let o,s,a,l=n;if(!this._isVisible()||!e.display||n>=r||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const c=this._getLabelSizes(),h=c.widest.width,u=c.highest.height,d=Rn(this.chart.width-h,0,this.maxWidth);o=t.offset?this.maxWidth/i:d/(i-1),h+6>o&&(o=d/(i-(t.offset?.5:1)),s=this.maxHeight-Gs(t.grid)-e.padding-Ks(t.title,this.chart.options.font),a=Math.sqrt(h*h+u*u),l=Tn(Math.min(Math.asin(Rn((c.highest.height+6)/o,-1,1)),Math.asin(Rn(s/a,-1,1))-Math.asin(Rn(u/a,-1,1)))),l=Math.max(n,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){Qi(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Qi(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:r}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const o=Ks(n,e.options.font);if(s?(t.width=this.maxWidth,t.height=Gs(r)+o):(t.height=this.maxHeight,t.width=Gs(r)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:r,highest:o}=this._getLabelSizes(),a=2*i.padding,l=Pn(this.labelRotation),c=Math.cos(l),h=Math.sin(l);if(s){const e=i.mirror?0:h*r.width+c*o.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:c*r.width+h*o.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,h,c)}}this._handleMargins(),s?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:r,padding:o},position:s}=this.options,a=0!==this.labelRotation,l="top"!==s&&"x"===this.axis;if(this.isHorizontal()){const s=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let h=0,u=0;a?l?(h=n*t.width,u=i*e.height):(h=i*t.height,u=n*e.width):"start"===r?u=e.width:"end"===r?h=t.width:"inner"!==r&&(h=t.width/2,u=e.width/2),this.paddingLeft=Math.max((h-s+o)*this.width/(this.width-s),0),this.paddingRight=Math.max((u-c+o)*this.width/(this.width-c),0)}else{let i=e.height/2,n=t.height/2;"start"===r?(i=0,n=t.height):"end"===r&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Qi(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)Ui(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=Ys(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length)}return t}_computeLabelSizes(t,e){const{ctx:i,_longestTextCache:n}=this,r=[],o=[];let s,a,l,c,h,u,d,f,p,g,m,b=0,v=0;for(s=0;s<e;++s){if(c=t[s].label,h=this._resolveTickFontOptions(s),i.font=u=h.string,d=n[u]=n[u]||{data:{},gc:[]},f=h.lineHeight,p=g=0,Ui(c)||qi(c)){if(qi(c))for(a=0,l=c.length;a<l;++a)m=c[a],Ui(m)||qi(m)||(p=Vr(i,d.data,d.gc,p,m),g+=f)}else p=Vr(i,d.data,d.gc,p,c),g=f;r.push(p),o.push(g),b=Math.max(p,b),v=Math.max(g,v)}!function(t,e){Zi(t,t=>{const i=t.gc,n=i.length/2;let r;if(n>e){for(r=0;r<n;++r)delete t.data[i[r]];i.splice(0,n)}})}(n,e);const y=r.indexOf(b),x=o.indexOf(v),_=t=>({width:r[t]||0,height:o[t]||0});return{first:_(0),last:_(e-1),widest:_(y),highest:_(x),widths:r,heights:o}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Rn(this._alignToPixels?$r(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=function(t,e,i){return fo(t,{tick:i,index:e,type:"tick"})}(this.getContext(),t,i))}return this.$context||(this.$context=fo(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=Pn(this.labelRotation),i=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),r=this._getLabelSizes(),o=t.autoSkipPadding||0,s=r?r.widest.width+o:0,a=r?r.highest.height+o:0;return this.isHorizontal()?a*i>s*n?s/i:a/n:a*n<s*i?a/i:s/n}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:r,position:o}=n,s=r.offset,a=this.isHorizontal(),l=this.ticks.length+(s?1:0),c=Gs(r),h=[],u=r.setContext(this.getContext()),d=u.drawBorder?u.borderWidth:0,f=d/2,p=function(t){return $r(i,t,d)};let g,m,b,v,y,x,_,w,k,O,S,M;if("top"===o)g=p(this.bottom),x=this.bottom-c,w=g-f,O=p(t.top)+f,M=t.bottom;else if("bottom"===o)g=p(this.top),O=t.top,M=p(t.bottom)-f,x=g+f,w=this.top+c;else if("left"===o)g=p(this.right),y=this.right-c,_=g-f,k=p(t.left)+f,S=t.right;else if("right"===o)g=p(this.left),k=t.left,S=p(t.right)-f,y=g+f,_=this.left+c;else if("x"===e){if("center"===o)g=p((t.top+t.bottom)/2+.5);else if(Yi(o)){const t=Object.keys(o)[0],e=o[t];g=p(this.chart.scales[t].getPixelForValue(e))}O=t.top,M=t.bottom,x=g+f,w=x+c}else if("y"===e){if("center"===o)g=p((t.left+t.right)/2);else if(Yi(o)){const t=Object.keys(o)[0],e=o[t];g=p(this.chart.scales[t].getPixelForValue(e))}y=g-f,_=y-c,k=t.left,S=t.right}const E=Ki(n.ticks.maxTicksLimit,l),P=Math.max(1,Math.ceil(l/E));for(m=0;m<l;m+=P){const t=r.setContext(this.getContext(m)),e=t.lineWidth,n=t.color,o=t.borderDash||[],l=t.borderDashOffset,c=t.tickWidth,u=t.tickColor,d=t.tickBorderDash||[],f=t.tickBorderDashOffset;b=Xs(this,m,s),void 0!==b&&(v=$r(i,b,e),a?y=_=k=S=v:x=w=O=M=v,h.push({tx1:y,ty1:x,tx2:_,ty2:w,x1:k,y1:O,x2:S,y2:M,width:e,color:n,borderDash:o,borderDashOffset:l,tickWidth:c,tickColor:u,tickBorderDash:d,tickBorderDashOffset:f}))}return this._ticksLength=l,this._borderValue=g,h}_computeLabelItems(t){const e=this.axis,i=this.options,{position:n,ticks:r}=i,o=this.isHorizontal(),s=this.ticks,{align:a,crossAlign:l,padding:c,mirror:h}=r,u=Gs(i.grid),d=u+c,f=h?-c:d,p=-Pn(this.labelRotation),g=[];let m,b,v,y,x,_,w,k,O,S,M,E,P="middle";if("top"===n)_=this.bottom-f,w=this._getXAxisLabelAlignment();else if("bottom"===n)_=this.top+f,w=this._getXAxisLabelAlignment();else if("left"===n){const t=this._getYAxisLabelAlignment(u);w=t.textAlign,x=t.x}else if("right"===n){const t=this._getYAxisLabelAlignment(u);w=t.textAlign,x=t.x}else if("x"===e){if("center"===n)_=(t.top+t.bottom)/2+d;else if(Yi(n)){const t=Object.keys(n)[0],e=n[t];_=this.chart.scales[t].getPixelForValue(e)+d}w=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===n)x=(t.left+t.right)/2-d;else if(Yi(n)){const t=Object.keys(n)[0],e=n[t];x=this.chart.scales[t].getPixelForValue(e)}w=this._getYAxisLabelAlignment(u).textAlign}"y"===e&&("start"===a?P="top":"end"===a&&(P="bottom"));const T=this._getLabelSizes();for(m=0,b=s.length;m<b;++m){v=s[m],y=v.label;const t=r.setContext(this.getContext(m));k=this.getPixelForTick(m)+r.labelOffset,O=this._resolveTickFontOptions(m),S=O.lineHeight,M=qi(y)?y.length:1;const e=M/2,i=t.color,a=t.textStrokeColor,c=t.textStrokeWidth;let u,d=w;if(o?(x=k,"inner"===w&&(d=m===b-1?this.options.reverse?"left":"right":0===m?this.options.reverse?"right":"left":"center"),E="top"===n?"near"===l||0!==p?-M*S+S/2:"center"===l?-T.highest.height/2-e*S+S:-T.highest.height+S/2:"near"===l||0!==p?S/2:"center"===l?T.highest.height/2-e*S:T.highest.height-M*S,h&&(E*=-1)):(_=k,E=(1-M)*S/2),t.showLabelBackdrop){const e=co(t.backdropPadding),i=T.heights[m],n=T.widths[m];let r=_+E-e.top,o=x-e.left;switch(P){case"middle":r-=i/2;break;case"bottom":r-=i}switch(w){case"center":o-=n/2;break;case"right":o-=n}u={left:o,top:r,width:n+e.width,height:i+e.height,color:t.backdropColor}}g.push({rotation:p,label:y,font:O,color:i,strokeColor:a,strokeWidth:c,textOffset:E,textAlign:d,textBaseline:P,translation:[x,_],backdrop:u})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-Pn(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:n,padding:r}}=this.options,o=t+r,s=this._getLabelSizes().widest.width;let a,l;return"left"===e?n?(l=this.right+r,"near"===i?a="left":"center"===i?(a="center",l+=s/2):(a="right",l+=s)):(l=this.right-o,"near"===i?a="right":"center"===i?(a="center",l-=s/2):(a="left",l=this.left)):"right"===e?n?(l=this.left+r,"near"===i?a="right":"center"===i?(a="center",l-=s/2):(a="left",l-=s)):(l=this.left+o,"near"===i?a="left":"center"===i?(a="center",l+=s/2):(a="right",l=this.right)):a="right",{textAlign:a,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:r,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,r,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex(e=>e.value===t);if(i>=0){return e.setContext(this.getContext(i)).lineWidth}return 0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,o;const s=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(r=0,o=n.length;r<o;++r){const t=n[r];e.drawOnChartArea&&s({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&s({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{grid:i}}=this,n=i.setContext(this.getContext()),r=i.drawBorder?n.borderWidth:0;if(!r)return;const o=i.setContext(this.getContext(0)).lineWidth,s=this._borderValue;let a,l,c,h;this.isHorizontal()?(a=$r(t,this.left,r)-r/2,l=$r(t,this.right,o)+o/2,c=h=s):(c=$r(t,this.top,r)-r/2,h=$r(t,this.bottom,o)+o/2,a=l=s),e.save(),e.lineWidth=n.borderWidth,e.strokeStyle=n.borderColor,e.beginPath(),e.moveTo(a,c),e.lineTo(l,h),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&Gr(e,i);const n=this._labelItems||(this._labelItems=this._computeLabelItems(t));let r,o;for(r=0,o=n.length;r<o;++r){const t=n[r],i=t.font,o=t.label;t.backdrop&&(e.fillStyle=t.backdrop.color,e.fillRect(t.backdrop.left,t.backdrop.top,t.backdrop.width,t.backdrop.height)),Zr(e,o,0,t.textOffset,i,t)}i&&Kr(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const r=ho(i.font),o=co(i.padding),s=i.align;let a=r.lineHeight/2;"bottom"===e||"center"===e||Yi(e)?(a+=o.bottom,qi(i.text)&&(a+=r.lineHeight*(i.text.length-1))):a+=o.top;const{titleX:l,titleY:c,maxWidth:h,rotation:u}=function(t,e,i,n){const{top:r,left:o,bottom:s,right:a,chart:l}=t,{chartArea:c,scales:h}=l;let u,d,f,p=0;const g=s-r,m=a-o;if(t.isHorizontal()){if(d=Yn(n,o,a),Yi(i)){const t=Object.keys(i)[0],n=i[t];f=h[t].getPixelForValue(n)+g-e}else f="center"===i?(c.bottom+c.top)/2+g-e:qs(t,i,e);u=a-o}else{if(Yi(i)){const t=Object.keys(i)[0],n=i[t];d=h[t].getPixelForValue(n)-m+e}else d="center"===i?(c.left+c.right)/2-m+e:qs(t,i,e);f=Yn(n,s,r),p="left"===i?-yn:yn}return{titleX:d,titleY:f,maxWidth:u,rotation:p}}(this,a,e,s);Zr(t,i.text,0,0,r,{color:i.color,maxWidth:h,rotation:u,textAlign:Js(s,e,n),textBaseline:"middle",translation:[l,c]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=Ki(t.grid&&t.grid.z,-1);return this._isVisible()&&this.draw===Qs.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:i+1,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,o;for(r=0,o=e.length;r<o;++r){const o=e[r];o[i]!==this.id||t&&o.type!==t||n.push(o)}return n}_resolveTickFontOptions(t){return ho(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Zs{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;(function(t){return"id"in t&&"defaults"in t})(e)&&(i=this.register(e));const n=this.items,r=t.id,o=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+t);return r in n||(n[r]=t,function(t,e,i){const n=on(Object.create(null),[i?Wr.get(i):{},Wr.get(e),t.defaults]);Wr.set(e,n),t.defaultRoutes&&function(t,e){Object.keys(e).forEach(i=>{const n=i.split("."),r=n.pop(),o=[t].concat(n).join("."),s=e[i].split("."),a=s.pop(),l=s.join(".");Wr.route(o,r,l,a)})}(e,t.defaultRoutes);t.descriptors&&Wr.describe(e,t.descriptors)}(t,o,i),this.override&&Wr.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in Wr[n]&&(delete Wr[n][i],this.override&&delete Fr[i])}}var ta=new class{constructor(){this.controllers=new Zs(Ss,"datasets",!0),this.elements=new Zs(Ws,"elements"),this.plugins=new Zs(Object,"plugins"),this.scales=new Zs(Qs,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):Zi(e,e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)})})}_exec(t,e,i){const n=hn(t);Qi(i["before"+n],[],i),e[t](i),Qi(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n}};class ea extends Ss{update(t){const e=this._cachedMeta,{data:i=[]}=e,n=this.chart._animationsDisabled;let{start:r,count:o}=Xn(e,i,n);if(this._drawStart=r,this._drawCount=o,Gn(e)&&(r=0,o=i.length),this.options.showLine){const{dataset:r,_dataset:o}=e;r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const s=this.resolveDatasetElementOptions(t);s.segment=this.options.segment,this.updateElement(r,void 0,{animated:!n,options:s},t)}this.updateElements(i,r,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=ta.getElement("line")),super.addElements()}updateElements(t,e,i,n){const r="reset"===n,{iScale:o,vScale:s,_stacked:a,_dataset:l}=this._cachedMeta,c=this.resolveDataElementOptions(e,n),h=this.getSharedOptions(c),u=this.includeOptions(n,h),d=o.axis,f=s.axis,{spanGaps:p,segment:g}=this.options,m=Sn(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||r||"none"===n;let v=e>0&&this.getParsed(e-1);for(let c=e;c<e+i;++c){const e=t[c],i=this.getParsed(c),p=b?e:{},y=Ui(i[f]),x=p[d]=o.getPixelForValue(i[d],c),_=p[f]=r||y?s.getBasePixel():s.getPixelForValue(a?this.applyStack(s,i,a):i[f],c);p.skip=isNaN(x)||isNaN(_)||y,p.stop=c>0&&Math.abs(i[d]-v[d])>m,g&&(p.parsed=i,p.raw=l.data[c]),u&&(p.options=h||this.resolveDataElementOptions(c,e.active?"active":n)),b||this.updateElement(e,c,p,n),v=i}this.updateSharedOptions(h,n,c)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,n=i.options&&i.options.borderWidth||0;if(!e.length)return n;const r=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,r,o)/2}}ea.id="scatter",ea.defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1},ea.overrides={interaction:{mode:"point"},plugins:{tooltip:{callbacks:{title:()=>"",label:t=>"("+t.label+", "+t.formattedValue+")"}}},scales:{x:{type:"linear"},y:{type:"linear"}}};var ia=Object.freeze({__proto__:null,BarController:js,BubbleController:Is,DoughnutController:Rs,LineController:Fs,PolarAreaController:zs,PieController:Ns,RadarController:Bs,ScatterController:ea});function na(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class ra{constructor(t){this.options=t||{}}init(t){}formats(){return na()}parse(t,e){return na()}format(t,e){return na()}add(t,e,i){return na()}diff(t,e,i){return na()}startOf(t,e,i){return na()}endOf(t,e){return na()}}ra.override=function(t){Object.assign(ra.prototype,t)};var oa={_date:ra};function sa(t,e,i,n){const{controller:r,data:o,_sorted:s}=t,a=r._cachedMeta.iScale;if(a&&e===a.axis&&"r"!==e&&s&&o.length){const t=a._reversePixels?Bn:Nn;if(!n)return t(o,e,i);if(r._sharedOptions){const n=o[0],r="function"==typeof n.getRange&&n.getRange(e);if(r){const n=t(o,e,i-r),s=t(o,e,i+r);return{lo:n.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function aa(t,e,i,n,r){const o=t.getSortedVisibleDatasetMetas(),s=i[e];for(let t=0,i=o.length;t<i;++t){const{index:i,data:a}=o[t],{lo:l,hi:c}=sa(o[t],e,s,r);for(let t=l;t<=c;++t){const e=a[t];e.skip||n(e,i,t)}}}function la(t,e,i,n,r){const o=[];if(!r&&!t.isPointInArea(e))return o;return aa(t,i,e,function(i,s,a){(r||Xr(i,t.chartArea,0))&&i.inRange(e.x,e.y,n)&&o.push({element:i,datasetIndex:s,index:a})},!0),o}function ca(t,e,i,n,r,o){let s=[];const a=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const r=e?Math.abs(t.x-n.x):0,o=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(o,2))}}(i);let l=Number.POSITIVE_INFINITY;return aa(t,i,e,function(i,c,h){const u=i.inRange(e.x,e.y,r);if(n&&!u)return;const d=i.getCenterPoint(r);if(!(!!o||t.isPointInArea(d))&&!u)return;const f=a(e,d);f<l?(s=[{element:i,datasetIndex:c,index:h}],l=f):f===l&&s.push({element:i,datasetIndex:c,index:h})}),s}function ha(t,e,i,n,r,o){return o||t.isPointInArea(e)?"r"!==i||n?ca(t,e,i,n,r,o):function(t,e,i,n){let r=[];return aa(t,i,e,function(t,i,o){const{startAngle:s,endAngle:a}=t.getProps(["startAngle","endAngle"],n),{angle:l}=Cn(t,{x:e.x,y:e.y});In(l,s,a)&&r.push({element:t,datasetIndex:i,index:o})}),r}(t,e,i,r):[]}function ua(t,e,i,n,r){const o=[],s="x"===i?"inXRange":"inYRange";let a=!1;return aa(t,i,e,(t,n,l)=>{t[s](e[i],r)&&(o.push({element:t,datasetIndex:n,index:l}),a=a||t.inRange(e.x,e.y,r))}),n&&!a?[]:o}var da={evaluateInteractionItems:aa,modes:{index(t,e,i,n){const r=Wo(e,t),o=i.axis||"x",s=i.includeInvisible||!1,a=i.intersect?la(t,r,o,n,s):ha(t,r,o,!1,n,s),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{const e=a[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})}),l):[]},dataset(t,e,i,n){const r=Wo(e,t),o=i.axis||"xy",s=i.includeInvisible||!1;let a=i.intersect?la(t,r,o,n,s):ha(t,r,o,!1,n,s);if(a.length>0){const e=a[0].datasetIndex,i=t.getDatasetMeta(e).data;a=[];for(let t=0;t<i.length;++t)a.push({element:i[t],datasetIndex:e,index:t})}return a},point:(t,e,i,n)=>la(t,Wo(e,t),i.axis||"xy",n,i.includeInvisible||!1),nearest(t,e,i,n){const r=Wo(e,t),o=i.axis||"xy",s=i.includeInvisible||!1;return ha(t,r,o,i.intersect,n,s)},x:(t,e,i,n)=>ua(t,Wo(e,t),"x",i.intersect,n),y:(t,e,i,n)=>ua(t,Wo(e,t),"y",i.intersect,n)}};const fa=["left","top","right","bottom"];function pa(t,e){return t.filter(t=>t.pos===e)}function ga(t,e){return t.filter(t=>-1===fa.indexOf(t.pos)&&t.box.axis===e)}function ma(t,e){return t.sort((t,i)=>{const n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight})}function ba(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:r}=i;if(!t||!fa.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=r}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e;let o,s,a;for(o=0,s=t.length;o<s;++o){a=t[o];const{fullSize:s}=a.box,l=i[a.stack],c=l&&a.stackWeight/l.weight;a.horizontal?(a.width=c?c*n:s&&e.availableWidth,a.height=r):(a.width=n,a.height=c?c*r:s&&e.availableHeight)}return i}function va(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function ya(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function xa(t,e,i,n){const{pos:r,box:o}=i,s=t.maxPadding;if(!Yi(r)){i.size&&(t[r]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?o.height:o.width),i.size=e.size/e.count,t[r]+=i.size}o.getPadding&&ya(s,o.getPadding());const a=Math.max(0,e.outerWidth-va(s,t,"left","right")),l=Math.max(0,e.outerHeight-va(s,t,"top","bottom")),c=a!==t.w,h=l!==t.h;return t.w=a,t.h=l,i.horizontal?{same:c,other:h}:{same:h,other:c}}function _a(t,e){const i=e.maxPadding;function n(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{n[t]=Math.max(e[t],i[t])}),n}return n(t?["left","right"]:["top","bottom"])}function wa(t,e,i,n){const r=[];let o,s,a,l,c,h;for(o=0,s=t.length,c=0;o<s;++o){a=t[o],l=a.box,l.update(a.width||e.w,a.height||e.h,_a(a.horizontal,e));const{same:s,other:u}=xa(e,i,a,n);c|=s&&r.length,h=h||u,l.fullSize||r.push(a)}return c&&wa(r,e,i,n)||h}function ka(t,e,i,n,r){t.top=i,t.left=e,t.right=e+n,t.bottom=i+r,t.width=n,t.height=r}function Oa(t,e,i,n){const r=i.padding;let{x:o,y:s}=e;for(const a of t){const t=a.box,l=n[a.stack]||{count:1,placed:0,weight:1},c=a.stackWeight/l.weight||1;if(a.horizontal){const n=e.w*c,o=l.size||t.height;un(l.start)&&(s=l.start),t.fullSize?ka(t,r.left,s,i.outerWidth-r.right-r.left,o):ka(t,e.left+l.placed,s,n,o),l.start=s,l.placed+=n,s=t.bottom}else{const n=e.h*c,s=l.size||t.width;un(l.start)&&(o=l.start),t.fullSize?ka(t,o,r.top,s,i.outerHeight-r.bottom-r.top):ka(t,o,e.top+l.placed,s,n),l.start=o,l.placed+=n,o=t.right}}e.x=o,e.y=s}Wr.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}});var Sa={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,n){if(!t)return;const r=co(t.options.layout.padding),o=Math.max(e-r.width,0),s=Math.max(i-r.height,0),a=function(t){const e=function(t){const e=[];let i,n,r,o,s,a;for(i=0,n=(t||[]).length;i<n;++i)r=t[i],({position:o,options:{stack:s,stackWeight:a=1}}=r),e.push({index:i,box:r,pos:o,horizontal:r.isHorizontal(),weight:r.weight,stack:s&&o+s,stackWeight:a});return e}(t),i=ma(e.filter(t=>t.box.fullSize),!0),n=ma(pa(e,"left"),!0),r=ma(pa(e,"right")),o=ma(pa(e,"top"),!0),s=ma(pa(e,"bottom")),a=ga(e,"x"),l=ga(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:r.concat(l).concat(s).concat(a),chartArea:pa(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:o.concat(s).concat(a)}}(t.boxes),l=a.vertical,c=a.horizontal;Zi(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});const h=l.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:o,availableHeight:s,vBoxMaxWidth:o/2/h,hBoxMaxHeight:s/2}),d=Object.assign({},r);ya(d,co(n));const f=Object.assign({maxPadding:d,w:o,h:s,x:r.left,y:r.top},r),p=ba(l.concat(c),u);wa(a.fullSize,f,u,p),wa(l,f,u,p),wa(c,f,u,p)&&wa(l,f,u,p),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),Oa(a.leftAndTop,f,u,p),f.x+=f.w,f.y+=f.h,Oa(a.rightAndBottom,f,u,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},Zi(a.chartArea,e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class Ma{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class Ea extends Ma{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Pa="$chartjs",Ta={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Aa=t=>null===t||""===t;const Ca=!!Uo&&{passive:!0};function La(t,e,i){t.canvas.removeEventListener(e,i,Ca)}function Da(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function ja(t,e,i){const n=t.canvas,r=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||Da(i.addedNodes,n),e=e&&!Da(i.removedNodes,n);e&&i()});return r.observe(document,{childList:!0,subtree:!0}),r}function Ia(t,e,i){const n=t.canvas,r=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||Da(i.removedNodes,n),e=e&&!Da(i.addedNodes,n);e&&i()});return r.observe(document,{childList:!0,subtree:!0}),r}const Ra=new Map;let Fa=0;function za(){const t=window.devicePixelRatio;t!==Fa&&(Fa=t,Ra.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function Na(t,e,i){const n=t.canvas,r=n&&Ro(n);if(!r)return;const o=Un((t,e)=>{const n=r.clientWidth;i(t,e),n<r.clientWidth&&i()},window),s=new ResizeObserver(t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)});return s.observe(r),function(t,e){Ra.size||window.addEventListener("resize",za),Ra.set(t,e)}(t,o),s}function Ba(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){Ra.delete(t),Ra.size||window.removeEventListener("resize",za)}(t)}function Wa(t,e,i){const n=t.canvas,r=Un(e=>{null!==t.ctx&&i(function(t,e){const i=Ta[t.type]||t.type,{x:n,y:r}=Wo(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==r?r:null}}(e,t))},t,t=>{const e=t[0];return[e,e.offsetX,e.offsetY]});return function(t,e,i){t.addEventListener(e,i,Ca)}(n,e,r),r}class Va extends Ma{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t[Pa]={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Aa(r)){const e=qo(t,"width");void 0!==e&&(t.width=e)}if(Aa(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=qo(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Pa])return!1;const i=e[Pa].initial;["height","width"].forEach(t=>{const n=i[t];Ui(n)?e.removeAttribute(t):e.setAttribute(t,n)});const n=i.style||{};return Object.keys(n).forEach(t=>{e.style[t]=n[t]}),e.width=e.width,delete e[Pa],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:ja,detach:Ia,resize:Na}[e]||Wa;n[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];if(!n)return;({attach:Ba,detach:Ba,resize:Ba}[e]||La)(t,e,n),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return Ho(t,e,i,n)}isAttached(t){const e=Ro(t);return!(!e||!e.isConnected)}}class Ha{constructor(){this._init=[]}notify(t,e,i,n){"beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const r=n?this._descriptors(t).filter(n):this._descriptors(t),o=this._notify(r,t,e,i);return"afterDestroy"===e&&(this._notify(r,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,e,i,n){n=n||{};for(const r of t){const t=r.plugin;if(!1===Qi(t[i],[e,n,r.options],t)&&n.cancelable)return!1}return!0}invalidate(){Ui(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,n=Ki(i.options&&i.options.plugins,{}),r=function(t){const e={},i=[],n=Object.keys(ta.plugins.items);for(let t=0;t<n.length;t++)i.push(ta.getPlugin(n[t]));const r=t.plugins||[];for(let t=0;t<r.length;t++){const n=r[t];-1===i.indexOf(n)&&(i.push(n),e[n.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==n||e?function(t,{plugins:e,localIds:i},n,r){const o=[],s=t.getContext();for(const a of e){const e=a.id,l=$a(n[e],r);null!==l&&o.push({plugin:a,options:Ua(t.config,{plugin:a,local:i[e]},l,s)})}return o}(t,r,n,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(t,e)=>t.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function $a(t,e){return e||!1!==t?!0===t?{}:t:null}function Ua(t,{plugin:e,local:i},n,r){const o=t.pluginScopeKeys(e),s=t.getOptionScopes(n,o);return i&&e.defaults&&s.push(e.defaults),t.createResolver(s,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function qa(t,e){const i=Wr.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Ya(t,e){return"x"===t||"y"===t?t:e.axis||("top"===(i=e.position)||"bottom"===i?"x":"left"===i||"right"===i?"y":void 0)||t.charAt(0).toLowerCase();var i}function Xa(t){const e=t.options||(t.options={});e.plugins=Ki(e.plugins,{}),e.scales=function(t,e){const i=Fr[t.type]||{scales:{}},n=e.scales||{},r=qa(t.type,e),o=Object.create(null),s=Object.create(null);return Object.keys(n).forEach(t=>{const e=n[t];if(!Yi(e))return console.error(`Invalid scale configuration for scale: ${t}`);if(e._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${t}`);const a=Ya(t,e),l=function(t,e){return t===e?"_index_":"_value_"}(a,r),c=i.scales||{};o[a]=o[a]||t,s[t]=sn(Object.create(null),[{axis:a},e,c[a],c[l]])}),t.data.datasets.forEach(i=>{const r=i.type||t.type,a=i.indexAxis||qa(r,e),l=(Fr[r]||{}).scales||{};Object.keys(l).forEach(t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),r=i[e+"AxisID"]||o[e]||e;s[r]=s[r]||Object.create(null),sn(s[r],[{axis:e},n[r],l[t]])})}),Object.keys(s).forEach(t=>{const e=s[t];sn(e,[Wr.scales[e.type],Wr.scale])}),s}(t,e)}function Ga(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Ka=new Map,Ja=new Set;function Qa(t,e){let i=Ka.get(t);return i||(i=e(),Ka.set(t,i),Ja.add(i)),i}const Za=(t,e,i)=>{const n=cn(e,i);void 0!==n&&t.add(n)};class tl{constructor(t){this._config=function(t){return(t=t||{}).data=Ga(t.data),Xa(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=Ga(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),Xa(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Qa(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Qa(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Qa(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id;return Qa(`${this.type}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:r}=this,o=this._cachedScopes(t,i),s=o.get(e);if(s)return s;const a=new Set;e.forEach(e=>{t&&(a.add(t),e.forEach(e=>Za(a,t,e))),e.forEach(t=>Za(a,n,t)),e.forEach(t=>Za(a,Fr[r]||{},t)),e.forEach(t=>Za(a,Wr,t)),e.forEach(t=>Za(a,zr,t))});const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),Ja.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Fr[e]||{},Wr.datasets[e]||{},{type:e},Wr,zr]}resolveNamedOptions(t,e,i,n=[""]){const r={$shared:!0},{resolver:o,subPrefixes:s}=el(this._resolverCache,t,n);let a=o;if(function(t,e){const{isScriptable:i,isIndexable:n}=mo(t);for(const r of e){const e=i(r),o=n(r),s=(o||e)&&t[r];if(e&&(dn(s)||il(s))||o&&qi(s))return!0}return!1}(o,e)){r.$shared=!1;a=go(o,i=dn(i)?i():i,this.createResolver(t,i,s))}for(const t of e)r[t]=a[t];return r}createResolver(t,e,i=[""],n){const{resolver:r}=el(this._resolverCache,t,i);return Yi(e)?go(r,e,void 0,n):r}}function el(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const r=i.join();let o=n.get(r);if(!o){o={resolver:po(e,i),subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},n.set(r,o)}return o}const il=t=>Yi(t)&&Object.getOwnPropertyNames(t).reduce((e,i)=>e||dn(t[i]),!1);const nl=["top","bottom","left","right","chartArea"];function rl(t,e){return"top"===t||"bottom"===t||-1===nl.indexOf(t)&&"x"===e}function ol(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function sl(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),Qi(i&&i.onComplete,[t],e)}function al(t){const e=t.chart,i=e.options.animation;Qi(i&&i.onProgress,[t],e)}function ll(t){return Io()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const cl={},hl=t=>{const e=ll(t);return Object.values(cl).filter(t=>t.canvas===e).pop()};function ul(t,e,i){const n=Object.keys(t);for(const r of n){const n=+r;if(n>=e){const o=t[r];delete t[r],(i>0||n>e)&&(t[n+i]=o)}}}class dl{constructor(t,e){const i=this.config=new tl(e),n=ll(t),r=hl(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Io()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?Ea:Va}(n)),this.platform.updateConfig(i);const s=this.platform.acquireContext(n,o.aspectRatio),a=s&&s.canvas,l=a&&a.height,c=a&&a.width;this.id=$i(),this.ctx=s,this.canvas=a,this.width=c,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Ha,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}(t=>this.update(t),o.resizeDelay||0),this._dataChanges=[],cl[this.id]=this,s&&a?(ls.listen(this,"complete",sl),ls.listen(this,"progress",al),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:r}=this;return Ui(t)?e&&r?r:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():$o(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Ur(this.canvas,this.ctx),this}stop(){return ls.stop(this),this}resize(t,e){ls.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,r),s=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,$o(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),Qi(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){Zi(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce((t,e)=>(t[e]=!1,t),{});let r=[];e&&(r=r.concat(Object.keys(e).map(t=>{const i=e[t],n=Ya(t,i),r="r"===n,o="x"===n;return{options:i,dposition:r?"chartArea":o?"bottom":"left",dtype:r?"radialLinear":o?"category":"linear"}}))),Zi(r,e=>{const r=e.options,o=r.id,s=Ya(o,r),a=Ki(r.type,e.dtype);void 0!==r.position&&rl(r.position,s)===rl(e.dposition)||(r.position=e.dposition),n[o]=!0;let l=null;if(o in i&&i[o].type===a)l=i[o];else{l=new(ta.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),i[l.id]=l}l.init(r,t)}),Zi(n,(t,e)=>{t||delete i[e]}),Zi(i,t=>{Sa.configure(this,t,t.options),Sa.addBox(this,t)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((t,e)=>t.index-e.index),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(ol("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((t,i)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i<n;i++){const n=e[i];let r=this.getDatasetMeta(i);const o=n.type||this.config.type;if(r.type&&r.type!==o&&(this._destroyDatasetMeta(i),r=this.getDatasetMeta(i)),r.type=o,r.indexAxis=n.indexAxis||qa(o,this.options),r.order=n.order||0,r.index=i,r.label=""+n.label,r.visible=this.isDatasetVisible(i),r.controller)r.controller.updateIndex(i),r.controller.linkScales();else{const e=ta.getController(o),{datasetElementType:n,dataElementType:s}=Wr.datasets[o];Object.assign(e.prototype,{dataElementType:ta.getElement(s),datasetElementType:n&&ta.getElement(n)}),r.controller=new e(this,i),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){Zi(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),i=!n&&-1===r.indexOf(e);e.buildOrUpdateElements(i),o=Math.max(+e.getMaxOverflow(),o)}o=this._minPadding=i.layout.autoPadding?o:0,this._updateLayout(o),n||Zi(r,t=>{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ol("z","_idx"));const{_active:s,_lastEvent:a}=this;a?this._eventHandler(a,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Zi(this.scales,t=>{Sa.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);fn(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:r}of e){ul(t,n,"_removeElements"===i?-r:r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),n=i(0);for(let t=1;t<e;t++)if(!fn(n,i(t)))return;return Array.from(n).map(t=>t.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Sa.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],Zi(this.boxes,t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,dn(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),n={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",n)&&(i.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(ls.has(this)?this.attached&&!ls.running(this)&&ls.start(this):(this.draw(),sl({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resize(t,e),this._resizeBeforeDraw=null}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let n,r;for(n=0,r=e.length;n<r;++n){const r=e[n];t&&!r.visible||i.push(r)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,n=!i.disabled,r=this.chartArea,o={meta:t,index:t.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",o)&&(n&&Gr(e,{left:!1===i.left?0:r.left-i.left,right:!1===i.right?this.width:r.right+i.right,top:!1===i.top?0:r.top-i.top,bottom:!1===i.bottom?this.height:r.bottom+i.bottom}),t.controller.draw(),n&&Kr(e),o.cancelable=!1,this.notifyPlugins("afterDatasetDraw",o))}isPointInArea(t){return Xr(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const r=da.modes[e];return"function"==typeof r?r(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter(t=>t&&t._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=fo(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",r=this.getDatasetMeta(t),o=r.controller._resolveAnimations(void 0,n);un(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(r,{visible:i}),this.update(e=>e.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),ls.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Ur(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),this.notifyPlugins("destroy"),delete cl[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};Zi(this.options.events,t=>i(t,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const s=()=>{n("attach",s),this.attached=!0,this.resize(),i("resize",r),i("detach",o)};o=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",s)},e.isAttached(this.canvas)?s():o()}unbindEvents(){Zi(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},Zi(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let r,o,s,a;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),s=0,a=t.length;s<a;++s){o=t[s];const e=o&&this.getDatasetMeta(o.datasetIndex).controller;e&&e[n+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:t,index:e})=>{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}});!tn(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}_updateHoverStyles(t,e,i){const n=this.options.hover,r=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),o=r(e,t),s=i?t:r(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),s.length&&n.mode&&this.updateHoverStyle(s,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const r=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:r}=this,o=e,s=this._getActiveElements(t,n,i,o),a=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}(t,this._lastEvent,i,a);i&&(this._lastEvent=null,Qi(r.onHover,[t,s,this],this),a&&Qi(r.onClick,[t,s,this],this));const c=!tn(s,n);return(c||e)&&(this._active=s,this._updateHoverStyles(s,n,e)),this._lastEvent=l,c}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,n)}}const fl=()=>Zi(dl.instances,t=>t._plugins.invalidate()),pl=!0;function gl(t,e,i){const{startAngle:n,pixelMargin:r,x:o,y:s,outerRadius:a,innerRadius:l}=e;let c=r/a;t.beginPath(),t.arc(o,s,a,n-c,i+c),l>r?(c=r/l,t.arc(o,s,l,i+c,n-c,!0)):t.arc(o,s,r,i+yn,n-yn),t.closePath(),t.clip()}function ml(t,e,i,n){const r=so(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]);const o=(i-e)/2,s=Math.min(o,n*e/2),a=t=>{const e=(i-Math.min(o,t))*n/2;return Rn(t,0,Math.min(o,e))};return{outerStart:a(r.outerStart),outerEnd:a(r.outerEnd),innerStart:Rn(r.innerStart,0,s),innerEnd:Rn(r.innerEnd,0,s)}}function bl(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function vl(t,e,i,n,r,o){const{x:s,y:a,startAngle:l,pixelMargin:c,innerRadius:h}=e,u=Math.max(e.outerRadius+n+i-c,0),d=h>0?h+n+i+c:0;let f=0;const p=r-l;if(n){const t=((h>0?h-n:0)+(u>0?u-n:0))/2;f=(p-(0!==t?p*t/(t+n):p))/2}const g=(p-Math.max(.001,p*u-i/pn)/u)/2,m=l+g+f,b=r-g-f,{outerStart:v,outerEnd:y,innerStart:x,innerEnd:_}=ml(e,d,u,b-m),w=u-v,k=u-y,O=m+v/w,S=b-y/k,M=d+x,E=d+_,P=m+x/M,T=b-_/E;if(t.beginPath(),o){if(t.arc(s,a,u,O,S),y>0){const e=bl(k,S,s,a);t.arc(e.x,e.y,y,S,b+yn)}const e=bl(E,b,s,a);if(t.lineTo(e.x,e.y),_>0){const e=bl(E,T,s,a);t.arc(e.x,e.y,_,b+yn,T+Math.PI)}if(t.arc(s,a,d,b-_/d,m+x/d,!0),x>0){const e=bl(M,P,s,a);t.arc(e.x,e.y,x,P+Math.PI,m-yn)}const i=bl(w,m,s,a);if(t.lineTo(i.x,i.y),v>0){const e=bl(w,O,s,a);t.arc(e.x,e.y,v,m-yn,O)}}else{t.moveTo(s,a);const e=Math.cos(O)*u+s,i=Math.sin(O)*u+a;t.lineTo(e,i);const n=Math.cos(S)*u+s,r=Math.sin(S)*u+a;t.lineTo(n,r)}t.closePath()}function yl(t,e,i,n,r,o){const{options:s}=e,{borderWidth:a,borderJoinStyle:l}=s,c="inner"===s.borderAlign;a&&(c?(t.lineWidth=2*a,t.lineJoin=l||"round"):(t.lineWidth=a,t.lineJoin=l||"bevel"),e.fullCircles&&function(t,e,i){const{x:n,y:r,startAngle:o,pixelMargin:s,fullCircles:a}=e,l=Math.max(e.outerRadius-s,0),c=e.innerRadius+s;let h;for(i&&gl(t,e,o+gn),t.beginPath(),t.arc(n,r,c,o+gn,o,!0),h=0;h<a;++h)t.stroke();for(t.beginPath(),t.arc(n,r,l,o,o+gn),h=0;h<a;++h)t.stroke()}(t,e,c),c&&gl(t,e,r),vl(t,e,i,n,r,o),t.stroke())}Object.defineProperties(dl,{defaults:{enumerable:pl,value:Wr},instances:{enumerable:pl,value:cl},overrides:{enumerable:pl,value:Fr},registry:{enumerable:pl,value:ta},version:{enumerable:pl,value:"3.9.1"},getChart:{enumerable:pl,value:hl},register:{enumerable:pl,value:(...t)=>{ta.add(...t),fl()}},unregister:{enumerable:pl,value:(...t)=>{ta.remove(...t),fl()}}});class xl extends Ws{constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:r,distance:o}=Cn(n,{x:t,y:e}),{startAngle:s,endAngle:a,innerRadius:l,outerRadius:c,circumference:h}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=this.options.spacing/2,d=Ki(h,a-s)>=gn||In(r,s,a),f=Fn(o,l+u,c+u);return d&&f}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:r,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],t),{offset:a,spacing:l}=this.options,c=(n+r)/2,h=(o+s+l+a)/2;return{x:e+Math.cos(c)*h,y:i+Math.sin(c)*h}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/2,r=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>gn?Math.floor(i/gn):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();let s=0;if(n){s=n/2;const e=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(e)*s,Math.sin(e)*s),this.circumference>=pn&&(s=n)}t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor;const a=function(t,e,i,n,r){const{fullCircles:o,startAngle:s,circumference:a}=e;let l=e.endAngle;if(o){vl(t,e,i,n,s+gn,r);for(let e=0;e<o;++e)t.fill();isNaN(a)||(l=s+a%gn,a%gn===0&&(l+=gn))}return vl(t,e,i,n,l,r),t.fill(),l}(t,this,s,r,o);yl(t,this,s,r,a,o),t.restore()}}function _l(t,e,i=e){t.lineCap=Ki(i.borderCapStyle,e.borderCapStyle),t.setLineDash(Ki(i.borderDash,e.borderDash)),t.lineDashOffset=Ki(i.borderDashOffset,e.borderDashOffset),t.lineJoin=Ki(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Ki(i.borderWidth,e.borderWidth),t.strokeStyle=Ki(i.borderColor,e.borderColor)}function wl(t,e,i){t.lineTo(i.x,i.y)}function kl(t,e,i={}){const n=t.length,{start:r=0,end:o=n-1}=i,{start:s,end:a}=e,l=Math.max(r,s),c=Math.min(o,a),h=r<s&&o<s||r>a&&o>a;return{count:n,start:l,loop:e.loop,ilen:c<l&&!h?n+c-l:c-l}}function Ol(t,e,i,n){const{points:r,options:o}=e,{count:s,start:a,loop:l,ilen:c}=kl(r,i,n),h=function(t){return t.stepped?Jr:t.tension||"monotone"===t.cubicInterpolationMode?Qr:wl}(o);let u,d,f,{move:p=!0,reverse:g}=n||{};for(u=0;u<=c;++u)d=r[(a+(g?c-u:u))%s],d.skip||(p?(t.moveTo(d.x,d.y),p=!1):h(t,f,d,g,o.stepped),f=d);return l&&(d=r[(a+(g?c:0))%s],h(t,f,d,g,o.stepped)),!!l}function Sl(t,e,i,n){const r=e.points,{count:o,start:s,ilen:a}=kl(r,i,n),{move:l=!0,reverse:c}=n||{};let h,u,d,f,p,g,m=0,b=0;const v=t=>(s+(c?a-t:t))%o,y=()=>{f!==p&&(t.lineTo(m,p),t.lineTo(m,f),t.lineTo(m,g))};for(l&&(u=r[v(0)],t.moveTo(u.x,u.y)),h=0;h<=a;++h){if(u=r[v(h)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(i<f?f=i:i>p&&(p=i),m=(b*m+e)/++b):(y(),t.lineTo(e,i),d=n,b=0,f=p=i),g=i}y()}function Ml(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return!(t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i)?Sl:Ol}xl.id="arc",xl.defaults={borderAlign:"center",borderColor:"#fff",borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0},xl.defaultRoutes={backgroundColor:"backgroundColor"};const El="function"==typeof Path2D;function Pl(t,e,i,n){El&&!e.options.segment?function(t,e,i,n){let r=e._path;r||(r=e._path=new Path2D,e.path(r,i,n)&&r.closePath()),_l(t,e.options),t.stroke(r)}(t,e,i,n):function(t,e,i,n){const{segments:r,options:o}=e,s=Ml(e);for(const a of r)_l(t,o,a.style),t.beginPath(),s(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}class Tl extends Ws{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;jo(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,r=i.length;if(!r)return[];const o=!!t._loop,{start:s,end:a}=function(t,e,i,n){let r=0,o=e-1;if(i&&!n)for(;r<e&&!t[r].skip;)r++;for(;r<e&&t[r].skip;)r++;for(r%=e,i&&(o+=r);o>r&&t[o%e].skip;)o--;return o%=e,{start:r,end:o}}(i,r,o,n);return os(t,!0===n?[{start:s,end:a,loop:o}]:function(t,e,i,n){const r=t.length,o=[];let s,a=e,l=t[e];for(s=e+1;s<=i;++s){const i=t[s%r];i.skip||i.stop?l.skip||(n=!1,o.push({start:e%r,end:(s-1)%r,loop:n}),e=a=i.stop?s:null):(a=s,l.skip&&(e=s)),l=i}return null!==a&&o.push({start:e%r,end:a%r,loop:n}),o}(i,s,a<s?a+r:a,!!t._fullLoop&&0===s&&a===r-1),i,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,n=t[e],r=this.points,o=rs(this,{property:e,start:n,end:n});if(!o.length)return;const s=[],a=function(t){return t.stepped?Xo:t.tension||"monotone"===t.cubicInterpolationMode?Go:Yo}(i);let l,c;for(l=0,c=o.length;l<c;++l){const{start:c,end:h}=o[l],u=r[c],d=r[h];if(u===d){s.push(u);continue}const f=a(u,d,Math.abs((n-u[e])/(d[e]-u[e])),i.stepped);f[e]=t[e],s.push(f)}return 1===s.length?s[0]:s}pathSegment(t,e,i){return Ml(this)(t,this,e,i)}path(t,e,i){const n=this.segments,r=Ml(this);let o=this._loop;e=e||0,i=i||this.points.length-e;for(const s of n)o&=r(t,this,s,{start:e,end:e+i-1});return!!o}draw(t,e,i,n){const r=this.options||{};(this.points||[]).length&&r.borderWidth&&(t.save(),Pl(t,this,i,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Al(t,e,i,n){const r=t.options,{[i]:o}=t.getProps([i],n);return Math.abs(e-o)<r.radius+r.hitRadius}Tl.id="line",Tl.defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0},Tl.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"},Tl.descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};class Cl extends Ws{constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:r,y:o}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-o,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return Al(this,t,"x",e)}inYRange(t,e){return Al(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;e=Math.max(e,e&&t.hoverRadius||0);return 2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this.options;this.skip||i.radius<.1||!Xr(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,qr(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function Ll(t,e){const{x:i,y:n,base:r,width:o,height:s}=t.getProps(["x","y","base","width","height"],e);let a,l,c,h,u;return t.horizontal?(u=s/2,a=Math.min(i,r),l=Math.max(i,r),c=n-u,h=n+u):(u=o/2,a=i-u,l=i+u,c=Math.min(n,r),h=Math.max(n,r)),{left:a,top:c,right:l,bottom:h}}function Dl(t,e,i,n){return t?0:Rn(e,i,n)}function jl(t){const e=Ll(t),i=e.right-e.left,n=e.bottom-e.top,r=function(t,e,i){const n=t.options.borderWidth,r=t.borderSkipped,o=ao(n);return{t:Dl(r.top,o.top,0,i),r:Dl(r.right,o.right,0,e),b:Dl(r.bottom,o.bottom,0,i),l:Dl(r.left,o.left,0,e)}}(t,i/2,n/2),o=function(t,e,i){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),r=t.options.borderRadius,o=lo(r),s=Math.min(e,i),a=t.borderSkipped,l=n||Yi(r);return{topLeft:Dl(!l||a.top||a.left,o.topLeft,0,s),topRight:Dl(!l||a.top||a.right,o.topRight,0,s),bottomLeft:Dl(!l||a.bottom||a.left,o.bottomLeft,0,s),bottomRight:Dl(!l||a.bottom||a.right,o.bottomRight,0,s)}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n,radius:o},inner:{x:e.left+r.l,y:e.top+r.t,w:i-r.l-r.r,h:n-r.t-r.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,o.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(r.b,r.r))}}}}function Il(t,e,i,n){const r=null===e,o=null===i,s=t&&!(r&&o)&&Ll(t,n);return s&&(r||Fn(e,s.left,s.right))&&(o||Fn(i,s.top,s.bottom))}function Rl(t,e){t.rect(e.x,e.y,e.w,e.h)}function Fl(t,e,i={}){const n=t.x!==i.x?-e:0,r=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,s=(t.y+t.h!==i.y+i.h?e:0)-r;return{x:t.x+n,y:t.y+r,w:t.w+o,h:t.h+s,radius:t.radius}}Cl.id="point",Cl.defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0},Cl.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};class zl extends Ws{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:o}=jl(this),s=(a=o.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?eo:Rl;var a;t.save(),o.w===r.w&&o.h===r.h||(t.beginPath(),s(t,Fl(o,e,r)),t.clip(),s(t,Fl(r,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),s(t,Fl(r,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return Il(this,t,e,i)}inXRange(t,e){return Il(this,t,null,e)}inYRange(t,e){return Il(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+n)/2:e,y:r?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}}zl.id="bar",zl.defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0},zl.defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};var Nl=Object.freeze({__proto__:null,ArcElement:xl,LineElement:Tl,PointElement:Cl,BarElement:zl});function Bl(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{value:e})}}function Wl(t){t.data.datasets.forEach(t=>{Bl(t)})}var Vl={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void Wl(t);const n=t.width;t.data.datasets.forEach((e,r)=>{const{_data:o,indexAxis:s}=e,a=t.getDatasetMeta(r),l=o||e.data;if("y"===uo([s,t.options.indexAxis]))return;if(!a.controller.supportsDecimation)return;const c=t.scales[a.xAxisID];if("linear"!==c.type&&"time"!==c.type)return;if(t.options.parsing)return;let{start:h,count:u}=function(t,e){const i=e.length;let n,r=0;const{iScale:o}=t,{min:s,max:a,minDefined:l,maxDefined:c}=o.getUserBounds();return l&&(r=Rn(Nn(e,o.axis,s).lo,0,i-1)),n=c?Rn(Nn(e,o.axis,a).hi+1,r,i)-r:i-r,{start:r,count:n}}(a,l);if(u<=(i.threshold||4*n))return void Bl(e);let d;switch(Ui(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":d=function(t,e,i,n,r){const o=r.samples||n;if(o>=i)return t.slice(e,e+i);const s=[],a=(i-2)/(o-2);let l=0;const c=e+i-1;let h,u,d,f,p,g=e;for(s[l++]=t[g],h=0;h<o-2;h++){let n,r=0,o=0;const c=Math.floor((h+1)*a)+1+e,m=Math.min(Math.floor((h+2)*a)+1,i)+e,b=m-c;for(n=c;n<m;n++)r+=t[n].x,o+=t[n].y;r/=b,o/=b;const v=Math.floor(h*a)+1+e,y=Math.min(Math.floor((h+1)*a)+1,i)+e,{x:x,y:_}=t[g];for(d=f=-1,n=v;n<y;n++)f=.5*Math.abs((x-r)*(t[n].y-_)-(x-t[n].x)*(o-_)),f>d&&(d=f,u=t[n],p=n);s[l++]=u,g=p}return s[l++]=t[c],s}(l,h,u,n,i);break;case"min-max":d=function(t,e,i,n){let r,o,s,a,l,c,h,u,d,f,p=0,g=0;const m=[],b=e+i-1,v=t[e].x,y=t[b].x-v;for(r=e;r<e+i;++r){o=t[r],s=(o.x-v)/y*n,a=o.y;const e=0|s;if(e===l)a<d?(d=a,c=r):a>f&&(f=a,h=r),p=(g*p+o.x)/++g;else{const i=r-1;if(!Ui(c)&&!Ui(h)){const e=Math.min(c,h),n=Math.max(c,h);e!==u&&e!==i&&m.push({...t[e],x:p}),n!==u&&n!==i&&m.push({...t[n],x:p})}r>0&&i!==u&&m.push(t[i]),m.push(o),l=e,g=0,d=f=a,c=h=u=r}}return m}(l,h,u,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=d})},destroy(t){Wl(t)}};function Hl(t,e,i,n){if(n)return;let r=e[t],o=i[t];return"angle"===t&&(r=jn(r),o=jn(o)),{property:t,start:r,end:o}}function $l(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function Ul(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function ql(t,e){let i=[],n=!1;return qi(t)?(n=!0,i=t):i=function(t,e){const{x:i=null,y:n=null}=t||{},r=e.points,o=[];return e.segments.forEach(({start:t,end:e})=>{e=$l(t,e,r);const s=r[t],a=r[e];null!==n?(o.push({x:s.x,y:n}),o.push({x:a.x,y:n})):null!==i&&(o.push({x:i,y:s.y}),o.push({x:i,y:a.y}))}),o}(t,e),i.length?new Tl({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function Yl(t){return t&&!1!==t.fill}function Xl(t,e,i){let n=t[e].fill;const r=[e];let o;if(!i)return n;for(;!1!==n&&-1===r.indexOf(n);){if(!Xi(n))return n;if(o=t[n],!o)return!1;if(o.visible)return n;r.push(n),n=o.fill}return!1}function Gl(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=Ki(i&&i.target,i);void 0===n&&(n=!!e.backgroundColor);if(!1===n||null===n)return!1;if(!0===n)return"origin";return n}(t);if(Yi(n))return!isNaN(n.value)&&n;let r=parseFloat(n);return Xi(r)&&Math.floor(r)===r?function(t,e,i,n){"-"!==t&&"+"!==t||(i=e+i);if(i===e||i<0||i>=n)return!1;return i}(n[0],e,r,i):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function Kl(t,e,i){const n=[];for(let r=0;r<i.length;r++){const o=i[r],{first:s,last:a,point:l}=Jl(o,e,"x");if(!(!l||s&&a))if(s)n.unshift(l);else if(t.push(l),!a)break}t.push(...n)}function Jl(t,e,i){const n=t.interpolate(e,i);if(!n)return{};const r=n[i],o=t.segments,s=t.points;let a=!1,l=!1;for(let t=0;t<o.length;t++){const e=o[t],n=s[e.start][i],c=s[e.end][i];if(Fn(r,n,c)){a=r===n,l=r===c;break}}return{first:a,last:l,point:n}}class Ql{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:r,radius:o}=this;return e=e||{start:0,end:gn},t.arc(n,r,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,r=t.angle;return{x:e+Math.cos(r)*n,y:i+Math.sin(r)*n,angle:r}}}function Zl(t){const{chart:e,fill:i,line:n}=t;if(Xi(i))return function(t,e){const i=t.getDatasetMeta(e),n=i&&t.isDatasetVisible(e);return n?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,r=[],o=n.segments,s=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t<n.length;t++){const r=n[t];if(r.index===e)break;r.hidden||i.unshift(r.dataset)}return i}(e,i);a.push(ql({x:null,y:e.bottom},n));for(let t=0;t<o.length;t++){const e=o[t];for(let t=e.start;t<=e.end;t++)Kl(r,s[t],a)}return new Tl({points:r,options:{}})}(t);if("shape"===i)return!0;const r=function(t){const e=t.scale||{};if(e.getPointPositionForValue)return function(t){const{scale:e,fill:i}=t,n=e.options,r=e.getLabels().length,o=n.reverse?e.max:e.min,s=function(t,e,i){let n;return n="start"===t?i:"end"===t?e.options.reverse?e.min:e.max:Yi(t)?t.value:e.getBaseValue(),n}(i,e,o),a=[];if(n.grid.circular){const t=e.getPointPositionForValue(0,o);return new Ql({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(s)})}for(let t=0;t<r;++t)a.push(e.getPointPositionForValue(t,s));return a}(t);return function(t){const{scale:e={},fill:i}=t,n=function(t,e){let i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:Yi(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}(i,e);if(Xi(n)){const t=e.isHorizontal();return{x:t?n:null,y:t?null:n}}return null}(t)}(t);return r instanceof Ql?r:ql(r,n)}function tc(t,e,i){const n=Zl(e),{line:r,scale:o,axis:s}=e,a=r.options,l=a.fill,c=a.backgroundColor,{above:h=c,below:u=c}=l||{};n&&r.points.length&&(Gr(t,i),function(t,e){const{line:i,target:n,above:r,below:o,area:s,scale:a}=e,l=i._loop?"angle":e.axis;t.save(),"x"===l&&o!==r&&(ec(t,n,s.top),ic(t,{line:i,target:n,color:r,scale:a,property:l}),t.restore(),t.save(),ec(t,n,s.bottom));ic(t,{line:i,target:n,color:o,scale:a,property:l}),t.restore()}(t,{line:r,target:n,above:h,below:u,area:i,scale:o,axis:s}),Kr(t))}function ec(t,e,i){const{segments:n,points:r}=e;let o=!0,s=!1;t.beginPath();for(const a of n){const{start:n,end:l}=a,c=r[n],h=r[$l(n,l,r)];o?(t.moveTo(c.x,c.y),o=!1):(t.lineTo(c.x,i),t.lineTo(c.x,c.y)),s=!!e.pathSegment(t,a,{move:s}),s?t.closePath():t.lineTo(h.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function ic(t,e){const{line:i,target:n,property:r,color:o,scale:s}=e,a=function(t,e,i){const n=t.segments,r=t.points,o=e.points,s=[];for(const t of n){let{start:n,end:a}=t;a=$l(n,a,r);const l=Hl(i,r[n],r[a],t.loop);if(!e.segments){s.push({source:t,target:l,start:r[n],end:r[a]});continue}const c=rs(e,l);for(const e of c){const n=Hl(i,o[e.start],o[e.end],e.loop),a=ns(t,r,n);for(const t of a)s.push({source:t,target:e,start:{[i]:Ul(l,n,"start",Math.max)},end:{[i]:Ul(l,n,"end",Math.min)}})}}return s}(i,n,r);for(const{source:e,target:l,start:c,end:h}of a){const{style:{backgroundColor:a=o}={}}=e,u=!0!==n;t.save(),t.fillStyle=a,nc(t,s,u&&Hl(r,c,h)),t.beginPath();const d=!!i.pathSegment(t,e);let f;if(u){d?t.closePath():rc(t,n,h,r);const e=!!n.pathSegment(t,l,{move:d,reverse:!0});f=d&&e,f||rc(t,n,c,r)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function nc(t,e,i){const{top:n,bottom:r}=e.chart.chartArea,{property:o,start:s,end:a}=i||{};"x"===o&&(t.beginPath(),t.rect(s,n,a-s,r-n),t.clip())}function rc(t,e,i,n){const r=e.interpolate(i,n);r&&t.lineTo(r.x,r.y)}var oc={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,r=[];let o,s,a,l;for(s=0;s<n;++s)o=t.getDatasetMeta(s),a=o.dataset,l=null,a&&a.options&&a instanceof Tl&&(l={visible:t.isDatasetVisible(s),index:s,fill:Gl(a,s,n),chart:t,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}),o.$filler=l,r.push(l);for(s=0;s<n;++s)l=r[s],l&&!1!==l.fill&&(l.fill=Xl(r,s,i.propagate))},beforeDraw(t,e,i){const n="beforeDraw"===i.drawTime,r=t.getSortedVisibleDatasetMetas(),o=t.chartArea;for(let e=r.length-1;e>=0;--e){const i=r[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),n&&i.fill&&tc(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;Yl(i)&&tc(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;Yl(n)&&"beforeDatasetDraw"===i.drawTime&&tc(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const sc=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class ac extends Ws{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=Qi(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(e=>t.filter(e,this.chart.data))),t.sort&&(e=e.sort((e,i)=>t.sort(e,i,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=ho(i.font),r=n.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:a}=sc(i,r);let l,c;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,c=this._fitRows(o,r,s,a)+10):(c=this.maxHeight,l=this._fitCols(o,r,s,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(c,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:r,maxWidth:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],c=n+s;let h=t;r.textAlign="left",r.textBaseline="middle";let u=-1,d=-c;return this.legendItems.forEach((t,f)=>{const p=i+e/2+r.measureText(t.text).width;(0===f||l[l.length-1]+p+2*s>o)&&(h+=c,l[l.length-(f>0?0:1)]=0,d+=c,u++),a[f]={left:0,top:d,row:u,width:p,height:n},l[l.length-1]+=p+s}),h}_fitCols(t,e,i,n){const{ctx:r,maxHeight:o,options:{labels:{padding:s}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],c=o-t;let h=s,u=0,d=0,f=0,p=0;return this.legendItems.forEach((t,o)=>{const g=i+e/2+r.measureText(t.text).width;o>0&&d+n+2*s>c&&(h+=u+s,l.push({width:u,height:d}),f+=u+s,p++,u=d=0),a[o]={left:f,top:d,col:p,width:g,height:n},u=Math.max(u,g),d+=n+s}),h+=u,l.push({width:u,height:d}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:r}}=this,o=Qo(r,this.left,this.width);if(this.isHorizontal()){let r=0,s=Yn(i,this.left+n,this.right-this.lineWidths[r]);for(const a of e)r!==a.row&&(r=a.row,s=Yn(i,this.left+n,this.right-this.lineWidths[r])),a.top+=this.top+t+n,a.left=o.leftForLtr(o.x(s),a.width),s+=a.width+n}else{let r=0,s=Yn(i,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const a of e)a.col!==r&&(r=a.col,s=Yn(i,this.top+t+n,this.bottom-this.columnSizes[r].height)),a.top=s,a.left+=this.left+n,a.left=o.leftForLtr(o.x(a.left),a.width),s+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;Gr(t,this),this._draw(),Kr(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:r,labels:o}=t,s=Wr.color,a=Qo(t.rtl,this.left,this.width),l=ho(o.font),{color:c,padding:h}=o,u=l.size,d=u/2;let f;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:p,boxHeight:g,itemHeight:m}=sc(o,u),b=this.isHorizontal(),v=this._computeTitleHeight();f=b?{x:Yn(r,this.left+h,this.right-i[0]),y:this.top+h+v,line:0}:{x:this.left+h,y:Yn(r,this.top+v+h,this.bottom-e[0].height),line:0},Zo(this.ctx,t.textDirection);const y=m+h;this.legendItems.forEach((x,_)=>{n.strokeStyle=x.fontColor||c,n.fillStyle=x.fontColor||c;const w=n.measureText(x.text).width,k=a.textAlign(x.textAlign||(x.textAlign=o.textAlign)),O=p+d+w;let S=f.x,M=f.y;a.setWidth(this.width),b?_>0&&S+O+h>this.right&&(M=f.y+=y,f.line++,S=f.x=Yn(r,this.left+h,this.right-i[f.line])):_>0&&M+y>this.bottom&&(S=f.x=S+e[f.line].width+h,f.line++,M=f.y=Yn(r,this.top+v+h,this.bottom-e[f.line].height));!function(t,e,i){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;n.save();const r=Ki(i.lineWidth,1);if(n.fillStyle=Ki(i.fillStyle,s),n.lineCap=Ki(i.lineCap,"butt"),n.lineDashOffset=Ki(i.lineDashOffset,0),n.lineJoin=Ki(i.lineJoin,"miter"),n.lineWidth=r,n.strokeStyle=Ki(i.strokeStyle,s),n.setLineDash(Ki(i.lineDash,[])),o.usePointStyle){const s={radius:g*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:r},l=a.xPlus(t,p/2);Yr(n,s,l,e+d,o.pointStyleWidth&&p)}else{const o=e+Math.max((u-g)/2,0),s=a.leftForLtr(t,p),l=lo(i.borderRadius);n.beginPath(),Object.values(l).some(t=>0!==t)?eo(n,{x:s,y:o,w:p,h:g,radius:l}):n.rect(s,o,p,g),n.fill(),0!==r&&n.stroke()}n.restore()}(a.x(S),M,x),S=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(k,S+p+d,b?S+O:this.right,t.rtl),function(t,e,i){Zr(n,i.text,t,e+m/2,l,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(S),M,x),b?f.x+=O+h:f.y+=y}),ts(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=ho(e.font),n=co(e.padding);if(!e.display)return;const r=Qo(t.rtl,this.left,this.width),o=this.ctx,s=e.position,a=i.size/2,l=n.top+a;let c,h=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),c=this.top+l,h=Yn(t.align,h,this.right-u);else{const e=this.columnSizes.reduce((t,e)=>Math.max(t,e.height),0);c=l+Yn(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=Yn(s,h,h+u);o.textAlign=r.textAlign(qn(s)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,Zr(o,e.text,d,c,i)}_computeTitleHeight(){const t=this.options.title,e=ho(t.font),i=co(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,r;if(Fn(t,this.left,this.right)&&Fn(e,this.top,this.bottom))for(r=this.legendHitBoxes,i=0;i<r.length;++i)if(n=r[i],Fn(t,n.left,n.left+n.width)&&Fn(e,n.top,n.top+n.height))return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){if(("mousemove"===t||"mouseout"===t)&&(e.onHover||e.onLeave))return!0;if(e.onClick&&("click"===t||"mouseup"===t))return!0;return!1}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const o=this._hoveredItem,s=(r=i,null!==(n=o)&&null!==r&&n.datasetIndex===r.datasetIndex&&n.index===r.index);o&&!s&&Qi(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!s&&Qi(e.onHover,[t,i,this],this)}else i&&Qi(e.onClick,[t,i,this],this);var n,r}}var lc={id:"legend",_element:ac,start(t,e,i){const n=t.legend=new ac({ctx:t.ctx,options:i,chart:t});Sa.configure(t,n,i),Sa.addBox(t,n)},stop(t){Sa.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;Sa.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:r,color:o}}=t.legend.options;return t._getSortedDatasetMetas().map(t=>{const s=t.controller.getStyle(i?0:void 0),a=co(s.borderWidth);return{text:e[t.index].label,fillStyle:s.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:s.borderCapStyle,lineDash:s.borderDash,lineDashOffset:s.borderDashOffset,lineJoin:s.borderJoinStyle,lineWidth:(a.width+a.height)/4,strokeStyle:s.borderColor,pointStyle:n||s.pointStyle,rotation:s.rotation,textAlign:r||s.textAlign,borderRadius:0,datasetIndex:t.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class cc extends Ws{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=qi(i.text)?i.text.length:1;this._padding=co(i.padding);const r=n*ho(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=r:this.width=r}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:r,options:o}=this,s=o.align;let a,l,c,h=0;return this.isHorizontal()?(l=Yn(s,i,r),c=e+t,a=r-i):("left"===o.position?(l=i+t,c=Yn(s,n,e),h=-.5*pn):(l=r-t,c=Yn(s,e,n),h=.5*pn),a=n-e),{titleX:l,titleY:c,maxWidth:a,rotation:h}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=ho(e.font),n=i.lineHeight/2+this._padding.top,{titleX:r,titleY:o,maxWidth:s,rotation:a}=this._drawArgs(n);Zr(t,e.text,0,0,i,{color:e.color,maxWidth:s,rotation:a,textAlign:qn(e.align),textBaseline:"middle",translation:[r,o]})}}var hc={id:"title",_element:cc,start(t,e,i){!function(t,e){const i=new cc({ctx:t.ctx,options:e,chart:t});Sa.configure(t,i,e),Sa.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;Sa.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;Sa.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const uc=new WeakMap;var dc={id:"subtitle",start(t,e,i){const n=new cc({ctx:t.ctx,options:i,chart:t});Sa.configure(t,n,i),Sa.addBox(t,n),uc.set(t,n)},stop(t){Sa.removeBox(t,uc.get(t)),uc.delete(t)},beforeUpdate(t,e,i){const n=uc.get(t);Sa.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const fc={average(t){if(!t.length)return!1;let e,i,n=0,r=0,o=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();n+=t.x,r+=t.y,++o}}return{x:n/o,y:r/o}},nearest(t,e){if(!t.length)return!1;let i,n,r,o=e.x,s=e.y,a=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){const n=t[i].element;if(n&&n.hasValue()){const t=Ln(e,n.getCenterPoint());t<a&&(a=t,r=n)}}if(r){const t=r.tooltipPosition();o=t.x,s=t.y}return{x:o,y:s}}};function pc(t,e){return e&&(qi(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function gc(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function mc(t,e){const{element:i,datasetIndex:n,index:r}=e,o=t.getDatasetMeta(n).controller,{label:s,value:a}=o.getLabelAndValue(r);return{chart:t,label:s,parsed:o.getParsed(r),raw:t.data.datasets[n].data[r],formattedValue:a,dataset:o.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function bc(t,e){const i=t.chart.ctx,{body:n,footer:r,title:o}=t,{boxWidth:s,boxHeight:a}=e,l=ho(e.bodyFont),c=ho(e.titleFont),h=ho(e.footerFont),u=o.length,d=r.length,f=n.length,p=co(e.padding);let g=p.height,m=0,b=n.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);if(b+=t.beforeBody.length+t.afterBody.length,u&&(g+=u*c.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),b){g+=f*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(b-f)*l.lineHeight+(b-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*h.lineHeight+(d-1)*e.footerSpacing);let v=0;const y=function(t){m=Math.max(m,i.measureText(t).width+v)};return i.save(),i.font=c.string,Zi(t.title,y),i.font=l.string,Zi(t.beforeBody.concat(t.afterBody),y),v=e.displayColors?s+2+e.boxPadding:0,Zi(n,t=>{Zi(t.before,y),Zi(t.lines,y),Zi(t.after,y)}),v=0,i.font=h.string,Zi(t.footer,y),i.restore(),m+=p.width,{width:m,height:g}}function vc(t,e,i,n){const{x:r,width:o}=i,{width:s,chartArea:{left:a,right:l}}=t;let c="center";return"center"===n?c=r<=(a+l)/2?"left":"right":r<=o/2?c="left":r>=s-o/2&&(c="right"),function(t,e,i,n){const{x:r,width:o}=n,s=i.caretSize+i.caretPadding;return"left"===t&&r+o+s>e.width||"right"===t&&r-o-s<0||void 0}(c,t,e,i)&&(c="center"),c}function yc(t,e,i){const n=i.yAlign||e.yAlign||function(t,e){const{y:i,height:n}=e;return i<n/2?"top":i>t.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||vc(t,e,i,n),yAlign:n}}function xc(t,e,i,n){const{caretSize:r,caretPadding:o,cornerRadius:s}=t,{xAlign:a,yAlign:l}=i,c=r+o,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:f}=lo(s);let p=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const g=function(t,e,i){let{y:n,height:r}=t;return"top"===e?n+=i:n-="bottom"===e?r+i:r/2,n}(e,l,c);return"center"===l?"left"===a?p+=c:"right"===a&&(p-=c):"left"===a?p-=Math.max(h,d)+r:"right"===a&&(p+=Math.max(u,f)+r),{x:Rn(p,0,n.width-e.width),y:Rn(g,0,n.height-e.height)}}function _c(t,e,i){const n=co(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function wc(t){return pc([],gc(t))}function kc(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}class Oc extends Ws{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart||t._chart,this._chart=this.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,r=new fs(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=(t=this.chart.getContext(),e=this,i=this._tooltipItems,fo(t,{tooltip:e,tooltipItems:i,type:"tooltip"})));var t,e,i}getTitle(t,e){const{callbacks:i}=e,n=i.beforeTitle.apply(this,[t]),r=i.title.apply(this,[t]),o=i.afterTitle.apply(this,[t]);let s=[];return s=pc(s,gc(n)),s=pc(s,gc(r)),s=pc(s,gc(o)),s}getBeforeBody(t,e){return wc(e.callbacks.beforeBody.apply(this,[t]))}getBody(t,e){const{callbacks:i}=e,n=[];return Zi(t,t=>{const e={before:[],lines:[],after:[]},r=kc(i,t);pc(e.before,gc(r.beforeLabel.call(this,t))),pc(e.lines,r.label.call(this,t)),pc(e.after,gc(r.afterLabel.call(this,t))),n.push(e)}),n}getAfterBody(t,e){return wc(e.callbacks.afterBody.apply(this,[t]))}getFooter(t,e){const{callbacks:i}=e,n=i.beforeFooter.apply(this,[t]),r=i.footer.apply(this,[t]),o=i.afterFooter.apply(this,[t]);let s=[];return s=pc(s,gc(n)),s=pc(s,gc(r)),s=pc(s,gc(o)),s}_createItems(t){const e=this._active,i=this.chart.data,n=[],r=[],o=[];let s,a,l=[];for(s=0,a=e.length;s<a;++s)l.push(mc(this.chart,e[s]));return t.filter&&(l=l.filter((e,n,r)=>t.filter(e,n,r,i))),t.itemSort&&(l=l.sort((e,n)=>t.itemSort(e,n,i))),Zi(l,e=>{const i=kc(t.callbacks,e);n.push(i.labelColor.call(this,e)),r.push(i.labelPointStyle.call(this,e)),o.push(i.labelTextColor.call(this,e))}),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let r,o=[];if(n.length){const t=fc[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=bc(this,i),s=Object.assign({},t,e),a=yc(this.chart,i,s),l=xc(i,s,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=o,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const r=this.getCaretPosition(t,i,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:r}=this,{caretSize:o,cornerRadius:s}=i,{topLeft:a,topRight:l,bottomLeft:c,bottomRight:h}=lo(s),{x:u,y:d}=t,{width:f,height:p}=e;let g,m,b,v,y,x;return"center"===r?(y=d+p/2,"left"===n?(g=u,m=g-o,v=y+o,x=y-o):(g=u+f,m=g+o,v=y-o,x=y+o),b=g):(m="left"===n?u+Math.max(a,c)+o:"right"===n?u+f-Math.max(l,h)-o:this.caretX,"top"===r?(v=d,y=v-o,g=m-o,b=m+o):(v=d+p,y=v+o,g=m+o,b=m-o),x=v),{x1:g,x2:m,x3:b,y1:v,y2:y,y3:x}}drawTitle(t,e,i){const n=this.title,r=n.length;let o,s,a;if(r){const l=Qo(i.rtl,this.x,this.width);for(t.x=_c(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=ho(i.titleFont),s=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,a=0;a<r;++a)e.fillText(n[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+s,a+1===r&&(t.y+=i.titleMarginBottom-s)}}_drawColorBox(t,e,i,n,r){const o=this.labelColors[i],s=this.labelPointStyles[i],{boxHeight:a,boxWidth:l,boxPadding:c}=r,h=ho(r.bodyFont),u=_c(this,"left",r),d=n.x(u),f=a<h.lineHeight?(h.lineHeight-a)/2:0,p=e.y+f;if(r.usePointStyle){const e={radius:Math.min(l,a)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},i=n.leftForLtr(d,l)+l/2,c=p+a/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,qr(t,e,i,c),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,qr(t,e,i,c)}else{t.lineWidth=Yi(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const e=n.leftForLtr(d,l-c),i=n.leftForLtr(n.xPlus(d,1),l-c-2),s=lo(o.borderRadius);Object.values(s).some(t=>0!==t)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,eo(t,{x:e,y:p,w:l,h:a,radius:s}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),eo(t,{x:i,y:p+1,w:l-2,h:a-2,radius:s}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,p,l,a),t.strokeRect(e,p,l,a),t.fillStyle=o.backgroundColor,t.fillRect(i,p+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:r,bodyAlign:o,displayColors:s,boxHeight:a,boxWidth:l,boxPadding:c}=i,h=ho(i.bodyFont);let u=h.lineHeight,d=0;const f=Qo(i.rtl,this.x,this.width),p=function(i){e.fillText(i,f.x(t.x+d),t.y+u/2),t.y+=u+r},g=f.textAlign(o);let m,b,v,y,x,_,w;for(e.textAlign=o,e.textBaseline="middle",e.font=h.string,t.x=_c(this,g,i),e.fillStyle=i.bodyColor,Zi(this.beforeBody,p),d=s&&"right"!==g?"center"===o?l/2+c:l+2+c:0,y=0,_=n.length;y<_;++y){for(m=n[y],b=this.labelTextColors[y],e.fillStyle=b,Zi(m.before,p),v=m.lines,s&&v.length&&(this._drawColorBox(e,t,y,f,i),u=Math.max(h.lineHeight,a)),x=0,w=v.length;x<w;++x)p(v[x]),u=h.lineHeight;Zi(m.after,p)}d=0,u=h.lineHeight,Zi(this.afterBody,p),t.y-=r}drawFooter(t,e,i){const n=this.footer,r=n.length;let o,s;if(r){const a=Qo(i.rtl,this.x,this.width);for(t.x=_c(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=a.textAlign(i.footerAlign),e.textBaseline="middle",o=ho(i.footerFont),e.fillStyle=i.footerColor,e.font=o.string,s=0;s<r;++s)e.fillText(n[s],a.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:r,yAlign:o}=this,{x:s,y:a}=t,{width:l,height:c}=i,{topLeft:h,topRight:u,bottomLeft:d,bottomRight:f}=lo(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(s+h,a),"top"===o&&this.drawCaret(t,e,i,n),e.lineTo(s+l-u,a),e.quadraticCurveTo(s+l,a,s+l,a+u),"center"===o&&"right"===r&&this.drawCaret(t,e,i,n),e.lineTo(s+l,a+c-f),e.quadraticCurveTo(s+l,a+c,s+l-f,a+c),"bottom"===o&&this.drawCaret(t,e,i,n),e.lineTo(s+d,a+c),e.quadraticCurveTo(s,a+c,s,a+c-d),"center"===o&&"left"===r&&this.drawCaret(t,e,i,n),e.lineTo(s,a+h),e.quadraticCurveTo(s,a,s+h,a),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const i=fc[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=bc(this,t),s=Object.assign({},i,this._size),a=yc(e,t,s),l=xc(t,s,a,e);n._to===l.x&&r._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=co(e.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&s&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,n,e),Zo(t,e.textDirection),r.y+=o.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),ts(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map(({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),r=!tn(i,n),o=this._positionChanged(n,e);(r||o)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,r=this._active||[],o=this._getActiveElements(t,r,e,i),s=this._positionChanged(o,t),a=e||!tn(o,r)||s;return a&&(this._active=o,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),a}_getActiveElements(t,e,i,n){const r=this.options;if("mouseout"===t.type)return[];if(!n)return e;const o=this.chart.getElementsAtEventForMode(t,r.mode,r,i);return r.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:i,caretY:n,options:r}=this,o=fc[r.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}Oc.positioners=fc;var Sc={id:"tooltip",_element:Oc,positioners:fc,afterInit(t,e,i){i&&(t.tooltip=new Oc({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",i))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:{beforeTitle:Hi,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return i[e.dataIndex]}return""},afterTitle:Hi,beforeBody:Hi,beforeLabel:Hi,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return Ui(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:Hi,afterBody:Hi,beforeFooter:Hi,footer:Hi,afterFooter:Hi}},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Mc=Object.freeze({__proto__:null,Decimation:Vl,Filler:oc,Legend:lc,SubTitle:dc,Title:hc,Tooltip:Sc});function Ec(t,e,i,n){const r=t.indexOf(e);if(-1===r)return((t,e,i,n)=>("string"==typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,n);return r!==t.lastIndexOf(e)?i:r}class Pc extends Qs{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:n}of e)t[i]===n&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(Ui(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:Rn(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:Ec(i,t,Ki(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function Tc(t,e){const i=[],{bounds:n,step:r,min:o,max:s,precision:a,count:l,maxTicks:c,maxDigits:h,includeBounds:u}=t,d=r||1,f=c-1,{min:p,max:g}=e,m=!Ui(o),b=!Ui(s),v=!Ui(l),y=(g-p)/(h+1);let x,_,w,k,O=On((g-p)/f/d)*d;if(O<1e-14&&!m&&!b)return[{value:p},{value:g}];k=Math.ceil(g/O)-Math.floor(p/O),k>f&&(O=On(k*O/f/d)*d),Ui(a)||(x=Math.pow(10,a),O=Math.ceil(O*x)/x),"ticks"===n?(_=Math.floor(p/O)*O,w=Math.ceil(g/O)*O):(_=p,w=g),m&&b&&r&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((s-o)/r,O/1e3)?(k=Math.round(Math.min((s-o)/O,c)),O=(s-o)/k,_=o,w=s):v?(_=m?o:_,w=b?s:w,k=l-1,O=(w-_)/k):(k=(w-_)/O,k=Mn(k,Math.round(k),O/1e3)?Math.round(k):Math.ceil(k));const S=Math.max(An(O),An(_));x=Math.pow(10,Ui(a)?S:a),_=Math.round(_*x)/x,w=Math.round(w*x)/x;let M=0;for(m&&(u&&_!==o?(i.push({value:o}),_<o&&M++,Mn(Math.round((_+M*O)*x)/x,o,Ac(o,y,t))&&M++):_<o&&M++);M<k;++M)i.push({value:Math.round((_+M*O)*x)/x});return b&&u&&w!==s?i.length&&Mn(i[i.length-1].value,s,Ac(s,y,t))?i[i.length-1].value=s:i.push({value:s}):b&&w!==s||i.push({value:w}),i}function Ac(t,e,{horizontal:i,minRotation:n}){const r=Pn(n),o=(i?Math.sin(r):Math.cos(r))||.001,s=.75*e*(""+t).length;return Math.min(e/o,s)}Pc.id="category",Pc.defaults={ticks:{callback:Pc.prototype.getLabelForValue}};class Cc extends Qs{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return Ui(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:r}=this;const o=t=>n=e?n:t,s=t=>r=i?r:t;if(t){const t=kn(n),e=kn(r);t<0&&e<0?s(0):t>0&&e>0&&o(0)}if(n===r){let e=1;(r>=Number.MAX_SAFE_INTEGER||n<=Number.MIN_SAFE_INTEGER)&&(e=Math.abs(.05*r)),s(r+e),t||o(n-e)}this.min=n,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=Tc({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&En(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Jo(t,this.chart.options.locale,this.options.ticks.format)}}class Lc extends Cc{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Xi(t)?t:0,this.max=Xi(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=Pn(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Dc(t){return 1===t/Math.pow(10,Math.floor(wn(t)))}Lc.id="linear",Lc.defaults={ticks:{callback:Hs.formatters.numeric}};class jc extends Qs{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=Cc.prototype.parse.apply(this,[t,e]);if(0!==i)return Xi(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=Xi(t)?Math.max(0,t):null,this.max=Xi(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const r=e=>i=t?i:e,o=t=>n=e?n:t,s=(t,e)=>Math.pow(10,Math.floor(wn(t))+e);i===n&&(i<=0?(r(1),o(10)):(r(s(i,-1)),o(s(n,1)))),i<=0&&r(s(n,-1)),n<=0&&o(s(i,1)),this._zero&&this.min!==this._suggestedMin&&i===s(this.min,0)&&r(s(i,-1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,e){const i=Math.floor(wn(e.max)),n=Math.ceil(e.max/Math.pow(10,i)),r=[];let o=Gi(t.min,Math.pow(10,Math.floor(wn(e.min)))),s=Math.floor(wn(o)),a=Math.floor(o/Math.pow(10,s)),l=s<0?Math.pow(10,Math.abs(s)):1;do{r.push({value:o,major:Dc(o)}),++a,10===a&&(a=1,++s,l=s>=0?1:l),o=Math.round(a*Math.pow(10,s)*l)/l}while(s<i||s===i&&a<n);const c=Gi(t.max,o);return r.push({value:c,major:Dc(o)}),r}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&En(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":Jo(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=wn(t),this._valueRange=wn(this.max)-wn(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(wn(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function Ic(t){const e=t.ticks;if(e.display&&t.display){const t=co(e.backdropPadding);return Ki(e.font&&e.font.size,Wr.font.size)+t.height}return 0}function Rc(t,e,i){return i=qi(i)?i:[i],{w:Hr(t,e.string,i),h:i.length*e.lineHeight}}function Fc(t,e,i,n,r){return t===n||t===r?{start:e-i/2,end:e+i/2}:t<n||t>r?{start:e-i,end:e}:{start:e,end:e+i}}function zc(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),n=[],r=[],o=t._pointLabels.length,s=t.options.pointLabels,a=s.centerPointLabels?pn/o:0;for(let l=0;l<o;l++){const o=s.setContext(t.getPointLabelContext(l));r[l]=o.padding;const c=t.getPointPosition(l,t.drawingArea+r[l],a),h=ho(o.font),u=Rc(t.ctx,h,t._pointLabels[l]);n[l]=u;const d=jn(t.getIndexAngle(l)+a),f=Math.round(Tn(d));Nc(i,e,d,Fc(f,c.x,u.w,0,180),Fc(f,c.y,u.h,90,270))}t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){const n=[],r=t._pointLabels.length,o=t.options,s=Ic(o)/2,a=t.drawingArea,l=o.pointLabels.centerPointLabels?pn/r:0;for(let o=0;o<r;o++){const r=t.getPointPosition(o,a+s+i[o],l),c=Math.round(Tn(jn(r.angle+yn))),h=e[o],u=Vc(r.y,h.h,c),d=Bc(c),f=Wc(r.x,h.w,d);n.push({x:r.x,y:u,textAlign:d,left:f,top:u,right:f+h.w,bottom:u+h.h})}return n}(t,n,r)}function Nc(t,e,i,n,r){const o=Math.abs(Math.sin(i)),s=Math.abs(Math.cos(i));let a=0,l=0;n.start<e.l?(a=(e.l-n.start)/o,t.l=Math.min(t.l,e.l-a)):n.end>e.r&&(a=(n.end-e.r)/o,t.r=Math.max(t.r,e.r+a)),r.start<e.t?(l=(e.t-r.start)/s,t.t=Math.min(t.t,e.t-l)):r.end>e.b&&(l=(r.end-e.b)/s,t.b=Math.max(t.b,e.b+l))}function Bc(t){return 0===t||180===t?"center":t<180?"left":"right"}function Wc(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function Vc(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}function Hc(t,e,i,n){const{ctx:r}=t;if(i)r.arc(t.xCenter,t.yCenter,e,0,gn);else{let i=t.getPointPosition(0,e);r.moveTo(i.x,i.y);for(let o=1;o<n;o++)i=t.getPointPosition(o,e),r.lineTo(i.x,i.y)}}jc.id="logarithmic",jc.defaults={ticks:{callback:Hs.formatters.logarithmic,major:{enabled:!0}}};class $c extends Cc{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=co(Ic(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=Xi(t)&&!isNaN(t)?t:0,this.max=Xi(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Ic(this.options))}generateTickLabels(t){Cc.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((t,e)=>{const i=Qi(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){const t=this.options;t.display&&t.pointLabels.display?zc(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,n))}getIndexAngle(t){return jn(t*(gn/(this._pointLabels.length||1))+Pn(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(Ui(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(Ui(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return function(t,e,i){return fo(t,{label:i,index:e,type:"pointLabel"})}(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const n=this.getIndexAngle(t)-yn+i;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter,angle:n}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:n,bottom:r}=this._pointLabelItems[t];return{left:e,top:i,right:n,bottom:r}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),Hc(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:n}=e,r=this._pointLabels.length;let o,s,a;if(e.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:n}}=t;for(let r=e-1;r>=0;r--){const e=n.setContext(t.getPointLabelContext(r)),o=ho(e.font),{x:s,y:a,textAlign:l,left:c,top:h,right:u,bottom:d}=t._pointLabelItems[r],{backdropColor:f}=e;if(!Ui(f)){const t=lo(e.borderRadius),n=co(e.backdropPadding);i.fillStyle=f;const r=c-n.left,o=h-n.top,s=u-c+n.width,a=d-h+n.height;Object.values(t).some(t=>0!==t)?(i.beginPath(),eo(i,{x:r,y:o,w:s,h:a,radius:t}),i.fill()):i.fillRect(r,o,s,a)}Zr(i,t._pointLabels[r],s,a+o.lineHeight/2,o,{color:e.color,textAlign:l,textBaseline:"middle"})}}(this,r),n.display&&this.ticks.forEach((t,e)=>{if(0!==e){s=this.getDistanceFromCenterForValue(t.value);!function(t,e,i,n){const r=t.ctx,o=e.circular,{color:s,lineWidth:a}=e;!o&&!n||!s||!a||i<0||(r.save(),r.strokeStyle=s,r.lineWidth=a,r.setLineDash(e.borderDash),r.lineDashOffset=e.borderDashOffset,r.beginPath(),Hc(t,i,o,n),r.closePath(),r.stroke(),r.restore())}(this,n.setContext(this.getContext(e-1)),s,r)}}),i.display){for(t.save(),o=r-1;o>=0;o--){const n=i.setContext(this.getPointLabelContext(o)),{color:r,lineWidth:l}=n;l&&r&&(t.lineWidth=l,t.strokeStyle=r,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,s=this.getDistanceFromCenterForValue(e.ticks.reverse?this.min:this.max),a=this.getPointPosition(o,s),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(a.x,a.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let r,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((n,s)=>{if(0===s&&!e.reverse)return;const a=i.setContext(this.getContext(s)),l=ho(a.font);if(r=this.getDistanceFromCenterForValue(this.ticks[s].value),a.showLabelBackdrop){t.font=l.string,o=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=co(a.backdropPadding);t.fillRect(-o/2-e.left,-r-l.size/2-e.top,o+e.width,l.size+e.height)}Zr(t,n.label,0,-r,l,{color:a.color})}),t.restore()}drawTitle(){}}$c.id="radialLinear",$c.defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Hs.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}},$c.defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"},$c.descriptors={angleLines:{_fallback:"grid"}};const Uc={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},qc=Object.keys(Uc);function Yc(t,e){return t-e}function Xc(t,e){if(Ui(e))return null;const i=t._adapter,{parser:n,round:r,isoWeekday:o}=t._parseOpts;let s=e;return"function"==typeof n&&(s=n(s)),Xi(s)||(s="string"==typeof n?i.parse(s,n):i.parse(s)),null===s?null:(r&&(s="week"!==r||!Sn(o)&&!0!==o?i.startOf(s,r):i.startOf(s,"isoWeek",o)),+s)}function Gc(t,e,i,n){const r=qc.length;for(let o=qc.indexOf(t);o<r-1;++o){const t=Uc[qc[o]],r=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(r*t.size))<=n)return qc[o]}return qc[r-1]}function Kc(t,e,i){if(i){if(i.length){const{lo:n,hi:r}=zn(i,e);t[i[n]>=e?i[n]:i[r]]=!0}}else t[e]=!0}function Jc(t,e,i){const n=[],r={},o=e.length;let s,a;for(s=0;s<o;++s)a=e[s],r[a]=s,n.push({value:a,major:!1});return 0!==o&&i?function(t,e,i,n){const r=t._adapter,o=+r.startOf(e[0].value,n),s=e[e.length-1].value;let a,l;for(a=o;a<=s;a=+r.add(a,1,n))l=i[a],l>=0&&(e[l].major=!0);return e}(t,n,r,i):n}class Qc extends Qs{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e){const i=t.time||(t.time={}),n=this._adapter=new oa._date(t.adapters.date);n.init(e),sn(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:Xc(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:r,minDefined:o,maxDefined:s}=this.getUserBounds();function a(t){o||isNaN(t.min)||(n=Math.min(n,t.min)),s||isNaN(t.max)||(r=Math.max(r,t.max))}o&&s||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=Xi(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),r=Xi(r)&&!isNaN(r)?r:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,o=function(t,e,i){let n=0,r=t.length;for(;n<r&&t[n]<e;)n++;for(;r>n&&t[r-1]>i;)r--;return n>0||r<t.length?t.slice(n,r):t}(n,r,this.max);return this._unit=e.unit||(i.autoSkip?Gc(e.minUnit,this.min,this.max,this._getLabelCapacity(r)):function(t,e,i,n,r){for(let o=qc.length-1;o>=qc.indexOf(i);o--){const i=qc[o];if(Uc[i].common&&t._adapter.diff(r,n,i)>=e-1)return i}return qc[i?qc.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=qc.indexOf(t)+1,i=qc.length;e<i;++e)if(Uc[qc[e]].common)return qc[e]}(this._unit):void 0,this.initOffsets(n),t.reverse&&o.reverse(),Jc(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t){let e,i,n=0,r=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),n=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),r=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=Rn(n,0,o),r=Rn(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,e=this.min,i=this.max,n=this.options,r=n.time,o=r.unit||Gc(r.minUnit,e,i,this._getLabelCapacity(e)),s=Ki(r.stepSize,1),a="week"===o&&r.isoWeekday,l=Sn(a)||!0===a,c={};let h,u,d=e;if(l&&(d=+t.startOf(d,"isoWeek",a)),d=+t.startOf(d,l?"day":o),t.diff(i,e,o)>1e5*s)throw new Error(e+" and "+i+" are too far apart with stepSize of "+s+" "+o);const f="data"===n.ticks.source&&this.getDataTimestamps();for(h=d,u=0;h<i;h=+t.add(h,s,o),u++)Kc(c,h,f);return h!==i&&"ticks"!==n.bounds&&1!==u||Kc(c,h,f),Object.keys(c).sort((t,e)=>t-e).map(t=>+t)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}_tickFormatFunction(t,e,i,n){const r=this.options,o=r.time.displayFormats,s=this._unit,a=this._majorUnit,l=s&&o[s],c=a&&o[a],h=i[e],u=a&&c&&h&&h.major,d=this._adapter.format(t,n||(u?c:l)),f=r.ticks.callback;return f?Qi(f,[d,e,i],this):d}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e<i;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,n=Pn(this.isHorizontal()?e.maxRotation:e.minRotation),r=Math.cos(n),o=Math.sin(n),s=this._resolveTickFontOptions(0).size;return{w:i*r+s*o,h:i*o+s*r}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,n=i[e.unit]||i.millisecond,r=this._tickFormatFunction(t,0,Jc(this,[t],this._majorUnit),n),o=this._getLabelSize(r),s=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return s>0?s:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t<e;++t)i=i.concat(n[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const n=this.getLabels();for(e=0,i=n.length;e<i;++e)t.push(Xc(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Hn(t.sort(Yc))}}function Zc(t,e,i){let n,r,o,s,a=0,l=t.length-1;i?(e>=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=Nn(t,"pos",e)),({pos:n,time:o}=t[a]),({pos:r,time:s}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=Nn(t,"time",e)),({time:n,pos:o}=t[a]),({time:r,pos:s}=t[l]));const c=r-n;return c?o+(s-o)*(e-n)/c:o}Qc.id="time",Qc.defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",major:{enabled:!1}}};class th extends Qc{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Zc(e,this.min),this._tableRange=Zc(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],r=[];let o,s,a,l,c;for(o=0,s=t.length;o<s;++o)l=t[o],l>=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,s=n.length;o<s;++o)c=n[o+1],a=n[o-1],l=n[o],Math.round((c+a)/2)!==l&&r.push({time:l,pos:o/(s-1)});return r}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Zc(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Zc(this._table,i*this._tableRange+this._minPos,!0)}}th.id="timeseries",th.defaults=Qc.defaults;const eh=[ia,Nl,Mc,Object.freeze({__proto__:null,CategoryScale:Pc,LinearScale:Lc,LogarithmicScale:jc,RadialLinearScale:$c,TimeScale:Qc,TimeSeriesScale:th})];dl.register(...eh);var ih=dl,nh=i(998),rh=i.n(nh);const oh={data:{},context:null,init(t){this.context=t;const e=t.querySelectorAll("[data-progress]"),i=t.querySelectorAll("[data-chart]");[...e].forEach(t=>{t.dataset.url&&(this.data[t.dataset.url]||(this.data[t.dataset.url]={items:[],poll:null}),this.data[t.dataset.url].items.push(t)),"line"===t.dataset.progress?this.line(t):"circle"===t.dataset.progress&&this.circle(t)});for(const t in this.data)this.getValues(t);[...i].forEach(t=>{const e={labels:JSON.parse(t.dataset.dates),datasets:[{backgroundColor:t.dataset.color,borderColor:t.dataset.color,data:JSON.parse(t.dataset.data),cubicInterpolationMode:"monotone"}]};new ih(t,{type:"line",data:e,options:{responsive:!0,radius:0,interaction:{intersect:!1},plugins:{legend:{display:!1}},scales:{y:{suggestedMin:0,ticks:{color:"#999999",callback:(t,e)=>rh()(t,{decimals:2,scale:"SI"})},grid:{color:"#d3dce3"}},x:{ticks:{color:"#999999"},grid:{color:"#d3dce3"}}}}})})},line(t){new(Vi().Line)(t,{strokeWidth:2,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:2,svgStyle:{width:"100%",height:"100%",display:"block"}}).animate(t.dataset.value/100)},circle(t){t.dataset.basetext=t.dataset.text,t.dataset.text="";const e=t.dataset.value,i=this;if(t.bar=new(Vi().Circle)(t,{strokeWidth:3,easing:"easeInOut",duration:1400,color:t.dataset.color,trailColor:"#d3dce3",trailWidth:3,svgStyle:null,text:{autoStyleContainer:!1,style:{color:"#222222"}},step(e,n){const r=Math.floor(100*n.value());i.setText(n,parseFloat(r),t.dataset.text)}}),!t.dataset.url){const i=e/100;t.bar.animate(i)}},getValues(t){this.data[t].poll&&(clearTimeout(this.data[t].poll),this.data[t].poll=null),Pt({path:t,method:"GET"}).then(e=>{this.data[t].items.forEach(i=>{void 0!==e[i.dataset.basetext]?i.dataset.text=e[i.dataset.basetext]:i.dataset.text=i.dataset.basetext,i.bar.animate(e[i.dataset.value]),i.dataset.poll&&!this.data[t].poll&&(this.data[t].poll=setTimeout(()=>{this.getValues(t)},1e4))});for(const t in e){const i=this.context.querySelectorAll(`[data-key="${t}"]`),n=this.context.querySelectorAll(`[data-text="${t}"]`);i.forEach(i=>{i.dataset.value=e[t],i.dispatchEvent(new Event("focus"))}),n.forEach(i=>{i.innerText=e[t],i.classList.contains("cld-toggle")&&(e[t]?i.classList.remove("hidden"):i.classList.add("hidden"))})}})},setText(t,e,i){if(!t)return;const n=document.createElement("span"),r=document.createElement("h2"),o=document.createTextNode(i);r.innerText=e+"%",n.appendChild(r),n.appendChild(o),t.setText(n)}};var sh=oh;var ah={key:"_cld_pending_state",data:null,pending:null,changed:!1,previous:{},init(){this.data=cldData.stateData?cldData.stateData:{};let t=localStorage.getItem(this.key);t&&(t=JSON.parse(t),this.data={...this.data,...t},this.sendStates()),this.previous=JSON.stringify(this.data)},_update(){this.pending&&(clearTimeout(this.pending),localStorage.removeItem(this.key)),this.previous!==JSON.stringify(this.data)&&(this.pending=setTimeout(()=>this.sendStates(),2e3),localStorage.setItem(this.key,JSON.stringify(this.data)))},set(t,e){this.data[t]&&this.data[t]===e||(this.data[t]=e,this._update())},get(t){let e=null;return this.data[t]&&(e=this.data[t]),e},sendStates(){fetch(cldData.stateURL,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":cldData.stateNonce},body:JSON.stringify(this.data)}).then(t=>t.json()).then(t=>{t.success&&(this.previous=JSON.stringify(t.state),localStorage.removeItem(this.key))})}};var lh={init(t){[...t.querySelectorAll("[data-remove]")].forEach(t=>{t.addEventListener("click",e=>{if(t.dataset.message&&!confirm(t.dataset.message))return;const i=document.getElementById(t.dataset.remove);i.parentNode.removeChild(i)})})}};const ch={values:{},inputs:{},context:null,init(t){this.context=t;t.querySelectorAll("[data-tags]").forEach(t=>this.bind(t))},bind(t){t.innerText=t.dataset.placeholder;const e=t.dataset.tags,i=document.getElementById(e),n=this.context.querySelectorAll(`[data-tags-delete="${e}"]`);this.values[e]=JSON.parse(i.value),this.inputs[e]=i,t.boundInput=e,t.boundDisplay=this.context.querySelector(`[data-tags-display="${e}"]`),t.boundDisplay.addEventListener("click",e=>{t.focus()}),t.addEventListener("focus",e=>{t.innerText=null}),t.addEventListener("blur",e=>{3<t.innerText.length&&this.captureTag(t,t.innerText),t.innerText=t.dataset.placeholder}),t.addEventListener("keydown",i=>{if("Tab"===i.key)3<t.innerText.length&&(i.preventDefault(),this.captureTag(t,t.innerText));else if("Escape"===i.key)t.blur();else if("Backspace"===i.key&&0===t.innerText.length){const i=t.boundDisplay.lastChild.previousSibling;i&&(i.parentNode.removeChild(i),this.values[e].pop(),this.updateInput(e))}}),t.addEventListener("keypress",e=>{"Comma"!==e.code&&"Enter"!==e.code&&"Tab"!==e.code&&"Space"!==e.code||(e.preventDefault(),3<t.innerText.length&&this.captureTag(t,t.innerText))}),n.forEach(t=>{t.parentNode.control=t,t.parentNode.style.width=getComputedStyle(t.parentNode).width,t.addEventListener("click",e=>{e.stopPropagation(),this.deleteTag(t)})})},deleteTag(t){const e=t.parentNode,i=e.dataset.inputId,n=this.values[i].indexOf(e.dataset.value);0<=n&&this.values[i].splice(n,1),e.style.width=0,e.style.opacity=0,e.style.padding=0,e.style.margin=0,setTimeout(()=>{e.parentNode.removeChild(e)},500),this.updateInput(i)},captureTag(t,e){if(this[t.dataset.format]&&"string"!=typeof(e=this[t.dataset.format](e)))return t.classList.add("pulse"),void setTimeout(()=>{t.classList.remove("pulse")},1e3);if(!this.validateUnique(t.boundDisplay,e)){const i=this.createTag(e);i.dataset.inputId=t.boundInput,this.values[t.boundInput].push(e),t.innerText=null,t.boundDisplay.insertBefore(i,t),i.style.width=getComputedStyle(i).width,i.style.opacity=1,this.updateInput(t.boundInput)}},createTag(t){const e=document.createElement("span"),i=document.createElement("span"),n=document.createElement("span");return e.classList.add("cld-input-tags-item"),i.classList.add("cld-input-tags-item-text"),n.className="cld-input-tags-item-delete dashicons dashicons-no-alt",n.addEventListener("click",()=>this.deleteTag(n)),i.innerText=t,e.appendChild(i),e.appendChild(n),e.dataset.value=t,e.style.opacity=0,e.control=n,e},validateUnique(t,e){const i=t.querySelector(`[data-value="${e}"]`);let n=!1;return i&&(i.classList.remove("pulse"),i.classList.add("pulse"),setTimeout(()=>{i.classList.remove("pulse")},500),n=!0),n},updateInput(t){this.inputs[t].value=JSON.stringify(this.values[t])},host(t){!1===/^(?:http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)/.test(t)&&(t="https://"+t);let e="";try{e=new URL(t)}catch(t){return t}return decodeURIComponent(e.host)}};var hh=ch;var uh={suffixInputs:null,init(t){this.suffixInputs=t.querySelectorAll("[data-suffix]"),[...this.suffixInputs].forEach(t=>this.bindInput(t))},bindInput(t){const e=document.getElementById(t.dataset.suffix),i=e.dataset.template.split("@value");this.setSuffix(e,i,t.value),t.addEventListener("change",()=>this.setSuffix(e,i,t.value)),t.addEventListener("input",()=>this.setSuffix(e,i,t.value))},setSuffix(t,e,i){t.innerHTML="",t.classList.add("hidden"),-1===["none","off",""].indexOf(i)&&t.classList.remove("hidden");const n=document.createTextNode(e.join(i));t.appendChild(n)}};const dh={wrappers:null,frame:null,error:'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg"><rect width="100%" height="100%" fill="rgba(0,0,0,0.1)"/><text x="50%" y="50%" fill="red" text-anchor="middle" dominant-baseline="middle">%26%23x26A0%3B︎</text></svg>',init(t){this.wrappers=t.querySelectorAll(".cld-size-items"),this.wrappers.forEach(t=>{const e=t.querySelectorAll(".cld-image-selector-item");e.forEach(i=>{i.addEventListener("click",()=>{e.forEach(t=>{delete t.dataset.selected}),i.dataset.selected=!0,this.buildImages(t)})}),this.buildImages(t)})},buildImages(t){const e=t.dataset.base,i=t.querySelectorAll("img"),n=t.querySelector(".cld-image-selector-item[data-selected]").dataset.image;let r=null;i.forEach(i=>{const o=i.dataset.size,s=i.parentNode.querySelector(".regular-text"),a=i.parentNode.querySelector(".disable-toggle"),l=s.value.length?s.value.replace(" ",""):s.placeholder;a.checked?(s.disabled=!0,i.src=`${e}/${o}/${n}`):(s.disabled=!1,i.src=`${e}/${o},${l}/${n}`),i.bound||(s.addEventListener("input",()=>{r&&clearTimeout(r),r=setTimeout(()=>{this.buildImages(t)},1e3)}),a.addEventListener("change",()=>{this.buildImages(t)}),i.addEventListener("error",()=>{i.src=this.error}),i.bound=!0)})}};var fh=dh;const ph={bindings:{},parent_check_data:{},check_parents:{},_init(t){const e=t.querySelectorAll("[data-condition]"),i=t.querySelectorAll("[data-toggle]"),n=t.querySelectorAll("[data-for]"),r=t.querySelectorAll("[data-tooltip]"),o=t.querySelectorAll("[data-bind-trigger]"),s=t.querySelectorAll("[data-main]"),a=t.querySelectorAll("[data-file]"),l=t.querySelectorAll("[data-auto-suffix]"),c=t.querySelectorAll("[data-confirm]"),h={};ah.init(),Bi.bind(s),l.forEach(t=>this._autoSuffix(t)),o.forEach(t=>this._trigger(t)),i.forEach(t=>this._toggle(t)),e.forEach(t=>this._bind(t)),n.forEach(t=>this._alias(t)),a.forEach(t=>this._files(t,h)),Ri(r,{theme:"cloudinary",arrow:!1,placement:"bottom-start",aria:{content:"auto",expanded:"auto"},content:t=>document.getElementById(t.dataset.tooltip).innerHTML}),[...o].forEach(t=>{t.dispatchEvent(new Event("input"))}),c.forEach(t=>{t.addEventListener("click",e=>{confirm(t.dataset.confirm)||(e.preventDefault(),e.stopPropagation())})}),sh.init(t),lh.init(t),hh.init(t),uh.init(t),fh.init(t)},_autoSuffix(t){const e=t.dataset.autoSuffix;let i="";const n=[...e.split(";")].map(t=>0===t.indexOf("*")?(i=t.replace("*",""),i):t);t.addEventListener("change",()=>{const e=t.value.replace(" ",""),r=e.replace(/[^0-9]/g,""),o=e.replace(/[0-9]/g,"").toLowerCase();r&&(-1===n.indexOf(o)?t.value=r+i:t.value=r+o)}),t.dispatchEvent(new Event("change"))},_files(t,e){const i=t.dataset.parent;i&&(this.check_parents[i]=document.getElementById(i),this.parent_check_data[i]||(this.parent_check_data[i]=this.check_parents[i].value?JSON.parse(this.check_parents[i].value):[]),t.addEventListener("change",()=>{const n=this.parent_check_data[i].indexOf(t.value);t.checked?this.parent_check_data[i].push(t.value):this.parent_check_data[i].splice(n,1),e[i]&&clearTimeout(e[i]),e[i]=setTimeout(()=>{this._compileParent(i)},10)}))},_compileParent(t){this.check_parents[t].value=JSON.stringify(this.parent_check_data[t]),this.check_parents[t].dispatchEvent(new Event("change"))},_bind(t){t.condition=JSON.parse(t.dataset.condition);for(const e in t.condition)this.bindings[e]&&this.bindings[e].elements.push(t)},_trigger(t){const e=t.dataset.bindTrigger,i=this;i.bindings[e]={input:t,value:t.value,checked:!0,elements:[]},t.addEventListener("change",function(e){t.dispatchEvent(new Event("input"))}),t.addEventListener("input",function(){if(i.bindings[e].value=t.value,"checkbox"===t.type&&(i.bindings[e].checked=t.checked),"radio"!==t.type||!1!==t.checked)for(const n in i.bindings[e].elements)i.toggle(i.bindings[e].elements[n],t)})},_alias(t){t.addEventListener("click",function(){document.getElementById(t.dataset.for).dispatchEvent(new Event("click"))})},_toggle(t){const e=this,i=document.querySelector('[data-wrap="'+t.dataset.toggle+'"]');if(!i)return;const n=ah.get(t.id);t.addEventListener("click",function(n){n.stopPropagation();const r=i.classList.contains("open")?"closed":"open";e.toggle(i,t,r)}),n!==t.dataset.state&&this.toggle(i,t,n)},toggle(t,e,i){if(!i){i="open";for(const e in t.condition){let n=this.bindings[e].value;const r=t.condition[e];"boolean"==typeof r&&(n=this.bindings[e].checked),r!==n&&(i="closed")}}"closed"===i?this.close(t,e):this.open(t,e),ah.set(e.id,i)},open(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("closed"),t.classList.add("open"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-down-alt2"),e.classList.add("dashicons-arrow-up-alt2")),[...i].forEach(function(t){t.dataset.disabled=!1})},close(t,e){const i=t.getElementsByClassName("cld-ui-input");t.classList.remove("open"),t.classList.add("closed"),e&&e.classList.contains("dashicons")&&(e.classList.remove("dashicons-arrow-up-alt2"),e.classList.add("dashicons-arrow-down-alt2")),[...i].forEach(function(t){t.dataset.disabled=!0})}},gh=document.querySelectorAll(".cld-settings,.cld-meta-box");gh.length&&gh.forEach(t=>{t&&window.addEventListener("load",ph._init(t))});const mh={storageKey:"_cld_wizard",testing:null,next:document.querySelector('[data-navigate="next"]'),back:document.querySelector('[data-navigate="back"]'),lock:document.getElementById("pad-lock"),lockIcon:document.getElementById("lock-icon"),options:document.querySelectorAll('.cld-ui-input[type="checkbox"]'),settings:document.getElementById("optimize"),tabBar:document.getElementById("wizard-tabs"),tracking:document.getElementById("tracking"),complete:document.getElementById("complete-wizard"),tabs:{"tab-1":document.getElementById("tab-icon-1"),"tab-2":document.getElementById("tab-icon-2"),"tab-3":document.getElementById("tab-icon-3")},content:{"tab-1":document.getElementById("tab-1"),"tab-2":document.getElementById("tab-2"),"tab-3":document.getElementById("tab-3"),"tab-4":document.getElementById("tab-4")},connection:{error:document.getElementById("connection-error"),success:document.getElementById("connection-success"),working:document.getElementById("connection-working")},debounceConnect:null,updateConnection:document.getElementById("update-connection"),cancelUpdateConnection:document.getElementById("cancel-update-connection"),config:{},didSave:!1,init(){if(!cldData.wizard)return;this.config=cldData.wizard.config,window.localStorage.getItem(this.storageKey)&&(this.config=JSON.parse(window.localStorage.getItem(this.storageKey))),document.location.hash.length&&this.hashChange(),Pt.use(Pt.createNonceMiddleware(cldData.wizard.saveNonce));const t=document.querySelectorAll("[data-navigate]"),e=document.getElementById("connect.cloudinary_url");this.updateConnection.addEventListener("click",()=>{this.lockNext(),e.parentNode.classList.remove("hidden"),this.cancelUpdateConnection.classList.remove("hidden"),this.updateConnection.classList.add("hidden")}),this.cancelUpdateConnection.addEventListener("click",()=>{this.unlockNext(),e.parentNode.classList.add("hidden"),this.cancelUpdateConnection.classList.add("hidden"),this.updateConnection.classList.remove("hidden"),this.config.cldString=!0,e.value="",this.connection.error.classList.remove("active"),this.connection.success.classList.add("active")}),[...t].forEach(t=>{t.addEventListener("click",()=>{this.navigate(t.dataset.navigate)})}),this.lock.addEventListener("click",()=>{this.lockIcon.classList.toggle("dashicons-unlock"),this.settings.classList.toggle("disabled"),this.options.forEach(t=>{t.disabled=t.disabled?"":"disabled"})}),e.addEventListener("input",t=>{this.lockNext();const i=e.value.replace("CLOUDINARY_URL=","");this.connection.error.classList.remove("active"),this.connection.success.classList.remove("active"),this.connection.working.classList.remove("active"),i.length&&(this.testing=i,this.debounceConnect&&clearTimeout(this.debounceConnect),this.debounceConnect=setTimeout(()=>{this.evaluateConnectionString(i)?(this.connection.working.classList.add("active"),this.testConnection(i)):this.connection.error.classList.add("active")},500))}),this.config.cldString&&(e.parentNode.classList.add("hidden"),this.updateConnection.classList.remove("hidden")),this.getTab(this.config.tab),this.initFeatures(),window.addEventListener("hashchange",t=>{this.hashChange()})},hashChange(){const t=parseInt(document.location.hash.replace("#",""));t&&0<t&&5>t&&this.getTab(t)},initFeatures(){const t=document.getElementById("media_library");t.checked=this.config.mediaLibrary,t.addEventListener("change",()=>{this.setConfig("mediaLibrary",t.checked)});const e=document.getElementById("non_media");e.checked=this.config.nonMedia,e.addEventListener("change",()=>{this.setConfig("nonMedia",e.checked)});const i=document.getElementById("advanced");i.checked=this.config.advanced,i.addEventListener("change",()=>{this.setConfig("advanced",i.checked)})},getCurrent(){return this.content[`tab-${this.config.tab}`]},hideTabs(){Object.keys(this.content).forEach(t=>{this.hide(this.content[t])})},completeTab(t){this.incompleteTab(),Object.keys(this.tabs).forEach(e=>{const i=parseInt(this.tabs[e].dataset.tab);t>i?this.tabs[e].classList.add("complete"):t===i&&this.tabs[e].classList.add("active")})},incompleteTab(t){Object.keys(this.tabs).forEach(t=>{this.tabs[t].classList.remove("complete","active")})},getCurrentTab(){return this.tabs[`tab-icon-${this.config.tab}`]},getTab(t){if(4===t&&window.localStorage.getItem(this.storageKey)&&!this.didSave)return void this.saveConfig();const e=this.getCurrent(),i=document.getElementById(`tab-${t}`);switch(this.hideTabs(),this.completeTab(t),this.hide(document.getElementById(`tab-${this.config.tab}`)),e.classList.remove("active"),this.show(i),this.show(this.next),this.hide(this.lock),t){case 1:this.hide(this.back),this.unlockNext();break;case 2:this.show(this.back),this.config.cldString?this.showSuccess():(this.lockNext(),setTimeout(()=>{document.getElementById("connect.cloudinary_url").focus()},0)),this.updateConnection.classList.contains("hidden")&&this.lockNext();break;case 3:if(!this.config.cldString)return void(document.location.hash="1");this.show(this.lock),this.show(this.back);break;case 4:if(!this.config.cldString)return void(document.location.hash="1");this.hide(this.tabBar),this.hide(this.next),this.hide(this.back)}this.setConfig("tab",t)},navigate(t){"next"===t?this.navigateNext():"back"===t&&this.navigateBack()},navigateBack(){document.location.hash=this.config.tab-1},navigateNext(){document.location.hash=this.config.tab+1},showError(){this.connection.error.classList.add("active"),this.connection.success.classList.remove("active")},showSuccess(){this.connection.error.classList.remove("active"),this.connection.success.classList.add("active")},show(t){t.classList.remove("hidden"),t.style.display=""},hide(t){t.classList.add("hidden"),t.style.display="none"},lockNext(){this.next.disabled="disabled"},unlockNext(){this.next.disabled=""},evaluateConnectionString:t=>new RegExp(/^(?:CLOUDINARY_URL=)?(cloudinary:\/\/){1}(\d*)[:]{1}([^@]*)[@]{1}([^@]*)$/gim).test(t),testConnection(t){Pt({path:cldData.wizard.testURL,data:{cloudinary_url:t},method:"POST"}).then(e=>{e.url===this.testing&&(this.connection.working.classList.remove("active"),"connection_error"===e.type?this.showError():"connection_success"===e.type&&(this.showSuccess(),this.unlockNext(),this.setConfig("cldString",t)))})},setConfig(t,e){this.config[t]=e,window.localStorage.setItem(this.storageKey,JSON.stringify(this.config))},saveConfig(){this.lockNext(),this.next.innerText=j("Setting up Cloudinary","cloudinary"),this.didSave=!0,Pt({path:cldData.wizard.saveURL,data:this.config,method:"POST"}).then(t=>{this.next.innerText=j("Next","cloudinary"),this.unlockNext(),this.getTab(4),window.localStorage.removeItem(this.storageKey)}).fail(t=>{this.didSave=!1})}};window.addEventListener("load",()=>mh.init());const bh={select:document.getElementById("connect.offload"),tooltip:null,descriptions:{},change(){[...this.descriptions].forEach(t=>{t.classList.remove("selected")}),this.tooltip.querySelector("."+this.select.value).classList.add("selected")},addEventListener(){this.select.addEventListener("change",this.change.bind(this))},_init(){this.select&&(this.addEventListener(),this.tooltip=this.select.parentNode.querySelector(".cld-tooltip"),this.descriptions=this.tooltip.querySelectorAll("li"),this.change())}};window.addEventListener("load",()=>bh._init());const vh={pageReloader:document.getElementById("page-reloader"),init(){if(!cldData.extensions)return;Pt.use(Pt.createNonceMiddleware(cldData.extensions.nonce));[...document.querySelectorAll("[data-extension]")].forEach(t=>{t.addEventListener("change",e=>{t.spinner||(t.spinner=this.createSpinner(),t.parentNode.appendChild(t.spinner)),t.debounce&&clearTimeout(t.debounce),t.debounce=setTimeout(()=>{this.toggleExtension(t),t.debounce=null},1e3)})})},toggleExtension(t){const e=t.dataset.extension,i=t.checked;Pt({path:cldData.extensions.url,data:{extension:e,enabled:i},method:"POST"}).then(e=>{t.spinner&&(t.parentNode.removeChild(t.spinner),delete t.spinner),Object.keys(e).forEach(t=>{document.querySelectorAll(`[data-text="${t}"]`).forEach(i=>{i.innerText=e[t]})}),this.pageReloader.style.display="block"})},createSpinner(){const t=document.createElement("span");return t.classList.add("spinner"),t.classList.add("cld-extension-spinner"),t}};window.addEventListener("load",()=>vh.init());const yh={tabButtonSelectors:null,selectedTabID:"",deselectOldTab(){document.getElementById(this.selectedTabID).classList.remove("is-active"),this.filterActive([...this.tabButtonSelectors]).classList.remove("is-active")},selectCurrentTab(t){this.selectedTabID=t.dataset.tab,t.classList.add("is-active"),document.getElementById(this.selectedTabID).classList.add("is-active")},selectTab(t){t.preventDefault(),t.target.classList.contains("is-active")||(this.deselectOldTab(),this.selectCurrentTab(t.target))},filterTabs(){[...this.tabButtonSelectors].forEach(t=>{t.dataset.tab&&t.addEventListener("click",this.selectTab.bind(this))})},filterActive:t=>t.filter(t=>t.classList.contains("is-active")).pop(),init(){this.tabButtonSelectors=document.querySelectorAll(".cld-page-tabs-tab button"),0!==this.tabButtonSelectors.length&&(this.selectCurrentTab(this.filterActive([...this.tabButtonSelectors])),this.filterTabs())}};window.addEventListener("load",()=>yh.init());i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p,i.p;window.$=window.jQuery;e()}()}();